Bug 304929 [CommonNavigator] Unused method in NavigatorContentService
/** * Search for extensions that declare the given element in their * <b>triggerPoint</b> expression. * * @param anElement * The element to use in the query * @return The set of {@link INavigatorContentExtension}s that are * <i>visible</i> and <i>active</i> for this content service and * have a <b>triggerPoint</b> expression that is <i>enabled</i> * for the given element. */ public Set findOverrideableContentExtensionsByTriggerPoint(Object anElement) { Set overrideableExtensions = new TreeSet( ExtensionPriorityComparator.INSTANCE); Set descriptors = findDescriptorsByTriggerPoint(anElement, !CONSIDER_OVERRIDES); for (Iterator iter = descriptors.iterator(); iter.hasNext();) { INavigatorContentDescriptor descriptor = (INavigatorContentDescriptor) iter .next(); if (descriptor.hasOverridingExtensions()) { overrideableExtensions.add(getExtension(descriptor)); } } return overrideableExtensions; }
bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentService.java
*            The element to use in the query
	 * @param toRespectViewerRoots
	 *            True respect the <b>viewerContentBinding</b>s, False will look
	 *            only for matching <b>triggerPoints</b> expressions.
	 * @return The set of {@link INavigatorContentExtension}s that are
	 *         <i>visible</i> and <i>active</i> for this content service and
	 *         either declared through a
	 *         <b>org.eclipse.ui.navigator.viewer/viewerContentBinding</b> to be
	 *         a root element or have a <b>triggerPoints</b> expression that is
	 *         <i>enabled</i> for the given element.
	 */
	public Set findRootContentExtensions(Object anElement,
			boolean toRespectViewerRoots) {
		SortedSet rootExtensions = new TreeSet(
				ExtensionPriorityComparator.INSTANCE);
		if (toRespectViewerRoots
				&& viewerDescriptor.hasOverriddenRootExtensions()) {
			NavigatorContentDescriptor[] descriptors = CONTENT_DESCRIPTOR_REGISTRY
					.getAllContentDescriptors();
			NavigatorContentExtension extension = null;
			for (int i = 0; i < descriptors.length; i++) {
				if (isActive(descriptors[i].getId())
						&& isRootExtension(descriptors[i].getId())) {
					extension = getExtension(descriptors[i]);
					if (!extension.hasLoadingFailed()) {
						rootExtensions.add(extension);
					}
				}
			}
		}