Reputation: 13
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
Reputation: 13858
To access the properties view, you have to have three things:
SelectionProvider (getSite().setSelectionProvider())
. A SelectionProvider
is either a JFace Viewer
, or can be any class that return a corresponding ISelection
interface.ISelection
must either implement IPropertySource
or return an IPropertySource
adapter using the getAdapter(IPropertySource.class)
.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