当前位置: 首页>>代码示例>>Java>>正文


Java PreferencesUtil.createPreferenceDialogOn方法代码示例

本文整理汇总了Java中org.eclipse.ui.dialogs.PreferencesUtil.createPreferenceDialogOn方法的典型用法代码示例。如果您正苦于以下问题:Java PreferencesUtil.createPreferenceDialogOn方法的具体用法?Java PreferencesUtil.createPreferenceDialogOn怎么用?Java PreferencesUtil.createPreferenceDialogOn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.ui.dialogs.PreferencesUtil的用法示例。


在下文中一共展示了PreferencesUtil.createPreferenceDialogOn方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: execute

import org.eclipse.ui.dialogs.PreferencesUtil; //导入方法依赖的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: run

import org.eclipse.ui.dialogs.PreferencesUtil; //导入方法依赖的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

示例3: execute

import org.eclipse.ui.dialogs.PreferencesUtil; //导入方法依赖的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

示例4: execute

import org.eclipse.ui.dialogs.PreferencesUtil; //导入方法依赖的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

示例5: execute

import org.eclipse.ui.dialogs.PreferencesUtil; //导入方法依赖的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

示例6: checkPrefPageIdIsValid

import org.eclipse.ui.dialogs.PreferencesUtil; //导入方法依赖的package包/类
protected void checkPrefPageIdIsValid(String prefId) {
	Shell shell = WorkbenchUtils.getActiveWorkbenchShell();
	PreferenceDialog prefDialog = PreferencesUtil.createPreferenceDialogOn(shell, prefId, null, null);
	assertNotNull(prefDialog); // Don't create, just eagerly check that it exits, that the ID is correct
	ISelection selection = prefDialog.getTreeViewer().getSelection();
	if(selection instanceof IStructuredSelection) {
		IStructuredSelection ss = (IStructuredSelection) selection;
		if(ss.getFirstElement() instanceof IPreferenceNode) {
			IPreferenceNode prefNode = (IPreferenceNode) ss.getFirstElement();
			if(prefNode.getId().equals(prefId)) {
				return; // Id exists
			}
		}
	}
	assertFail();
}
 
开发者ID:GoClipse,项目名称:goclipse,代码行数:17,代码来源:GoUIPlugin.java

示例7: openPreferences

import org.eclipse.ui.dialogs.PreferencesUtil; //导入方法依赖的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

示例8: openAguiPrefs

import org.eclipse.ui.dialogs.PreferencesUtil; //导入方法依赖的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

示例9: openViewPreferencesDialog

import org.eclipse.ui.dialogs.PreferencesUtil; //导入方法依赖的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

示例10: widgetSelected

import org.eclipse.ui.dialogs.PreferencesUtil; //导入方法依赖的package包/类
@Override
public void widgetSelected(SelectionEvent e) {
	String linkText = e.text;
	String additionalInfo = null;
	if (linkText.contains("#")) {
		String[] parts = linkText.split("#");
		linkText = parts[0];
		additionalInfo = parts[1];
	}
	PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(getShell(), linkText, null, additionalInfo);
	dialog.open();
}
 
开发者ID:RichardBirenheide,项目名称:brainfuck,代码行数:13,代码来源:BfEditorPreferencePage.java

示例11: createPartControl

import org.eclipse.ui.dialogs.PreferencesUtil; //导入方法依赖的package包/类
@Override
public void createPartControl(final Composite parent) {
	PreferenceDialog dialog =
		PreferencesUtil.createPreferenceDialogOn(parent.getShell(), "msi.gama.lang.gaml.Gaml.templates",
			new String[] {}, null);
	PreferencePage selectedPage = (PreferencePage) dialog.getSelectedPage();
	selectedPage.createControl(parent);
}
 
开发者ID:gama-platform,项目名称:gama,代码行数:9,代码来源:TemplatesView.java

示例12: execute

import org.eclipse.ui.dialogs.PreferencesUtil; //导入方法依赖的package包/类
/**
 * the command has been executed, so extract extract the needed information
 * from the application context.
 */
public Object execute(ExecutionEvent event) throws ExecutionException {
	IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
	PreferenceDialog pref = PreferencesUtil.createPreferenceDialogOn(window.getShell(), "org.ploys.ecle.prefs", null, null);
	if (pref != null)
		pref.open();		

	return null;
}
 
开发者ID:ploys,项目名称:ecle,代码行数:13,代码来源:PrefsHandler.java

示例13: execute

import org.eclipse.ui.dialogs.PreferencesUtil; //导入方法依赖的package包/类
/**
 * Opens the perferences page 
 */
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
	PreferenceDialog pd = PreferencesUtil.createPreferenceDialogOn(null,
							"hu.elte.txtuml.export.papyrus.preferences1", null, null);
	
	pd.open();
	return null;
}
 
开发者ID:ELTE-Soft,项目名称:txtUML,代码行数:12,代码来源:PreferencesPageHandler.java

示例14: openFileInExternalProgram

import org.eclipse.ui.dialogs.PreferencesUtil; //导入方法依赖的package包/类
public static void openFileInExternalProgram(File file) throws IOException {
	LOG.info("opening file : " + file);
	String programPathString = FileCompletionActivator.getDefault().getPreferenceStore()
			.getString(FileCompletionActivator.openFileWithExternalProgramCmdPerfId);
	if (programPathString == null || programPathString.trim().length() == 0) {
		LOG.info("opening pref dialog");
		PreferenceDialog createPreferenceDialogOn = PreferencesUtil.createPreferenceDialogOn(null,
				FileCompletionActivator.fileCompletionPref, null, null);
		createPreferenceDialogOn.open();
		LOG.info("finishing pref dialog");
		// user should try again after setting external program
		return;
	}
	LOG.info("programPathString = " + programPathString);
	File programFile = new File(programPathString);
	if (!programFile.isFile()) {
		throw new FileNotFoundException(programPathString);
	}
	ArrayList<String> cmd = new ArrayList<String>();
	cmd.add(programPathString);
	String args = FileCompletionActivator.getDefault().getPreferenceStore()
			.getString(FileCompletionActivator.openFileWithExternalProgramArgsPerfId);
	if (args != null && args.length() > 0) {
		cmd.addAll(Arrays.asList(args.split(" ")));
	}
	cmd.add(file.getAbsolutePath());
	LOG.info("command to run : " + cmd);
	String[] command = cmd.toArray(new String[0]);
	Runtime.getRuntime().exec(command);
}
 
开发者ID:impetuouslab,项目名称:eclipse-filecompletion,代码行数:31,代码来源:OpenFileInEclipseImpl.java

示例15: run

import org.eclipse.ui.dialogs.PreferencesUtil; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void run() {
	PreferenceDialog preferenceDialog= PreferencesUtil.createPreferenceDialogOn(getShell(), JAVA_TEMPLATE_PREFERENCE_PAGE_ID, new String[] { JAVA_TEMPLATE_PREFERENCE_PAGE_ID, CODE_TEMPLATE_PREFERENCE_PAGE_ID }, null);
	preferenceDialog.getTreeViewer().expandAll();
	preferenceDialog.open();
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:10,代码来源:SurroundWithTemplateMenuAction.java


注:本文中的org.eclipse.ui.dialogs.PreferencesUtil.createPreferenceDialogOn方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。