SlideShare a Scribd company logo
1 of 79
Combining
Graphics and Text
       in
 Modeling Tools
                    Jan Köhnlein
GMF
Graphical
GMF
          Graphical




 Xtext
Textual
GMF
             Graphical


Just two different views
   on the same thing


    Xtext
   Textual
Synchronization
Xtext
Xtext

              Textual Model


        Serializer
                     Parser
                              Node Model



               Ecore Model
                Instance
Xtext
        XtextResource

                     Textual Model


               Serializer
                            Parser
                                     Node Model



                      Ecore Model
                       Instance
Xtext
        XtextResource

                     Textual Model


               Serializer
                            Parser
                                     Node Model



                      Ecore Model
                       Instance




                getContents()
Xtext                load(), save()



        XtextResource

                     Textual Model


               Serializer
                            Parser
                                      Node Model



                      Ecore Model
                       Instance




                getContents()
Xtext                load(), save()



        XtextResource

                     Textual Model


               Serializer
                            Parser
                                          Node Model



                      Ecore Model
                       Instance         FragmentProvider




                getContents()         getURIFragment()
                                      getEObject()
ResourceSet


XtextResource                 DiagramResource
diagram
                                         change

                ResourceSet


XtextResource                 DiagramResource
ResourceSet


XtextResource                 DiagramResource
reparse()
w/ errors

                    ResourceSet


    XtextResource                 DiagramResource
ResourceSet


XtextResource                 DiagramResource
ResourceSet


XtextResource                 DiagramResource




                Canonical
                EditPolicy
ResourceSet


XtextResource                 DiagramResource




                Canonical
                EditPolicy
ResourceSet


XtextResource                 DiagramResource




                Canonical
                EditPolicy
Fi e l
                    od a
                 M xtu
                  le l
                    Te
 ResourceSet                         ResourceSet


XtextResource              XtextResource    DiagramResource
Fi e l
                    od a
                 M xtu
                  le l
                    Te
 ResourceSet                         ResourceSet


XtextResource              XtextResource    DiagramResource
Fi e l
                    od a
                 M xtu
                  le l
                    Te
 ResourceSet                         ResourceSet


XtextResource              XtextResource    DiagramResource
Fi e l
                      od a
                   M xtu
                    le l
                      Te
 ResourceSet                           ResourceSet


XtextResource   save()       XtextResource    DiagramResource
Fi e l
                     od a
                  M xtu
                   le l
                     Te
 ResourceSet                          ResourceSet


XtextResource   reload()    XtextResource    DiagramResource
Fi e l
                     od a
                  M xtu
                   le l
                     Te
 ResourceSet                          ResourceSet


XtextResource   reload()    XtextResource    DiagramResource
Fi e l
                    od a
                 M xtu
                  le l
                    Te
 ResourceSet                         ResourceSet


XtextResource              XtextResource    DiagramResource
Demo Time
Create a Diagram
Save Diagram
Open Textual Model
Edit Textual Model
Save Textual Model
Edit Diagram
Reorder Objects
Diagram With Unsaved Changes
Try to Edit Text
Other Way Around...
Navigation
Popup Editor
Alignment
grammar org.xtext.cg2009.Entities
  with org.eclipse.xtext.common.Terminals

generate entities "http://www.xtext.org/cg2009/Entities"

Model :
	 {Model} (entities += Entity)*;
	
Entity returns Entity:
	 'entity' (name=ID)? ('extends' superType=[Entity])? '{'
	 	 (properties+=Property)*
	 '}';
	
Property:
	 SimpleProperty | ReferenceProperty;
	
SimpleProperty:
	 'property' (name=ID)? ':' type=('String'|'Number'|'Bool');
	
ReferenceProperty :
	 (name=ID)? 'refs' ('one' | many?='many')? type=[Entity];
grammar org.xtext.cg2009.Entities
  with org.eclipse.xtext.common.Terminals

               Avoid empty
generate entities "http://www.xtext.org/cg2009/Entities"
                 models
Model :
	 {Model} (entities += Entity)*;
	
