Skip to main content
Jump to: navigation, search

STP/EID Component/EID Developers

< STP‎ | EID Component
Revision as of 14:08, 29 February 2008 by Ohurley.iona.com (Talk | contribs)

Intro

I'm working on this bug to add (quickly) generation capabilities for Apache Camel. There will be a tutorial on it at EclipseCon 2008, that's why it's being done quickly :) As I go along, I'm taking some development notes for reproduction here.

Initialization

EID extracts all the models from the org.eclipse.stp.eid/componentModel directory and puts them into a .cimero2 directory in your home.

Next, each component in the .cimero2 is opened, scanned, and there is an attempt to detect the ESB to which that component belongs to see if it is the same as the one that has been chosen at startup time.

If a component is offered by the chosen ESB, a component model gets created in memory including the name for the component, what ESB it belongs to, the icon for it and the component type. Then it's added to the list of component models, which gets reflected on the palette (see org.eclipse.stp.eid.Parser).

Because of the way this is done, you can add your very own component model definitions in this directory, and they will be available on the palette when the canvas starts up.

Comments:

  • The startup could be streamlined - unloading all of the component models to a directory and then going back again to the directory and rummaging through all of the files that are there is heavy. It would be better to load the component models directly from the plugin jar and only then look in the .cimero2 directory. With a planned structure in there, it would be possible to load all of the appropriate component models, without having to open all the XML files and parse them.
  • What is really needed here is the concept of a supported components repository - the palette should ask for all of the component models that are available from the current ESB - that sounds like an extension point.

Back to the top