Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Why is ObservableListTreeContentProvider not meant to be subclassed?
Why is ObservableListTreeContentProvider not meant to be subclassed? [message #1754852] Thu, 23 February 2017 08:22 Go to next message
Jens Rabe is currently offline Jens RabeFriend
Messages: 81
Registered: September 2013
I have a tree structure that is entirely based on observable lists and I want to show this in a CNF-based view. The catch here is that the content provider is defined via an extension point and thus has to have a public no-arg constructor. The ObservableListTreeContentProvider however takes an IObservableFactory and a TreeStructureAdvisor.

My go-to solution would be to simply subclass the ObservableListTreeContentProvider, with the default constructor initializing it as I want it to be. This works, but the comment says that the class is not to be subclassed by clients.

Is there a better solution to this?
Re: Why is ObservableListTreeContentProvider not meant to be subclassed? [message #1754903 is a reply to message #1754852] Thu, 23 February 2017 18:42 Go to previous message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 876
Registered: January 2012
Senior Member

I'm not sure why ObservableListTreeContentProvider is not intended to be subclassed. But you can instead provide a class on your extension that implements IExecutableExtensionFactory. The Extension Registry will create an instance of your factory class and ask it for the object to be used instead. Implementing the IExecutableExtension interface can be useful should you desire information about the actual reference in the plugin.xml.


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Previous Topic:Databinding to mutable property stops in SimplePropertyObserverValue
Next Topic:How do I update a column label provider when using ObservableValueEditingSupport? [SOLVED]
Goto Forum:

Current Time: Sun Sep 27 20:52:46 GMT 2020

Powered by FUDForum. Page generated in 0.02206 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top