Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Runtime

org.eclipse.gmf.runtime.emf.ui.properties.descriptors
Class EMFCompositeSourcePropertyDescriptor

java.lang.Object
  extended by org.eclipse.emf.edit.ui.provider.PropertyDescriptor
      extended by 
org.eclipse.gmf.runtime.emf.ui.properties.descriptors.EMFCompositeSourcePropertyDescriptor
All Implemented Interfaces:
ICompositeSourcePropertyDescriptor, IPropertyDescriptor
Direct Known Subclasses:
NotationPropertyDescriptor

public class EMFCompositeSourcePropertyDescriptor
extends org.eclipse.emf.edit.ui.provider.PropertyDescriptor
implements ICompositeSourcePropertyDescriptor

The descriptor that works with the EMFCompositePropertySource object.

When the property value is set while an EMF transaction is open on the editing domain, I will not execute the set command through the editing domain command stack. In this case, I rely on whoever opened the EMF transaction to put their operation on the operation history.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.edit.ui.provider.PropertyDescriptor
org.eclipse.emf.edit.ui.provider.PropertyDescriptor.EDataTypeCellEditor, org.eclipse.emf.edit.ui.provider.PropertyDescriptor.EDataTypeValueHandler, org.eclipse.emf.edit.ui.provider.PropertyDescriptor.FloatCellEditor, org.eclipse.emf.edit.ui.provider.PropertyDescriptor.IntegerCellEditor
 
Field Summary
protected  java.lang.String category
           
protected  java.lang.String[] filterFlags
           
protected   CellEditor propertyEditor
           
protected  boolean readOnly
           
protected   ICellEditorValidator validator
          The object to validate the values in the cell editor, or null if none (the default).
 
Fields inherited from class org.eclipse.emf.edit.ui.provider.PropertyDescriptor
ecorePackage, itemPropertyDescriptor, object
 
Constructor Summary
EMFCompositeSourcePropertyDescriptor (java.lang.Object object, org.eclipse.emf.edit.provider.IItemPropertyDescriptor itemPropertyDescriptor)
           
EMFCompositeSourcePropertyDescriptor (java.lang.Object object, org.eclipse.emf.edit.provider.IItemPropertyDescriptor itemPropertyDescriptor, java.lang.String category)
          Creates an instance of EMFCompositeSourcePropertyDescriptor.
 
Method Summary
 void addFilterFlag (java.lang.String flag)
          Add filter flag (@see IPropertySheetEntry.FILTER_ID_EXPERT)
protected   CellEditor createBooleanCellEditor ( Composite composite)
           
protected   CellEditor createComboBoxCellEditor ( Composite composite)
           
protected   CellEditor createDataTypeCellEditor ( Composite composite)
           
protected   CellEditor createDialogCellEditor ( Composite composite, org.eclipse.emf.ecore.EStructuralFeature feature, java.util.List choiceOfValues)
          Creates a dialog cell editor for editing multivalued features.
static  ILabelProvider createLabelProvider (org.eclipse.emf.edit.provider.IItemPropertyDescriptor itemPropertyDescriptor)
          A convinience method to create an instance of a ILabelProvider using IItemPropertyDescriptor
  CellEditor createPropertyEditor ( Composite composite)
          This returns the cell editor that will be used to edit the value of this property.
protected   CellEditor doCreateEditor ( Composite composite)
           
 java.lang.String getCategory ()
           
 java.util.List getChoiceOfValues ()
          Return choice of values for the given property.
protected  java.lang.Object getEditableValue ()
          This is a temporary method.
 java.lang.Object getFeature ()
          Retrieves the feature.
 java.lang.String[] getFilterFlags ()
           
 java.lang.Object getId ()
           
 org.eclipse.emf.edit.provider.IItemPropertyDescriptor getItemDescriptor ()
           
protected  java.lang.Object getObject ()
          Retrieve an object for which this class is a property source.
protected   CellEditor getPropertyEditor ()
           
