I get asked many times by developers about how to "make my Eclipse views components" for composite applications. Here is a basic set of "must haves" in order to be considered a "component":
- Plan out your view - make sure its as generic as possible. At least enough to be shown on different screens.
- Make sure your view has the allowMultiple="true" element in the view extension definition.
- If you want to use Expeditor API's:
- Use the PropertyBrokerDefinitions extension point to declare your inputs and ouputs
- Use the Topology API's to access your component data - the data that is stored in the composite application XML for your component
- If you do not want to use Expeditor API's:
- Make sure you use the JFace selection provider pattern so your "selection" can be listened for by others
- Use the Eclipse extension API's to conditionally access your components data. This means, if your component is installed in Expeditor or Notes it may use them otherwise it will just ignore them.
The great thing about all of that is if you are an Eclipse developer you most likely have already done 2 out of the 3 steps for your views. The important thing to consider in all cases is that your component may (in the future) be installed in Expeditor, Notes, or just plain old Eclipse and it is wise to architect it in the most flexible manner. For example, you could create your component to be flexible enough to realize it is installed in a composite application or not. By using the Eclipse API's to access the component data your component doesn't even have to have a binary dependency on Expeditor API's. You can read all about how that is done from the Expeditor help in the InfoCenter