Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Extension ElementDescription
transformationClass

The defined class must extend "de.cau.cs.kieler.kico.Transformation" and must implement the methods defined in "de.cau.cs.kieler.kico.ITransformation". These are

  • getId(): Returns a unique String ID for this transformation. This is the ID the transformation will be referenced throughout KiCo.
  • getName(): Optionally return a String name for this transformation. If null is returned here the ID will be used as a name.
  • getDependencies(): Optionally return a List<String> of other transformation IDs that must run BEFORE this transformation. If null is returned then this means there are no dependencies.
  • transform(EObject): Returns an EObject and does the central transformation.
transformationMethod

The defined class can be freely chosen and does not need to extend or implement any other class or interface. Although you have to give more information in the extension element now:

  • class: The class where the transform method is implemented in
  • method: The name of the transformation method. Its signature must ensure that it returns an EObject an only take an EObject argument. Otherwise it cannot be found by KiCo.
  • id: The unique String ID for this transformation. This is the ID the transformation will be referenced throughout KiCo.
  • name: An optional String name for this transformation. If nothing is entered here the ID will be used as a name.
  • dependencies: An optional String as comma separated list of other transformation IDs that must run BEFORE this transformation. If nothing is entered here then this means there are no dependencies.
transformationGroup

Sometimes you may want to group other transformations and give this group a specific transformation ID as a kind of shortcut. You can do this by using the transformationGroup element giving the following information:

  • id: The unique String ID for this transformation group. This is the ID the transformation group will be referenced throughout KiCo. It may also again be referenced by other transformation groups!
  • dependencies: These are NOT optional for groups. Groups must specify their transformations as dependencies. Use a String as comma separated list of other transformation IDs or transformation group IDs that should represent this group. Note that the order will be implied by the referenced transformations itself although if there is a free degree of order it can be influenced by the order specified here in the group.
  • name: An optional String name for this transformation. If nothing is entered here the ID will be used as a name.

Example

Code Block
titleplugin.xml
   <extension
         point="de.cau.cs.kieler.kico.transformation">
      <transformationGroup
            id="NORMALIZE"
            dependencies="TRIGGEREFFECT, SURFACEDEPTH"
            name="Transform All Normalize">
      </transformationGroup>
   </extension>
   <extension
         point="de.cau.cs.kieler.kico.transformation">
      <transformationMethod
            class="de.cau.cs.kieler.sccharts.extensions.SCChartsCoreTransformation"
            id="TRIGGEREFFECT"
            method="transformTriggerEffect"
            name="Transform Trigger and Effect">
      </transformationMethod>
   </extension>
   
   <extension
         point="de.cau.cs.kieler.kico.transformation">
      <transformationMethod
            class="de.cau.cs.kieler.sccharts.extensions.SCChartsCoreTransformation"
            id="SURFACEDEPTH"
            method="transformSurfaceDepth"
            name="Transform Surface Depth">
      </transformationMethod>
   </extension>
   
   <extension
         point="de.cau.cs.kieler.kico.transformation">
      <transformationGroup
            id="ALL"
            dependencies="CORE NORMALIZE"
            name="Transform All">
      </transformationGroup>
   </extension>

 

Compilation

text