[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.dtp] Re: Reusing the server explorer in a ContainerCheckedTreeViewer
|
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
"Philippe Girard" <philippe.girard@xxxxxxxxx> wrote in message
news:4f046d24f139b292d0173b3516a470f5$1@xxxxxxxxxxxxxxxxxx
> Hi,
>
> I am interested in becoming a contributor to the Datatools project. I'm a
> DBA and I am very much impressed with what has been done so far and I want
> to add features to the project.
>
> One of these feature is a project nature for database. Instead of having
> to create a generic project this would be a dedicated project nature for
> databases.
>
> I am currently developping the New Project wizard and on one of the wizard
> page I would like to display the SQL Model from the selected connection
> profile (I reused the ProfileSelectionComposite for selecting the
> connection) in a ContainerCheckedTreeViewer so that the user could select
> the database objects to export as DDL statement.
>
> Of course to fill the ContainerCheckedTreeViewer I need a ContentProvider
> and a LabelProvider and I have been trying to reuse the existing
> SQLModelContentProviderExtension and SQLModelLabelProviderExtension. But I
> have not met much success so far. I get the first level built and then
> thrown an exception.
>
> It looks like the existing classes are too tied to a CommonViewer class to
> be reused in a ContainerCheckedTreeViewer, but I might be mistaken and
> simply overlooking something.
> Anybody know if reusing any of the existing Content and Label provider
> could be reused in such a fashion ?
> Should I develop my own Content and Label provider to fill a
> ContainerCheckedTreeViewer (and then worry about having to support varying
> ContentExtensions...) ?
>
> Any pointer would be much appreciated...
>
> BTW the source code is hosted at sourceforge.net under the dtp-dbproject.
>
>