protected  org.eclipse.emf.edit.provider.IItemPropertySource getPropertySource (java.lang.Object value)
          Returns an property source for the given value.
 java.lang.Object getPropertyValue ()
          Return a value of the the property represented by this descriptor
  ICellEditorValidator getValidator ()
           
 boolean isCompatibleWith ( IPropertyDescriptor anotherProperty)
           
 boolean isReadOnly ()
          Returns boolean - an indicator either or not this property can be set or re-set.
 void resetPropertyValue ()
          This method is used by the property source to reset the property that this property descriptor maps to.
 void resetPropertyValue (java.lang.Object value)
          Resets the property to specified value.
 void setCategory (java.lang.String category)
          Sets the category.
 void setPropertyEditor ( CellEditor propertyEditor)
           
 void setPropertyValue (java.lang.Object value)
          This method is used by the property source to set the property that this property descriptor maps to.
 void setReadOnly (boolean value)
          Sets the specified value to be read only.
 void setValidator ( ICellEditorValidator validator)
           
 
Methods inherited from class org.eclipse.emf.edit.ui.provider.PropertyDescriptor
createEDataTypeCellEditor, getDescription, getDisplayName, getEditLabelProvider, getHelpContextIds, getLabelProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui.views.properties. IPropertyDescriptor
getDescription, getDisplayName, getHelpContextIds, getLabelProvider
 

Field Detail

category

protected java.lang.String category

filterFlags

protected java.lang.String[] filterFlags

readOnly

protected boolean readOnly

propertyEditor

protected 
CellEditor propertyEditor

validator

protected 
ICellEditorValidator validator
The object to validate the values in the cell editor, or null if none (the default).

Constructor Detail

EMFCompositeSourcePropertyDescriptor

public EMFCompositeSourcePropertyDescriptor(java.lang.Object object,
                                            org.eclipse.emf.edit.provider.IItemPropertyDescriptor itemPropertyDescriptor)
Parameters:
object -
itemPropertyDescriptor -

EMFCompositeSourcePropertyDescriptor

public EMFCompositeSourcePropertyDescriptor(java.lang.Object object,
                                            org.eclipse.emf.edit.provider.IItemPropertyDescriptor itemPropertyDescriptor,
                                            java.lang.String category)
Creates an instance of EMFCompositeSourcePropertyDescriptor.

Parameters:
object -
itemPropertyDescriptor -
category -
Method Detail

createLabelProvider

public static 
ILabelProvider createLabelProvider(org.eclipse.emf.edit.provider.IItemPropertyDescriptor itemPropertyDescriptor)
A convinience method to create an instance of a ILabelProvider using IItemPropertyDescriptor

Parameters:
itemPropertyDescriptor -
Returns:
label provider

setCategory

public void setCategory(java.lang.String category)
Sets the category.

Specified by:
setCategory in interface ICompositeSourcePropertyDescriptor
Parameters:
category - The category to set.

getCategory

public java.lang.String getCategory()
Specified by:
getCategory in interface IPropertyDescriptor
Overrides:
getCategory in class org.eclipse.emf.edit.ui.provider.PropertyDescriptor

getFilterFlags

public java.lang.String[] getFilterFlags()
Specified by:
getFilterFlags in interface IPropertyDescriptor
Overrides:
getFilterFlags in class org.eclipse.emf.edit.ui.provider.PropertyDescriptor
Returns:
Returns the filterFlags.

addFilterFlag

public void addFilterFlag(java.lang.String flag)
Add filter flag (@see IPropertySheetEntry.FILTER_ID_EXPERT)

Parameters:
flag -

createPropertyEditor

public 
CellEditor createPropertyEditor(
Composite composite)
This returns the cell editor that will be used to edit the value of this property. This default implementation determines the type of cell editor from the nature of the structural feature.

Specified by:
createPropertyEditor in interface IPropertyDescriptor
Overrides:
createPropertyEditor in class org.eclipse.emf.edit.ui.provider.PropertyDescriptor

doCreateEditor

protected 
CellEditor doCreateEditor(
Composite composite)

isReadOnly

