Invoking WIzardNewFileCreator [message #10588] |
Fri, 29 May 2009 19:23  |
Eclipse User |
|
|
|
Originally posted by: riwright.adobe.com
I have a PDE-like editor for some work I am doing and I would like to allow
the user to create new resources from within one of the panes of the editor
via a wizard. I can invoke WizardNewFileCreatorPage to do so but while it
works, I can't get it to do the proper validation. This is apparently
because I am not passing in the proper kind of StructuredSelection. I am
creating one thusly:
StructuredSelection selection = new
StructuredSelection(page.getGmsEditor().getProject().getLoca tion());
IWorkbenchWizard wizard = new NewDataSetWizard();
wizard.init(PlatformUI.getWorkbench(), selection);
WizardDialog dialog = new
WizardDialog(PlatformUI.getWorkbench().getDisplay().getActiv eShell(),
wizard);
dialog.open();
This works except that the validation in the WizardNewFileCreationPage
doesn't. I assume this is somehow a result of my artificially created
StructuredSelection. What's the right way to do this?
TIA, Ric
|
|
|
Re: Invoking WIzardNewFileCreator [message #10815 is a reply to message #10588] |
Thu, 04 June 2009 09:14  |
Eclipse User |
|
|
|
Hi Ric,
I am not sure, but I would be surprised if your passing a selection or not
affects the validation. Have you tried putting a breakpoint in
WizardNewFileCreationPage.validatePage to see what it is doing?
Boris
"Ric Wright" <riwright@adobe.com> wrote in message
news:C645BC91.2A529%riwright@adobe.com...
>I have a PDE-like editor for some work I am doing and I would like to allow
> the user to create new resources from within one of the panes of the
> editor
> via a wizard. I can invoke WizardNewFileCreatorPage to do so but while it
> works, I can't get it to do the proper validation. This is apparently
> because I am not passing in the proper kind of StructuredSelection. I am
> creating one thusly:
>
>
> StructuredSelection selection = new
> StructuredSelection(page.getGmsEditor().getProject().getLoca tion());
>
> IWorkbenchWizard wizard = new NewDataSetWizard();
> wizard.init(PlatformUI.getWorkbench(), selection);
>
> WizardDialog dialog = new
> WizardDialog(PlatformUI.getWorkbench().getDisplay().getActiv eShell(),
> wizard);
>
> dialog.open();
>
>
> This works except that the validation in the WizardNewFileCreationPage
> doesn't. I assume this is somehow a result of my artificially created
> StructuredSelection. What's the right way to do this?
>
> TIA, Ric
>
|
|
|
Powered by
FUDForum. Page generated in 0.03626 seconds