« Return to Thread: 6.1 PERSISTENCE_NEVER not respected ?

Re: 6.1 PERSISTENCE_NEVER not respected ?

by KM :: Rate this Message:

Reply to Author | View in Thread

Having encountered the same problem I implemented a temporary fix that might work for others as well.  I added an installer file to the module responsible for the problem topcomponents, and in the restored method explicitly deleted any saved settings files for these components, e.g.

public class Installer extends ModuleInstall {
  @Override
  public void restored() {
    String nbu = System.getProperties().getProperty("netbeans.user");
    if (nbu == null) return;
    String fs = System.getProperties().getProperty("file.separator");
    File settingsFile = new File(nbu + fs + "config" + fs + "Windows2Local" + fs + "Components" + fs
                                     + "<problem top component>.settings");
    if (settingsFile.exists())  settingsFile.delete();
  }
}

 « Return to Thread: 6.1 PERSISTENCE_NEVER not respected ?

LightInTheBox - Buy quality products at wholesale price