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 30280

Summary: No selected node after opening a file
Product: platform Reporter: Tomas Pavek <tpavek>
Component: Window SystemAssignee: Peter Zavadsky <pzavadsky>
Status: VERIFIED FIXED    
Severity: blocker CC: mmirilovic, mslama
Priority: P3 Keywords: A11Y, FOCUS, T9Y
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Tomas Pavek 2003-01-22 17:08:34 UTC
[build dev 20030122]
After opening a file in editor, focus is
transferred to editor (you can write), but it
looks like the editor TopComponent is not
activated - invoked context menu (Shift+F10) has
many disabled items, there's nothing in the
properties window etc. The same happens if opening
e.g. a picture (.gif file).
Comment 1 Marian Mirilovic 2003-01-23 10:57:32 UTC
reproducible in [nb_dev](20030123), [jdk1.4.2](b14)

Steps to reproduce:
- run IDE
- close welcome screen
- doublick on some node in the Explorer
-> file is opened in Source Editor window, has focus, but in the
Properties window is present label "No properties" and after
invocation popup menu (Shift+F10) items are disabled
Comment 2 Peter Zavadsky 2003-01-29 16:13:50 UTC
It is about selected component in container. It is not set, in that
case. I don't understand the code in
DefaultContainerImpl.addTopComponent. There is code that selects the
newly added component only in case it is already contained in
container, what sounds to me as a nonsense.

Another reason to redesign also this part of winsys..
Comment 3 Peter Zavadsky 2003-01-29 16:48:54 UTC
Fixed in [trunk]

core/../windows/ModeImpl.java 1.172

Note: Problem was the newly added component (which should become also
selected one) to mode is really set as selected just when attaching to
container. But activated nodes are fired when activating the frame.
The order of these two things was wrong. (I hope I din't break another
obscure thing by this).

Anyway, all that above says, the winsys hadles such a things like
selection in a too complicated and error-prone manner. All that has to
be redesigned, so similar problems are avoided.
Comment 4 Marian Mirilovic 2003-01-30 09:22:14 UTC
verified in [nb_dev](20030130)