Entity returns Entity:
	 'entity' (name=ID)? ('extends' superType=[Entity])? '{'
	 	 (properties+=Property)*
	 '}';
	
Property:
	 SimpleProperty | ReferenceProperty;
	
SimpleProperty:
	 'property' (name=ID)? ':' type=('String'|'Number'|'Bool');
	
ReferenceProperty :
	 (name=ID)? 'refs' ('one' | many?='many')? type=[Entity];
grammar org.xtext.cg2009.Entities
  with org.eclipse.xtext.common.Terminals

               Avoid empty
generate entities "http://www.xtext.org/cg2009/Entities"
                 models
Model :
	 {Model} (entities += Entity)*;
	
Entity returns Entity:
	 'entity' (name=ID)? ('extends' superType=[Entity])? '{'
	 	 (properties+=Property)*
	 '}';
	
Property:
                         Cover mandatory
	 SimpleProperty | ReferenceProperty;
	                          properties in
SimpleProperty:
                             validation
	 'property' (name=ID)? ':' type=('String'|'Number'|'Bool');
	
ReferenceProperty :
	 (name=ID)? 'refs' ('one' | many?='many')? type=[Entity];
grammar org.xtext.cg2009.Entities
  with org.eclipse.xtext.common.Terminals

               Avoid empty
generate entities "http://www.xtext.org/cg2009/Entities"
                                              Carefully select
                 models
Model :                                     containment or cross
	 {Model} (entities += Entity)*;                 references
	
Entity returns Entity:
	 'entity' (name=ID)? ('extends' superType=[Entity])? '{'
	 	 (properties+=Property)*
	 '}';
	
Property:
                         Cover mandatory
	 SimpleProperty | ReferenceProperty;
	                          properties in
SimpleProperty:
                             validation
	 'property' (name=ID)? ':' type=('String'|'Number'|'Bool');
	
ReferenceProperty :
	 (name=ID)? 'refs' ('one' | many?='many')? type=[Entity];
Xtext
Xtext
        Implement a
         Formatter
Xtext
        Implement a
         Formatter


             Implement a
          FragmentProvider
Xtext
           Implement a
            Formatter


                 Implement a
              FragmentProvider



        Implement a
        JavaValidator
GMF
GMF

 Initialize
mandatory
properties
GMF

         Initialize
        mandatory
        properties



Avoid Phantom
    Nodes
Add a
transaction on
                                 GMF
     load



                    Initialize
                   mandatory
                   properties



           Avoid Phantom
               Nodes
Glue Code
• Prevent conflicting modifications
• Navigate
 • diagram ➜ text
 • text ➜ diagram
    (needs index)
• Popup editor
• Shipped as an Xtext example
Thanks for your
  attention!

               More information at
                  www.itemis.de
                  www.xtext.org
              koehnlein.blogspot.com

More Related Content

Viewers also liked

Upgrade your presentations
Upgrade your presentationsUpgrade your presentations
Upgrade your presentationskeekee92
 
Introducing R
Introducing RIntroducing R
Introducing Rnzfauna
 
In cloud galleries comparison
In cloud galleries comparisonIn cloud galleries comparison
In cloud galleries comparisonAdryMorci
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power pointjustmeanscsr
 
Introduction to technical writing
Introduction to technical writingIntroduction to technical writing
Introduction to technical writingAdam Tablante
 
Creating mail merge
Creating mail mergeCreating mail merge
Creating mail mergeNico Bereber
 
Contextualized online search and research skills
Contextualized online search and research skillsContextualized online search and research skills
Contextualized online search and research skillsJonathan Jr Marcelino
 
How to hack computers how to h joel tope
How to hack computers  how to h   joel topeHow to hack computers  how to h   joel tope
How to hack computers how to h joel topeSonny Dolinen
 
Lesson 2 Online Safety, Security, Ethics and Etiquette
Lesson 2   Online Safety, Security, Ethics and EtiquetteLesson 2   Online Safety, Security, Ethics and Etiquette
Lesson 2 Online Safety, Security, Ethics and EtiquetteLea Rodriguez
 
