Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Benjamin CabéBCabe@sierrawireless.com<br />
Agenda<br />PDE origins<br />EMF+ Forms + other cool stuff<br /> EMF Forms!<br />Examplary project: Declarative Services ...
PDE as of 3.6, it is<br />Java model<br />+<br />Text-editingframework<br />+<br />OSGi integration<br />+<br />Forms<br /...
Fair enough…<br />March 25th, 2010<br />© Sierra Wireless<br />
Bummer! A new OSGi header!<br />March 25th, 2010<br />© Sierra Wireless<br />
What do you expect from an editor?<br />March 25th, 2010<br />© Sierra Wireless<br />
And from an editingframework?<br />March 25th, 2010<br />© Sierra Wireless<br />
March 25th, 2010<br />© Sierra Wireless<br />EMF<br />
EMF Forms<br />A generic & tiny framework<br />To build advanced editors on top of models<br />Lives in PDE incubator<br /...
EMF Forms: the Editor<br />EmfFormEditor<? extends EObject><br />Generic editor<br />Configurable<br />Custom Forms toolki...
EMF Forms: the Page<br />AbstractEmfFormPage<br />createContents()<br />bind()<br />March 25th, 2010<br />© Sierra Wireles...
EMF Forms: Master/Details blocks<br />EmfMasterDetailBlock /EmfDetailsPart<br />Ease the process of registering details pa...
March 25th, 2010<br />© Sierra Wireless<br />What? You’re not usingdatabinding?!?<br />
Databinding<br />Linking objects with each other<br />in a declarative<br />and simple way<br />Allows to specify<br />Con...
EMF Databinding<br />On top of the Edit layer<br />Compact syntax<br />Default behavior easily customizable<br />March 25t...
Databinding examples<br />bindingContext.bindValue(	ViewerProperties.	input().	observe(_propertiesMasterDetail.			getTreeV...
Databinding examples (MasterDetails)<br />bindingContext.bindValue(	WidgetProperties.	text(SWT.FocusOut).	observe(property...
EditingDomain?<br />Every operation on the model is a Command<br />This command beingstacked on a CommandStack<br />March ...
Undo/redo<br />CommandStack<br />Period.<br />March 25th, 2010<br />© Sierra Wireless<br />
Model validation<br />« Simple » validation rules<br />Directly in the model<br />Code mostly generated if you use the htt...
Model validation<br />More complex rules<br />Contributed from the outside<br />Declaration<br />Fine-grained<br />March 2...
March 25th, 2010<br />© Sierra Wireless<br />EMF Validation yousaid?!?<br />
EMF Validation<br />Constraints defined in extension points<br />Bound to specific feature(s) and operation(s)<br />They c...
Validation builder<br />ModelIncrementalBuilder<br />Genericbuilder<br />Detects modification on model files<br />Creates ...
Architecture of the DS tooling<br />org.eclipse.pde.emfforms<br />March 25th, 2010<br />© Sierra Wireless<br />org.eclipse...
DS Tooling: the model<br />March 25th, 2010<br />© Sierra Wireless<br />
DS Tooling: the model<br />March 25th, 2010<br />© Sierra Wireless<br />
March 25th, 2010<br />© Sierra Wireless<br />Demo!<br />
Roadmap (?)<br />Better text/modelsynchronization<br />Improve the API<br />Xtext integration<br />Exemplaryproject:OSGi b...
Upcoming SlideShare
Loading in …5
×

Model my PDE!

890 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

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 />

×