ECLIPSE MODELING PROJECT

Similar documents
PYTHON. p ykos vtawynivis. Second eciitiovl. CO Ve, WESLEY J. CHUN

The Unified Modeling Language User Guide

World Wide Web PROGRAMMING THE PEARSON EIGHTH EDITION. University of Colorado at Colorado Springs

ECLIPSE RICH CLIENT PLATFORM

Domain-Specific. Languages. Martin Fowler. AAddison-Wesley. Sydney Tokyo. With Rebecca Parsons

Xcode 6 Start to Finish

Refactoring HTML. Improving the Design of Existing Web Applications. Elliotte Rusty Harold. TT rvaddison-wesley

Eclipse Plug-ins. Third Edition

Programming. In Ada JOHN BARNES TT ADDISON-WESLEY

Fit for Developing Software

JAVASCRIPT FOR PROGRAMMERS

Eclipse Building Commercial-Quality Plug-ins Second Edition

Quality Code. Software Testing Principles, Practices, and Patterns. Stephen Vance. AAddison-Wesley

Programming in Python 3

SQL Queries. for. Mere Mortals. Third Edition. A Hands-On Guide to Data Manipulation in SQL. John L. Viescas Michael J. Hernandez

The Power of Events. An Introduction to Complex Event Processing in Distributed Enterprise Systems. David Luckham

Virtualization from the Trenches

\ Smart Client 0" Deploymentwith v^ ClickOnce

Cloud Computing and SOA Convergence in Your Enterprise

MariaDB Crash Course. A Addison-Wesley. Ben Forta. Upper Saddle River, NJ Boston. Indianapolis. Singapore Mexico City. Cape Town Sydney.

Introduction to MDE and Model Transformation

ATHABASCA UNIVERSITY RULE ENHANCED BUSINESS PROCESS MODELING OF SERVICE ORIENTED ARCHITECTURES LUIS ROCHA. A project submitted in partial fulfillment

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

OpenGL SUPERBIBLE. Fifth Edition. Comprehensive Tutorial and Reference. Richard S. Wright, Jr. Nicholas Haemel Graham Sellers Benjamin Lipchak

Developer's HTML5. Cookbook. AAddison-Wesley. Chuck Hudson. Tom Leadbetter. Upper Saddle River, NJ Boston Indianapolis San Francisco

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

with openarchitectureware

Rails AntiPatterns. Chad Pytel. Best Practice Ruby on Rails Refactoring. Tammer Saleh. AAddison-Wesley

CLASSIC DATA STRUCTURES IN JAVA

PeopleSoft PeopleTools Tips & Techniques

FUNDAMENTALS OF. Database S wctpmc. Shamkant B. Navathe College of Computing Georgia Institute of Technology. Addison-Wesley

Comparing graphical DSL editors

Introduction to OpenArchitectureWare

"Charting the Course... SharePoint 2007 Hands-On Labs Course Summary

The Eclipse Modeling Framework and MDA Status and Opportunities

Application Programming

The Galilean Moons of Eclipse

Systems:;-'./'--'.; r. Ramez Elmasri Department of Computer Science and Engineering The University of Texas at Arlington

Introduction to the Generic Eclipse Modeling System by Jules White

GMF Tooling 3.0 Vision, Architecture, Roadmap

PROBLEM SOLVING USING JAVA WITH DATA STRUCTURES. A Multimedia Approach. Mark Guzdial and Barbara Ericson PEARSON. College of Computing

Database Concepts. David M. Kroenke UNIVERSITATSBIBLIOTHEK HANNOVER

Essentials. Oracle Solaris Cluster. Tim Read. Upper Saddle River, NJ Boston Indianapolis San Francisco. Capetown Sydney Tokyo Singapore Mexico City

