Class EditorSelector

All Implemented Interfaces:
IExtendsSelection, IPropDesigner, IPropUndoContext, EventListener, IClassReferenceOwnerUpdates, IGProp<GProp<?>[]>, IPropCnr, IReferencingPropCnr, ISelectorExpression, Cloneable, org.eclipse.core.runtime.IAdaptable

public class EditorSelector extends Selector implements IPropDesigner, IPropUndoContext, IExtendsSelection, IClassReferenceOwnerUpdates
This Selector property container for the Editor.
  • Constructor Details

    • EditorSelector

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

      public EditorSelector(Atom propertyAtom)
      Creates the screen identification 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 SelectorDesignerProp getDesigner()
      Gets the Designer Extension for Properties.
      Specified by:
      getDesigner in interface IPropDesigner
      Returns:
      The instance of the Designer Extension.
    • getUndoContext

      public org.eclipse.core.commands.operations.IUndoContext getUndoContext()
      Gets the undo context.
      Specified by:
      getUndoContext in interface IPropUndoContext
      Returns:
      The undo context for the Editor part(s) for this container.
    • clone

      public EditorSelector clone()
      Clone must be overridden.
      Overrides:
      clone in class Selector
    • createSelectorExpression

      protected EditorSelectorExpression createSelectorExpression(String expression)
      Creates the SelectorExpression, overridden by the Designer version of the class.
      Overrides:
      createSelectorExpression in class Selector
      Parameters:
      expression - The reference.
    • createClassReference

      protected EditorClassReference createClassReference(Atom atom, String ref)
      Creates a ClassReference, overridden by the Designer version of the class.
      Overrides:
      createClassReference in class Selector
      Parameters:
      atom - The atom name.
      ref - The reference.
    • createSelectorReference

      protected EditorSelectorReference createSelectorReference(Atom atom, String ref)
      Creates a SelectorReference, overridden by the Designer version of the class.
      Overrides:
      createSelectorReference in class Selector
      Parameters:
      atom - The atom name.
      ref - The reference.
    • getExtendsPossibleClasses

      public Class<?>[] getExtendsPossibleClasses()
      Gets the possible classes this container supports for the Extends Framework. The default implementation is to return null.
      Specified by:
      getExtendsPossibleClasses in interface IPropCnr
      Overrides:
      getExtendsPossibleClasses in class PropCnr
      Returns:
      List of supported classes, or null for none.
    • getSelectPropDialogTitle

      public String getSelectPropDialogTitle()
      Gets the title for selection dialog.
      Specified by:
      getSelectPropDialogTitle in interface IExtendsSelection
    • getSelectPropViewerFilter

      public org.eclipse.jface.viewers.ViewerFilter getSelectPropViewerFilter()
      Gets the viewer filter for the tree in the dialog for selecting extends property name.
      Specified by:
      getSelectPropViewerFilter in interface IExtendsSelection
    • onClassReferenceChanged

      public void onClassReferenceChanged(ClassReference classReference)
      Called when class reference changed.
      Specified by:
      onClassReferenceChanged in interface IClassReferenceOwnerUpdates
      Parameters:
      classReference - The class reference that changed.
    • onClassRefactored

      public void onClassRefactored(ClassReference classReference, String oldName, String newName)
      Called for class rename refactoring.
      Specified by:
      onClassRefactored in interface IClassReferenceOwnerUpdates
      Parameters:
      classReference - The class reference that changes.
      oldName - The old name.
      newName - The new name.
    • verify

      public boolean verify(PropVerification verification)
      Verifies this property container. The check performed is the extension of classes and that no circular reference is present.
      Specified by:
      verify in interface IGProp<GProp<?>[]>
      Overrides:
      verify in class Selector
      Parameters:
      verification - The property verification class.
      Returns:
      true if verification should proceed, false if disposed of and verification should not take place.
    • createDefaultSelectors

      public static List<EditorSelector> createDefaultSelectors(boolean doPerform, ModuleModel model) throws org.eclipse.core.runtime.CoreException
      Creates the default selectors for Phone, Tablet and Desktop.
      Parameters:
      doPerform - Flag to perform the operation or just to test it.
      model - The module model.
      Returns:
      The list of selectors to create or was created.
      Throws:
      org.eclipse.core.runtime.CoreException - For file errors.
    • createDefaultSelectorsForPhone

      public static List<EditorSelector> createDefaultSelectorsForPhone(boolean doPerform, ModuleModel model) throws org.eclipse.core.runtime.CoreException
      Creates the default selectors for Phone.
      Parameters:
      doPerform - Flag to perform the operation or just to test it.
      model - The module model.
      Returns:
      The list of selectors to create or was created.
      Throws:
      org.eclipse.core.runtime.CoreException - For file errors.
    • createDefaultSelectorsForTablet

      public static List<EditorSelector> createDefaultSelectorsForTablet(boolean doPerform, ModuleModel model) throws org.eclipse.core.runtime.CoreException
      Creates the default selectors for Tablet.
      Parameters:
      doPerform - Flag to perform the operation or just to test it.
      model - The module model.
      Returns:
      The list of selectors to create or was created.
      Throws:
      org.eclipse.core.runtime.CoreException - For file errors.
    • createDefaultSelectorsForDesktop

      public static List<EditorSelector> createDefaultSelectorsForDesktop(boolean doPerform, ModuleModel model) throws org.eclipse.core.runtime.CoreException
      Creates the default selectors for Desktop.
      Parameters:
      doPerform - Flag to perform the operation or just to test it.
      model - The module model.
      Returns:
      The list of selectors to create or was created.
      Throws:
      org.eclipse.core.runtime.CoreException - For file errors.