EGF Engine
Release 0.1.0

org.eclipse.egf.pde.pattern.internal.plugin.command
Class AbstractPatternElementCommand

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.pattern.internal.plugin.command.AbstractPatternElementCommand
All Implemented Interfaces:
IPluginChangesCommand
Direct Known Subclasses:
SetPatternCommand, SetPatternLibraryCommand, UnsetPatternCommand, UnsetPatternLibraryCommand

public abstract class AbstractPatternElementCommand
extends AbstractExtensionChangesCommand

Base class to implement commands that change something regarding 'pattern' extensions : either a pattern library or a pattern.


Constructor Summary
protected AbstractPatternElementCommand(String patternElementFullId_p, String patternElementName_p)
          Constructor.
 
Method Summary
protected  String getExtensionChildName()
          Get the node name of the children for the extension.
protected  String getExtensionPointId()
          Get the extension point id.
protected  IPluginElement getLibrary(String libraryId_p)
          Get the plug-in element for given library full id.
 String getParentLibraryId()
          Get the parent library full id.
protected  IPluginElement getPatternElement(IPluginElement parent_p, String patternElementId_p, String patternElementChildNodeName_p, boolean createIfMissing_p)
          Get the pattern element for specified id from given parent plug-in element.
 String getPatternElementFullId()
          Get the pattern element full id.
 String getPatternElementId()
          Get the pattern element id.
 String getPatternElementName()
          Get the pattern element name.
 
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

AbstractPatternElementCommand

protected AbstractPatternElementCommand(String patternElementFullId_p,
                                        String patternElementName_p)
Constructor.

Parameters:
patternElementFullId_p - Pattern element full id as defined by the pattern plug-in.
Method Detail

getExtensionPointId

protected String getExtensionPointId()
Description copied from class: AbstractExtensionChangesCommand
Get the extension point id.

Specified by:
getExtensionPointId in class AbstractExtensionChangesCommand
Returns:
See Also:
AbstractExtensionChangesCommand.getExtensionPointId()

getPatternElementId

public String getPatternElementId()
Get the pattern element id.

Returns:
the local id is returned.

getParentLibraryId

public String getParentLibraryId()
Get the parent library full id.

Returns:

getPatternElementFullId

public String getPatternElementFullId()
Get the pattern element full id.

Returns:

getPatternElementName

public String getPatternElementName()
Get the pattern element name.

Returns:

getExtensionChildName

protected final String getExtensionChildName()
Description copied from class: AbstractExtensionChangesCommand
Get the node name of the children for the extension.

Specified by:
getExtensionChildName in class AbstractExtensionChangesCommand
Returns:
See Also:
AbstractExtensionChangesCommand.getExtensionChildName()

getLibrary

protected IPluginElement getLibrary(String libraryId_p)
Get the plug-in element for given library full id.

Parameters:
libraryId_p -
Returns:

getPatternElement

protected IPluginElement getPatternElement(IPluginElement parent_p,
                                           String patternElementId_p,
                                           String patternElementChildNodeName_p,
                                           boolean createIfMissing_p)
Get the pattern element for specified id from given parent plug-in element.
If the pattern element does not exist, it is created.

Parameters:
parent_p -
patternElementId_p - the local id.
createIfMissing_p -
Returns:

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.