public class AnnotationView
extends org.eclipse.ui.part.ViewPart
implements org.eclipse.jface.viewers.ISelectionProvider, org.eclipse.jface.action.IMenuListener, org.eclipse.emf.common.ui.viewer.IViewerProvider, org.eclipse.emf.edit.domain.IEditingDomainProvider
The view uses a label provider to define how model objects should be presented in the view. Each view can present the same model objects using different labels and icons, if needed. Alternatively, a single label provider can be shared between views in order to ensure that objects of the same type are presented in the same way everywhere.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID
The ID of the view as specified by the extension.
|
protected org.eclipse.ui.views.properties.PropertySheetPage |
propertySheetPage
This is the property sheet page.
|
protected org.eclipse.jface.viewers.ISelectionChangedListener |
selectionChangedListener
This listens to which ever viewer is active.
|
protected java.util.Collection<org.eclipse.jface.viewers.ISelectionChangedListener> |
selectionChangedListeners
This keeps track of all the
ISelectionChangedListener s that are
listening to this editor.
|
protected org.eclipse.jface.viewers.ISelection |
viewerSelection
This keeps track of the selection of the editor as a whole.
|
Constructor and Description |
---|
AnnotationView()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
This implements
ISelectionProvider |
protected void |
createContextMenuFor(org.eclipse.jface.viewers.StructuredViewer viewer)
This creates a context menu for the viewer and adds a listener as well
registering the menu for extension.
|
void |
createPartControl(org.eclipse.swt.widgets.Composite theParent)
This is a callback that will allow us to create the viewer and initialize
it.
|
void |
dispose() |
ViewActionBarContributor |
getActionBarContributor() |
org.eclipse.ui.IActionBars |
getActionBars() |
java.lang.Object |
getAdapter(java.lang.Class key)
This is how the framework determines which interfaces we implement.
|
org.eclipse.emf.edit.domain.EditingDomain |
getEditingDomain()
Return editing domain
|
protected org.eclipse.ui.views.properties.IPropertySheetPage |
getPropertySheetPage()
This accesses a cached version of the property sheet.
|
org.eclipse.jface.viewers.ISelection |
getSelection() |
org.eclipse.jface.viewers.Viewer |
getViewer() |
void |
menuAboutToShow(org.eclipse.jface.action.IMenuManager menuManager)
This implements
IMenuListener to help
fill the context menus with contributions from the Edit menu. |
void |
removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
This implements
ISelectionProvider |
void |
setFocus()
Passing the focus request to the viewer's control.
|
void |
setSelection(org.eclipse.jface.viewers.ISelection selection)
This implements
ISelectionProvider to
set this editor's overall selection. |
void |
setSelection(java.util.List<FileAnnotation> annotations) |
void |
setSelectionToViewer(java.util.Collection<?> collection)
This sets the selection into whichever viewer is active.
|
void |
updateView() |
checkSite, getViewSite, init, init, saveState, setContentDescription, setInitializationData, setPartName
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
public static final java.lang.String ID
protected org.eclipse.jface.viewers.ISelection viewerSelection
protected org.eclipse.jface.viewers.ISelectionChangedListener selectionChangedListener
protected java.util.Collection<org.eclipse.jface.viewers.ISelectionChangedListener> selectionChangedListeners
ISelectionChangedListener
s that are
listening to this editor. protected org.eclipse.ui.views.properties.PropertySheetPage propertySheetPage
public void createPartControl(org.eclipse.swt.widgets.Composite theParent)
createPartControl
in interface org.eclipse.ui.IWorkbenchPart
createPartControl
in class org.eclipse.ui.part.WorkbenchPart
public void setSelectionToViewer(java.util.Collection<?> collection)
public void addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
ISelectionProvider
.
addSelectionChangedListener
in interface org.eclipse.jface.viewers.ISelectionProvider
public ViewActionBarContributor getActionBarContributor()
public org.eclipse.ui.IActionBars getActionBars()
public void setFocus()
setFocus
in interface org.eclipse.ui.IWorkbenchPart
setFocus
in class org.eclipse.ui.part.WorkbenchPart
public void updateView()
protected void createContextMenuFor(org.eclipse.jface.viewers.StructuredViewer viewer)
public void dispose()
dispose
in interface org.eclipse.ui.IWorkbenchPart
dispose
in class org.eclipse.ui.part.WorkbenchPart
public java.lang.Object getAdapter(java.lang.Class key)
getAdapter
in interface org.eclipse.core.runtime.IAdaptable
getAdapter
in class org.eclipse.ui.part.WorkbenchPart
protected org.eclipse.ui.views.properties.IPropertySheetPage getPropertySheetPage()
public org.eclipse.emf.edit.domain.EditingDomain getEditingDomain()
getEditingDomain
in interface org.eclipse.emf.edit.domain.IEditingDomainProvider
public org.eclipse.jface.viewers.Viewer getViewer()
getViewer
in interface org.eclipse.emf.common.ui.viewer.IViewerProvider
public void menuAboutToShow(org.eclipse.jface.action.IMenuManager menuManager)
IMenuListener
to help
fill the context menus with contributions from the Edit menu.menuAboutToShow
in interface org.eclipse.jface.action.IMenuListener
public org.eclipse.jface.viewers.ISelection getSelection()
getSelection
in interface org.eclipse.jface.viewers.ISelectionProvider
public void removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
ISelectionProvider
.
removeSelectionChangedListener
in interface org.eclipse.jface.viewers.ISelectionProvider
public void setSelection(org.eclipse.jface.viewers.ISelection selection)
ISelectionProvider
to
set this editor's overall selection. Calling this result will notify the
listeners.setSelection
in interface org.eclipse.jface.viewers.ISelectionProvider
public void setSelection(java.util.List<FileAnnotation> annotations)