ELEMENTTYPES CONFIGURATION FRAMEWORK

Similar documents
PAPYRUS FUTURE. CEA Papyrus Team

Dominique Blouin Etienne Borde

CODE ANALYSES FOR NUMERICAL ACCURACY WITH AFFINE FORMS: FROM DIAGNOSIS TO THE ORIGIN OF THE NUMERICAL ERRORS. Teratec 2017 Forum Védrine Franck

OMG SPECIFICATION DEVELOPMENT USING PAPYRUS (AND OTHER ECLIPSE TOOLING)

Dominique Blouin Etienne Borde

SYSTEM MODELING Introduction

Modules v4. Pushing forward user environment management. Xavier Delaruelle FOSDEM 2018 February 4th 2018, ULB, Bruxelles

CISC836: Models in Software Development: Methods, Techniques and Tools

ASSEMBLY OF THE IFMIF CRYOMODULE

USING PAPYRUS IN A DESIGN SPACE EXPLORATION TOOLCHAIN CURRENT DEVELOPMENTS AT FLANDERS MAKE

VISION FOR AUTOMOTIVE DRIVING

Efficient Application Mapping on CGRAs Based on Backward Simultaneous Scheduling / Binding and Dynamic Graph Transformations

Metamodeling with Metamodels. Using. UML/MOF including OCL

GMF Tooling 3.0 Vision, Architecture, Roadmap

Modules v4. Yes, Environment Modules project is not dead. Xavier Delaruelle

HIGH PERFORMANCE LARGE EDDY SIMULATION OF TURBULENT FLOWS AROUND PWR MIXING GRIDS

REAL-TIME ADAPTIVE IMAGING FOR ULTRASONIC NONDESTRUCTIVE TESTING OF STRUCTURES WITH IRREGULAR SHAPES

Papyrus: Advent of an Open Source IME at Eclipse (Redux)

Integration of UML Profiles into the SiDiff and SiLift Tools

DATA-MANAGEMENT DIRECTORY FOR OPENMP 4.0 AND OPENACC

Papyrus 2.0 Migration Guide

ALICE. Double Chooz. Irfu. Interpreting radiations from the Universe. Site report 2017 IRFU ARNAB SINHA

SDN-BASED CONFIGURATION SOLUTION FOR IEEE TIME SENSITIVE NETWORKING (TSN)

FROM RESEARCH TO INDUSTRY. RobinHood v3. Robinhood User Group Thomas Leibovici 16 septembre 2015

Systematic Generation of Standard Compliant Tool Support of Diagrammatic Modeling Languages

Modellierung operationaler Aspekte von Systemarchitekturen. Master Thesis presentation. October 2005 March Mirko Bleyh - Medieninformatik

Evolving Frama-C Value Analysis

Next Generation CEA Computing Centres

ECLIPSE MODELING PROJECT

Horváth Ákos Bergmann Gábor Dániel Varró István Ráth

Eclipse Modeling Framework (EMF) Paweł Żalejko

Kermeta tutorial. How to create an EMF meta model? François Tanguy, Didier Vojtisek, Zoé Drey, Marie Gouyette. Abstract

Model-based System Engineering for Fault Tree Generation and Analysis

Capella to SysML Bridge: A Tooled-up Methodology for MBSE Interoperability

How to apply EMF model refactorings

Model-Level Integration of the OCL Standard Library Using a Pivot Model with Generics Support

Introduction to MDE and Model Transformation

BLU AGE 2009 Edition Agile Model Transformation

with openarchitectureware

Slurm at CEA. status and evolutions. 13 septembre 2013 CEA 10 AVRIL 2012 PAGE 1. SLURM User Group - September 2013 F. Belot, F. Diakhaté, M.

Metamodeling. Janos Sztipanovits ISIS, Vanderbilt University

1 Overview. 1 Overview. Contents. 1.1 Table of Contents Table of Contents

EXECUTABLE MODELING WITH FUML AND ALF IN PAPYRUS: TOOLING AND EXPERIMENTS

Design and Prototypical Implementation of a Pivot Model as Exchange Format for Models and Metamodels in a QVT/OCL Development Environment

