| Adding Filters and ContentProviders to WizardNewFileCreationPage [message #322488] |
Mon, 19 November 2007 19:27  |
Eclipse User |
|
|
|
Originally posted by: jdente.21technologies.com
Hi,
I have a wizard in which I use the WizardNewFileCreationPage. By default,
the TreeViewer that displays available projects simply displays all
non-file resources as selectable folders. I would like to constrain the
contents of this TreeViewer so that I can do two things:
- The Project/Folder selection pane should not display certain folders.
For example, remove all .* folders from the TreeViewer in the selection
pane.
- I would like to add file resources to the list of displayed resources,
so that the user can see existing file names and overwrite existing files
if he desires.
After digging through the code, I would need to do two things. First, I
would need to supply my own ContentProvider to the TreeViewer in the
method so that my TreeViewer will display files. Next, I would need to get
a handle on this TreeViewer so that I can give it my own ViewerFilter.
Unfortunately, all of the member variables I need access to are not
accessible through the WizardNewFileCreationPage; no getters exist and all
member variables are either private (ResourceAndContainerGroup and
ContainerSelectionGroup) or package (TreeViewer) accessible.
How can I apply filters and my own content provider to the TreeViewer used
by the WizardNewFileCreationPage? Are there any extension points or
classes I can extend that I can utilize?
Currently, the only solution I see is to extend WizardNewFileCreationPage
and then write a ton of custom code.
Thanks,
Joe
|
|
|
| Re: Adding Filters and ContentProviders to WizardNewFileCreationPage [message #322737 is a reply to message #322488] |
Tue, 27 November 2007 13:59  |
Eclipse User |
|
|
|
Originally posted by: jdente.21technologies.com
Does anyone know the proper mechanism for making a custom
WizardNewFileCreationPage?
I have seen several other posts on the eclipse.platform newsgroup with
regards to extending the WizardNewFileCreationPage class. None of these
other posts contain solutions to the problem, although they all
acknowledge that there is a problem. All of the member variables that
people need to modify are private, beginning with the
ResourceAndContainerGroup inside WizardNewFileCreationPage.
Is the 'private' member variable scope of WizardNewFileCreationPage a bug?
Should this stuff be protected instead of private? Is there another
mechanism for customizing a New File Wizard Page class without rewriting
everything?
Thanks for the help.
-Joe
|
|
|
Powered by
FUDForum. Page generated in 0.09792 seconds