19
Round-trip Engineering of Eclipse Plug-ins using Eclipse Workbench Part Interaction FSML Michał Antkiewicz, Krzysztof Czarnecki {mantkiew, kczarnec}@swen.uwaterloo.ca OOPSLA’06 Generative Software Development Lab http://gp.uwaterloo.ca

Round-trip Engineering of Eclipse Plug-ins using Eclipse Workbench Part Interaction FSML

  • Upload
    thane

  • View
    27

  • Download
    0

Embed Size (px)

DESCRIPTION

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) - PowerPoint PPT Presentation

Citation preview

Page 1: Round-trip Engineering of Eclipse Plug-ins using Eclipse Workbench Part Interaction FSML

Round-trip Engineering of Eclipse Plug-ins using Eclipse Workbench Part Interaction FSML

Michał Antkiewicz, Krzysztof Czarnecki

{mantkiew, kczarnec}@swen.uwaterloo.ca

OOPSLA’06

Generative Software Development Labhttp://gp.uwaterloo.ca

Page 2: Round-trip Engineering of Eclipse Plug-ins using Eclipse Workbench Part Interaction FSML

Outline

Eclipse Workbench Part Interaction (WPI) Domain Models

Framework-Specific Modeling Languages (FSMLs) WPI FSML

Round-trip engineering Prototype demonstration

Page 3: Round-trip Engineering of Eclipse Plug-ins using Eclipse Workbench Part Interaction FSML

CompilationUnit editor

ContentOutline view

PageSelectionServicePartService

Workbench

requires adapter

provides selection

listens to selections

listens to parts

Page 4: Round-trip Engineering of Eclipse Plug-ins using Eclipse Workbench Part Interaction FSML

The model and the code

Framework Code Workbench PartService PageSelectionService

Completion Code CompilationUnit.java ContentOutline.java plugin.xml

CompilationUnit editor

ContentOutline view

PageSelectionServicePartService

requires adapter

provides selection

listens to selections

listens to parts

WPI Model

Page 5: Round-trip Engineering of Eclipse Plug-ins using Eclipse Workbench Part Interaction FSML

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

Page 6: Round-trip Engineering of Eclipse Plug-ins using Eclipse Workbench Part Interaction FSML

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

Page 7: Round-trip Engineering of Eclipse Plug-ins using Eclipse Workbench Part Interaction FSML

Example Concept Instance

Concept defines all valid concept instances

selected partId feature and

provided value

eliminated multiPage feature

Class testPlugin.ui.SampleEditor implements the instance

Page 8: Round-trip Engineering of Eclipse Plug-ins using Eclipse Workbench Part Interaction FSML

Agile Round-Trip Engineering

framework completion code

asserted model

reverseengineering

implementation model

comparison

Java FSMLlast-reconciled model

identified changes

persistent artifact temporary artifact data flow automatic process

Page 9: Round-trip Engineering of Eclipse Plug-ins using Eclipse Workbench Part Interaction FSML

Prototype Demonstration

Eclipse Workbench Part Interaction FSML

Page 10: Round-trip Engineering of Eclipse Plug-ins using Eclipse Workbench Part Interaction FSML

Reverse Engineering

Create a model for existing code

Page 11: Round-trip Engineering of Eclipse Plug-ins using Eclipse Workbench Part Interaction FSML

Model-Code Reconciliation

Reconcile changes made to the model and to the code

Page 12: Round-trip Engineering of Eclipse Plug-ins using Eclipse Workbench Part Interaction FSML

Specification of a new editor

Create new instance of editor in the model and create implementation in the code

Page 13: Round-trip Engineering of Eclipse Plug-ins using Eclipse Workbench Part Interaction FSML

Specification of a new requires adapter interaction

Create new instance of requires adapter interaction in the model and create implementation in the code

Page 14: Round-trip Engineering of Eclipse Plug-ins using Eclipse Workbench Part Interaction FSML

Implementation of a new listens to selections interaction

Create new instance of listens to selections interaction in the code and update the model

Page 15: Round-trip Engineering of Eclipse Plug-ins using Eclipse Workbench Part Interaction FSML

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.

Page 16: Round-trip Engineering of Eclipse Plug-ins using Eclipse Workbench Part Interaction FSML

Reconfiguration of existing editor. Addition of multiPage feature

Add multiPage feature to the editor. Enforce the feature in the code.

Page 17: Round-trip Engineering of Eclipse Plug-ins using Eclipse Workbench Part Interaction FSML

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

Page 18: Round-trip Engineering of Eclipse Plug-ins using Eclipse Workbench Part Interaction FSML

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

Page 19: Round-trip Engineering of Eclipse Plug-ins using Eclipse Workbench Part Interaction FSML

Questions?