Eclipse Platform
2.0

org.eclipse.core.runtime.model
Class ConfigurationElementModel

java.lang.Object
  |
  +--org.eclipse.core.runtime.model.PluginModelObject
        |
        +--org.eclipse.core.runtime.model.ConfigurationElementModel

public class ConfigurationElementModel
extends PluginModelObject

An object which represents the user-defined contents of an extension in a plug-in manifest.

This class may be instantiated, or further subclassed.


Constructor Summary
ConfigurationElementModel()
          Creates a new configuration element model in which all fields are null.
 
Method Summary
 Object getParent()
          Returns the element which contains this element.
 ExtensionModel getParentExtension()
          Returns the extension in which this configuration element is declared.
 ConfigurationPropertyModel[] getProperties()
          Returns the properties associated with this element.
 ConfigurationElementModel[] getSubElements()
          Returns this element's sub-elements.
 String getValue()
          Returns the value of this element.
 String getValueAsIs()
          Returns the value of this element.
 void markReadOnly()
          Sets this model object and all of its descendents to be read-only.
 void setParent(Object value)
          Sets the parent of this element.
 void setProperties(ConfigurationPropertyModel[] value)
          Sets the properties associated with this element.
 void setSubElements(ConfigurationElementModel[] value)
          Sets configuration elements contained by this element This object must not be read-only.
 void setValue(String value)
          Sets the value of this element.
 
Methods inherited from class org.eclipse.core.runtime.model.PluginModelObject
assertIsWriteable, getName, isReadOnly, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationElementModel

public ConfigurationElementModel()
Creates a new configuration element model in which all fields are null.

Method Detail

getParent

public Object getParent()
Returns the element which contains this element. If this element is an immediate child of an extension, the returned value can be downcast to ExtensionModel. Otherwise the returned value can be downcast to ConfigurationElementModel.

Returns:
the parent of this configuration element or null

getParentExtension

public ExtensionModel getParentExtension()
Returns the extension in which this configuration element is declared. If this element is a top-level child of an extension, the returned value is equivalent to getParent.

Returns:
the extension in which this configuration element is declared or null

getProperties

public ConfigurationPropertyModel[] getProperties()
Returns the properties associated with this element.

Returns:
the properties associated with this element or null

getSubElements

public ConfigurationElementModel[] getSubElements()
Returns this element's sub-elements.

Returns:
the sub-elements of this element or null

getValue

public String getValue()
Returns the value of this element.

Returns:
the value of this element or null

getValueAsIs

public String getValueAsIs()
Returns the value of this element.

Returns:
the value of this element or null
Since:
2.0

markReadOnly

public void markReadOnly()
Sets this model object and all of its descendents to be read-only. Subclasses may extend this implementation.

Overrides:
markReadOnly in class PluginModelObject
See Also:
PluginModelObject.isReadOnly()

setParent

public void setParent(Object value)
Sets the parent of this element. The supplied parent is either an ExtensionModel, if this element is to be a direct child of an extension, or another ConfigurationElement. This object must not be read-only.

Parameters:
value - the new parent of this element. May be null.

setProperties

public void setProperties(ConfigurationPropertyModel[] value)
Sets the properties associated with this element. This object must not be read-only.

Parameters:
value - the properties to associate with this element. May be null.

setSubElements

public void setSubElements(ConfigurationElementModel[] value)
Sets configuration elements contained by this element This object must not be read-only.

Parameters:
value - the configuration elements to be associated with this element. May be null.

setValue

public void setValue(String value)
Sets the value of this element. This object must not be read-only.

Parameters:
value - the new value of this element. May be null.

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.