SlideShare a Scribd company logo
Pragmatic DSL Design with



Sven Efftinge (itemis) / Sebastian Zarnekow (itemis) / Jan Köhnlein (itemis)
The plan for today :
The plan for today :

1. Xtext 2.0
   What is Xtext and what’s new in 2.0?
   Hands-On : Develop a DSL.
The plan for today :

1. Xtext 2.0
   What is Xtext and what’s new in 2.0?
   Hands-On : Develop a DSL.

2. Xbase
   What’s that and why should I care?
   Hands-On : Play with it and integrate it in a DSL.
The plan for today :

1. Xtext 2.0
   What is Xtext and what’s new in 2.0?
   Hands-On : Develop a DSL.

2. Xbase
   What’s that and why should I care?
   Hands-On : Play with it and integrate it in a DSL.

3. Xtend
   Yet another language? Are you serious?
   Hands-On :Write a codegenerator with Xtend.
What is


          ?
Eclipse Project
IDE Framework
Language Framework
(Domain-Specific)
Language Framework
Users
Users
Pragmatic DSL Design with Xtext, Xbase and Xtend 2
Pragmatic DSL Design with Xtext, Xbase and Xtend 2
Pragmatic DSL Design with Xtext, Xbase and Xtend 2
Eclipse IDE Framework (JFace Text, etc.)
Java
  Development
     Tools
     (JDT)




Eclipse IDE Framework (JFace Text, etc.)
Java
  Development
     Tools
     (JDT)




Eclipse IDE Framework (JFace Text, etc.)
Java
  Development
     Tools
     (JDT)




Eclipse IDE Framework (JFace Text, etc.)   Eclipse Modeling Framework (EMF)
Java
  Development
     Tools
     (JDT)
                                                               Antlr Parser
                                                                Generator




Eclipse IDE Framework (JFace Text, etc.)   Eclipse Modeling Framework (EMF)
is Highly Adaptable
Advanced Language-Specific Editing Features
                                  by Default
Advanced Language-Specific Editing Features
                                   by Default




                             Syntax Coloring
Advanced Language-Specific Editing Features
                                   by Default




                             Syntax Coloring



  Wizards
Advanced Language-Specific Editing Features
                                   by Default




Content Assist

                             Syntax Coloring



  Wizards
Advanced Language-Specific Editing Features
                                   by Default




Content Assist

                             Syntax Coloring



                               Code Folding
  Wizards
Advanced Language-Specific Editing Features
                                   by Default




Content Assist
 Find References
                             Syntax Coloring



                               Code Folding
  Wizards
Advanced Language-Specific Editing Features
                                    by Default



                     Global Indexing
Content Assist
 Find References
                              Syntax Coloring



                                Code Folding
  Wizards
Advanced Language-Specific Editing Features
                                      by Default

                           Go To Declaration

                     Global Indexing
Content Assist
 Find References
                              Syntax Coloring



                                 Code Folding
  Wizards
Advanced Language-Specific Editing Features
                                                 by Default

                                      Go To Declaration

                           Global Indexing
Content Assist
 Find References
                                         Syntax Coloring



                                            Code Folding
  Wizards          Bracket Matching
Advanced Language-Specific Editing Features
                                                 by Default

                                      Go To Declaration

                           Global Indexing
Content Assist
 Find References
                                         Syntax Coloring

                               Auto Editing
                                            Code Folding
  Wizards          Bracket Matching
Advanced Language-Specific Editing Features
                                                     by Default

                                          Go To Declaration

                               Global Indexing
Content Assist
 Find References
                                             Syntax Coloring
Incremental Builders
                                   Auto Editing
                                                Code Folding
   Wizards             Bracket Matching
Advanced Language-Specific Editing Features
                                                     by Default

                                          Go To Declaration

                               Global Indexing
Content Assist                                   Outline View


 Find References
                                             Syntax Coloring
Incremental Builders
                                   Auto Editing
                                                Code Folding
   Wizards             Bracket Matching
Advanced Language-Specific Editing Features
                                                     by Default

                                          Go To Declaration

                               Global Indexing
Content Assist                                   Outline View


 Find References
Incremental Builders
                        Validation           Syntax Coloring

                                   Auto Editing
                                                Code Folding
   Wizards             Bracket Matching
Advanced Language-Specific Editing Features
                                                     by Default

                                          Go To Declaration
      Template Proposals
                               Global Indexing
Content Assist                                   Outline View


 Find References
Incremental Builders
                        Validation           Syntax Coloring

                                   Auto Editing
                                                Code Folding
   Wizards             Bracket Matching
Advanced Language-Specific Editing Features
                                                     by Default

                                          Go To Declaration
      Template Proposals
                               Global Indexing
Content Assist                                   Outline View
                         Quick Fixes
 Find References
Incremental Builders
                        Validation           Syntax Coloring

                                   Auto Editing
                                                Code Folding
   Wizards             Bracket Matching
Advanced Language-Specific Editing Features
                                                     by Default
                Refactoring               Go To Declaration
      Template Proposals
                               Global Indexing
Content Assist                                   Outline View
                         Quick Fixes
 Find References
Incremental Builders
                        Validation           Syntax Coloring

                                   Auto Editing
                                                Code Folding
   Wizards             Bracket Matching
Advanced Language-Specific Editing Features
                                                     by Default
                Refactoring               Go To Declaration
      Template Proposals
                               Global Indexing
Content Assist                                   Outline View
                         Quick Fixes
 Find References
Incremental Builders
                        Validation           Syntax Coloring


             Rich Hovers           Auto Editing
                                                Code Folding
   Wizards             Bracket Matching
... but there is a problem
       with external DSLs
What about
Expressions?
Pragmatic DSL Design with Xtext, Xbase and Xtend 2
Expressions are
 complicated !
Pragmatic DSL Design with Xtext, Xbase and Xtend 2
Protected Regions
Protected Regions
• generated and manually written code mixed
  up
Protected Regions
• generated and manually written code mixed
  up
• manual deletion of artifacts
Protected Regions
• generated and manually written code mixed
  up
• manual deletion of artifacts
• platform dependent information
Protected Regions
• generated and manually written code mixed
  up
• manual deletion of artifacts
• platform dependent information
• information is spreaded!
Generation Gap Pattern
Generation Gap Pattern
     technically required type hierarchies
Generation Gap Pattern
     technically required type hierarchies
                    additional complexity
Generation Gap Pattern
     technically required type hierarchies
                    additional complexity
         platform dependent information
Generation Gap Pattern
     technically required type hierarchies
                    additional complexity
         platform dependent information
             information spreaded!
Black box
target language literals
Black box
target language literals
• bound to target platform
Black box
target language literals
• bound to target platform
 • no option for MDA friends
Black box
target language literals
• bound to target platform
 • no option for MDA friends
• no tooling!
Black box
target language literals
• bound to target platform
 • no option for MDA friends
• no tooling!
• long turnarounds!
base
base
Modern Expression Language
base
Modern Expression Language
JVM-Integration
base
Modern Expression Language
JVM-Integration
Statically Typed
base
Modern Expression Language
JVM-Integration
Statically Typed
Highly Reusable
Your Language




                o.e.xtext.common.Terminals
EMF
Your Language




      common.Types
                               o.e.xtext.common.Terminals


JDT   JVM        EMF
Your Language


      Xbase Ecore
                                      Xbase Grammar
      common.Types


                                o.e.xtext.common.Terminals
JDT   JVM           EMF
@Override
protected IScope createLocalVarScope(~) {
    if (context instanceof Operation) {
        IScope actualScope =
          super.createLocalVarScope(~);
        Operation operation = (Operation) context;
        return createScope(operation.getParams(),
                          actualScope);
    }
    return super.createLocalVarScope(~);
}
Using Xbase
Using Xbase

Mixin the Grammar
Using Xbase

Mixin the Grammar
JVM Model Inference
Using Xbase

Mixin the Grammar
JVM Model Inference
Scoping
Using Xbase

Mixin the Grammar
JVM Model Inference
Scoping
Type System
Using Xbase

Mixin the Grammar
JVM Model Inference
Scoping
Type System
Compiler / Interpreter
A DSL for Generating Code
Model               Code




          Code
        Generator
Model                                Code
                    package base;



                    public   class Address {
                    	        private String street;
                    	        	
                    	        public String getStreet() {
                    	        	      return street;
                    	        }
                    	
                    	        public void setStreet(String street) {
                    	        	      this.street = street;
                    	        }
                    	
                    	        private String city;

          Code      	
                    	
                    	
                             	
                             public String getCity() {
                             	      return city;


        Generator
                    	        }
                    	
                    	        public void setCity(String city) {
                    	        	      this.city = city;
                    	        }
                    	
                    	        private String state;
                    	        	
                    	        public String getState() {
                    	        	      return state;
                    	        }
                    	
                    	        public void setState(String state) {
                    	        	      this.state = state;
                    	        }

                    	        private String postalCode;
                    	        	
                    	        public String getPostalCode() {
                    	        	      return postalCode;
                    	        }
                    	
                    	        public void setPostalCode(String postalCode) {
                    	        	      this.postalCode = postalCode;
                    	        }
                    	
                    }
BUT I CAN
DO THAT IN
Pragmatic DSL Design with Xtext, Xbase and Xtend 2
package example.codegen;

import   org.eclipse.xtext.common.types.JvmFormalParameter;
import   org.eclipse.xtext.common.types.JvmTypeReference;
import   org.eclipse.xtext.example.domainmodel.domainmodel.Entity;
import   org.eclipse.xtext.example.domainmodel.domainmodel.Feature;
import   org.eclipse.xtext.example.domainmodel.domainmodel.Operation;
import   org.eclipse.xtext.example.domainmodel.domainmodel.Property;

public class JavaGenerator {

