SlideShare ist ein Scribd-Unternehmen logo
1 von 64
Downloaden Sie, um offline zu lesen
A FRESH LOOK
                                AT
                        GRAPHICAL EDITING
                             Dr. Jan Köhnlein




Mittwoch, 28. März 12
一
                        畫
                        勝
                        千
Mittwoch, 28. März 12
                        言
一
                        畫     A PICTURE
                                 SAYS
                        勝    MORE THAN
                            A THOUSAND
                        千      WORDS


Mittwoch, 28. März 12
                        言
一
                        畫     A PICTURE
                                 SAYS
                        勝    MORE THAN
                            A THOUSAND
                        千      WORDS
                                     My
                                       th


Mittwoch, 28. März 12
                        言
Mittwoch, 28. März 12
abstract class EStructuralFeature extends ETypedElement {
                        	    boolean changeable = "true"
                        	    boolean ^volatile
                        	    boolean ^transient
                        	    String defaultValueLiteral
                        	    EJavaObject defaultValue
                        	    boolean ^unsettable
                        	    boolean ^derived
                        	    op int getFeatureID()
                        	    op EJavaClass getContainerClass()
                        	    container EClass eContainingClass opposite eStructuralFeatures
                        }

                        class EReference extends EStructuralFeature {
                        	    boolean containment
                        	    boolean ^container
                        	    boolean resolveProxies = "true"
                        	    refers EReference eOpposite opposite eOpposite
                        }

                        class EParameter extends ETypedElement {
                        	    container EOperation eOperation opposite eParameters
                        }

                        class EAttribute extends EStructuralFeature {
                        	    boolean iD
                        	    refers EDataType eAttributeType
                        }

                        class EEnumLiteral extends ENamedElement {
                        	    int value
                        	    EEnumerator instance
                        	    container EEnum eEnum opposite eLiterals
                        }

                        class EEnum extends EDataType {
                        	    op EEnumLiteral getEEnumLiteral(String name)
                        	    op EEnumLiteral getEEnumLiteral(int value)
                        	    contains EEnumLiteral[] eLiterals opposite eEnum
                        }

                        class EObject {}
                        type EJavaClass wraps Class
                        type EJavaObject wraps Object
                        type EEnumerator wraps java.util.Enumeration



Mittwoch, 28. März 12
abstract class EStructuralFeature extends ETypedElement {
                         	    boolean changeable = "true"
                         	    boolean ^volatile
                         	    boolean ^transient
                         	    String defaultValueLiteral
                         	    EJavaObject defaultValue
                         	    boolean ^unsettable
                         	    boolean ^derived
                         	    op int getFeatureID()
                         	    op EJavaClass getContainerClass()
                         	    container EClass eContainingClass opposite eStructuralFeatures
                         }

                         class EReference extends EStructuralFeature {
                         	    boolean containment
                         	    boolean ^container
                         	    boolean resolveProxies = "true"
                         	    refers EReference eOpposite opposite eOpposite
                         }

                         class EParameter extends ETypedElement {




                        368 Words
                         	    container EOperation eOperation opposite eParameters
                         }

                         class EAttribute extends EStructuralFeature {
                         	    boolean iD
                         	    refers EDataType eAttributeType
                         }

                         class EEnumLiteral extends ENamedElement {
                         	    int value
                         	    EEnumerator instance
                         	    container EEnum eEnum opposite eLiterals
                         }

                         class EEnum extends EDataType {
                         	    op EEnumLiteral getEEnumLiteral(String name)
                         	    op EEnumLiteral getEEnumLiteral(int value)
                         	    contains EEnumLiteral[] eLiterals opposite eEnum
                         }

                         class EObject {}
                         type EJavaClass wraps Class
                         type EJavaObject wraps Object
                         type EEnumerator wraps java.util.Enumeration



Mittwoch, 28. März 12
Mittwoch, 28. März 12
ENTIRE ECORE ~500 WORDS




Mittwoch, 28. März 12
Mittwoch, 28. März 12
DIAGRAMS
                        ARE TALKING TO
                             YOU
                         NOT TO YOUR
                          COMPUTER


