This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 36157 - Property sheet settings not persisted
Summary: Property sheet settings not persisted
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: _ tboudreau
URL:
Keywords:
: 37330 38017 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-09-17 10:48 UTC by Lukas Hasik
Modified: 2008-12-22 17:14 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Ask and thou shalt receive...a trivial implementation of Preferences over SFS :-) (7.37 KB, application/octet-stream)
2003-12-14 22:58 UTC, _ tboudreau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Hasik 2003-09-17 10:48:53 UTC
dev 200309170100, jdk1.4.2

any setting in Property sheet - like Sort by
category, sort by name, Show description area - is
remembered for IDE not for userdir.

-Change sorting type 
-close ide
-restart with new userdir
Comment 1 _ tboudreau 2003-09-17 17:46:23 UTC
There was a long debate about where to store this info - currently
it uses the Preferences API per Jesse's suggestion;  openide cannot
depend on Registry, so that's out, we don't want to depend on 
SystemOptions because they're going away...so where to put this info?
I could just write my own file in the userdir (and have Jarda growl
at me...).  Maybe that's not such a bad idea...
Comment 2 Jesse Glick 2003-10-18 17:54:32 UTC
Now the settings are not persisted at all, which IMHO is much worse
than choosing a less than perfect method of persistence.
Comment 3 _ tboudreau 2003-10-22 10:16:18 UTC
Per Trung's requets, I simply turned off the use of Preferences.  Once
Jarda finishes his separation work, I'm told it will be okay to use
Registry, so I'm just waiting for that.
Comment 4 _ tboudreau 2003-11-19 16:12:51 UTC
*** Issue 37330 has been marked as a duplicate of this issue. ***
Comment 5 _ ttran 2003-12-09 12:53:23 UTC
we can't wait for Registry.  An alternative solution needs to be found
for Promo B.

-> P2
Comment 6 _ tboudreau 2003-12-11 17:17:04 UTC
*** Issue 38017 has been marked as a duplicate of this issue. ***
Comment 7 _ tboudreau 2003-12-14 22:58:47 UTC
Created attachment 12569 [details]
Ask and thou shalt receive...a trivial implementation of Preferences over SFS :-)
Comment 8 _ tboudreau 2003-12-15 11:42:03 UTC
Adding Jarda to cc per his request...
Comment 9 Jaroslav Tulach 2003-12-15 12:02:33 UTC
Adding Radek to cc per his request...
Comment 10 _ tboudreau 2004-01-13 22:20:40 UTC
Okay, I have patches on my laptop in the office, almost ready to
commit.  Let me run by you what it will be one more time, just to
confirm that this is okay by everyone:

New non-API abstract public class:
org.netbeans.openide.explorer.propertysheet.PsSettings

[Jarda, couldn't we make these package names shorter by omitting
"openide"?  I don't think it adds anything - it's not
org.netbeans.api/spi, so by definition it is not public whether it
says "openide" or not].


New non-API impl class:
org.netbeans.core.PsSettingsImpl

Add to core XML layer an entry for PsSettingsImpl as an impl of
PsSettings.

Any objections?
Comment 11 Jaroslav Tulach 2004-01-14 08:00:48 UTC
There already is package org/netbeans/modules/openide/explorer.

Comment 12 _ tboudreau 2004-01-14 15:23:30 UTC
Well, the patches *should* work...but I'm having a very strange problem.  With a clean 
build using the new settings stuff, I get a NoClassDefFoundError on line 89 of 
SheetTable.java.  It is trying to load a class in the same package as itself - this should 
be no problem.  Is there some way that using these packages could have affected 
what classloader is used?

Jarda, maybe you could take a look at this.  I added logging to print out the 
classloader before the exception occurs:

     [exec] CLASSLOADER: org.netbeans.Main$BootClassLoader@30e280
     [exec] *********** Exception occurred ************ at Wed Jan 14 16:19:58 CET 
2004
     [exec] java.lang.NoClassDefFoundError
     [exec]     at org.openide.explorer.propertysheet.SheetTable.<init>(SheetTable.java:
91)
     [exec]     at 
org.openide.explorer.propertysheet.PropertySheet.<init>(PropertySheet.java:578)
     [exec]     at org.netbeans.core.NbSheet.<init>(NbSheet.java:114)
     [exec]     at org.netbeans.core.NbSheet.getDefault(NbSheet.java:186)
     [exec]     at org.netbeans.core.NbSheet.findDefault(NbSheet.java:175)
     [exec]     at 
org.netbeans.core.actions.GlobalPropertiesAction.performAction(GlobalPropertiesActi
on.java:31)

Comment 13 _ tboudreau 2004-01-14 16:51:33 UTC
Hm, the NCDFE was actually an NPE wrapped by an ExceptionInInitializerError.

Fixed in trunk.

cvs commit openide/src/org/openide/explorer/propertysheet/PropUtils.java openide/
explorer/src/org/netbeans/modules/openide/explorer/PsSettings.java core/src/org/
netbeans/core/resources/mf-layer.xml core/src/org/netbeans/core/
PsSettingsImpl.java core/build.xml 
Checking in openide/src/org/openide/explorer/propertysheet/PropUtils.java;
/cvs/openide/src/org/openide/explorer/propertysheet/PropUtils.java,v  <--  
PropUtils.java
new revision: 1.23; previous revision: 1.22
done
Processing log script arguments...
More commits to come...
RCS file: /cvs/openide/explorer/src/org/netbeans/modules/openide/explorer/
PsSettings.java,v
done
Checking in openide/explorer/src/org/netbeans/modules/openide/explorer/
PsSettings.java;
/cvs/openide/explorer/src/org/netbeans/modules/openide/explorer/
PsSettings.java,v  <--  PsSettings.java
initial revision: 1.1
done
Processing log script arguments...
More commits to come...
Checking in core/src/org/netbeans/core/resources/mf-layer.xml;
/cvs/core/src/org/netbeans/core/resources/mf-layer.xml,v  <--  mf-layer.xml
new revision: 1.127; previous revision: 1.126
done
Processing log script arguments...
More commits to come...
RCS file: /cvs/core/src/org/netbeans/core/PsSettingsImpl.java,v
done
Checking in core/src/org/netbeans/core/PsSettingsImpl.java;
/cvs/core/src/org/netbeans/core/PsSettingsImpl.java,v  <--  PsSettingsImpl.java
initial revision: 1.1
done
Processing log script arguments...
More commits to come...
Checking in core/build.xml;
/cvs/core/build.xml,v  <--  build.xml
new revision: 1.75; previous revision: 1.74
done
Processing log script arguments...
Mailing the commit message to cvs@core.netbeans.org, cvs@openide.netbeans.org 
(from tboudreau@netbeans.org)
d-eprg05-75-209:/space/nb_all tim$ 
Comment 14 Lukas Hasik 2004-01-21 14:06:17 UTC
verified 200401201900