Class ScreenEditor

All Implemented Interfaces:
IActivationListener, IDraggingFix, IWorkbenchPartIZ, IPropertyEditorController, IPropUndoContext, ITermEditor, ITerminalStateListener, IPropUndoRedo, org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.jface.viewers.ISelectionChangedListener, org.eclipse.jface.viewers.ISelectionProvider, org.eclipse.ui.ide.IGotoMarker, org.eclipse.ui.IEditorPart, org.eclipse.ui.INavigationLocationProvider, org.eclipse.ui.IPersistable, org.eclipse.ui.IPersistableEditor, org.eclipse.ui.ISaveablePart, org.eclipse.ui.ISaveablesSource, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation

public class ScreenEditor extends PropEditorPart implements ITerminalStateListener, ITermEditor
The Terminal Screen Editor part.
Christopher Mindus
  • Field Details

    • ID

      public static final String ID
      The Part ID.
    • sessionNameQualifier

      public static final org.eclipse.core.runtime.QualifiedName sessionNameQualifier
      The Session Name Qualifier for files.
    • hostSession

      public HostSession hostSession
      The host session.
    • xPopupOffset

      public int xPopupOffset
      The popup offset in X.
    • yPopupOffset

      public int yPopupOffset
      The popup offset in Y.
  • Constructor Details

    • ScreenEditor

      public ScreenEditor()
      Eclipse constructor.
  • Method Details

    • initEditor

      protected void initEditor(PropCnr cnr) throws org.eclipse.ui.PartInitException
      The initialize editor method.

      Subclasses may override this method.

      initEditor in class PropEditorPart
      cnr - The property container being edited. Note: the real name of the property is in the parent FilePropCnr Atom.
      org.eclipse.ui.PartInitException - For initialization failures.
    • onEditorActivated

      protected void onEditorActivated(boolean on)
      Called when editor is activated. The time is stored so that focus events can check if they should be processed or not (marking in Terminal).
      onEditorActivated in class PropEditorPart
    • usePasteBeforeAfter

      protected boolean usePasteBeforeAfter()
      Override to return how paste before/after are processed.
      usePasteBeforeAfter in class PropEditorPart
      true to handle before/after.
    • isTooltipTextShown

      public boolean isTooltipTextShown()
      If tool tips are shown.
      Specified by:
      isTooltipTextShown in interface ITermEditor
    • isHotSpotEnabled

      public boolean isHotSpotEnabled()
      Check for hotspot enabled.
      Specified by:
      isHotSpotEnabled in interface ITermEditor
    • isCursorPresent

      public boolean isCursorPresent()
      Cursor present (and blinking)?
      Specified by:
      isCursorPresent in interface ITermEditor
    • getViewer

      public org.eclipse.jface.viewers.TreeViewer getViewer()
      Gets the viewer.
      Specified by:
      getViewer in interface ITermEditor
    • getHostSession

      public HostSession getHostSession()
      Gets the HostSession.
      Specified by:
      getHostSession in interface ITermEditor
    • onClose

      public void onClose()
      Called when the part is being closed but is not yet disposed but hidden.
      Specified by:
      onClose in interface IActivationListener
      onClose in class PropEditorPart
    • dispose

      public void dispose()
      Dispose of the editor.
      Specified by:
      dispose in interface org.eclipse.ui.IWorkbenchPart
      dispose in class PropEditorPart
    • createEditorComposite

      protected void createEditorComposite(org.eclipse.swt.widgets.Composite parent)
      Creates the Editor Main Composite.
      Specified by:
      createEditorComposite in class PropEditorPart
      parent - The empty parent composite without initialized layout, with the widget background color.
    • getMarkingConstraints

      public getMarkingConstraints()
      Gets the rectangle marking constraints. This is used for pop-up windows.
      Specified by:
      getMarkingConstraints in interface ITermEditor
      null If no constrains are present.
    • performPrint

      protected void performPrint()
      Performs Print.
      Specified by:
      performPrint in class PropEditorPart
    • onTerminalStateUpdate

      public void onTerminalStateUpdate(HostSession hostSession, TerminalWindow tw)
      Called when state probably needs update or check.
      Specified by:
      onTerminalStateUpdate in interface ITerminalStateListener
      hostSession - The host session, may be null.
      tw - The TerminalWindow, may be null when hostSession is null, not otherwise.
    • onTerminalFieldChanged

      public void onTerminalFieldChanged(HostSession hostSession, TerminalWindow tw)
      Called when the screen needs updates due to field change.
      Specified by:
      onTerminalFieldChanged in interface ITerminalStateListener
      hostSession - The host session, may be null.
      tw - The TerminalWindow, may be null when hostSession is null, not otherwise.
    • updateToolStates

      public void updateToolStates()
      Updates tool states.
      Specified by:
      updateToolStates in interface ITermEditor
    • saveStateImpl

      protected void saveStateImpl(org.eclipse.ui.IMemento memento)
      Saves the state.
      saveStateImpl in class PropEditorPart
      memento - The storage area for object's state.
    • getTerminalComposite

      public TerminalComposite getTerminalComposite()
      Gets the terminal composite.
      Specified by:
      getTerminalComposite in interface ITermEditor
    • selectionChangedEx

      protected void selectionChangedEx(org.eclipse.jface.viewers.SelectionChangedEvent event)
      Selection changes in the tree.
      selectionChangedEx in class PropEditorPart
    • updateStatesEx

      protected void updateStatesEx()
      Called to update the states.
      updateStatesEx in class PropEditorPart
    • doOpen

      public boolean doOpen(GProp<?>[] props)
      Opens the property by selecting it in focus.
      doOpen in class PropEditorPart
    • doOpen

      public boolean doOpen(GProp<?> prop, int index, String childName)
      Opens the property by selecting it in focus. This method must be overridden.
      doOpen in class PropEditorPart
      prop - The property to focus.
      index - The index in a multi-property.
      childName - Name of child property or null.
      true for success, false for failure.
    • onDoubleClick

      public void onDoubleClick(int x, int y)
      Marks the host field.
      Specified by:
      onDoubleClick in interface ITermEditor
    • paint

      public void paint(Graphics2D g, int leftMargin, int topMargin, int cxFont, int cyFont, int cxFontReal, int cyFontReal, int cxScreen, int cyScreen, clipRect)
      Paints the Graphics once the screen is drawn, before the cursor.
      Specified by:
      paint in interface ITermEditor