vocleditor.model
Class EObjectPropertySource

java.lang.Object
  extended by vocleditor.model.EObjectPropertySource
All Implemented Interfaces:
org.eclipse.ui.views.properties.IPropertySource

public class EObjectPropertySource
extends java.lang.Object
implements org.eclipse.ui.views.properties.IPropertySource

This class is intended to be a generic property source for all the objects in the application's model. It currently only supports String and boolean types, and doesn't support reset or nested properties. It uses information in the EMF EAttribute and EDataType classes to get the id, display name, and type information.


Constructor Summary
EObjectPropertySource(org.eclipse.emf.ecore.EObject obj)
          The default constructor.
 
Method Summary
 java.lang.Object getEditableValue()
          Returns the editable value.
 org.eclipse.ui.views.properties.IPropertyDescriptor[] getPropertyDescriptors()
          Returns the array of property descriptions.
 java.lang.Object getPropertyValue(java.lang.Object id)
          Returns the property value.
 boolean isPropertySet(java.lang.Object id)
          Is the object with the given id a poperty set.
 void resetPropertyValue(java.lang.Object id)
          Resets the property value.
 void setPropertyValue(java.lang.Object id, java.lang.Object value)
          Sets the property value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EObjectPropertySource

public EObjectPropertySource(org.eclipse.emf.ecore.EObject obj)
The default constructor.

Parameters:
obj - the object
Method Detail

getEditableValue

public java.lang.Object getEditableValue()
Returns the editable value.

Specified by:
getEditableValue in interface org.eclipse.ui.views.properties.IPropertySource
See Also:
IPropertySource.getEditableValue()

getPropertyDescriptors

public org.eclipse.ui.views.properties.IPropertyDescriptor[] getPropertyDescriptors()
Returns the array of property descriptions.

Specified by:
getPropertyDescriptors in interface org.eclipse.ui.views.properties.IPropertySource
See Also:
IPropertySource.getPropertyDescriptors()

getPropertyValue

public java.lang.Object getPropertyValue(java.lang.Object id)
Returns the property value.

Specified by:
getPropertyValue in interface org.eclipse.ui.views.properties.IPropertySource
See Also:
IPropertySource.getPropertyValue(java.lang.Object)

isPropertySet

public boolean isPropertySet(java.lang.Object id)
Is the object with the given id a poperty set.

Specified by:
isPropertySet in interface org.eclipse.ui.views.properties.IPropertySource
See Also:
IPropertySource.isPropertySet(java.lang.Object)

resetPropertyValue

public void resetPropertyValue(java.lang.Object id)
Resets the property value.

Specified by:
resetPropertyValue in interface org.eclipse.ui.views.properties.IPropertySource
See Also:
org.eclipse.ui.views.properties.IPropertySouce#resetPropertyValue(java.lang.Object)

setPropertyValue

public void setPropertyValue(java.lang.Object id,
                             java.lang.Object value)
Sets the property value.

Specified by:
setPropertyValue in interface org.eclipse.ui.views.properties.IPropertySource
See Also:
IPropertySource.setPropertyValue(java.lang.Object, java.lang.Object)