Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[henshin-dev] Latest model and code changes

Fellows,

I want to inform you about a couple of changes that I made to the Henshin model. Don't worry, all your existing *.henshin files will still load and work as before (there is no need to migrate your models). All you have to do is to update your code to use the new classes / methods. The most important old classes still exist, but are marked as deprecated.

Here are the changes:

- TransformationSystem is now called Module. Modules can contain a list of submodules (similarly to packages in Ecore). Modules have only a single containment feature, called 'units', that is used to store both rules and units.

- TransformationUnit is know just called Unit. MultiUnit is a new common superclass of SequentialUnit, PriorityUnit and IndependentUnit. UnaryUnit is the new superclass of LoopUnit and IteratedUnit.

- A number of helper methods in the model changed. Here are some examples of the new usage:

Unit unit = module.getUnit("myUnit");    // to get a unit by its name
Rule rule = (Rule) module.getUnit("myRule");    // to get a rule by its name
Parameter param = unit.getParameter("myParam");   // get a parameter
NestedCondition nac = rule.getLhs().getNAC("myNac"); // analogously for PACs

- The actions (or stereotypes) that you know from the graphical editor are now integrated with the model and can be also used to perform complex editing operations in the tree-based editor.

- The tree-based editor highlights rules and units in the same colors as the graphical editor. This helps you to keep the overview of your transformation model and makes the user-experiences in the tree-based and the graphical editor more consistent.

- The graphical editor now supports arbitrarily deeply nested multi-rules. I need to test this a bit more.

- You can use the new class HenshinModelCleaner in the util package in the model plug-in to clean you models. This automatically fixes problems and removes inconsistencies. This cleaning is used by the graphical editor. You can invoke it also manually in the tree-based editor under "Advanced Editing -> Clean Up". You will get messages in the error log if the model was changed.

Release plan:

I want to check if I find any serious bugs and test everything on a new example for translating Ecore models to UML2 class diagrams. If everything goes well, I expect that we can make a new release in the next 2 weeks. If you find bugs, please post them on the mailing list.

Cheers,
Christian



Back to the top