uk.ac.kcl.cch.jb.pliny.views
Class ResourceExplorerView
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.ViewPart
uk.ac.kcl.cch.jb.pliny.views.ResourceExplorerView
- All Implemented Interfaces:
- org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.IPersistable, IResourceTreeView, org.eclipse.ui.IViewPart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.part.IWorkbenchPartOrientation
- public class ResourceExplorerView
- extends org.eclipse.ui.part.ViewPart
- implements IResourceTreeView
the Eclipse ViewPart for the Resource Explorer.
The Resource Explorer uses a JFace TreeViewer for most of its
work. A set of objects beginning with
ResourceExplorerRoot
represent the model for the TreeViewer.
Note that although this code is note a GEF application, it uses
GEF's command stack to manage actions, and make them undoable.
- Author:
- John Bradley
| Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
PROP_TITLE |
| Methods inherited from class org.eclipse.ui.part.ViewPart |
checkSite, getViewSite, init, init, saveState, setContentDescription, setInitializationData, setPartName |
| Methods inherited from class org.eclipse.ui.part.WorkbenchPart |
addPropertyListener, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, 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, init, saveState |
| Methods inherited from interface org.eclipse.ui.IWorkbenchPart |
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
getAdapter |
NAME_ID
public static final String NAME_ID
- See Also:
- Constant Field Values
ResourceExplorerView
public ResourceExplorerView()
getCommandStack
public org.eclipse.gef.commands.CommandStack getCommandStack()
- Description copied from interface:
IResourceTreeView
- returns the view's CommandStack.
- Specified by:
getCommandStack in interface IResourceTreeView
- Returns:
- CommandStack for the view.
dispose
public void dispose()
- Specified by:
dispose in interface org.eclipse.ui.IWorkbenchPart
createPartControl
public void createPartControl(org.eclipse.swt.widgets.Composite parent)
- Specified by:
createPartControl in interface org.eclipse.ui.IWorkbenchPart
handleKeyReleased
protected void handleKeyReleased(org.eclipse.swt.events.KeyEvent event)
fillContextMenu
protected void fillContextMenu(org.eclipse.jface.action.IMenuManager manager)
getMyViewer
public org.eclipse.jface.viewers.TreeViewer getMyViewer()
- Description copied from interface:
IResourceTreeView
- return the main tree viewer that displays items in this View.
- Specified by:
getMyViewer in interface IResourceTreeView
- Returns:
- the main TreeViewer.
setFocus
public void setFocus()
- Specified by:
setFocus in interface org.eclipse.ui.IWorkbenchPart
getSelectedBaseObjects
public Vector getSelectedBaseObjects()
getSelectedResourceExplorerItems
public Vector getSelectedResourceExplorerItems()
- Description copied from interface:
IResourceTreeView
- returns a Vector containing instances of
IResourceExplorerItems that are currently selected by
the user.
- Specified by:
getSelectedResourceExplorerItems in interface IResourceTreeView
- Returns:
- a Vector of IResourceExplorerItems.
getSelectedObjectsToOpen
public Vector getSelectedObjectsToOpen()
- Description copied from interface:
IResourceTreeView
- returns a Vector containing Pliny Model elements that are selected
and ready to open in their own editors. This code needs to contain
special handling code to take care of the special needs of items
under the 'DisplayedIn' category.
- Specified by:
getSelectedObjectsToOpen in interface IResourceTreeView
- Returns:
- Vector of Pliny Model elements