Hierarchical Composite Strategies

Identifier:
com.ibm.xtools.comparemerge.emf.delta.hierarchicalCompositeStrategies

Description:

Implement this extension point to inject another hierarchical composite strategy. Hierarchical composite strategy can run in pre-mode or post-mode.

In pre-mode,

i) the hierarchical composite strategy runs to form composites. There is a one to many relationship between composite and delta. Each composite can have one or more deltas.

ii) After identifying a list of deltas for a composite, before forming the composite from the deltas list, the deltas list is passed to all children of this composite strategy. (children: hierarchical composite strategies that have their prerequisite field pointing to this hierarchical composite strategy.)

iii) Every child processes the deltas list, it finds composites based on its rule. For every found composite, it removes the corresponding deltas from the deltas list. It adds the composite to a composites list.

iv) After all children processes the deltas list. deltas remained in the deltas list and composite from composites list are grouped together to form the composite for this strategy.

In post-mode,

i) the hierarchical composite strategy runs to form composites. There is a one to many relationship between composite and delta. Each composite can have one or more deltas. All found composites are added to composites list.

ii) the composites list is passed to all children of this hierarchical composite strategy. (children: hierarchical composite strategies that have their prerequisite field pointing to this hierarchical composite strategy.)

iii) Every child processes the composites list, it finds composites based on its rule. Every child composite can contain one or more composites from its parent.

Configuration Markup:

<!ELEMENT extension (hierarchicalCompositeStrategy+)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT hierarchicalCompositeStrategy EMPTY>

<!ATTLIST hierarchicalCompositeStrategy

id            CDATA #REQUIRED

contentTypeId CDATA #REQUIRED

class         CDATA #REQUIRED

prerequisite  CDATA #IMPLIED

isPreMode     (true | false) >


Examples:
The following is an example of hierarchical composite strategy extension:


<extension
         point="com.ibm.xtools.comparemerge.emf.delta.hierarchicalCompositeStrategies">
      <hierarchicalCompositeStrategy
            class="com.ibm.xtools.comparemerge.diagram.notation.strategy.SizeComposite"
            contentTypeId="com.ibm.xtools.diagram.ui.examples.logic.compare.logicContentType"
            id="com.ibm.xtools.diagram.ui.examples.logic.compare.sizeCompositeStrategy"
            prerequisite="com.ibm.xtools.diagram.ui.examples.logic.compare.diagramCompositeStrategy"/>
</extension>

API Information:

The value of the class attribute must extend abstract class com.ibm.xtools.comparemerge.emf.delta.deltagenerator.AbstractHierarchicalCompositeStrategy.

The value of the prerequisite attribute is optional. If it is specified, it must correspond to the id of another hierarchical composite strategy extension. That hierarchical composite strategy extension must have the same contentTypeId as this extension.

The value of the isPreMode attribute is optional.If it is set to true, this hierarchical composite strategy runs in pre-mode. otherwise, it runs in post-mode. Default is set to false.


Copyright (c) 2004, 2018 Model RealTime, HCL and others. All Rights Reserved.