當前位置: 首頁>>代碼示例>>Java>>正文


Java PreferenceDialog.open方法代碼示例

本文整理匯總了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;
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:20,代碼來源:OpenThemePreferencesHandler.java

示例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();
		
	}
 
開發者ID:cplutte,項目名稱:bts,代碼行數:18,代碼來源:E4PreferencesHandler.java

示例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);
    }
 
開發者ID:iloveeclipse,項目名稱:datahierarchy,代碼行數:24,代碼來源:AddToFilterAction.java

示例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;
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:22,代碼來源:ShowFilteredPreferencePageHandler.java

示例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;
}
 
開發者ID:nasa,項目名稱:OpenSPIFe,代碼行數:18,代碼來源:TableEditorPreferencePageHandler.java

示例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;
}
 
開發者ID:nasa,項目名稱:OpenSPIFe,代碼行數:18,代碼來源:DaysEditorPreferencePageHandler.java

示例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);
}
 
開發者ID:bengalaviz,項目名稱:JettyWTPPlugin,代碼行數:23,代碼來源:JettyRuntimeComposite.java

示例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;
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:10,代碼來源:OpenExternalLibraryPreferencePageHandler.java

示例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
}
 
開發者ID:alfsch,項目名稱:workspacemechanic,代碼行數:13,代碼來源:OpenPreferencesAction.java

示例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();
}
 
開發者ID:cplutte,項目名稱:bts,代碼行數:12,代碼來源:ShowPreferenceDialogHandler.java

示例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();
}
 
開發者ID:thahn0720,項目名稱:agui_eclipse_plugin,代碼行數:9,代碼來源:AguiPlugin.java

示例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();
}
 
開發者ID:fipro78,項目名稱:e4-cookbook-migration-guide,代碼行數:29,代碼來源:PreferencesHandler.java

示例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();
}
 
開發者ID:gwt-plugins,項目名稱:gwt-eclipse-plugin,代碼行數:9,代碼來源:ConfigureProjectSdkMarkerResolution.java

示例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());
}
 
開發者ID:gwt-plugins,項目名稱:gwt-eclipse-plugin,代碼行數:16,代碼來源:AbstractProjectPropertiesAction.java

示例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();
}
 
開發者ID:RichardBirenheide,項目名稱:brainfuck,代碼行數:14,代碼來源:BfEditor.java


注:本文中的org.eclipse.jface.preference.PreferenceDialog.open方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。