	   public String compile(Entity e) {
	   	 StringBuilder b = new StringBuilder();
	   	 b.append("package " + packageName(e) + "n");
	   	 b.append("n");
	   	 b.append("/**n");
	   	 b.append(" * Automatically generated. Direct modification is futile.n");
	   	 b.append(" */n");
	   	 b.append("public class ").append(e.getName());
	   	 if(e.getSuperType() != null) {
	   	 	 b.append(" extends ").append(compile(e.getSuperType()));
	   	 }
	   	 b.append(" {n");
	   	 for(Feature f: e.getFeatures()) {
	   	 	 if(f instanceof Property)
	   	 	 	 feature((Property)f);
	   	 	 else if(f instanceof Operation)
	   	 	 	 feature((Operation)f);
	   	 }
	   	 b.append("}n");
	   	 return b.toString();
package example.codegen;

import   org.eclipse.xtext.common.types.JvmFormalParameter;
import   org.eclipse.xtext.common.types.JvmTypeReference;
import   org.eclipse.xtext.example.domainmodel.domainmodel.Entity;
import   org.eclipse.xtext.example.domainmodel.domainmodel.Feature;
import   org.eclipse.xtext.example.domainmodel.domainmodel.Operation;
import   org.eclipse.xtext.example.domainmodel.domainmodel.Property;

public class JavaGenerator {                             No Multiline
	
	
    public String compile(Entity e) {
    	 StringBuilder b = new StringBuilder();
                                                         String Literals
	   	 b.append("package " + packageName(e) + "n");
	   	 b.append("n");
	   	 b.append("/**n");
	   	 b.append(" * Automatically generated. Direct modification is futile.n");
	   	 b.append(" */n");
	   	 b.append("public class ").append(e.getName());
	   	 if(e.getSuperType() != null) {
	   	 	 b.append(" extends ").append(compile(e.getSuperType()));
	   	 }
	   	 b.append(" {n");
	   	 for(Feature f: e.getFeatures()) {
	   	 	 if(f instanceof Property)
	   	 	 	 feature((Property)f);
	   	 	 else if(f instanceof Operation)
	   	 	 	 feature((Operation)f);
	   	 }
	   	 b.append("}n");
	   	 return b.toString();
public String compile(Entity e) {
	   	 StringBuilder b = new StringBuilder();
	   	 b.append("package " + packageName(e) + "n");
	   	 b.append("n");
	   	 b.append("/**n");
	   	 b.append(" * Automatically generated. Direct modification is futile.n");
	   	 b.append(" */n");
	   	 b.append("public class ").append(e.getName());
	   	 if(e.getSuperType() != null) {
	   	 	 b.append(" extends ").append(compile(e.getSuperType()));
	   	 }
	   	 b.append(" {n");
	   	 for(Feature f: e.getFeatures()) {
	
	
    	 	 if(f instanceof Property)
    	 	 	 feature((Property)f);
                                            Instanceof
	
	
    	 	 else if(f instanceof Operation)
    	 	 	 feature((Operation)f);
                                             Cascades
	   	 }
	   	 b.append("}n");
	   	 return b.toString();
	   }
	
	   public String feature(Property property) {
	   	 StringBuilder b = new StringBuilder();
	   	 String type = compile(property.getType());
	   	 String name = property.getName();
	   	 b.append("// property ").append(name).append("n");
	   	 b.append("private ").append(type).append(" ").append(name).append("n");
	   	 b.append("n");
	   	 b.append("public ").append(type).append("get").append(name).append("() {n");
	   	 b.append(" return ").append(name).append(";n");
}
	   	   b.append("}n");
	   	   return b.toString();
	   }
	
	   public String feature(Property property) {
	   	 StringBuilder b = new StringBuilder();
	   	 String type = compile(property.getType());
	   	 String name = property.getName();
	   	 b.append("// property ").append(name).append("n");
	   	 b.append("private ").append(type).append(" ").append(name).append("n");
	   	 b.append("n");
	   	 b.append("public ").append(type).append("get").append(name).append("() {n");
	   	 b.append(" return ").append(name).append(";n");
	   	 b.append("}n");
	   	 b.append("n");
	   	 b.append("public ").append("set").append(name)
	   	 	 .append("(").append(type).append(" ").append(name).append("){n");
	   	 b.append(" this.").append(name).append(" = ").append(name).append(";n");
	   	 b.append("}n");
	   	 b.append("n");
	   	 return b.toString();
	   }
                                                       Noisy String
	
	
    public String feature(Operation operation) {
    	 StringBuilder b = new StringBuilder();          Concatenation
	   	 String name = operation.getName();
	   	 b.append("// operation ").append(name).append("n");
	   	 b.append(compile(operation.getType())).append(" ").append(name).append("(");
	   	 boolean isFirst = true;
	   	 for(JvmFormalParameter p: operation.getParams()) {
Pragmatic DSL Design with Xtext, Xbase and Xtend 2
Pragmatic DSL Design with Xtext, Xbase and Xtend 2
Pragmatic DSL Design with Xtext, Xbase and Xtend 2
Statically
  Typed
Statically     Xbase
  Typed      Expressions
« RICH STRINGS »
POLYMORPHIC
 dispatch
COMPILES TO
DEPENDENCY
@InjectION
TOOLING
Indigo - June 22nd

More Related Content

What's hot

DevOps
DevOpsDevOps
DevOps
srivinayak
 
Lessons learned on localization testing
Lessons learned on localization testingLessons learned on localization testing
Lessons learned on localization testing
gaoliang641
 
Deep learning for NLP
Deep learning for NLPDeep learning for NLP
Deep learning for NLP
Sihem Romdhani
 
Introduction to programming world
Introduction to programming worldIntroduction to programming world
Introduction to programming world
Jaskaran Singh
 
High Level Application Scripting With EFL and LuaJIT
High Level Application Scripting With EFL and LuaJITHigh Level Application Scripting With EFL and LuaJIT
High Level Application Scripting With EFL and LuaJIT
Samsung Open Source Group
 
Ipt655 Wk6 Word Powerpoint
Ipt655 Wk6 Word PowerpointIpt655 Wk6 Word Powerpoint
Ipt655 Wk6 Word Powerpoint
SaraJoy
 

What's hot (6)

DevOps
DevOpsDevOps
DevOps
 
Lessons learned on localization testing
Lessons learned on localization testingLessons learned on localization testing
Lessons learned on localization testing
 
Deep learning for NLP
Deep learning for NLPDeep learning for NLP
Deep learning for NLP
 
Introduction to programming world
Introduction to programming worldIntroduction to programming world
Introduction to programming world
 
High Level Application Scripting With EFL and LuaJIT
High Level Application Scripting With EFL and LuaJITHigh Level Application Scripting With EFL and LuaJIT
High Level Application Scripting With EFL and LuaJIT
 
Ipt655 Wk6 Word Powerpoint
Ipt655 Wk6 Word PowerpointIpt655 Wk6 Word Powerpoint
Ipt655 Wk6 Word Powerpoint
 

Viewers also liked

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
meysholdt
 
Building Your Own DSL with Xtext
Building Your Own DSL with XtextBuilding Your Own DSL with Xtext
Building Your Own DSL with Xtext
GlobalLogic Ukraine
 
Future of Xtext
Future of XtextFuture of Xtext
Future of Xtext
Sven Efftinge
 
Xtext Best Practices
Xtext Best PracticesXtext Best Practices
Xtext Best Practices
Sebastian Zarnekow
 
Scoping
ScopingScoping
Scoping Tips and Tricks
Scoping Tips and TricksScoping Tips and Tricks
Scoping Tips and Tricks
Sebastian Zarnekow
 
Extending the Xbase Typesystem
Extending the Xbase TypesystemExtending the Xbase Typesystem
Extending the Xbase Typesystem
Sebastian Zarnekow
 
Executable specifications for xtext
Executable specifications for xtextExecutable specifications for xtext
Executable specifications for xtext
meysholdt
 
Java DSLs with Xtext
Java DSLs with XtextJava DSLs with Xtext
Java DSLs with Xtext
Dr. Jan Köhnlein
 
Introduction to Xbase
Introduction to XbaseIntroduction to Xbase
Introduction to Xbase
Holger Schill
 
Using Xcore with Xtext
Using Xcore with XtextUsing Xcore with Xtext
Using Xcore with Xtext
Holger Schill
 
Xtext's new Formatter API
Xtext's new Formatter APIXtext's new Formatter API
Xtext's new Formatter API
meysholdt
 
Building a Python IDE with Xtext
Building a Python IDE with XtextBuilding a Python IDE with Xtext
Building a Python IDE with Xtext
Sebastian Zarnekow
 
Jazoon 2010 - Building DSLs with Eclipse
Jazoon 2010 - Building DSLs with EclipseJazoon 2010 - Building DSLs with Eclipse
Jazoon 2010 - Building DSLs with Eclipse
Peter Friese
 
Graphical Views For Xtext
Graphical Views For XtextGraphical Views For Xtext
Graphical Views For Xtext
Dr. Jan Köhnlein
 
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
Sebastian Zarnekow
 
Enhancing Xtext for General Purpose Languages
Enhancing Xtext for General Purpose LanguagesEnhancing Xtext for General Purpose Languages
Enhancing Xtext for General Purpose Languages
University of York
 
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
Karsten Thoms
 
What's Cooking in Xtext 2.0
What's Cooking in Xtext 2.0What's Cooking in Xtext 2.0
What's Cooking in Xtext 2.0
Dr. Jan Köhnlein
 
Codegeneration Goodies
Codegeneration GoodiesCodegeneration Goodies
Codegeneration Goodies
meysholdt
 

Viewers also liked (20)

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
 
Building Your Own DSL with Xtext
Building Your Own DSL with XtextBuilding Your Own DSL with Xtext
Building Your Own DSL with Xtext
 
Future of Xtext
Future of XtextFuture of Xtext
Future of Xtext
 
Xtext Best Practices
Xtext Best PracticesXtext Best Practices
Xtext Best Practices
 
Scoping
ScopingScoping
Scoping
 
Scoping Tips and Tricks
Scoping Tips and TricksScoping Tips and Tricks
Scoping Tips and Tricks
 
Extending the Xbase Typesystem
Extending the Xbase TypesystemExtending the Xbase Typesystem
Extending the Xbase Typesystem
 
Executable specifications for xtext
Executable specifications for xtextExecutable specifications for xtext
Executable specifications for xtext
 
Java DSLs with Xtext
Java DSLs with XtextJava DSLs with Xtext
Java DSLs with Xtext
 
Introduction to Xbase
Introduction to XbaseIntroduction to Xbase
Introduction to Xbase
 
Using Xcore with Xtext
Using Xcore with XtextUsing Xcore with Xtext
Using Xcore with Xtext
 
Xtext's new Formatter API
Xtext's new Formatter APIXtext's new Formatter API
Xtext's new Formatter API
 
Building a Python IDE with Xtext
Building a Python IDE with XtextBuilding a Python IDE with Xtext
Building a Python IDE with Xtext
 
Jazoon 2010 - Building DSLs with Eclipse
Jazoon 2010 - Building DSLs with EclipseJazoon 2010 - Building DSLs with Eclipse
Jazoon 2010 - Building DSLs with Eclipse
 
Graphical Views For Xtext
Graphical Views For XtextGraphical Views For Xtext
Graphical Views For Xtext
 
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
 
Enhancing Xtext for General Purpose Languages
Enhancing Xtext for General Purpose LanguagesEnhancing Xtext for General Purpose Languages
Enhancing Xtext for General Purpose Languages
 
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
 
What's Cooking in Xtext 2.0
What's Cooking in Xtext 2.0What's Cooking in Xtext 2.0
What's Cooking in Xtext 2.0
 
Codegeneration Goodies
Codegeneration GoodiesCodegeneration Goodies
Codegeneration Goodies
 

Similar to Pragmatic DSL Design with Xtext, Xbase and Xtend 2

Павел Фатин и Александр Подхалюзин «Scala plugin for IntelliJ IDEA»
Павел Фатин и Александр Подхалюзин «Scala plugin for IntelliJ IDEA»Павел Фатин и Александр Подхалюзин «Scala plugin for IntelliJ IDEA»
Павел Фатин и Александр Подхалюзин «Scala plugin for IntelliJ IDEA»
e-Legion
 
The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)
lennartkats
 
VA Code Completion
VA Code CompletionVA Code Completion
VA Code Completion
ESUG
 
DSL, the absolute weapon for the development
DSL, the absolute weapon for the developmentDSL, the absolute weapon for the development
DSL, the absolute weapon for the development
ESUG
 
Sapphire
SapphireSapphire
Sapphire
Vitaly Baum
 
Language Weaver
Language WeaverLanguage Weaver
Language Weaver
tyler frieling
 
WIAD2012 A2 - Letting go of perfection: Developing IA agility
WIAD2012 A2 - Letting go of perfection: Developing IA agilityWIAD2012 A2 - Letting go of perfection: Developing IA agility
WIAD2012 A2 - Letting go of perfection: Developing IA agility
Chris Farnum
 
Aras PLM Viewing Markup and Secure Social
Aras PLM Viewing Markup and Secure SocialAras PLM Viewing Markup and Secure Social
Aras PLM Viewing Markup and Secure Social
Aras
 
Domain Specific Language Design
Domain Specific Language DesignDomain Specific Language Design
Domain Specific Language Design
Markus Voelter
 
Mind Click Services
Mind Click ServicesMind Click Services
Mind Click Services
Mind Click
 
TERMINALFOUR t44u 2009 - University of St Andrews Case Study
TERMINALFOUR t44u 2009 - University of St Andrews Case StudyTERMINALFOUR t44u 2009 - University of St Andrews Case Study
TERMINALFOUR t44u 2009 - University of St Andrews Case Study
Terminalfour
 
Aras PLM Software Visualization
Aras PLM Software VisualizationAras PLM Software Visualization
Aras PLM Software Visualization
Aras
 
Presenter manual web designing (specially for summer interns)
Presenter manual web designing (specially for summer interns)Presenter manual web designing (specially for summer interns)
Presenter manual web designing (specially for summer interns)
XPERT INFOTECH
 
HTML5 and Timed Media Playback
HTML5 and Timed Media PlaybackHTML5 and Timed Media Playback
HTML5 and Timed Media Playback
Sidra Abbasi
 
Web Designing Syllabus
Web Designing SyllabusWeb Designing Syllabus
Web Designing Syllabus
Web Trainings Academy
 
Visual Experience 360 Flex
Visual Experience 360 FlexVisual Experience 360 Flex
Visual Experience 360 Flex
Juan Sanchez
 
MIX11アップデート ~Windows Phone 7, Silverlight 5, IE9, HTML5~ 前編
MIX11アップデート ~Windows Phone 7, Silverlight 5, IE9, HTML5~ 前編MIX11アップデート ~Windows Phone 7, Silverlight 5, IE9, HTML5~ 前編
MIX11アップデート ~Windows Phone 7, Silverlight 5, IE9, HTML5~ 前編
Microsoft
 
Converging Textual and Graphical Editors
Converging Textual  and Graphical EditorsConverging Textual  and Graphical Editors
Converging Textual and Graphical Editors
meysholdt
 
DSL Construction rith Ruby
DSL Construction rith RubyDSL Construction rith Ruby
DSL Construction rith Ruby
ThoughtWorks
 
Vb
VbVb

Similar to Pragmatic DSL Design with Xtext, Xbase and Xtend 2 (20)

Павел Фатин и Александр Подхалюзин «Scala plugin for IntelliJ IDEA»
Павел Фатин и Александр Подхалюзин «Scala plugin for IntelliJ IDEA»Павел Фатин и Александр Подхалюзин «Scala plugin for IntelliJ IDEA»
Павел Фатин и Александр Подхалюзин «Scala plugin for IntelliJ IDEA»
 
The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)
 
VA Code Completion
VA Code CompletionVA Code Completion
VA Code Completion
 
DSL, the absolute weapon for the development
DSL, the absolute weapon for the developmentDSL, the absolute weapon for the development
DSL, the absolute weapon for the development
 
Sapphire
SapphireSapphire
Sapphire
 
Language Weaver
Language WeaverLanguage Weaver
Language Weaver
 
WIAD2012 A2 - Letting go of perfection: Developing IA agility
WIAD2012 A2 - Letting go of perfection: Developing IA agilityWIAD2012 A2 - Letting go of perfection: Developing IA agility
WIAD2012 A2 - Letting go of perfection: Developing IA agility
 
Aras PLM Viewing Markup and Secure Social
Aras PLM Viewing Markup and Secure SocialAras PLM Viewing Markup and Secure Social
Aras PLM Viewing Markup and Secure Social
 
Domain Specific Language Design
Domain Specific Language DesignDomain Specific Language Design
Domain Specific Language Design
 
Mind Click Services
Mind Click ServicesMind Click Services
Mind Click Services
 
TERMINALFOUR t44u 2009 - University of St Andrews Case Study
TERMINALFOUR t44u 2009 - University of St Andrews Case StudyTERMINALFOUR t44u 2009 - University of St Andrews Case Study
TERMINALFOUR t44u 2009 - University of St Andrews Case Study
 
Aras PLM Software Visualization
Aras PLM Software VisualizationAras PLM Software Visualization
Aras PLM Software Visualization
 
Presenter manual web designing (specially for summer interns)
Presenter manual web designing (specially for summer interns)Presenter manual web designing (specially for summer interns)
Presenter manual web designing (specially for summer interns)
 
HTML5 and Timed Media Playback
HTML5 and Timed Media PlaybackHTML5 and Timed Media Playback
HTML5 and Timed Media Playback
 
Web Designing Syllabus
Web Designing SyllabusWeb Designing Syllabus
Web Designing Syllabus
 
Visual Experience 360 Flex
Visual Experience 360 FlexVisual Experience 360 Flex
Visual Experience 360 Flex
 
MIX11アップデート ~Windows Phone 7, Silverlight 5, IE9, HTML5~ 前編
MIX11アップデート ~Windows Phone 7, Silverlight 5, IE9, HTML5~ 前編MIX11アップデート ~Windows Phone 7, Silverlight 5, IE9, HTML5~ 前編
MIX11アップデート ~Windows Phone 7, Silverlight 5, IE9, HTML5~ 前編
 
Converging Textual and Graphical Editors
Converging Textual  and Graphical EditorsConverging Textual  and Graphical Editors
Converging Textual and Graphical Editors
 
DSL Construction rith Ruby
DSL Construction rith RubyDSL Construction rith Ruby
DSL Construction rith Ruby
 
Vb
VbVb
Vb
 

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 2017
Dr. 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 IDEs
Dr. Jan Köhnlein
 
Responsiveness
ResponsivenessResponsiveness
Responsiveness
Dr. Jan Köhnlein
 
Getting rid of backtracking
Getting rid of backtrackingGetting rid of backtracking
Getting rid of backtracking
Dr. 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 FXDiagram
Dr. Jan Köhnlein
 
XRobots
XRobotsXRobots
Diagrams, Xtext and UX
Diagrams, Xtext and UXDiagrams, Xtext and UX
Diagrams, Xtext and UX
Dr. Jan Köhnlein
 
Xtext, diagrams and ux
Xtext, diagrams and uxXtext, diagrams and ux
Xtext, diagrams and ux
Dr. Jan Köhnlein
 
Diagram Editors - The FXed Generation
Diagram Editors - The FXed GenerationDiagram Editors - The FXed Generation
Diagram Editors - The FXed Generation
Dr. Jan Köhnlein
 
Code Generation With Xtend
Code Generation With XtendCode Generation With Xtend
Code Generation With Xtend
Dr. Jan Köhnlein
 
The Xtext Grammar Language
The Xtext Grammar LanguageThe Xtext Grammar Language
The Xtext Grammar Language
Dr. 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 Species
Dr. Jan Köhnlein
 
DSLs for Java Developers
DSLs for Java DevelopersDSLs for Java Developers
DSLs for Java Developers
Dr. 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 editing
Dr. 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 editing
Dr. 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 editing
Dr. Jan Köhnlein
 
Android tutorial - Xtext slides
Android tutorial - Xtext slidesAndroid tutorial - Xtext slides
Android tutorial - Xtext slides
Dr. Jan Köhnlein
 
Eclipse meets e4
Eclipse meets e4Eclipse meets e4
Eclipse meets e4
Dr. Jan Köhnlein
 
Combining Text and Graphics in Eclipse-based Modeling Tools
Combining Text and Graphics in Eclipse-based Modeling ToolsCombining Text and Graphics in Eclipse-based Modeling Tools
Combining Text and Graphics in Eclipse-based Modeling Tools
Dr. Jan Köhnlein
 
Combining Graphical and Textual
Combining Graphical and TextualCombining Graphical and Textual
Combining Graphical and Textual
Dr. 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
 
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
 
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
 
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
 
Android tutorial - Xtext slides
Android tutorial - Xtext slidesAndroid tutorial - Xtext slides
Android tutorial - Xtext slides
 
Eclipse meets e4
Eclipse meets e4Eclipse meets e4
Eclipse meets e4
 
Combining Text and Graphics in Eclipse-based Modeling Tools
Combining Text and Graphics in Eclipse-based Modeling ToolsCombining Text and Graphics in Eclipse-based Modeling Tools
Combining Text and Graphics in Eclipse-based Modeling Tools
 
Combining Graphical and Textual
Combining Graphical and TextualCombining Graphical and Textual
Combining Graphical and Textual
 

Recently uploaded

Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
BrainSell Technologies
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
HackersList
 
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Torry Harris
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
Kief Morris
 
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
alexjohnson7307
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
RaminGhanbari2
 
Integrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecaseIntegrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecase
shyamraj55
 
Vulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive OverviewVulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive Overview
Steven Carlson
 
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
shanihomely
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
Tatiana Al-Chueyr
 
Salesforce AI & Einstein Copilot Workshop
Salesforce AI & Einstein Copilot WorkshopSalesforce AI & Einstein Copilot Workshop
Salesforce AI & Einstein Copilot Workshop
CEPTES Software Inc
 
Google I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged SlidesGoogle I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged Slides
Google Developer Group - Harare
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
Neo4j
 
Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024
aakash malhotra
 
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes..."Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
Anant Gupta
 
Tirana Tech Meetup - Agentic RAG with Milvus, Llama3 and Ollama
Tirana Tech Meetup - Agentic RAG with Milvus, Llama3 and OllamaTirana Tech Meetup - Agentic RAG with Milvus, Llama3 and Ollama
Tirana Tech Meetup - Agentic RAG with Milvus, Llama3 and Ollama
Zilliz
 
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
sunilverma7884
 
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Kunal Gupta
 
CiscoIconsLibrary cours de réseau VLAN.ppt
CiscoIconsLibrary cours de réseau VLAN.pptCiscoIconsLibrary cours de réseau VLAN.ppt
CiscoIconsLibrary cours de réseau VLAN.ppt
moinahousna
 
The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...
The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...
The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...
digitalxplive
 

Recently uploaded (20)

Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
 
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
 
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
 
Integrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecaseIntegrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecase
 
Vulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive OverviewVulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive Overview
 
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
 
Salesforce AI & Einstein Copilot Workshop
Salesforce AI & Einstein Copilot WorkshopSalesforce AI & Einstein Copilot Workshop
Salesforce AI & Einstein Copilot Workshop
 
Google I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged SlidesGoogle I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged Slides
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
 
Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024
 
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes..."Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
 
Tirana Tech Meetup - Agentic RAG with Milvus, Llama3 and Ollama
Tirana Tech Meetup - Agentic RAG with Milvus, Llama3 and OllamaTirana Tech Meetup - Agentic RAG with Milvus, Llama3 and Ollama
Tirana Tech Meetup - Agentic RAG with Milvus, Llama3 and Ollama
 
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
 
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
 
CiscoIconsLibrary cours de réseau VLAN.ppt
CiscoIconsLibrary cours de réseau VLAN.pptCiscoIconsLibrary cours de réseau VLAN.ppt
CiscoIconsLibrary cours de réseau VLAN.ppt
 
The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...
The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...
The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...
 

Pragmatic DSL Design with Xtext, Xbase and Xtend 2

  • 1. Pragmatic DSL Design with Sven Efftinge (itemis) / Sebastian Zarnekow (itemis) / Jan Köhnlein (itemis)
  • 2. The plan for today :
  • 3. The plan for today : 1. Xtext 2.0 What is Xtext and what’s new in 2.0? Hands-On : Develop a DSL.
  • 4. The plan for today : 1. Xtext 2.0 What is Xtext and what’s new in 2.0? Hands-On : Develop a DSL. 2. Xbase What’s that and why should I care? Hands-On : Play with it and integrate it in a DSL.
  • 5. The plan for today : 1. Xtext 2.0 What is Xtext and what’s new in 2.0? Hands-On : Develop a DSL. 2. Xbase What’s that and why should I care? Hands-On : Play with it and integrate it in a DSL. 3. Xtend Yet another language? Are you serious? Hands-On :Write a codegenerator with Xtend.
  • 15. Eclipse IDE Framework (JFace Text, etc.)
  • 16. Java Development Tools (JDT) Eclipse IDE Framework (JFace Text, etc.)
  • 17. Java Development Tools (JDT) Eclipse IDE Framework (JFace Text, etc.)
  • 18. Java Development Tools (JDT) Eclipse IDE Framework (JFace Text, etc.) Eclipse Modeling Framework (EMF)
  • 19. Java Development Tools (JDT) Antlr Parser Generator Eclipse IDE Framework (JFace Text, etc.) Eclipse Modeling Framework (EMF)
  • 21. Advanced Language-Specific Editing Features by Default
  • 22. Advanced Language-Specific Editing Features by Default Syntax Coloring
  • 23. Advanced Language-Specific Editing Features by Default Syntax Coloring Wizards
  • 24. Advanced Language-Specific Editing Features by Default Content Assist Syntax Coloring Wizards
  • 25. Advanced Language-Specific Editing Features by Default Content Assist Syntax Coloring Code Folding Wizards
  • 26. Advanced Language-Specific Editing Features by Default Content Assist Find References Syntax Coloring Code Folding Wizards
  • 27. Advanced Language-Specific Editing Features by Default Global Indexing Content Assist Find References Syntax Coloring Code Folding Wizards
  • 28. Advanced Language-Specific Editing Features by Default Go To Declaration Global Indexing Content Assist Find References Syntax Coloring Code Folding Wizards
  • 29. Advanced Language-Specific Editing Features by Default Go To Declaration Global Indexing Content Assist Find References Syntax Coloring Code Folding Wizards Bracket Matching
  • 30. Advanced Language-Specific Editing Features by Default Go To Declaration Global Indexing Content Assist Find References Syntax Coloring Auto Editing Code Folding Wizards Bracket Matching
  • 31. Advanced Language-Specific Editing Features by Default Go To Declaration Global Indexing Content Assist Find References Syntax Coloring Incremental Builders Auto Editing Code Folding Wizards Bracket Matching
  • 32. Advanced Language-Specific Editing Features by Default Go To Declaration Global Indexing Content Assist Outline View Find References Syntax Coloring Incremental Builders Auto Editing Code Folding Wizards Bracket Matching
  • 33. Advanced Language-Specific Editing Features by Default Go To Declaration Global Indexing Content Assist Outline View Find References Incremental Builders Validation Syntax Coloring Auto Editing Code Folding Wizards Bracket Matching
  • 34. Advanced Language-Specific Editing Features by Default Go To Declaration Template Proposals Global Indexing Content Assist Outline View Find References Incremental Builders Validation Syntax Coloring Auto Editing Code Folding Wizards Bracket Matching
  • 35. Advanced Language-Specific Editing Features by Default Go To Declaration Template Proposals Global Indexing Content Assist Outline View Quick Fixes Find References Incremental Builders Validation Syntax Coloring Auto Editing Code Folding Wizards Bracket Matching
  • 36. Advanced Language-Specific Editing Features by Default Refactoring Go To Declaration Template Proposals Global Indexing Content Assist Outline View Quick Fixes Find References Incremental Builders Validation Syntax Coloring Auto Editing Code Folding Wizards Bracket Matching
  • 37. Advanced Language-Specific Editing Features by Default Refactoring Go To Declaration Template Proposals Global Indexing Content Assist Outline View Quick Fixes Find References Incremental Builders Validation Syntax Coloring Rich Hovers Auto Editing Code Folding Wizards Bracket Matching
  • 38. ... but there is a problem with external DSLs
  • 44. Protected Regions • generated and manually written code mixed up
  • 45. Protected Regions • generated and manually written code mixed up • manual deletion of artifacts
  • 46. Protected Regions • generated and manually written code mixed up • manual deletion of artifacts • platform dependent information
  • 47. Protected Regions • generated and manually written code mixed up • manual deletion of artifacts • platform dependent information • information is spreaded!
  • 49. Generation Gap Pattern technically required type hierarchies
  • 50. Generation Gap Pattern technically required type hierarchies additional complexity
  • 51. Generation Gap Pattern technically required type hierarchies additional complexity platform dependent information
  • 52. Generation Gap Pattern technically required type hierarchies additional complexity platform dependent information information spreaded!
  • 54. Black box target language literals • bound to target platform
  • 55. Black box target language literals • bound to target platform • no option for MDA friends
  • 56. Black box target language literals • bound to target platform • no option for MDA friends • no tooling!
  • 57. Black box target language literals • bound to target platform • no option for MDA friends • no tooling! • long turnarounds!
  • 58. base
  • 63. Your Language o.e.xtext.common.Terminals EMF
  • 64. Your Language common.Types o.e.xtext.common.Terminals JDT JVM EMF
  • 65. Your Language Xbase Ecore Xbase Grammar common.Types o.e.xtext.common.Terminals JDT JVM EMF
  • 66. @Override protected IScope createLocalVarScope(~) { if (context instanceof Operation) { IScope actualScope = super.createLocalVarScope(~); Operation operation = (Operation) context; return createScope(operation.getParams(), actualScope); } return super.createLocalVarScope(~); }
  • 69. Using Xbase Mixin the Grammar JVM Model Inference
  • 70. Using Xbase Mixin the Grammar JVM Model Inference Scoping
  • 71. Using Xbase Mixin the Grammar JVM Model Inference Scoping Type System
  • 72. Using Xbase Mixin the Grammar JVM Model Inference Scoping Type System Compiler / Interpreter
  • 73. A DSL for Generating Code
  • 74. Model Code Code Generator
  • 75. Model Code package base; public class Address { private String street; public String getStreet() { return street; } public void setStreet(String street) { this.street = street; } private String city; Code public String getCity() { return city; Generator } public void setCity(String city) { this.city = city; } private String state; public String getState() { return state; } public void setState(String state) { this.state = state; } private String postalCode; public String getPostalCode() { return postalCode; } public void setPostalCode(String postalCode) { this.postalCode = postalCode; } }
  • 76. BUT I CAN DO THAT IN
  • 78. package example.codegen; import org.eclipse.xtext.common.types.JvmFormalParameter; import org.eclipse.xtext.common.types.JvmTypeReference; import org.eclipse.xtext.example.domainmodel.domainmodel.Entity; import org.eclipse.xtext.example.domainmodel.domainmodel.Feature; import org.eclipse.xtext.example.domainmodel.domainmodel.Operation; import org.eclipse.xtext.example.domainmodel.domainmodel.Property; public class JavaGenerator { public String compile(Entity e) { StringBuilder b = new StringBuilder(); b.append("package " + packageName(e) + "n"); b.append("n"); b.append("/**n"); b.append(" * Automatically generated. Direct modification is futile.n"); b.append(" */n"); b.append("public class ").append(e.getName()); if(e.getSuperType() != null) { b.append(" extends ").append(compile(e.getSuperType())); } b.append(" {n"); for(Feature f: e.getFeatures()) { if(f instanceof Property) feature((Property)f); else if(f instanceof Operation) feature((Operation)f); } b.append("}n"); return b.toString();
  • 79. package example.codegen; import org.eclipse.xtext.common.types.JvmFormalParameter; import org.eclipse.xtext.common.types.JvmTypeReference; import org.eclipse.xtext.example.domainmodel.domainmodel.Entity; import org.eclipse.xtext.example.domainmodel.domainmodel.Feature; import org.eclipse.xtext.example.domainmodel.domainmodel.Operation; import org.eclipse.xtext.example.domainmodel.domainmodel.Property; public class JavaGenerator { No Multiline public String compile(Entity e) { StringBuilder b = new StringBuilder(); String Literals b.append("package " + packageName(e) + "n"); b.append("n"); b.append("/**n"); b.append(" * Automatically generated. Direct modification is futile.n"); b.append(" */n"); b.append("public class ").append(e.getName()); if(e.getSuperType() != null) { b.append(" extends ").append(compile(e.getSuperType())); } b.append(" {n"); for(Feature f: e.getFeatures()) { if(f instanceof Property) feature((Property)f); else if(f instanceof Operation) feature((Operation)f); } b.append("}n"); return b.toString();
  • 80. public String compile(Entity e) { StringBuilder b = new StringBuilder(); b.append("package " + packageName(e) + "n"); b.append("n"); b.append("/**n"); b.append(" * Automatically generated. Direct modification is futile.n"); b.append(" */n"); b.append("public class ").append(e.getName()); if(e.getSuperType() != null) { b.append(" extends ").append(compile(e.getSuperType())); } b.append(" {n"); for(Feature f: e.getFeatures()) { if(f instanceof Property) feature((Property)f); Instanceof else if(f instanceof Operation) feature((Operation)f); Cascades } b.append("}n"); return b.toString(); } public String feature(Property property) { StringBuilder b = new StringBuilder(); String type = compile(property.getType()); String name = property.getName(); b.append("// property ").append(name).append("n"); b.append("private ").append(type).append(" ").append(name).append("n"); b.append("n"); b.append("public ").append(type).append("get").append(name).append("() {n"); b.append(" return ").append(name).append(";n");
  • 81. } b.append("}n"); return b.toString(); } public String feature(Property property) { StringBuilder b = new StringBuilder(); String type = compile(property.getType()); String name = property.getName(); b.append("// property ").append(name).append("n"); b.append("private ").append(type).append(" ").append(name).append("n"); b.append("n"); b.append("public ").append(type).append("get").append(name).append("() {n"); b.append(" return ").append(name).append(";n"); b.append("}n"); b.append("n"); b.append("public ").append("set").append(name) .append("(").append(type).append(" ").append(name).append("){n"); b.append(" this.").append(name).append(" = ").append(name).append(";n"); b.append("}n"); b.append("n"); return b.toString(); } Noisy String public String feature(Operation operation) { StringBuilder b = new StringBuilder(); Concatenation String name = operation.getName(); b.append("// operation ").append(name).append("n"); b.append(compile(operation.getType())).append(" ").append(name).append("("); boolean isFirst = true; for(JvmFormalParameter p: operation.getParams()) {
  • 86. Statically Xbase Typed Expressions

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. \n
  78. \n
  79. \n
  80. \n
  81. \n
  82. \n
  83. \n
  84. \n
  85. \n
  86. \n
  87. \n
  88. \n
  89. \n
  90. \n
  91. \n
  92. \n
  93. \n
  94. \n
  95. \n
  96. \n
  97. \n
  98. \n
  99. \n
  100. \n
  101. \n
  102. \n
  103. \n
  104. \n
  105. \n
  106. \n
  107. \n
  108. \n
  109. \n
  110. \n
  111. \n
  112. \n
  113. \n