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.