|
|||||||||
| Home >> All >> com >> vinculum >> processeditor >> [ model overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.vinculum.processeditor.model
Class OutArgument

java.lang.Objectcom.vinculum.processeditor.model.OutArgument
- All Implemented Interfaces:
- org.eclipse.ui.views.properties.IPropertySource, java.io.Serializable
- public class OutArgument
- extends java.lang.Object
- implements org.eclipse.ui.views.properties.IPropertySource, java.io.Serializable
- extends java.lang.Object
| Field Summary | |
private java.lang.String |
argument
|
private java.util.Vector |
descriptors
|
static java.lang.String |
ID_ARGUMENT
|
private org.eclipse.jdt.core.IMethod |
method
|
private java.lang.String |
retSig
|
private int |
retType
|
| Constructor Summary | |
OutArgument()
|
|
OutArgument(org.eclipse.jdt.core.IMethod[] methods,
int value)
|
|
OutArgument(org.eclipse.jdt.core.IMethod[] methods,
int value,
OutArgument outArgument)
|
|
| Method Summary | |
java.lang.String |
getArgument()
|
java.lang.Object |
getEditableValue()
Returns a value for this property source that can be edited in a property sheet. |
org.eclipse.ui.views.properties.IPropertyDescriptor[] |
getPropertyDescriptors()
Returns the list of property descriptors for this property source. |
java.lang.Object |
getPropertyValue(java.lang.Object id)
Returns the value of the property with the given id if it has one. |
java.lang.String |
getRetSig()
|
int |
getRetType()
|
boolean |
isPropertySet(java.lang.Object id)
Returns whether the value of the property with the given id has changed from its default value. |
private void |
refreshDescriptors(org.eclipse.jdt.core.IMethod method)
|
void |
resetPropertyValue(java.lang.Object id)
Resets the property with the given id to its default value if possible. |
void |
setPropertyValue(java.lang.Object id,
java.lang.Object value)
Sets the property with the given id if possible. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
descriptors
private transient java.util.Vector descriptors
ID_ARGUMENT
public static java.lang.String ID_ARGUMENT
argument
private java.lang.String argument
retSig
private java.lang.String retSig
retType
private int retType
method
private transient org.eclipse.jdt.core.IMethod method
| Constructor Detail |
OutArgument
public OutArgument()
OutArgument
public OutArgument(org.eclipse.jdt.core.IMethod[] methods, int value)
OutArgument
public OutArgument(org.eclipse.jdt.core.IMethod[] methods, int value, OutArgument outArgument)
| Method Detail |
refreshDescriptors
private void refreshDescriptors(org.eclipse.jdt.core.IMethod method)
getEditableValue
public java.lang.Object getEditableValue()
- Description copied from interface:
org.eclipse.ui.views.properties.IPropertySource - Returns a value for this property source that can be edited in a
property sheet.
This value is used when this
IPropertySourceis appearing in the property sheet as the value of a property of some otherIPropertySourceThis value is passed as the input to a cell editor opening on an
IPropertySource.This value is also used when an
IPropertySourceis being used as the value in asetPropertyValuemessage. The reciever of the message would then typically use the editable value to update the original property source or construct a new instance.For example an email address which is a property source may have an editable value which is a string so that it can be edited in a text cell editor. The email address would also have a constructor or setter that takes the edited string so that an appropriate instance can be created or the original instance modified when the edited value is set.
This behavior is important for another reason. When the property sheet is showing properties for more than one object (multiple selection), a property sheet entry will display and edit a single value (typically coming from the first selected object). After a property has been edited in a cell editor, the same value is set as the property value for all of the objects. This is fine for primitive types but otherwise all of the objects end up with a reference to the same value. Thus by creating an editable value and using it to update the state of the original property source object, one is able to edit several property source objects at once (multiple selection).
- Specified by:
getEditableValuein interfaceorg.eclipse.ui.views.properties.IPropertySource
getPropertyDescriptors
public org.eclipse.ui.views.properties.IPropertyDescriptor[] getPropertyDescriptors()
- Description copied from interface:
org.eclipse.ui.views.properties.IPropertySource - Returns the list of property descriptors for this property source.
The
getPropertyValueandsetPropertyValuemethods are used to read and write the actual property values by specifying the property ids from these property descriptors.Implementors should cache the descriptors as they will be asked for the descriptors with any edit/update. Since descriptors provide cell editors, returning the same descriptors if possible allows for efficient updating.
- Specified by:
getPropertyDescriptorsin interfaceorg.eclipse.ui.views.properties.IPropertySource
getPropertyValue
public java.lang.Object getPropertyValue(java.lang.Object id)
- Description copied from interface:
org.eclipse.ui.views.properties.IPropertySource - Returns the value of the property with the given id if it has one.
Returns
nullif the property's value isnullvalue or if this source does not have the specified property.- Specified by:
getPropertyValuein interfaceorg.eclipse.ui.views.properties.IPropertySource
isPropertySet
public boolean isPropertySet(java.lang.Object id)
- Description copied from interface:
org.eclipse.ui.views.properties.IPropertySource - Returns whether the value of the property with the given id has changed from
its default value. Returns
falseif this source does not have the specified property.If the notion of default value is not meaningful for the specified property than
trueis returned.- Specified by:
isPropertySetin interfaceorg.eclipse.ui.views.properties.IPropertySource
resetPropertyValue
public void resetPropertyValue(java.lang.Object id)
- Description copied from interface:
org.eclipse.ui.views.properties.IPropertySource - Resets the property with the given id to its default value if possible.
Does nothing if the notion of a default value is not meaningful for the specified property, or if the property's value cannot be changed, or if this source does not have the specified property.
Callers will check if this
IPropertySourceimplementsIPropertySource2and this method will only be called ifIPropertySource2#isPropertyResettable(Object)returnstruefor the property with the given id.- Specified by:
resetPropertyValuein interfaceorg.eclipse.ui.views.properties.IPropertySource
setPropertyValue
public void setPropertyValue(java.lang.Object id, java.lang.Object value)
- Description copied from interface:
org.eclipse.ui.views.properties.IPropertySource - Sets the property with the given id if possible. Does nothing if the
property's value cannot be changed or if this source does not have the
specified property.
In general, a property source should not directly reference the value parameter unless it is an atomic object that can be shared, such as a string.
An important reason for this is that several property sources with compatible descriptors could be appearing in the property sheet at the same time. An editor produces a single edited value which is passed as the value parameter of this message to all the property sources. Thus to avoid a situation where all of the property sources reference the same value they should use the value parameter to create a new instance of the real value for the given property.
There is another reason why a level of indirection is useful. The real value of property may be a type that cannot be edited with a standard cell editor. However instead of returning the real value in
getPropertyValue, the value could be converted to aStringwhich could be edited with a standard cell editor. The edited value will be passed to this method which can then turn it back into the real property value.Another variation on returning a value other than the real property value in
getPropertyValueis to return a value which is anIPropertySource(or for which the property sheet can obtain anIPropertySource). In this case the value to edit is obtained from the child property source usinggetEditableValue. It is this editable value that will be passed back via this method when it has been editted- Specified by:
setPropertyValuein interfaceorg.eclipse.ui.views.properties.IPropertySource
getArgument
public java.lang.String getArgument()
getRetSig
public java.lang.String getRetSig()
getRetType
public int getRetType()
|
|||||||||
| Home >> All >> com >> vinculum >> processeditor >> [ model overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.vinculum.processeditor.model.OutArgument