views:

30

answers:

2

I am trying to develop an eclipse plug-in that has an editor. The editor needs to show two instances of another editor (showing two different documents), and a toolbar. The internal editors are coming from another plugin. The toolbar needs to control the two internal editors (e.g., when clicking a button, change the background color of some items in one of the internal editors, assuming the internal editor has the API to change background color of course).

Can this be done? Any hints on how to start?

Many thanks for your advice.

+1  A: 

You can try and see if a MultiPageEditorPart could be helpful in your case.

/**
 * A multi-page editor is an editor with multiple pages, each of which may
 * contain an editor or an arbitrary SWT control.
 */
VonC
+1  A: 

I would have the logic of the editors as SWT Composites. Then the Editor is just a wrapper on top of the composites.

This way, you can create a new editor that combines functionality of other editors by combining the composites in different ways.

Extending VonC's answer, then you can have the composites as tabs in the MultiPageEditor, or just combine them anyway you want

Mario Ortegón