Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How to make Sirius shine?

How to make Sirius shine?

A presentation realized by Maxime Porhel during EclipseCon Europe 2014 and slightly improved by Stéphane Bégaudeau

Stéphane Bégaudeau

October 28, 2014
Tweet

More Decks by Stéphane Bégaudeau

Other Decks in Technology

Transcript

  1. How to make Eclipse Con Europe 
 28-30 October 2014

    Sirius shine? Maxime Porhel
 Obeo Sirius © Akira Fujii - http://www.spacetelescope.org/images/heic0516f/
  2. • Focused on domain specific modeling technologies • 60 people

    working on products and customer projects • Services : training, consulting and Open Innovation
 
 
 
 www.obeo.fr
  3. Internships 4 Sirius Specification Editor • Improve the Sirius specification

    editor • Additional concepts • Integrate some Sirius design patterns • Eclipse Tooling • Open source contribution (git, gerrit, etc)
  4. Internships 5 Acceleo Query Language • Participate in the development

    of our new query language • Language development (antlr) • Language tooling • Eclipse Tooling • Open source contribution (git, gerrit, etc)
  5. Internships 6 Sirius & Mylyn • Integrate Sirius and Mylyn

    • Eclipse integration • Sirius customization • Open source contribution (git, gerrit, etc)
  6. Internships 7 Sirius « Pure » Editor • Improve the

    architecture of Sirius to be able to use the editor without anything else • Eclipse integration • Sirius customization • Open source contribution (git, gerrit, etc)
  7. Internships 8 EMF Asynchronous Edition • Build an asynchronous edition

    framework for EMF • Eclipse integration • EMF & EMF Edit • HTTP/REST API
  8. Internships 9 Ardiuno Designer • Participate in the development of

    a graphical designer for the Internet of Things • Sirius • Ardiuno • Open source contribution (git, github)
  9. Internships 10 Dart Designer • Participate in the development of

    a graphical designer for Dart, Google’s new programming language • Sirius • Dart • AngularDart • Open source contribution (git, github)
  10. Internships 11 SmartEA • Participate in the development of the

    new architecture of SmartEA • HTML / JavaScript ES5 / CSS • AngularJS • Gulp / Browserify / Karma • NodeJS / NPM • Jetty • Git, Gerrit, Jenkins
  11. Internships 12 Eclipse JavaScript DevTools • Contribute to the Eclipse

    project JSDT • Eclipse Tooling • AngularJS • Gulp / Browserify / Karma • NodeJS / NPM • Open source contribution (git, gerrit, etc)
  12. Research projects Funding Sys2Soft « Sirius is an Eclipse project

    which aims at providing specific multi-view modeling workbenches through diagram, table or tree editors based on EMF. Users can easily define their own modeling workbench, even with very little technical knowledge of Eclipse, while still being able to deeply customize it when needed. »
  13. 37 Ergonomic improvements on Diagrams Sirius 2.0 Help Sirius find

    the elements to display Synchronization options and advanced tools Additional mappings and tools contribution Style and color customization Outline
  14. Outline 38 Ergonomic improvements on Diagrams Sirius 2.0 Help Sirius

    find the elements to display Synchronization options and advanced tools Style and color customization Additional mappings and tools contribution
  15. Viewpoint Specification Model 39 Container Node Sub Container SubNode List

    List element List element Border node Mappings and tools declaration
  16. Viewpoint Specification Model 41 Container Styles Edge Styles • routing

    style (oblique, manhattan, tree) • line style • source/target arrows • begin/center/end labels
  17. Mapping Specification 42 Naive approach • Domain class • No

    Semantic Candidates Expression • Precondition expression to filter elements Note: • Green: EClass name • Yellow: interpreted expression
  18. Interpreted Expression 43 • Tooltip: the expected type of result

    and the available variables • Completion on empty expression: available interpreters • var: direct access to Sirius variables • feature: direct access to the named features of the current element
 (and EMF pseudo-features) • service: direct call of a Java method 
 (that follows some naming conventions in the documentation) • [ /]: Acceleo3 expression
  19. Mapping Evaluation 45 • Sirius will look into all loaded

    semantic/domain model to look for candidates if semantic candidates expression is empty. • eAllContents() on each domain resource content • Not efficient
  20. Needle in a haystack © Acid Pix - https://www.flickr.com/photos/acidpix/6461577407 ©

    Gary Posner - https://www.flickr.com/photos/gjpimages/7343085638
  21. Diagram elements computation 47 From the element to refresh (and

    its description/mapping): 1. Get available mappings to refresh • activated Viewpoints, activated Layers • children mappings + reused mappings 2. For each mapping found 1. Evaluation of the semantic candidates expression from the current domain element (or eAllContents() on each domain resource) 2. Filter with the specified domain class 3. On each candidate, evaluate the precondition 4. Create the diagram element, assign a style
  22. Diagram elements Computation 48 many mappings + many complex precondition

    expressions + empty semantic candidates + big models 㱺 Poor performances Try as much as possible to write efficient semantic candidates expression: • Avoid empty semantic candidates expression and eAllContents when possible • Follow the structural features defined in the meta model • Use the inverse cross references ( eInverse(Type) in Acceleo3, access to the ECrossReferenceAdapter from a Java service) to look for elements with a reference to another element. • Use the var:, service:, feature: interpreters when possible • Try to integrate your precondition in your semantic candidate expression
 [ mainExpression -> select( e | e.precondition) /]
  23. 50 Ergonomic improvements on Diagrams Sirius 2.0 Help Sirius find

    the elements to display Synchronization options and advanced tools Style and color customization Additional mappings and tool contribution Outline
  24. Mapping synchronization options 51 • To indicate if Sirius has

    to look for candidates for a mapping or just to refresh the style and the sub elements.
  25. Mapping synchronization options 52 • To indicate if Sirius has

    to look for candidates for a mapping or just to refresh the style and the sub elements. • Allows to create contextual diagrams: • User controls the elements he wants to see on his diagram • Sirius does not create elements for non-synchronized mappings • Delete from diagram is enabled • Specifier has to create some ‘insertion’ tools: Selection Wizards, Drop tools (from Model Explorer) to allow the user to populate its diagrams • Edge, border nodes, list elements mappings often put as synchronized
  26. Advanced tools: Direct edit (F2) 53 • Java services can

    be used to do more.
 In Ecore Tools, on EStructuralFeature nodes/edges: • « Something » => change name of feature • «:SomeType » => only change the eType • «1» => only set cardinality to 1..x • « * » => only set cardinality to x..* • « /Something » => make the feature derived • « = something » => set the default value literal • [...] • Easy edit mask creation • {0} : {1} • User text will be split into String variables
  27. Advanced tools 54 • Element select variables: to display a

    selection dialog (list or tree) when the user execute a tool • Filter listener: to control the visibility of a palette tool and react to model (Sirius or semantic) changes • Java service: could be used from a Generic Tool (or any other kind of tool) to call your own JFace/SWT Wizard/Dialog.
  28. 56 Ergonomic improvements on Diagrams Sirius 2.0 Help Sirius find

    the elements to display Synchronization options and advanced tools Style and color customization Additional mappings and tools contribution Outline
  29. Provide mappings and tools 57 • Viewpoint Specification Project •

    Ready to deploy Eclipse plugin • Viewpoint Specification Model • 1..* per Viewpoint Specification Project • EMF Model, can have links to other VSM • Possibility to extends/complete VSM defined in other plugins • Viewpoint • Activation controlled by the user • Declares Diagram/Table/Tree description but also Diagram Extension
  30. Provide mappings and tools 58 • Diagram Description • one

    default Layer • 0..* additional Layers • Diagram Extension Description • reference a diagram description (defined anywhere) • provide additional layers • Layer • Possibility to make it optional and/or active by default • Activation controlled by the user if optional • contains top level mappings and tool section • Node/Container/EdgeMapping imports • to specialize mappings • provide new styles / children mappings • Tool Section • contains other tool sections • declares or reuse tools
  31. 60 Ergonomic improvements on Diagrams Sirius 2.0 Help Sirius find

    the elements to display Synchronization options and advanced tools Additional mappings and tools contribution Style and color customization Outline
  32. User colors 61 • Predefined colors • User Color Palette

    • Define in a Group • Add additional colors • User fixed color (RGB, System color chooser) • Computed Color: interpreted expression to compute R, G, B • Interpolated Color • Define several color steps (value/color) • Expression to compute a value from the element to decorate
  33. Conditional Styles 63 • Available for every kind of mapping

    • 0..* conditional style • Each conditional style contains a different style • Precondition must be exclusive • Sirius takes the first whose precondition
 evaluation returns true. • The ‘default’ style is taken if no conditional style can be applied
  34. Style Customizations 65 • Defined in a Layer • More

    fine grained customization 
 (than the Conditional Styles) • Style Customization has a precondition • Property Customization • target one EStructuralFeature of the Sirius style descriptions • applied on all style or selected ones
  35. 66 Ergonomic improvements on Diagrams Sirius 2.0 Help Sirius find

    the elements to display Synchronization options and advanced tools Style and color customization Additional mappings and tools contribution Outline
  36. Sirius 1.0 Sirius 1.0.1 Sirius 2.0 Sirius 0.9 Luna SR1

    Luna 2013-12-11 2014-06-25 2014-08-22 2014-10-24 First official version under the Sirius name. First participation in the release train. Minor corrective version in Luna Service Release 1 4 months after the previous major version • 26 issues closed on the Sirius Bugzilla • 109 issues closed on the Sirius Bugzilla • 16 ticket tagged « Performance » • 17 enhancements focused on the Diagram editor UX 2015 Mars Sirius 3.0 Sirius 2.0: released last friday 67
  37. • « Snap to shapes » is now enabled by

    default for new diagrams • « Touch » selection mode 
 (selection from right to left: element that intersects the selection rectangle will be selected) • « Snap to grid » preference is now used to place elements created from the palette. • The resize of a node/container does not change the location of its children
 (sub nodes/containers, border nodes - F3 to retrieve the GMF default behavior) • The edges appearance is now kept, as much as possible, • when one of its extremity is moved/reconnected. • when a node (container or not) is moved. • only the closest segment of the impacted edges will be modified. • New actions and menus: • Distribute shapes actions (gaps between selected elements or between their centers) • Remove bend-points • Reset diagram (or container) origin • The « Navigate » top-level context has been split into two menus: « New » and « Open » Sirius 2.0: Ergonomic improvements on Diagrams 68
  38. Conclusion 69 Big models ? Remember the contextual diagrams Use

    Viewpoint, Diagram extensions, Layers to deal with different aspects in your modelers Help Sirius find the elements to display Use the specific interpreters Think about your models topology Use inverse cross references Help the user with advanced tools Conditional styles completely change the appearance of an element Style customizations allow a more fine grained customization
  39. Sirius: Related events 70 • Sirius + Xtext = ♥

    • 13:45 to 14:20 • Cédric Brun - Obeo • Theater • Capella on the field: Model-based system engineering use cases • 15:15 to 15:50 - • Kristian Ashton, Christophe Gatti, Matthieu Helleboid - Thales • Theater Stage • BOF : Let's practice Sirius! • 19:00-20:00 • Silchersaal The BOF will be the place to practice with the help of the Sirius team. Whatever your skill level in Sirius, start with a sample case provided by the team or come with your own case (an Ecore metamodel, an Xtext editor, your first Sirius modeler, ...) and we will be glad to coach you in discovering or going further with this technology. • Obeo booth • Bürgersaal Foyer
  40. • Website: https://www.eclipse.org/sirius • Concrete use cases: https://www.eclipse.org/sirius/gallery.html • Documentation:

    https://www.eclipse.org/sirius/doc/ • Forum, mailing list, … : https://www.eclipse.org/sirius/community.html
  41. Thank you! Do not forget to vote: © NASA, ESA

    Credit: G. Bacon (STScI) - http://www.spacetelescope.org/images/html/heic0516b.html Maxime Porhel [email protected] +MaximePorhel @mporhel