Graphical Editors 2. GMF. Budapes( Műszaki és Gazdaságtudományi Egyetem Méréstechnika és Információs Rendszerek Tanszék

Essentials of Database Management

Sequence Diagram Generation with Model Transformation Technology

DRAFT. Consolidation of the Generator Infrastructure MDGEN Model Driven Generation

Introduction to Dependable Systems: Meta-modeling and modeldriven

Modern C++ Design. Generic Programming and Design Patterns Applied. Andrei Alexandrescu. AAddison-Wesley

New and Noteworthy. Peter Friese Bernd Kolb

Proceedings of the 6th Educators Symposium: Software Modeling in Education at MODELS 2010 (EduSymp 2010)

Framework Design Guidelines

VERIFICATION AND VALIDATION FOR QUALITY OF UML 2.0 MODELS

Computation Independent Model (CIM): Platform Independent Model (PIM): Platform Specific Model (PSM): Implementation Specific Model (ISM):

Agile Model-Driven Development with UML 2.0 SCOTT W. AM BLER. Foreword by Randy Miller UNIFIED 1420 MODELING LANGUAGE. gile 1.

The Java Tutorial. A Short Course on the Basics. Raymond Gallardo. Sowmya Kannan. AAddison-Wesley. Sharon Biocca Zakhour.

PAPYRUS FUTURE. CEA Papyrus Team

MEMOCenterNG A full-featured modeling environment for organization modeling and model-driven software development

FREQUENTLY ASKED QUESTIONS

A universal PNML Tool. Lukasz Zoglowek

Objects First with Java

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

Agile Principles, Patterns, and Practices in C#

Digital System Design with SystemVerilog

Model transformations. Overview of DSLE. Model transformations. Model transformations. The 4-layer architecture

Model transformations. Model transformations. Model transformations. Model transformations

Towards Generating Domain-Specific Model Editors with Complex Editing Commands

Microsoft Visual Studio 2010

A Comparison of Ecore and GOPPRR through an Information System Meta Modeling Approach

The Case for Meta-modeling Frameworks Specialisation

Dominique Blouin Etienne Borde

Programming. Principles and Practice Using C++ Bjarne Stroustrup. / Addison-Wesley. Second Edition

DATA ABSTRACTION AND PROBLEM SOLVING WITH JAVA

Christian Doppler Laboratory

GMF 2.0 Europa Simultaneous Release

Programming Guide. Aaftab Munshi Dan Ginsburg Dave Shreiner. TT r^addison-wesley

Prelude to Programming

Introduction to EGF. Benoît Langlois / Thales Global Services.

Access ComprehGnsiwG. Shelley Gaskin, Carolyn McLellan, and. Nancy Graviett. with Microsoft

Model-Driven Iterative Development of 3D Web-Applications Using SSIML, X3D and JavaScript

Experimental transformations between Business Process and SOA models

Eclipse technology in IFMS Interface Management System

Programming Wireless Devices with the Java 2 Platform, Micro Edition

Model driven Engineering & Model driven Architecture

Model Transformations for Embedded System Design and Virtual Platforms

Deep Dive. Cloud Control 12c. Oracle Enterprise Manager ORACLG. Oracle Press. Michael New Edward Whalen Matthew Burke. London Madrid Mexico City Milan

Architect Exam Guide. OCM EE 6 Enterprise. (Exams IZO-807,1ZO-865 & IZO-866) Oracle Press ORACLG. Paul R* Allen and Joseph J.

DB2 SQL Tuning Tips for z/os Developers

Fundamentals of. Database Systems. Shamkant B. Navathe. College of Computing Georgia Institute of Technology PEARSON.

Language engineering and Domain Specific Languages

Using Eclipse in MIS Research

THE AVR MICROCONTROLLER AND EMBEDDED SYSTEMS. Using Assembly and С

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

Modern C++ Design. Generic Programming and Design Patterns Applied. Andrei Alexandrescu. .~Addison-Wesley

SAP' ABAP. Handbook. Kogent Learning Solutions, Inc. Sudbury, Massachusetts JONES AND BARTLETT PUBLISHERS BOSTON TORONTO LONDON SINUAPORI:

A Model-Driven Framework for Domain Specific Process Design and Governance

foreword to the first edition preface xxi acknowledgments xxiii about this book xxv about the cover illustration

Deliverable D4.2. SHAPE MDE Toolset User s Guide

Introduction to Model Driven Engineering using Eclipse. Frameworks

Index. Symbols. /**, symbol, 73 >> symbol, 21

Transcription:

ECLIPSE MODELING PROJECT A Domain-Specific Language Toolkit Richard С. Gronback AAddison-Wesley Upper Saddle River, NJ Boston Indianapolis San Francisco New York Toronto Montreal London Munich Pans Madrid Cape Town Sydney Tokyo Singapore Mexico G'fy

Contents Foreword Preface Acknowledgments About the Author xix xxi xxiii XXV Part 1 О Introduction Chapter 1 Introduction 1.1 About Modeling 1.2 Domain-Specific Languages 1.2.1 Why Develop a DSU 1.3 Model-Driven Software Development 1.4 Software Product Lines and Factories 1.5 The Eclipse Modeling Project 1.5.1 Abstract Syntax Development 1.S.2 Concrete Syntax Development 1.5.3 Model Transformation 1.5.4 Model Development Tools (MDT) 1.5.5 Generative Modeling Technologies 1.5.6 Amalgamation 1.5.7 Project Interaction 1.6 Summary Chapter 2 Modeling Project as a DSL Toolkit 2.1 Installation 2.2 The Sample Projects 2.3 Summary / 3 3 5 6 7 7 8 10 12 12 13 15 15 15 16 17 20 20 26

VIII Contents Part II О Developing Domain-Specific Languages 27 Chapter 3 Developing a DSL Abstract Syntax 29 3.1 DSL Considerations 29 3.2 Eclipse Modeling Framework 31 3.2.1 Ecore Metamodel 32 3.2.2 Runtime Features 33 3.2.3 Code Generation 34 3.2.4 Applying OCL 35 3.2.5 Dynamic Instances 38 3.3 Developing the Mindmap Domain Model 39 3.3.1 Project Setup 40 3.3.2 Creating the Mindmap Domain Model 41 3.3.3 Creating the Mindmap Generator Model 42 3.3.4 Generate and Run 43 3.3.5 Adding OCL 45 3.4 Developing the Requirements Domain Model 47 3.4.1 Requirements Generator Model 48 3.5 Developing the Scenario Domain Model 50 3.6 Developing the Business Domain Model 51 3.7 Summary 54 Chapter 4 Developing a DSL Graphical Notation 55 4.1 Design Considerations 55 4.1.1 Notation Design 56 4.1.2 Filters and Layers 57 4.1.3 Layout 58 4.1.4 Synchronization 59 4.1.5 Shortcuts 59 4.2 Graphical Modeling Framework 59 4.2.1 GMF Runtime Component 60 4.2.2 GMF Tooling Component 61 4.2.3 Customization Options 65

4.2.4 Dashboard 66 4.2.5 Sample Application Diagrams 67 4.3 Developing the Mindmap Diagram 67 4.3.1 Mindmap Graphical Definition 68 4.3.2 Mindmap Tooling Definition 69 4.3.3 Mindmap Mapping Model 70 4.3.4 Mindmap Generator Model 74 4.3.5 Improving the Mindmap Diagram 76 4.4 Developing a Requirements Diagram 104 4.4.1 Diagram Definition 104 4.4.2 Tooling Definition 107 4.4.3 Mapping Definition 107 4.4.4 Generation 113 4.4.5 ToolTips 114 4.4.6 Integrating EMF and GMF Editors 122 4.5 Developing the Scenario Diagram 145 4.5.1 Graphical Definition 145 4.5.2 Tooling Definition 159 4.5.3 Mapping Definition 161 4.5.4 Generation 166 4.5.5 Generating the Figures Plug-In 168 4.5.6 Diagram Partitioning 171 4.5.7 Database Persistence 177 4.6 Developing the Color Modeling Diagram 181 4.6.1 Diagram Definition 182 4.6.2 Tooling Definition 189 4.6.3 Mapping Definition 190 4.6.4 Generation 201 4.6.5 Gradient Figures 201 4.6.6 Color Preferences 205 4.6.7 Custom Parsers 220 4.7 Summary 225

X Contents Chapter 5 Developing a DSL Textual Syntax 22 7 5.1 Xtext 228 5.2 TCS 229 5.3 Summary 229 Chapter 6 Developing Model-to-Model Transformations 231 6.1 Transformation Techniques 231 6.2 Model Refactoring 232 6.3 Model Migration 233 6.4 Model Merge 237 6.5 M2M QVT Operational Mapping Language 238 6.5.1 QVT Project 238 6.5.2 QVT OML Editor 240 6.5.3 Metamodel Explorer 240 6.5.4 Launch Configuration 240 6.5.5 Trace Model 242 6.5.6 Leveraging OCL in EMF Models 243 6.5.7 Ant Tasks 243 6.6 Transforming a Mindmap to Requirements 244 6.7 Transforming a Mindmap to XHTML 251 6.7.1 Importing an XSD 252 6.7.2 Creating the mindmap2xhtml QVT 253 6.8 Transforming a Scenario to a Test Case 258 6.9 Transforming a Business Model to Java 264 6.10 Summary 276 Chapter 7 Developing Model-to-TextTransformations 277 7.1 M2T Project 277 7.1.1 Xpand, Xtend, and Workflow Components 278 7.2 Generating CSV Files 281 7.3 Generating Java 282 7.3.1 Using Java Model and Dedicated Template 283

Contents XI 7.3.2 Using the DNC Model with Templates 291 7.4 Generating HTML 297 7.5 Summary 302 Chapter 8 DSL Packaging and Deployment 303 8.1 Deployment Preparation 303 8.1.1 Artwork 304 8.1.2 Developing a User Interface Plug-In 305 8.1.3 Generation Models 310 8.2 Defining a Product 312 8.2.1 Deploying Source 312 8.3 Summary 313 Part III О Reference 315 Chapter 9 Graphical Editing Framework 317 9.1 Draw2d 318 9.1.1 Figures 318 9.1.2 Text 319 9.1.3 Painting 320 9.1.4 Layout 322 9.1.5 Connections and Routing 322 9.1.6 Coordinate Systems 323 9.2 GEF 324 9.2.1 EditParts 325 9.2.2 Creating the Graphical View 326 9.2.3 Editing 331 9.2.4 The EditPart Life Cycle 334 9.2.5 Tools and the Palette 337 9.2.6 Interactions 338 9.3 Summary 352

XII Contents Chapter 10 Graphical Modeling Framework Runtime 353 10.1 Overview 353 10.1.1 General Diagram Features 354 10.2 Notation Model 369 10.3 Extensibility Mechanisms 372 10.3.1 Extension-Points 373 10.4 Services 375 10.4.1 ViewService 378 10.4.2 EditPartService 382 10.4.3 EditPolicyService 385 10.4.4 Palette Service 387 10.4.5 Decoration Service 392 10.4.6 IconService 396 10.4.7 MarkerNavigationService 399 10.4.8 ParserService 401 10.4.9 ModelingAssistantService 403 10.4.10 LayoutService 406 10.4.11 ContributionltemService 408 10.4.12 GlobalActionHandlerService 419 10.4.13 ActionFilterService 423 10.4.14 EditorService 42 7 10.4.15 ElementSelectionService 42 8 10.4.16 PropertiesService 43 0 10.4.17 PropertiesModifierService 433 10.4.18 DragDropListenerService 435 10.4.19 Transfer Adapter Service 438 10.4.20 DiagramEvenBroker Service 441 10.5 Additional Extension-Points 443 10.5.1 ElementTypes 443 10.5.2 ElementTypeBindings 449 10.5.3 LogListeners 452 10.5.4 PropertiesConfigurations 453

Contents хш 10.5.5 Document Providers 453 10.5.6 RenderedlmageFactory 456 10.5.7 ClipboardSupport 457 10.5.8 Pathmaps 458 10.6 Element Creation 459 10.7 Command Infrastructure 462 10.7.1 Command Infrastructure 463 10.7.2 Model Element Command Infrastructure 463 10.8 Developing a Diagram 466 10.8.1 Essential Diagram Elements 466 10.8.2 Configuring the Properties View 476 10.8.3 Connections 479 10.8.4 Comparison to Generated Diagram 485 10.9 Extending Diagrams 486 10.9.1 Scenario Diagram Custom View and Edit Providers 486 10.9.2 Custom Style 490 10.9.3 Custom EditPolicy 493 10.9.4 Custom Decorator 497 10.10 Beyond GEF and Draw2d 500 10.11 Summary 502 Chapter 11 Graphical Modeling Framework Tooling 503 11.1 Graphical Definition Model 503 11.1.1 The Canvas 506 11.1.2 The Figure Gallery 506 11.1.3 Diagram Elements 516 11.2 Tooling Definition Model 518 11.3 Mapping Model 519 11.3.1 Canvas Mapping 520 11.3.2 Top Node Reference 521 11.3.3 Node Mapping 522 11.3.4 Feature Initialization 527

XIV Contents 11.3.5 Implementing Side-Affixed Nodes (Pins and Ports) 11.3.6 Link Mapping 11.3.7 Audits and Metrics 11.4 Generator Model 11.4.1 Gen Editor Generator 11.4.2 Gen Diagram 11.4.3 Gen Link 11.4.4 Custom Behavior 11.4.5 Open Diagram Behavior 11.4.6 Gen Plugin 11.4.7 Gen Editor View 11.4.8 Gen Navigator 11.4.9 Gen Diagram Updater 11.4.10 Property Sheet 11.4.11 Gen Application 11.5 Summary Chapter 12 Graphical Modeling Framework FAQs 12.1 General FAQs 12.2 Diagramming FAQs 12.3 Tooling FAQs 12.4 Summary Chapter 13 Query/View/Transformation Operational Mapping Language 13.1 Transformation Declaration 13.1.1 In-Place Transformations 13.1.2 Extends and Access 13.1.3 Intermediate Elements 13.1.4 Configuration Properties 13.1.5 Renaming Elements 13.1.6 Predefined Variables 13.1.7 Null 528 529 532 533 534 536 539 539 539 540 540 541 542 542 543 543 545 545 546 547 548 549 550 553 553 554 555 555 555 556

Contents xv Chapter 14 13.2 Libraries 13.3 Mapping Operations 13.3.1 Mapping Body 13.3.2 Entry Operation 13.3.3 Inheritance, Merger, and Disjunction 13.4 Helper Operations 13.5 Implementing Operations 13.5.1 Operations and Iterators 13.5.2 Imperative Operations 13.5.3 Imperative Iterate Expressions 13.5.4 Object Creation and Population 13.5.5 Mapping Invocation 13.5.6 Resolution Operators 13.5.7 Executing Transformations 13.6 Library Operations 13.6.1 Object Operations 13.6.2 Element Operations 13.6.3 Model Operations 13.6.4 List Operations 13.6.5 Numeric Type Operations 13.6.6 String Operations 13.7 Syntax Notes 13.7.1 Comments 13.7.2 Strings 13.7.3 Shorthand 13.7.4 OCL Synonyms 13.8 Simple UML to RDBMS Example 13.9 Summary Xpand Template Language 14.1 Xpand Language 14.1.1 IMPORT 14.1.2 DEFINE 556 556 558 559 560 562 563 563 565 566 568 570 571 575 577 577 578 580 582 583 583 593 593 594 594 596 596 604 605 606 606 607

XVI Contents 14.1.3 EXPAND 14.1.4 FILE 14.1.5 FOREACH 14.1.6 EXTENSION 14.1.7 IF 14.1.8 PROTECT 14.1.9 LET 14.1.10 ERROR 14.1.11 REM 14.1.12 AROUND 14.1.13 Type System 14.1.14 Expression Language 14.1.15 Xtend Language 14.1.16 Workflow Engine 14.2 Summary 608 612 612 613 614 615 615 616 616 617 619 628 636 641 649 Part IV О Appendixes 651 Appendix A Graphical Modeling Framework Key Bindings 653 Appendix В Model-Driven Architecture at Eclipse 661 Implemented Standards 662 Meta-Object Facility (MOF) 662 Unified Modeling Language (UML) 663 Object Constraint Language (OCL) 663 Diagram Interchange (DI) 664 XML Metadata Interchange (XMI) 664 MOF Query/View/Transformation (QVT) 664 MOF Models to Text Transformation Language 664 Human- Usable Textual Notation (HUTN) 665 Business Process Modeling Notation (BPMN) 665 Software Process Engineering Metamodel (SPEM) 666

Contents XVII Working Relationship Membership Specification Delivery Specification Compliance Implementations Influencing Specifications Open and Transparent Nature Future Outlook References Index 666 666 667 668 668 668 669 671 675