Class ResourceNavigator
- All Implemented Interfaces:
IAdaptable
,IExecutableExtension
,IPersistable
,IViewPart
,IWorkbenchPart
,IWorkbenchPart2
,IWorkbenchPart3
,ISetSelectionTarget
,IWorkbenchPartOrientation
,IResourceNavigator
- Restriction:
- This class is not intended to be subclassed by clients.
- Restriction:
- This class is not intended to be referenced by clients. Planned to be deleted, please see Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=549953
- Restriction:
- This class is not intended to be instantiated by clients.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Deprecated.No longer used but preserved to avoid an api change.Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Constructs a new resource navigator view. -
Method Summary
Modifier and TypeMethodDescriptionprotected FrameList
Deprecated, for removal: This API element is subject to removal in a future version.Creates the frame source and frame list, and connects them.void
createPartControl
(Composite parent) Deprecated, for removal: This API element is subject to removal in a future version.Creates the SWT controls for this workbench part.protected TreeViewer
createViewer
(Composite parent) Deprecated, for removal: This API element is subject to removal in a future version.Creates the viewer.void
dispose()
Deprecated, for removal: This API element is subject to removal in a future version.TheWorkbenchPart
implementation of thisIWorkbenchPart
method disposes the title image loaded bysetInitializationData
.protected void
editorActivated
(IEditorPart editor) Deprecated, for removal: This API element is subject to removal in a future version.An editor has been activated.protected void
fillContextMenu
(IMenuManager menu) Deprecated, for removal: This API element is subject to removal in a future version.Called when the context menu is about to open.protected ResourceNavigatorActionGroup
Deprecated, for removal: This API element is subject to removal in a future version.Returns the action group.<T> T
getAdapter
(Class<T> adapter) Deprecated, for removal: This API element is subject to removal in a future version.Returns an object which is an instance of the given class associated with this object.Deprecated, for removal: This API element is subject to removal in a future version.Returns the comparator.Deprecated, for removal: This API element is subject to removal in a future version.Returns the frame list for this navigator.protected String
Deprecated, for removal: This API element is subject to removal in a future version.Returns the help context id to use for this view.protected IAdaptable
Deprecated, for removal: This API element is subject to removal in a future version.Returns the initial input for the viewer.Deprecated, for removal: This API element is subject to removal in a future version.Returns the pattern filter for this view.Deprecated, for removal: This API element is subject to removal in a future version.Returns the navigator's plugin.getShell()
Deprecated.use getViewSite().getShell()protected IShowInSource
Deprecated, for removal: This API element is subject to removal in a future version.Returns theIShowInSource
for this view.protected IShowInTarget
Deprecated, for removal: This API element is subject to removal in a future version.Returns theIShowInTarget
for this view.protected static final Object
Deprecated, for removal: This API element is subject to removal in a future version.Returns the selected element if the selection consists of a single element only.Deprecated.as of 3.3, usegetComparator()
protected String
getStatusLineMessage
(IStructuredSelection selection) Deprecated, for removal: This API element is subject to removal in a future version.Returns the message to show in the status line.Deprecated, for removal: This API element is subject to removal in a future version.Returns the tree viewer which shows the resource hierarchy.Deprecated, for removal: This API element is subject to removal in a future version.Returns the resource viewer which shows the resource hierarchy.Deprecated, for removal: This API element is subject to removal in a future version.Returns the working set for this view.protected void
Deprecated, for removal: This API element is subject to removal in a future version.Handles a double-click event from the viewer.protected void
handleKeyPressed
(KeyEvent event) Deprecated, for removal: This API element is subject to removal in a future version.Handles a key press event from the viewer.protected void
handleKeyReleased
(KeyEvent event) Deprecated, for removal: This API element is subject to removal in a future version.Handles a key release in the viewer.protected void
handleOpen
(ISelection selection) Deprecated, for removal: This API element is subject to removal in a future version.Handles an open event from the viewer.protected void
handleOpen
(OpenEvent event) Deprecated.As of 3.5, replaced byhandleOpen(ISelection)
protected void
Deprecated, for removal: This API element is subject to removal in a future version.Handles a selection changed event from the viewer.void
Deprecated, for removal: This API element is subject to removal in a future version.Initializes this view with the given view site.protected void
initContentProvider
(TreeViewer viewer) Deprecated, for removal: This API element is subject to removal in a future version.Sets the content provider for the viewer.protected void
Deprecated, for removal: This API element is subject to removal in a future version.Initializes and registers the context menu.protected void
Deprecated, for removal: This API element is subject to removal in a future version.Adds drag and drop support to the navigator.protected void
initFilters
(TreeViewer viewer) Deprecated, for removal: This API element is subject to removal in a future version.Adds the filters to the viewer.protected void
initLabelProvider
(TreeViewer viewer) Deprecated, for removal: This API element is subject to removal in a future version.Sets the label provider for the viewer.protected void
initListeners
(TreeViewer viewer) Deprecated, for removal: This API element is subject to removal in a future version.Adds the listeners to the viewer.protected void
Deprecated, for removal: This API element is subject to removal in a future version.Initializes the comparator.protected void
Deprecated.as of 3.3, useinitResourceComparator()
insteadprotected void
Deprecated, for removal: This API element is subject to removal in a future version.Restores the working set filter from the persistence store.boolean
Deprecated, for removal: This API element is subject to removal in a future version.Returns whether the navigator selection automatically tracks the active editor.protected void
linkToEditor
(ISelection selection) Deprecated, for removal: This API element is subject to removal in a future version.Brings the corresponding editor to top if the selected resource is open.protected void
linkToEditor
(IStructuredSelection selection) Deprecated.As of 3.5, replaced bylinkToEditor(ISelection)
protected void
Deprecated, for removal: This API element is subject to removal in a future version.Creates the action group, which encapsulates all actions for the view.protected void
restoreState
(IMemento memento) Deprecated, for removal: This API element is subject to removal in a future version.Restores the state of the receiver to the state described in the specified memento.void
Deprecated, for removal: This API element is subject to removal in a future version.Saves the object state within a memento.void
selectReveal
(ISelection selection) Deprecated, for removal: This API element is subject to removal in a future version.Selects and reveals the specified elements.protected void
setActionGroup
(ResourceNavigatorActionGroup actionGroup) Deprecated, for removal: This API element is subject to removal in a future version.Sets the action group.void
setComparator
(ResourceComparator comparator) Deprecated, for removal: This API element is subject to removal in a future version.Sets the resource comparatorvoid
setFiltersPreference
(String[] patterns) Deprecated, for removal: This API element is subject to removal in a future version.Saves the filters defined as strings inpatterns
in the preference store.void
setFocus()
Deprecated, for removal: This API element is subject to removal in a future version.Asks this part to take focus within the workbench.void
setLabelDecorator
(ILabelDecorator decorator) Deprecated.use the decorators extension point instead; see IWorkbench.getDecoratorManager()void
setLinkingEnabled
(boolean enabled) Deprecated, for removal: This API element is subject to removal in a future version.Sets whether this navigator's selection automatically tracks the active editor.void
setSorter
(ResourceSorter sorter) Deprecated.as of 3.3, usesetComparator(ResourceComparator)
void
setWorkingSet
(IWorkingSet workingSet) Deprecated, for removal: This API element is subject to removal in a future version.Sets the working set for this view, ornull
to clear it.protected void
updateActionBars
(IStructuredSelection selection) Deprecated, for removal: This API element is subject to removal in a future version.Updates the action bar actions.protected void
updateStatusLine
(IStructuredSelection selection) Deprecated, for removal: This API element is subject to removal in a future version.Updates the message shown in the status line.void
Deprecated, for removal: This API element is subject to removal in a future version.Updates the title text and title tool tip.Methods inherited from class org.eclipse.ui.part.ViewPart
checkSite, getViewSite, init, setContentDescription, setInitializationData, setPartName
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.ui.IViewPart
getViewSite, init
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
-
Field Details
-
NAVIGATOR_VIEW_HELP_ID
Deprecated.No longer used but preserved to avoid an api change.- See Also:
-
-
Constructor Details
-
ResourceNavigator
public ResourceNavigator()Deprecated, for removal: This API element is subject to removal in a future version.Constructs a new resource navigator view.
-
-
Method Details
-
createPartControl
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IWorkbenchPart
Creates the SWT controls for this workbench part.Clients should not call this method (the workbench calls this method when it needs to, which may be never).
For implementors this is a multi-step process:
- Create one or more controls within the parent.
- Set the parent layout as needed.
- Register any global actions with the site's
IActionBars
. - Register any context menus with the site.
- Register a selection provider with the site, to make it available to the
workbench's
ISelectionService
(optional).
- Specified by:
createPartControl
in interfaceIWorkbenchPart
- Specified by:
createPartControl
in classWorkbenchPart
- Parameters:
parent
- the parent control
-
getHelpContextId
Deprecated, for removal: This API element is subject to removal in a future version.Returns the help context id to use for this view.- Since:
- 2.0
-
initContextMenu
protected void initContextMenu()Deprecated, for removal: This API element is subject to removal in a future version.Initializes and registers the context menu.- Since:
- 2.0
-
createViewer
Deprecated, for removal: This API element is subject to removal in a future version.Creates the viewer.- Parameters:
parent
- the parent composite- Since:
- 2.0
-
initContentProvider
Deprecated, for removal: This API element is subject to removal in a future version.Sets the content provider for the viewer.- Parameters:
viewer
- the viewer- Since:
- 2.0
-
initLabelProvider
Deprecated, for removal: This API element is subject to removal in a future version.Sets the label provider for the viewer.- Parameters:
viewer
- the viewer- Since:
- 2.0
-
initFilters
Deprecated, for removal: This API element is subject to removal in a future version.Adds the filters to the viewer.- Parameters:
viewer
- the viewer- Since:
- 2.0
-
initListeners
Deprecated, for removal: This API element is subject to removal in a future version.Adds the listeners to the viewer.- Parameters:
viewer
- the viewer- Since:
- 2.0
-
dispose
public void dispose()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:WorkbenchPart
TheWorkbenchPart
implementation of thisIWorkbenchPart
method disposes the title image loaded bysetInitializationData
. Subclasses may extend.- Specified by:
dispose
in interfaceIWorkbenchPart
- Overrides:
dispose
in classWorkbenchPart
-
editorActivated
Deprecated, for removal: This API element is subject to removal in a future version.An editor has been activated. Sets the selection in this navigator to be the editor's input, if linking is enabled.- Parameters:
editor
- the active editor- Since:
- 2.0
-
fillContextMenu
Deprecated, for removal: This API element is subject to removal in a future version.Called when the context menu is about to open. Delegates to the action group using the viewer's selection as the action context.- Since:
- 2.0
-
getFrameList
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IResourceNavigator
Returns the frame list for this navigator.- Specified by:
getFrameList
in interfaceIResourceNavigator
- Returns:
- the list of frames maintained by the resource navigator
-
getInitialInput
Deprecated, for removal: This API element is subject to removal in a future version.Returns the initial input for the viewer. Tries to convert the page input to a resource, either directly or via IAdaptable. If the resource is a container, it uses that. If the resource is a file, it uses its parent folder. If a resource could not be obtained, it uses the workspace root.- Since:
- 2.0
-
getPatternFilter
Deprecated, for removal: This API element is subject to removal in a future version.Returns the pattern filter for this view.- Specified by:
getPatternFilter
in interfaceIResourceNavigator
- Returns:
- the pattern filter
- Since:
- 2.0
-
getWorkingSet
Deprecated, for removal: This API element is subject to removal in a future version.Returns the working set for this view.- Specified by:
getWorkingSet
in interfaceIResourceNavigator
- Returns:
- the working set
- Since:
- 2.0
-
getPlugin
Deprecated, for removal: This API element is subject to removal in a future version.Returns the navigator's plugin.- Returns:
- the UI plugin for this bundle
-
getSorter
Deprecated.as of 3.3, usegetComparator()
Return the sorter. If a comparator was set usingsetComparator(ResourceComparator)
, this method will returnnull
.- Specified by:
getSorter
in interfaceIResourceNavigator
- Returns:
- the resource navigator's sorter
- Since:
- 2.0
-
getComparator
Deprecated, for removal: This API element is subject to removal in a future version.Returns the comparator. If a sorter was set usingsetSorter(ResourceSorter)
, this method will returnnull
.- Specified by:
getComparator
in interfaceIResourceNavigator
- Returns:
- the
ResourceComparator
- Since:
- 3.3
-
getViewer
Deprecated, for removal: This API element is subject to removal in a future version.Returns the resource viewer which shows the resource hierarchy.- Specified by:
getViewer
in interfaceIResourceNavigator
- Returns:
- the resource navigator's tree viewer
- Since:
- 2.0
-
getTreeViewer
Deprecated, for removal: This API element is subject to removal in a future version.Returns the tree viewer which shows the resource hierarchy.- Returns:
- the tree viewer
- Since:
- 2.0
-
getShell
Deprecated.use getViewSite().getShell()Returns the shell to use for opening dialogs. Used in this class, and in the actions.- Returns:
- the shell
-
getStatusLineMessage
Deprecated, for removal: This API element is subject to removal in a future version.Returns the message to show in the status line.- Parameters:
selection
- the current selection- Returns:
- the status line message
- Since:
- 2.0
-
handleOpen
Deprecated.As of 3.5, replaced byhandleOpen(ISelection)
Handles an open event from the viewer. Opens an editor on the selected file.- Parameters:
event
- the open event- Since:
- 2.0
-
handleOpen
Deprecated, for removal: This API element is subject to removal in a future version.Handles an open event from the viewer. Opens an editor on the selected file.- Parameters:
selection
- the selection- Since:
- 3.5
-
handleDoubleClick
Deprecated, for removal: This API element is subject to removal in a future version.Handles a double-click event from the viewer. Expands or collapses a folder when double-clicked.- Parameters:
event
- the double-click event- Since:
- 2.0
-
handleSelectionChanged
Deprecated, for removal: This API element is subject to removal in a future version.Handles a selection changed event from the viewer. Updates the status line and the action bars, and links to editor (if option enabled).- Parameters:
event
- the selection event- Since:
- 2.0
-
handleKeyPressed
Deprecated, for removal: This API element is subject to removal in a future version.Handles a key press event from the viewer. Delegates to the action group.- Parameters:
event
- the key event- Since:
- 2.0
-
handleKeyReleased
Deprecated, for removal: This API element is subject to removal in a future version.Handles a key release in the viewer. Does nothing by default.- Parameters:
event
- the key event- Since:
- 2.0
-
init
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IViewPart
Initializes this view with the given view site. A memento is passed to the view which contains a snapshot of the views state from a previous session. Where possible, the view should try to recreate that state within the part controls.This 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.
- Specified by:
init
in interfaceIViewPart
- Overrides:
init
in classViewPart
- Parameters:
site
- the view sitememento
- the IViewPart state or null if there is no previous saved state- Throws:
PartInitException
- if this view was not initialized successfully
-
initDragAndDrop
protected void initDragAndDrop()Deprecated, for removal: This API element is subject to removal in a future version.Adds drag and drop support to the navigator.- Since:
- 2.0
-
createFrameList
Deprecated, for removal: This API element is subject to removal in a future version.Creates the frame source and frame list, and connects them.- Since:
- 2.0
-
initResourceSorter
Deprecated.as of 3.3, useinitResourceComparator()
insteadInitializes the sorter. -
initResourceComparator
protected void initResourceComparator()Deprecated, for removal: This API element is subject to removal in a future version.Initializes the comparator.- Since:
- 3.3
-
initWorkingSetFilter
protected void initWorkingSetFilter()Deprecated, for removal: This API element is subject to removal in a future version.Restores the working set filter from the persistence store. -
isLinkingEnabled
public boolean isLinkingEnabled()Deprecated, for removal: This API element is subject to removal in a future version.Returns whether the navigator selection automatically tracks the active editor.- Specified by:
isLinkingEnabled
in interfaceIResourceNavigator
- Returns:
true
if linking is enabled,false
if not- Since:
- 2.0 (this was protected in 2.0, but was made public in 2.1)
-
linkToEditor
Deprecated.As of 3.5, replaced bylinkToEditor(ISelection)
Brings the corresponding editor to top if the selected resource is open.- Since:
- 2.0
-
linkToEditor
Deprecated, for removal: This API element is subject to removal in a future version.Brings the corresponding editor to top if the selected resource is open.- Since:
- 3.5
-
makeActions
protected void makeActions()Deprecated, for removal: This API element is subject to removal in a future version.Creates the action group, which encapsulates all actions for the view. -
restoreState
Deprecated, for removal: This API element is subject to removal in a future version.Restores the state of the receiver to the state described in the specified memento.- Parameters:
memento
- the memento- Since:
- 2.0
-
saveState
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IViewPart
Saves the object state within a memento. -
selectReveal
Deprecated, for removal: This API element is subject to removal in a future version.Selects and reveals the specified elements.- Specified by:
selectReveal
in interfaceISetSelectionTarget
- Parameters:
selection
- the new element to select
-
setFiltersPreference
Deprecated, for removal: This API element is subject to removal in a future version.Saves the filters defined as strings inpatterns
in the preference store.- Specified by:
setFiltersPreference
in interfaceIResourceNavigator
- Parameters:
patterns
- filter patterns to use on contents of the resource navigator
-
setFocus
public void setFocus()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IWorkbenchPart
Asks this part to take focus within the workbench. Parts must assign focus to one of the controls contained in the part's parent composite.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
.- Specified by:
setFocus
in interfaceIWorkbenchPart
- Specified by:
setFocus
in classWorkbenchPart
- See Also:
-
setLabelDecorator
Deprecated.use the decorators extension point instead; see IWorkbench.getDecoratorManager()Note: For experimental use only. Sets the decorator for the navigator.As of 2.0, this method no longer has any effect.
- Parameters:
decorator
- a label decorator ornull
for no decorations.
-
setLinkingEnabled
public void setLinkingEnabled(boolean enabled) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IResourceNavigator
Sets whether this navigator's selection automatically tracks the active editor.- Specified by:
setLinkingEnabled
in interfaceIResourceNavigator
- Parameters:
enabled
-true
to enable,false
to disable- Since:
- 2.1
- See Also:
-
setWorkingSet
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IResourceNavigator
Sets the working set for this view, ornull
to clear it.- Specified by:
setWorkingSet
in interfaceIResourceNavigator
- Parameters:
workingSet
- the working set, ornull
to clear it
-
updateActionBars
Deprecated, for removal: This API element is subject to removal in a future version.Updates the action bar actions.- Parameters:
selection
- the current selection- Since:
- 2.0
-
updateStatusLine
Deprecated, for removal: This API element is subject to removal in a future version.Updates the message shown in the status line.- Parameters:
selection
- the current selection
-
updateTitle
public void updateTitle()Deprecated, for removal: This API element is subject to removal in a future version.Updates the title text and title tool tip. Called whenever the input of the viewer changes. Called whenever the input of the viewer changes.- Since:
- 2.0
-
getActionGroup
Deprecated, for removal: This API element is subject to removal in a future version.Returns the action group.- Returns:
- the action group
-
getAdapter
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:WorkbenchPart
Returns an object which is an instance of the given class associated with this object. Returnsnull
if no such object can be found.Clients may implement this method but should generally call
Adapters.adapt(Object, Class, boolean)
rather than invoking it directly. 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).- Specified by:
getAdapter
in interfaceIAdaptable
- Overrides:
getAdapter
in classWorkbenchPart
- Type Parameters:
T
- the class type- Parameters:
adapter
- the adapter class to look up- Returns:
- a object of the given class,
or
null
if this object does not have an adapter for the given class
-
getShowInSource
Deprecated, for removal: This API element is subject to removal in a future version.Returns theIShowInSource
for this view. -
getShowInTarget
Deprecated, for removal: This API element is subject to removal in a future version.Returns theIShowInTarget
for this view. -
getSingleElement
Deprecated, for removal: This API element is subject to removal in a future version.Returns the selected element if the selection consists of a single element only.- Parameters:
s
- the selection- Returns:
- the selected first element or null
- Since:
- 3.5
-