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 27394 - TopComponents do not appear
Summary: TopComponents do not appear
Status: CLOSED DUPLICATE of bug 23609
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: mslama
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-17 18:03 UTC by rrochat
Modified: 2008-12-23 09:34 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
zip file with test case (34.70 KB, application/octet-stream)
2002-09-17 19:17 UTC, rrochat
Details
instructions for building and running the testcase (1.32 KB, text/plain)
2002-09-17 19:20 UTC, rrochat
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rrochat 2002-09-17 18:03:15 UTC
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
Comment 1 rrochat 2002-09-17 19:17:55 UTC
Created attachment 7434 [details]
zip file with test case
Comment 2 rrochat 2002-09-17 19:20:22 UTC
Created attachment 7435 [details]
instructions for building and running the testcase
Comment 3 mslama 2002-09-25 18:01:18 UTC
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 ***
Comment 4 Jesse Glick 2002-09-29 15:36:25 UTC
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.
Comment 5 mslama 2002-09-30 09:42:31 UTC
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.
Comment 6 rrochat 2002-10-15 21:21:10 UTC
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 
Comment 7 Marian Mirilovic 2003-07-22 13:38:06 UTC
verified, closed - it's duplicate.