本文整理汇总了Java中org.eclipse.jface.preference.PreferenceDialog.create方法的典型用法代码示例。如果您正苦于以下问题:Java PreferenceDialog.create方法的具体用法?Java PreferenceDialog.create怎么用?Java PreferenceDialog.create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.preference.PreferenceDialog
的用法示例。
在下文中一共展示了PreferenceDialog.create方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: execute
import org.eclipse.jface.preference.PreferenceDialog; //导入方法依赖的package包/类
@Execute
public void execute(@Named(IServiceConstants.ACTIVE_SHELL) Shell shell, E4PreferenceRegistry prefReg,
@Optional @Named("preferencePageId") String pageId)
{
PreferenceManager pm = prefReg.getPreferenceManager();
PreferenceDialog dialog = new PreferenceDialog(shell, pm);
if (pageId != null)
{
dialog.setSelectedNode(pageId);
}
dialog.create();
dialog.getTreeViewer().setComparator(new ViewerComparator());
// dialog.getTreeViewer().expandAll();
dialog.open();
}
示例2: showPreferencePage
import org.eclipse.jface.preference.PreferenceDialog; //导入方法依赖的package包/类
protected boolean showPreferencePage()
{
Trace.trace(Trace.CONFIG, "JettyRuntimeComposite: showPreferencePage()");
String id = "org.eclipse.jdt.debug.ui.preferences.VMPreferencePage";
// should be using the following API, but it only allows a single
// preference page instance.
// see bug 168211 for details
// PreferenceDialog dialog =
// PreferencesUtil.createPreferenceDialogOn(getShell(), id, new String[]
// { id }, null);
// return (dialog.open() == Window.OK);
PreferenceManager manager = PlatformUI.getWorkbench().getPreferenceManager();
IPreferenceNode node = manager.find("org.eclipse.jdt.ui.preferences.JavaBasePreferencePage").findSubNode(id);
PreferenceManager manager2 = new PreferenceManager();
manager2.addToRoot(node);
PreferenceDialog dialog = new PreferenceDialog(getShell(),manager2);
dialog.create();
return (dialog.open() == Window.OK);
}
示例3: execute
import org.eclipse.jface.preference.PreferenceDialog; //导入方法依赖的package包/类
@Execute
public void execute(MApplication app) {
PreferenceManager pm = configurePreferences();
PreferenceDialog dialog = new PreferenceDialog(shell, pm);
dialog.setPreferenceStore(new ScopedPreferenceStore(
InstanceScope.INSTANCE, "org.bbaw.bts.app"));
dialog.create();
dialog.getTreeViewer().setComparator(new ViewerComparator());
dialog.getTreeViewer().expandAll();
dialog.open();
}
示例4: execute
import org.eclipse.jface.preference.PreferenceDialog; //导入方法依赖的package包/类
@Execute
public void execute(@Named(IServiceConstants.ACTIVE_SHELL) Shell shell, E4PreferenceRegistry prefReg)
{
PreferenceManager pm = prefReg.getPreferenceManager();
PreferenceDialog dialog = new PreferenceDialog(shell, pm);
dialog.create();
dialog.getTreeViewer().setComparator(new ViewerComparator());
dialog.getTreeViewer().expandAll();
dialog.open();
}
示例5: showConfigDialog
import org.eclipse.jface.preference.PreferenceDialog; //导入方法依赖的package包/类
static void showConfigDialog() {
IWorkbenchWindow window = EFActivator.getDefault().getWorkbench().getActiveWorkbenchWindow();
IPreferencePage page = new EFPreferencePage();
PreferenceManager mgr = window.getWorkbench().getPreferenceManager();
Shell shell = EFActivator.getDefault().getWorkbench().getDisplay().getActiveShell();
PreferenceDialog dialog = new PreferenceDialog(shell, mgr);
dialog.setSelectedNode("Externalfilter.preferences.ExternalFilterPreferencePage");
dialog.create();
dialog.setMessage(page.getTitle());
dialog.open();
}