Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Invoking WIzardNewFileCreator
Invoking WIzardNewFileCreator [message #10588] Fri, 29 May 2009 23:23 Go to next message
Eclipse UserFriend
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 13:14 Go to previous message
Boris Bokowski is currently offline Boris BokowskiFriend
Messages: 272
Registered: July 2009
Senior Member
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
>
Previous Topic:int / float values in a table
Next Topic:What are the alternative solutions for DecorationOverlayIcon when using org.ecli
Goto Forum:
  


Current Time: Fri Apr 19 07:04:37 GMT 2024

Powered by FUDForum. Page generated in 0.02035 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top