Project

General

Profile

Download (6.36 KB) Statistics
| Branch: | Tag: | Revision:
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2010 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
 * @noimplement This interface is not intended to be implemented by clients.
21
 * @noextend This interface is not intended to be extended by clients.
22
 * @since 3.2
23
 * 
24
 */
25
public interface INavigatorViewerDescriptor {
26

    
27
	/**
28
	 * {@value} (boolean): True indicates the
29
	 * "Available Extensions" tab in the "Available Customizations" dialog
30
	 * should not be available for the user (defaults to <b>false</b>).
31
	 * 
32
	 */
33
	String PROP_HIDE_AVAILABLE_EXT_TAB = "org.eclipse.ui.navigator.hideAvailableExtensionsTab"; //$NON-NLS-1$
34

    
35
	/**
36
	 * {@value} (boolean): True
37
	 * indicates the entire "Available Customizations" dialog should not be
38
	 * available for the user (defaults to <b>false</b>).
39
	 */
40
	String PROP_HIDE_AVAILABLE_CUSTOMIZATIONS_DIALOG = "org.eclipse.ui.navigator.hideAvailableCustomizationsDialog"; //$NON-NLS-1$
41

    
42
	/**
43
	 * {@value} (boolean): True indicates the
44
	 * "Collapse All" button should not be available for the user (defaults to
45
	 * <b>false</b>).
46
	 */
47
	String PROP_HIDE_COLLAPSE_ALL_ACTION = "org.eclipse.ui.navigator.hideCollapseAllAction"; //$NON-NLS-1$
48

    
49
	/**
50
	 * {@value} (boolean): True indicates
51
	 * the "Link With Editor" action should not be available for the user
52
	 * (defaults to <b>false</b>).
53
	 */
54
	String PROP_HIDE_LINK_WITH_EDITOR_ACTION = "org.eclipse.ui.navigator.hideLinkWithEditorAction"; //$NON-NLS-1$
55

    
56
	/**
57
	 * {@value} (string): The help context id to be used for the customize view dialog, if not specified
58
	 * help will not be available.
59
	 * @since 3.5
60
	 */
61
	String PROP_CUSTOMIZE_VIEW_DIALOG_HELP_CONTEXT = "org.eclipse.ui.navigator.customizeViewDialogHelpContext"; //$NON-NLS-1$
62

    
63
	/**
64
	 * Returns the id of the viewer targeted by this extension.
65
	 * 
66
	 * @return the id of the viewer targeted by this extension.
67
	 */
68
	String getViewerId();
69

    
70
	/**
71
	 * The default value of the popup menu id is the viewer id. Clients may
72
	 * override this value using a <b>navigatorConfiguration</b> extension.
73
	 * 
74
	 * @return The id of the context menu of the viewer.
75
	 */
76
	String getPopupMenuId();
77

    
78
	/**
79
	 * Returns true if the content extension of the given id is 'visible'. A
80
	 * content extension is 'visible' if it matches a viewerContentBinding for
81
	 * the given viewer id.
82
	 * 
83
	 * @param aContentExtensionId
84
	 *            The id to query
85
	 * @return True if the content extension matches a viewerContentBinding for
86
	 *         the viewer id of this descriptor.
87
	 */
88
	boolean isVisibleContentExtension(String aContentExtensionId);
89

    
90
	/**
91
	 * Returns true if the action extension of the given id is 'visible'. An
92
	 * action extension is 'visible' if it matches a viewerActionBinding for the
93
	 * given viewer id.
94
	 * 
95
	 * @param anActionExtensionId
96
	 *            The id to query
97
	 * @return True if the action extension matches a viewerActionBinding for
98
	 *         the viewer id of this descriptor.
99
	 */
100
	boolean isVisibleActionExtension(String anActionExtensionId);
101

    
102
	/**
103
	 * Returns true if the content extension of the given id matches a
104
	 * viewerContentBinding extension that declares isRoot as true.
105
	 * 
106
	 * @param aContentExtensionId
107
	 *            The id to query
108
	 * @return True if the content extension matches a viewerContentBinding
109
	 *         which declares 'isRoot' as true for the viewer id of this
110
	 *         descriptor.
111
	 */
112
	boolean isRootExtension(String aContentExtensionId);
113

    
114
	/**
115
	 * Returns true if there exists at least one matching viewerContentBinding
116
	 * which declares isRoot as true. This behavior will override the default
117
	 * enablement for the viewer root.
118
	 * 
119
	 * @return True if there exists a matching viewerContentBinding which
120
	 *         declares isRoot as true.
121
	 */
122
	boolean hasOverriddenRootExtensions();
123

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

    
136
	/**
137
	 * 
138
	 * Custom insertion points are declared through a nested 'popupMenu' element
139
	 * in the <b>org.eclipse.ui.navigator.viewer</b> extension point. Each
140
	 * insertion point represents either a {@link Separator} or
141
	 * {@link GroupMarker} in the context menu of the viewer.
142
	 * <p>
143
	 * 
144
	 * @return The set of custom insertion points, if any. A null list indicates
145
	 *         the default set (as defined by {@link NavigatorActionService})
146
	 *         should be used. An empty list indicates there are no declarative
147
	 *         insertion points.
148
	 */
149
	MenuInsertionPoint[] getCustomInsertionPoints();
150

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

    
160
	/**
161
	 * @param aPropertyName
162
	 *            A property name corresponding to a configuration option from
163
	 *            <b>org.eclipse.ui.navigator.viewer</b>
164
	 * @return The boolean value returned from the extension (<b>null</b> is a
165
	 *         possible return value).
166
	 */
167
	boolean getBooleanConfigProperty(String aPropertyName);
168
	
169
	/**
170
	 * @return the help context associated with this viewer as specified by 
171
	 * the helpContext attribute of the &lt;viewer /&gt; element in the
172
	 * <b>org.eclipse.ui.navigator.viewer</b> extension point.
173
	 * @since 3.4
174
	 */
175
	String getHelpContext();
176

    
177
}
(36-36/49)