TPTP 4.4.0 Monitoring Tools Project
Internal API Specification

org.eclipse.tptp.symptom.internal.presentation
Class SymptomEditor

java.lang.Object
  extended byorg.eclipse.core.commands.common.EventManager
      extended byorg.eclipse.ui.part.WorkbenchPart
          extended byorg.eclipse.ui.part.EditorPart
              extended byorg.eclipse.ui.part.MultiPageEditorPart
                  extended byorg.eclipse.ui.forms.editor.FormEditor
                      extended byorg.eclipse.tptp.symptom.internal.presentation.AbstractSymptomEditor
                          extended byorg.eclipse.tptp.symptom.internal.presentation.SymptomEditor
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.emf.edit.domain.IEditingDomainProvider, org.eclipse.ui.IEditorPart, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.ide.IGotoMarker, org.eclipse.jface.action.IMenuListener, org.eclipse.jface.dialogs.IPageChangeProvider, org.eclipse.ui.ISaveablePart, org.eclipse.jface.viewers.ISelectionProvider, org.eclipse.emf.common.ui.viewer.IViewerProvider, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation

public class SymptomEditor
extends AbstractSymptomEditor
implements org.eclipse.jface.viewers.ISelectionProvider, org.eclipse.ui.ide.IGotoMarker

This is an example of a Symptom model editor.

Generated

Nested Class Summary
 class SymptomEditor.ReverseAdapterFactoryContentProvider
           
 
Field Summary
protected  org.eclipse.tptp.symptom.internal.presentation.SymptomEditor.ActivationListener activationListener
           
protected  org.eclipse.emf.edit.provider.ComposedAdapterFactory adapterFactory
          This is the one adapter factory used for providing views of the model
protected  org.eclipse.ui.views.contentoutline.IContentOutlinePage contentOutlinePage
          This is the content outline page
protected  org.eclipse.jface.action.IStatusLineManager contentOutlineStatusLineManager
          This is a kludge
protected  org.eclipse.jface.viewers.TreeViewer contentOutlineViewer
          This is the content outline page's viewer
protected  org.eclipse.jface.viewers.Viewer currentViewer
          This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer
protected  org.eclipse.emf.common.ui.ViewerPane currentViewerPane
          This keeps track of the active viewer pane, in the book
protected  org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain editingDomain
          This keeps track of the editing domain that is used to track all changes to the model
protected  org.eclipse.jface.viewers.ISelection editorSelection
          This keeps track of the selection of the editor as a whole
protected  MasterDetailsPage masterDetailsPage
           
protected  SymptomDBEditorOverviewPage overviewPage
           
protected  org.eclipse.ui.views.properties.PropertySheetPage propertySheetPage
          This is the property sheet page
protected  org.eclipse.core.resources.IResourceChangeListener resourceChangeListener
          This listens for workspace changes
protected  org.eclipse.jface.viewers.ISelectionChangedListener selectionChangedListener
          This listens to which ever viewer is active
protected  java.util.Collection selectionChangedListeners
          This keeps track of all the ISelectionChangedListeners that are listening to this editor
 
Fields inherited from class org.eclipse.ui.forms.editor.FormEditor
pages
 
Fields inherited from interface org.eclipse.ui.IEditorPart
PROP_DIRTY, PROP_INPUT
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
SymptomEditor()
          This creates a model editor
 
Method Summary
protected  void addPages()
           
 void addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
          This implements ISelectionProvider
