uk.ac.kcl.cch.jb.pliny.views
Class AnnotationView
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.ViewPart
org.eclipse.ui.part.PageBookView
uk.ac.kcl.cch.jb.pliny.views.AnnotationView
- All Implemented Interfaces:
- org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.IPartListener, org.eclipse.ui.IPersistable, IResourceDrivenPart, org.eclipse.ui.IViewPart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.part.IWorkbenchPartOrientation
- public class AnnotationView
- extends org.eclipse.ui.part.PageBookView
- implements IResourceDrivenPart
This is an PageBookView that manages Pliny's Annnotation View.
With PageBookViews, Eclipse provides a linking mechanism between the
main editor pane and this view so that is notified each
time the user changes to a new Editor on a new Object, and can change
its display to synchronize with the editor pane's focus.
Specifially w.r.t. this AnnotationView, for those
objects that are Pliny
Resource
s it can generate its display.
As all PageBookViews are supposed to do, it creates one instance of
AnnotationViewPage
for
each Resource it is given during its operation, and (by means of
inherited code) will switch between them as the user switches betwee
different Pliny Resources.
Much of the code to generate the display and lay out the data
is recycled from the example project com.realpersist.gef.schemaeditor
.
We thank the authors of this project for their example. The code here
does not, however, actually inherit any code from this project, and it need
not be included in the build path for this item to work.
- Author:
- John Bradley
- See Also:
AnnotationViewPage
,
PageBookView
Nested classes inherited from class org.eclipse.ui.part.PageBookView |
org.eclipse.ui.part.PageBookView.PageRec, org.eclipse.ui.part.PageBookView.SelectionProvider |
Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
PROP_TITLE |
Methods inherited from class org.eclipse.ui.part.PageBookView |
createPartControl, doesPageExist, getCurrentContributingPart, getCurrentPage, getDefaultPage, getPageBook, getPageRec, getPageRec, getPageSite, getSelectionProvider, getViewAdapter, init, initPage, partBroughtToTop, partClosed, partOpened, setFocus, showPageRec |
Methods inherited from class org.eclipse.ui.part.ViewPart |
checkSite, getViewSite, init, saveState, setContentDescription, setInitializationData, setPartName |
Methods inherited from class org.eclipse.ui.part.WorkbenchPart |
addPropertyListener, firePropertyChange, 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.IWorkbenchPart |
addPropertyListener, createPartControl, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, setFocus |
AnnotationView
public AnnotationView()
dispose
public void dispose()
- Specified by:
dispose
in interface org.eclipse.ui.IWorkbenchPart
createDefaultPage
protected org.eclipse.ui.part.IPage createDefaultPage(org.eclipse.ui.part.PageBook book)
doCreatePage
protected org.eclipse.ui.part.PageBookView.PageRec doCreatePage(org.eclipse.ui.IWorkbenchPart part)
partActivated
public void partActivated(org.eclipse.ui.IWorkbenchPart part)
- Specified by:
partActivated
in interface org.eclipse.ui.IPartListener
partDeactivated
public void partDeactivated(org.eclipse.ui.IWorkbenchPart part)
- Specified by:
partDeactivated
in interface org.eclipse.ui.IPartListener
doDestroyPage
protected void doDestroyPage(org.eclipse.ui.IWorkbenchPart part,
org.eclipse.ui.part.PageBookView.PageRec pageRecord)
getBootstrapPart
protected org.eclipse.ui.IWorkbenchPart getBootstrapPart()
isImportant
protected boolean isImportant(org.eclipse.ui.IWorkbenchPart part)
getAdapter
public Object getAdapter(Class adapter)
- Specified by:
getAdapter
in interface org.eclipse.core.runtime.IAdaptable
getMyResource
public Resource getMyResource()
- Description copied from interface:
IResourceDrivenPart
- returns the Resource that this part is currently using as its input.
- Specified by:
getMyResource
in interface IResourceDrivenPart
- Returns:
- Resource
refreshPart
public void refreshPart(org.eclipse.ui.IWorkbenchPart part)