On the link between Architectural Description Models and Modelica Analyses Models

Combination of Parallel Imaging and Compressed Sensing for high acceleration factor at 7T

BINARY-LEVEL SECURITY: SEMANTIC ANALYSIS TO THE RESCUE

MANAGING LUSTRE & ITS CEA

Towards Automatic Generation of UML Profile Graphical Editors for Papyrus

How to generate new EMF model refactorings using Java code

GMF Tutorial Part 3 - Eclipsepedia

UML PROFILING AND DSL

EMFT 1.0 Release Review (OCL, Query, Transaction, and Validation)

Applying UML Modeling and MDA to Real-Time Software Development

Integrating TwoUse and OCL- DL

On Using UML Profiles in ATL Transformations

Static analysis and testing of executable DSL specification

Small is Beautiful Building a flexible software factory using small DSLs and Small Models

Unified Modeling Language 2

RobinHood Project Update

Model Querying with Graphical Notation of QVT Relations

RobinHood Project Status

SENSINACT - HORIZONTAL OPEN PLATFORM FOR AN INTEROPERABLE IOT WORLD

Language engineering and Domain Specific Languages

Kermeta tutorial. How to create a metamodel. François Tanguy, Didier Vojtisek. Abstract

(Meta)Models between MetaEdit+

Towards the integration of security patterns in UML Component-based Applications

Plan. Language engineering and Domain Specific Languages. Language designer defines syntax. How to define language

Model Driven Engineering (MDE) and Diagrammatic Predicate Logic (DPL)


Introducing Simulation and Model Animation in the MDE Topcased 1 Toolkit

Softwaretechnik Model Driven Architecture Meta Modeling

Embedded OCL Integration and Debugging

GOING ARM A CODE PERSPECTIVE

IDERA ER/Studio Software Architect Evaluation Guide. Version 16.5/2016+ Published February 2017

MAENAD Modeling Workbench

MAEANAD Modeling Workbench

Eclipse Automotive Working Group

An EMF Framework for Event-B

IncQuery for MagicDraw Quick Start Guide

Model-based Software Engineering (02341, Spring 2017) Ekkart Kindler

An Implementation of the Behavior Annex in the AADL-toolset Osate2

The Architecture of a UML Virtual Machine

The Case for Meta-modeling Frameworks Specialisation

Model-Driven Engineering (MDE) Lecture 2: Semantics. Regina Hebig, Thorsten Berger

Model-Driven Engineering An introduction to the EMF facilities

Model-Independent Differences

Blazo Nastov. Journée des doctorant, Nîmes, France 19 June 2014

ATESST2 D4.2.1 Grant Agreement

Orccad, a Model Driven Architecture and Environment for Real-Time Control. Soraya Arias Florine Boudin Roger Pissard-Gibollet Daniel Simon

Pervasive and Mobile Computing. Context modelling and a context-aware framework for pervasive service creation: A model-driven approach

TECHNICAL REPORT Methods for Testing and Specification (MTS); The Test Description Language (TDL); Reference Implementation

Planned Review Date: June 10, 2009 Communication Channel: eclipse.tools.emf Dave Steinberg and Ed Merks

Tool Paper: Combining Alf and UML in Modeling Tools An Example with Papyrus

SysML Past, Present, and Future. J.D. Baker Sparx Systems Ambassador Sparx Systems Pty Ltd

Towards using OWL DL as a metamodelling framework for ATL

Model-Driven Development of Simulation-Based System Design Tools

Diagram Definition: a Case Study with the UML Class Diagram

Tiger EMF Model Transformation Framework (EMT)

CONCERNS The designer functionally assembles basic services. The designer executes tasks. The developer writes basic services in a language.

Transcription:

ELEMENTTYPES CONFIGURATION FRAMEWORK Florian NOYRIT florian.noyrit@cea.fr

AGENDA Why such a framework? The Basics How is it used in Papyrus? The Association Example ElementTypeConfiguration for DSML designers ElementTypes and Diagrams Advanced Elementtype configuration Further developments

WHY SUCH A FRAMEWORK?