Online Platform :Empowerment of technologies ICT
Online Platform :Empowerment of technologies ICTOnline Platform :Empowerment of technologies ICT
Online Platform :Empowerment of technologies ICTSonny Dolinen
 
Its all about Infographics
Its all about InfographicsIts all about Infographics
Its all about InfographicsAditya Krishna
 

Viewers also liked (16)

Upgrade your presentations
Upgrade your presentationsUpgrade your presentations
Upgrade your presentations
 
GNU Image Manipulation Program
GNU Image Manipulation ProgramGNU Image Manipulation Program
GNU Image Manipulation Program
 
Introducing R
Introducing RIntroducing R
Introducing R
 
In cloud galleries comparison
In cloud galleries comparisonIn cloud galleries comparison
In cloud galleries comparison
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Unit1 module4 em
Unit1 module4 emUnit1 module4 em
Unit1 module4 em
 
Introduction to technical writing
Introduction to technical writingIntroduction to technical writing
Introduction to technical writing
 
Animate pp1
Animate pp1Animate pp1
Animate pp1
 
Mail merge
Mail mergeMail merge
Mail merge
 
Creating mail merge
Creating mail mergeCreating mail merge
Creating mail merge
 
Contextualized online search and research skills
Contextualized online search and research skillsContextualized online search and research skills
Contextualized online search and research skills
 
How to hack computers how to h joel tope
How to hack computers  how to h   joel topeHow to hack computers  how to h   joel tope
How to hack computers how to h joel tope
 
Unit1 module1 em
Unit1 module1 emUnit1 module1 em
Unit1 module1 em
 
Lesson 2 Online Safety, Security, Ethics and Etiquette
Lesson 2   Online Safety, Security, Ethics and EtiquetteLesson 2   Online Safety, Security, Ethics and Etiquette
Lesson 2 Online Safety, Security, Ethics and Etiquette
 
Online Platform :Empowerment of technologies ICT
Online Platform :Empowerment of technologies ICTOnline Platform :Empowerment of technologies ICT
Online Platform :Empowerment of technologies ICT
 
Its all about Infographics
Its all about InfographicsIts all about Infographics
Its all about Infographics
 

Similar to Combining Text and Graphics in Eclipse-based Modeling Tools

Xtext's new Formatter API
Xtext's new Formatter APIXtext's new Formatter API
Xtext's new Formatter APImeysholdt
 
Ti1220 Lecture 7: Polymorphism
Ti1220 Lecture 7: PolymorphismTi1220 Lecture 7: Polymorphism
Ti1220 Lecture 7: PolymorphismEelco Visser
 
Ajax tutorial
Ajax tutorialAjax tutorial
Ajax tutorialKat Roque
 
Avoiding JavaScript Pitfalls Through Tree Hugging
Avoiding JavaScript Pitfalls Through Tree HuggingAvoiding JavaScript Pitfalls Through Tree Hugging
Avoiding JavaScript Pitfalls Through Tree Huggingzefhemel
 
Doc Parsers Api Cheatsheet 1 0
Doc Parsers Api Cheatsheet 1 0Doc Parsers Api Cheatsheet 1 0
Doc Parsers Api Cheatsheet 1 0Oleh Burkhay
 
F Files - Learnings from 3 years of Neos Support
F Files - Learnings from 3 years of Neos SupportF Files - Learnings from 3 years of Neos Support
F Files - Learnings from 3 years of Neos SupportChristian Müller
 
Code Generation for Azure with .net
Code Generation for Azure with .netCode Generation for Azure with .net
Code Generation for Azure with .netMarco Parenzan
 
VelocityGraph Introduction
VelocityGraph IntroductionVelocityGraph Introduction
VelocityGraph IntroductionMats Persson
 
php&mysql with Ethical Hacking
php&mysql with Ethical Hackingphp&mysql with Ethical Hacking
php&mysql with Ethical HackingBCET
 
Introduction to Client-Side Javascript
Introduction to Client-Side JavascriptIntroduction to Client-Side Javascript
Introduction to Client-Side JavascriptJulie Iskander
 
Ekeko Technology Showdown at SoTeSoLa 2012
Ekeko Technology Showdown at SoTeSoLa 2012Ekeko Technology Showdown at SoTeSoLa 2012
Ekeko Technology Showdown at SoTeSoLa 2012Coen De Roover
 
HexRaysCodeXplorer: object oriented RE for fun and profit
HexRaysCodeXplorer: object oriented RE for fun and profitHexRaysCodeXplorer: object oriented RE for fun and profit
HexRaysCodeXplorer: object oriented RE for fun and profitAlex Matrosov
 
Executing bpmn 2.0 with j bpm 3 or (at your option) any later version
Executing bpmn 2.0 with j bpm 3 or (at your option) any later versionExecuting bpmn 2.0 with j bpm 3 or (at your option) any later version
Executing bpmn 2.0 with j bpm 3 or (at your option) any later versioncamunda services GmbH
 
OpenCog Developer Workshop
OpenCog Developer WorkshopOpenCog Developer Workshop
OpenCog Developer WorkshopIbby Benali
 
Serializing EMF models with Xtext
Serializing EMF models with XtextSerializing EMF models with Xtext
Serializing EMF models with Xtextmeysholdt
 
Xbase - Implementing Domain-Specific Languages for Java
Xbase - Implementing Domain-Specific Languages for JavaXbase - Implementing Domain-Specific Languages for Java
Xbase - Implementing Domain-Specific Languages for Javameysholdt
 
Extending the Xbase Typesystem
Extending the Xbase TypesystemExtending the Xbase Typesystem
Extending the Xbase TypesystemSebastian Zarnekow
 
javascript-cheat-sheet-v1_1
javascript-cheat-sheet-v1_1javascript-cheat-sheet-v1_1
javascript-cheat-sheet-v1_1brecke
 

Similar to Combining Text and Graphics in Eclipse-based Modeling Tools (20)

Xtext's new Formatter API
Xtext's new Formatter APIXtext's new Formatter API
Xtext's new Formatter API
 
Dynamic Python
Dynamic PythonDynamic Python
Dynamic Python
 
Ti1220 Lecture 7: Polymorphism
Ti1220 Lecture 7: PolymorphismTi1220 Lecture 7: Polymorphism
Ti1220 Lecture 7: Polymorphism
 
Ajax tutorial
Ajax tutorialAjax tutorial
Ajax tutorial
 
Avoiding JavaScript Pitfalls Through Tree Hugging
Avoiding JavaScript Pitfalls Through Tree HuggingAvoiding JavaScript Pitfalls Through Tree Hugging
Avoiding JavaScript Pitfalls Through Tree Hugging
 
Doc Parsers Api Cheatsheet 1 0
Doc Parsers Api Cheatsheet 1 0Doc Parsers Api Cheatsheet 1 0
Doc Parsers Api Cheatsheet 1 0
 
F Files - Learnings from 3 years of Neos Support
F Files - Learnings from 3 years of Neos SupportF Files - Learnings from 3 years of Neos Support
F Files - Learnings from 3 years of Neos Support
 
Modern C++
Modern C++Modern C++
Modern C++
 
Code Generation for Azure with .net
Code Generation for Azure with .netCode Generation for Azure with .net
Code Generation for Azure with .net
 
VelocityGraph Introduction
VelocityGraph IntroductionVelocityGraph Introduction
VelocityGraph Introduction
 
php&mysql with Ethical Hacking
php&mysql with Ethical Hackingphp&mysql with Ethical Hacking
php&mysql with Ethical Hacking
 
Introduction to Client-Side Javascript
Introduction to Client-Side JavascriptIntroduction to Client-Side Javascript
Introduction to Client-Side Javascript
 
Ekeko Technology Showdown at SoTeSoLa 2012
Ekeko Technology Showdown at SoTeSoLa 2012Ekeko Technology Showdown at SoTeSoLa 2012
Ekeko Technology Showdown at SoTeSoLa 2012
 
HexRaysCodeXplorer: object oriented RE for fun and profit
HexRaysCodeXplorer: object oriented RE for fun and profitHexRaysCodeXplorer: object oriented RE for fun and profit
HexRaysCodeXplorer: object oriented RE for fun and profit
 
Executing bpmn 2.0 with j bpm 3 or (at your option) any later version
Executing bpmn 2.0 with j bpm 3 or (at your option) any later versionExecuting bpmn 2.0 with j bpm 3 or (at your option) any later version
Executing bpmn 2.0 with j bpm 3 or (at your option) any later version
 
OpenCog Developer Workshop
OpenCog Developer WorkshopOpenCog Developer Workshop
OpenCog Developer Workshop
 
Serializing EMF models with Xtext
Serializing EMF models with XtextSerializing EMF models with Xtext
Serializing EMF models with Xtext
 
Xbase - Implementing Domain-Specific Languages for Java
Xbase - Implementing Domain-Specific Languages for JavaXbase - Implementing Domain-Specific Languages for Java
Xbase - Implementing Domain-Specific Languages for Java
 
Extending the Xbase Typesystem
Extending the Xbase TypesystemExtending the Xbase Typesystem
Extending the Xbase Typesystem
 
javascript-cheat-sheet-v1_1
javascript-cheat-sheet-v1_1javascript-cheat-sheet-v1_1
javascript-cheat-sheet-v1_1
 

More from Dr. Jan Köhnlein

The Eclipse Layout Kernel sirius con 2017
The Eclipse Layout Kernel   sirius con 2017The Eclipse Layout Kernel   sirius con 2017
The Eclipse Layout Kernel sirius con 2017Dr. Jan Köhnlein
 
A New Approach Towards Web-based IDEs
A New Approach Towards Web-based IDEsA New Approach Towards Web-based IDEs
A New Approach Towards Web-based IDEsDr. Jan Köhnlein
 
Graphical Views For Xtext With FXDiagram
Graphical Views For Xtext With FXDiagramGraphical Views For Xtext With FXDiagram
Graphical Views For Xtext With FXDiagramDr. Jan Köhnlein
 
Diagram Editors - The FXed Generation
Diagram Editors - The FXed GenerationDiagram Editors - The FXed Generation
Diagram Editors - The FXed GenerationDr. Jan Köhnlein
 
Eclipse Diagram Editors - An Endangered Species
Eclipse Diagram Editors - An Endangered SpeciesEclipse Diagram Editors - An Endangered Species
Eclipse Diagram Editors - An Endangered SpeciesDr. Jan Köhnlein
 
A fresh look at graphical editing
A fresh look at graphical editingA fresh look at graphical editing
A fresh look at graphical editingDr. Jan Köhnlein
 
A fresh look at graphical editing
A fresh look at graphical editingA fresh look at graphical editing
A fresh look at graphical editingDr. Jan Köhnlein
 
A fresh look at graphical editing
A fresh look at graphical editingA fresh look at graphical editing
A fresh look at graphical editingDr. Jan Köhnlein
 
Pragmatic DSL Design with Xtext, Xbase and Xtend 2
Pragmatic DSL Design with Xtext, Xbase and Xtend 2Pragmatic DSL Design with Xtext, Xbase and Xtend 2
Pragmatic DSL Design with Xtext, Xbase and Xtend 2Dr. Jan Köhnlein
 

More from Dr. Jan Köhnlein (20)

The Eclipse Layout Kernel sirius con 2017
The Eclipse Layout Kernel   sirius con 2017The Eclipse Layout Kernel   sirius con 2017
The Eclipse Layout Kernel sirius con 2017
 
A New Approach Towards Web-based IDEs
A New Approach Towards Web-based IDEsA New Approach Towards Web-based IDEs
A New Approach Towards Web-based IDEs
 
Responsiveness
ResponsivenessResponsiveness
Responsiveness
 
Getting rid of backtracking
Getting rid of backtrackingGetting rid of backtracking
Getting rid of backtracking
 
Graphical Views For Xtext With FXDiagram
Graphical Views For Xtext With FXDiagramGraphical Views For Xtext With FXDiagram
Graphical Views For Xtext With FXDiagram
 
XRobots
XRobotsXRobots
XRobots
 
Diagrams, Xtext and UX
Diagrams, Xtext and UXDiagrams, Xtext and UX
Diagrams, Xtext and UX
 
Scoping
ScopingScoping
Scoping
 
Xtext, diagrams and ux
Xtext, diagrams and uxXtext, diagrams and ux
Xtext, diagrams and ux
 
Diagram Editors - The FXed Generation
Diagram Editors - The FXed GenerationDiagram Editors - The FXed Generation
Diagram Editors - The FXed Generation
 
Code Generation With Xtend
Code Generation With XtendCode Generation With Xtend
Code Generation With Xtend
 
Graphical Views For Xtext
Graphical Views For XtextGraphical Views For Xtext
Graphical Views For Xtext
 
The Xtext Grammar Language
The Xtext Grammar LanguageThe Xtext Grammar Language
The Xtext Grammar Language
 
Eclipse Diagram Editors - An Endangered Species
Eclipse Diagram Editors - An Endangered SpeciesEclipse Diagram Editors - An Endangered Species
Eclipse Diagram Editors - An Endangered Species
 
Java DSLs with Xtext
Java DSLs with XtextJava DSLs with Xtext
Java DSLs with Xtext
 
DSLs for Java Developers
DSLs for Java DevelopersDSLs for Java Developers
DSLs for Java Developers
 
A fresh look at graphical editing
A fresh look at graphical editingA fresh look at graphical editing
A fresh look at graphical editing
 
A fresh look at graphical editing
A fresh look at graphical editingA fresh look at graphical editing
A fresh look at graphical editing
 
A fresh look at graphical editing
A fresh look at graphical editingA fresh look at graphical editing
A fresh look at graphical editing
 
Pragmatic DSL Design with Xtext, Xbase and Xtend 2
Pragmatic DSL Design with Xtext, Xbase and Xtend 2Pragmatic DSL Design with Xtext, Xbase and Xtend 2
Pragmatic DSL Design with Xtext, Xbase and Xtend 2
 

Recently uploaded

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 

Recently uploaded (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 

Combining Text and Graphics in Eclipse-based Modeling Tools

  • 1. Combining Graphics and Text in Modeling Tools Jan Köhnlein
  • 2.
  • 4. GMF Graphical Xtext Textual
  • 5. GMF Graphical Just two different views on the same thing Xtext Textual
  • 8. Xtext Textual Model Serializer Parser Node Model Ecore Model Instance
  • 9. Xtext XtextResource Textual Model Serializer Parser Node Model Ecore Model Instance
  • 10. Xtext XtextResource Textual Model Serializer Parser Node Model Ecore Model Instance getContents()
  • 11. Xtext load(), save() XtextResource Textual Model Serializer Parser Node Model Ecore Model Instance getContents()
  • 12. Xtext load(), save() XtextResource Textual Model Serializer Parser Node Model Ecore Model Instance FragmentProvider getContents() getURIFragment() getEObject()
  • 13. ResourceSet XtextResource DiagramResource
  • 14. diagram change ResourceSet XtextResource DiagramResource
  • 15. ResourceSet XtextResource DiagramResource
  • 16. reparse() w/ errors ResourceSet XtextResource DiagramResource
  • 17. ResourceSet XtextResource DiagramResource
  • 18. ResourceSet XtextResource DiagramResource Canonical EditPolicy
  • 19. ResourceSet XtextResource DiagramResource Canonical EditPolicy
  • 20. ResourceSet XtextResource DiagramResource Canonical EditPolicy
  • 21. Fi e l od a M xtu le l Te ResourceSet ResourceSet XtextResource XtextResource DiagramResource
  • 22. Fi e l od a M xtu le l Te ResourceSet ResourceSet XtextResource XtextResource DiagramResource
  • 23. Fi e l od a M xtu le l Te ResourceSet ResourceSet XtextResource XtextResource DiagramResource
  • 24. Fi e l od a M xtu le l Te ResourceSet ResourceSet XtextResource save() XtextResource DiagramResource
  • 25. Fi e l od a M xtu le l Te ResourceSet ResourceSet XtextResource reload() XtextResource DiagramResource
  • 26. Fi e l od a M xtu le l Te ResourceSet ResourceSet XtextResource reload() XtextResource DiagramResource
  • 27. Fi e l od a M xtu le l Te ResourceSet ResourceSet XtextResource XtextResource DiagramResource
  • 29.
  • 31.
  • 32.
  • 34.
  • 35.
  • 37.
  • 38.
  • 40.
  • 41.
  • 43.
  • 44.
  • 46.
  • 47.
  • 49.
  • 50.
  • 52.
  • 53.
  • 54. Try to Edit Text
  • 55.
  • 56.
  • 58.
  • 59.
  • 61.
  • 62.
  • 64.
  • 66. grammar org.xtext.cg2009.Entities with org.eclipse.xtext.common.Terminals generate entities "http://www.xtext.org/cg2009/Entities" Model : {Model} (entities += Entity)*; Entity returns Entity: 'entity' (name=ID)? ('extends' superType=[Entity])? '{' (properties+=Property)* '}'; Property: SimpleProperty | ReferenceProperty; SimpleProperty: 'property' (name=ID)? ':' type=('String'|'Number'|'Bool'); ReferenceProperty : (name=ID)? 'refs' ('one' | many?='many')? type=[Entity];
  • 67. grammar org.xtext.cg2009.Entities with org.eclipse.xtext.common.Terminals Avoid empty generate entities "http://www.xtext.org/cg2009/Entities" models Model : {Model} (entities += Entity)*; Entity returns Entity: 'entity' (name=ID)? ('extends' superType=[Entity])? '{' (properties+=Property)* '}'; Property: SimpleProperty | ReferenceProperty; SimpleProperty: 'property' (name=ID)? ':' type=('String'|'Number'|'Bool'); ReferenceProperty : (name=ID)? 'refs' ('one' | many?='many')? type=[Entity];
  • 68. grammar org.xtext.cg2009.Entities with org.eclipse.xtext.common.Terminals Avoid empty generate entities "http://www.xtext.org/cg2009/Entities" models Model : {Model} (entities += Entity)*; Entity returns Entity: 'entity' (name=ID)? ('extends' superType=[Entity])? '{' (properties+=Property)* '}'; Property: Cover mandatory SimpleProperty | ReferenceProperty; properties in SimpleProperty: validation 'property' (name=ID)? ':' type=('String'|'Number'|'Bool'); ReferenceProperty : (name=ID)? 'refs' ('one' | many?='many')? type=[Entity];
  • 69. grammar org.xtext.cg2009.Entities with org.eclipse.xtext.common.Terminals Avoid empty generate entities "http://www.xtext.org/cg2009/Entities" Carefully select models Model : containment or cross {Model} (entities += Entity)*; references Entity returns Entity: 'entity' (name=ID)? ('extends' superType=[Entity])? '{' (properties+=Property)* '}'; Property: Cover mandatory SimpleProperty | ReferenceProperty; properties in SimpleProperty: validation 'property' (name=ID)? ':' type=('String'|'Number'|'Bool'); ReferenceProperty : (name=ID)? 'refs' ('one' | many?='many')? type=[Entity];
  • 70. Xtext
  • 71. Xtext Implement a Formatter
  • 72. Xtext Implement a Formatter Implement a FragmentProvider
  • 73. Xtext Implement a Formatter Implement a FragmentProvider Implement a JavaValidator
  • 74. GMF
  • 76. GMF Initialize mandatory properties Avoid Phantom Nodes
  • 77. Add a transaction on GMF load Initialize mandatory properties Avoid Phantom Nodes
  • 78. Glue Code • Prevent conflicting modifications • Navigate • diagram ➜ text • text ➜ diagram (needs index) • Popup editor • Shipped as an Xtext example
  • 79. Thanks for your attention! More information at www.itemis.de www.xtext.org koehnlein.blogspot.com

Editor's Notes