| [news.eclipse.dtp] Re: Reusing the server explorer in a ContainerCheckedTreeViewer |
Brian Fitzpatrick wrote:
Hi Philippe...
That sounds great! We're always on the lookout for more help. :)
Do you have a use case for this type of functionality? (I can see some uses, but I'm curious what you see as the main goal of going this route.)
All of the existing content and label providers that are hosted in the DSE are pretty focused on the Common Navigator Framework. The reason for that was that it was easy to provide additional extensions via separate plug-ins to contribute various levels of the SQL model hierarchy, etc.
That said, you should be able to do this by massaging some of the existing code. If you use the ProfileSelectionDialogPage and build your own ProfileSelectionComposite, you can change the styles that are passed to the CommonViewer when it's created.
The doCreateControl() method (protected void doCreateControl(Composite content, boolean flag, boolean multiSelect)) can be changed to provide your own checkbox styles (SWT.CHECK) and you should be able to add a selection listener to the tree for SWT.CHECK events...
if(event.detail == SWT.CHECK)
If that doesn't work, give me a holler and I'll try and come up with an example. Hope that helps!--Fitz