org.eclipse.cdt.core
Interface ICExtensionReference


public interface ICExtensionReference


Method Summary
 ICExtension createExtension()
          Creates and returns a new instance of the cextension executable identified by the <run> attribute of the cextension.
 ICDescriptor getCDescriptor()
          Returns the project descriptor which this extension reference belongs to.
 java.lang.String getExtension()
          Return the extension point of this reference.
 java.lang.String getExtensionData(java.lang.String key)
          Gets a value of the key from the .cdtproject file set by setExtensionData()
 org.eclipse.core.runtime.IConfigurationElement[] getExtensionElements()
          Returns all configuration elements that are children of the cextension element.
 java.lang.String getID()
          Return the extension ID of this reference.
 void setExtensionData(java.lang.String key, java.lang.String value)
          Sets a name/value data pair on this reference in the .cdtproject file
 

Method Detail

getExtension

java.lang.String getExtension()
Return the extension point of this reference.

Returns:
String

getID

java.lang.String getID()
Return the extension ID of this reference.

Returns:
String

setExtensionData

void setExtensionData(java.lang.String key,
                      java.lang.String value)
                      throws org.eclipse.core.runtime.CoreException
Sets a name/value data pair on this reference in the .cdtproject file

Throws:
org.eclipse.core.runtime.CoreException

getExtensionData

java.lang.String getExtensionData(java.lang.String key)
Gets a value of the key from the .cdtproject file set by setExtensionData()


getCDescriptor

ICDescriptor getCDescriptor()
Returns the project descriptor which this extension reference belongs to.

Returns:
the ICDescriptor

createExtension

ICExtension createExtension()
                            throws org.eclipse.core.runtime.CoreException
Creates and returns a new instance of the cextension executable identified by the <run> attribute of the cextension.

The ICExtension is instantiated using its 0-argument public constructor. If the class implements the org.eclipse.core.runtime.IExecutableExtension interface, the method setInitializationData is called, passing to the object the configuration information that was used to create it.

Unlike other methods on this object, invoking this method may activate the plug-in.

Returns:
the executable ICExtension instance
Throws:
org.eclipse.core.runtime.CoreException - if an instance of the executable extension could not be created for any reason.
See Also:
IExecutableExtension.setInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)

getExtensionElements

org.eclipse.core.runtime.IConfigurationElement[] getExtensionElements()
                                                                      throws org.eclipse.core.runtime.CoreException
Returns all configuration elements that are children of the cextension element. Returns an empty array if this configuration element has no children.

Each child corresponds to a nested XML element in the configuration markup. For example, the configuration markup

  <view>
  &nbsp&nbsp&nbsp&nbsp<verticalHint>top</verticalHint>
  &nbsp&nbsp&nbsp&nbsp<horizontalHint>left</horizontalHint>
  </view>
 
corresponds to a configuration element, named "view", with two children.

Returns:
the child configuration elements
Throws:
org.eclipse.core.runtime.CoreException