Java Netbeans向导,方法存储设置运行两次
我为Netbeans IDE开发插件,使用向导只需一步。(只需第一个面板上的“完成”按钮,无需其他面板)Java Netbeans向导,方法存储设置运行两次,java,netbeans,netbeans-7,netbeans-platform,netbeans-plugins,Java,Netbeans,Netbeans 7,Netbeans Platform,Netbeans Plugins,我为Netbeans IDE开发插件,使用向导只需一步。(只需第一个面板上的“完成”按钮,无需其他面板) 当我运行时,我看到方法storeSetting被调用了两次。如何防止此方法运行两次?Solwed,下面是只执行一次的代码: @Override public void storeSettings(WizardDescriptor wiz) { if (wiz.getProperty("isSaved") == null) { // here operations t
当我运行时,我看到方法
storeSetting
被调用了两次。如何防止此方法运行两次?Solwed,下面是只执行一次的代码:
@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);
}
}