0

I develop plugin for Netbeans IDE and I use Wizard with 1 step. (Just finish button on the first panel no other panels).

When I run I saw that the method storeSetting is called twice. How do I prevent running this method two times?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Michał Ziembiński
  • 1,124
  • 2
  • 10
  • 31

1 Answers1

1

Solwed, here is code which will execute just one time:

@Override
public void storeSettings(WizardDescriptor wiz) {

    if (wiz.getProperty("isSaved") == null) {
        // here operations to store data from wizzard


        // now we set property to inform WizardDescriptor is finish 
        wiz.putProperty("isSaved", true);

    }

}
Michał Ziembiński
  • 1,124
  • 2
  • 10
  • 31