user647582
user647582

Reputation: 13

Is there a way to integrate Properties View within the Eclipse Multipage editor?

I am trying to implement an Eclipse editor which consists of a design part, Palette part and the Properties part for the selected palette item. All in the same editor page.

After a long time of googling, I have come to know that there are no proper articles or examples for this issue. Is there some solution that I could get from anyone here?

The SWT Design editor implements this feature in its editor. However, I am unable to access its source.

Upvotes: 1

Views: 1263

Answers (1)

Zoltán Ujhelyi
Zoltán Ujhelyi

Reputation: 13858

To access the properties view, you have to have three things:

  • Your editor must define its SelectionProvider (getSite().setSelectionProvider()). A SelectionProvider is either a JFace Viewer, or can be any class that return a corresponding ISelection interface.
  • The objects returned by the ISelection must either implement IPropertySource or return an IPropertySource adapter using the getAdapter(IPropertySource.class).
  • In multi-page editors you have to make sure, that the SelectionProvider also returns what expected.

For details about the first two point, see the following Eclipse Corner article: Take control of your properties, or if you would like to use the Tabbed properties view seen in GMF editors, The Eclipse Tabbed Properties View.

Upvotes: 1

Related Questions