protected  void closeFindDialog()
           
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 createModel()
          This is the method called to load a resource into the editing domain's resource set based on the editor's input
 void dispose()
           
 void doSave(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
          This is for implementing IEditorPart and simply saves the model file
 void doSaveAs()
          This also changes the editor's input
protected  void doSaveAs(org.eclipse.emf.common.util.URI uri, org.eclipse.ui.IEditorInput editorInput)
           
protected  void firePropertyChange(int action)
          This is here for the listener to be able to call it
 org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor getActionBarContributor()
           
 org.eclipse.ui.IActionBars getActionBars()
           
 int getActivePage()
           
 java.lang.Object getAdapter(java.lang.Class key)
          This is how the framework determines which interfaces we implement
 org.eclipse.emf.common.notify.AdapterFactory getAdapterFactory()
           
protected  org.eclipse.swt.widgets.Composite getContainer()
           
 org.eclipse.ui.views.contentoutline.IContentOutlinePage getContentOutlinePage()
          This accesses a cached version of the content outliner
 org.eclipse.emf.edit.domain.EditingDomain getEditingDomain()
          This returns the editing domain as required by the IEditingDomainProvider interface.
 org.eclipse.ui.IEditorInput getEditorInput()
           
 SymptomDBFindDialog getFindDialog()
           
 org.eclipse.jface.action.Action getGlobalFindActionHandler()
           
 MasterDetailsPage getMasterDetailsPage()
           
 org.eclipse.jface.viewers.TreeViewer getMasterPageViewer()
           
 int getOrientation()
           
 org.eclipse.ui.forms.IFormPart[] getParts()
           
 org.eclipse.ui.views.properties.IPropertySheetPage getPropertySheetPage()
          This accesses a cached version of the property sheet
 org.eclipse.jface.viewers.ISelection getSelection()
          This implements ISelectionProvider to return this editor's overall selection
 org.eclipse.jface.viewers.Viewer getViewer()
          This returns the viewer as required by the IViewerProvider interface
 void gotoMarker(org.eclipse.core.resources.IMarker marker)
           
protected  void handleActivate()
          Handles activation of the editor or it's associated views.
protected  void handleChangedResources()
          Handles what to do with changed resources on activation.
 void handleContentOutlineSelection(org.eclipse.jface.viewers.ISelection selection)
          This deals with how we want selection in the outliner to affect the other views
protected  boolean handleDirtyConflict()
          Shows a dialog that asks if conflicting changes should be discarded.
protected  void handleRemovedResources()
           
protected  void handleResourceRemoved()
           
protected  void hideTabs()
          If there is just one page in the multi-page editor part, this hides the single tab at the bottom
 void init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput editorInput)
          This is called during startup
 boolean isBiDi()
           
 boolean isDirty()
          This is for implementing IEditorPart and simply tests the command stack
 boolean isSaveAsAllowed()
           
 void menuAboutToShow(org.eclipse.jface.action.IMenuManager menuManager)
          This implements IMenuListener to help fill the context menus with contributions from the Edit menu
protected  void pageChange(int pageIndex)
          This is used to track the active viewer
protected  void refresh(java.lang.Object element)
           
 void removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
          This implements ISelectionProvider
protected  void revealObject(java.lang.Object object)
           
 void setCurrentViewer(org.eclipse.jface.viewers.Viewer viewer)
          This makes sure that one content viewer, either for the current page or the outline view, if it has focus, is the current one
 void setCurrentViewerPane(org.eclipse.emf.common.ui.ViewerPane viewerPane)
           
 void setFocus()
           
 void setGlobalFindActionHandler(org.eclipse.jface.action.Action action)
           
 void setSelection(org.eclipse.jface.viewers.ISelection selection)
          This implements ISelectionProvider to set this editor's overall selection.
 void setSelectionToViewer(java.util.Collection collection)
          This sets the selection into whichever viewer is active
protected  void setSelectionToViewer(org.eclipse.emf.common.command.Command mostRecentCommand)
           
 void setStatusLineManager(org.eclipse.jface.viewers.ISelection selection)
           
 void updatePageInfo()
           
 
Methods inherited from class org.eclipse.tptp.symptom.internal.presentation.AbstractSymptomEditor
setActivePage
 
Methods inherited from class org.eclipse.ui.forms.editor.FormEditor
addPage, addPage, addPage, addPage, addPage, addPage, addPageChangedListener, close, commitPages, configurePage, createPageContainer, createPages, createToolkit, editorDirtyStateChanged, findPage, getActiveEditor, getActivePageInstance, getCurrentPage, getSelectedPage, getToolkit, removePage, removePageChangedListener, selectReveal, setActivePage, setActivePage, updateActionBarContributor
 
Methods inherited from class org.eclipse.ui.part.MultiPageEditorPart
createPartControl, createSite, findEditors, getControl, getEditor, getPageCount, getPageImage, getPageText, handlePropertyChange, setActiveEditor, setControl, setPageImage, setPageText
 
Methods inherited from class org.eclipse.ui.part.EditorPart
checkSite, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInput, setInputWithNotify, setPartName
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, getConfigurationElement, getContentDescription, getDefaultImage, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, 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.IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleImage, removePropertyListener
 

Field Detail

editingDomain

protected org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain editingDomain
This keeps track of the editing domain that is used to track all changes to the model.

Generated

adapterFactory

protected org.eclipse.emf.edit.provider.ComposedAdapterFactory adapterFactory
This is the one adapter factory used for providing views of the model.

Generated

contentOutlinePage

protected org.eclipse.ui.views.contentoutline.IContentOutlinePage contentOutlinePage
This is the content outline page.

Generated

contentOutlineStatusLineManager

protected org.eclipse.jface.action.IStatusLineManager contentOutlineStatusLineManager
This is a kludge...

Generated

contentOutlineViewer

