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


Java IPluginContribution类代码示例

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


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

示例1: compare

import org.eclipse.ui.IPluginContribution; //导入依赖的package包/类
@Override
public int compare(IComparableContribution c1, IComparableContribution c2)
{
    IPluginContribution pc1 = (IPluginContribution) c1;
    IPluginContribution pc2 = (IPluginContribution) c2;

    String pc1Id = pc1.getLocalId();
    String pc2Id = pc2.getLocalId();

    String pc1Prio = pc1Id.substring(pc1Id.length() - 4);
    String pc2Prio = pc2Id.substring(pc2Id.length() - 4);

    // the ID of the Maru property pages contain a sorting priority encoded
    // at the end, e.g. ui.maru.propertypages.centralbody.2000

    return super.compare(pc1Prio, pc2Prio);
}
 
开发者ID:vobject,项目名称:maru,代码行数:18,代码来源:MaruPropertyPageComparator.java

示例2: getAdapter

import org.eclipse.ui.IPluginContribution; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public Object getAdapter(Class adapter)
{
    if (adapter == IPluginContribution.class) {
        return this;
    }
    else if (adapter == IConfigurationElement.class) {
        return mConfigurationElement;
    }
    return Platform.getAdapterManager().getAdapter(this, adapter);
}
 
开发者ID:henrikor2,项目名称:eclipsensis,代码行数:12,代码来源:NSISConfigWizardDescriptor.java

示例3: getLocalId

import org.eclipse.ui.IPluginContribution; //导入依赖的package包/类
public String getLocalId()
{
    IPluginContribution contribution = (IPluginContribution) mDescriptor.getAdapter(IPluginContribution.class);
    if (contribution != null) {
        return contribution.getLocalId();
    }
    return mDescriptor.getLocalId();
}
 
开发者ID:henrikor2,项目名称:eclipsensis,代码行数:9,代码来源:NSISConfigWizardNode.java

示例4: getPluginId

import org.eclipse.ui.IPluginContribution; //导入依赖的package包/类
public String getPluginId()
{
    IPluginContribution contribution = (IPluginContribution) mDescriptor.getAdapter(IPluginContribution.class);
    if (contribution != null) {
        return contribution.getPluginId();
    }
    return mDescriptor.getPluginId();
}
 
开发者ID:henrikor2,项目名称:eclipsensis,代码行数:9,代码来源:NSISConfigWizardNode.java

示例5: getLocalId

import org.eclipse.ui.IPluginContribution; //导入依赖的package包/类
@Override
public String getLocalId() {
	final IPluginContribution contribution = Adapters.adapt(wizardElement,
	        IPluginContribution.class);
	if (contribution != null) {
		return contribution.getLocalId();
	}
	return wizardElement.getId();
}
 
开发者ID:aktion-hip,项目名称:relations,代码行数:10,代码来源:WorkbenchWizardNode.java

示例6: getPluginId

import org.eclipse.ui.IPluginContribution; //导入依赖的package包/类
@Override
public String getPluginId() {
	final IPluginContribution contribution = Adapters.adapt(wizardElement,
	        IPluginContribution.class);
	if (contribution != null) {
		return contribution.getPluginId();
	}
	return null;
}
 
开发者ID:aktion-hip,项目名称:relations,代码行数:10,代码来源:WorkbenchWizardNode.java

示例7: postWindowOpen

import org.eclipse.ui.IPluginContribution; //导入依赖的package包/类
public void postWindowOpen() {
	final PreferenceManager preferenceManager = PlatformUI.getWorkbench().getPreferenceManager();
	final IPreferenceNode[] rootSubNodes = preferenceManager.getRootSubNodes();

	// @see Bug #191 in general/bugzilla/index.html
	final List<String> filters = new ArrayList<String>();
	filters.add("org.eclipse.compare");
	// The following three preferences are shown because the Toolbox uses
	// the local history feature provided by o.e.team.ui
	filters.add("org.eclipse.team.ui");
	filters.add("org.eclipse.ui.trace");
	filters.add("org.eclipse.jsch.ui");

	// Filter out Pdf4Eclipse preference page.
	filters.add("de.vonloesch.pdf4Eclipse");
	
	// Filter out GraphViz
	filters.add("com.abstratt.graphviz.ui");
	
	// Clean the preferences
	final List<IPreferenceNode> elements = preferenceManager.getElements(PreferenceManager.POST_ORDER);
	for (Iterator<IPreferenceNode> iterator = elements.iterator(); iterator.hasNext();) {
		final IPreferenceNode elem = iterator.next();
		if (elem instanceof IPluginContribution) {
			final IPluginContribution aPluginContribution = (IPluginContribution) elem;
			if (filters.contains(aPluginContribution.getPluginId())) {
				final IPreferenceNode node = (IPreferenceNode) elem;

				// remove from root node
				preferenceManager.remove(node);

				// remove from all subnodes
				for (int i = 0; i < rootSubNodes.length; i++) {
					final IPreferenceNode subNode = rootSubNodes[i];
					subNode.remove(node);
				}
			}
		}
	}
	super.postWindowOpen();
	
	// At this point in time we can be certain that the UI is fully
	// instantiated (views, editors, menus...). Thus, register
	// listeners that connect the UI to the workspace resources.
	ToolboxLifecycleParticipantManger.postWorkbenchWindowOpen();
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:47,代码来源:ApplicationWorkbenchWindowAdvisor.java


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