• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java EclipsePreferences类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.core.internal.preferences.EclipsePreferences的典型用法代码示例。如果您正苦于以下问题:Java EclipsePreferences类的具体用法?Java EclipsePreferences怎么用?Java EclipsePreferences使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



EclipsePreferences类属于org.eclipse.core.internal.preferences包,在下文中一共展示了EclipsePreferences类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: eventReceivedPreferencesChanged

import org.eclipse.core.internal.preferences.EclipsePreferences; //导入依赖的package包/类
@Inject
@Optional
void eventReceivedPreferencesChanged(
		@EventTopic("event_preferences_changed/*") final String preferencePath) {
	if (preferencePath != null && preferencePath.endsWith(BTSCorpusConstants.PREF_ANNOTATION_SETTINGS)) {
		
		sync.asyncExec(new Runnable() {
			@Override
			public void run() {
				Preferences rootNode = ConfigurationScope.INSTANCE.getNode("org.bbaw.bts.ui.corpus");
				annotationSettings = (EclipsePreferences) rootNode.node(BTSCorpusConstants.PREF_ANNOTATION_SETTINGS);
				AnnotationToolbarItemCreator.processAndUpateToolbarItemsAnnotationShortcut(part, annotationSettings);
				textAnnotatationEditor.reloadCurrentSentence();
			}
		});
		
	}
}
 
开发者ID:cplutte,项目名称:bts,代码行数:19,代码来源:TextAnnotationsPart.java


示例2: loadAnnotationPreferenceNodes

import org.eclipse.core.internal.preferences.EclipsePreferences; //导入依赖的package包/类
/**
 * @return
 */
