Class EditorSessionsProp

All Implemented Interfaces:
IPropDesigner, IPropUndoContext, EventListener, IGProp<GProp<?>[]>, IPropCnr, IServerApplicationSetup, IServerApplicationSetupPropCnr, Cloneable, org.eclipse.core.runtime.IAdaptable

public class EditorSessionsProp extends SessionsProp implements IPropDesigner, IPropUndoContext
This Sessions property container holds the terminal properties.
  • Field Details

  • Constructor Details

    • EditorSessionsProp

      public EditorSessionsProp()
      Creates the sessions property container without a name. The name must be set in all cases using the setPropertyAtom call.
    • EditorSessionsProp

      public EditorSessionsProp(Atom propertyAtom)
      Creates the sessions property container with the specified name. All system-reserved names for components begins with "$".
      Parameters:
      propertyAtom - the name of the component, unique within it's parent.
  • Method Details

    • getDesigner

      public TerminalDesignerProp getDesigner()
      Gets the Designer Extension for Properties.
      Specified by:
      getDesigner in interface IPropDesigner
      Returns:
      The instance of the Designer Extension.
    • isPropRoot

      public boolean isPropRoot()
      Check if this is the root property.
      Specified by:
      isPropRoot in interface IGProp<GProp<?>[]>
      Overrides:
      isPropRoot in class GProp<GProp<?>[]>
      Returns:
      true.
    • getPropRootPropMgr

      public PropMgr getPropRootPropMgr()
      Gets the Property Manager used for communication for the root container. If this is not the root container, the parent function is called upwards in tree.
      Specified by:
      getPropRootPropMgr in interface IGProp<GProp<?>[]>
      Overrides:
      getPropRootPropMgr in class GProp<GProp<?>[]>
      Returns:
      The Property Manager, or null when not attached to a root.
    • getRootName

      public String getRootName(GProp<?> requestor)
      Gets and checks if this container is the root. The name returned is in the Editor "module:" and in "" (empty string) when running in the Server.

      When running with assertions, this call throws an assertion error by default, showing that the call is directed to a non-root property container.

      Overrides:
      getRootName in class GProp<GProp<?>[]>
      Parameters:
      requestor - The requestor property.
      Returns:
      Name string if this is the root as "project:" for the Designer, and "" for the Server, null otherwise.
    • getRootFromName

      public PropCnr getRootFromName(GProp<?> requestor, String module)
      Gets the module root for a name. In the Editor, the module is the project, and that root container is returned. In the Server, the module doesn't matter, so the real root returns itself.

      When running with assertions, this call throws an assertion error by default, showing that the call is directed to a non-root property container.

      Overrides:
      getRootFromName in class GProp<GProp<?>[]>
      Parameters:
      requestor - The requestor property.
      module - The module name (without colon), i.e. the project name in the Designer.
      Returns:
      The root property container, or null if this container is not the root, or if the module name is not found. The default implementation returns null.
    • clone

      public EditorSessionsProp clone()
      Clone must be overridden.
      Overrides:
      clone in class SessionsProp
    • getPossibleChildren

      public Class<?>[] getPossibleChildren()
      Gets the acceptable children property classes that can be used in conjunction with e.g. a Paste operation.
      Specified by:
      getPossibleChildren in interface IPropCnr
      Overrides:
      getPossibleChildren in class PropCnr
      Returns:
      An array containing the classes of possible children, or null for no support.
    • getUndoContext

      public org.eclipse.core.commands.operations.IUndoContext getUndoContext()
      Gets the Undo Context.
      Specified by:
      getUndoContext in interface IPropUndoContext
      Returns:
      The undo context.
    • setSessionsConnectedState

      public void setSessionsConnectedState()
      Sets the states of connected sessions before e.g. a save operation.
    • getSessions

      public EditorTerminalProps[] getSessions()
      Gets all sessions.
      Overrides:
      getSessions in class SessionsProp
      Returns:
      The array of terminal properties configured.
    • onStartup

      public void onStartup()
      Called upon start of the terminal plug-in to perform session connect from a previous session.