graphical views
play

GRAPHICAL VIEWS @sponemann FOR WEB-BASED MODELING TOOLS WITH THEIA - PowerPoint PPT Presentation

JAN KHNLEIN, MIRO SPNEMANN @jankoehnlein GRAPHICAL VIEWS @sponemann FOR WEB-BASED MODELING TOOLS WITH THEIA AND SPROTTY ECLIPSE THEIA CREATE WEB-BASED TOOLS IDE framework Using LSP Next-gen Eclipse RCP Extend with custom


  1. JAN KÖHNLEIN, MIRO SPÖNEMANN @jankoehnlein GRAPHICAL VIEWS @sponemann FOR WEB-BASED MODELING TOOLS WITH THEIA AND SPROTTY

  2. ECLIPSE THEIA CREATE WEB-BASED TOOLS ▸ IDE framework ▸ Using LSP ▸ Next-gen Eclipse RCP ▸ Extend with custom editors and views (called widgets ) ▸ For desktop and web

  3. ECLIPSE SPROTTY Spro tu y CREATE GRAPHICAL VIEWS ▸ Diagram framework ▸ Standalone or embedded in Theia, Eclipse IDE or VS Code ▸ Client and server ▸ Integrated with EMF / Xtext ▸ Base for Eclipse GLSP

  4. ECLIPSE SPROTTY CLIENT ARCHITECTURE Command Command Stack Model SModel Action Dispatcher Source Action Viewer Action

  5. OUTLINE ▸ Semantic model vs. view model ▸ How do you determine the content of a diagram? ▸ How do you edit a model using a diagram?

  6. DEMO

  7. MODELING TOOLS SEPARATION OF MODEL AND VIEWS Model View

  8. MODELING TOOLS SEPARATION OF MODEL AND VIEWS Model Subset View overview / filter / manual composition

  9. MODELING TOOLS SEPARATION OF MODEL AND VIEWS Model Multiple Views aspects / projections / viewpoints / perspectives

  10. MODELING TOOLS SEPARATION OF MODEL AND VIEWS Transformation (M2M) Semantic Model View Model overview / filter / manual composition

  11. MODELING TOOLS SEPARATION OF MODEL AND VIEWS Command Stack SModel Model Action Dispatcher Source Viewer Semantic Model Sprotty server client

  12. THE SPROTTY VIEW MODEL ELEMENTS OF AN SMODEL SLabel SCompartment Package SNode name: string dependency description: string version: string SPort Module 🦒 SEdge

  13. { "mindsKind": "Class", "isAbstract": false, "layout": "vbox", "selected": false, "position": { "x": 2136.560450164477, "y": 12 }, "size": { "width": 62.5625, "height": 47.375 }, "layoutOptions": { "paddingTop": 0, "paddingBottom": 0 }, "type": "node:Class", "id": "Class-Eclipse:Entity", "children": [ { "layout": "vbox", "position": { "x": 8, "y": 0 }, "size": { "width": 46.5625, "height": 47.375

  14. DIAGRAM AUTHORING: PERSISTENCE, LAYOUT, RECONCILING

  15. DIAGRAM CONTENT WHAT'S SHOWING IN THE DIAGRAM? Full model Filtered submodel Fully Manual ▸ mapping ▸ GUI for filter rules ▸ GUI for composition ▸ lifecycle hooks ▸ persistence of rules ▸ model browser ▸ persistence ▸ reconciliation complexity

  16. DIAGRAM CONTENT WHAT'S SHOWING IN THE DIAGRAM? Fully Manual Graphical Editing ▸ GUI for composition ▸ GUI for editing ▸ model browser ▸ sync back to model ▸ persistence ▸ reconciliation complexity

  17. DIAGRAM CONTENT FULL MODEL DIAGRAM TRAFO SEMANTIC MODEL SMODEL USER CHANGE

  18. DIAGRAM CONTENT FULL MODEL DIAGRAM TRAFO SEMANTIC MODEL SMODEL

  19. DIAGRAM CONTENT FULL MODEL DIAGRAM TRAFO SEMANTIC MODEL SMODEL USER CHANGE

  20. DIAGRAM CONTENT MANUAL CONTENT DIAGRAM TRAFO SEMANTIC MODEL SMODEL USER CHANGE DIAGRAM CONFIG

  21. DIAGRAM CONTENT MANUAL DIAGRAM - EXTERNAL FILE TRAFO SEMANTIC MODEL SMODEL DIAGRAM CONFIG

  22. DIAGRAM CONTENT MANUAL DIAGRAM - IN MODEL SEMANTIC MODEL TRAFO SMODEL DIAGRAM CONFIG

  23. DIAGRAM CONTENT DIAGRAM PERSISTENCE ▸ Don't store the SModel ▸ reduce to things the user really wants to change ▸ text-based formats to allow versioning, merging etc. ▸ Consider putting small information in the semantic model ▸ Fully-automated views don't need to be persisted

  24. DIAGRAM CONTENT DIAGRAM LAYOUT ▸ Macro-layout to arrange nodes and route edges ▸ Sprotty uses Eclipse Layout Kernel (ELK) ▸ Modes ▸ fully automatic ▸ manual/on-demand ▸ ELK interactive

  25. DIAGRAM CONTENT RECONCILING ▸ Decide when (not) to reconcile ▸ Provide „stable“ IDs/traces ▸ Fully-automated views don't need any reconciling

  26. GRAPHICAL 
 EDITING

  27. GRAPHICAL EDITING BI-DIRECTIONAL MAPPING MAPPING 
 TRAFO SEMANTIC MODEL SMODEL USER INVERSE CHANGE MAPPING 
 TRAFO

  28. GRAPHICAL EDITING BI-DIRECTIONAL MAPPING MAPPING 
 TRAFO SEMANTIC MODEL SMODEL INVERSE MAPPING 
 TRAFO

  29. GRAPHICAL EDITING BI-DIRECTIONAL MAPPING MAPPING 
 TRAFO SEMANTIC MODEL SMODEL INVERSE MAPPING 
 TRAFO

  30. GRAPHICAL EDITING BI-DIRECTIONAL MAPPING MAPPING 
 TRAFO SEMANTIC MODEL SMODEL INVERSE MAPPING 
 TRAFO

  31. GRAPHICAL EDITING BI-DIRECTIONAL MAPPING MAPPING 
 TRAFO SEMANTIC MODEL SMODEL INVERSE MAPPING 
 TRAFO

  32. GRAPHICAL EDITING BI-DIRECTIONAL MAPPING AVOID BI-DIRECTIONAL SYNC SEMANTIC MODEL SMODEL

  33. GRAPHICAL EDITING UNI-DIRECTIONAL MAPPING MAPPING 
 TRAFO SEMANTIC MODEL SMODEL USER CHANGE

  34. GRAPHICAL EDITING UNI-DIRECTIONAL MAPPING MAPPING 
 TRAFO SEMANTIC MODEL SMODEL USER CHANGE

  35. GRAPHICAL EDITING UNI-DIRECTIONAL MAPPING MAPPING 
 TRAFO SEMANTIC MODEL SMODEL SEMANTIC CHANGE

  36. GRAPHICAL EDITING UNI-DIRECTIONAL MAPPING MAPPING 
 TRAFO SEMANTIC MODEL SMODEL

  37. DEMO

  38. GRAPHICAL EDITING CONSIDERATIONS ▸ Avoid bi-directional mapping ▸ Map user changes to semantic model changes ▸ e.g. LSP code actions, content assist, rename ▸ Maybe diagram content editing is enough

  39. RECOMMENDATIONS KEEP IT SIMPLE! ▸ Ask yourself (or your team / customers): ▸ What problems do we want to solve with diagrams? ▸ What user interaction patterns are most suitable in our scenario?

  40. REFERENCES ▸ https://theia-ide.org/ ▸ https://github.com/eclipse/sprotty ▸ https://github.com/TypeFox/npm-dependency-graph ▸ https://github.com/TypeFox/theia-xtext-sprotty-example ▸ https://www.youtube.com/watch?v=hrGc30iIdiA ▸ https://www.youtube.com/watch?v=IrFQKdjzvXU

Recommend


More recommend