private List<EclipsePreferences> loadAnnotationPreferenceNodes() {
	Preferences rootNode = ConfigurationScope.INSTANCE.getNode(Activator.BUNDLE_ID);
	
	annotationsNode = (EclipsePreferences) rootNode.node(BTSCorpusConstants.PREF_ANNOTATION_SETTINGS);
	List<EclipsePreferences> nodes = new Vector<EclipsePreferences>();
	if (annotationsNode != null)
	{
		try {
			for (String n : annotationsNode.childrenNames())
			{
				if (annotationsNode.nodeExists(n))
				{
					nodes.add((EclipsePreferences) annotationsNode.node(n));
				}
			}
		} catch (BackingStoreException e) {
			e.printStackTrace();
		}
	}
			
	return nodes;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:26,代码来源:TextAnnotationSettingsPage.java


示例3: setUp

import org.eclipse.core.internal.preferences.EclipsePreferences; //导入依赖的package包/类
@Before
public void setUp() {
	eventBroker = (IEventBroker) PlatformUI.getWorkbench().getService(IEventBroker.class);
	eclipsePreferences = new EclipsePreferences();
	numberedBookmarks = new NumberedBookmarks(eclipsePreferences, eventBroker);
	numberedBookmarks.init();
	bookmarkDatabase = new BookmarkDatabase("test", createBookmarksTree());
	virtualFolder = new NumberedBookmarksVirtualFolder(eventBroker, bookmarkDatabase,
			bookmarkDatabase.getBookmarksTree().getRootFolder().getId(), numberedBookmarks);
}
 
开发者ID:cchabanois,项目名称:mesfavoris,代码行数:11,代码来源:NumberedBookmarksVirtualFolderTest.java


示例4: createPartControl

import org.eclipse.core.internal.preferences.EclipsePreferences; //导入依赖的package包/类
@PostConstruct
	public void createPartControl(Composite parent) {
		if (parentShell == null)
		{
			parentShell = new Shell();
		}
		try {
			part = partService.findPart(PART_ID);
		} catch (Exception e) {
//			logger.warn("Part Service couldn't find org.fuberlin.bts.ui.corpus.egy.annotations.TextAnnotationsPart ");
			e.printStackTrace();
		}
		parent.setLayout(new GridLayout());
		((GridLayout) parent.getLayout()).marginHeight = 0;
		((GridLayout) parent.getLayout()).marginWidth = 0;
//		contextService
//				.activateContext("org.eclipse.ui.contexts.dialogAndWindow");
		IEclipseContext child = context.createChild();
		child.set(Composite.class, parent);
		child.set(IBTSEditor.class, TextAnnotationsPart.this);
		textAnnotatationEditor = ContextInjectionFactory.make(
				TextAnnotationsComposite.class, child);
		
		// load annotatin styling settings node
		Preferences rootNode = ConfigurationScope.INSTANCE.getNode("org.bbaw.bts.ui.corpus");
		annotationSettings = (EclipsePreferences) rootNode.node(BTSCorpusConstants.PREF_ANNOTATION_SETTINGS);
		AnnotationToolbarItemCreator.processAndUpateToolbarItemsAnnotationShortcut(part, annotationSettings);

		Map<String, Boolean> filters = (Map<String, Boolean>) context.get("org.bbaw.bts.corpus.annotationsPart.filter");
		textAnnotatationEditor.setFilters(filters );
		if (text != null)
		{
			loadInput(text);
		}
		
		parent.layout();
		parent.pack();
		constructed = true;
	}
 
开发者ID:cplutte,项目名称:bts,代码行数:40,代码来源:TextAnnotationsPart.java


示例5: getLocation

import org.eclipse.core.internal.preferences.EclipsePreferences; //导入依赖的package包/类
public IPath getLocation() {
  IProject project = ((IResource) context).getProject();
  IPath location = project.getLocation();
  return location == null
      ? null
      : location.append(EclipsePreferences.DEFAULT_PREFERENCES_DIRNAME);
}
 
开发者ID:eclipse,项目名称:che,代码行数:8,代码来源:ProjectScope.java


示例6: doStore

import org.eclipse.core.internal.preferences.EclipsePreferences; //导入依赖的package包/类
protected void doStore() {
	IPreferenceStore pstore = getPreferenceStore();
	if (isNullAllowedAndSet()) {
		if (pstore instanceof EclipsePreferences)
			((EclipsePreferences) pstore).remove(getPreferenceName());
		else if (pstore instanceof ScopedPreferenceStore) {
			// try {
			for (IEclipsePreferences ep : ((ScopedPreferenceStore) pstore).getPreferenceNodes(true))
				ep.remove(getPreferenceName());

			// Method m = pstore.getClass().getDeclaredMethod("getStorePreferences");
			// m.setAccessible(true);
			// if (m != null) {
			// IEclipsePreferences ep = (IEclipsePreferences) m.invoke(pstore);
			// ep.remove(getPreferenceName());
			// }
			// } catch (SecurityException e) {
			// e.printStackTrace();
			// } catch (NoSuchMethodException e) {
			// e.printStackTrace();
			// } catch (IllegalArgumentException e) {
			// e.printStackTrace();
			// } catch (IllegalAccessException e) {
			// e.printStackTrace();
			// } catch (InvocationTargetException e) {
			// e.printStackTrace();
			// }

		} else
			pstore.setValue(getPreferenceName(), null);
	} else
		pstore.setValue(getPreferenceName(), textField.getText());
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:34,代码来源:TextFieldEditor.java


示例7: ResourcePreferences

import org.eclipse.core.internal.preferences.EclipsePreferences; //导入依赖的package包/类
private ResourcePreferences(EclipsePreferences parent, String name) {
	super(parent, name);
	String path = absolutePath().replaceAll("/resource", "").replace(';', //$NON-NLS-1$ //$NON-NLS-2$
			'/');
	if (name != null) {
		if (path.endsWith(name)) {
			path = path.substring(0, path.length() - name.length() - 1);
			qualifier = name;
		}
	}
	if (!path.isEmpty())
		pfile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(path));

	initialize();
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:16,代码来源:ResourcePreferences.java


示例8: ScopedPreferenceStoreMirroredToEclipsePreferences

import org.eclipse.core.internal.preferences.EclipsePreferences; //导入依赖的package包/类
public ScopedPreferenceStoreMirroredToEclipsePreferences(IScopeContext context, String qualifier) {
	super(context, qualifier);
	IEclipsePreferences preferences = context.getNode(CommonPlugin.ID);
	if (preferences instanceof EclipsePreferences) {
		mirrorToPreferences = (EclipsePreferences) preferences;
	}
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:8,代码来源:ScopedPreferenceStoreMirroredToEclipsePreferences.java


示例9: setUp

import org.eclipse.core.internal.preferences.EclipsePreferences; //导入依赖的package包/类
@Before
public void setUp() {
	eclipsePreferences = new EclipsePreferences();
	numberedBookmarks = new NumberedBookmarks(eclipsePreferences, eventBroker);
	numberedBookmarks.init();
}
 
开发者ID:cchabanois,项目名称:mesfavoris,代码行数:7,代码来源:NumberedBookmarksTest.java


示例10: determineAndSetBackgroundColor

import org.eclipse.core.internal.preferences.EclipsePreferences; //导入依赖的package包/类
/**
 * @param fig
 * @param object
 */
private void determineAndSetBackgroundColor(AnnotationFigure fig, BTSObject object) {
	// read values from the instance scope
	String colorString = null;
	String expandedType = processExpandedObjectType(object, true);
	String parentType = null;
	if (object.getSubtype() != null && !"".equals(object.getSubtype()))
	{
		parentType = processExpandedObjectType(object, false);
	}
	try {
		for (String childNode : annotationSettings.childrenNames())
		{
			Preferences typeNode = annotationSettings.node(childNode);
			String settingsTypePath = AnnotationToolbarItemCreator.getAnnotationTypePath((EclipsePreferences) typeNode);
			if (settingsTypePath.equals(expandedType))
			{
				colorString = typeNode.get(BTSCorpusConstants.PREF_COLOR, null);
				break;
			} else if (settingsTypePath.equals(parentType))
			{
				colorString = typeNode.get(BTSCorpusConstants.PREF_COLOR, null);
			}
			
		}
	} catch (BackingStoreException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	Color color = null;
	if (colorString != null)
	{
		color = BTSUIConstants.getColor(colorString);
	}
	else
	{
		if (object instanceof BTSComment)
		{
			color = BTSUIConstants.COLOR_COMMENT;
		}else if (object instanceof BTSText)
		{
			color = BTSUIConstants.COLOR_SUBTEXT;
		}else if (object instanceof BTSAnnotation)
		{
			if (CorpusUtils.ANNOTATION_RUBRUM_TYPE.equals(object.getType()))
			{
				color = BTSUIConstants.COLOR_RUBRUM;
			}
			else
			{
				color = BTSUIConstants.COLOR_ANNOTATTION;
			}
		}
	}
	if (color != null)
	{
		fig.setBaseBackgroundColor(color);
	}
	
}
 
开发者ID:cplutte,项目名称:bts,代码行数:64,代码来源:TextAnnotationsComposite.java


示例11: internalCreate

import org.eclipse.core.internal.preferences.EclipsePreferences; //导入依赖的package包/类
protected EclipsePreferences internalCreate(EclipsePreferences nodeParent, String nodeName, Object context) {
	return new ResourcePreferences(nodeParent, nodeName);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:4,代码来源:ResourcePreferences.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ExecResponse类代码示例发布时间:2022-05-22
下一篇:
Java TriangleIndexVertexArray类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap