SlideShare une entreprise Scribd logo
1  sur  168
Model Driven Software Development
                       with Eclipse



                            Sven Efftinge

                      Sebastian Zarnekow
MDA
Model Driven Architecture
MDSD IS NOT MDA!
TOP5
     DON’TS
IN CODE GENERATION
UML for
CODE GENERATION?
CODE GENERATION
USED TO CONSTRAIN
DEVELOPERS
SLOW GENERATION /
BAD INTEGRATION
OVER-REUSE
OVER-ENGINEERING
• Domain Specific Language Development Framework
• Based on:
 • Eclipse
 • Eclipse Modeling Framework (EMF)
 • Antlr parser generator
•   Domain mming Language Development Framework
     Progra Specific
•   Based on:
    • Eclipse
    • Eclipse Modeling Framework (EMF)
    • Antlr parser generator
•   Domain mming Language Development Framework
     Progra Specific
•   Based on:
•   Domain mming Language Development Framework
     Progra Specific
•   Based on:
    • Eclipse
•   Domain mming Language Development Framework
     Progra Specific
•   Based on:
    • Eclipse
    • Eclipse Modeling Framework (EMF)
•   Domain mming Language Development Framework
     Progra Specific
•   Based on:
    • Eclipse
    • Eclipse Modeling Framework (EMF)
    • Antlr parser generator
• History
• History
 • 2005 : Prototype @ openArchitectureWare
• History
 • 2005 : Prototype @ openArchitectureWare
 • 2007 : Xtext goes Eclipse TMF
• History
 • 2005 : Prototype @ openArchitectureWare
 • 2007 : Xtext goes Eclipse TMF
 • 01/2008 : itemis forms development team
• History
 • 2005 : Prototype @ openArchitectureWare
 • 2007 : Xtext goes Eclipse TMF
 • 01/2008 : itemis forms development team
 • 06/2009 : TMF Xtext 0.7.0 @ Eclipse Galileo
• History
 • 2005 : Prototype @ openArchitectureWare
 • 2007 : Xtext goes Eclipse TMF
 • 01/2008 : itemis forms development team
 • 06/2009 : TMF Xtext 0.7.0 @ Eclipse Galileo
 • 09/2009 : Galileo SR1 with Xtext 0.7.2
in numbers
9 active committers
~1.000.000
lines of code
~2.000 unit tests
~400 newsgroup
messages per month
~200 Followers for
    @Xtext
-6.750
Hudson build points
182 project years
182 project years
 says Ohloh.net
Some



       users
Deutsche Börse
 Systems AG
Fraunhofer IWES
BMW Car IT
APG Affichage
@SuppressWarnings("serial")
@Entity
 Entity
@Table(name = "BUCHUNGSKREISE_F")
               BUCHUNGSKREISE_F
public class BuchungskreiseF extends AbstractEntity implements Serializable {
	

	   @SuppressWarnings("unused")
	   @Id
     Id
	   @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "bkrIdSeq")
	   @SequenceGenerator(name = "bkrIdSeq", sequenceName = "BKR_SEQ", allocationSize = 1)
                                                          BKR_SEQ
	   @Column(name = "BKR_ID", nullable = false
                    BKR_ID              false)
	   private Long bkrId
                 bkrId;

	   public Long getBkrId() {
	   	   return bkrId;
	   }

	   public void setBkrId(final Long bkrId) {
	   	   this.bkrId = bkrId;
	   }

	   @Column(name = "KONTO_NR", nullable = false length = 45
                    KONTO_NR              false,         45)
	   private String kontoNr;
                   kontoNr

	   public String getKontoNr() {
	   	   return kontoNr;
	   }

	   public void setKontoNr(final String kontoNr) {
	   	   String oldValue = this.kontoNr;
	   	   this.kontoNr = kontoNr;
	   	   firePropertyChangeEvent("kontoNr", oldValue, this.kontoNr);
	   }
@SuppressWarnings("serial")
@Entity
 Entity
@Table(name = "BUCHUNGSKREISE_F")
               BUCHUNGSKREISE_F
public class BuchungskreiseF extends AbstractEntity implements Serializable {
	

	   @SuppressWarnings("unused")
	   @Id
     Id
	   @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "bkrIdSeq")
	   @SequenceGenerator(name = "bkrIdSeq", sequenceName = "BKR_SEQ", allocationSize = 1)
                                                          BKR_SEQ
	   @Column(name = "BKR_ID", nullable = false
                    BKR_ID              false)
	   private Long bkrId
                 bkrId;

	   public Long getBkrId() {
	   	   return bkrId;
	   }

	   public void setBkrId(final Long bkrId) {
	   	   this.bkrId = bkrId;
	   }

	   @Column(name = "KONTO_NR", nullable = false length = 45
                    KONTO_NR              false,         45)
	   private String kontoNr;
                   kontoNr

	   public String getKontoNr() {
	   	   return kontoNr;
	   }

	   public void setKontoNr(final String kontoNr) {
	   	   String oldValue = this.kontoNr;
	   	   this.kontoNr = kontoNr;
	   	   firePropertyChangeEvent("kontoNr", oldValue, this.kontoNr);
	   }
External DSL with Xtext

entity BuchungskreiseF
 (id=bkrId sequenceName=BKR_SEQ) {

    String kontoNr   (notNull, length=45)

    Long rgNrBkrIdentifikator    (notNull, length=1)

    String referenzcodeKontoNr (notNull, length=45)

}
External DSL with Xtext

entity BuchungskreiseF
 (id=bkrId sequenceName=BKR_SEQ) {

    String kontoNr

    Long rgNrBkrIdentifikator

    String referenzcodeKontoNr

}
External DSL with Xtext
                               BUCHUNGSKREISE_F

entity BuchungskreiseF
 (id=bkrId sequenceName=BKR_SEQ) {

    String kontoNr
                                   RG_NR_BKR_IDENTIFIKATOR

    Long rgNrBkrIdentifikator

    String referenzcodeKontoNr

}
entity BuchungskreiseF
  (id=bkrId sequenceName=BKR_SEQ)
{
}
entity BuchungskreiseF
               (id=bkrId sequenceName=BKR_SEQ)
             {
             }



                              TABLE BUCHUNGSKREISE_F
                                                                              ID          NAME    PROP1    DATE    ATTR1
ID        NAME   PROP1        DATE   ATTR1


                                          ID      NAME    PROP1       DATE        ATTR1




                         ID     NAME    PROP1     DATE        ATTR1




                                                                             ID      NAME        PROP1    DATE    ATTR1



     ID      NAME    PROP1       DATE     ATTR1



                                                         ID      NAME   PROP1         DATE       ATTR1


                    ID        NAME     PROP1    DATE     ATTR1




                                                                                                                           Database Schema
entity BuchungskreiseF
               (id=bkrId sequenceName=BKR_SEQ)
             {
             }



                              TABLESimilar to
                                   BUCHUNGSKREISE_F
                                 Ruby On Rails
                                                                              ID          NAME    PROP1    DATE    ATTR1
ID        NAME   PROP1        DATE   ATTR1


                                          ID      NAME    PROP1       DATE        ATTR1




                         ID     NAME    PROP1     DATE        ATTR1




                                                                             ID      NAME        PROP1    DATE    ATTR1



     ID      NAME    PROP1       DATE     ATTR1



                                                         ID      NAME   PROP1         DATE       ATTR1


                    ID        NAME     PROP1    DATE     ATTR1




                                                                                                                           Database Schema
Getting Started with Xtext
Working with
Codegeneration


Editor
Codegeneration


Editor




   AST
Editor




            AST
                                 TeX Xpa
                               T ma  p
                             TeXeXpa p n nd
                                  m l
                                 p
                           Te m a p n ad
                             m pln lad te
                               pl ad te
                                  at te
                                    e




Generator
                                              Codegeneration
Editor




                      AST
                                                 TeX Xpa
                                               T ma  p
                                             TeXeXpa p n nd
                                                  m l
                                                 p
                                           Te m a p n ad
                                             m pln lad te
                                               pl ad te
                                                  at te
                                                    e




Generator
                                                              Codegeneration




                   E
                 Ex xe
              Ex A c
                    r
            Ex Ae etcu uta
             Aecrtcuifata bl
            A rti uifata ctbl e
             rt fata ctb e
               ifa c b le
                  ct t le
Accessing models from Java
Accessing models from Java
// create a URI that points to the model file
URI uri = URI.createURI("foo.mydsl");
Accessing models from Java
// create a URI that points to the model file
URI uri = URI.createURI("foo.mydsl");

// create a resource
Resource resource = new ResourceSetImpl().getResource(uri,true);
Accessing models from Java
// create a URI that points to the model file
URI uri = URI.createURI("foo.mydsl");

// create a resource
Resource resource = new ResourceSetImpl().getResource(uri,true);

// get root model element from resource
Model model = (Model) resource.getContents().get(0);
Accessing models from Java
// create a URI that points to the model file
URI uri = URI.createURI("foo.mydsl");

// create a resource
Resource resource = new ResourceSetImpl().getResource(uri,true);

// get root model element from resource
Model model = (Model) resource.getContents().get(0);

// print name of first element
System.out.println(model.getElements().get(0).getName());
Accessing models from Java
// create a URI that points to the model file
URI uri = URI.createURI("foo.mydsl");

// create a resource
Resource resource = new ResourceSetImpl().getResource(uri,true);

// get root model element from resource
Model model = (Model) resource.getContents().get(0);

// print name of first element
System.out.println(model.getElements().get(0).getName());

// change name of first element to "Bar"
model.getElements().get(0).setName("Bar");
Accessing models from Java
// create a URI that points to the model file
URI uri = URI.createURI("foo.mydsl");

// create a resource
Resource resource = new ResourceSetImpl().getResource(uri,true);

// get root model element from resource
Model model = (Model) resource.getContents().get(0);

// print name of first element
System.out.println(model.getElements().get(0).getName());

// change name of first element to "Bar"
model.getElements().get(0).setName("Bar");

// save resource
resource.save(null);
Integration with EMF
Integration with EMF
                                              eclipse

                              Any EMF-based   modeling
Code Generator   GMF Editor                             P R O J E C T
                               Component
Integration with EMF
                                                eclipse

                                Any EMF-based   modeling
Code Generator    GMF Editor                              P R O J E C T
                                 Component




                 <<abstract>>
                                XMIResource
                  Resource
Integration with EMF
                                                eclipse

                                Any EMF-based   modeling
Code Generator    GMF Editor                              P R O J E C T
                                 Component




                 <<abstract>>
                                XMIResource
                  Resource
Integration with EMF
                                                eclipse

                                Any EMF-based   modeling
Code Generator    GMF Editor                              P R O J E C T
                                 Component




                 <<abstract>>                   XMI
                                XMIResource
                  Resource
Integration with EMF
                                                eclipse

                                Any EMF-based   modeling
Code Generator    GMF Editor                              P R O J E C T
                                 Component




                 <<abstract>>                   XMI
                                XMIResource
                  Resource
Integration with EMF
                                                 eclipse

                                 Any EMF-based   modeling
Code Generator    GMF Editor                               P R O J E C T
                                  Component




                 <<abstract>>                    XMI
                                 XMIResource
                  Resource




                 XtextResource
Integration with EMF
                                                 eclipse

                                 Any EMF-based   modeling
Code Generator    GMF Editor                               P R O J E C T
                                  Component




                 <<abstract>>                    XMI
                                 XMIResource
                  Resource




                 XtextResource
Integration with EMF
                                                  eclipse

                                 Any EMF-based   modeling
Code Generator    GMF Editor                                P R O J E C T
                                  Component




                 <<abstract>>                    XMI
                                 XMIResource
                  Resource




                 XtextResource                   Text
Integration with EMF
                                                  eclipse

                                 Any EMF-based   modeling
Code Generator    GMF Editor                                P R O J E C T
                                  Component




                 <<abstract>>                    XMI
                                 XMIResource
                  Resource




                 XtextResource                   Text




    Parser          Linker         Serializer




ValueConverter   ScopeProvider     Formatter
Customizing




              licensed by http://www.wordle.net/
Customizing




              licensed by http://www.wordle.net/
Customizing




              licensed by http://www.wordle.net/
Customizing




              licensed by http://www.wordle.net/
Customizing




              licensed by http://www.wordle.net/
Customizing
         MyCustomLabelProvider




                     licensed by http://www.wordle.net/
Dependency Injection with
     Google Guice
Dependency Injection with
     Google Guice
Dependency Injection with
      Google Guice




No dependency to concrete implementation
Dependency Injection with
      Google Guice




No dependency to concrete implementation
No explicit construction
Dependency Injection with
      Google Guice




No dependency to concrete implementation
No explicit construction
Easy testing
Dependency Injection with
      Google Guice




No dependency to concrete implementation
No explicit construction
Easy testing
Easy composition
Advanced Editor
   Features
Navigation and Validation
Navigation and Validation
Find declaration
    in index
Default builder indexes
   whole class path
Incremental builder
Incremental builder
Incremental generation
Incremental generation
Textual
      &
Graphical
    Combined
Navigation
Navigation
Inplace editing
Inplace editing
Referring
      to
            Types
Referring
              to
                         Types
• EMF Model for Java types and their members
Referring
              to
                         Types
• EMF Model for Java types and their members
• @Runtime: java.lang.reflect
Referring
              to
                         Types
• EMF Model for Java types and their members
• @Runtime: java.lang.reflect
• @Eclipse: org.eclipse.jdt.core
Java classes
Java classes
Imports
for Java types
Imports
for Java types
Instant feedback
Content Assist
... with respect to imports
Navigation to Java source code
Advanced matching of proposals
Questions?
     www.xtext.org   Twitter: @Xtext

Contenu connexe

Tendances

The Rust Programming Language: an Overview
The Rust Programming Language: an OverviewThe Rust Programming Language: an Overview
The Rust Programming Language: an OverviewRoberto Casadei
 
The Ring programming language version 1.9 book - Part 123 of 210
The Ring programming language version 1.9 book - Part 123 of 210The Ring programming language version 1.9 book - Part 123 of 210
The Ring programming language version 1.9 book - Part 123 of 210Mahmoud Samir Fayed
 
PyCon 2013 : Scripting to PyPi to GitHub and More
PyCon 2013 : Scripting to PyPi to GitHub and MorePyCon 2013 : Scripting to PyPi to GitHub and More
PyCon 2013 : Scripting to PyPi to GitHub and MoreMatt Harrison
 
Lab Log Summer 2016 - Sheng Li
Lab Log Summer 2016 - Sheng LiLab Log Summer 2016 - Sheng Li
Lab Log Summer 2016 - Sheng LiSheng Li
 
Why Python (for Statisticians)
Why Python (for Statisticians)Why Python (for Statisticians)
Why Python (for Statisticians)Matt Harrison
 
Learn You a Frege for Great Good!
Learn You a Frege for Great Good!Learn You a Frege for Great Good!
Learn You a Frege for Great Good!y_taka_23
 
Rust Intro @ Roma Rust meetup
Rust Intro @ Roma Rust meetup Rust Intro @ Roma Rust meetup
Rust Intro @ Roma Rust meetup Claudio Capobianco
 
STL ALGORITHMS
STL ALGORITHMSSTL ALGORITHMS
STL ALGORITHMSfawzmasood
 
Using QString effectively
Using QString effectivelyUsing QString effectively
Using QString effectivelyRoman Okolovich
 
Class 31: Deanonymizing
Class 31: DeanonymizingClass 31: Deanonymizing
Class 31: DeanonymizingDavid Evans
 
The Ring programming language version 1.8 book - Part 116 of 202
The Ring programming language version 1.8 book - Part 116 of 202The Ring programming language version 1.8 book - Part 116 of 202
The Ring programming language version 1.8 book - Part 116 of 202Mahmoud Samir Fayed
 
Functional Programming In Java
Functional Programming In JavaFunctional Programming In Java
Functional Programming In JavaAndrei Solntsev
 

Tendances (20)

The Rust Programming Language: an Overview
The Rust Programming Language: an OverviewThe Rust Programming Language: an Overview
The Rust Programming Language: an Overview
 
04 - Qt Data
04 - Qt Data04 - Qt Data
04 - Qt Data
 
Extending ns
Extending nsExtending ns
Extending ns
 
The Ring programming language version 1.9 book - Part 123 of 210
The Ring programming language version 1.9 book - Part 123 of 210The Ring programming language version 1.9 book - Part 123 of 210
The Ring programming language version 1.9 book - Part 123 of 210
 
Writing Parsers and Compilers with PLY
Writing Parsers and Compilers with PLYWriting Parsers and Compilers with PLY
Writing Parsers and Compilers with PLY
 
PyCon 2013 : Scripting to PyPi to GitHub and More
PyCon 2013 : Scripting to PyPi to GitHub and MorePyCon 2013 : Scripting to PyPi to GitHub and More
PyCon 2013 : Scripting to PyPi to GitHub and More
 
Lab Log Summer 2016 - Sheng Li
Lab Log Summer 2016 - Sheng LiLab Log Summer 2016 - Sheng Li
Lab Log Summer 2016 - Sheng Li
 
Why Python (for Statisticians)
Why Python (for Statisticians)Why Python (for Statisticians)
Why Python (for Statisticians)
 
Idiomatic C++
Idiomatic C++Idiomatic C++
Idiomatic C++
 
Learn You a Frege for Great Good!
Learn You a Frege for Great Good!Learn You a Frege for Great Good!
Learn You a Frege for Great Good!
 
Os Goodger
Os GoodgerOs Goodger
Os Goodger
 
Rust Intro @ Roma Rust meetup
Rust Intro @ Roma Rust meetup Rust Intro @ Roma Rust meetup
Rust Intro @ Roma Rust meetup
 
STL ALGORITHMS
STL ALGORITHMSSTL ALGORITHMS
STL ALGORITHMS
 
Python idiomatico
Python idiomaticoPython idiomatico
Python idiomatico
 
Using QString effectively
Using QString effectivelyUsing QString effectively
Using QString effectively
 
Class 31: Deanonymizing
Class 31: DeanonymizingClass 31: Deanonymizing
Class 31: Deanonymizing
 
The Ring programming language version 1.8 book - Part 116 of 202
The Ring programming language version 1.8 book - Part 116 of 202The Ring programming language version 1.8 book - Part 116 of 202
The Ring programming language version 1.8 book - Part 116 of 202
 
Functional programming in java
Functional programming in javaFunctional programming in java
Functional programming in java
 
Sara el hassad
Sara el hassadSara el hassad
Sara el hassad
 
Functional Programming In Java
Functional Programming In JavaFunctional Programming In Java
Functional Programming In Java
 

En vedette

Extending the Xbase Typesystem
Extending the Xbase TypesystemExtending the Xbase Typesystem
Extending the Xbase TypesystemSebastian Zarnekow
 
Xtext Un Framework Per La Creazione Di Dsl
Xtext   Un Framework Per La Creazione Di DslXtext   Un Framework Per La Creazione Di Dsl
Xtext Un Framework Per La Creazione Di DslFederico Tomassetti
 
Diagram Editors - The FXed Generation
Diagram Editors - The FXed GenerationDiagram Editors - The FXed Generation
Diagram Editors - The FXed GenerationDr. Jan Köhnlein
 
Usability Test Results Xtext New Project Wizard
Usability Test Results Xtext New Project WizardUsability Test Results Xtext New Project Wizard
Usability Test Results Xtext New Project WizardSandra Schering
 
Reddit Usability Testing
Reddit Usability TestingReddit Usability Testing
Reddit Usability TestingBrooke Hundley
 
Model-Driven Software Development - Introduction & Overview
Model-Driven Software Development - Introduction & OverviewModel-Driven Software Development - Introduction & Overview
Model-Driven Software Development - Introduction & OverviewEelco Visser
 
Jazoon 2010 - Building DSLs with Eclipse
Jazoon 2010 - Building DSLs with EclipseJazoon 2010 - Building DSLs with Eclipse
Jazoon 2010 - Building DSLs with EclipsePeter Friese
 
Enhancing Xtext for General Purpose Languages
Enhancing Xtext for General Purpose LanguagesEnhancing Xtext for General Purpose Languages
Enhancing Xtext for General Purpose LanguagesUniversity of York
 
Eclipse DemoCamp in Paris: Language Development with Xtext
Eclipse DemoCamp in Paris: Language Development with XtextEclipse DemoCamp in Paris: Language Development with Xtext
Eclipse DemoCamp in Paris: Language Development with XtextSebastian Zarnekow
 
From Stairway to Heaven onto the Highway to Hell with Xtext
From Stairway to Heaven onto the Highway to Hell with XtextFrom Stairway to Heaven onto the Highway to Hell with Xtext
From Stairway to Heaven onto the Highway to Hell with XtextKarsten Thoms
 
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
 
Building Your Own DSL with Xtext
Building Your Own DSL with XtextBuilding Your Own DSL with Xtext
Building Your Own DSL with XtextGlobalLogic Ukraine
 
Agile MDD
Agile MDDAgile MDD
Agile MDDfntnhd
 

En vedette (20)

Extending the Xbase Typesystem
Extending the Xbase TypesystemExtending the Xbase Typesystem
Extending the Xbase Typesystem
 
Xtext Un Framework Per La Creazione Di Dsl
Xtext   Un Framework Per La Creazione Di DslXtext   Un Framework Per La Creazione Di Dsl
Xtext Un Framework Per La Creazione Di Dsl
 
Diagram Editors - The FXed Generation
Diagram Editors - The FXed GenerationDiagram Editors - The FXed Generation
Diagram Editors - The FXed Generation
 
Usability Test Results Xtext New Project Wizard
Usability Test Results Xtext New Project WizardUsability Test Results Xtext New Project Wizard
Usability Test Results Xtext New Project Wizard
 
Reddit Usability Testing
Reddit Usability TestingReddit Usability Testing
Reddit Usability Testing
 
Model-Driven Software Development - Introduction & Overview
Model-Driven Software Development - Introduction & OverviewModel-Driven Software Development - Introduction & Overview
Model-Driven Software Development - Introduction & Overview
 
Java Performance MythBusters
Java Performance MythBustersJava Performance MythBusters
Java Performance MythBusters
 
Graphical Views For Xtext
Graphical Views For XtextGraphical Views For Xtext
Graphical Views For Xtext
 
Jazoon 2010 - Building DSLs with Eclipse
Jazoon 2010 - Building DSLs with EclipseJazoon 2010 - Building DSLs with Eclipse
Jazoon 2010 - Building DSLs with Eclipse
 
Enhancing Xtext for General Purpose Languages
Enhancing Xtext for General Purpose LanguagesEnhancing Xtext for General Purpose Languages
Enhancing Xtext for General Purpose Languages
 
Eclipse DemoCamp in Paris: Language Development with Xtext
Eclipse DemoCamp in Paris: Language Development with XtextEclipse DemoCamp in Paris: Language Development with Xtext
Eclipse DemoCamp in Paris: Language Development with Xtext
 
Xtext, diagrams and ux
Xtext, diagrams and uxXtext, diagrams and ux
Xtext, diagrams and ux
 
From Stairway to Heaven onto the Highway to Hell with Xtext
From Stairway to Heaven onto the Highway to Hell with XtextFrom Stairway to Heaven onto the Highway to Hell with Xtext
From Stairway to Heaven onto the Highway to Hell with Xtext
 
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
 
Java DSLs with Xtext
Java DSLs with XtextJava DSLs with Xtext
Java DSLs with Xtext
 
Building Your Own DSL with Xtext
Building Your Own DSL with XtextBuilding Your Own DSL with Xtext
Building Your Own DSL with Xtext
 
Agile MDD
Agile MDDAgile MDD
Agile MDD
 
Future of Xtext
Future of XtextFuture of Xtext
Future of Xtext
 
Xtext Best Practices
Xtext Best PracticesXtext Best Practices
Xtext Best Practices
 
CG2010 Introducing MDSD
CG2010 Introducing MDSDCG2010 Introducing MDSD
CG2010 Introducing MDSD
 

Similaire à MDSD with Eclipse @ JUG Hamburg

Domain-Specific Languages in der Praxis
Domain-Specific Languages in der PraxisDomain-Specific Languages in der Praxis
Domain-Specific Languages in der PraxisSven Efftinge
 
Domain Specific Languages With Eclipse Modeling
Domain Specific Languages With Eclipse ModelingDomain Specific Languages With Eclipse Modeling
Domain Specific Languages With Eclipse ModelingDr. Jan Köhnlein
 
Algorithm and Programming (Introduction of dev pascal, data type, value, and ...
Algorithm and Programming (Introduction of dev pascal, data type, value, and ...Algorithm and Programming (Introduction of dev pascal, data type, value, and ...
Algorithm and Programming (Introduction of dev pascal, data type, value, and ...Adam Mukharil Bachtiar
 
Chapter Eight(1)
Chapter Eight(1)Chapter Eight(1)
Chapter Eight(1)bolovv
 
IronSmalltalk
IronSmalltalkIronSmalltalk
IronSmalltalkESUG
 
Cp0675 03 may-2012-rm04
Cp0675 03 may-2012-rm04Cp0675 03 may-2012-rm04
Cp0675 03 may-2012-rm04Parth Mudgal
 
AST Transformations
AST TransformationsAST Transformations
AST TransformationsHamletDRC
 
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
 
Building DSLs with Xtext - Eclipse Modeling Day 2009
Building DSLs with Xtext - Eclipse Modeling Day 2009Building DSLs with Xtext - Eclipse Modeling Day 2009
Building DSLs with Xtext - Eclipse Modeling Day 2009Heiko Behrens
 
CS101- Introduction to Computing- Lecture 29
CS101- Introduction to Computing- Lecture 29CS101- Introduction to Computing- Lecture 29
CS101- Introduction to Computing- Lecture 29Bilal Ahmed
 
Copy/paste detector for source code on javascript
Copy/paste detector for source code on javascript Copy/paste detector for source code on javascript
Copy/paste detector for source code on javascript Andrey Kucherenko
 
015. Interface Python with MySQL.pdf
015. Interface Python with MySQL.pdf015. Interface Python with MySQL.pdf
015. Interface Python with MySQL.pdfSuneetaSingh28
 
Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout source{d}
 
Manipulating strings
Manipulating stringsManipulating strings
Manipulating stringsNicole Ryan
 

Similaire à MDSD with Eclipse @ JUG Hamburg (20)

Domain-Specific Languages in der Praxis
Domain-Specific Languages in der PraxisDomain-Specific Languages in der Praxis
Domain-Specific Languages in der Praxis
 
Domain Specific Languages With Eclipse Modeling
Domain Specific Languages With Eclipse ModelingDomain Specific Languages With Eclipse Modeling
Domain Specific Languages With Eclipse Modeling
 
Eclipse Banking Day
Eclipse Banking DayEclipse Banking Day
Eclipse Banking Day
 
Algorithm and Programming (Introduction of dev pascal, data type, value, and ...
Algorithm and Programming (Introduction of dev pascal, data type, value, and ...Algorithm and Programming (Introduction of dev pascal, data type, value, and ...
Algorithm and Programming (Introduction of dev pascal, data type, value, and ...
 
Chapter Eight(1)
Chapter Eight(1)Chapter Eight(1)
Chapter Eight(1)
 
IronSmalltalk
IronSmalltalkIronSmalltalk
IronSmalltalk
 
012. SQL.pdf
012. SQL.pdf012. SQL.pdf
012. SQL.pdf
 
Algorithm and Programming (Record)
Algorithm and Programming (Record)Algorithm and Programming (Record)
Algorithm and Programming (Record)
 
Cp0675 03 may-2012-rm04
Cp0675 03 may-2012-rm04Cp0675 03 may-2012-rm04
Cp0675 03 may-2012-rm04
 
AST Transformations
AST TransformationsAST Transformations
AST Transformations
 
Grammarware Memes
Grammarware MemesGrammarware Memes
Grammarware Memes
 
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
 
23_2-Pointer and DMA.pptx
23_2-Pointer and DMA.pptx23_2-Pointer and DMA.pptx
23_2-Pointer and DMA.pptx
 
Building DSLs with Xtext - Eclipse Modeling Day 2009
Building DSLs with Xtext - Eclipse Modeling Day 2009Building DSLs with Xtext - Eclipse Modeling Day 2009
Building DSLs with Xtext - Eclipse Modeling Day 2009
 
CS101- Introduction to Computing- Lecture 29
CS101- Introduction to Computing- Lecture 29CS101- Introduction to Computing- Lecture 29
CS101- Introduction to Computing- Lecture 29
 
Copy/paste detector for source code on javascript
Copy/paste detector for source code on javascript Copy/paste detector for source code on javascript
Copy/paste detector for source code on javascript
 
015. Interface Python with MySQL.pdf
015. Interface Python with MySQL.pdf015. Interface Python with MySQL.pdf
015. Interface Python with MySQL.pdf
 
Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout
 
Manipulating strings
Manipulating stringsManipulating strings
Manipulating strings
 
Interm codegen
Interm codegenInterm codegen
Interm codegen
 

Dernier

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 

Dernier (20)

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 

MDSD with Eclipse @ JUG Hamburg

  • 1. Model Driven Software Development with Eclipse Sven Efftinge Sebastian Zarnekow
  • 3. MDSD IS NOT MDA!
  • 4. TOP5 DON’TS IN CODE GENERATION
  • 6. CODE GENERATION USED TO CONSTRAIN DEVELOPERS
  • 7. SLOW GENERATION / BAD INTEGRATION
  • 10.
  • 11. • Domain Specific Language Development Framework • Based on: • Eclipse • Eclipse Modeling Framework (EMF) • Antlr parser generator
  • 12. Domain mming Language Development Framework Progra Specific • Based on: • Eclipse • Eclipse Modeling Framework (EMF) • Antlr parser generator
  • 13. Domain mming Language Development Framework Progra Specific • Based on:
  • 14. Domain mming Language Development Framework Progra Specific • Based on: • Eclipse
  • 15. Domain mming Language Development Framework Progra Specific • Based on: • Eclipse • Eclipse Modeling Framework (EMF)
  • 16. Domain mming Language Development Framework Progra Specific • Based on: • Eclipse • Eclipse Modeling Framework (EMF) • Antlr parser generator
  • 17.
  • 19. • History • 2005 : Prototype @ openArchitectureWare
  • 20. • History • 2005 : Prototype @ openArchitectureWare • 2007 : Xtext goes Eclipse TMF
  • 21. • History • 2005 : Prototype @ openArchitectureWare • 2007 : Xtext goes Eclipse TMF • 01/2008 : itemis forms development team
  • 22. • History • 2005 : Prototype @ openArchitectureWare • 2007 : Xtext goes Eclipse TMF • 01/2008 : itemis forms development team • 06/2009 : TMF Xtext 0.7.0 @ Eclipse Galileo
  • 23. • History • 2005 : Prototype @ openArchitectureWare • 2007 : Xtext goes Eclipse TMF • 01/2008 : itemis forms development team • 06/2009 : TMF Xtext 0.7.0 @ Eclipse Galileo • 09/2009 : Galileo SR1 with Xtext 0.7.2
  • 32. 182 project years says Ohloh.net
  • 33. Some users
  • 38. @SuppressWarnings("serial") @Entity Entity @Table(name = "BUCHUNGSKREISE_F") BUCHUNGSKREISE_F public class BuchungskreiseF extends AbstractEntity implements Serializable { @SuppressWarnings("unused") @Id Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "bkrIdSeq") @SequenceGenerator(name = "bkrIdSeq", sequenceName = "BKR_SEQ", allocationSize = 1) BKR_SEQ @Column(name = "BKR_ID", nullable = false BKR_ID false) private Long bkrId bkrId; public Long getBkrId() { return bkrId; } public void setBkrId(final Long bkrId) { this.bkrId = bkrId; } @Column(name = "KONTO_NR", nullable = false length = 45 KONTO_NR false, 45) private String kontoNr; kontoNr public String getKontoNr() { return kontoNr; } public void setKontoNr(final String kontoNr) { String oldValue = this.kontoNr; this.kontoNr = kontoNr; firePropertyChangeEvent("kontoNr", oldValue, this.kontoNr); }
  • 39. @SuppressWarnings("serial") @Entity Entity @Table(name = "BUCHUNGSKREISE_F") BUCHUNGSKREISE_F public class BuchungskreiseF extends AbstractEntity implements Serializable { @SuppressWarnings("unused") @Id Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "bkrIdSeq") @SequenceGenerator(name = "bkrIdSeq", sequenceName = "BKR_SEQ", allocationSize = 1) BKR_SEQ @Column(name = "BKR_ID", nullable = false BKR_ID false) private Long bkrId bkrId; public Long getBkrId() { return bkrId; } public void setBkrId(final Long bkrId) { this.bkrId = bkrId; } @Column(name = "KONTO_NR", nullable = false length = 45 KONTO_NR false, 45) private String kontoNr; kontoNr public String getKontoNr() { return kontoNr; } public void setKontoNr(final String kontoNr) { String oldValue = this.kontoNr; this.kontoNr = kontoNr; firePropertyChangeEvent("kontoNr", oldValue, this.kontoNr); }
  • 40. External DSL with Xtext entity BuchungskreiseF (id=bkrId sequenceName=BKR_SEQ) { String kontoNr (notNull, length=45) Long rgNrBkrIdentifikator (notNull, length=1) String referenzcodeKontoNr (notNull, length=45) }
  • 41. External DSL with Xtext entity BuchungskreiseF (id=bkrId sequenceName=BKR_SEQ) { String kontoNr Long rgNrBkrIdentifikator String referenzcodeKontoNr }
  • 42. External DSL with Xtext BUCHUNGSKREISE_F entity BuchungskreiseF (id=bkrId sequenceName=BKR_SEQ) { String kontoNr RG_NR_BKR_IDENTIFIKATOR Long rgNrBkrIdentifikator String referenzcodeKontoNr }
  • 43. entity BuchungskreiseF (id=bkrId sequenceName=BKR_SEQ) { }
  • 44. entity BuchungskreiseF (id=bkrId sequenceName=BKR_SEQ) { } TABLE BUCHUNGSKREISE_F ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 Database Schema
  • 45. entity BuchungskreiseF (id=bkrId sequenceName=BKR_SEQ) { } TABLESimilar to BUCHUNGSKREISE_F Ruby On Rails ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 ID NAME PROP1 DATE ATTR1 Database Schema
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 72. Editor AST TeX Xpa T ma p TeXeXpa p n nd m l p Te m a p n ad m pln lad te pl ad te at te e Generator Codegeneration
  • 73. Editor AST TeX Xpa T ma p TeXeXpa p n nd m l p Te m a p n ad m pln lad te pl ad te at te e Generator Codegeneration E Ex xe Ex A c r Ex Ae etcu uta Aecrtcuifata bl A rti uifata ctbl e rt fata ctb e ifa c b le ct t le
  • 75. Accessing models from Java // create a URI that points to the model file URI uri = URI.createURI("foo.mydsl");
  • 76. Accessing models from Java // create a URI that points to the model file URI uri = URI.createURI("foo.mydsl"); // create a resource Resource resource = new ResourceSetImpl().getResource(uri,true);
  • 77. Accessing models from Java // create a URI that points to the model file URI uri = URI.createURI("foo.mydsl"); // create a resource Resource resource = new ResourceSetImpl().getResource(uri,true); // get root model element from resource Model model = (Model) resource.getContents().get(0);
  • 78. Accessing models from Java // create a URI that points to the model file URI uri = URI.createURI("foo.mydsl"); // create a resource Resource resource = new ResourceSetImpl().getResource(uri,true); // get root model element from resource Model model = (Model) resource.getContents().get(0); // print name of first element System.out.println(model.getElements().get(0).getName());
  • 79. Accessing models from Java // create a URI that points to the model file URI uri = URI.createURI("foo.mydsl"); // create a resource Resource resource = new ResourceSetImpl().getResource(uri,true); // get root model element from resource Model model = (Model) resource.getContents().get(0); // print name of first element System.out.println(model.getElements().get(0).getName()); // change name of first element to "Bar" model.getElements().get(0).setName("Bar");
  • 80. Accessing models from Java // create a URI that points to the model file URI uri = URI.createURI("foo.mydsl"); // create a resource Resource resource = new ResourceSetImpl().getResource(uri,true); // get root model element from resource Model model = (Model) resource.getContents().get(0); // print name of first element System.out.println(model.getElements().get(0).getName()); // change name of first element to "Bar" model.getElements().get(0).setName("Bar"); // save resource resource.save(null);
  • 82. Integration with EMF eclipse Any EMF-based modeling Code Generator GMF Editor P R O J E C T Component
  • 83. Integration with EMF eclipse Any EMF-based modeling Code Generator GMF Editor P R O J E C T Component <<abstract>> XMIResource Resource
  • 84. Integration with EMF eclipse Any EMF-based modeling Code Generator GMF Editor P R O J E C T Component <<abstract>> XMIResource Resource
  • 85. Integration with EMF eclipse Any EMF-based modeling Code Generator GMF Editor P R O J E C T Component <<abstract>> XMI XMIResource Resource
  • 86. Integration with EMF eclipse Any EMF-based modeling Code Generator GMF Editor P R O J E C T Component <<abstract>> XMI XMIResource Resource
  • 87. Integration with EMF eclipse Any EMF-based modeling Code Generator GMF Editor P R O J E C T Component <<abstract>> XMI XMIResource Resource XtextResource
  • 88. Integration with EMF eclipse Any EMF-based modeling Code Generator GMF Editor P R O J E C T Component <<abstract>> XMI XMIResource Resource XtextResource
  • 89. Integration with EMF eclipse Any EMF-based modeling Code Generator GMF Editor P R O J E C T Component <<abstract>> XMI XMIResource Resource XtextResource Text
  • 90. Integration with EMF eclipse Any EMF-based modeling Code Generator GMF Editor P R O J E C T Component <<abstract>> XMI XMIResource Resource XtextResource Text Parser Linker Serializer ValueConverter ScopeProvider Formatter
  • 91. Customizing licensed by http://www.wordle.net/
  • 92. Customizing licensed by http://www.wordle.net/
  • 93. Customizing licensed by http://www.wordle.net/
  • 94. Customizing licensed by http://www.wordle.net/
  • 95. Customizing licensed by http://www.wordle.net/
  • 96. Customizing MyCustomLabelProvider licensed by http://www.wordle.net/
  • 99. Dependency Injection with Google Guice No dependency to concrete implementation
  • 100. Dependency Injection with Google Guice No dependency to concrete implementation No explicit construction
  • 101. Dependency Injection with Google Guice No dependency to concrete implementation No explicit construction Easy testing
  • 102. Dependency Injection with Google Guice No dependency to concrete implementation No explicit construction Easy testing Easy composition
  • 103. Advanced Editor Features
  • 106. Find declaration in index
  • 107.
  • 108.
  • 109. Default builder indexes whole class path
  • 112.
  • 113.
  • 114.
  • 117.
  • 118.
  • 119.
  • 120.
  • 121.
  • 122. Textual & Graphical Combined
  • 123.
  • 124.
  • 125.
  • 126.
  • 127.
  • 128.
  • 129.
  • 130.
  • 133.
  • 136.
  • 137. Referring to Types
  • 138. Referring to Types • EMF Model for Java types and their members
  • 139. Referring to Types • EMF Model for Java types and their members • @Runtime: java.lang.reflect
  • 140. Referring to Types • EMF Model for Java types and their members • @Runtime: java.lang.reflect • @Eclipse: org.eclipse.jdt.core
  • 143.
  • 147.
  • 149.
  • 150. ... with respect to imports
  • 151.
  • 152. Navigation to Java source code
  • 153.
  • 154.
  • 155.
  • 156. Advanced matching of proposals
  • 157.
  • 158.
  • 159.
  • 160.
  • 161.
  • 162.
  • 163.
  • 164.
  • 165.
  • 166.
  • 167.
  • 168. Questions? www.xtext.org Twitter: @Xtext