KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > navigator > INavigatorViewerDescriptor


1 /*******************************************************************************
2  * Copyright (c) 2005, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.navigator;
12
13 import org.eclipse.jface.action.GroupMarker;
14 import org.eclipse.jface.action.Separator;
15
16 /**
17  * Provides a basic metadata about the abstract viewer for a particular content
18  * service.
19  *
20  * <p>
21  * This interface is not intended to be implemented by clients.
22  * </p>
23  *
24  * @since 3.2
25  *
26  */

27 public interface INavigatorViewerDescriptor {
28
29     /**
30      * {@value} (boolean): True indicates the
31      * "Available Extensions" tab in the "Available Customizations" dialog
32      * should not be available for the user (defaults to <b>false</b>).
33      *
34      */

35     String JavaDoc PROP_HIDE_AVAILABLE_EXT_TAB = "org.eclipse.ui.navigator.hideAvailableExtensionsTab"; //$NON-NLS-1$
36

37     /**
38      * {@value} (boolean): True
39      * indicates the entire "Available Customizations" dialog should not be
40      * available for the user (defaults to <b>false</b>).
41      */

42     String JavaDoc PROP_HIDE_AVAILABLE_CUSTOMIZATIONS_DIALOG = "org.eclipse.ui.navigator.hideAvailableCustomizationsDialog"; //$NON-NLS-1$
43

44     /**
45      * {@value} (boolean): True indicates the
46      * "Collapse All" button should not be available for the user (defaults to
47      * <b>false</b>).
48      */

49     String JavaDoc PROP_HIDE_COLLAPSE_ALL_ACTION = "org.eclipse.ui.navigator.hideCollapseAllAction"; //$NON-NLS-1$
50

51     /**
52      * {@value} (boolean): True indicates
53      * the "Link With Editor" action should not be available for the user
54      * (defaults to <b>false</b>).
55      */

56     String JavaDoc PROP_HIDE_LINK_WITH_EDITOR_ACTION = "org.eclipse.ui.navigator.hideLinkWithEditorAction"; //$NON-NLS-1$
57

58     /**
59      * Returns the id of the viewer targeted by this extension.
60      *
61      * @return the id of the viewer targeted by this extension.
62      */

63     String JavaDoc getViewerId();
64
65     /**
66      * The default value of the popup menu id is the viewer id. Clients may
67      * override this value using a <b>navigatorConfiguration</b> extension.
68      *
69      * @return The id of the context menu of the viewer.
70      */

71     String JavaDoc getPopupMenuId();
72
73     /**
74      * Returns true if the content extension of the given id is 'visible'. A
75      * content extension is 'visible' if it matches a viewerContentBinding for
76      * the given viewer id.
77      *
78      * @param aContentExtensionId
79      * The id to query
80      * @return True if the content extension matches a viewerContentBinding for
81      * the viewer id of this descriptor.
82      */

83     boolean isVisibleContentExtension(String JavaDoc aContentExtensionId);
84
85     /**
86      * Returns true if the action extension of the given id is 'visible'. An
87      * action extension is 'visible' if it matches a viewerActionBinding for the
88      * given viewer id.
89      *
90      * @param anActionExtensionId
91      * The id to query
92      * @return True if the action extension matches a viewerActionBinding for
93      * the viewer id of this descriptor.
94      */

95     boolean isVisibleActionExtension(String JavaDoc anActionExtensionId);
96
97     /**
98      * Returns true if the content extension of the given id matches a
99      * viewerContentBinding extension that declares isRoot as true.
100      *
101      * @param aContentExtensionId
102      * The id to query
103      * @return True if the content extension matches a viewerContentBinding
104      * which declares 'isRoot' as true for the viewer id of this
105      * descriptor.
106      */

107     boolean isRootExtension(String JavaDoc aContentExtensionId);
108
109     /**
110      * Returns true if there exists at least one matching viewerContentBinding
111      * which declares isRoot as true. This behavior will override the default
112      * enablement for the viewer root.
113      *
114      * @return True if there exists a matching viewerContentBinding which
115      * declares isRoot as true.
116      */

117     boolean hasOverriddenRootExtensions();
118
119     /**
120      * Returns true by default. A true value indicates that object and view
121      * contributions should be supported by the popup menu of any viewer
122      * described by this viewer descriptor. The value may be overridden from the
123      * &lt;popupMenu /&gt; child element of the &lt;viewer /&gt; element in the
124      * <b>org.eclipse.ui.navigator.viewer</b> extension point.
125      *
126      * @return True if object/view contributions should be allowed or False
127      * otherwise.
128      */

129     boolean allowsPlatformContributionsToContextMenu();
130
131     /**
132      *
133      * Custom insertion points are declared through a nested 'popupMenu' element
134      * in the <b>org.eclipse.ui.navigator.viewer</b> extension point. Each
135      * insertion point represents either a {@link Separator} or
136      * {@link GroupMarker} in the context menu of the viewer.
137      * <p>
138      *
139      * @return The set of custom insertion points, if any. A null list indicates
140      * the default set (as defined by {@link NavigatorActionService})
141      * should be used. An empty list indicates there are no declarative
142      * insertion points.
143      */

144     MenuInsertionPoint[] getCustomInsertionPoints();
145
146     /**
147      * @param aPropertyName
148      * A property name corresponding to a configuration option from
149      * <b>org.eclipse.ui.navigator.viewer</b>
150      * @return The unmodified string value returned from the extension (<b>null</b>
151      * is a possible return value).
152      */

153     String JavaDoc getStringConfigProperty(String JavaDoc aPropertyName);
154
155     /**
156      * @param aPropertyName
157      * A property name corresponding to a configuration option from
158      * <b>org.eclipse.ui.navigator.viewer</b>
159      * @return The boolean value returned from the extension (<b>null</b> is a
160      * possible return value).
161      */

162     boolean getBooleanConfigProperty(String JavaDoc aPropertyName);
163
164 }
Popular Tags