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


Java IDecoratorManager类代码示例

本文整理汇总了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;未经允许,请勿转载。