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.
When I first bring up my branded application, sometimes the TopComponents appear in its new workspace and sometimes they don't. I will attach a minimal test case to demonstrate the problem. It removes the Editing and Running workspaces and adds a Modeling workspace with a TopComponent. When you first bring it up with no user directory, sometimes the TopComponent is opened; sometimes it's not. Seemingly random things (JDK, Netbeans version, amount of work done at module initialization time, changing the base directory name) alter the result. Results are repeatable for any given configuration, so for example, it may work when the base directory has one name but not if you append a character to it. I am baffled as to how that can possibly make any difference whatsoever, but it has been demonstrated on more than one machine and with both NetBeans 3.3.2 and 3.4. In stepping through Netbeans 3.3.2 code, I see that when it's going to fail, WindowManagerData.readProperties() sets wmc to the Editing WindowManagerConfig but when it's working, it's correctly found the Modeling workspace. WindowmanagerData.InstanceCookieImpl private boolean readProperties () throws IOException { ... wmc = null; try { wmc = propertyHandler.readData(); System.err.println("WindowManagerData.readPropert ies() setting wmc to: " + wmc.activeWorkspace); This prints correctly as "Modeling" for runs that work and "Editing" for ones that don't. The Modeling tab does appear, so the workspace can be found, but apparently not at the right time. May be related to http://www.netbeans.org/issues/show_bug.cgi?id=23 609 See also http://openide.netbeans.org/servlets/ReadMsg?msgI d=379427&listName=dev
Created attachment 7434 [details] zip file with test case
Created attachment 7435 [details] instructions for building and running the testcase
Yes I checked and it is as I said: Incorrect order of layers (issue #23609). Thank you for test case. It is already fixed in main trunk. The only workaround for NB 3.4 or NB 3.3 I know is to modify file WindowManager.wswmgr in core.jar. (Put there the same content as you have in your module.) Sometimes configuration is read from core.jar instead of from your module. Of course list of available workspaces displayed in workspace switcher is correct but WindowManager tries to set incorrect "Editing" workspace in such case. *** This issue has been marked as a duplicate of 23609 ***
Umm, I did not follow the background to this and I do not know much about window system XML files etc. But issue #23609 is supposed to be fixed in NB 3.4. So if this is reproducible in 3.4, then something else is going on.
Hmm my stupid mistake I did not check manifest! You must define dependency on core module in manifest (in case you want overwrite WindowManager.wswmgr). Thanks Jesse for his note.
Sorry for the delay, but I finally got back to this. To summarize, I needed to add the following line to the myapp manifest (not myapp_core): OpenIDE-Module-Module-Dependencies: org.netbeans.core/1 and then the problem appears to be fixed for Netbeans 3.4. I didn't follow all of #23609, but that fix appears to be needed because adding this module dependency doesn't appear to fix the problem in Netbeans 3.3.2. thanks
verified, closed - it's duplicate.