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

Java IDecoratorManager类代码示例

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

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



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

示例1: refreshAllProjectDecorations

import org.eclipse.ui.IDecoratorManager; //导入依赖的package包/类
public static void refreshAllProjectDecorations() {
	getSafeDisplay().asyncExec(new Runnable() {

		@Override
		public void run() {
			IWorkbench workbench = PlatformUI.getWorkbench();
			if (workbench == null) {
				return;
			}
			IDecoratorManager manager = workbench.getDecoratorManager();

			IProject[] projects = getAllProjects();

			EGradleProjectDecorator decorator = (EGradleProjectDecorator) manager
					.getBaseLabelProvider("de.jcup.egradle.eclipse.ide.decorators.EGradleProjectDecorator");
			/* decorate */
			if (decorator != null) { // decorator is enabled

				LabelProviderChangedEvent event = new LabelProviderChangedEvent(decorator, projects);
				decorator.fireLabelProviderChanged(event);
			}
		}

	});

}
 
开发者ID:de-jcup,项目名称:egradle,代码行数:27,代码来源:IDEUtil.java


示例2: run

import org.eclipse.ui.IDecoratorManager; //导入依赖的package包/类
@Override
public void run(IAction action) {
	IStructuredSelection iSSelection = null;
	if (selection instanceof IStructuredSelection) {
		iSSelection = (IStructuredSelection) selection;
		Object obj = iSSelection.getFirstElement();
		if (obj instanceof IResource) {
			IResource res = (IResource) obj;
			IProject project = res.getProject();
			doNatureAction(project);
			IDecoratorManager decoratorManager = VariantSyncPlugin
					.getDefault().getWorkbench().getDecoratorManager();
			decoratorManager
					.update(VSyncSupportProjectDecorator.DECORATOR_ID);
		}
	}
}
 
开发者ID:1Tristan,项目名称:VariantSync,代码行数:18,代码来源:SyncSupportAction.java


示例3: initialize

import org.eclipse.ui.IDecoratorManager; //导入依赖的package包/类
@Override
public void initialize(final IWorkbenchConfigurer configurer) {
	ResourcesPlugin.getPlugin().getStateLocation();
	try {
		super.initialize(configurer);
		IDE.registerAdapters();
		configurer.setSaveAndRestore(true);

		final IDecoratorManager dm = configurer.getWorkbench().getDecoratorManager();
		dm.setEnabled("org.eclipse.pde.ui.binaryProjectDecorator", false);
		dm.setEnabled("org.eclipse.team.svn.ui.decorator.SVNLightweightDecorator", false);
		dm.setEnabled("msi.gama.application.decorator", true);
		dm.setEnabled("org.eclipse.ui.LinkedResourceDecorator", false);
		dm.setEnabled("org.eclipse.ui.VirtualResourceDecorator", false);
		dm.setEnabled("org.eclipse.xtext.builder.nature.overlay", false);
	} catch (final CoreException e) {
		// e.printStackTrace();
	}

}
 
开发者ID:gama-platform,项目名称:gama,代码行数:21,代码来源:ApplicationWorkbenchAdvisor.java


示例4: afterValueChange

import org.eclipse.ui.IDecoratorManager; //导入依赖的package包/类
@Override
public void afterValueChange(final Boolean newValue) {
	final IDecoratorManager mgr = PlatformUI.getWorkbench().getDecoratorManager();
	try {
		mgr.setEnabled(IGui.NAVIGATOR_LIGHTWEIGHT_DECORATOR_ID, newValue);
	} catch (final CoreException e) {
		e.printStackTrace();
	}

}
 
开发者ID:gama-platform,项目名称:gama,代码行数:11,代码来源:PreferencesHelper.java


示例5: createPartControl