MOTIVATING EXAMPLE UML2 API provides low level metamodel edition facilities : Example of the creation of a Association : Create an Association : association = UMLFactory.eINSTANCE.createAssociation(); Name it association1 association.setname( association1 ); Create the member ends p1 = UMLFactory.eINSTANCE.createProperty(); p2 = UMLFactory.eINSTANCE.createProperty(); Set the member ends assoc.getmemberends().add( ) Type the member ends, set the multiplicities,

WHAT ABOUT REORIENTING THE ASSOCIATION Class1 Class2 p1:class1 p2:class2 Let say you reorient the association from Class2 to Class3. What should be done on the UML model? Class3 5

BASICS

ELEMENT TYPE High level Requests Element Type Framework Element Type Registry Commands 7

HIGH LEVEL REQUESTS IEditCommandRequest AbstractEditCommandRequest ConfigureRequest DestroyRequest CreateElementRequest CreateRelationshipRequest GetEditContextRequest MoveRequest ReorientRequest DestroyDependentsRequest DestroyElementRequest DestroyReferenceRequest DuplicateElementsRequest UnsetRequest SetRequest ReorientReferenceRelationshipRequest ReorientRelationshipRequest 8

HOW COMMANDS ARE COMPUTED BY THE FRAMEWORK 1. Find the elementtype corresponding to the element being edited Use the matchers to find the appropriate one. 2. Get the base command (from the specialized metamodeltype) 3. Look for advices that are bound to the elementtype. 4. Produce the final command: base command surrounded by the pre and post actions from the advices bound to the elementtype. Element Type Registry MetamodelType * SpecializationType Matcher specializes 0..1 Advices * (pre and post actions) 1

BASE COMMANDS : THE EDITHELPERS Methods to override to provide the appropriate commands Details : org.eclipse.gmf.runtime.emf.type.core.edithelper.abstractedithelper 10

PRE AND POST ACTIONS : ADVICES USING THE EDITHELPERADVICES Methods to override to define the pre or post actions Details : org.eclipse.gmf.runtime.emf.type.core.edithelper.abstractedithelperadvice 11

HOW IS IT USED IN PAPYRUS?

ELEMENTTYPECONFIGURATION ARCHITECTURE Usecase UML Diagram Class UML Diagram UML Diagrams UML Diagrams UML Diagrams SysML Diagrams UML Types (org.eclipse.papyrus.uml.service.types) SysML Types (org.eclipse.papyrus.sysml.service.types) ElementTypesConfigurations Framework (org.eclipse.papyrus.infra.elementtypesconfigurations) GMF ElementTypes 13

IMPLEMENTATION DETAILS UML Diagrams diagram.elementtype configuration specializes UML Types (org.eclipse.papyrus.uml.service.types) uml.elementtype configuration Helpers.java EditHelpers.java Helpers.java Advices.java Conforms to Elementtypeconfiguration.ecore ElementTypesConfigurations Framework (org.eclipse.papyrus.infra.elementtypesconfiguration) GMF ElementTypes 14

THE ASSOCIATION EXAMPLE

ELEMENTTYPECONFIGURATION FOR DSML DESIGNERS

AN ELEMENTTYPE FOR A STEREOTYPE Create specific element type that will handle a domain specific concept identified by a specific stereotype Let say, there is an OCL constraint that enforces the class stereotyped by "MyClass to be active 18

CREATE YOUR OWN SPECIALIZATIONTYPE Create an Elementtypesconfigurations model (e.g. tutorial.elementtypesconfigurations) Create one ElementTypeConfigurationSet Add a specialization type 19

CREATE YOUR OWN SPECIALIZATIONTYPE Create an advice and set the qualifiedname of the class 20

