190 likes | 341 Views
Generative Software Development Lab http://gp.uwaterloo.ca. Round-trip Engineering of Eclipse Plug-ins using Eclipse Workbench Part Interaction FSML. Micha ł Antkiewicz , Krzysztof Czarnecki {mantkiew, kczarnec}@swen.uwaterloo.ca OOPSLA’06. Outline. Eclipse Workbench Part Interaction (WPI)
E N D
Generative Software Development Lab http://gp.uwaterloo.ca Round-trip Engineering of Eclipse Plug-ins using Eclipse Workbench Part Interaction FSML Michał Antkiewicz, Krzysztof Czarnecki {mantkiew, kczarnec}@swen.uwaterloo.ca OOPSLA’06
Outline • Eclipse Workbench Part Interaction (WPI) • Domain • Models • Framework-Specific Modeling Languages (FSMLs) • WPI FSML • Round-trip engineering • Prototype demonstration
Workbench requires adapter listens to selections listens to parts provides selection CompilationUnit editor ContentOutline view PartService PageSelectionService
Framework Code Workbench PartService PageSelectionService Completion Code CompilationUnit.java ContentOutline.java plugin.xml WPI Model CompilationUnit editor requires adapter listens to selections ContentOutline view listens to parts provides selection PageSelectionService PartService The model and the code
Eclipse Workbench Part Interaction FSML • A Framework-Specific Modeling Language • Is a Domain-Specific Modeling Language • Designed for • an area of concern (e.g., Part Interaction) • of an OO framework (e.g., Eclipse Workbench) • WPI FSML defines • Concepts (e.g., editor, view, requires adapter) • Features (e.g., implementsIEditorPart, partId, multiPage) • Mappings • concepts, features and framework API • forward & reverse
Example Concept: editor • Implementation steps and choices made explicit Every editor is a class with a name and qualifier Every editor has to implement IEditorPart interface An editor can optionally be multi-page, in which case it has to extend MultiPageEditorPart Optional contributor of a multi-page editor, if present, has to extend MultiPageActionBarContributor
Example Concept Instance • Concept defines all valid concept instances Class testPlugin.ui.SampleEditor implements the instance selected partId feature and provided value eliminated multiPage feature
Agile Round-Trip Engineering Java FSML asserted model last-reconciled model framework completion code comparison reverse engineering implementation model identified changes persistent artifact temporary artifact data flow automatic process
Prototype Demonstration Eclipse Workbench Part Interaction FSML
Reverse Engineering Create a model for existing code
Model-Code Reconciliation Reconcile changes made to the model and to the code
Specification of a new editor Create new instance of editor in the model and create implementation in the code
Specification of a new requires adapter interaction Create new instance of requires adapter interaction in the model and create implementation in the code
Implementation of a new listens to selections interaction Create new instance of listens to selections interaction in the code and update the model
Fixing broken instance of the listens to selections interaction Remove implementation of a mandatory feature sourceDeregistersWithService. Update and validate the model and fix the error.
Reconfiguration of existing editor. Addition of multiPage feature Add multiPage feature to the editor. Enforce the feature in the code.
Conclusion • Prototype of WPI FSML • FSMLs enable automatic round-trip engineering • Lightweight modeling • Keeping the model and the code consistent • Allowing customization • FSMLs help with framework-instantiation • Creating, modifying and recognizing concept instances in the code
Resources • Framework-Specific Modeling Languages with Round-Trip Engineering. MoDELS’06 • On-line demonstration, Technical Reporthttp://gp.uwaterloo.ca/ • Round-Trip Engineering of Eclipse Plug-ins Using Eclipse Workbench Part Interaction FSML. OOPSLA’06