Class CasEditorView

java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.ViewPart
org.eclipse.ui.part.PageBookView
org.apache.uima.caseditor.editor.CasEditorView
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.IPartListener, org.eclipse.ui.IPersistable, org.eclipse.ui.IViewPart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation
Direct Known Subclasses:
AnnotationStyleView, EditView, FeatureStructureBrowserView

public abstract class CasEditorView extends org.eclipse.ui.part.PageBookView
Base class for views which show information about the CAS opened in the editor.

The view page created with doCreatePage(ICasEditor) will be disposed and re-created on every Cas Editor input change or CAS view change.

In the case the view should no be re-created on a CAS view change isRecreatePageOnCASViewSwitch() must be overridden and return false.

  • Nested Class Summary

    Nested classes/interfaces inherited from class org.eclipse.ui.part.PageBookView

    org.eclipse.ui.part.PageBookView.PageRec, org.eclipse.ui.part.PageBookView.SelectionProvider
  • Field Summary

    Fields inherited from interface org.eclipse.ui.IWorkbenchPart

    PROP_TITLE
  • Constructor Summary

    Constructors
    Constructor
    Description
    CasEditorView(String editorNotAvailableMessage)
    Instantiates a new cas editor view.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.eclipse.ui.part.IPage
    createDefaultPage(org.eclipse.ui.part.PageBook book)
     
    void
     
    protected abstract org.eclipse.ui.part.IPageBookViewPage
    Do create page.
    protected final org.eclipse.ui.part.PageBookView.PageRec
    doCreatePage(org.eclipse.ui.IWorkbenchPart part)
     
    protected void
    doDestroyPage(org.eclipse.ui.IWorkbenchPart part, org.eclipse.ui.part.PageBookView.PageRec pageRecord)
     
    protected org.eclipse.ui.IWorkbenchPart
     
    protected boolean
    isImportant(org.eclipse.ui.IWorkbenchPart part)
     
    protected boolean
    Implementors should overwrite if they want that.
    void
    partBroughtToTop(org.eclipse.ui.IWorkbenchPart part)
    Look at IPartListener.partBroughtToTop(IWorkbenchPart).

    Methods inherited from class org.eclipse.ui.part.PageBookView

    createPartControl, doesPageExist, getAdapter, getCurrentContributingPart, getCurrentPage, getDefaultPage, getPageBook, getPageRec, getPageRec, getPageSite, getSelectionProvider, getViewAdapter, init, initPage, partActivated, partClosed, partDeactivated, partHidden, partOpened, partVisible, 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

    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.IWorkbenchPart

    addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
  • Constructor Details

    • CasEditorView

      public CasEditorView(String editorNotAvailableMessage)
      Instantiates a new cas editor view.
      Parameters:
      editorNotAvailableMessage - the editor not available message
  • Method Details

    • isRecreatePageOnCASViewSwitch

      protected boolean isRecreatePageOnCASViewSwitch()
      Implementors should overwrite if they want that. Default is false.

      Note:
      The implementation uses the ICasDocumentListener.viewChanged event to recognize view changes. If the view implementation also listens for this event the view might already be disposed when the listener is called. It is therefore strongly recommended either to listen for the event and update the view or don't list for the event and rely on a page re-creation.

      Returns:
      true if page should be disposed/re-created on CAS view change, or false if not.
    • createDefaultPage

      protected org.eclipse.ui.part.IPage createDefaultPage(org.eclipse.ui.part.PageBook book)
      Specified by:
      createDefaultPage in class org.eclipse.ui.part.PageBookView
    • doCreatePage

      protected abstract org.eclipse.ui.part.IPageBookViewPage doCreatePage(ICasEditor editor)
      Do create page.
      Parameters:
      editor - the editor
      Returns:
      the i page book view page
    • doCreatePage

      protected final org.eclipse.ui.part.PageBookView.PageRec doCreatePage(org.eclipse.ui.IWorkbenchPart part)
      Specified by:
      doCreatePage in class org.eclipse.ui.part.PageBookView
    • getBootstrapPart

      protected org.eclipse.ui.IWorkbenchPart getBootstrapPart()
      Specified by:
      getBootstrapPart in class org.eclipse.ui.part.PageBookView
    • doDestroyPage

      protected void doDestroyPage(org.eclipse.ui.IWorkbenchPart part, org.eclipse.ui.part.PageBookView.PageRec pageRecord)
      Specified by:
      doDestroyPage in class org.eclipse.ui.part.PageBookView
    • isImportant

      protected boolean isImportant(org.eclipse.ui.IWorkbenchPart part)
      Specified by:
      isImportant in class org.eclipse.ui.part.PageBookView
    • partBroughtToTop

      public void partBroughtToTop(org.eclipse.ui.IWorkbenchPart part)
      Look at IPartListener.partBroughtToTop(IWorkbenchPart).
      Specified by:
      partBroughtToTop in interface org.eclipse.ui.IPartListener
      Overrides:
      partBroughtToTop in class org.eclipse.ui.part.PageBookView
      Parameters:
      part - the part
    • dispose

      public void dispose()
      Specified by:
      dispose in interface org.eclipse.ui.IWorkbenchPart
      Overrides:
      dispose in class org.eclipse.ui.part.PageBookView