Model my PDE!

828 views

Published on

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

  • Be the first to like this

No Downloads
Views
Total views
828
On SlideShare
0
From Embeds
0
Number of Embeds
14
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Model my PDE!

  1. 1. Benjamin CabéBCabe@sierrawireless.com<br />
  2. 2. Agenda<br />PDE origins<br />EMF+ Forms + other cool stuff<br /> EMF Forms!<br />Examplary project: Declarative Services tooling<br />
  3. 3. PDE as of 3.6, it is<br />Java model<br />+<br />Text-editingframework<br />+<br />OSGi integration<br />+<br />Forms<br />March 25th, 2010<br />© Sierra Wireless<br />
  4. 4. Fair enough…<br />March 25th, 2010<br />© Sierra Wireless<br />
  5. 5. Bummer! A new OSGi header!<br />March 25th, 2010<br />© Sierra Wireless<br />
  6. 6. What do you expect from an editor?<br />March 25th, 2010<br />© Sierra Wireless<br />
  7. 7. And from an editingframework?<br />March 25th, 2010<br />© Sierra Wireless<br />
  8. 8. March 25th, 2010<br />© Sierra Wireless<br />EMF<br />
  9. 9. EMF Forms<br />A generic & tiny framework<br />To build advanced editors on top of models<br />Lives in PDE incubator<br />/cvsroot/eclipse<br />pde-incubator/modeling component<br />March 25th, 2010<br />© Sierra Wireless<br />
  10. 10. EMF Forms: the Editor<br />EmfFormEditor<? extends EObject><br />Generic editor<br />Configurable<br />Custom Forms toolkit<br />Outline?<br />Rich error tooltips?<br />Source page?<br />March 25th, 2010<br />© Sierra Wireless<br />
  11. 11. EMF Forms: the Page<br />AbstractEmfFormPage<br />createContents()<br />bind()<br />March 25th, 2010<br />© Sierra Wireless<br />
  12. 12. EMF Forms: Master/Details blocks<br />EmfMasterDetailBlock /EmfDetailsPart<br />Ease the process of registering details pages<br />Hierarchical databinding (DetailsObservable)<br />March 25th, 2010<br />© Sierra Wireless<br />
  13. 13. March 25th, 2010<br />© Sierra Wireless<br />What? You’re not usingdatabinding?!?<br />
  14. 14. Databinding<br />Linking objects with each other<br />in a declarative<br />and simple way<br />Allows to specify<br />Conversion rules<br />Validation policies<br />March 25th, 2010<br />© Sierra Wireless<br />Controller<br />Model<br />View<br />
  15. 15. EMF Databinding<br />On top of the Edit layer<br />Compact syntax<br />Default behavior easily customizable<br />March 25th, 2010<br />© Sierra Wireless<br />
  16. 16. Databinding examples<br />bindingContext.bindValue( ViewerProperties. input(). observe(_propertiesMasterDetail. getTreeViewer() ) , getEditor().getInputObservable());<br />March 25th, 2010<br />© Sierra Wireless<br />
  17. 17. Databinding examples (MasterDetails)<br />bindingContext.bindValue( WidgetProperties. text(SWT.FocusOut). observe(propertyComposite.getTextName()) , EMFEditProperties. value(getEditingDomain(), ScrPackage.Literals.COMPONENT__NAME). observeDetail(getCurrentSelection()));<br />March 25th, 2010<br />© Sierra Wireless<br />
  18. 18. EditingDomain?<br />Every operation on the model is a Command<br />This command beingstacked on a CommandStack<br />March 25th, 2010<br />© Sierra Wireless<br />
  19. 19. Undo/redo<br />CommandStack<br />Period.<br />March 25th, 2010<br />© Sierra Wireless<br />
  20. 20. Model validation<br />« Simple » validation rules<br />Directly in the model<br />Code mostly generated if you use the http://www.eclipse.org/emf/2002/Ecore#constraints annotation<br />On-demand<br />March 25th, 2010<br />© Sierra Wireless<br />
  21. 21. Model validation<br />More complex rules<br />Contributed from the outside<br />Declaration<br />Fine-grained<br />March 25th, 2010<br />© Sierra Wireless<br />
  22. 22. March 25th, 2010<br />© Sierra Wireless<br />EMF Validation yousaid?!?<br />
  23. 23. EMF Validation<br />Constraints defined in extension points<br />Bound to specific feature(s) and operation(s)<br />They can be written in Java, OCL… or any language<br />March 25th, 2010<br />© Sierra Wireless<br />
  24. 24. Validation builder<br />ModelIncrementalBuilder<br />Genericbuilder<br />Detects modification on model files<br />Creates markers<br />EMFFormEditorimplementsIGotoMarker<br />Makethingsfasterfiltering on a content-type<br />March 25th, 2010<br />© Sierra Wireless<br />
  25. 25. Architecture of the DS tooling<br />org.eclipse.pde.emfforms<br />March 25th, 2010<br />© Sierra Wireless<br />org.eclipse.pde.ds.ui<br />org.eclipse.pde.ds.edit<br />org.eclipse.pde.ds.builder<br />org.eclipse.pde.ds<br />
  26. 26. DS Tooling: the model<br />March 25th, 2010<br />© Sierra Wireless<br />
  27. 27. DS Tooling: the model<br />March 25th, 2010<br />© Sierra Wireless<br />
  28. 28. March 25th, 2010<br />© Sierra Wireless<br />Demo!<br />
  29. 29. Roadmap (?)<br />Better text/modelsynchronization<br />Improve the API<br />Xtext integration<br />Exemplaryproject:OSGi bundle editor<br />Documentation<br />March 25th, 2010<br />© Sierra Wireless<br />
  30. 30. Feedback<br />PDE/UI bugzilla<br />[modeling]<br />March 25th, 2010<br />© Sierra Wireless<br />
  31. 31. Thanks!<br />Benjamin Cabé<br />BCabe@sierrawireless.com<br />March 25th, 2010<br />© Sierra Wireless<br />

×