Class ReferencePropEditor<TARGET extends IPropCnr>

All Implemented Interfaces:
IThemeListener, IEditedPropControllerOwner<AbstractReference<TARGET>,ReferenceString>, IEditedPropertyEntry<AbstractReference<TARGET>,ReferenceString>, IEditedPropertyEntryMultiProp<AbstractReference<TARGET>,ReferenceString>, IPropertyDefined
Direct Known Subclasses:
BaseReferencePropEditor, ImageReferencePropEditor, VSParticipantEditor, VSReferencePropEditor

public class ReferencePropEditor<TARGET extends IPropCnr> extends BaseEditor<AbstractReference<TARGET>,ReferenceString>
The Reference property editor consists of a simple entry field and a more button. It states it's using StringProp, but it's rather the subclass of it, e.g. VSReference, etc, as this property editor can handle any "simple" string reference.
Christopher Mindus
  • Field Details


      protected String TEXT_MESSAGE
      Text message as tooltip text.

      protected String SELECT_MESSAGE
    • image

      protected image
    • classes

      protected Class<?>[] classes
    • filterClass

      protected Class<org.eclipse.jface.viewers.ViewerFilter> filterClass
    • filter

      protected org.eclipse.jface.viewers.ViewerFilter filter
    • tip

      protected IzToolTip tip
    • miSelect

      protected IzMenuItem miSelect
    • miGoto

      protected IzMenuItem miGoto
    • selectionRoot

      protected Object selectionRoot
      Selection root.
    • alternateSelection

      protected Object alternateSelection
    • alternateExpansionLevel

      protected int alternateExpansionLevel
  • Constructor Details

    • ReferencePropEditor

      public ReferencePropEditor()
      Default constructor called before createControls.
  • Method Details

    • create

      protected void create()
      Creates the property editor controls.
      Specified by:
      create in class BaseEditor<AbstractReference<TARGET extends IPropCnr>,ReferenceString>
    • setup

      protected void setup()
      Override to provide user settings.
    • onCreateMenu

      protected void onCreateMenu(IzMenu menu, boolean isPost)
      Called to create the menu items.
    • onDoubleClick

      protected void onDoubleClick(org.eclipse.swt.widgets.Event e)
      Called when mouse is double-clicked in the text or combobox. Overridden to check if Goto reference is enabled, and if so goes there.
      onDoubleClick in class BaseEditor<AbstractReference<TARGET extends IPropCnr>,ReferenceString>
    • getLookupPropReference

      protected String getLookupPropReference(String name)
      Creates the reference string to look-up from the ReferenceString. Override this method for e.g. Base or Fixed Relative referencing.
      name - The reference name.
      The property reference string to look-up.
    • setLookedUpReference

      protected String setLookedUpReference(String name)
      Sets the reference found that also has been validated. This method gives the opportunity for a subclass to remove e.g. the Base or Fixed Relative reference from the string start.
      name - The full reference.
      The reference to set in this property as ReferenceString.
    • onList

      public boolean onList(boolean doPerform)
      Displays the listing selection dialog.
    • onGoto

      protected boolean onGoto(boolean doPerform)
      Goto reference.
    • getToolTipText

      protected String getToolTipText()
      Gets the tooltip text to display in the entry fields (not the one for property errors or validator).
      Specified by:
      getToolTipText in class BaseEditor<AbstractReference<TARGET extends IPropCnr>,ReferenceString>
    • getDefaultValue

      public ReferenceString getDefaultValue()
      Gets the default defined value to set in the property when defined.
      Specified by:
      getDefaultValue in interface IEditedPropControllerOwner<AbstractReference<TARGET extends IPropCnr>,ReferenceString>
      Specified by:
      getDefaultValue in class BaseEditor<AbstractReference<TARGET extends IPropCnr>,ReferenceString>
    • getValue

      protected ReferenceString getValue(String input)
      Gets the property value for a user input.
      Specified by:
      getValue in class BaseEditor<AbstractReference<TARGET extends IPropCnr>,ReferenceString>
      input - The current user input.
      The property value for the input, or null to un-define the property.
    • formatValue

      public String formatValue(ReferenceString value)
      Formats the value for user input as a String.
      Specified by:
      formatValue in interface IEditedPropControllerOwner<AbstractReference<TARGET extends IPropCnr>,ReferenceString>
      Specified by:
      formatValue in class BaseEditor<AbstractReference<TARGET extends IPropCnr>,ReferenceString>
      value - The value.
      The formatted value.
    • setToolTipText

      protected void setToolTipText(String msg)
      Sets the tooltip text. The default is to apply the getToolTipText() text to the edit control.

      An attempt to show the tooltip of the reference target's DesignerProp tooltip is done.

      setToolTipText in class BaseEditor<AbstractReference<TARGET extends IPropCnr>,ReferenceString>
      msg - Message in tooltip (normally error), null for none, in which case the getToolTipText2() is used.
    • getBaseReferencePath

      protected String getBaseReferencePath()
      Gets the relative base for reference parsing, i.e. the reference path of the base.
      null if non-relative.
    • getCurrentReferenceTarget

      protected GProp<?> getCurrentReferenceTarget()
      Gets the current property reference target. This reference is retrieved from the current input. If the path contains "Module:/", it is assumed to be a hard path. Otherwise the getBaseReferencePath() is prepended.
    • addDropSupport

      protected void addDropSupport()
      Adds drop support for a control.