Mittwoch, 28. März 12
REQUIREMENTS
                        Model          Diagram
                        (Computer)     (User)




Mittwoch, 28. März 12
REQUIREMENTS
                               Model          Diagram
                               (Computer)     (User)

                        Completeness
                        Conciseness
                        Consistency
                        Containment




Mittwoch, 28. März 12
REQUIREMENTS
                               Model                        Diagram
                               (Computer)                   (User)

                        Completeness        Explain Model to Humans
                        Conciseness         Projection, arbitrary focus
                        Consistency         Verbosity and sloppiness
                        Containment         Slick visual design
                                            Usability of a drawing tool


Mittwoch, 28. März 12
MODEL EDITING SOLUTION

                                   1-to-1
                                  Mapping




                 Semantic model             Diagram


Mittwoch, 28. März 12
MODEL EDITING SOLUTION

                                   1-to-1
                                  Mapping




                 Semantic model             Diagram


Mittwoch, 28. März 12
MISMATCH IS THE RULE
                                                          Diagram
                                   children
                        TreeNode
                                   *
                                              nodes   *             *   edges

                                                  Node              Edge




Mittwoch, 28. März 12
MISMATCH IS THE RULE
                                                          Diagram
                                   children
                        TreeNode
                                   *
                                              nodes   *             *   edges

                                                  Node              Edge




Mittwoch, 28. März 12
MISMATCH IS THE RULE
                                                           Diagram
                                    children
                         TreeNode
                                    *
                                               nodes   *             *   edges

                                                   Node              Edge




                        TreeNode A
                        > TreeNode B



Mittwoch, 28. März 12
MISMATCH IS THE RULE
                                                           Diagram
                                    children
                         TreeNode
                                    *
                                               nodes   *             *   edges

                                                   Node              Edge




                        TreeNode A
                        > TreeNode B



Mittwoch, 28. März 12
MISMATCH IS THE RULE
                                                           Diagram
                                    children
                         TreeNode
                                    *
                                               nodes   *             *   edges

                                                   Node              Edge




                                                             Diagram
                        TreeNode A
                                                             > Node A
                        > TreeNode B
                                                             > Node B
                                                             > Edge (A,B)


Mittwoch, 28. März 12
DIAGRAM ASSIMILATION




Mittwoch, 28. März 12
USER SURPRISE




Mittwoch, 28. März 12
USER SURPRISE

                        Delete

                        Cut / Copy / Paste

                        Drag & Drop




Mittwoch, 28. März 12
GHOST ELEMENTS




Mittwoch, 28. März 12
GHOST ELEMENTS

                        Remnants of failed
                        Cut/Copy/Paste/Delete
                        or Drag & Drop actions

                        Breaking model integrity

                        Not shown in any diagram




Mittwoch, 28. März 12
NON-GRAPHICAL EDITING




Mittwoch, 28. März 12
NON-GRAPHICAL EDITING




Mittwoch, 28. März 12
NON-GRAPHICAL EDITING




Mittwoch, 28. März 12
INSUFFICIENT DESIGN




Mittwoch, 28. März 12
INSUFFICIENT DESIGN




Mittwoch, 28. März 12
YOUR EDITOR
                            DEGRADES
                        WHEN YOU FOCUS ON
                          MODEL EDITING


Mittwoch, 28. März 12
WHAT IS YOUR FOCUS
                          Model                         Diagram
                          Editing                       Editing

            Enforce 1-to-1-mapping      Dynamic one-way mapping
            • Assimilate diagram        Full graphical flexibility
            • Loss of expressiveness    Style for understandability
            • Loss of usability         Choose projection easily
            • Add non-graphical tools   • Find another way to edit

Mittwoch, 28. März 12
MODEL VIEW SOLUTION

                                  One-way
                                  Mapping




                 Semantic model             Diagram


Mittwoch, 28. März 12
MODEL VIEW SOLUTION

                                  One-way
                                  Mapping




                 Semantic model             Diagram


Mittwoch, 28. März 12
MODEL
                        EDITING


Mittwoch, 28. März 12
DIAGRAM
                        EDITING


