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.
A long standing problem with the post 3.6 Window System is that people are confused when they use PERSISTENCE_NEVER on a TopComponent which was created with a Mode and docking information by a wizard, but on restart or after first close, always opens in the editor area. I'm attaching a small patch which solves this problem very simply using NbPreferences, and will have no effect on existing components. It adds one annotation - org.openide.windows.RetainLocation("defaultModeName"). A component with this annotation does not need to have any XML or SFS registration. A TopComponent annotated with this annotation will look up its last known Mode name in open(), from NbPreferences, and use the default specified in the annotation if none is found. A trivial patch to core.windows persistence causes temporary modes (but not their contents unless they contain other non-PERSISTENCE_NEVER TopComponents) created by drag-and-drop to be persisted if they contain a component with such an annotation.
Ugh, the hg diff crashed, and I attached a 0 byte diff, then reverted it. Will write it again tomorrow...
Created attachment 93303 [details] Patch adding org.openide.windows.RetainLocation annotation Patch implementing this feature - diff is quite small
Created attachment 93304 [details] Patch adding org.openide.windows.RetainLocation annotation (including apichanges & spec version update)
No objections, implementing. Fixed in main/ 45a604c9bb43
Integrated into 'main-golden', will be available in build *201001240200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/45a604c9bb43 User: Tim Boudreau <tboudreau@netbeans.org> Log: #179526 - allow persistence type PERSISTENCE_NEVER TopComponents to retain their location across restarts