Skip to main content



      Home
Home » Newcomers » Newcomers » Handle wizard's navigation (Next > and < Back buttons)
Handle wizard's navigation (Next > and < Back buttons) [message #213705] Mon, 04 June 2007 14:22 Go to next message
Eclipse UserFriend
Originally posted by: g_boivin_dufault.hotmail.com

Hi,
I wrote a similar post a week ago but couldn't have any answers so I'll
try to make it clearer. Inside a new Plug In project, I've created a
NewWizard extension. The referenced class extends the
org.eclipse.jface.wizard.Wizard abstract class and implements the
org.eclipse.ui.INewWizard interface. My Wizard uses two WizardPage.

When the first page is filled and the user clicks Next, I would like to
make an action (create a new project Resource). At the second page, if the
user clicks Back, I also want to make an action (delete the newly added
project Resource).

Basically, what I want to reproduce is the same functionality as the "New
Java Project" Eclipse wizard. When you enter a project's name in the
"Create a Java Project" wizard's page and click on the next button, the
project's resource is added to the package explorer view and the project's
description files are generated. In the opposite situation, when the
user's at the "Java Settings" wizard's page and clicks on the Back button,
all the previous operations are undone, the project is deleted from the
package explorer view as in the OS file structure.

In other words, how can I know that the next/back button have been
clicked? I know that by extending the Wizard class, I can override the
getNextPage() method but that's not what I'm looking for. I'm searching
for an option more like : next_button.addListener(new
NextButtonListener()), back_button.addListener(new BackButtonListener())...

Thanks in advance,

Guillaume Boivin-Dufault
Re: Handle wizard's navigation (Next > and < Back buttons) [message #213844 is a reply to message #213705] Tue, 05 June 2007 03:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: krzysztofHMMMMdaniel.gmail.com

Hi Guillaume,

AFAIK know putting any actions in places different than performFinish()
in the Wizard is not a good practice, and the WizardDialog is not
prepared for such usage.

But if you really want to do it, please check when the methods
IWizardPage.getPreviousPage() and IWizardPage.getNextPage() are called.
It should be just before the page flips, and just after the
next/previous button is pressed.

HTH,
Chris
Re: Handle wizard's navigation (Next > and < Back buttons) [message #213850 is a reply to message #213705] Tue, 05 June 2007 03:23 Go to previous message
Eclipse UserFriend
Originally posted by: jakub.jurkiewicz.gmail.com

Hi,

You can try to check how it is done in the Eclipse itself. Just look at
the Eclipse's sources in the CVS.

--
Jakub Jurkiewicz
http://eclipser-blog.blogspot.com/

Guillaume Boivin-Dufault wrote::
> Hi, I wrote a similar post a week ago but couldn't have any answers so
> I'll try to make it clearer. Inside a new Plug In project, I've created
> a NewWizard extension. The referenced class extends the
> org.eclipse.jface.wizard.Wizard abstract class and implements the
> org.eclipse.ui.INewWizard interface. My Wizard uses two WizardPage.
> When the first page is filled and the user clicks Next, I would like to
> make an action (create a new project Resource). At the second page, if
> the user clicks Back, I also want to make an action (delete the newly
> added project Resource).
> Basically, what I want to reproduce is the same functionality as the
> "New Java Project" Eclipse wizard. When you enter a project's name in
> the "Create a Java Project" wizard's page and click on the next button,
> the project's resource is added to the package explorer view and the
> project's description files are generated. In the opposite situation,
> when the user's at the "Java Settings" wizard's page and clicks on the
> Back button, all the previous operations are undone, the project is
> deleted from the package explorer view as in the OS file structure.
>
> In other words, how can I know that the next/back button have been
> clicked? I know that by extending the Wizard class, I can override the
> getNextPage() method but that's not what I'm looking for. I'm searching
> for an option more like : next_button.addListener(new
> NextButtonListener()), back_button.addListener(new BackButtonListener())...
>
> Thanks in advance,
>
> Guillaume Boivin-Dufault
>
Previous Topic:update manager has disappeared
Next Topic:how to get eclipse exe folder path
Goto Forum:
  


Current Time: Thu May 08 13:42:28 EDT 2025

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

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

Back to the top