Mittwoch, 28. März 12
RUNTIME
                        •   Reads mapping and stylesheet

                        •   Capture snapshots of any live model

                        •   Render GEF diagram with shape library

                        •   Selection / navigation adapter for

                            •   EMF, Xtext, JDT




Mittwoch, 28. März 12
MAPPING DSL
                        •   Xtext-based with Xbase expressions

                        •   Uni-directional transformation

                        •   Interpreted




Mittwoch, 28. März 12
STYLING DSL
                        •   Xtext-based with Xbase expressions

                        •   Directly modifies Draw2d figures

                        •   Interpreted




Mittwoch, 28. März 12
MyClass



                        SuperClass



Mittwoch, 28. März 12
MyClass     this


                        SuperClass



Mittwoch, 28. März 12
diagram EClassHierarchy type EClass {




                         MyClass       this


                        SuperClass



Mittwoch, 28. März 12
diagram EClassHierarchy type EClass {




                         MyClass       this


                        SuperClass



Mittwoch, 28. März 12
diagram EClassHierarchy type EClass {
                        	 node EClassNode for this {




                         MyClass       this


                        SuperClass



Mittwoch, 28. März 12
diagram EClassHierarchy type EClass {
                        	 node EClassNode for this {




                         MyClass       this


                        SuperClass



Mittwoch, 28. März 12
diagram EClassHierarchy type EClass {
                        	 node EClassNode for this {
                        	 	 label Name for this




                         MyClass       this


                        SuperClass



Mittwoch, 28. März 12
diagram EClassHierarchy type EClass {
                        	 node EClassNode for this {
                        	 	 label Name for this




                         MyClass       this                     MyClass




                        SuperClass



Mittwoch, 28. März 12
diagram EClassHierarchy type EClass {
                        	 node EClassNode for this {
                        	 	 label Name for this
                        	 	 edge SuperType for each this.getESuperTypes() {




                         MyClass       this                    MyClass




                        SuperClass



Mittwoch, 28. März 12
diagram EClassHierarchy type EClass {
                        	 node EClassNode for this {
                        	 	 label Name for this
                        	 	 edge SuperType for each this.getESuperTypes() {




                         MyClass                               MyClass




                        SuperClass      this


Mittwoch, 28. März 12
diagram EClassHierarchy type EClass {
                        	 node EClassNode for this {
                        	 	 label Name for this
                        	 	 edge SuperType for each this.getESuperTypes() {
                        	 	 	 => call EClassNode for this




                         MyClass                               MyClass




                        SuperClass      this


Mittwoch, 28. März 12
diagram EClassHierarchy type EClass {
                        	 node EClassNode for this {
                        	 	 label Name for this
                        	 	 edge SuperType for each this.getESuperTypes() {
                        	 	 	 => call EClassNode for this




                         MyClass                               MyClass




                        SuperClass      this


Mittwoch, 28. März 12
diagram EClassHierarchy type EClass {
                        	 node EClassNode for this {
                        	 	 label Name for this
                        	 	 edge SuperType for each this.getESuperTypes() {
                        	 	 	 => call EClassNode for this




                         MyClass                               MyClass




                        SuperClass      this                 SuperClass




Mittwoch, 28. März 12
diagram EClassHierarchy type EClass {
                        	 node EClassNode for this {
                        	 	 label Name for this
                        	 	 edge SuperType for each this.getESuperTypes() {
                        	 	 	 => call EClassNode for this




                         MyClass       this                    MyClass




                        SuperClass                           SuperClass




Mittwoch, 28. März 12
diagram EClassHierarchy type EClass {
                        	 node EClassNode for this {
                        	 	 label Name for this
                        	 	 edge SuperType for each this.getESuperTypes() {
                        	 	 	 => call EClassNode for this




                         MyClass       this                    MyClass




                        SuperClass                           SuperClass




Mittwoch, 28. März 12
diagram EClassHierarchy type EClass {
                        	 node EClassNode for this {
                        	 	 label Name for this
                        	 	 edge SuperType for each this.getESuperTypes() {
                        	 	 	 => call EClassNode for this
                        	 	 }
                        	 }
                        }




                         MyClass       this                    MyClass




                        SuperClass                           SuperClass




Mittwoch, 28. März 12
stylesheet EClassHierarchy
            for EClassHierarchy

          style EClassNode.SuperType {
          	 var arrow = new PolygonDecoration()
          	 arrow.setScale(10,10)
          	 arrow.backgroundColor = color(#ffffff)
          	 arrow.lineWidth = 2
          	 this.targetDecoration = arrow
          }

          style EClassNode.Name {
          	 font = font("Helvetica", 13,
               if (element.abstract) 3 else 1)
          }




Mittwoch, 28. März 12
stylesheet EClassHierarchy
            for EClassHierarchy
                                                     refs to mappings
          style EClassNode.SuperType {
          	 var arrow = new PolygonDecoration()
          	 arrow.setScale(10,10)
          	 arrow.backgroundColor = color(#ffffff)
          	 arrow.lineWidth = 2
          	 this.targetDecoration = arrow
          }

          style EClassNode.Name {
          	 font = font("Helvetica", 13,
               if (element.abstract) 3 else 1)
          }




Mittwoch, 28. März 12
stylesheet EClassHierarchy
            for EClassHierarchy

          style EClassNode.SuperType {
          	 var arrow = new PolygonDecoration()      Xbase body
          	 arrow.setScale(10,10)
          	 arrow.backgroundColor = color(#ffffff)
          	 arrow.lineWidth = 2
          	 this.targetDecoration = arrow
          }

          style EClassNode.Name {
          	 font = font("Helvetica", 13,
               if (element.abstract) 3 else 1)
          }




Mittwoch, 28. März 12
stylesheet EClassHierarchy
            for EClassHierarchy

          style EClassNode.SuperType {
          	 var arrow = new PolygonDecoration()
          	 arrow.setScale(10,10)
          	 arrow.backgroundColor = color(#ffffff)
          	 arrow.lineWidth = 2
                                                     this variable
          	 this.targetDecoration = arrow
          }

          style EClassNode.Name {
          	 font = font("Helvetica", 13,
               if (element.abstract) 3 else 1)
          }




Mittwoch, 28. März 12
stylesheet EClassHierarchy
            for EClassHierarchy

          style EClassNode.SuperType {
          	 var arrow = new PolygonDecoration()
          	 arrow.setScale(10,10)
          	 arrow.backgroundColor = color(#ffffff)
          	 arrow.lineWidth = 2
          	 this.targetDecoration = arrow
          }
                                                     color literals
          style EClassNode.Name {
          	 font = font("Helvetica", 13,
               if (element.abstract) 3 else 1)
          }




Mittwoch, 28. März 12
stylesheet EClassHierarchy
            for EClassHierarchy

          style EClassNode.SuperType {
          	 var arrow = new PolygonDecoration()
          	 arrow.setScale(10,10)
          	 arrow.backgroundColor = color(#ffffff)
          	 arrow.lineWidth = 2
          	 this.targetDecoration = arrow
          }

          style EClassNode.Name {                    extensions
          	 font = font("Helvetica", 13,
               if (element.abstract) 3 else 1)
          }




Mittwoch, 28. März 12
stylesheet EClassHierarchy
            for EClassHierarchy

          style EClassNode.SuperType {
          	 var arrow = new PolygonDecoration()
          	 arrow.setScale(10,10)
          	 arrow.backgroundColor = color(#ffffff)
          	 arrow.lineWidth = 2
          	 this.targetDecoration = arrow
          }

          style EClassNode.Name {
          	 font = font("Helvetica", 13,
               if (element.abstract) 3 else 1)       semantic styling
          }




Mittwoch, 28. März 12
The code is at

               https://github.com/JanKoehnlein/Generic-Graph-View


                                But remember:

                        IT‘S A PROTOTYPE


Mittwoch, 28. März 12

Weitere ähnliche Inhalte

Mehr von Dr. Jan Köhnlein

Diagram Editors - The FXed Generation
Diagram Editors - The FXed GenerationDiagram Editors - The FXed Generation
Diagram Editors - The FXed GenerationDr. Jan Köhnlein
 
Eclipse Diagram Editors - An Endangered Species
Eclipse Diagram Editors - An Endangered SpeciesEclipse Diagram Editors - An Endangered Species
Eclipse Diagram Editors - An Endangered SpeciesDr. Jan Köhnlein
 
A fresh look at graphical editing
A fresh look at graphical editingA fresh look at graphical editing
A fresh look at graphical editingDr. Jan Köhnlein
 
A fresh look at graphical editing
A fresh look at graphical editingA fresh look at graphical editing
A fresh look at graphical editingDr. Jan Köhnlein
 
Pragmatic DSL Design with Xtext, Xbase and Xtend 2
Pragmatic DSL Design with Xtext, Xbase and Xtend 2Pragmatic DSL Design with Xtext, Xbase and Xtend 2
Pragmatic DSL Design with Xtext, Xbase and Xtend 2Dr. Jan Köhnlein
 
Android tutorial - Xtext slides
Android tutorial - Xtext slidesAndroid tutorial - Xtext slides
Android tutorial - Xtext slidesDr. 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 ToolsDr. Jan Köhnlein
 
Combining Graphical and Textual
Combining Graphical and TextualCombining Graphical and Textual
Combining Graphical and TextualDr. Jan Köhnlein
 
Domain Specific Languages With Eclipse Modeling
Domain Specific Languages With Eclipse ModelingDomain Specific Languages With Eclipse Modeling
Domain Specific Languages With Eclipse ModelingDr. Jan Köhnlein
 
Domänenspezifische Sprachen mit Xtext
Domänenspezifische Sprachen mit XtextDomänenspezifische Sprachen mit Xtext
Domänenspezifische Sprachen mit XtextDr. Jan Köhnlein
 

Mehr von Dr. Jan Köhnlein (20)

Diagrams, Xtext and UX
Diagrams, Xtext and UXDiagrams, Xtext and UX
Diagrams, Xtext and UX
 
Scoping
ScopingScoping
Scoping
 
Diagram Editors - The FXed Generation
Diagram Editors - The FXed GenerationDiagram Editors - The FXed Generation
Diagram Editors - The FXed Generation
 
Code Generation With Xtend
Code Generation With XtendCode Generation With Xtend
Code Generation With Xtend
 
Graphical Views For Xtext
Graphical Views For XtextGraphical Views For Xtext
Graphical Views For Xtext
 
The Xtext Grammar Language
The Xtext Grammar LanguageThe Xtext Grammar Language
The Xtext Grammar Language
 
Eclipse Diagram Editors - An Endangered Species
Eclipse Diagram Editors - An Endangered SpeciesEclipse Diagram Editors - An Endangered Species
Eclipse Diagram Editors - An Endangered Species
 
Java DSLs with Xtext
Java DSLs with XtextJava DSLs with Xtext
Java DSLs with Xtext
 
DSLs for Java Developers
DSLs for Java DevelopersDSLs for Java Developers
DSLs for Java Developers
 
A fresh look at graphical editing
A fresh look at graphical editingA fresh look at graphical editing
A fresh look at graphical editing
 
A fresh look at graphical editing
A fresh look at graphical editingA fresh look at graphical editing
A fresh look at graphical editing
 
Pragmatic DSL Design with Xtext, Xbase and Xtend 2
Pragmatic DSL Design with Xtext, Xbase and Xtend 2Pragmatic DSL Design with Xtext, Xbase and Xtend 2
Pragmatic DSL Design with Xtext, Xbase and Xtend 2
 
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
 
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
 
Domain Specific Languages With Eclipse Modeling
Domain Specific Languages With Eclipse ModelingDomain Specific Languages With Eclipse Modeling
Domain Specific Languages With Eclipse Modeling
 
Domänenspezifische Sprachen mit Xtext
Domänenspezifische Sprachen mit XtextDomänenspezifische Sprachen mit Xtext
Domänenspezifische Sprachen mit Xtext
 
Workshop On Xtext
Workshop On XtextWorkshop On Xtext
Workshop On Xtext
 

A fresh look at graphical editing

  • 1. A FRESH LOOK AT GRAPHICAL EDITING Dr. Jan Köhnlein Mittwoch, 28. März 12
  • 2. 畫 勝 千 Mittwoch, 28. März 12 言
  • 3. 畫 A PICTURE SAYS 勝 MORE THAN A THOUSAND 千 WORDS Mittwoch, 28. März 12 言
  • 4. 畫 A PICTURE SAYS 勝 MORE THAN A THOUSAND 千 WORDS My th Mittwoch, 28. März 12 言
  • 6. abstract class EStructuralFeature extends ETypedElement { boolean changeable = "true" boolean ^volatile boolean ^transient String defaultValueLiteral EJavaObject defaultValue boolean ^unsettable boolean ^derived op int getFeatureID() op EJavaClass getContainerClass() container EClass eContainingClass opposite eStructuralFeatures } class EReference extends EStructuralFeature { boolean containment boolean ^container boolean resolveProxies = "true" refers EReference eOpposite opposite eOpposite } class EParameter extends ETypedElement { container EOperation eOperation opposite eParameters } class EAttribute extends EStructuralFeature { boolean iD refers EDataType eAttributeType } class EEnumLiteral extends ENamedElement { int value EEnumerator instance container EEnum eEnum opposite eLiterals } class EEnum extends EDataType { op EEnumLiteral getEEnumLiteral(String name) op EEnumLiteral getEEnumLiteral(int value) contains EEnumLiteral[] eLiterals opposite eEnum } class EObject {} type EJavaClass wraps Class type EJavaObject wraps Object type EEnumerator wraps java.util.Enumeration Mittwoch, 28. März 12
  • 7. abstract class EStructuralFeature extends ETypedElement { boolean changeable = "true" boolean ^volatile boolean ^transient String defaultValueLiteral EJavaObject defaultValue boolean ^unsettable boolean ^derived op int getFeatureID() op EJavaClass getContainerClass() container EClass eContainingClass opposite eStructuralFeatures } class EReference extends EStructuralFeature { boolean containment boolean ^container boolean resolveProxies = "true" refers EReference eOpposite opposite eOpposite } class EParameter extends ETypedElement { 368 Words container EOperation eOperation opposite eParameters } class EAttribute extends EStructuralFeature { boolean iD refers EDataType eAttributeType } class EEnumLiteral extends ENamedElement { int value EEnumerator instance container EEnum eEnum opposite eLiterals } class EEnum extends EDataType { op EEnumLiteral getEEnumLiteral(String name) op EEnumLiteral getEEnumLiteral(int value) contains EEnumLiteral[] eLiterals opposite eEnum } class EObject {} type EJavaClass wraps Class type EJavaObject wraps Object type EEnumerator wraps java.util.Enumeration Mittwoch, 28. März 12
  • 9. ENTIRE ECORE ~500 WORDS Mittwoch, 28. März 12
  • 11. DIAGRAMS ARE TALKING TO YOU NOT TO YOUR COMPUTER Mittwoch, 28. März 12
  • 12. REQUIREMENTS Model Diagram (Computer) (User) Mittwoch, 28. März 12
  • 13. REQUIREMENTS Model Diagram (Computer) (User) Completeness Conciseness Consistency Containment Mittwoch, 28. März 12
  • 14. REQUIREMENTS Model Diagram (Computer) (User) Completeness Explain Model to Humans Conciseness Projection, arbitrary focus Consistency Verbosity and sloppiness Containment Slick visual design Usability of a drawing tool Mittwoch, 28. März 12
  • 15. MODEL EDITING SOLUTION 1-to-1 Mapping Semantic model Diagram Mittwoch, 28. März 12
  • 16. MODEL EDITING SOLUTION 1-to-1 Mapping Semantic model Diagram Mittwoch, 28. März 12
  • 17. MISMATCH IS THE RULE Diagram children TreeNode * nodes * * edges Node Edge Mittwoch, 28. März 12
  • 18. MISMATCH IS THE RULE Diagram children TreeNode * nodes * * edges Node Edge Mittwoch, 28. März 12
  • 19. MISMATCH IS THE RULE Diagram children TreeNode * nodes * * edges Node Edge TreeNode A > TreeNode B Mittwoch, 28. März 12
  • 20. MISMATCH IS THE RULE Diagram children TreeNode * nodes * * edges Node Edge TreeNode A > TreeNode B Mittwoch, 28. März 12
  • 21. MISMATCH IS THE RULE Diagram children TreeNode * nodes * * edges Node Edge Diagram TreeNode A > Node A > TreeNode B > Node B > Edge (A,B) Mittwoch, 28. März 12
  • 24. USER SURPRISE Delete Cut / Copy / Paste Drag & Drop Mittwoch, 28. März 12
  • 26. GHOST ELEMENTS Remnants of failed Cut/Copy/Paste/Delete or Drag & Drop actions Breaking model integrity Not shown in any diagram Mittwoch, 28. März 12
  • 32. YOUR EDITOR DEGRADES WHEN YOU FOCUS ON MODEL EDITING Mittwoch, 28. März 12
  • 33. WHAT IS YOUR FOCUS Model Diagram Editing Editing Enforce 1-to-1-mapping Dynamic one-way mapping • Assimilate diagram Full graphical flexibility • Loss of expressiveness Style for understandability • Loss of usability Choose projection easily • Add non-graphical tools • Find another way to edit Mittwoch, 28. März 12
  • 34. MODEL VIEW SOLUTION One-way Mapping Semantic model Diagram Mittwoch, 28. März 12
  • 35. MODEL VIEW SOLUTION One-way Mapping Semantic model Diagram Mittwoch, 28. März 12
  • 36. MODEL EDITING Mittwoch, 28. März 12
  • 37. DIAGRAM EDITING Mittwoch, 28. März 12
  • 38. RUNTIME • Reads mapping and stylesheet • Capture snapshots of any live model • Render GEF diagram with shape library • Selection / navigation adapter for • EMF, Xtext, JDT Mittwoch, 28. März 12
  • 39. MAPPING DSL • Xtext-based with Xbase expressions • Uni-directional transformation • Interpreted Mittwoch, 28. März 12
  • 40. STYLING DSL • Xtext-based with Xbase expressions • Directly modifies Draw2d figures • Interpreted Mittwoch, 28. März 12
  • 41. MyClass SuperClass Mittwoch, 28. März 12
  • 42. MyClass this SuperClass Mittwoch, 28. März 12
  • 43. diagram EClassHierarchy type EClass { MyClass this SuperClass Mittwoch, 28. März 12
  • 44. diagram EClassHierarchy type EClass { MyClass this SuperClass Mittwoch, 28. März 12
  • 45. diagram EClassHierarchy type EClass { node EClassNode for this { MyClass this SuperClass Mittwoch, 28. März 12
  • 46. diagram EClassHierarchy type EClass { node EClassNode for this { MyClass this SuperClass Mittwoch, 28. März 12
  • 47. diagram EClassHierarchy type EClass { node EClassNode for this { label Name for this MyClass this SuperClass Mittwoch, 28. März 12
  • 48. diagram EClassHierarchy type EClass { node EClassNode for this { label Name for this MyClass this MyClass SuperClass Mittwoch, 28. März 12
  • 49. diagram EClassHierarchy type EClass { node EClassNode for this { label Name for this edge SuperType for each this.getESuperTypes() { MyClass this MyClass SuperClass Mittwoch, 28. März 12
  • 50. diagram EClassHierarchy type EClass { node EClassNode for this { label Name for this edge SuperType for each this.getESuperTypes() { MyClass MyClass SuperClass this Mittwoch, 28. März 12
  • 51. diagram EClassHierarchy type EClass { node EClassNode for this { label Name for this edge SuperType for each this.getESuperTypes() { => call EClassNode for this MyClass MyClass SuperClass this Mittwoch, 28. März 12
  • 52. diagram EClassHierarchy type EClass { node EClassNode for this { label Name for this edge SuperType for each this.getESuperTypes() { => call EClassNode for this MyClass MyClass SuperClass this Mittwoch, 28. März 12
  • 53. diagram EClassHierarchy type EClass { node EClassNode for this { label Name for this edge SuperType for each this.getESuperTypes() { => call EClassNode for this MyClass MyClass SuperClass this SuperClass Mittwoch, 28. März 12
  • 54. diagram EClassHierarchy type EClass { node EClassNode for this { label Name for this edge SuperType for each this.getESuperTypes() { => call EClassNode for this MyClass this MyClass SuperClass SuperClass Mittwoch, 28. März 12
  • 55. diagram EClassHierarchy type EClass { node EClassNode for this { label Name for this edge SuperType for each this.getESuperTypes() { => call EClassNode for this MyClass this MyClass SuperClass SuperClass Mittwoch, 28. März 12
  • 56. diagram EClassHierarchy type EClass { node EClassNode for this { label Name for this edge SuperType for each this.getESuperTypes() { => call EClassNode for this } } } MyClass this MyClass SuperClass SuperClass Mittwoch, 28. März 12
  • 57. stylesheet EClassHierarchy for EClassHierarchy style EClassNode.SuperType { var arrow = new PolygonDecoration() arrow.setScale(10,10) arrow.backgroundColor = color(#ffffff) arrow.lineWidth = 2 this.targetDecoration = arrow } style EClassNode.Name { font = font("Helvetica", 13, if (element.abstract) 3 else 1) } Mittwoch, 28. März 12
  • 58. stylesheet EClassHierarchy for EClassHierarchy refs to mappings style EClassNode.SuperType { var arrow = new PolygonDecoration() arrow.setScale(10,10) arrow.backgroundColor = color(#ffffff) arrow.lineWidth = 2 this.targetDecoration = arrow } style EClassNode.Name { font = font("Helvetica", 13, if (element.abstract) 3 else 1) } Mittwoch, 28. März 12
  • 59. stylesheet EClassHierarchy for EClassHierarchy style EClassNode.SuperType { var arrow = new PolygonDecoration() Xbase body arrow.setScale(10,10) arrow.backgroundColor = color(#ffffff) arrow.lineWidth = 2 this.targetDecoration = arrow } style EClassNode.Name { font = font("Helvetica", 13, if (element.abstract) 3 else 1) } Mittwoch, 28. März 12
  • 60. stylesheet EClassHierarchy for EClassHierarchy style EClassNode.SuperType { var arrow = new PolygonDecoration() arrow.setScale(10,10) arrow.backgroundColor = color(#ffffff) arrow.lineWidth = 2 this variable this.targetDecoration = arrow } style EClassNode.Name { font = font("Helvetica", 13, if (element.abstract) 3 else 1) } Mittwoch, 28. März 12
  • 61. stylesheet EClassHierarchy for EClassHierarchy style EClassNode.SuperType { var arrow = new PolygonDecoration() arrow.setScale(10,10) arrow.backgroundColor = color(#ffffff) arrow.lineWidth = 2 this.targetDecoration = arrow } color literals style EClassNode.Name { font = font("Helvetica", 13, if (element.abstract) 3 else 1) } Mittwoch, 28. März 12
  • 62. stylesheet EClassHierarchy for EClassHierarchy style EClassNode.SuperType { var arrow = new PolygonDecoration() arrow.setScale(10,10) arrow.backgroundColor = color(#ffffff) arrow.lineWidth = 2 this.targetDecoration = arrow } style EClassNode.Name { extensions font = font("Helvetica", 13, if (element.abstract) 3 else 1) } Mittwoch, 28. März 12
  • 63. stylesheet EClassHierarchy for EClassHierarchy style EClassNode.SuperType { var arrow = new PolygonDecoration() arrow.setScale(10,10) arrow.backgroundColor = color(#ffffff) arrow.lineWidth = 2 this.targetDecoration = arrow } style EClassNode.Name { font = font("Helvetica", 13, if (element.abstract) 3 else 1) semantic styling } Mittwoch, 28. März 12
  • 64. The code is at https://github.com/JanKoehnlein/Generic-Graph-View But remember: IT‘S A PROTOTYPE Mittwoch, 28. März 12