本文整理汇总了Java中org.eclipse.ui.internal.IPreferenceConstants类的典型用法代码示例。如果您正苦于以下问题:Java IPreferenceConstants类的具体用法?Java IPreferenceConstants怎么用?Java IPreferenceConstants使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IPreferenceConstants类属于org.eclipse.ui.internal包,在下文中一共展示了IPreferenceConstants类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createFileMenu
import org.eclipse.ui.internal.IPreferenceConstants; //导入依赖的package包/类
/**
* 创建文件菜单
* @return 返回文件菜单的 menu manager;
*/
private MenuManager createFileMenu() {
MenuManager menu = new MenuManager(Messages.getString("ts.ApplicationActionBarAdvisor.menu.file"),
IWorkbenchActionConstants.M_FILE); // &File
menu.add(new GroupMarker(IWorkbenchActionConstants.FILE_START));
// 添加 new.ext group,这样 IDE 中定义的 Open File... 可以显示在最顶端
menu.add(new GroupMarker(IWorkbenchActionConstants.NEW_EXT));
menu.add(new Separator());
menu.add(new GroupMarker(IWorkbenchActionConstants.CLOSE_EXT));
menu.add(new GroupMarker("xliff.switch"));
menu.add(new GroupMarker("rtf.switch"));
menu.add(new GroupMarker("xliff.split"));
menu.add(new Separator());
// 设置保存文件记录条数为 5 条
WorkbenchPlugin.getDefault().getPreferenceStore().setValue(IPreferenceConstants.RECENT_FILES, 5);
menu.add(new GroupMarker(IWorkbenchActionConstants.HISTORY_GROUP));
menu.add(exitAction);
menu.add(new GroupMarker(IWorkbenchActionConstants.FILE_END));
return menu;
}
开发者ID:heartsome,项目名称:tmxeditor8,代码行数:24,代码来源:ApplicationActionBarAdvisor.java
示例2: initializeDefaultPreferences
import org.eclipse.ui.internal.IPreferenceConstants; //导入依赖的package包/类
/**
* @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
*/
public void initializeDefaultPreferences()
{
final IPreferenceStore uiPreferencesStore = TLCUIActivator.getDefault().getPreferenceStore();
final IPreferenceStore tlcPreferencesStore = TLCActivator.getDefault().getPreferenceStore();
tlcPreferencesStore.setDefault(TLCActivator.I_TLC_SNAPSHOT_KEEP_COUNT, 10);
// This is so bad.. we store them in parallel because one is needed by plugin relied upon the PreferencePage
// and the other by a plugin which is on the opposite side of the dependency. (TLCModelLaunchDelegate)
uiPreferencesStore.setDefault(TLCActivator.I_TLC_SNAPSHOT_KEEP_COUNT, 10);
uiPreferencesStore.setDefault(ITLCPreferenceConstants.I_TLC_TRACE_MAX_SHOW_ERRORS, 10000);
uiPreferencesStore.setDefault(ITLCPreferenceConstants.I_TLC_POPUP_ERRORS, true);
uiPreferencesStore.setDefault(ITLCPreferenceConstants.I_TLC_REVALIDATE_ON_MODIFY, true);
uiPreferencesStore.setDefault(ITLCPreferenceConstants.I_TLC_MAXIMUM_HEAP_SIZE_DEFAULT, MAX_HEAP_SIZE_DEFAULT);
uiPreferencesStore.setDefault(ITLCPreferenceConstants.I_TLC_MAXSETSIZE_DEFAULT, TLCGlobals.setBound);
uiPreferencesStore.setDefault(ITLCPreferenceConstants.I_TLC_FPBITS_DEFAULT, 1);
uiPreferencesStore.setDefault(ITLCPreferenceConstants.I_TLC_FPSETIMPL_DEFAULT, FPSetFactory.getImplementationDefault());
// store.setDefault(ITLCPreferenceConstants.I_TLC_DELETE_PREVIOUS_FILES, true);
// By default we want the Toolbox to show a modal progress dialog upon TLC
// startup. A user can opt to subsequently suppress the dialog.
// This restores the behavior prior to https://bugs.eclipse.org/146205#c10.
if (!uiPreferencesStore.contains(ITLCPreferenceConstants.I_TLC_SHOW_MODAL_PROGRESS)) {
final IEclipsePreferences node = InstanceScope.INSTANCE
.getNode(WorkbenchPlugin.getDefault().getBundle().getSymbolicName());
node.putBoolean(IPreferenceConstants.RUN_IN_BACKGROUND, false);
try {
node.flush();
} catch (final BackingStoreException e) {
TLCUIActivator.getDefault().logError("Error trying to flush the workbench plugin preferences store.",
e);
}
uiPreferencesStore.setValue(ITLCPreferenceConstants.I_TLC_SHOW_MODAL_PROGRESS, true);
}
}
开发者ID:tlaplus,项目名称:tlaplus,代码行数:40,代码来源:TLCPreferenceInitializer.java
示例3: preWindowOpen
import org.eclipse.ui.internal.IPreferenceConstants; //导入依赖的package包/类
@Override
public void preWindowOpen() {
final IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
configurer.setInitialSize(new Point(950, 700));
configurer.setShowPerspectiveBar(true);
configurer.setShowCoolBar(true);
configurer.setShowProgressIndicator(true);
// status line shows photo selection and loading state
// configurer.setShowStatusLine(false);
configurer.setTitle(_appTitle);
final IPreferenceStore uiPrefStore = PlatformUI.getPreferenceStore();
uiPrefStore.setValue(IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS, true);
uiPrefStore.setValue(IWorkbenchPreferenceConstants.SHOW_PROGRESS_ON_STARTUP, true);
// show memory monitor
final boolean isMemoryMonitorVisible = _prefStore
.getBoolean(ITourbookPreferences.APPEARANCE_SHOW_MEMORY_MONITOR);
uiPrefStore.setValue(IWorkbenchPreferenceConstants.SHOW_MEMORY_MONITOR, isMemoryMonitorVisible);
hookTitleUpdateListeners(configurer);
/*
* display the progress dialog for UI jobs, when pressing the hide button there is no other
* way to display the dialog again
*/
WorkbenchPlugin.getDefault().getPreferenceStore().setValue(IPreferenceConstants.RUN_IN_BACKGROUND, false);
// must be initialized early to set photoServiceProvider in the Photo
TourPhotoManager.restoreState();
FormatManager.updateDisplayFormats();
}
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:40,代码来源:ApplicationWorkbenchWindowAdvisor.java
示例4: createFileMenu
import org.eclipse.ui.internal.IPreferenceConstants; //导入依赖的package包/类
/**
* 创建文件菜单
* @return 返回文件菜单的 menu manager;
*/
private MenuManager createFileMenu() {
MenuManager menu = new MenuManager(Messages.getString("ts.ApplicationActionBarAdvisor.menu.file"),
IWorkbenchActionConstants.M_FILE); // &File
menu.add(new GroupMarker(IWorkbenchActionConstants.FILE_START));
// 添加 new.ext group,这样 IDE 中定义的 Open File... 可以显示在最顶端
// menu.add(newAction);
menu.add(new GroupMarker(IWorkbenchActionConstants.NEW_EXT));
menu.add(new Separator());
menu.add(closeAction);
menu.add(closeAllAction);
menu.add(refreshAction);
// menu.add(new Separator("net.heartsome.cat.ts.ui.menu.file.separator"));
menu.add(new GroupMarker("xliff.switch"));
menu.add(new GroupMarker("rtf.switch"));
menu.add(new GroupMarker("xliff.split"));
menu.add(new Separator());
// 设置保存文件记录条数为 5 条
WorkbenchPlugin.getDefault().getPreferenceStore().setValue(IPreferenceConstants.RECENT_FILES, 5);
// 添加文件访问列表
ContributionItemFactory REOPEN_EDITORS = new ContributionItemFactory("reopenEditors") { //$NON-NLS-1$
/* (non-javadoc) method declared on ContributionItemFactory */
public IContributionItem create(IWorkbenchWindow window) {
if (window == null) {
throw new IllegalArgumentException();
}
return new ReopenEditorMenu(window, getId(), false);
}
};
menu.add(REOPEN_EDITORS.create(window));
menu.add(exitAction);
menu.add(new GroupMarker(IWorkbenchActionConstants.FILE_END));
return menu;
}
开发者ID:heartsome,项目名称:translationstudio8,代码行数:39,代码来源:ApplicationActionBarAdvisor.java
示例5: createFileMenu
import org.eclipse.ui.internal.IPreferenceConstants; //导入依赖的package包/类
/**
* 创建文件菜单
* @return 返回文件菜单的 menu manager;
*/
private MenuManager createFileMenu() {
MenuManager menu = new MenuManager(Messages.getString("ts.ApplicationActionBarAdvisor.menu.file"),
IWorkbenchActionConstants.M_FILE); // &File
menu.add(new GroupMarker(IWorkbenchActionConstants.FILE_START));
// 添加 new.ext group,这样 IDE 中定义的 Open File... 可以显示在最顶端
menu.add(new GroupMarker(IWorkbenchActionConstants.NEW_EXT));
menu.add(new Separator());
menu.add(new GroupMarker(IWorkbenchActionConstants.CLOSE_EXT));
menu.add(new GroupMarker("xliff.switch"));
menu.add(new GroupMarker("rtf.switch"));
menu.add(new GroupMarker("xliff.split"));
menu.add(new Separator());
// 设置保存文件记录条数为 5 条
WorkbenchPlugin.getDefault().getPreferenceStore().setValue(IPreferenceConstants.RECENT_FILES, 5);
// 添加文件访问列表
ContributionItemFactory REOPEN_EDITORS = new ContributionItemFactory("reopenEditors") { //$NON-NLS-1$
/* (non-javadoc) method declared on ContributionItemFactory */
public IContributionItem create(IWorkbenchWindow window) {
if (window == null) {
throw new IllegalArgumentException();
}
return new ReopenEditorMenu(window, getId(), false);
}
};
menu.add(REOPEN_EDITORS.create(window));
menu.add(exitAction);
menu.add(new GroupMarker(IWorkbenchActionConstants.FILE_END));
return menu;
}
开发者ID:heartsome,项目名称:tmxeditor8,代码行数:35,代码来源:ApplicationActionBarAdvisor.java
注:本文中的org.eclipse.ui.internal.IPreferenceConstants类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论