public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyViewPart, IViewPartInputProvider
HIERARCHY_MODE_CLASSIC, HIERARCHY_MODE_SUBTYPES, HIERARCHY_MODE_SUPERTYPES, VIEW_LAYOUT_AUTOMATIC, VIEW_LAYOUT_HORIZONTAL, VIEW_LAYOUT_SINGLE, VIEW_LAYOUT_VERTICALPROP_TITLE| Constructor and Description |
|---|
TypeHierarchyViewPart() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearNeededRefresh() |
void |
createPartControl(Composite container)
Returns the inner component in a workbench part.
|
void |
dispose()
The
WorkbenchPart implementation of this
IWorkbenchPart method disposes the title image
loaded by setInitializationData. |
protected void |
doPropertyChange(PropertyChangeEvent event) |
(package private) void |
doRestoreState(IMemento memento,
IJavaElement input) |
protected void |
doSelectionChanged(SelectionChangedEvent e) |
protected void |
doTypeHierarchyChanged(TypeHierarchyLifeCycle typeHierarchy,
IType[] changedTypes)
Called from ITypeHierarchyLifeCycleListener.
|
protected void |
doTypeHierarchyChangedOnViewers(IType[] changedTypes) |
protected void |
editorActivated(IEditorPart editor)
Link selection to active editor.
|
Object |
getAdapter(Class key)
Returns an object which is an instance of the given class
associated with this object.
|
int |
getHierarchyMode()
Returns the currently configured hierarchy mode.
|
IJavaElement[] |
getHistoryEntries()
Gets all history entries.
|
IType |
getInput()
Deprecated.
use getInputElement instead
|
IJavaElement |
getInputElement()
Returns the input element of the type hierarchy.
|
protected IShowInSource |
getShowInSource() |
int |
getViewLayout()
Returns the currently configured view layout.
|
Object |
getViewPartInput()
Returns the input.
|
void |
gotoHistoryEntry(IJavaElement entry)
Goes to the selected entry, without updating the order of history entries.
|
void |
init(IViewSite site,
IMemento memento)
Initializes this view with the given view site.
|
boolean |
isLinkingEnabled()
Returns whether this type hierarchy view's selection automatically tracks the active editor.
|
boolean |
isQualifiedTypeNamesEnabled()
If set, type names are shown with the parent container's name.
|
boolean |
isShowMembersInHierarchy()
If set, the lock mode is enabled.
|
void |
saveState(IMemento memento)
Saves the object state within a memento.
|
void |
selectMember(IMember member)
Selects an member in the methods list or in the current hierarchy.
|
void |
setFocus()
Asks this part to take focus within the workbench.
|
void |
setHierarchyMode(int viewerIndex)
Sets the hierarchy mode.
|
void |
setHistoryEntries(IJavaElement[] elems)
Sets the history entries
|
void |
setInput(IType type)
Deprecated.
use setInputElement instead
|
void |
setInputElement(IJavaElement element)
Sets the input to a new element.
|
void |
setLinkingEnabled(boolean enabled)
Sets whether this type hierarchy view's selection automatically tracks the active editor.
|
void |
setViewLayout(int layout)
Sets the view layout.
|
void |
showMembersInHierarchy(boolean on)
Locks the the members view and shows the selected members in the hierarchy.
|
void |
showQualifiedTypeNames(boolean on)
Specifies if type names are shown with the parent container's name.
|
protected void |
visibilityChanged(boolean isVisible)
View part becomes visible.
|
checkSite, getViewSite, init, setContentDescription, setInitializationData, setPartNameaddPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusyaddListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetViewSite, initaddPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListenerpublic TypeHierarchyViewPart()
protected void doPropertyChange(PropertyChangeEvent event)
public void gotoHistoryEntry(IJavaElement entry)
entry - The entry to openpublic IJavaElement[] getHistoryEntries()
public void setHistoryEntries(IJavaElement[] elems)
elems - The history elements to setpublic void selectMember(IMember member)
member - The member to selectpublic IType getInput()
getInput in interface ITypeHierarchyViewPartnull if no input element is setITypeHierarchyViewPart.setInput(IType)public void setInput(IType type)
setInput in interface ITypeHierarchyViewParttype - the input element of this type hierarchy view, or null
to clear any input elementpublic IJavaElement getInputElement()
IType or IPackageFragmentgetInputElement in interface ITypeHierarchyViewPartITypeHierarchyViewPart.setInputElement(IJavaElement)public void setInputElement(IJavaElement element)
setInputElement in interface ITypeHierarchyViewPartelement - the input elementpublic void setFocus()
IWorkbenchPart
Clients should not call this method (the workbench calls this method at
appropriate times). To have the workbench activate a part, use
IWorkbenchPage.activate(IWorkbenchPart) instead.
setFocus in interface IWorkbenchPartsetFocus in class WorkbenchPartpublic void dispose()
WorkbenchPartWorkbenchPart implementation of this
IWorkbenchPart method disposes the title image
loaded by setInitializationData. Subclasses may extend.dispose in interface IWorkbenchPartdispose in class WorkbenchPartpublic Object getAdapter(Class key)
WorkbenchPartnull if
no such object can be found.
Subclasses may override this method (however, if they do so, they
should invoke the method on their superclass to ensure that the
Platform's adapter manager is consulted).getAdapter in interface IAdaptablegetAdapter in class WorkbenchPartkey - the adapter class to look upnull if this object does not
have an adapter for the given classpublic void createPartControl(Composite container)
createPartControl in interface IWorkbenchPartcreatePartControl in class WorkbenchPartcontainer - the parent controlIWorkbenchPart.createPartControl(Composite)public void setViewLayout(int layout)
ITypeHierarchyViewPartITypeHierarchyViewPart.VIEW_LAYOUT_VERTICAL, ITypeHierarchyViewPart.VIEW_LAYOUT_HORIZONTAL
ITypeHierarchyViewPart.VIEW_LAYOUT_SINGLE and ITypeHierarchyViewPart.VIEW_LAYOUT_AUTOMATIC.setViewLayout in interface ITypeHierarchyViewPartlayout - The layout to setpublic int getViewLayout()
ITypeHierarchyViewPartITypeHierarchyViewPart.VIEW_LAYOUT_VERTICAL, ITypeHierarchyViewPart.VIEW_LAYOUT_HORIZONTAL
ITypeHierarchyViewPart.VIEW_LAYOUT_SINGLE and ITypeHierarchyViewPart.VIEW_LAYOUT_AUTOMATIC but clients should also be able to handle yet unknown
layout.getViewLayout in interface ITypeHierarchyViewPartprotected void doSelectionChanged(SelectionChangedEvent e)
public void setHierarchyMode(int viewerIndex)
ITypeHierarchyViewPartITypeHierarchyViewPart.HIERARCHY_MODE_SUBTYPES, ITypeHierarchyViewPart.HIERARCHY_MODE_SUPERTYPES
and ITypeHierarchyViewPart.HIERARCHY_MODE_CLASSIC.setHierarchyMode in interface ITypeHierarchyViewPartviewerIndex - The hierarchy mode to setpublic int getHierarchyMode()
ITypeHierarchyViewPartITypeHierarchyViewPart.HIERARCHY_MODE_SUBTYPES, ITypeHierarchyViewPart.HIERARCHY_MODE_SUPERTYPES
and ITypeHierarchyViewPart.HIERARCHY_MODE_CLASSIC but clients should also be able to handle yet unknown modes.getHierarchyMode in interface ITypeHierarchyViewPartpublic void showMembersInHierarchy(boolean on)
ITypeHierarchyViewPartshowMembersInHierarchy in interface ITypeHierarchyViewParton - If set, the members view will be locked and the selected members are shown in the hierarchy.public boolean isShowMembersInHierarchy()
ITypeHierarchyViewPartisShowMembersInHierarchy in interface ITypeHierarchyViewPartpublic void showQualifiedTypeNames(boolean on)
ITypeHierarchyViewPartshowQualifiedTypeNames in interface ITypeHierarchyViewParton - if enabled, the hierarchy will also show the type container namespublic boolean isQualifiedTypeNamesEnabled()
ITypeHierarchyViewPartisQualifiedTypeNamesEnabled in interface ITypeHierarchyViewPartprotected void doTypeHierarchyChanged(TypeHierarchyLifeCycle typeHierarchy, IType[] changedTypes)
typeHierarchy - Hierarchy that has changedchangedTypes - Types in the hierarchy that have change or null if the full hierarchy has changedprotected void doTypeHierarchyChangedOnViewers(IType[] changedTypes)
public void init(IViewSite site, IMemento memento) throws PartInitException
IViewPartThis method is automatically called by the workbench shortly after the part is instantiated. It marks the start of the views's lifecycle. Clients must not call this method.
init in interface IViewPartinit in class ViewPartsite - the view sitememento - the IViewPart state or null if there is no previous saved statePartInitException - if this view was not initialized successfullypublic void saveState(IMemento memento)
IViewPartfinal void doRestoreState(IMemento memento, IJavaElement input)
protected void visibilityChanged(boolean isVisible)
isVisible - true if visibleprotected void editorActivated(IEditorPart editor)
editor - The activated editorpublic Object getViewPartInput()
IViewPartInputProvidergetViewPartInput in interface IViewPartInputProviderprotected IShowInSource getShowInSource()
IShowInSource for this view.public boolean isLinkingEnabled()
ITypeHierarchyViewPartisLinkingEnabled in interface ITypeHierarchyViewParttrue if linking is enabled, false if notpublic void setLinkingEnabled(boolean enabled)
ITypeHierarchyViewPartsetLinkingEnabled in interface ITypeHierarchyViewPartenabled - true to enable, false to disablepublic void clearNeededRefresh()