@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); }
@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); }
public String getLocalId() { IPluginContribution contribution = (IPluginContribution) mDescriptor.getAdapter(IPluginContribution.class); if (contribution != null) { return contribution.getLocalId(); } return mDescriptor.getLocalId(); }
public String getPluginId() { IPluginContribution contribution = (IPluginContribution) mDescriptor.getAdapter(IPluginContribution.class); if (contribution != null) { return contribution.getPluginId(); } return mDescriptor.getPluginId(); }
@Override public String getLocalId() { final IPluginContribution contribution = Adapters.adapt(wizardElement, IPluginContribution.class); if (contribution != null) { return contribution.getLocalId(); } return wizardElement.getId(); }
@Override public String getPluginId() { final IPluginContribution contribution = Adapters.adapt(wizardElement, IPluginContribution.class); if (contribution != null) { return contribution.getPluginId(); } return null; }
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(); }