Search code examples
eclipse-plugineclipse-rcp

Passing data from wizard page to wizard in eclipse Swt


I have a check box on my wizard page.On selection of a checkbox i need to send the selection value to wizard.

Please suggest me best approach to do the same.


Solution

  • In your wizard page you can call

    IWizard wizard = getWizard();
    

    The wizard value you get will be your wizard class (say it is called MyWizard), so you call do:

    if (wizard instanceof MyWizard) {
       MyWizard myWizard = (MyWizard)wizard;
    
       myWizard.setXXXX(value);
    }
    

    where setXXXX is some method you write in the wizard to accept the selection value.