Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pde-dev] how to make a wizard commit suicide?

I'm doing a New Wizard (extension point="org.eclipse.ui.newWizards"),
extending another wizard. My wizard can't properly init itself unless
the user has a project (or some element under a project) selected
(e.g. in a navigator). Under such conditions, I'd like my wizard.init
be able to show an error dialog to the user (informing them what to
do), and then have my wizard (and all its pages) just go away ... as
if it pressed its own Cancel button.

Showing the dialog is easy, but after I hit OK on the error dlog,

* the first page of the wizard comes up, or

* I get an NPE (e.g. if I try to close() the first page)

How can one kill a wizard from its own init(...), so that none of
its pages show?

Back to the top