Package com.iizigo.prop.editor
Class MethodReferencePropEditor
- java.lang.Object
- com.iizigo.prop.BaseEditor<EditorMethodReference,java.lang.String>
- com.iizigo.prop.editor.MethodReferencePropEditor
- All Implemented Interfaces:
IEditedPropControllerOwner<EditorMethodReference,java.lang.String>,IEditedPropertyEntry<EditorMethodReference,java.lang.String>,IEditedPropertyEntryMultiProp<EditorMethodReference,java.lang.String>,IPropertyDefined
public class MethodReferencePropEditor extends BaseEditor<EditorMethodReference,java.lang.String>
The Method Reference property editor consists of a simple entry field.- Author:
- Christopher Mindus
Field Summary
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 MethodReferencePropEditor()Default constructor called before createControls.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddAnnotation()Implement interface or annotation.protected voidcreate()Creates the property editor controls.protected voidcreateJava()Creates a new Java class.java.lang.StringformatValue(java.lang.String value)Formats the value for user input as a String.java.lang.StringgetDefaultValue()Gets the default defined value to set in the property when defined.IzToolTipgetNativeToolTip()Gets a "native" tooltip to use.protected java.lang.StringgetToolTipText()Gets the tooltip text to display in the entry fields (not the one for property errors or validator).protected java.lang.StringgetValue(java.lang.String input)Gets the property value for a user input.voidinitialize(EditorMethodReference prop)Initializes a newly created property (e.g.protected voidonDoubleClick(org.eclipse.swt.widgets.Event e)Called when mouse is double-clicked in the text or combobox.voidonMore()Called when the "more..." button is pressed.protected voidselectJava()Selects a class from the project (or its classpath), but .java files as parsed sources.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, getOption, getSelectionListener, getSeverity, getShell, getToolTipText2, hasFocus, isPropReadOnly, onDefine, onDispose, onError, onF4List, onFocusGained, onFocusLost, onReadOnly, onUndefined, onUpdate, setColors, setCurrentValue, setEditable, setFocus, setInput, setInputValue, setInputValueFromProp, setToolTipText, showMenu, updateTooltip, validate
Method Detail
initialize
public void initialize(EditorMethodReference prop) throws PropException
Initializes a newly created property (e.g. a reference property for accepted classes, etc).- Specified by:
initializein interfaceIEditedPropControllerOwner<EditorMethodReference,java.lang.String>- Overrides:
initializein classBaseEditor<EditorMethodReference,java.lang.String>- Parameters:
prop- The newly created orphan property.- Throws:
PropException- For property errors.
create
protected void create()
Creates the property editor controls.- Specified by:
createin classBaseEditor<EditorMethodReference,java.lang.String>
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 classBaseEditor<EditorMethodReference,java.lang.String>
createJava
protected void createJava()
Creates a new Java class.
selectJava
protected void selectJava()
Selects a class from the project (or its classpath), but .java files as parsed sources.
addAnnotation
protected void addAnnotation()
Implement interface or annotation.
onMore
public void onMore()
Called when the "more..." button is pressed. Override to display dialog box.- Overrides:
onMorein classBaseEditor<EditorMethodReference,java.lang.String>
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 classBaseEditor<EditorMethodReference,java.lang.String>
getNativeToolTip
public IzToolTip getNativeToolTip()
Gets a "native" tooltip to use.- Overrides:
getNativeToolTipin classBaseEditor<EditorMethodReference,java.lang.String>- Returns:
- null for none, otherwise the IzToolTip instance.
getDefaultValue
public java.lang.String getDefaultValue()
Gets the default defined value to set in the property when defined.- Specified by:
getDefaultValuein interfaceIEditedPropControllerOwner<EditorMethodReference,java.lang.String>- Specified by:
getDefaultValuein classBaseEditor<EditorMethodReference,java.lang.String>
getValue
protected java.lang.String getValue(java.lang.String input)
Gets the property value for a user input.- Specified by:
getValuein classBaseEditor<EditorMethodReference,java.lang.String>- 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(java.lang.String value)
Formats the value for user input as a String.- Specified by:
formatValuein interfaceIEditedPropControllerOwner<EditorMethodReference,java.lang.String>- Specified by:
formatValuein classBaseEditor<EditorMethodReference,java.lang.String>- Parameters:
value- The value.- Returns:
- The formatted value.