Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.

1 /*******************************************************************************2 * Copyright (c) 2003, 2006 IBM Corporation and others.3 * All rights reserved. This program and the accompanying materials4 * are made available under the terms of the Eclipse Public License v1.05 * which accompanies this distribution, and is available at6 * http://www.eclipse.org/legal/epl-v10.html7 *8 * Contributors:9 * IBM Corporation - initial API and implementation10 *******************************************************************************/11 package org.eclipse.ui.navigator;12 13 importjava.util.Set;14 15 importorg.eclipse.jface.viewers.IStructuredSelection;16 importorg.eclipse.ui.internal.navigator.extensions.OverridePolicy;17 18 /**19 * 20 * The descriptor provides a handle to a content extension. Information such as21 * the Id, the name, the priority, and whether the descriptor provides one or22 * more root elements is provided.23 * 24 * 25 * <p>26 * There is one {@link INavigatorContentExtension} for each content service.27 * There is only one {@link INavigatorContentDescriptor} for each extension.28 * </p>29 * 30 * <p>31 * This interface is not intended to be implemented by clients.32 * </p>33 * 34 * @since 3.235 * 36 */37 publicinterface INavigatorContentDescriptor {38 39 /**40 * Returns the navgiator content extension id41 * 42 * @return the navgiator content extension id43 */44 String getId();45 46 /**47 * Returns the name of this navigator extension48 * 49 * @return the name of this navigator extension50 */51 String getName();52 53 /**54 * Returns the priority of the navigator content extension.55 * 56 * @return the priority of the navigator content extension. Returns 0 (zero)57 * if no priority was specified.58 */59 int getPriority();60 61 /**62 * The enabledByDefault attribute specifies whether an extension should be63 * activated in the context of a viewer automatically. Users may override64 * this setting through the "Types of Content" dialog.65 * 66 * @return true if the extension is enabled by default.67 */68 boolean isActiveByDefault();69 70 /**71 * Determine if this content extension is enabled for the given element.72 * 73 * @param anElement74 * The element that should be used for the evaluation.75 * @return True if and only if the extension is enabled for the element.76 */77 boolean isTriggerPoint(Object anElement);78 79 /**80 * Determine if this content extension could provide the given element as a81 * child.82 * 83 * <p>84 * This method is used to determine what the parent of an element could be85 * for Link with Editor support.86 * </p>87 * 88 * @param anElement89 * The element that should be used for the evaluation.90 * @return True if and only if the extension might provide an object of this91 * type as a child.92 */93 boolean isPossibleChild(Object anElement);94 95 /**96 * A convenience method to check all elements in a selection.97 * 98 * @param aSelection99 * A non-null selection100 * @return True if and only if every element in the selection is a possible101 * child.102 */103 boolean arePossibleChildren(IStructuredSelection aSelection);104 105 /**106 * @return Returns the suppressedExtensionId or null if none specified.107 */108 String getSuppressedExtensionId();109 110 /**111 * @return Returns the overridePolicy or null if this extension does not112 * override another extension.113 */114 OverridePolicy getOverridePolicy();115 116 /**117 * @return The descriptor of the <code>suppressedExtensionId</code> if118 * non-null.119 */120 INavigatorContentDescriptor getOverriddenDescriptor();121 122 /**123 * 124 * Does not force the creation of the set of overriding extensions.125 * 126 * @return True if this extension has overridding extensions.127 */128 boolean hasOverridingExtensions();129 130 /**131 * @return The set of overridding extensions (of type132 * {@link INavigatorContentDescriptor}133 */134 Set getOverriddingExtensions();135 136 /**137 * @return true if the extension's content provider may adapt to a {@link SaveablesProvider}.138 */139 boolean hasSaveablesProvider();140 141 }142