EGF Engine
Release 0.1.0

org.eclipse.egf.pde.internal.plugin.command.context
Class AbstractContextElementCommand

java.lang.Object
  extended by org.eclipse.egf.pde.plugin.command.AbstractChangesCommand
      extended by org.eclipse.egf.pde.plugin.command.AbstractExtensionChangesCommand
          extended by org.eclipse.egf.pde.internal.plugin.command.context.AbstractContextCommand
              extended by org.eclipse.egf.pde.internal.plugin.command.context.AbstractContextElementCommand
All Implemented Interfaces:
IPluginChangesCommand
Direct Known Subclasses:
AbstractCtxtEltBasedOnContractEltRefCmd, AbstractCtxtEltBaseOnKeyCmd, UnsetContextElementCommand

public abstract class AbstractContextElementCommand
extends AbstractContextCommand

Base class to implement commands that deal with context element in context extension-point.


Constructor Summary
protected AbstractContextElementCommand(String contextId_p, String contextElementId_p, String value_p)
          Constructor.
 
Method Summary
protected  IPluginElement createContextValueElement(IPluginElement contextElement_p)
          Create a context value plug-in element.
protected  IPluginElement doCreateContextElement()
          Create a context element with its value set.
protected  String getContextElementIdAttribute()
          Get id attribute for the context element.
protected  String getContextElementIdAttributeValue()
          Get the value for context element id attribute.
protected  String getValue()
          Return the context element value.
protected  void setValue(IPluginElement contextElement_p)
          Set value child element.
 
Methods inherited from class org.eclipse.egf.pde.internal.plugin.command.context.AbstractContextCommand
getContextId, getExtensionChildName, getExtensionPointId
 
Methods inherited from class org.eclipse.egf.pde.plugin.command.AbstractExtensionChangesCommand
createExtension, createExtensionElementChild, getElement, getExtensionChildIdAttribute, getExtensionElementFromUniqueExtension, getExtensionElementFromUniqueExtension, getExtensionElementWithId, getExtensionElementWithNodeName, getExtensions, getExtensions, getFirstExtensionElement, removeExtension, removeExtensionElementChild, setDescription, setSingleChild
 
Methods inherited from class org.eclipse.egf.pde.plugin.command.AbstractChangesCommand
execute, getPluginModelBase, setPluginModelBase
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractContextElementCommand

protected AbstractContextElementCommand(String contextId_p,
                                        String contextElementId_p,
                                        String value_p)
Constructor.

Parameters:
contextId_p - id of the context used as parent.
contextElementId_p - id of the context element.
value_p - value set as stringValue or classValue.
Method Detail

getContextElementIdAttributeValue

protected String getContextElementIdAttributeValue()
Get the value for context element id attribute.
It's either a contract element reference id value or a simple string value used as a key.

Returns:
the contextElementIdentifier

getContextElementIdAttribute

protected String getContextElementIdAttribute()
Get id attribute for the context element.

Returns:

createContextValueElement

protected IPluginElement createContextValueElement(IPluginElement contextElement_p)
Create a context value plug-in element.

Parameters:
contextElement_p -
Returns:

setValue

protected void setValue(IPluginElement contextElement_p)
Set value child element.

Parameters:
contextElement_p -
value_p - the value to set.

doCreateContextElement

protected IPluginElement doCreateContextElement()
Create a context element with its value set.

Returns:

getValue

protected String getValue()
Return the context element value.

Returns:
the value

EGF Engine
Release 0.1.0

Copyright (c) Thales Corporate Services S.A.S, 2009.

This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.