本文整理匯總了Java中org.eclipse.jface.preference.PreferenceDialog.open方法的典型用法代碼示例。如果您正苦於以下問題:Java PreferenceDialog.open方法的具體用法?Java PreferenceDialog.open怎麽用?Java PreferenceDialog.open使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.jface.preference.PreferenceDialog
的用法示例。
在下文中一共展示了PreferenceDialog.open方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: execute
import org.eclipse.jface.preference.PreferenceDialog; //導入方法依賴的package包/類
public Object execute(ExecutionEvent event) throws ExecutionException
{
UIJob job = new UIJob("Open Theme Preferences") //$NON-NLS-1$
{
@Override
public IStatus runInUIThread(IProgressMonitor monitor)
{
final PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(UIUtils.getActiveShell(),
ThemePreferencePage.ID, null, null);
dialog.open();
return Status.OK_STATUS;
}
};
job.setPriority(Job.INTERACTIVE);
job.setRule(PopupSchedulingRule.INSTANCE);
job.schedule();
return null;
}
示例2: 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();
}
示例3: run
import org.eclipse.jface.preference.PreferenceDialog; //導入方法依賴的package包/類
@Override
public void run(IAction action) {
List<String> typesToFilter = getTypesToFilter(selection2);
String preferencePageId = "DataHierarchy.globalPrefPage";
String types = DataHierarchyPlugin.getDefault().getPreferenceStore().getString(
IPrefConstants.PREF_ACTIVE_FILTERS_LIST);
PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(null, preferencePageId,
null, typesToFilter);
int open = dialog.open();
if (open != Window.OK) {
return;
}
String newTypes = DataHierarchyPlugin.getDefault().getPreferenceStore().getString(
IPrefConstants.PREF_ACTIVE_FILTERS_LIST);
if (types.equals(newTypes)) {
return;
}
part.updateFilter(newTypes);
// SearchAgainAction search = new SearchAgainAction();
// search.init(part);
// search.run(action);
}
示例4: execute
import org.eclipse.jface.preference.PreferenceDialog; //導入方法依賴的package包/類
public final Object execute(final ExecutionEvent event)
{
final String preferencePageId = event.getParameter(IWorkbenchCommandConstants.WINDOW_PREFERENCES_PARM_PAGEID);
final IWorkbenchWindow activeWorkbenchWindow = HandlerUtil.getActiveWorkbenchWindow(event);
final Shell shell;
if (activeWorkbenchWindow == null)
{
shell = null;
}
else
{
shell = activeWorkbenchWindow.getShell();
}
final PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(shell, preferencePageId,
new String[] { preferencePageId }, null);
dialog.open();
return null;
}
示例5: execute
import org.eclipse.jface.preference.PreferenceDialog; //導入方法依賴的package包/類
@Override
public final Object execute(final ExecutionEvent event) {
final IWorkbenchWindow activeWorkbenchWindow = HandlerUtil.getActiveWorkbenchWindow(event);
final Shell shell;
if (activeWorkbenchWindow == null) {
shell = null;
} else {
shell = activeWorkbenchWindow.getShell();
}
final PreferenceDialog prefDialog = PreferencesUtil.createPreferenceDialogOn(shell, MergeEditorPreferencePage.PAGE_ID, null, null);
if (prefDialog != null)
prefDialog.open();
return null;
}
示例6: execute
import org.eclipse.jface.preference.PreferenceDialog; //導入方法依賴的package包/類
@Override
public final Object execute(final ExecutionEvent event) {
final IWorkbenchWindow activeWorkbenchWindow = HandlerUtil.getActiveWorkbenchWindow(event);
final Shell shell;
if (activeWorkbenchWindow == null) {
shell = null;
} else {
shell = activeWorkbenchWindow.getShell();
}
final PreferenceDialog prefDialog = PreferencesUtil.createPreferenceDialogOn(shell, DaysEditorPreferencePage.PAGE_ID, null, null);
if (prefDialog != null)
prefDialog.open();
return null;
}
示例7: 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);
}
示例8: execute
import org.eclipse.jface.preference.PreferenceDialog; //導入方法依賴的package包/類
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
Shell shell = HandlerUtil.getActiveShell(event);
PreferenceDialog dialog = createPreferenceDialogOn(shell, ExternalLibraryPreferencePage.ID, FILTER_IDS, null);
if (null != dialog) {
dialog.open();
}
return null;
}
示例9: openPreferences
import org.eclipse.jface.preference.PreferenceDialog; //導入方法依賴的package包/類
/**
* Opens the preferences dialog.
*/
private void openPreferences() {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(
shell, pageId, null, null);
dialog.open();
// not sure if I have to do any cleanup. If so, the we probably want to:
// dialog.blockOnOpen(true), then do the cleanup
}
示例10: 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();
}
示例11: openAguiPrefs
import org.eclipse.jface.preference.PreferenceDialog; //導入方法依賴的package包/類
private void openAguiPrefs() {
PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(
getDisplay().getActiveShell(),
AguiPreferencePage.PAGE_ID, //$NON-NLS-1$ preferencePageId
null, // displayedIds
null); // data
dialog.open();
}
示例12: execute
import org.eclipse.jface.preference.PreferenceDialog; //導入方法依賴的package包/類
@Execute
public void execute(Shell shell, @PrefMgr PreferenceManager manager) {
PreferenceDialog dialog = new PreferenceDialog(shell, manager) {
@Override
protected TreeViewer createTreeViewer(Composite parent) {
TreeViewer viewer = super.createTreeViewer(parent);
viewer.setComparator(new ViewerComparator() {
@Override
public int category(Object element) {
// this ensures that the General preferences page is always on top
// while the other pages are ordered alphabetical
if (element instanceof ContributedPreferenceNode
&& ("general".equals(((ContributedPreferenceNode) element).getId()))) {
return -1;
}
return 0;
}
});
return viewer;
}
};
dialog.open();
}
示例13: run
import org.eclipse.jface.preference.PreferenceDialog; //導入方法依賴的package包/類
public void run(final IMarker marker) {
PreferenceDialog page = PreferencesUtil.createPropertyDialogOn(
CorePlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell(),
marker.getResource().getProject(), projectPropertyPageID,
new String[] {projectPropertyPageID}, null);
page.open();
}
示例14: run
import org.eclipse.jface.preference.PreferenceDialog; //導入方法依賴的package包/類
public void run(IAction action) {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
if (resource != null && resource.getType() == IResource.PROJECT) {
PreferenceDialog page = PreferencesUtil.createPropertyDialogOn(shell,
resource, propertiesPageID, null, null);
if (page != null) {
page.open();
return;
}
}
CorePluginLog.logError("Could not create project properties dialog for resource "
+ resource.toString());
}
示例15: openViewPreferencesDialog
import org.eclipse.jface.preference.PreferenceDialog; //導入方法依賴的package包/類
@Override
public void openViewPreferencesDialog() {
PreferenceDialog dialog =
PreferencesUtil.createPreferenceDialogOn(
null,
EditorConstants.PREF_PAGE_EDITOR_ID,
new String[]{
EditorConstants.PREF_PAGE_EDITOR_ID,
BfTemplatePreferencePage.ID,
EditorConstants.PREF_PAGE_GENERAL_TEXT_EDITOR_ID},
null);
dialog.open();
}