Your SlideShare is downloading. ×
0
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Use Eclipse technologies to build a modern embedded IDE

1,505

Published on

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

No Downloads
Views
Total Views
1,505
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Developer Suite<br />Use Eclipse technologiesto build a modern embedded IDE<br />Benjamin CabéGaétan MoriceEclipseCon 2010 <br />January 21, 2010<br />Sierra Wireless Proprietary and Confidential<br />1<br />
  • 2. Requirements<br />January 21, 2010<br />Sierra Wireless Proprietary and Confidential<br />2<br />
  • 3. Requirements<br />Whatis M2M ?<br />Definition : “M2M refers to data communication between machines.”<br />API/Web Services<br />Connectivity Network<br />Asset<br />Customer Application<br />Communication Device<br />
  • 4. Requirements<br />Connectivity Network<br />Asset<br />Customer Application<br />Communication Device<br />API/Web Services<br /><ul><li>Hosted and operated M2M services platform. Highly scalable, available and secure.Provides APIs to develop web-based custom designed applications.</li></ul>Operated &amp; Hosted <br />M2M Services Platform<br /><ul><li>Open embedded agent integrated in virtually any cell devices (Airlink box, modules embedded in OEM equipment, custom box etc. bothfrom Sierra or other 3rd party).
  • 5. Patented world class Eclipse based IDE to develop embedded applicationsand to generate widgets for end-users.</li></li></ul><li>Requirements<br />Embedded development (Machine-to-Machine)<br />Modelingenvironment<br />Component-orientedapproach<br />
  • 6. Requirements<br />Users profiles<br />Newbies<br />Solution providers<br />Multiple targets<br />Sierra Wireless devices<br />Embedded Linux<br />…<br />
  • 7. Technical solution<br />January 21, 2010<br />Sierra Wireless Proprietary and Confidential<br />7<br />
  • 8. Editors<br />Navigator<br />Validation<br />Model<br />Editor<br />Code<br />Compilation<br />Navigator<br />Target<br />Navigator<br />Communication<br />Features<br />
  • 9. Model<br />Features<br />
  • 10. Modeling<br />EMF - Eclipse Modeling Framework<br />The model is the pillar of the tool<br />Used to model what an embeddedprojectis<br />Benefitsfrom EMF<br />Notifications<br />Serialization<br />Reflective API<br />… all the incredible EMF tools (GMF, Validation, Xpand, Ecore Tools, …)<br />
  • 11. Modeling<br />
  • 12. Navigator<br />Model<br />Features<br />
  • 13. Navigator<br />Objectives<br />1:1 Mapping between Project and Model<br />Display informations in the model as project’s artefacts<br />
  • 14. Navigator<br />Workspaceintegration<br />AdapterFactorytransforms<br />IProjectinto Model Project<br />Model Project intoIproject<br />publicclassProjectAdapterFactoryimplementsIAdapterFactory{<br /> @Override<br /> public Object getAdapter(Object adaptableObject, Class adapterType) {<br /> Object result = null;<br /> // Bi-directional adapter IProject &lt;----&gt; M2MProject<br /> if (adaptableObjectinstanceofIProject &amp;&amp; adapterType.equals(Project.class)) {<br />result = adaptToModel((IProject) adaptableObject);<br /> }<br /> elseif (adaptableObjectinstanceof Project &amp;&amp; adapterType.equals(IProject.class)) {<br />result = adaptIProject((Project) adaptableObject, adapterType);<br /> }<br /> returnresult;<br /> }<br />}<br />
  • 15. Navigator<br />Workspaceintegration<br />EMF Transaction<br />Global model repository<br />TransactionalEditing Domain<br />publicclassProjectActivatorextendsPlugin{<br /> publicstaticfinal String TRANSACTIONAL_EDITING_DOMAIN_ID = &quot;com.anwrt.ec598.project.editingDomain&quot;;<br />...<br /> publicTransactionalEditingDomaingetEditingDomain(){<br />TransactionalEditingDomainshared = TransactionalEditingDomain.Registry.INSTANCE<br />.getEditingDomain(TRANSACTIONAL_EDITING_DOMAIN_ID);<br /> returnshared;<br /> }<br /> ...<br />}<br />
  • 16. Navigator<br />Project Explorer<br />Displays model objects as the Project structure<br />Based on Common Navigator Framework<br />Extensible treeview<br />Rathercomplex API<br />But reallypowerful<br />We use an internal model to define the structure (nodesonlyused to group or display informations)<br />Extension Points:org.eclipse.ui.navigator.*<br />Excellent tutorial: “Building a Common Navigator based viewer”<br />
  • 17. Navigator<br />Project Explorer<br />Result<br />
  • 18. Editors<br />Navigator<br />Features<br />Model<br />
  • 19. Model dition<br />Forms editors<br />Forms + EMF + databinding<br />Create UI<br />Bind UI to model<br />privatevoidcreateContent(FormToolkittoolkit, Composite parent) {<br /> Composite composite = toolkit.createComposite(parent, SWT.NONE);<br />GridDataFactory.fillDefaults().grab(true, false).applyTo(composite);<br />GridLayoutFactory.fillDefaults().numColumns(2).applyTo(composite);<br />toolkit.createLabel(composite, &quot;Name:&quot;, SWT.NONE);<br />_textName = toolkit.createText(composite, &quot;&quot;, SWT.BORDER);<br />GridDataFactory.fillDefaults().grab(true, false).applyTo(_textName);<br />}<br />privatevoidbind() {<br />DataBindingContextbindingContext = newEMFDataBindingContext();<br /> // -- Bind the Name<br />bindingContext.bindValue(SWTObservables.observeText(_textName, SWT.FocusOut),<br />EMFEditObservables.observeDetailValue(Realm.getDefault(), getEditingDomain(),<br />_myEObject, M2MPackage.eINSTANCE.getINamedElement_Name()));<br />}<br />
  • 20. Model edition<br />Forms editors<br />Result<br />Available in PDE Incubator:<br />EMF-FormsEditor to beused for next-generation PDE editors<br />
  • 21. Model edition<br />Graphical Editor: GMF<br />Uses GMF generator to bootstrap<br />Heavy use of GMF Runtime<br />Model<br />GMF generation<br />Generatededitor<br />Customization<br />Modified editor<br />
  • 22. Model edition<br />Graphical Editor: GMF<br />Otherfeatures<br />Rotation<br />Automatic port creation<br />HTML Tooltips<br />Extensible presentation<br />Custom figures canbedefinedusing an extension point<br />
  • 23. Model edition<br />Graphical Editor: GMF<br />Result<br />
  • 24. Editors<br />Navigator<br />Validation<br />Features<br />Model<br />
  • 25. Model validation<br />EMF Validation<br />Extensible (needed for specific-targetconstraints)<br />Constraints are registeredusing an extension point<br />We use only the batch mode<br />Extension points: org.eclipse.emf.validation.*<br />publicIStatusvalidate (EObject model, IProgressMonitor monitor) {<br />IBatchValidatorbatchValidator = ModelValidationService.getInstance()<br /> .newValidator(EvaluationMode.BATCH);<br />batchValidator.setIncludeLiveConstraints(true);<br />batchValidator.setReportSuccesses(false);<br /> returnbatchValidator.validate(model, monitor);<br />}<br />
  • 26. Model validation<br />Integrated in a builder<br />Transparent and automatic (on save)<br />Uses Problem Markers<br />Coupledwith quick fixes for a better user experience<br />
  • 27. Editors<br />Navigator<br />Validation<br />Code<br />Features<br />Model<br />
  • 28. Code generation<br />Xpand<br />Performance issue<br />Workflowistoo slow then use only Java API<br />Example of template<br />«IMPORT model»<br />«DEFINE file FORSourceComponentClass»<br />«FILE project.name.toLowerCase() + &quot;/&quot; + name + &quot;.java&quot;-»<br />package «project.name.toLowerCase()»;<br />publicclass «name» extendsComponentClass{<br />«IFmethods.select(m | m.kind.toString() == &quot;EVENT&quot;).size &gt; 0»<br /> publicvoidreceiveEvent(intinputEventMethod,Objectvalue){<br />«FOREACHmethods.select(m | m.kind.toString() == &quot;EVENT&quot;) AS m-»<br /> //TODOhandleEvent:&quot;+ «m.name.toUpperCase()»:<br />«ENDFOREACH-»<br /> }<br />«ENDIF»<br />}<br />«ENDFILE»<br />«ENDDEFINE»<br />
  • 29. Code generation<br />Xpand<br />Call the Xpandgeneratorprogrammatically<br />publicvoid generate(finalEObject object, IProgressMonitor monitor) throwsCoreException {<br />Generatorgenerator = newGenerator();<br /> // define the metamodelused in the template<br />MetaModel m2mMetamodel = newEmfMetaModel(M2MPackage.eINSTANCE);<br />generator.addMetaModel(m2mMetamodel);<br /> // define the template<br />generator.setExpand(&quot;templates::SourceComponentClass::file FOR component&quot;);<br /> // define the output folder<br /> Outlet outlet = new Outlet(&quot;C:/myOutput/src&quot;);<br />generator.addOutlet(outlet);<br /> // configure protectedregions<br />generator.setPrSrcPaths(&quot;C:/myOutput/src&quot;);<br />generator.setPrDefaultExcludes(true);<br /> // define the EObject input<br />WorkflowContextDefaultImplctx = newWorkflowContextDefaultImpl();<br /> ctx.set(&quot;component&quot;, object);<br /> // run the generator<br />generator.invoke(ctx, newProgressMonitorAdapter(monitor), newIssuesImpl());<br />}<br />
  • 30. Code generation<br />Integrated in a builder<br />Transparent and automatic (on save)<br />Synchronizationbetween model and code<br />Incrementalgeneration<br />
  • 31. Editors<br />Navigator<br />Validation<br />Model<br />Editor<br />Code<br />Navigator<br />Features<br />
  • 32. Code editors and navigator<br />CDT<br />Code navigation<br />Syntaxhighlight<br />Content assist<br />Refactoring<br />…<br />LuaEclipse<br />Based on DLTK 2<br />
  • 33. Code editors and navigator<br />CDT<br />
  • 34. Editors<br />Navigator<br />Validation<br />Model<br />Editor<br />Code<br />Navigator<br />Features<br />
  • 35. Round-tripping<br />Mandatory for a good user experience<br />Be able to edit code or model indifferently<br />Continuoussynchronization<br />First study: EMF Compare<br />Good candidate but toorich for ourneeds<br />Solution: Direct modification of existingmodels<br />
  • 36. Round-tripping<br />Solution<br />Integrated in a builder<br />Synchronize Model and AST<br />From code to model:<br />Code<br />Based on existingparser<br />AST<br />Java transformation<br />Model<br />(extractfrom code)<br />Model<br />(previous version)<br />Merge<br />Model<br />(new version)<br />
  • 37. Editors<br />Navigator<br />Validation<br />Model<br />Editor<br />Compilation<br />Navigator<br />Features<br />Code<br />
  • 38. Compilation<br />CDT - ManagedBuild System (MBS)<br />Declarative creation of custom tool chains<br />Through MBS Extension point<br />Direct integration in CDT builder and preference<br />A bit complex<br />Mechanism of scanner discovery profiles to find tools binaries<br />Extension Point: org.eclipse.ui.managebuilder.core.buildDefinition<br />Excellent tutorial: CDT Plug-in Developer Guide<br />Extension Point: org.eclipse.cdt.make.core.ScannerConfigurationDisccoveryProfile<br />
  • 39. Compilation<br />CDT – MBS<br />Result<br />
  • 40. Compilation<br />CDT - Dependencies management<br />Dependencies management<br />Difficult with CDT<br />Configuration, build artefacts, libraries include, header include to manage<br />No generic rule =&gt; have to be hand craft<br />Use of CDT API to access projects description<br />Managed by refactoring process<br />
  • 41. Compilation<br />CDT - Dependencies management<br />publicclassModifyCProjectDependenciesChangeextends Change {<br />privatefinalIProjectproject;<br />...<br />public Change perform(IProgressMonitor pm) throws CoreException {<br />ICProjectDescriptionprojectDescription = CDTPropertyManager.getProjectDescription(project);<br />ICConfigurationDescription[] configurationDescription = projectDescription.getConfigurations();<br />...<br />}<br />...<br />}<br />
  • 42. Editors<br />Navigator<br />Validation<br />Model<br />Editor<br />Code<br />Compilation<br />Navigator<br />Target<br />Features<br />
  • 43. Features<br />Editors<br />Navigator<br />Validation<br />Model<br />Editor<br />Code<br />Compilation<br />Navigator<br />Target<br />Communication<br />
  • 44. Target communication <br />Objectives<br />Make device’s services available<br />Download<br />Terminal<br />…<br />De-coupling of services and communication channel<br />Extensible<br />January 21, 2010<br />Sierra Wireless Proprietary and Confidential<br />44<br />
  • 45. Target communication <br />Target Communication Framework - TCF<br />Embedded agent<br />Asynchronous<br />Protocol based on<br />Command, Result<br />Event<br />Launch Config<br />TerminalView<br />Download Service<br />Terminal Service<br />Channel<br />TCF<br />Connection Manager<br />Embedded Agent<br />
  • 46. Features<br />Editors<br />Navigator<br />Validation<br />Model<br />Editor<br />Code<br />Compilation<br />Navigator<br />Target<br />Navigator<br />Communication<br />
  • 47. Target navigator<br />Remote System Explorer - RSE<br />GUI framework<br />Tree Explorer<br />Match well with TCF<br />
  • 48. Target navigator<br />Remote System Explorer<br />
  • 49. Editors<br />Navigator<br />Validation<br />Forms<br />EMF Validation<br />GMF<br />Project Explorer + CNF<br />Model<br />Xpand<br />AST<br />Editor<br />CDT<br />Code<br />Compilation<br />CDT + DLTK<br />Navigator<br />TCF<br />RSE<br />Target<br />Navigator<br />Communication<br />Features<br />
  • 50. Demo<br />January 21, 2010<br />Sierra Wireless Proprietary and Confidential<br />50<br />
  • 51. Conclusion<br />January 21, 2010<br />Sierra Wireless Proprietary and Confidential<br />51<br />
  • 52. The benefits of a large ecosystem<br />Allows to createreallycomplexenvironmentquickly<br />Coversdifferentskinds of domains<br />Offersreactive support with the community<br />Allows to focus on real added value<br />
  • 53. January 21, 2010<br />Sierra Wireless Proprietary and Confidential<br />53<br />Questions?<br />
  • 54. Gaétan Morice<br />gmorice@sierrawireless.com<br />Benjamin Cabé<br />bcabe@sierrawireless.com<br />

×