protected org.eclipse.jface.viewers.TreeViewer contentOutlineViewer
This is the content outline page's viewer.

Generated

propertySheetPage

protected org.eclipse.ui.views.properties.PropertySheetPage propertySheetPage
This is the property sheet page.

Generated

currentViewerPane

protected org.eclipse.emf.common.ui.ViewerPane currentViewerPane
This keeps track of the active viewer pane, in the book.

Generated

currentViewer

protected org.eclipse.jface.viewers.Viewer currentViewer
This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer.

Generated

selectionChangedListener

protected org.eclipse.jface.viewers.ISelectionChangedListener selectionChangedListener
This listens to which ever viewer is active.

Generated

selectionChangedListeners

protected java.util.Collection selectionChangedListeners
This keeps track of all the ISelectionChangedListeners that are listening to this editor.

Generated

editorSelection

protected org.eclipse.jface.viewers.ISelection editorSelection
This keeps track of the selection of the editor as a whole.

Generated

activationListener

protected org.eclipse.tptp.symptom.internal.presentation.SymptomEditor.ActivationListener activationListener

resourceChangeListener

protected org.eclipse.core.resources.IResourceChangeListener resourceChangeListener
This listens for workspace changes.

Generated

masterDetailsPage

protected MasterDetailsPage masterDetailsPage

overviewPage

protected SymptomDBEditorOverviewPage overviewPage
Constructor Detail

SymptomEditor

public SymptomEditor()
This creates a model editor.

Generated
NOT
Method Detail

handleActivate

protected void handleActivate()
Handles activation of the editor or it's associated views.

Generated
NOT

handleChangedResources

protected void handleChangedResources()
Handles what to do with changed resources on activation.

Generated
NOT

handleDirtyConflict

protected boolean handleDirtyConflict()
Shows a dialog that asks if conflicting changes should be discarded.

Generated

handleResourceRemoved

protected void handleResourceRemoved()

handleRemovedResources

protected void handleRemovedResources()

firePropertyChange

protected void firePropertyChange(int action)
This is here for the listener to be able to call it.

Generated

setSelectionToViewer

public void setSelectionToViewer(java.util.Collection collection)
This sets the selection into whichever viewer is active.

Specified by:
setSelectionToViewer in class AbstractSymptomEditor
Generated
NOT

revealObject

protected void revealObject(java.lang.Object object)
Parameters:
object -

getEditingDomain

public org.eclipse.emf.edit.domain.EditingDomain getEditingDomain()
This returns the editing domain as required by the IEditingDomainProvider interface. This is important for implementing the static methods of AdapterFactoryEditingDomain and for supporting CommandAction.

Specified by:
getEditingDomain in interface org.eclipse.emf.edit.domain.IEditingDomainProvider
Generated

setCurrentViewerPane

public void setCurrentViewerPane(org.eclipse.emf.common.ui.ViewerPane viewerPane)

Generated

setCurrentViewer

public void setCurrentViewer(org.eclipse.jface.viewers.Viewer viewer)
This makes sure that one content viewer, either for the current page or the outline view, if it has focus, is the current one.

Generated

getViewer

public org.eclipse.jface.viewers.Viewer getViewer()
This returns the viewer as required by the IViewerProvider interface.

Specified by:
getViewer in interface org.eclipse.emf.common.ui.viewer.IViewerProvider
Generated

createContextMenuFor

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.

Generated
NOT

createModel

public void createModel()
This is the method called to load a resource into the editing domain's resource set based on the editor's input.

Generated

hideTabs

protected void hideTabs()
If there is just one page in the multi-page editor part, this hides the single tab at the bottom.

Generated

pageChange

protected void pageChange(int pageIndex)
This is used to track the active viewer.

Generated
NOT

getAdapter

public java.lang.Object getAdapter(java.lang.Class key)
This is how the framework determines which interfaces we implement.

Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdaptable
Generated

getContentOutlinePage

public org.eclipse.ui.views.contentoutline.IContentOutlinePage getContentOutlinePage()
This accesses a cached version of the content outliner.

Generated
NOT

getPropertySheetPage

public org.eclipse.ui.views.properties.IPropertySheetPage getPropertySheetPage()
This accesses a cached version of the property sheet.

Generated
NOT

handleContentOutlineSelection

public void handleContentOutlineSelection(org.eclipse.jface.viewers.ISelection selection)
This deals with how we want selection in the outliner to affect the other views.

Generated
NOT

isDirty

public boolean isDirty()
This is for implementing IEditorPart and simply tests the command stack.

Specified by:
isDirty in interface org.eclipse.ui.ISaveablePart
Generated

doSave