public boolean isReadOnly()
Returns boolean - an indicator either or not this property can be set or re-set. It was either inherited from our IItemPropertyDescriptor or set in the context of the application

Specified by:
isReadOnly in interface ICompositeSourcePropertyDescriptor
Returns:
- true if either IItemPropertyDescriptor can not set it or our descriptor

setReadOnly

public void setReadOnly(boolean value)
Sets the specified value to be read only.

Specified by:
setReadOnly in interface ICompositeSourcePropertyDescriptor
Parameters:
value - The readOnly to set.

isCompatibleWith

public boolean isCompatibleWith(
IPropertyDescriptor anotherProperty)
Specified by:
isCompatibleWith in interface IPropertyDescriptor
Overrides:
isCompatibleWith in class org.eclipse.emf.edit.ui.provider.PropertyDescriptor
See Also:
IPropertyDescriptor.isCompatibleWith(IPropertyDescriptor)

getObject

protected java.lang.Object getObject()
Retrieve an object for which this class is a property source.

Returns:
Object for which this class is a property source

getItemDescriptor

public org.eclipse.emf.edit.provider.IItemPropertyDescriptor getItemDescriptor()
Returns:
the item descriptor

getFeature

public java.lang.Object getFeature()
Retrieves the feature.

Returns:
feature

getPropertyEditor

protected 
CellEditor getPropertyEditor()
Returns:
Returns the propertyEditor.

setPropertyEditor

public void setPropertyEditor(
CellEditor propertyEditor)
Parameters:
propertyEditor - The propertyEditor to set.

getValidator

public 
ICellEditorValidator getValidator()
Returns:
Returns the validator.

setValidator

public void setValidator(
ICellEditorValidator validator)
Parameters:
validator - The validator to set.

createComboBoxCellEditor

protected 
CellEditor createComboBoxCellEditor(
Composite composite)

createDialogCellEditor

protected 
CellEditor createDialogCellEditor(
Composite composite,
                                            org.eclipse.emf.ecore.EStructuralFeature feature,
                                            java.util.List choiceOfValues)
Creates a dialog cell editor for editing multivalued features.

Parameters:
composite - the composite to contain the new cell editor
feature - the feature being edited
choiceOfValues - the possible values for that feature
Returns:
the new cell editor

createBooleanCellEditor

protected 
CellEditor createBooleanCellEditor(
Composite composite)

createDataTypeCellEditor

protected 
CellEditor createDataTypeCellEditor(
Composite composite)

getPropertyValue

public java.lang.Object getPropertyValue()
Description copied from interface: ICompositeSourcePropertyDescriptor
Return a value of the the property represented by this descriptor

Specified by:
getPropertyValue in interface ICompositeSourcePropertyDescriptor
Returns:
- value of the property stored in the EMF descriptor

getEditableValue

protected java.lang.Object getEditableValue()
This is a temporary method. If we want to keep the recursive properties this become getPropertyValue().

Returns:
the editable value

setPropertyValue

public void setPropertyValue(java.lang.Object value)
Description copied from interface: ICompositeSourcePropertyDescriptor
This method is used by the property source to set the property that this property descriptor maps to.

Specified by:
setPropertyValue in interface ICompositeSourcePropertyDescriptor
Parameters:
value - value of the property

resetPropertyValue

public void resetPropertyValue()
Description copied from interface: ICompositeSourcePropertyDescriptor
This method is used by the property source to reset the property that this property descriptor maps to.

Specified by:
resetPropertyValue in interface ICompositeSourcePropertyDescriptor

getPropertySource

protected org.eclipse.emf.edit.provider.IItemPropertySource getPropertySource(java.lang.Object value)
Returns an property source for the given value.

Returns:
an property source for the given object

getId

public java.lang.Object getId()
Specified by:
getId in interface IPropertyDescriptor
Overrides:
getId in class org.eclipse.emf.edit.ui.provider.PropertyDescriptor

getChoiceOfValues

public java.util.List getChoiceOfValues()
Return choice of values for the given property.

Returns:
list containing list of values

resetPropertyValue

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

Parameters:
value - the new property value

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire