Xtext Eclipse Con

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite & 1 Group

    Xtext Eclipse Con - Presentation Transcript

    1. Textual Modeling Framework Jan Koehnlein - Sven Efftinge itemis Wednesday, March 25, 2009
    2. Domain-Specific Language (DSL) Wednesday, March 25, 2009
    3. Domain-Specific Language (DSL) A DSL is a formal, processable language targeting at a specific viewpoint or aspect of a software system. Wednesday, March 25, 2009
    4. Domain-Specific Language (DSL) A DSL is a formal, processable language targeting at a specific viewpoint or aspect of a software system. It’s semantics, flexibility and notation is designed in order to support working with that viewpoint as good as possible. Wednesday, March 25, 2009
    5. Why DSLs? • higher abstractions • avoid redundancy • separation of concerns • use domain concepts (Ubiquitous Language) Wednesday, March 25, 2009
    6. The challenge Wednesday, March 25, 2009
    7. Complicated Wednesday, March 25, 2009
    8. Complicated & Expensive ? Wednesday, March 25, 2009
    9. licensed by http://www.wordle.net/ Wednesday, March 25, 2009
    10. How we address this with Wednesday, March 25, 2009
    11. Convenience Wednesday, March 25, 2009
    12. Wednesday, March 25, 2009
    13. Wednesday, March 25, 2009
    14. Wednesday, March 25, 2009
    15. Wednesday, March 25, 2009
    16. Wednesday, March 25, 2009
    17. Wednesday, March 25, 2009
    18. Wednesday, March 25, 2009
    19. Wednesday, March 25, 2009
    20. Wednesday, March 25, 2009
    21. grammar org.xtext.example.MyDsl with org.eclipse.xtext.common.Terminals generate myDsl \"http://www.xtext.org/example/MyDsl\" Model: (types+=Type)*; Type: Datatype | Entity; Datatype: 'datatype' name=ID; Entity: 'entity' name=ID '{' (features+=Feature)* '}'; Feature: type=[Type] name=ID; Wednesday, March 25, 2009
    22. Grammar Definition grammar org.xtext.example.MyDsl with org.eclipse.xtext.common.Terminals generate myDsl \"http://www.xtext.org/example/MyDsl\" Model: (types+=Type)*; Type: Datatype | Entity; Datatype: 'datatype' name=ID; Entity: 'entity' name=ID '{' (features+=Feature)* '}'; Feature: type=[Type] name=ID; Wednesday, March 25, 2009
    23. Grammar Definition Terminal Rule Import grammar org.xtext.example.MyDsl with org.eclipse.xtext.common.Terminals generate myDsl \"http://www.xtext.org/example/MyDsl\" Model: (types+=Type)*; Type: Datatype | Entity; Datatype: 'datatype' name=ID; Entity: 'entity' name=ID '{' (features+=Feature)* '}'; Feature: type=[Type] name=ID; Wednesday, March 25, 2009
    24. Grammar Definition Terminal Rule Import grammar org.xtext.example.MyDsl Derived with org.eclipse.xtext.common.Terminals Metamodel generate myDsl \"http://www.xtext.org/example/MyDsl\" Model: (types+=Type)*; Type: Datatype | Entity; Datatype: 'datatype' name=ID; Entity: 'entity' name=ID '{' (features+=Feature)* '}'; Feature: type=[Type] name=ID; Wednesday, March 25, 2009
    25. Grammar Definition Terminal Rule Import grammar org.xtext.example.MyDsl Derived with org.eclipse.xtext.common.Terminals Metamodel generate myDsl \"http://www.xtext.org/example/MyDsl\" Model: Parser (types+=Type)*; Rules Type: Datatype | Entity; Datatype: 'datatype' name=ID; Entity: 'entity' name=ID '{' (features+=Feature)* '}'; Feature: type=[Type] name=ID; Wednesday, March 25, 2009
    26. Grammar Definition Terminal Rule Import grammar org.xtext.example.MyDsl Derived with org.eclipse.xtext.common.Terminals Metamodel generate myDsl \"http://www.xtext.org/example/MyDsl\" Containment Reference Model: Parser (types+=Type)*; Rules Type: Datatype | Entity; Datatype: 'datatype' name=ID; Entity: 'entity' name=ID '{' (features+=Feature)* '}'; Feature: type=[Type] name=ID; Wednesday, March 25, 2009
    27. Grammar Definition Terminal Rule Import grammar org.xtext.example.MyDsl Derived with org.eclipse.xtext.common.Terminals Metamodel generate myDsl \"http://www.xtext.org/example/MyDsl\" Containment Reference Model: Parser (types+=Type)*; Cardinality Rules Type: Datatype | Entity; Datatype: 'datatype' name=ID; Entity: 'entity' name=ID '{' (features+=Feature)* '}'; Feature: type=[Type] name=ID; Wednesday, March 25, 2009
    28. Grammar Definition Terminal Rule Import grammar org.xtext.example.MyDsl Derived with org.eclipse.xtext.common.Terminals Metamodel generate myDsl \"http://www.xtext.org/example/MyDsl\" Containment Reference Model: Parser (types+=Type)*; Cardinality Rules Type: Datatype | Entity; Alternatives Datatype: 'datatype' name=ID; Entity: 'entity' name=ID '{' (features+=Feature)* '}'; Feature: type=[Type] name=ID; Wednesday, March 25, 2009
    29. Grammar Definition Terminal Rule Import grammar org.xtext.example.MyDsl Derived with org.eclipse.xtext.common.Terminals Metamodel generate myDsl \"http://www.xtext.org/example/MyDsl\" Containment Reference Model: Parser (types+=Type)*; Cardinality Rules Type: Datatype | Entity; Alternatives Datatype: 'datatype' name=ID; Call to Entity: Terminal 'entity' name=ID '{' (features+=Feature)* Rule '}'; Feature: type=[Type] name=ID; Wednesday, March 25, 2009
    30. Grammar Definition Terminal Rule Import grammar org.xtext.example.MyDsl Derived with org.eclipse.xtext.common.Terminals Metamodel generate myDsl \"http://www.xtext.org/example/MyDsl\" Containment Reference Model: Parser (types+=Type)*; Cardinality Rules Type: Datatype | Entity; Alternatives Datatype: 'datatype' name=ID; Call to Entity: Keywords Terminal 'entity' name=ID '{' (features+=Feature)* Rule '}'; Feature: type=[Type] name=ID; Wednesday, March 25, 2009
    31. Grammar Definition Terminal Rule Import grammar org.xtext.example.MyDsl Derived with org.eclipse.xtext.common.Terminals Metamodel generate myDsl \"http://www.xtext.org/example/MyDsl\" Containment Reference Model: Parser (types+=Type)*; Cardinality Rules Type: Datatype | Entity; Alternatives Datatype: 'datatype' name=ID; Call to Entity: Keywords Terminal 'entity' name=ID '{' (features+=Feature)* Cross Rule '}'; Reference Feature: type=[Type] name=ID; Wednesday, March 25, 2009
    32. Metamodel Derivation MyDsl grammar org.xtext.example.MyDsl with org.eclipse.xtext.common.Terminals Model generate myDsl \"http://www.xtext.org/example/MyDsl\" Model: * Type (types+=Type)*; name: String Type: Datatype | Entity; Datatype: Datatype Entity 'datatype' name=ID; Entity: 'entity' name=ID '{' type (features+=Feature)* * '}'; Feature * name: String Feature: type=[Datatype] name=ID; Wednesday, March 25, 2009
    33. Metamodel Derivation MyDsl grammar org.xtext.example.MyDsl with org.eclipse.xtext.common.Terminals Model generate myDsl \"http://www.xtext.org/example/MyDsl\" Model: * Type (types+=Type)*; name: String Type: Datatype | Entity; Datatype: Datatype Entity 'datatype' name=ID; Entity: 'entity' name=ID '{' type (features+=Feature)* * '}'; Feature * name: String Feature: type=[Datatype] name=ID; Wednesday, March 25, 2009
    34. Metamodel Derivation MyDsl grammar org.xtext.example.MyDsl with org.eclipse.xtext.common.Terminals Model generate myDsl \"http://www.xtext.org/example/MyDsl\" Model: * Type (types+=Type)*; name: String Type: Datatype | Entity; Datatype: Datatype Entity 'datatype' name=ID; Entity: 'entity' name=ID '{' type (features+=Feature)* * '}'; Feature * name: String Feature: type=[Datatype] name=ID; Wednesday, March 25, 2009
    35. Metamodel Derivation MyDsl grammar org.xtext.example.MyDsl with org.eclipse.xtext.common.Terminals Model generate myDsl \"http://www.xtext.org/example/MyDsl\" Model: * Type (types+=Type)*; name: String Type: Datatype | Entity; Datatype: Datatype Entity 'datatype' name=ID; Entity: 'entity' name=ID '{' type (features+=Feature)* * '}'; Feature * name: String Feature: type=[Datatype] name=ID; Wednesday, March 25, 2009
    36. Metamodel Derivation MyDsl grammar org.xtext.example.MyDsl with org.eclipse.xtext.common.Terminals Model generate myDsl \"http://www.xtext.org/example/MyDsl\" Model: * Type (types+=Type)*; name: String Type: Datatype | Entity; Datatype: Datatype Entity 'datatype' name=ID; Entity: 'entity' name=ID '{' type (features+=Feature)* * '}'; Feature * name: String Feature: type=[Datatype] name=ID; Wednesday, March 25, 2009
    37. Metamodel Derivation MyDsl grammar org.xtext.example.MyDsl with org.eclipse.xtext.common.Terminals Model generate myDsl \"http://www.xtext.org/example/MyDsl\" Model: * Type (types+=Type)*; name: String Type: Datatype | Entity; Datatype: Datatype Entity 'datatype' name=ID; Entity: 'entity' name=ID '{' type (features+=Feature)* * '}'; Feature * name: String Feature: type=[Datatype] name=ID; Wednesday, March 25, 2009
    38. Metamodel Derivation MyDsl grammar org.xtext.example.MyDsl with org.eclipse.xtext.common.Terminals Model generate myDsl \"http://www.xtext.org/example/MyDsl\" Model: * Type (types+=Type)*; name: String Type: Datatype | Entity; Datatype: Datatype Entity 'datatype' name=ID; Entity: 'entity' name=ID '{' type (features+=Feature)* * '}'; Feature * name: String Feature: type=[Datatype] name=ID; Wednesday, March 25, 2009
    39. Metamodel Derivation MyDsl grammar org.xtext.example.MyDsl with org.eclipse.xtext.common.Terminals Model generate myDsl \"http://www.xtext.org/example/MyDsl\" Model: * Type (types+=Type)*; name: String Type: Datatype | Entity; Datatype: Datatype Entity 'datatype' name=ID; Entity: 'entity' name=ID '{' type (features+=Feature)* * '}'; Feature * name: String Feature: type=[Datatype] name=ID; Wednesday, March 25, 2009
    40. Metamodel Derivation MyDsl grammar org.xtext.example.MyDsl with org.eclipse.xtext.common.Terminals Model generate myDsl \"http://www.xtext.org/example/MyDsl\" Model: * Type (types+=Type)*; name: String Type: Datatype | Entity; Datatype: Datatype Entity 'datatype' name=ID; Entity: 'entity' name=ID '{' type (features+=Feature)* * '}'; Feature * name: String Feature: type=[Datatype] name=ID; Wednesday, March 25, 2009
    41. Metamodel Derivation MyDsl grammar org.xtext.example.MyDsl with org.eclipse.xtext.common.Terminals Model generate myDsl \"http://www.xtext.org/example/MyDsl\" Model: * Type (types+=Type)*; name: String Type: Datatype | Entity; Datatype: Datatype Entity 'datatype' name=ID; Entity: 'entity' name=ID '{' type (features+=Feature)* * '}'; Feature * name: String Feature: type=[Datatype] name=ID; Wednesday, March 25, 2009
    42. Metamodel Derivation MyDsl grammar org.xtext.example.MyDsl with org.eclipse.xtext.common.Terminals Model generate myDsl \"http://www.xtext.org/example/MyDsl\" Model: * Type (types+=Type)*; name: String Type: Datatype | Entity; Datatype: Datatype Entity 'datatype' name=ID; Entity: 'entity' name=ID '{' type (features+=Feature)* * '}'; Feature * name: String Feature: type=[Datatype] name=ID; Wednesday, March 25, 2009
    43. Metamodel Derivation MyDsl grammar org.xtext.example.MyDsl with org.eclipse.xtext.common.Terminals Model generate myDsl \"http://www.xtext.org/example/MyDsl\" Model: * Type (types+=Type)*; name: String Type: Datatype | Entity; Datatype: Datatype Entity 'datatype' name=ID; Entity: 'entity' name=ID '{' type (features+=Feature)* * '}'; Feature * name: String Feature: type=[Datatype] name=ID; Wednesday, March 25, 2009
    44. licensed by http://www.wordle.net/ Wednesday, March 25, 2009
    45. Based on the grammar and Ecore models, Xtext provides you with sensible default implementations. licensed by http://www.wordle.net/ Wednesday, March 25, 2009
    46. Validation Wednesday, March 25, 2009
    47. Wednesday, March 25, 2009
    48. Wednesday, March 25, 2009
    49. Wednesday, March 25, 2009
    50. Wednesday, March 25, 2009
    51. Customizing the LabelProvider public class MySpecialLabelProvider extends DefaultLabelProvider { public String label(Feature f) { return f.getName()+\":\"+f.getType().getName(); } } ‣Naming Convention ‣Polymorphic Dispatch ‣Fault tolerance Wednesday, March 25, 2009
    52. Flexibility Wednesday, March 25, 2009
    53. licensed by http://www.wordle.net/ Wednesday, March 25, 2009
    54. Dependency management licensed by http://www.wordle.net/ Wednesday, March 25, 2009
    55. Dependency management licensed by http://www.wordle.net/ Wednesday, March 25, 2009
    56. Dependency management licensed by http://www.wordle.net/ Wednesday, March 25, 2009
    57. Dependency management licensed by http://www.wordle.net/ Wednesday, March 25, 2009
    58. Dependency management licensed by http://www.wordle.net/ Wednesday, March 25, 2009
    59. MyCustomLabelProvider licensed by http://www.wordle.net/ Wednesday, March 25, 2009
    60. Dependency Injection with Google fGuice Wednesday, March 25, 2009
    61. Dependency Injection with Google fGuice Wednesday, March 25, 2009
    62. Dependency Injection with Google fGuice ‣No dependency to concrete implementation Wednesday, March 25, 2009
    63. Dependency Injection with Google fGuice ‣No dependency to concrete implementation ‣No explicit construction Wednesday, March 25, 2009
    64. Dependency Injection with Google fGuice ‣No dependency to concrete implementation ‣No explicit construction ‣Easy testing Wednesday, March 25, 2009
    65. Dependency Injection with Google fGuice ‣No dependency to concrete implementation ‣No explicit construction ‣Easy testing ‣Easy composition Wednesday, March 25, 2009
    66. Configuration of Components in Xtext AbstractDeclarativeModule DefaultRuntimeModule DefaultUIModule From Xtext Your Project GeneratedRuntimeModule GeneratedUIModule RuntimeModule UIModule Wednesday, March 25, 2009
    67. Configuration of Components in Xtext /** * used to register components to be used within the IDE. */ public class DomainmodelUiModule extends GeneratedDomainmodelUiModule { @Override public Class<? extends ILabelProvider> bindILabelProvider() { return MySpecialLabelProvider.class; } } Wednesday, March 25, 2009
    68. and Equinox Injector is created during Bundle.start(...) @Override public void start(BundleContext context) throws Exception { super.start(context); INSTANCE = this; injector = Guice.createInjector( new DomainmodelRuntimeModule(), new DomainmodelUiModule()); } Wednesday, March 25, 2009
    69. and Equinox ExecutableExtensions are created via IExecutableExtensionFactory <extension point=\"org.eclipse.emf.ecore.extension_parser\"> <parser class=\"my.pack.DomainmodelExecutableExtensionFactory: org.eclipse.xtext.resource.XtextResourceFactory\" type=\"dmodel\"> </parser> </extension> Wednesday, March 25, 2009
    70. Composable Code Generator ‣ generator is composed of “fragments” Wednesday, March 25, 2009
    71. Composable Code Generator ‣ generator is composed of “fragments” ‣ fragments can contribute to: Wednesday, March 25, 2009
    72. Composable Code Generator ‣ generator is composed of “fragments” ‣ fragments can contribute to: ‣ Manifest.MF Wednesday, March 25, 2009
    73. Composable Code Generator ‣ generator is composed of “fragments” ‣ fragments can contribute to: ‣ Manifest.MF ‣ plugin.xml Wednesday, March 25, 2009
    74. Composable Code Generator ‣ generator is composed of “fragments” ‣ fragments can contribute to: ‣ Manifest.MF ‣ plugin.xml ‣ Guice modules Wednesday, March 25, 2009
    75. Composable Code Generator ‣ generator is composed of “fragments” ‣ fragments can contribute to: ‣ Manifest.MF ‣ plugin.xml ‣ Guice modules ‣ Add your own fragments Wednesday, March 25, 2009
    76. Future Plans Wednesday, March 25, 2009
    77. Galileo Wednesday, March 25, 2009
    78. Galileo • Index Wednesday, March 25, 2009
    79. Galileo • Index • Enum Rules Wednesday, March 25, 2009
    80. Galileo • Index • Enum Rules • Bug fixing / Performance Tuning Wednesday, March 25, 2009
    81. Galileo • Index • Enum Rules • Bug fixing / Performance Tuning • Documentation Wednesday, March 25, 2009
    82. Galileo • Index • Enum Rules • Bug fixing / Performance Tuning • Documentation • Sugar (Wizards, Tutorials, etc.) Wednesday, March 25, 2009
    83. Post Galileo Wednesday, March 25, 2009
    84. Post Galileo ‣ More UI features Wednesday, March 25, 2009
    85. Post Galileo ‣ More UI features ‣Basic Language Libraries Wednesday, March 25, 2009
    86. Post Galileo ‣ More UI features ‣Basic Language Libraries ‣“Eat your own dog food” continued Wednesday, March 25, 2009
    87. Thank you very much for listening Visit the project’s web site : www.xtext.org Copyright 2009 by itemis Wednesday, March 25, 2009
    88. Convenient & Flexible Wednesday, March 25, 2009

    + Sven EfftingeSven Efftinge, 8 months ago

    custom

    2147 views, 1 favs, 3 embeds more stats

    Talk about TMF Xtext (www.xtext.org) given at Eclip more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 2147
      • 2073 on SlideShare
      • 74 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 104
    Most viewed embeds
    • 43 views on http://www.itemis.de
    • 29 views on http://www.itemis.com
    • 2 views on https://onion.net

    more

    All embeds
    • 43 views on http://www.itemis.de
    • 29 views on http://www.itemis.com
    • 2 views on https://onion.net

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories

    Groups / Events