CREATE YOUR OWN SPECIALIZATIONTYPE Develop the advice: @Override protected ICommand getafterconfigurecommand(configurerequest request) { ICommand resultcommand = null; EObject elementtoconfigure = request.getelementtoconfigure(); if (elementtoconfigure instanceof org.eclipse.uml2.uml.class) { resultcommand = new AbstractTransactionalCommand(editingDomain, "Editing type", Arrays.asList((WorkspaceSynchronizer.getFile(elementToConfigure.eResource())))) { }; @Override protected CommandResult doexecutewithresult(iprogressmonitor monitor, IAdaptable info) throws ExecutionException { ((org.eclipse.uml2.uml.class) elementtoconfigure).setisactive(true); return CommandResult.newOKCommandResult(elementToConfigure); } return resultcommand.reduce(); } 21

CREATE YOUR OWN SPECIALIZATIONTYPE How to use the Stereotype information? Add an advice that will apply the stereotype as a post action? Add a matcher to the elementtype that will fire when the stereotype is applied to a model element? 22

CREATE YOUR OWN SPECIALIZATIONTYPE Declare the elementtype model using the org.eclipse.papyrus.infra.elementtypesconfigurations.elementtypesetconfiguration extension point 23

ELEMENTTYPES AND DIAGRAMS

USE ELEMENTTYPES IN DIAGRAM EDITORS ElementTypes are mostly UML model edition information Nevertheless, diagram editors will ask how the elementtype should be represented : the Semantic Hint 1. A creation tool is selected by user in the palette 2. The user clicks somewhere in the diagram (the context) 3. Two commands are prepared 1. The semantic command (using the elementtype framework as presented before) 2. The graphical command (using viewpoviders) 4. If both the semantic and graphical command are executable, the element is created in the UML model and the diagrammatic representation is added to the diagram. Viewprovider Semantic Hint Context knows what graphical representation (semantic hint) can be in what graphical representation (context) View 25

VIEWPROVIDERS AND HINTS Where can I find the hints provided by a given diagram in Papyrus? in the gmfgen model of this diagram 26

Set the hint found in the class diagram to the elementtype 27

ADVANCED ELEMENTTYPE CONFIGURATION

EXTENSION OF THE FRAMEWORK For example, a StereotypeElementType (that will have a predefined advice and matcher): 1. Create an extension of the elementtypeconfiguration metamodel: an ecore metamodel with an eclass that inherits from SpecializationTypeConfiguration (and generate the implementation with creation extenders) 2. Contribute this new type of elementtype with the org.eclipse.papyrus.infra.elementtypesconfigurations.elementtypeco nfigurationtype extension point <elementtypeconfigurationtype configurationclass="org.eclipse.papyrus.elementtypesconfiguration.tutorial.stereotypee lementtype.stereotypeelementtype" factoryclass="org.eclipse.papyrus.elementtypesconfiguration.tutorial.elementtypeconfig urationfactory"> </elementtypeconfigurationtype> 29

EXTENSION OF THE FRAMEWORK 2. Contribute this new type of elementtype with the org.eclipse.papyrus.infra.elementtypesconfigurations.elementtypeco nfigurationtype extension point 1. Define the elementtype type metaclass that extends the framework (i.e. configurationclass) 2. Define the interpreter extension (i.e. the factoryclass) 30

EXTENSION OF THE FRAMEWORK 3. Implement the elementtypeconfiguration framework interpreter 1. Override the factory to predefine an advice that applies the stereotype public class StereotypeElementTypeFactory extends SpecializationTypeFactory { @Override protected IEditHelperAdvice getedithelperadvice(specializationtypeconfiguration elementtypeconfiguration) { 1 } // Override the factory to predefine an advice that applies the stereotype @Override protected IElementMatcher createelementmatcher(specializationtypeconfiguration configuration) { 2 } //Override the factory to predefine a matcher that fires on the stereotype } 31

FURTHER DEVELOPMENTS

NEW FEATURES COMING New high-level requests Profile related requests (e.g. stereotype application) Contextualized elementtypes Separate elementtypes by specific domain Have different registry depending on the specific domain Enriched the elementtype predefined types, the matched predefined types and the predefined advices types 34

THANK YOU FOR YOUR ATTENTION Commissariat à l énergie atomique et aux énergies alternatives Centre de Saclay 91191 Gif-sur-Yvette Cedex DRT/LIST DILS LISE Etablissement public à caractère industriel et commercial RCS Paris B 775 685 019