本文整理汇总了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);
}
示例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);
}
示例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();
}
示例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();
}
示例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();
}
示例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;
}
示例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();
}