import org.eclipse.ui.IDecoratorManager; //导入依赖的package包/类
@SuppressWarnings ("deprecation")
@Override
public void createPartControl(final Composite compo) {
	this.parent = GamaToolbarFactory.createToolbars(this, compo);

	super.createPartControl(parent);
	final IToolBarManager toolbar = getViewSite().getActionBars().getToolBarManager();
	for (final IContributionItem item : toolbar.getItems()) {
		if (item instanceof ActionContributionItem) {
			final ActionContributionItem aci = (ActionContributionItem) item;
			final IAction action = aci.getAction();
			if (action instanceof LinkEditorAction) {
				link = action;
				toolbar.remove(aci);
			} else if (action instanceof org.eclipse.ui.internal.navigator.actions.CollapseAllAction) {
				toolbar.remove(aci);
			}

		}
	}
	linkItem.setSelection(link.isChecked());
	toolbar.update(true);
	// linkItem.setSelection(link.isChecked());
	// final Action a = linkCommand.toCheckAction();
	// a.setChecked(link.isChecked());
	// toolbar.insertBefore("toolbar.toggle", a);
	toolbar.insertBefore("toolbar.toggle", byDate.toCheckAction());
	toolbar.insertBefore("toolbar.toggle", expandAll.toAction());
	toolbar.insertBefore(expandAll.getId(), collapseAll.toAction());

	try {
		final IDecoratorManager mgr = PlatformUI.getWorkbench().getDecoratorManager();
		mgr.setEnabled("msi.gama.application.date.decorator", false);
	} catch (final CoreException e) {
		e.printStackTrace();
	}
	properties =
			new PropertyDialogAction(new SameShellProvider(getSite().getShell()), getSite().getSelectionProvider());
	findControl.initialize();
}
 
开发者ID:gama-platform,项目名称:gama,代码行数:41,代码来源:GamaNavigator.java


示例6: createTreeViewer

import org.eclipse.ui.IDecoratorManager; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected TreeViewer createTreeViewer(Composite parent, int style) {
	Tree tree= new Tree(parent, SWT.SINGLE | (style & ~SWT.MULTI));
	GridData gd= new GridData(GridData.FILL_BOTH);
	gd.heightHint= tree.getItemHeight() * 12;
	tree.setLayoutData(gd);

	final TreeViewer treeViewer= new OutlineTreeViewer(tree);

	// Hard-coded filters
	treeViewer.addFilter(new NamePatternFilter());
	treeViewer.addFilter(new MemberFilter());

	fInnerLabelProvider= new OutlineLabelProvider();
	fInnerLabelProvider.addLabelDecorator(new ProblemsLabelDecorator(null));
	IDecoratorManager decoratorMgr= PlatformUI.getWorkbench().getDecoratorManager();
	if (decoratorMgr.getEnabled("org.eclipse.jdt.ui.override.decorator")) //$NON-NLS-1$
		fInnerLabelProvider.addLabelDecorator(new OverrideIndicatorLabelDecorator(null));

	treeViewer.setLabelProvider(new ColoringLabelProvider(fInnerLabelProvider));

	fLexicalSortingAction= new LexicalSortingAction(treeViewer);
	fSortByDefiningTypeAction= new SortByDefiningTypeAction(treeViewer);
	fShowOnlyMainTypeAction= new ShowOnlyMainTypeAction(treeViewer);
	fCategoryFilterActionGroup= new CategoryFilterActionGroup(treeViewer, getId(), getInputForCategories());

	fOutlineContentProvider= new OutlineContentProvider(false);
	treeViewer.setContentProvider(fOutlineContentProvider);
	fOutlineSorter= new OutlineSorter();
	treeViewer.setComparator(fOutlineSorter);
	treeViewer.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS);


	treeViewer.getTree().addKeyListener(getKeyAdapter());

	return treeViewer;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:41,代码来源:JavaOutlineInformationControl.java


示例7: getInstance

import org.eclipse.ui.IDecoratorManager; //导入依赖的package包/类
public static ProjectDecorator getInstance() {
	IDecoratorManager decoratorManager = Activator.getDefault().getWorkbench().getDecoratorManager();

	// check that this decorator is enabled
	if (decoratorManager.getEnabled(ID)) {
		return (ProjectDecorator) decoratorManager.getLabelDecorator(ID);
	}

	// we are disabled
	return null;
}
 
开发者ID:danielroy,项目名称:eclipse-iprojectdecorator,代码行数:12,代码来源:ProjectDecorator.java


示例8: performUpdateDecor

import org.eclipse.ui.IDecoratorManager; //导入依赖的package包/类
public static void performUpdateDecor(IProject proj) {
IDecoratorManager dm = DerbyPlugin.getDefault().getWorkbench().getDecoratorManager();
DerbyIsRunningDecorator decorator = (DerbyIsRunningDecorator)dm.getBaseLabelProvider(CommonNames.RUNDECORATOR);
decorator.startUpdateDecor(proj);
  }
 
开发者ID:gemxd,项目名称:gemfirexd-oss,代码行数:6,代码来源:DerbyIsRunningDecorator.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java GetClusterNodesResponseProtoOrBuilder类代码示例发布时间:2022-05-22
下一篇:
Java EnumComboBoxModel类代码示例发布时间: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