Kristina
Kristina

Reputation: 41

Eclipse Properties View without IAdaptable

I tried to create a properties view for a graph model in an Eclipse RCP Application. The graph elements are from a non-eclipse library and so don't implement IAdaptable or even IPropertySource.

The Tabbed Properties View, explained here: http://www.eclipse.org/articles/Article-Tabbed-Properties/tabbed_properties_view.html seems to be a simple possibility - but only for inputs that implement IAdaptable.

I've thought about implementing my own IPropertySheetPage but the only implementations I found are the built-in PropertySheetPage and TabbedPropertySheetPage which are very complex.

Is there another way to create a properties view for input elements that don't implement IAdaptable? Can I use Tabbed Properties View in a way I don't see yet? Are there any other less complex implementations of IPropertySheetPage, I can look at?

Thank you!

Kristina

Upvotes: 2

Views: 740

Answers (2)

Alexey Romanov
Alexey Romanov

Reputation: 170745

Actually, you can write an IAdapterFactory for objects which don't implement IAdaptable and register it in plugin.xml or in your plugin activator. See http://www.eclipsezone.com/eclipse/forums/t61666.html.

Upvotes: 2

Tom Seidel
Tom Seidel

Reputation: 9535

Are there any other less complex implementations of IPropertySheetPage, I can look at?

Short answer: No.

But why don't you wrap the non-adaptable object into your own object that implements IAdaptable or IPropertySource or whatever, so that the property-page can work with your wrapper which holds the object you want to make editable through the property-page. And instead of providing this "library" object to global adapter-mechanism, create the wrapper, set the object and provide it to your global selection-service or whatever.

Upvotes: 1

Related Questions