KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > ui > ITypeHierarchyViewPart


1 /*******************************************************************************
2  * Copyright (c) 2000, 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.jdt.ui;
12
13
14 import org.eclipse.ui.IViewPart;
15
16 import org.eclipse.jdt.core.IJavaElement;
17 import org.eclipse.jdt.core.IType;
18
19 /**
20  * The standard type hierarchy view presents a type hierarchy for a given input class
21  * or interface. Visually, this view consists of a pair of viewers, one showing the type
22  * hierarchy, the other showing the members of the type selected in the first.
23  * <p>
24  * This interface is not intended to be implemented by clients.
25  * </p>
26  *
27  * @see JavaUI#ID_TYPE_HIERARCHY
28  */

29 public interface ITypeHierarchyViewPart extends IViewPart {
30     
31     /**
32      * Constant used for the vertical view layout.
33      * @since 3.3
34      */

35     public static final int VIEW_LAYOUT_VERTICAL= 0;
36     
37     /**
38      * Constant used for the horizontal view layout.
39      * @since 3.3
40      */

41     public static final int VIEW_LAYOUT_HORIZONTAL= 1;
42     
43     /**
44      * Constant used for the single view layout (no members view)
45      * @since 3.3
46      */

47     public static final int VIEW_LAYOUT_SINGLE= 2;
48     
49     /**
50      * Constant used for the automatic view layout.
51      * @since 3.3
52      */

53     public static final int VIEW_LAYOUT_AUTOMATIC= 3;
54     
55     /**
56      * Constant used for the 'classic' type hierarchy mode.
57      * @since 3.3
58      */

59     public static final int HIERARCHY_MODE_CLASSIC= 2;
60     
61     /**
62      * Constant used for the super types hierarchy mode.
63      * @since 3.3
64      */

65     public static final int HIERARCHY_MODE_SUPERTYPES= 0;
66     
67     /**
68      * Constant used for the sub types hierarchy mode.
69      * @since 3.3
70      */

71     public static final int HIERARCHY_MODE_SUBTYPES= 1;
72
73     /**
74      * Sets the input element of this type hierarchy view to a type.
75      *
76      * @param type the input element of this type hierarchy view, or <code>null</code>
77      * to clear any input element
78      * @deprecated use setInputElement instead
79      */

80     public void setInput(IType type);
81     
82     /**
83      * Sets the input element of this type hierarchy view. The following input types are possible
84      * <code>IMember</code> (types, methods, fields..), <code>IPackageFragment</code>, <code>IPackageFragmentRoot</code>
85      * and <code>IJavaProject</code>.
86      *
87      * @param element the input element of this type hierarchy view, or <code>null</code>
88      * to clear any input
89      *
90      * @since 2.0
91      */

92     public void setInputElement(IJavaElement element);
93
94     /**
95      * Returns the input element of this type hierarchy view.
96      *
97      * @return the input element, or <code>null</code> if no input element is set
98      * @see #setInput(IType)
99      * @deprecated use getInputElement instead
100      */

101     public IType getInput();
102     
103
104     /**
105      * Returns the input element of this type hierarchy view.
106      *
107      * @return the input element, or <code>null</code> if no input element is set
108      * @see #setInputElement(IJavaElement)
109      *
110      * @since 2.0
111      */

112     public IJavaElement getInputElement();
113
114     /**
115      * Locks the the members view and shows the selected members in the hierarchy.
116      *
117      * @param enabled If set, the members view will be locked and the selected members are shown in the hierarchy.
118      *
119      * @since 3.3
120      */

121     public void showMembersInHierarchy(boolean enabled);
122
123     /**
124      * If set, the lock mode is enabled.
125      *
126      * @return returns if the lock mode is enabled.
127      *
128      * @since 3.3
129      */

130     public boolean isShowMembersInHierarchy();
131     
132     /**
133      * Specifies if type names are shown with the parent container's name.
134      *
135      * @param enabled if enabled, the hierarchy will also show the type container names
136      *
137      * @since 3.3
138      */

139     public void showQualifiedTypeNames(boolean enabled);
140     
141     /**
142      * If set, type names are shown with the parent container's name.
143      *
144      * @return returns if type names are shown with the parent container's name.
145      *
146      * @since 3.3
147      */

148     public boolean isQualifiedTypeNamesEnabled();
149     
150     /**
151      * Returns whether this type hierarchy view's selection automatically tracks the active editor.
152      *
153      * @return <code>true</code> if linking is enabled, <code>false</code> if not
154      *
155      * @since 3.3
156      */

157     public boolean isLinkingEnabled();
158     
159     /**
160      * Sets whether this type hierarchy view's selection automatically tracks the active editor.
161      *
162      * @param enabled <code>true</code> to enable, <code>false</code> to disable
163      *
164      * @since 3.3
165      */

166     public void setLinkingEnabled(boolean enabled);
167     
168     /**
169      * Sets the view layout. Valid inputs are {@link #VIEW_LAYOUT_VERTICAL}, {@link #VIEW_LAYOUT_HORIZONTAL}
170      * {@link #VIEW_LAYOUT_SINGLE} and {@link #VIEW_LAYOUT_AUTOMATIC}.
171      *
172      * @param layout The layout to set
173      *
174      * @since 3.3
175      */

176     public void setViewLayout(int layout);
177     
178     /**
179      * Returns the currently configured view layout. Possible layouts are {@link #VIEW_LAYOUT_VERTICAL}, {@link #VIEW_LAYOUT_HORIZONTAL}
180      * {@link #VIEW_LAYOUT_SINGLE} and {@link #VIEW_LAYOUT_AUTOMATIC} but clients should also be able to handle yet unknown
181      * layout.
182      *
183      * @return The layout currently set
184      *
185      * @since 3.3
186      */

187     public int getViewLayout();
188     
189     /**
190      * Sets the hierarchy mode. Valid modes are {@link #HIERARCHY_MODE_SUBTYPES}, {@link #HIERARCHY_MODE_SUPERTYPES}
191      * and {@link #HIERARCHY_MODE_CLASSIC}.
192      *
193      * @param mode The hierarchy mode to set
194      *
195      * @since 3.3
196      */

197     public void setHierarchyMode(int mode);
198     
199     /**
200      * Returns the currently configured hierarchy mode. Possible modes are {@link #HIERARCHY_MODE_SUBTYPES}, {@link #HIERARCHY_MODE_SUPERTYPES}
201      * and {@link #HIERARCHY_MODE_CLASSIC} but clients should also be able to handle yet unknown modes.
202      *
203      * @return The hierarchy mode currently set
204      *
205      * @since 3.3
206      */

207     public int getHierarchyMode();
208     
209 }
210
Popular Tags