public void doSave(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
This is for implementing IEditorPart and simply saves the model file.

Specified by:
doSave in interface org.eclipse.ui.ISaveablePart
Generated
NOT

isSaveAsAllowed

public boolean isSaveAsAllowed()
Specified by:
isSaveAsAllowed in interface org.eclipse.ui.ISaveablePart
Generated
NOT

doSaveAs

public void doSaveAs()
This also changes the editor's input.

Specified by:
doSaveAs in interface org.eclipse.ui.ISaveablePart
Generated
NOT

doSaveAs

protected void doSaveAs(org.eclipse.emf.common.util.URI uri,
                        org.eclipse.ui.IEditorInput editorInput)

Generated

gotoMarker

public void gotoMarker(org.eclipse.core.resources.IMarker marker)

Specified by:
gotoMarker in interface org.eclipse.ui.ide.IGotoMarker
Generated

init

public void init(org.eclipse.ui.IEditorSite site,
                 org.eclipse.ui.IEditorInput editorInput)
          throws org.eclipse.ui.PartInitException
This is called during startup.

Specified by:
init in interface org.eclipse.ui.IEditorPart
Throws:
org.eclipse.ui.PartInitException
Generated

setFocus

public void setFocus()

Specified by:
setFocus in interface org.eclipse.ui.IWorkbenchPart
Generated

addSelectionChangedListener

public void addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
This implements ISelectionProvider.

Specified by:
addSelectionChangedListener in interface org.eclipse.jface.viewers.ISelectionProvider
Generated

removeSelectionChangedListener

public void removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
This implements ISelectionProvider.

Specified by:
removeSelectionChangedListener in interface org.eclipse.jface.viewers.ISelectionProvider
Generated

getSelection

public org.eclipse.jface.viewers.ISelection getSelection()
This implements ISelectionProvider to return this editor's overall selection.

Specified by:
getSelection in interface org.eclipse.jface.viewers.ISelectionProvider
Generated

setSelection

public void setSelection(org.eclipse.jface.viewers.ISelection selection)
This implements ISelectionProvider to set this editor's overall selection. Calling this result will notify the listeners.

Specified by:
setSelection in interface org.eclipse.jface.viewers.ISelectionProvider
Generated

setStatusLineManager

public void setStatusLineManager(org.eclipse.jface.viewers.ISelection selection)

Generated
NOT

menuAboutToShow

public void menuAboutToShow(org.eclipse.jface.action.IMenuManager menuManager)
This implements IMenuListener to help fill the context menus with contributions from the Edit menu.

Specified by:
menuAboutToShow in interface org.eclipse.jface.action.IMenuListener
Generated

getActionBarContributor

public org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor getActionBarContributor()

Generated

getActionBars

public org.eclipse.ui.IActionBars getActionBars()

Generated

getAdapterFactory

public org.eclipse.emf.common.notify.AdapterFactory getAdapterFactory()

Specified by:
getAdapterFactory in class AbstractSymptomEditor
Generated

dispose

public void dispose()

Specified by:
dispose in interface org.eclipse.ui.IWorkbenchPart
Generated
NOT

closeFindDialog

protected void closeFindDialog()

addPages

protected void addPages()

setSelectionToViewer

protected void setSelectionToViewer(org.eclipse.emf.common.command.Command mostRecentCommand)

refresh

protected void refresh(java.lang.Object element)
Parameters:
element -

getFindDialog

public SymptomDBFindDialog getFindDialog()

getContainer

protected org.eclipse.swt.widgets.Composite getContainer()

getMasterDetailsPage

public MasterDetailsPage getMasterDetailsPage()
Returns:
Returns the masterDetailsPage.

updatePageInfo

public void updatePageInfo()

getGlobalFindActionHandler

public org.eclipse.jface.action.Action getGlobalFindActionHandler()

setGlobalFindActionHandler

public void setGlobalFindActionHandler(org.eclipse.jface.action.Action action)

getOrientation

public int getOrientation()
Specified by:
getOrientation in interface org.eclipse.ui.part.IWorkbenchPartOrientation

getParts

public org.eclipse.ui.forms.IFormPart[] getParts()
Specified by:
getParts in class AbstractSymptomEditor

getMasterPageViewer

public org.eclipse.jface.viewers.TreeViewer getMasterPageViewer()
Specified by:
getMasterPageViewer in class AbstractSymptomEditor

getActivePage

public int getActivePage()

isBiDi

public boolean isBiDi()

getEditorInput

public org.eclipse.ui.IEditorInput getEditorInput()
Specified by:
getEditorInput in interface org.eclipse.ui.IEditorPart

TPTP 4.4.0 Monitoring Tools Project
Internal API Specification