Your SlideShare is downloading. ×
0
Setting Up the
    Development Workbench
•   Copy both to your local disk:

    •   the right archive for your platform

 ...
meets
    Developing an editor
for the e4 workbench model
Moritz Eysholdt                   Jan Köhnlein



                  Heiko Behrens
Moritz Eysholdt                   Jan Köhnlein



                  Heiko Behrens
Moritz Eysholdt                   Jan Köhnlein



                  Heiko Behrens
• Simplify programming
• Simplify programming
• Declarative styling / UI markup
• Simplify programming
• Declarative styling / UI markup
• Uniform, pervasive platform
• Simplify programming
• Declarative styling / UI markup
• Uniform, pervasive platform
• Diversity of contributors
• Simplify programming
• Declarative styling / UI markup
• Uniform, pervasive platform
• Diversity of contributors
• Backw...
Run the Demo
• Import the Contacts Demo application as a
  project
• Try to run the Contacts Demo product
  (fails, but cr...
Workbench Modeling Tools
Workbench Modeling Tools




 e4 Visual Designer
Workbench Modeling Tools




 e4 Visual Designer   Generic Ecore
G
 ra
      m
       m
           ar
Reference




                    ar
 Model




                 m
                m
            ra
            G
Reference




                     ar
 Model




                   m
                 m
              ra
             G
 ...
Reference




                                  ar
   Model




                                m
                        ...
Runtime
  Superclass




  Subclass     Class




ecore meta model       LL(*) Parser   editor
Runtime
  Superclass




  Subclass     Class




ecore meta model       LL(*) Parser   editor




                       ...
Runtime
  Superclass




  Subclass     Class




ecore meta model       LL(*) Parser   editor




                       ...
Runtime
  Superclass




  Subclass     Class




ecore meta model       LL(*) Parser   editor




                       ...
Runtime
  Superclass




  Subclass     Class




ecore meta model       LL(*) Parser   editor




                       ...
Runtime
   Superclass




   Subclass     Class




ecore meta model        LL(*) Parser   editor




Interpreter         ...
Runtime
   Superclass




   Subclass     Class




ecore meta model        LL(*) Parser   editor




Interpreter         ...
Xtext meets e4
UI Workbench Model
Application
  Window
   ToolBar
      Parts

     Menu


  Handlers

Keybindings

Commands
Application
  Window
   ToolBar
      Parts

     Menu


  Handlers

Keybindings

Commands
Application
  Window
   ToolBar
      Parts

     Menu


  Handlers

Keybindings

Commands
Application
  Window
   ToolBar
      Parts

     Menu


  Handlers

Keybindings

Commands
Application
  Window
   ToolBar
      Parts

     Menu


  Handlers

Keybindings

Commands
<handlers xmi:id="_SeXUF-8EEd6FC9cDb6iV7g" id="_SeXUF-8EEd6FC9cDb6iV7g"
          URI="platform:/plugin/org.eclipse.e4.dem...
<handlers xmi:id="_SeXUF-8EEd6FC9cDb6iV7g" id="_SeXUF-8EEd6FC9cDb6iV7g"
          URI="platform:/plugin/org.eclipse.e4.dem...
<handlers xmi:id="_SeXUF-8EEd6FC9cDb6iV7g" id="_SeXUF-8EEd6FC9cDb6iV7g"
 handlers
          URI="platform:/plugin/org.ecli...
<handlers xmi:id="_SeXUF-8EEd6FC9cDb6iV7g" id="_SeXUF-8EEd6FC9cDb6iV7g"
 handlers
          URI="platform:/plugin/org.ecli...
<handlers xmi:id="_SeXUF-8EEd6FC9cDb6iV7g" id="_SeXUF-8EEd6FC9cDb6iV7g"
 handlers
          URI="platform:/plugin/org.ecli...
<handlers xmi:id="_SeXUF-8EEd6FC9cDb6iV7g" id="_SeXUF-8EEd6FC9cDb6iV7g"
 handlers
          URI="platform:/plugin/org.ecli...
<handlers xmi:id="_SeXUF-8EEd6FC9cDb6iV7g" id="_SeXUF-8EEd6FC9cDb6iV7g"
 handlers
          URI="platform:/plugin/org.ecli...
<handlers xmi:id="_SeXUF-8EEd6FC9cDb6iV7g" id="_SeXUF-8EEd6FC9cDb6iV7g"
 handlers
          URI="platform:/plugin/org.ecli...
<handlers xmi:id="_SeXUF-8EEd6FC9cDb6iV7g" id="_SeXUF-8EEd6FC9cDb6iV7g"
 handlers
          URI="platform:/plugin/org.ecli...
<handlers xmi:id="_SeXUF-8EEd6FC9cDb6iV7g" id="_SeXUF-8EEd6FC9cDb6iV7g"
 handlers
          URI="platform:/plugin/org.ecli...
handler   org.eclipse.e4.demo.contacts.handlers.ExitHandler
    for   contacts.exit
handler   org.eclipse.e4.demo.contacts...
handler   org.eclipse.e4.demo.contacts.handlers.ExitHandler
    for   contacts.exit
handler   org.eclipse.e4.demo.contacts...
application contacts
handler org.eclipse.e4.demo.contacts.handlers.ExitHandler
handler contacts.exit
    for org.eclipse.e...
Exercise:
   A Grammar for Commands
application contacts

handler   org.eclipse.e4.demo.contacts.handlers.ExitHandler for ...
<mainMenu xmi:id="_SeXUDu8EEd6FC9cDb6iV7g" id="_SeXUDu8EEd6FC9cDb6iV7g">
   <children xsi:type="application:MenuItem"
    ...
Menu {
	 "File" {
	 	 "Save" contacts.save icon="icons/silk/disk.png"
	 	 "Delete" contacts.delete icon="icons/silk/user_d...
Exercise:
     Adding the menu section
application contacts

Menu {
	 "File" {
	 	 "Save" contacts.save icon="icons/silk/d...
Names and Scopes
Cross References
...
<children xsi:type="application:PerspectiveStack"
           xmi:id="_NGiG4DGjEd-zge_czUaGVQ"


     ...
Qualified Names
 application contacts
1 command save "Save"




       Default
QualifiedNameProvider
Qualified Names
 application contacts
1 command save "Save"



             qualifiedName(   1   )

       Default
QualifiedN...
Qualified Names
 application contacts
1 command save "Save"   EAttribute „name“

             qualifiedName(   1   )

      ...
Qualified Names
 application contacts
1 command save "Save"   EAttribute „name“

             qualifiedName(   1   )

      ...
Qualified Names
 application contacts
1 command save "Save"



             qualifiedName(   1   )

       Default          ...
Qualified Names
 application contacts   EAttribute „name“
1 command save "Save"



             qualifiedName(   1   )

    ...
Qualified Names
 application contacts   EAttribute „name“
1 command save "Save"



             qualifiedName(   1   )

    ...
Qualified Names
 application contacts
1 command save "Save"



             qualifiedName(   1   )

       Default          ...
Objects can have multiple
different names depending
      on the context
application contacts 1
2 command save "Save"
                                   Scopes
  command exit "Exit" 3
  bind "CTR...
application contacts 1
2 command save "Save"
                                   Scopes
  command exit "Exit" 3
  bind "CTR...
application contacts 1
2 command save "Save"
                                   Scopes
  command exit "Exit" 3
  bind "CTR...
application contacts 1
2 command save "Save"
                                   Scopes
  command exit "Exit" 3
  bind "CTR...
application contacts 1
2 command save "Save"
                                   Scopes
  command exit "Exit" 3
  bind "CTR...
application contacts 1
2 command save "Save"
                                   Scopes
  command exit "Exit" 3
  bind "CTR...
application contacts 1
2 command save "Save"
                                   Scopes
  command exit "Exit" 3
  bind "CTR...
application contacts 1
2 command save "Save"
                                        Scopes
  command exit "Exit" 3
  bind...
application contacts 1
2 command save "Save"
                                                Scopes
  command exit "Exit" ...
application contacts 1
2 command save "Save"
                                                Scopes
  command exit "Exit" ...
application contacts 1
2 command save "Save"
                                                Scopes
  command exit "Exit" ...
...
GlobalScope
                   name   EObject
      outerScope
...                       all visible
                   FQ...
GlobalScope
                      name   EObject
         outerScope
   ...                       all visible
            ...
GlobalScope
                      name   EObject
         outerScope
   ...                       all visible
            ...
GlobalScope
                       name       EObject
         outerScope
   ...                            all visible
  ...
GlobalScope
                       name       EObject
         outerScope
   ...                            all visible
  ...
GlobalScope
                        name      EObject
         outerScope
   ...                            all visible
  ...
Namespace Imports
           Global
    name           EObject
„java.util.List“     1
„java.util.Set“      2
„java.util.Ma...
Namespace Imports
           Global
    name           EObject
„java.util.List“     1
„java.util.Set“      2
„java.util.Ma...
Namespace Imports
           Global
    name           EObject
„java.util.List“     1
„java.util.Set“      2
„java.util.Ma...
Namespace Imports
           Global                        ImportNamespaceAware
    name           EObject                ...
Exercise: Java Types
application contacts

import org.eclipse.e4.demo.contacts.handlers.*;

command contacts.exit "Exit"
h...
Dependency Injection
Dependency Injection

• Based on Google Guice
Dependency Injection

• Based on Google Guice
• Pervasively used in Xtext
Dependency Injection

• Based on Google Guice
• Pervasively used in Xtext
• Invisible for clients (ex. Annotations)
Dependency Injection

• Based on Google Guice
• Pervasively used in Xtext
• Invisible for clients (ex. Annotations)
• Lang...
Dependency Injection

• Based on Google Guice
• Pervasively used in Xtext
• Invisible for clients (ex. Annotations)
• Lang...
DI: Client Side
@Inject
private ISomeService myService;




         @Inject
         public MyClass(Provider<ISomeOtherSe...
DI: Configuration
@ImplementedBy(MyServiceImpl.class)
public class IServiceInterface {
  ...




       public class MyDecl...
DI: Language Modules
      MyLanguage                                 MyLanguage
     RuntimeModule
 bindIServiceInterface...
DI: Equinox
<plugin>
  <extension point="org.eclipse.ui.editors">
     <editor class=
  "mydsl.MyDslExecutableExtensionFac...
Exercise:Validation
Annotations
@Fix(DomainmodelJavaValidator.INVALID_TYPE_NAME)
public void fixTypeName(final Issue issue,
                  ...
More features !
Outlook

• Improve Xtext support for
 • Ecore generics
• Partial textual models
 • EP org.eclipse.e4.workbench.model
Questions?

   find out more at
 http://www.xtext.org
 http://eclipse.org/e4
Eclipse meets e4
Eclipse meets e4
Eclipse meets e4
Eclipse meets e4
Eclipse meets e4
Eclipse meets e4
Eclipse meets e4
Eclipse meets e4
Eclipse meets e4
Eclipse meets e4
Upcoming SlideShare
Loading in...5
×

Eclipse meets e4

1,538

Published on

Workshop with
Heiko Behrens and Moritz Eysholdt
at EclipseCon 2010, Santa Clara, CA.

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,538
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
151
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide






















  • Die DSL f&amp;#xFC;r DSLs, Eclipse-basiert
    Define textual DSLs easily, Ready-to-use tool-chain, Easy but flexible customizing and tweaking,
    Durable foundation with Java Eclipse EMF, Strong community






















































































































  • Transcript of "Eclipse meets e4"

    1. 1. Setting Up the Development Workbench • Copy both to your local disk: • the right archive for your platform • the folder material • Hand the USB stick to the attendee next to you. • Unzip the archive and start the included Eclipse with a fresh workspace. • NOTE: On Windows systems, make sure you pick a short directory name and everything gets extracted without errors.
    2. 2. meets Developing an editor for the e4 workbench model
    3. 3. Moritz Eysholdt Jan Köhnlein Heiko Behrens
    4. 4. Moritz Eysholdt Jan Köhnlein Heiko Behrens
    5. 5. Moritz Eysholdt Jan Köhnlein Heiko Behrens
    6. 6. • Simplify programming
    7. 7. • Simplify programming • Declarative styling / UI markup
    8. 8. • Simplify programming • Declarative styling / UI markup • Uniform, pervasive platform
    9. 9. • Simplify programming • Declarative styling / UI markup • Uniform, pervasive platform • Diversity of contributors
    10. 10. • Simplify programming • Declarative styling / UI markup • Uniform, pervasive platform • Diversity of contributors • Backward compatibility
    11. 11. Run the Demo • Import the Contacts Demo application as a project • Try to run the Contacts Demo product (fails, but creates a run config) • Run again by means of the run configuration
    12. 12. Workbench Modeling Tools
    13. 13. Workbench Modeling Tools e4 Visual Designer
    14. 14. Workbench Modeling Tools e4 Visual Designer Generic Ecore
    15. 15. G ra m m ar
    16. 16. Reference ar Model m m ra G
    17. 17. Reference ar Model m m ra G Generator
    18. 18. Reference ar Model m m ra G Generator Runtime Superclass Subclass Class ecore meta model LL(*) Parser editor
    19. 19. Runtime Superclass Subclass Class ecore meta model LL(*) Parser editor
    20. 20. Runtime Superclass Subclass Class ecore meta model LL(*) Parser editor Model Model Model
    21. 21. Runtime Superclass Subclass Class ecore meta model LL(*) Parser editor Model Model Model
    22. 22. Runtime Superclass Subclass Class ecore meta model LL(*) Parser editor AST Model Model Model
    23. 23. Runtime Superclass Subclass Class ecore meta model LL(*) Parser editor AST Model Model Model
    24. 24. Runtime Superclass Subclass Class ecore meta model LL(*) Parser editor Interpreter AST Model Model Code Model Generator
    25. 25. Runtime Superclass Subclass Class ecore meta model LL(*) Parser editor Interpreter AST Model Model Code Model Generator
    26. 26. Xtext meets e4
    27. 27. UI Workbench Model
    28. 28. Application Window ToolBar Parts Menu Handlers Keybindings Commands
    29. 29. Application Window ToolBar Parts Menu Handlers Keybindings Commands
    30. 30. Application Window ToolBar Parts Menu Handlers Keybindings Commands
    31. 31. Application Window ToolBar Parts Menu Handlers Keybindings Commands
    32. 32. Application Window ToolBar Parts Menu Handlers Keybindings Commands
    33. 33. <handlers xmi:id="_SeXUF-8EEd6FC9cDb6iV7g" id="_SeXUF-8EEd6FC9cDb6iV7g" URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...ExitHandler" command="contacts.exit"/> <handlers xmi:id="_SeXUGO8EEd6FC9cDb6iV7g" id="_SeXUGO8EEd6FC9cDb6iV7g" URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...SaveHandler" command="contacts.save"/> <handlers xmi:id="_SeXUGe8EEd6FC9cDb6iV7g" id="_SeXUGe8EEd6FC9cDb6iV7g" URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...DeleteContactHandler" command="contacts.delete"/> <handlers xmi:id="_SeXUGu8EEd6FC9cDb6iV7g" id="_SeXUGu8EEd6FC9cDb6iV7g" URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...DarkThemeHandler" command="contacts.darkTheme"/> <handlers xmi:id="_SeXUG-8EEd6FC9cDb6iV7g" id="_SeXUG-8EEd6FC9cDb6iV7g" URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...BrightThemeHandler" command="contacts.brightTheme"/> <bindings xmi:id="_SeXUHO8EEd6FC9cDb6iV7g" keySequence="CTRL+D" id="_SeXUHO8EEd6FC9cDb6iV7g" command="contacts.darkTheme"/> <bindings xmi:id="_SeXUHe8EEd6FC9cDb6iV7g" keySequence="CTRL+L" id="_SeXUHe8EEd6FC9cDb6iV7g" command="contacts.brightTheme"/> <bindings xmi:id="_SeXUHu8EEd6FC9cDb6iV7g" keySequence="CTRL+S" id="_SeXUHu8EEd6FC9cDb6iV7g" command="contacts.save"/> <bindings xmi:id="_SeXUH-8EEd6FC9cDb6iV7g" keySequence="Delete" id="_SeXUH-8EEd6FC9cDb6iV7g" command="contacts.delete"/> <bindings xmi:id="_SeXUIO8EEd6FC9cDb6iV7g" keySequence="CTRL+5 X" id="_SeXUIO8EEd6FC9cDb6iV7g" command="contacts.exit"/> <commands xmi:id="contacts.exit" id="contacts.exit" commandName="Exit" description=""/> <commands xmi:id="contacts.darkTheme" id="contacts.darkTheme" commandName="Dark Theme"/> <commands xmi:id="contacts.brightTheme" id="contacts.brightTheme" commandName="Bright Theme" description=""/> <commands xmi:id="contacts.save" id="contacts.save" commandName="Save" description=""/> <commands xmi:id="contacts.delete" id="contacts.delete" commandName="Delete" description=""/>
    34. 34. <handlers xmi:id="_SeXUF-8EEd6FC9cDb6iV7g" id="_SeXUF-8EEd6FC9cDb6iV7g" URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...ExitHandler" command="contacts.exit"/> <handlers xmi:id="_SeXUGO8EEd6FC9cDb6iV7g" id="_SeXUGO8EEd6FC9cDb6iV7g" URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...SaveHandler" command="contacts.save"/> <handlers xmi:id="_SeXUGe8EEd6FC9cDb6iV7g" id="_SeXUGe8EEd6FC9cDb6iV7g" URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...DeleteContactHandler" command="contacts.delete"/> <handlers xmi:id="_SeXUGu8EEd6FC9cDb6iV7g" id="_SeXUGu8EEd6FC9cDb6iV7g" URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...DarkThemeHandler" command="contacts.darkTheme"/> <handlers xmi:id="_SeXUG-8EEd6FC9cDb6iV7g" id="_SeXUG-8EEd6FC9cDb6iV7g" URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...BrightThemeHandler" command="contacts.brightTheme"/> <bindings xmi:id="_SeXUHO8EEd6FC9cDb6iV7g" keySequence="CTRL+D" id="_SeXUHO8EEd6FC9cDb6iV7g" command="contacts.darkTheme"/> <bindings xmi:id="_SeXUHe8EEd6FC9cDb6iV7g" keySequence="CTRL+L" id="_SeXUHe8EEd6FC9cDb6iV7g" command="contacts.brightTheme"/> <bindings xmi:id="_SeXUHu8EEd6FC9cDb6iV7g" keySequence="CTRL+S" id="_SeXUHu8EEd6FC9cDb6iV7g" command="contacts.save"/> <bindings xmi:id="_SeXUH-8EEd6FC9cDb6iV7g" keySequence="Delete" id="_SeXUH-8EEd6FC9cDb6iV7g" command="contacts.delete"/> <bindings xmi:id="_SeXUIO8EEd6FC9cDb6iV7g" keySequence="CTRL+5 X" id="_SeXUIO8EEd6FC9cDb6iV7g" command="contacts.exit"/> Remove <commands xmi:id="contacts.exit" id="contacts.exit" commandName="Exit" description=""/> XML brackets <commands xmi:id="contacts.darkTheme" id="contacts.darkTheme" commandName="Dark Theme"/> <commands xmi:id="contacts.brightTheme" id="contacts.brightTheme" commandName="Bright Theme" description=""/> <commands xmi:id="contacts.save" id="contacts.save" commandName="Save" description=""/> <commands xmi:id="contacts.delete" id="contacts.delete" commandName="Delete" description=""/>
    35. 35. <handlers xmi:id="_SeXUF-8EEd6FC9cDb6iV7g" id="_SeXUF-8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...ExitHandler" command="contacts.exit" command="contacts.exit"/> <handlers xmi:id="_SeXUGO8EEd6FC9cDb6iV7g" id="_SeXUGO8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...SaveHandler" command="contacts.save" command="contacts.save"/> <handlers xmi:id="_SeXUGe8EEd6FC9cDb6iV7g" id="_SeXUGe8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...DeleteContactHandler" command="contacts.delete" command="contacts.delete"/> <handlers xmi:id="_SeXUGu8EEd6FC9cDb6iV7g" id="_SeXUGu8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...DarkThemeHandler" command="contacts.darkTheme" command="contacts.darkTheme"/> <handlers xmi:id="_SeXUG-8EEd6FC9cDb6iV7g" id="_SeXUG-8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...BrightThemeHandler" command="contacts.brightTheme" command="contacts.brightTheme"/> <bindings xmi:id="_SeXUHO8EEd6FC9cDb6iV7g" keySequence="CTRL+D" bindings id="_SeXUHO8EEd6FC9cDb6iV7g" command="contacts.darkTheme"/> command="contacts.darkTheme" <bindings xmi:id="_SeXUHe8EEd6FC9cDb6iV7g" keySequence="CTRL+L" bindings id="_SeXUHe8EEd6FC9cDb6iV7g" command="contacts.brightTheme"/> command="contacts.brightTheme" <bindings xmi:id="_SeXUHu8EEd6FC9cDb6iV7g" keySequence="CTRL+S" bindings id="_SeXUHu8EEd6FC9cDb6iV7g" command="contacts.save"/> command="contacts.save" <bindings xmi:id="_SeXUH-8EEd6FC9cDb6iV7g" keySequence="Delete" bindings id="_SeXUH-8EEd6FC9cDb6iV7g" command="contacts.delete"/> command="contacts.delete" <bindings xmi:id="_SeXUIO8EEd6FC9cDb6iV7g" keySequence="CTRL+5 X" bindings id="_SeXUIO8EEd6FC9cDb6iV7g" command="contacts.exit"/> command="contacts.exit" <commands xmi:id="contacts.exit" id="contacts.exit" commands commandName="Exit" description=""/> description="" <commands xmi:id="contacts.darkTheme" id="contacts.darkTheme" commands commandName="Dark Theme"/> Theme" <commands xmi:id="contacts.brightTheme" id="contacts.brightTheme" commands commandName="Bright Theme" description=""/> description="" <commands xmi:id="contacts.save" id="contacts.save" commands commandName="Save" description=""/> description="" <commands xmi:id="contacts.delete" id="contacts.delete" commands commandName="Delete" description=""/> description=""
    36. 36. <handlers xmi:id="_SeXUF-8EEd6FC9cDb6iV7g" id="_SeXUF-8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...ExitHandler" command="contacts.exit" command="contacts.exit"/> <handlers xmi:id="_SeXUGO8EEd6FC9cDb6iV7g" id="_SeXUGO8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...SaveHandler" command="contacts.save" command="contacts.save"/> <handlers xmi:id="_SeXUGe8EEd6FC9cDb6iV7g" id="_SeXUGe8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...DeleteContactHandler" command="contacts.delete" command="contacts.delete"/> <handlers xmi:id="_SeXUGu8EEd6FC9cDb6iV7g" id="_SeXUGu8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...DarkThemeHandler" command="contacts.darkTheme" command="contacts.darkTheme"/> <handlers xmi:id="_SeXUG-8EEd6FC9cDb6iV7g" id="_SeXUG-8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...BrightThemeHandler" command="contacts.brightTheme" command="contacts.brightTheme"/> <bindings xmi:id="_SeXUHO8EEd6FC9cDb6iV7g" keySequence="CTRL+D" bindings id="_SeXUHO8EEd6FC9cDb6iV7g" command="contacts.darkTheme"/> command="contacts.darkTheme" <bindings xmi:id="_SeXUHe8EEd6FC9cDb6iV7g" keySequence="CTRL+L" bindings id="_SeXUHe8EEd6FC9cDb6iV7g" command="contacts.brightTheme"/> command="contacts.brightTheme" <bindings xmi:id="_SeXUHu8EEd6FC9cDb6iV7g" keySequence="CTRL+S" bindings id="_SeXUHu8EEd6FC9cDb6iV7g" command="contacts.save"/> command="contacts.save" <bindings xmi:id="_SeXUH-8EEd6FC9cDb6iV7g" keySequence="Delete" bindings Remove id="_SeXUH-8EEd6FC9cDb6iV7g" command="contacts.delete"/> command="contacts.delete" <bindings xmi:id="_SeXUIO8EEd6FC9cDb6iV7g" keySequence="CTRL+5 X" bindings id="_SeXUIO8EEd6FC9cDb6iV7g" command="contacts.exit"/> command="contacts.exit" <commands xmi:id="contacts.exit" id="contacts.exit" commands commandName="Exit" description=""/> description="" UUIDs <commands xmi:id="contacts.darkTheme" id="contacts.darkTheme" commands commandName="Dark Theme"/> Theme" <commands xmi:id="contacts.brightTheme" id="contacts.brightTheme" commands commandName="Bright Theme" description=""/> description="" <commands xmi:id="contacts.save" id="contacts.save" commands commandName="Save" description=""/> description="" <commands xmi:id="contacts.delete" id="contacts.delete" commands commandName="Delete" description=""/> description=""
    37. 37. <handlers xmi:id="_SeXUF-8EEd6FC9cDb6iV7g" id="_SeXUF-8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...ExitHandler" command="contacts.exit" command="contacts.exit"/> <handlers xmi:id="_SeXUGO8EEd6FC9cDb6iV7g" id="_SeXUGO8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...SaveHandler" command="contacts.save" command="contacts.save"/> <handlers xmi:id="_SeXUGe8EEd6FC9cDb6iV7g" id="_SeXUGe8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...DeleteContactHandler" command="contacts.delete" command="contacts.delete"/> <handlers xmi:id="_SeXUGu8EEd6FC9cDb6iV7g" id="_SeXUGu8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...DarkThemeHandler" command="contacts.darkTheme" command="contacts.darkTheme" command="contacts.darkTheme"/> <handlers xmi:id="_SeXUG-8EEd6FC9cDb6iV7g" id="_SeXUG-8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...BrightThemeHandler" command="contacts.brightTheme" command="contacts.brightTheme"/> <bindings xmi:id="_SeXUHO8EEd6FC9cDb6iV7g" keySequence="CTRL+D" bindings id="_SeXUHO8EEd6FC9cDb6iV7g" command="contacts.darkTheme"/> command="contacts.darkTheme" <bindings xmi:id="_SeXUHe8EEd6FC9cDb6iV7g" keySequence="CTRL+L" bindings id="_SeXUHe8EEd6FC9cDb6iV7g" command="contacts.brightTheme"/> command="contacts.brightTheme" <bindings xmi:id="_SeXUHu8EEd6FC9cDb6iV7g" keySequence="CTRL+S" bindings id="_SeXUHu8EEd6FC9cDb6iV7g" command="contacts.save"/> command="contacts.save" <bindings xmi:id="_SeXUH-8EEd6FC9cDb6iV7g" keySequence="Delete" bindings id="_SeXUH-8EEd6FC9cDb6iV7g" command="contacts.delete"/> command="contacts.delete" <bindings xmi:id="_SeXUIO8EEd6FC9cDb6iV7g" keySequence="CTRL+5 X" bindings id="_SeXUIO8EEd6FC9cDb6iV7g" command="contacts.exit"/> command="contacts.exit" <commands xmi:id="contacts.exit" id="contacts.exit" commands commandName="Exit" description=""/> description="" <commands xmi:id="contacts.darkTheme" id="contacts.darkTheme" commands commandName="Dark Theme"/> Theme" <commands xmi:id="contacts.brightTheme" id="contacts.brightTheme" commands commandName="Bright Theme" description=""/> description="" <commands xmi:id="contacts.save" id="contacts.save" commands commandName="Save" description=""/> description="" <commands xmi:id="contacts.delete" id="contacts.delete" commands commandName="Delete" description=""/> description=""
    38. 38. <handlers xmi:id="_SeXUF-8EEd6FC9cDb6iV7g" id="_SeXUF-8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...ExitHandler" command="contacts.exit" command="contacts.exit"/> <handlers xmi:id="_SeXUGO8EEd6FC9cDb6iV7g" id="_SeXUGO8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...SaveHandler" command="contacts.save" command="contacts.save"/> <handlers xmi:id="_SeXUGe8EEd6FC9cDb6iV7g" id="_SeXUGe8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...DeleteContactHandler" command="contacts.delete" command="contacts.delete"/> <handlers xmi:id="_SeXUGu8EEd6FC9cDb6iV7g" id="_SeXUGu8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...DarkThemeHandler" command="contacts.darkTheme" command="contacts.darkTheme" command="contacts.darkTheme"/> <handlers xmi:id="_SeXUG-8EEd6FC9cDb6iV7g" id="_SeXUG-8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...BrightThemeHandler" command="contacts.brightTheme" command="contacts.brightTheme"/> <bindings xmi:id="_SeXUHO8EEd6FC9cDb6iV7g" keySequence="CTRL+D" bindings id="_SeXUHO8EEd6FC9cDb6iV7g" command="contacts.darkTheme"/> command="contacts.darkTheme" <bindings xmi:id="_SeXUHe8EEd6FC9cDb6iV7g" keySequence="CTRL+L" bindings id="_SeXUHe8EEd6FC9cDb6iV7g" command="contacts.brightTheme"/> command="contacts.brightTheme" <bindings xmi:id="_SeXUHu8EEd6FC9cDb6iV7g" keySequence="CTRL+S" bindings id="_SeXUHu8EEd6FC9cDb6iV7g" command="contacts.save"/> command="contacts.save" <bindings xmi:id="_SeXUH-8EEd6FC9cDb6iV7g" keySequence="Delete" bindings Remove id="_SeXUH-8EEd6FC9cDb6iV7g" command="contacts.delete"/> command="contacts.delete" <bindings xmi:id="_SeXUIO8EEd6FC9cDb6iV7g" keySequence="CTRL+5 X" bindings id="_SeXUIO8EEd6FC9cDb6iV7g" command="contacts.exit"/> command="contacts.exit" <commands xmi:id="contacts.exit" id="contacts.exit" commands commandName="Exit" description=""/> description="" reference markup <commands xmi:id="contacts.darkTheme" id="contacts.darkTheme" commands commandName="Dark Theme"/> Theme" <commands xmi:id="contacts.brightTheme" id="contacts.brightTheme" commands commandName="Bright Theme" description=""/> description="" <commands xmi:id="contacts.save" id="contacts.save" commands commandName="Save" description=""/> description="" <commands xmi:id="contacts.delete" id="contacts.delete" commands commandName="Delete" description=""/> description=""
    39. 39. <handlers xmi:id="_SeXUF-8EEd6FC9cDb6iV7g" id="_SeXUF-8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...ExitHandler" command="contacts.exit" command="contacts.exit"/> contacts.exit <handlers xmi:id="_SeXUGO8EEd6FC9cDb6iV7g" id="_SeXUGO8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...SaveHandler" command="contacts.save" command="contacts.save"/> contacts.save <handlers xmi:id="_SeXUGe8EEd6FC9cDb6iV7g" id="_SeXUGe8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...DeleteContactHandler" command="contacts.delete" command="contacts.delete"/> contacts.delete <handlers xmi:id="_SeXUGu8EEd6FC9cDb6iV7g" id="_SeXUGu8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...DarkThemeHandler" command="contacts.darkTheme" command="contacts.darkTheme" command="contacts.darkTheme"/> contacts.darkTheme <handlers xmi:id="_SeXUG-8EEd6FC9cDb6iV7g" id="_SeXUG-8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...BrightThemeHandler" command="contacts.brightTheme" command="contacts.brightTheme"/> contacts.brightTheme <bindings xmi:id="_SeXUHO8EEd6FC9cDb6iV7g" keySequence="CTRL+D" bindings "CTRL+D" id="_SeXUHO8EEd6FC9cDb6iV7g" command="contacts.darkTheme"/> command="contacts.darkTheme" contacts.darkTheme <bindings xmi:id="_SeXUHe8EEd6FC9cDb6iV7g" keySequence="CTRL+L" bindings "CTRL+L" id="_SeXUHe8EEd6FC9cDb6iV7g" command="contacts.brightTheme"/> command="contacts.brightTheme" contacts.brightTheme <bindings xmi:id="_SeXUHu8EEd6FC9cDb6iV7g" keySequence="CTRL+S" bindings "CTRL+S" id="_SeXUHu8EEd6FC9cDb6iV7g" command="contacts.save"/> command="contacts.save" contacts.save <bindings xmi:id="_SeXUH-8EEd6FC9cDb6iV7g" keySequence="Delete" bindings "Delete" id="_SeXUH-8EEd6FC9cDb6iV7g" command="contacts.delete"/> command="contacts.delete" contacts.delete <bindings xmi:id="_SeXUIO8EEd6FC9cDb6iV7g" keySequence="CTRL+5 X" bindings "CTRL+5 id="_SeXUIO8EEd6FC9cDb6iV7g" command="contacts.exit"/> command="contacts.exit" contacts.exit <commands xmi:id="contacts.exit" id="contacts.exit" commands contacts.exit commandName="Exit" description=""/> "Exit" description="" <commands xmi:id="contacts.darkTheme" id="contacts.darkTheme" commands contacts.darkTheme commandName="Dark Theme"/> "Dark Theme" <commands xmi:id="contacts.brightTheme" id="contacts.brightTheme" commands contacts.brightTheme commandName="Bright Theme" description=""/> "Bright description="" <commands xmi:id="contacts.save" id="contacts.save" commands contacts.save commandName="Save" description=""/> "Save" description="" <commands xmi:id="contacts.delete" id="contacts.delete" commands contacts.delete commandName="Delete" description=""/> "Delete" description=""
    40. 40. <handlers xmi:id="_SeXUF-8EEd6FC9cDb6iV7g" id="_SeXUF-8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...ExitHandler" command="contacts.exit" command="contacts.exit"/> contacts.exit <handlers xmi:id="_SeXUGO8EEd6FC9cDb6iV7g" id="_SeXUGO8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...SaveHandler" command="contacts.save" command="contacts.save"/> contacts.save <handlers xmi:id="_SeXUGe8EEd6FC9cDb6iV7g" id="_SeXUGe8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...DeleteContactHandler" command="contacts.delete" command="contacts.delete"/> contacts.delete <handlers xmi:id="_SeXUGu8EEd6FC9cDb6iV7g" id="_SeXUGu8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...DarkThemeHandler" command="contacts.darkTheme" command="contacts.darkTheme" command="contacts.darkTheme"/> contacts.darkTheme <handlers xmi:id="_SeXUG-8EEd6FC9cDb6iV7g" id="_SeXUG-8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...BrightThemeHandler" command="contacts.brightTheme" command="contacts.brightTheme"/> contacts.brightTheme <bindings xmi:id="_SeXUHO8EEd6FC9cDb6iV7g" keySequence="CTRL+D" bindings "CTRL+D" id="_SeXUHO8EEd6FC9cDb6iV7g" command="contacts.darkTheme"/> command="contacts.darkTheme" contacts.darkTheme <bindings xmi:id="_SeXUHe8EEd6FC9cDb6iV7g" keySequence="CTRL+L" bindings "CTRL+L" id="_SeXUHe8EEd6FC9cDb6iV7g" command="contacts.brightTheme"/> command="contacts.brightTheme" contacts.brightTheme <bindings xmi:id="_SeXUHu8EEd6FC9cDb6iV7g" keySequence="CTRL+S" bindings "CTRL+S" id="_SeXUHu8EEd6FC9cDb6iV7g" command="contacts.save"/> command="contacts.save" contacts.save <bindings xmi:id="_SeXUH-8EEd6FC9cDb6iV7g" keySequence="Delete" bindings "Delete" bindings id="_SeXUH-8EEd6FC9cDb6iV7g" command="contacts.delete"/> command="contacts.delete" contacts.delete <bindings xmi:id="_SeXUIO8EEd6FC9cDb6iV7g" keySequence="CTRL+5 X" "CTRL+5 Simplify id="_SeXUIO8EEd6FC9cDb6iV7g" command="contacts.exit"/> command="contacts.exit" contacts.exit <commands xmi:id="contacts.exit" id="contacts.exit" commands contacts.exit commandName="Exit" description=""/> "Exit" description="" Java references <commands xmi:id="contacts.darkTheme" id="contacts.darkTheme" commands contacts.darkTheme commandName="Dark Theme"/> "Dark Theme" <commands xmi:id="contacts.brightTheme" id="contacts.brightTheme" commands contacts.brightTheme commandName="Bright Theme" description=""/> "Bright description="" <commands xmi:id="contacts.save" id="contacts.save" commands contacts.save commandName="Save" description=""/> "Save" description="" <commands xmi:id="contacts.delete" id="contacts.delete" commands contacts.delete commandName="Delete" description=""/> "Delete" description=""
    41. 41. <handlers xmi:id="_SeXUF-8EEd6FC9cDb6iV7g" id="_SeXUF-8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...ExitHandler" org.eclipse...ExitHandler command="contacts.exit" command="contacts.exit"/> contacts.exit <handlers xmi:id="_SeXUGO8EEd6FC9cDb6iV7g" id="_SeXUGO8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...SaveHandler" org.eclipse...SaveHandler command="contacts.save" command="contacts.save"/> contacts.save <handlers xmi:id="_SeXUGe8EEd6FC9cDb6iV7g" id="_SeXUGe8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...DeleteContactHandler" org.eclipse...DeleteContactHandler command="contacts.delete" command="contacts.delete"/> contacts.delete <handlers xmi:id="_SeXUGu8EEd6FC9cDb6iV7g" id="_SeXUGu8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...DarkThemeHandler" org.eclipse...DarkThemeHandler command="contacts.darkTheme" command="contacts.darkTheme" command="contacts.darkTheme"/> contacts.darkTheme <handlers xmi:id="_SeXUG-8EEd6FC9cDb6iV7g" id="_SeXUG-8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...BrightThemeHandler" org.eclipse...BrightThemeHandler command="contacts.brightTheme" command="contacts.brightTheme"/> contacts.brightTheme <bindings xmi:id="_SeXUHO8EEd6FC9cDb6iV7g" keySequence="CTRL+D" bindings "CTRL+D" id="_SeXUHO8EEd6FC9cDb6iV7g" command="contacts.darkTheme"/> command="contacts.darkTheme" contacts.darkTheme <bindings xmi:id="_SeXUHe8EEd6FC9cDb6iV7g" keySequence="CTRL+L" bindings "CTRL+L" id="_SeXUHe8EEd6FC9cDb6iV7g" command="contacts.brightTheme"/> command="contacts.brightTheme" contacts.brightTheme <bindings xmi:id="_SeXUHu8EEd6FC9cDb6iV7g" keySequence="CTRL+S" bindings "CTRL+S" id="_SeXUHu8EEd6FC9cDb6iV7g" command="contacts.save"/> command="contacts.save" contacts.save <bindings xmi:id="_SeXUH-8EEd6FC9cDb6iV7g" keySequence="Delete" bindings "Delete" id="_SeXUH-8EEd6FC9cDb6iV7g" command="contacts.delete"/> command="contacts.delete" contacts.delete <bindings xmi:id="_SeXUIO8EEd6FC9cDb6iV7g" keySequence="CTRL+5 X" bindings "CTRL+5 id="_SeXUIO8EEd6FC9cDb6iV7g" command="contacts.exit"/> command="contacts.exit" contacts.exit <commands xmi:id="contacts.exit" id="contacts.exit" commands contacts.exit commandName="Exit" description=""/> "Exit" description="" <commands xmi:id="contacts.darkTheme" id="contacts.darkTheme" commands contacts.darkTheme commandName="Dark Theme"/> "Dark Theme" <commands xmi:id="contacts.brightTheme" id="contacts.brightTheme" commands contacts.brightTheme commandName="Bright Theme" description=""/> "Bright description="" <commands xmi:id="contacts.save" id="contacts.save" commands contacts.save commandName="Save" description=""/> "Save" description="" <commands xmi:id="contacts.delete" id="contacts.delete" commands contacts.delete commandName="Delete" description=""/> "Delete" description=""
    42. 42. <handlers xmi:id="_SeXUF-8EEd6FC9cDb6iV7g" id="_SeXUF-8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...ExitHandler" org.eclipse...ExitHandler command="contacts.exit" command="contacts.exit"/> contacts.exit <handlers xmi:id="_SeXUGO8EEd6FC9cDb6iV7g" id="_SeXUGO8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...SaveHandler" org.eclipse...SaveHandler command="contacts.save" command="contacts.save"/> contacts.save <handlers xmi:id="_SeXUGe8EEd6FC9cDb6iV7g" id="_SeXUGe8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...DeleteContactHandler" org.eclipse...DeleteContactHandler command="contacts.delete" command="contacts.delete"/> contacts.delete <handlers xmi:id="_SeXUGu8EEd6FC9cDb6iV7g" id="_SeXUGu8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...DarkThemeHandler" org.eclipse...DarkThemeHandler command="contacts.darkTheme" command="contacts.darkTheme" command="contacts.darkTheme"/> contacts.darkTheme <handlers xmi:id="_SeXUG-8EEd6FC9cDb6iV7g" id="_SeXUG-8EEd6FC9cDb6iV7g" handlers URI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse...BrightThemeHandler" org.eclipse...BrightThemeHandler command="contacts.brightTheme" command="contacts.brightTheme"/> contacts.brightTheme <bindings xmi:id="_SeXUHO8EEd6FC9cDb6iV7g" keySequence="CTRL+D" bindings "CTRL+D" id="_SeXUHO8EEd6FC9cDb6iV7g" command="contacts.darkTheme"/> command="contacts.darkTheme" contacts.darkTheme <bindings xmi:id="_SeXUHe8EEd6FC9cDb6iV7g" keySequence="CTRL+L" bindings "CTRL+L" id="_SeXUHe8EEd6FC9cDb6iV7g" command="contacts.brightTheme"/> command="contacts.brightTheme" contacts.brightTheme <bindings xmi:id="_SeXUHu8EEd6FC9cDb6iV7g" keySequence="CTRL+S" bindings "CTRL+S" id="_SeXUHu8EEd6FC9cDb6iV7g" command="contacts.save"/> command="contacts.save" contacts.save <bindings xmi:id="_SeXUH-8EEd6FC9cDb6iV7g" keySequence="Delete" bindings "Delete" bindings id="_SeXUH-8EEd6FC9cDb6iV7g" command="contacts.delete"/> command="contacts.delete" contacts.delete <bindings xmi:id="_SeXUIO8EEd6FC9cDb6iV7g" keySequence="CTRL+5 X" "CTRL+5 Make it id="_SeXUIO8EEd6FC9cDb6iV7g" command="contacts.exit"/> command="contacts.exit" contacts.exit <commands xmi:id="contacts.exit" id="contacts.exit" commands contacts.exit commandName="Exit" description=""/> "Exit" description="" a language <commands xmi:id="contacts.darkTheme" id="contacts.darkTheme" commands contacts.darkTheme commandName="Dark Theme"/> "Dark Theme" <commands xmi:id="contacts.brightTheme" id="contacts.brightTheme" commands contacts.brightTheme commandName="Bright Theme" description=""/> "Bright description="" <commands xmi:id="contacts.save" id="contacts.save" commands contacts.save commandName="Save" description=""/> "Save" description="" <commands xmi:id="contacts.delete" id="contacts.delete" commands contacts.delete commandName="Delete" description=""/> "Delete" description=""
    43. 43. handler org.eclipse.e4.demo.contacts.handlers.ExitHandler for contacts.exit handler org.eclipse.e4.demo.contacts.handlers.SaveHandler for contacts.save handler org.eclipse.e4.demo.contacts.handlers.DarkThemeHandler for contacts.darkTheme handler org.eclipse.e4.demo.contacts.handlers.BrightThemeHandler for contacts.brightTheme handler org.eclipse.e4.demo.contacts.handlers.DeleteContactHandler for contacts.delete bind "CTRL+D" to contacts.darkTheme bind "CTRL+L" to contacts.brightTheme bind "CTRL+S" to contacts.save bind "CTRL+5 X" to contacts.exit bind "Delete" to contacts.delete command contacts.exit "Exit" command contacts.darkTheme "Dark Theme" command contacts.brightTheme "Bright Theme" command contacts.save "Save" command contacts.delete "Delete"
    44. 44. handler org.eclipse.e4.demo.contacts.handlers.ExitHandler for contacts.exit handler org.eclipse.e4.demo.contacts.handlers.SaveHandler for contacts.save handler org.eclipse.e4.demo.contacts.handlers.DarkThemeHandler for contacts.darkTheme handler org.eclipse.e4.demo.contacts.handlers.BrightThemeHandler for contacts.brightTheme handler org.eclipse.e4.demo.contacts.handlers.DeleteContactHandler for contacts.delete bind "CTRL+D" to contacts.darkTheme bind "CTRL+L" to contacts.brightTheme bind "CTRL+S" to contacts.save bind "CTRL+5 X" to contacts.exit bind "Delete" to contacts.delete Add command contacts.exit "Exit" namespace command contacts.darkTheme "Dark Theme" command contacts.brightTheme "Bright Theme" command contacts.save "Save" command contacts.delete "Delete"
    45. 45. application contacts handler org.eclipse.e4.demo.contacts.handlers.ExitHandler handler contacts.exit for org.eclipse.e4.demo.contacts.handlers.ExitHandler handler org.eclipse.e4.demo.contacts.handlers.SaveHandler for exit handler contacts.save for org.eclipse.e4.demo.contacts.handlers.SaveHandler handler org.eclipse.e4.demo.contacts.handlers.DarkThemeHandler for save handler contacts.darkTheme for org.eclipse.e4.demo.contacts.handlers.DarkThemeHandler handler org.eclipse.e4.demo.contacts.handlers.BrightThemeHandler for darkTheme handler contacts.brightTheme for org.eclipse.e4.demo.contacts.handlers.BrightThemeHandler handler org.eclipse.e4.demo.contacts.handlers.DeleteContactHandler for brightTheme handler contacts.delete for org.eclipse.e4.demo.contacts.handlers.DeleteContactHandler for delete bind "CTRL+D" to contacts.darkTheme bind "CTRL+L" to contacts.brightTheme "CTRL+D" darkTheme bind "CTRL+S" to contacts.save "CTRL+L" brightTheme bind "CTRL+5 X" to contacts.ex "CTRL+S" to save bind "CTRL+5 X" to exit bind "Delete" to it delete command contacts.exit "Exit" exit command contacts.darkTheme "Dark Theme" darkTheme command contacts.brightTheme "Bright Theme" brightTheme command contacts.save "Save" save command contacts.delete "Delete" delete
    46. 46. Exercise: A Grammar for Commands application contacts handler org.eclipse.e4.demo.contacts.handlers.ExitHandler for exit handler org.eclipse.e4.demo.contacts.handlers.SaveHandler for save handler org.eclipse.e4.demo.contacts.handlers.DarkThemeHandler for darkTheme handler org.eclipse.e4.demo.contacts.handlers.BrightThemeHandler for brightTheme handler org.eclipse.e4.demo.contacts.handlers.DeleteContactHandler for delete bind "CTRL+D" to darkTheme bind "CTRL+L" to brightTheme bind "CTRL+S" to save bind "CTRL+5 X" to exit bind "Delete" to delete command exit "Exit" command darkTheme "Dark Theme" command brightTheme "Bright Theme" command save "Save" command delete "Delete"
    47. 47. <mainMenu xmi:id="_SeXUDu8EEd6FC9cDb6iV7g" id="_SeXUDu8EEd6FC9cDb6iV7g"> <children xsi:type="application:MenuItem" xmi:id="_SeXUD-8EEd6FC9cDb6iV7g" id="_SeXUD-8EEd6FC9cDb6iV7g" label="File"> <children xsi:type="application:HandledMenuItem" xmi:id="_SeXUEO8EEd6FC9cDb6iV7g" id="_SeXUEO8EEd6FC9cDb6iV7g" label="Save" iconURI="platform:/plugin/org.eclipse.e4.demo.contacts/icons/silk/disk.png" command="contacts.save"/> <children xsi:type="application:HandledMenuItem" xmi:id="_SeXUEe8EEd6FC9cDb6iV7g" id="_SeXUEe8EEd6FC9cDb6iV7g" label="Delete" iconURI="platform:/plugin/org.eclipse.e4.demo.contacts/icons/silk/user_delete.png" command="contacts.delete"/> <children xsi:type="application:DirectMenuItem" xmi:id="_SeXUEu8EEd6FC9cDb6iV7g" id="_SeXUEu8EEd6FC9cDb6iV7g" URI="platform:/plugin/org.eclipse.e4.demo.contactsorg.eclipse.e4.demo.contacts.h... label="Direct Exit"/> <children xsi:type="application:HandledMenuItem" xmi:id="_SeXUE-8EEd6FC9cDb6iV7g" id="_SeXUE-8EEd6FC9cDb6iV7g" label="Exit" command="contacts.exit"/> </children> <children xsi:type="application:MenuItem" xmi:id="_SeXUFO8EEd6FC9cDb6iV7g" id="_SeXUFO8EEd6FC9cDb6iV7g" label="Theme"> <children xsi:type="application:HandledMenuItem" xmi:id="_SeXUFe8EEd6FC9cDb6iV7g" id="_SeXUFe8EEd6FC9cDb6iV7g" label="Dark Theme" command="contacts.darkTheme"/> <children xsi:type="application:HandledMenuItem" xmi:id="_SeXUFu8EEd6FC9cDb6iV7g" id="_SeXUFu8EEd6FC9cDb6iV7g" label="Bright Theme" command="contacts.brightTheme"/> </children> </mainMenu>
    48. 48. Menu { "File" { "Save" contacts.save icon="icons/silk/disk.png" "Delete" contacts.delete icon="icons/silk/user_delete.png" "Direct Exit" handler=org.eclipse.e4.demo.contacts.handlers.ExitHandler "Exit" contacts.exit } "Theme" { "Dark Theme" contacts.darkTheme "Bright Theme" contacts.brightTheme } }
    49. 49. Exercise: Adding the menu section application contacts Menu { "File" { "Save" contacts.save icon="icons/silk/disk.png" "Delete" contacts.delete icon="icons/ silk/user_delete.png" "Direct Exit" handler=org.eclipse.e4.demo.contacts.handlers.ExitHandler "Exit" contacts.exit } "Theme" { "Dark Theme" contacts.darkTheme "Bright Theme" contacts.brightTheme } } command exit "Exit" ...
    50. 50. Names and Scopes
    51. 51. Cross References ... <children xsi:type="application:PerspectiveStack" xmi:id="_NGiG4DGjEd-zge_czUaGVQ" UUIDs id="_NGiG4DGjEd-zge_czUaGVQ" selectedElement="_NGjVADGjEd-zge_czUaGVQ"> <children xsi:type="application:Perspective" xmi:id="_NGjVADGjEd-zge_czUaGVQ" id="_NGjVADGjEd-zge_czUaGVQ"> ... PerspectiveStack :myDslPerspectiveStack selectedElement=myDslPerspective { Names ... Perspective :myDslPerspective ...
    52. 52. Qualified Names application contacts 1 command save "Save" Default QualifiedNameProvider
    53. 53. Qualified Names application contacts 1 command save "Save" qualifiedName( 1 ) Default QualifiedNameProvider
    54. 54. Qualified Names application contacts 1 command save "Save" EAttribute „name“ qualifiedName( 1 ) Default QualifiedNameProvider
    55. 55. Qualified Names application contacts 1 command save "Save" EAttribute „name“ qualifiedName( 1 ) Default QualifiedNameProvider
    56. 56. Qualified Names application contacts 1 command save "Save" qualifiedName( 1 ) Default save QualifiedNameProvider
    57. 57. Qualified Names application contacts EAttribute „name“ 1 command save "Save" qualifiedName( 1 ) Default save QualifiedNameProvider
    58. 58. Qualified Names application contacts EAttribute „name“ 1 command save "Save" qualifiedName( 1 ) Default save QualifiedNameProvider
    59. 59. Qualified Names application contacts 1 command save "Save" qualifiedName( 1 ) Default contacts. save QualifiedNameProvider
    60. 60. Objects can have multiple different names depending on the context
    61. 61. application contacts 1 2 command save "Save" Scopes command exit "Exit" 3 bind "CTRL+S" to save bind "CTRL+X" to contacts.exit
    62. 62. application contacts 1 2 command save "Save" Scopes command exit "Exit" 3 bind "CTRL+S" to save bind "CTRL+X" to contacts.exit
    63. 63. application contacts 1 2 command save "Save" Scopes command exit "Exit" 3 bind "CTRL+S" to save bind "CTRL+X" to contacts.exit Application Scope name EObject „contacts“ 1 „save“ 2 „exit“ 3
    64. 64. application contacts 1 2 command save "Save" Scopes command exit "Exit" 3 bind "CTRL+S" to save bind "CTRL+X" to contacts.exit Application Scope name EObject „contacts“ 1 „save“ 2 „exit“ 3
    65. 65. application contacts 1 2 command save "Save" Scopes command exit "Exit" 3 bind "CTRL+S" to save bind "CTRL+X" to contacts.exit Application Scope name EObject „contacts“ 1 „save“ 2 „exit“ 3
    66. 66. application contacts 1 2 command save "Save" Scopes command exit "Exit" 3 bind "CTRL+S" to save bind "CTRL+X" to contacts.exit Application Scope name EObject „contacts“ 1 „save“ 2 „exit“ 3
    67. 67. application contacts 1 2 command save "Save" Scopes command exit "Exit" 3 bind "CTRL+S" to save bind "CTRL+X" to contacts.exit Application Scope name EObject „contacts“ 1 „save“ 2 „exit“ 3
    68. 68. application contacts 1 2 command save "Save" Scopes command exit "Exit" 3 bind "CTRL+S" to save bind "CTRL+X" to contacts.exit Application Scope name EObject „contacts“ 1 outerScope „save“ 2 „exit“ 3
    69. 69. application contacts 1 2 command save "Save" Scopes command exit "Exit" 3 bind "CTRL+S" to save bind "CTRL+X" to contacts.exit Application Scope File Scope name EObject name EObject „contacts“ 1 outerScope „contacts“ 1 „save“ 2 „contacts.save“ 2 „exit“ 3 „contacts.exit“ 3
    70. 70. application contacts 1 2 command save "Save" Scopes command exit "Exit" 3 bind "CTRL+S" to save bind "CTRL+X" to contacts.exit Application Scope File Scope name EObject name EObject „contacts“ 1 outerScope „contacts“ 1 „save“ 2 „contacts.save“ 2 „exit“ 3 „contacts.exit“ 3
    71. 71. application contacts 1 2 command save "Save" Scopes command exit "Exit" 3 bind "CTRL+S" to save bind "CTRL+X" to contacts.exit Application Scope File Scope name EObject name EObject „contacts“ 1 outerScope „contacts“ 1 „save“ 2 „contacts.save“ 2 „exit“ 3 „contacts.exit“ 3
    72. 72. ...
    73. 73. GlobalScope name EObject outerScope ... all visible FQNs elements
    74. 74. GlobalScope name EObject outerScope ... all visible FQNs elements DefaultGlobalScopeProvider
    75. 75. GlobalScope name EObject outerScope ... all visible FQNs elements DefaultGlobalScopeProvider • all in workspace
    76. 76. GlobalScope name EObject outerScope ... all visible FQNs elements DefaultGlobalScopeProvider • all in workspace • backed by an Eclipse builder
    77. 77. GlobalScope name EObject outerScope ... all visible FQNs elements DefaultGlobalScopeProvider • all in workspace • backed by an Eclipse builder ResourceSetGlobalScopeProvider
    78. 78. GlobalScope name EObject outerScope ... all visible FQNs elements DefaultGlobalScopeProvider • all in workspace • backed by an Eclipse builder ResourceSetGlobalScopeProvider • all in ResourceSet
    79. 79. Namespace Imports Global name EObject „java.util.List“ 1 „java.util.Set“ 2 „java.util.Map“ 3
    80. 80. Namespace Imports Global name EObject „java.util.List“ 1 „java.util.Set“ 2 „java.util.Map“ 3 Import: Grammar 'import' importedNamespace=ImportFQN;
    81. 81. Namespace Imports Global name EObject „java.util.List“ 1 „java.util.Set“ 2 „java.util.Map“ 3 Import: Grammar 'import' importedNamespace=ImportFQN; Model import java.util.*
    82. 82. Namespace Imports Global ImportNamespaceAware name EObject name EObject „java.util.List“ 1 „List“ 1 outerScope „java.util.Set“ 2 „Set“ 2 „java.util.Map“ 3 „Map“ 3 Import: Grammar 'import' importedNamespace=ImportFQN; Model import java.util.*
    83. 83. Exercise: Java Types application contacts import org.eclipse.e4.demo.contacts.handlers.*; command contacts.exit "Exit" handler ExitHandler for contacts.exit bind "CTRL+5 X" to contacts.exit command contacts.darkTheme "Dark Theme" handledBy DarkThemeHandler key "CTRL+D" command contacts.brightTheme "Bright Theme" handledBy BrightThemeHandler key "CTRL+L" command contacts.save "Save" handledBy SaveHandler key "CTRL+S" command contacts.delete "Delete" handledBy DeleteContactHandler key "Delete"
    84. 84. Dependency Injection
    85. 85. Dependency Injection • Based on Google Guice
    86. 86. Dependency Injection • Based on Google Guice • Pervasively used in Xtext
    87. 87. Dependency Injection • Based on Google Guice • Pervasively used in Xtext • Invisible for clients (ex. Annotations)
    88. 88. Dependency Injection • Based on Google Guice • Pervasively used in Xtext • Invisible for clients (ex. Annotations) • Language specific and global injectors
    89. 89. Dependency Injection • Based on Google Guice • Pervasively used in Xtext • Invisible for clients (ex. Annotations) • Language specific and global injectors • Makes overriding defaults easy
    90. 90. DI: Client Side @Inject private ISomeService myService; @Inject public MyClass(Provider<ISomeOtherService> provider) { ISomeOtherService firstInstance = provider.get(); ISomeOtherService secondInstance = provider.get(); } @Inject@ContentProposalLabelProvider private ILabelProvider labelProvider;
    91. 91. DI: Configuration @ImplementedBy(MyServiceImpl.class) public class IServiceInterface { ... public class MyDeclarativeModule extends AbstractModule { public Class<? extends IQualifiedNameProvider> bindIQualifiedNameProvider() { return MyQualifiedNameProvider.class; } ... @Singleton public class MySingletonService extends AbstractSomeService { ...
    92. 92. DI: Language Modules MyLanguage MyLanguage RuntimeModule bindIServiceInterface() Manual UiModule bindIServiceInterface() ... ... MyLanguageAbstract MyLanguageAbstract RuntimeModule bindIServiceInterface() Generated UiModule bindIServiceInterface() ... ... Default Default RuntimeModule bindIServiceInterface() Defaults UiModule bindIServiceInterface() ... ... AbstractModule
    93. 93. DI: Equinox <plugin> <extension point="org.eclipse.ui.editors"> <editor class= "mydsl.MyDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor" contributorClass= "org.eclipse.ui.editors.text.TextEditorActionContributor" default="true" extensions="mydsl" id="mydsl.MyDsl" name="MyDsl Editor"> </editor> </extension> ...
    94. 94. Exercise:Validation
    95. 95. Annotations @Fix(DomainmodelJavaValidator.INVALID_TYPE_NAME) public void fixTypeName(final Issue issue, IssueResolutionAcceptor acceptor) { acceptor.accept(issue, "Capitalize name", ... Naming Conventions public class MyScopeProvider extends AbstractDeclarativeScopeProvider { public IScope scope_Handler_command( final Handler h, EReference rRef) { Polymorphic ... Dispatch public class MyLabelProvider Declarative extends DefaultLabelProvider { public String image(Command c) { return “cmd.png“; } public String image(Handler c) { ... APIs
    96. 96. More features !
    97. 97. Outlook • Improve Xtext support for • Ecore generics • Partial textual models • EP org.eclipse.e4.workbench.model
    98. 98. Questions? find out more at http://www.xtext.org http://eclipse.org/e4
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×