6.1 PERSISTENCE_NEVER not respected ?

View: New views
5 Messages — Rating Filter:   Alert me  

6.1 PERSISTENCE_NEVER not respected ?

by bruehlicke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

just wanted to see if other see the same.

I have a couple of TopComponents all using

    @Override
    public int getPersistenceType() {
        return TopComponent.PERSISTENCE_NEVER;
    }



But, after I have upgraded to Nb 6.1 very often the application starts up with some empty leftovers of TopComponents. That did not happen in 6.0 and I have not changed any of that code.

B-)

Re: 6.1 PERSISTENCE_NEVER not respected ?

by KM :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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();
  }
}


Re: 6.1 PERSISTENCE_NEVER not respected ?

by bruehlicke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Does anybody else have a similar problem ?  I will later today file this as an issue for NB 6.1

B-)

On Thu, May 8, 2008 at 8:54 AM, KM <kevin@...> wrote:

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();
 }
}


--
View this message in context: http://www.nabble.com/6.1-PERSISTENCE_NEVER-not-respected---tp16990068p17125535.html
Sent from the Netbeans - Open API mailing list archive at Nabble.com.



Re: 6.1 PERSISTENCE_NEVER not respected ?

by Dr.-Ing. Martin Göttlicher :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, I have the same problem. Please post your bug id. I will vote for it.

Best regards,
Martin Goettlicher

> Does anybody else have a similar problem ?  I will later today file this as
> an issue for NB 6.1
>
> B-)
>
> On Thu, May 8, 2008 at 8:54 AM, KM <kevin@...> wrote:
> > 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();
> >  }
> > }
> >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/6.1-PERSISTENCE_NEVER-not-respected---tp16990068p17
> >125535.html Sent from the Netbeans - Open API mailing list archive at
> > Nabble.com.

Re: 6.1 PERSISTENCE_NEVER not respected ?

by bruehlicke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://qa.netbeans.org/issues/show_bug.cgi?id=134744


On Thu, May 8, 2008 at 12:13 PM, Dr.-Ing. Martin Göttlicher <Martin.Goettlicher@...> wrote:
Yes, I have the same problem. Please post your bug id. I will vote for it.

Best regards,
Martin Goettlicher

> Does anybody else have a similar problem ?  I will later today file this as
> an issue for NB 6.1
>
> B-)
>
> On Thu, May 8, 2008 at 8:54 AM, KM <kevin@...> wrote:
> > 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();
> >  }
> > }
> >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/6.1-PERSISTENCE_NEVER-not-respected---tp16990068p17
> >125535.html Sent from the Netbeans - Open API mailing list archive at
> > Nabble.com.