Package com.iizigo.prop.editor
Class ReferencePropEditor<TARGET extends IPropCnr>
- java.lang.Object
- com.iizigo.prop.BaseEditor<AbstractReference<TARGET>,ReferenceString>
- com.iizigo.prop.editor.ReferencePropEditor<TARGET>
 
 
- All Implemented Interfaces:
- 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.- Author:
- Christopher Mindus
 
- Field Summary- Fields - Modifier and Type - Field - Description - protected int- alternateExpansionLevel- protected java.lang.Object- alternateSelection- protected java.lang.Class<?>[]- classes- protected org.eclipse.jface.viewers.ViewerFilter- filter- protected java.lang.Class<org.eclipse.jface.viewers.ViewerFilter>- filterClass- protected org.eclipse.swt.graphics.Image- image- protected IzMenu- menu- protected IzMenuItem- miGoto- protected IzMenuItem- miSelect- protected java.lang.String- SELECT_MESSAGE- protected java.lang.Object- selectionRootSelection root.- protected java.lang.String- TEXT_MESSAGEText message as tooltip text.- protected IzToolTip- tip- Fields inherited from class com.iizigo.prop.BaseEditor- appUI, combo, control, controller, definedButton, display, editor, focusListener, hasBeenModified, info, more, multipleValueWarningInput, options, parent, propController, shell, text, validator, wasDefinedAtFocusGained
 
 - Constructor Summary- Constructors - Constructor - Description - ReferencePropEditor()Default constructor called before createControls.
 - Method Summary- All Methods Instance Methods Concrete Methods - Modifier and Type - Method - Description - protected void- addDropSupport()Adds drop support for a control.- protected void- create()Creates the property editor controls.- java.lang.String- formatValue(ReferenceString value)Formats the value for user input as a String.- protected java.lang.String- getBaseReferencePath()Gets the relative base for reference parsing, i.e.- protected GProp<?>- getCurrentReferenceTarget()Gets the current property reference target.- ReferenceString- getDefaultValue()Gets the default defined value to set in the property when defined.- protected java.lang.String- getLookupPropReference(java.lang.String name)Creates the reference string to look-up from the ReferenceString.- protected java.lang.String- getToolTipText()Gets the tooltip text to display in the entry fields (not the one for property errors or validator).- protected ReferenceString- getValue(java.lang.String input)Gets the property value for a user input.- protected void- onCreateMenu(IzMenu menu, boolean isPost)Called to create the menu items.- protected void- onDoubleClick(org.eclipse.swt.widgets.Event e)Called when mouse is double-clicked in the text or combobox.- protected boolean- onGoto(boolean doPerform)Goto reference.- boolean- onList(boolean doPerform)Displays the listing selection dialog.- protected java.lang.String- setLookedUpReference(java.lang.String name)Sets the reference found that also has been validated.- protected void- setToolTipText(java.lang.String msg)Sets the tooltip text.- protected void- setup()Override to provide user settings.- Methods inherited from class com.iizigo.prop.BaseEditor- assignMaster, beginProcessEvent, canProcessEvents, checkInput, createCCombo, createControls, createGridLayout, createIzMenu, createMoreButton, createMoreIzMenu, createText, dispose, doUndefineIfEmpty, doValueChangeConversion, endProcessEvent, getBaseEditor, getCurrentInput, getCurrentValue, getCurrentValues, getModifyListener, getNativeToolTip, getOption, getSelectionListener, getSeverity, getShell, getToolTipText2, hasFocus, initialize, isPropReadOnly, onDefine, onDispose, onError, onF4List, onFocusGained, onFocusLost, onMore, onReadOnly, onUndefined, onUpdate, setColors, setCurrentValue, setEditable, setFocus, setInput, setInputValue, setInputValueFromProp, showMenu, updateTooltip, validate
 
 
- Field Detail- TEXT_MESSAGE- protected java.lang.String TEXT_MESSAGE Text message as tooltip text.
 - SELECT_MESSAGE- protected java.lang.String SELECT_MESSAGE 
 - image- protected org.eclipse.swt.graphics.Image image 
 - classes- protected java.lang.Class<?>[] classes 
 - filterClass- protected java.lang.Class<org.eclipse.jface.viewers.ViewerFilter> filterClass 
 - filter- protected org.eclipse.jface.viewers.ViewerFilter filter 
 - tip- protected IzToolTip tip 
 - menu- protected IzMenu menu 
 - miSelect- protected IzMenuItem miSelect 
 - miGoto- protected IzMenuItem miGoto 
 - selectionRoot- protected java.lang.Object selectionRoot Selection root.
 - alternateSelection- protected java.lang.Object alternateSelection 
 - alternateExpansionLevel- protected int alternateExpansionLevel 
 
 - Method Detail- create- protected void create() Creates the property editor controls.- Specified by:
- createin 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.- Overrides:
- onDoubleClickin class- BaseEditor<AbstractReference<TARGET extends IPropCnr>,ReferenceString>
 
 - getLookupPropReference- protected java.lang.String getLookupPropReference(java.lang.String name) Creates the reference string to look-up from the ReferenceString. Override this method for e.g. Base or Fixed Relative referencing.- Parameters:
- name- The reference name.
- Returns:
- The property reference string to look-up.
 
 - setLookedUpReference- protected java.lang.String setLookedUpReference(java.lang.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.- Parameters:
- name- The full reference.
- Returns:
- 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 java.lang.String getToolTipText() Gets the tooltip text to display in the entry fields (not the one for property errors or validator).- Specified by:
- getToolTipTextin 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:
- getDefaultValuein interface- IEditedPropControllerOwner<AbstractReference<TARGET extends IPropCnr>,ReferenceString>
- Specified by:
- getDefaultValuein class- BaseEditor<AbstractReference<TARGET extends IPropCnr>,ReferenceString>
 
 - getValue- protected ReferenceString getValue(java.lang.String input) Gets the property value for a user input.- Specified by:
- getValuein class- BaseEditor<AbstractReference<TARGET extends IPropCnr>,ReferenceString>
- Parameters:
- input- The current user input.
- Returns:
- The property value for the input, or null to un-define the property.
 
 - formatValue- public java.lang.String formatValue(ReferenceString value) Formats the value for user input as a String.- Specified by:
- formatValuein interface- IEditedPropControllerOwner<AbstractReference<TARGET extends IPropCnr>,ReferenceString>
- Specified by:
- formatValuein class- BaseEditor<AbstractReference<TARGET extends IPropCnr>,ReferenceString>
- Parameters:
- value- The value.
- Returns:
- The formatted value.
 
 - setToolTipText- protected void setToolTipText(java.lang.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. - Overrides:
- setToolTipTextin class- BaseEditor<AbstractReference<TARGET extends IPropCnr>,ReferenceString>
- Parameters:
- msg- Message in tooltip (normally error), null for none, in which case the getToolTipText2() is used.
 
 - getBaseReferencePath- protected java.lang.String getBaseReferencePath() Gets the relative base for reference parsing, i.e. the reference path of the base.- Returns:
- 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.