sha
sha

Reputation: 11

How can I put an eclipse editor inside another eclipse editor?

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.

Upvotes: 1

Views: 155

Answers (2)

Mario Ortegón
Mario Ortegón

Reputation: 18900

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

Upvotes: 1

VonC
VonC

Reputation: 1324318

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

Upvotes: 1

Related Questions