Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/396.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Netbeans向导,方法存储设置运行两次_Java_Netbeans_Netbeans 7_Netbeans Platform_Netbeans Plugins - Fatal编程技术网

Java Netbeans向导,方法存储设置运行两次

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

我为Netbeans IDE开发插件,使用向导只需一步。(只需第一个面板上的“完成”按钮,无需其他面板)


当我运行时,我看到方法
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);

    }

}