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 11149 - [MDI] Click on property sheet, and Explorer gets focus
Summary: [MDI] Click on property sheet, and Explorer gets focus
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 3.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: _ ttran
URL:
Keywords:
: 15107 20314 21238 (view as bug list)
Depends on: 18010
Blocks: 21082
  Show dependency tree
 
Reported: 2001-04-06 16:08 UTC by Jesse Glick
Modified: 2008-12-22 15:46 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
added support for EmptyPanel (568 bytes, patch)
2001-12-02 17:15 UTC, David Simonek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2001-04-06 16:08:48 UTC
[release32 apr 6] This is fairly annoying. I am in MDI mode, using the Editor.
Explorer is showing something unrelated. Say I wish to see the compiler type for
the current file. I Page Up to top of file, so selected node is JavaNode, and
property sheet correctly shows the Properties and Execution tabs for this file.
Now I go to click on e.g. the Execution tab--and this works, but immediately
afterwards the property sheet switches to show properties of whatever is
selected in the Explorer! The only way to get the properties for the file is to
look it up in the Explorer and select it there.

This does not happen in SDI mode--clicking on the Prop Sheet focusses that
window, which has no node selection, so no problem. In MDI, apparently, when
Prop Sheet is docked into Explorer - South, clicking on it gives focus to the
whole Explorer + Prop Sheet pane, which incorrectly changes the node selection
to whatever exists in the Explorer.
Comment 1 Jan Chalupa 2001-05-05 20:27:03 UTC
Target milestone -> 3.3
Comment 2 Jesse Glick 2001-09-03 17:30:06 UTC
Still true in current dev builds.
Comment 3 Jan Zajicek 2001-09-07 12:26:37 UTC
*** Issue 15107 has been marked as a duplicate of this issue. ***
Comment 4 David Simonek 2001-10-03 15:39:02 UTC
updating subcomponent to window system
Comment 5 Jiri Rechtacek 2001-10-10 11:12:54 UTC
Observation:
1. Undock Properties window from Explorer -> works correct
2. then dock Properties again to Explorer -> works correct
Comment 6 Jiri Rechtacek 2001-11-13 09:54:50 UTC
[Nov 13 dev] The synchronaztion Explorer panel and docked properties
(the root of this issue) is valid until the properties undocked then
it docked back.
Comment 7 David Simonek 2001-11-23 08:52:33 UTC
solving issue 18010 will help this one, although I think it will not
fix it completely. 
Comment 8 Jan Chalupa 2001-11-27 11:49:00 UTC
Target milestone -> 3.3.1.
Comment 9 Jan Chalupa 2001-11-27 11:52:25 UTC
Target milestone -> 3.3.1.
Comment 10 David Simonek 2001-11-30 14:19:00 UTC
We discovered together with David Strupl that problem is wider, not
only with property sheet, but with all top components which are
"empty", means that they don't contain any specific buttons, text
areas and so on.
Roo problem is that these "empty" top components seems to not accept
focus and don't receive focus_gained events. Will investigate it
further...
Comment 11 David Simonek 2001-12-02 17:13:10 UTC
After all, it seems that this issue can be fixed only in property
sheet itself. Winsys rely on focus event messages when activating
components in splitted frame type.
So property sheet should react to mouse click and request focus for
itself to be properly activated.All other components like editor,
explorer do this (call requestFocus when mouse click arrives).

I'm attaching patch which adds functionality for empty panel (used
when no properties are shown). Please add the same support for panel
which shows properties.
Comment 12 David Simonek 2001-12-02 17:15:42 UTC
Created attachment 3654 [details]
added support for EmptyPanel
Comment 13 David Strupl 2001-12-11 16:35:16 UTC
Attaching thread dump from where the nodes get changed:

at java.lang.Thread.dumpStack(Thread.java:1069)
atorg.openide.explorer.propertysheet.PropertySheet.setNodes(PropertySheet.java:248)
atorg.netbeans.core.NbNodeOperation$Sheet.setNodesWithoutReattaching(NbNodeOperation.java:401)
atorg.netbeans.core.NbNodeOperation$Sheet.setNodes(NbNodeOperation.java:392)
atorg.netbeans.core.NbNodeOperation$Sheet$Listener.activate(NbNodeOperation.java:557)
atorg.netbeans.core.NbNodeOperation$Sheet$Listener.propertyChange(NbNodeOperation.java:542)
atorg.openide.util.WeakListener$PropertyChange.propertyChange(WeakListener.java:325)
atjava.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:255)
atorg.netbeans.core.windows.RegistryImpl.tryFireChanges(RegistryImpl.java:314)
atorg.netbeans.core.windows.RegistryImpl.selectedNodesChanged(RegistryImpl.java:270)
atorg.netbeans.core.windows.frames.DefaultContainerImpl.doActivateComponent(DefaultContainerImpl.java:561)
atorg.netbeans.core.windows.frames.DefaultContainerImpl.reactivateSelectedComponent(DefaultContainerImpl.java:726)
atorg.netbeans.core.windows.frames.DefaultContainerImpl$2.run(DefaultContainerImpl.java:885)
atorg.netbeans.core.windows.frames.DefaultContainerImpl$4.run(DefaultContainerImpl.java:900)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:181)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:446)
atjava.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:193)
atjava.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:147)
atjava.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:141)
atjava.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:133)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:101)

Comment 14 Jan Zajicek 2002-02-08 13:45:22 UTC
*** Issue 20314 has been marked as a duplicate of this issue. ***
Comment 15 David Simonek 2002-02-08 14:19:33 UTC
Raising, this is annoying.
Comment 16 Jiri Rechtacek 2002-03-11 17:38:00 UTC
*** Issue 21238 has been marked as a duplicate of this issue. ***
Comment 17 _ ttran 2002-04-06 21:22:07 UTC
please also see

  User: ttran   
  Date: 02/04/05 04:50:37

  Modified:    src/org/openide/explorer/view ListView.java TreeView.java
  Log:
  #20887: right-click on Node in Explorer tree doesn't show popup menu.
  #12520: TopComponent.getActivatedNodes() returns wrong nodes for context
          menu actions.  The old fix for #12520 caused #20887.
  
  See comments in TreeView.java for details.
  
  Revision  Changes    Path
  1.51      +3 -1      openide/src/org/openide/explorer/view/ListView.java
  
 
http://openide.netbeans.org/source/browse/openide/src/org/openide/explorer/view/ListView.java.diff?r1=1.50&r2=1.51
  
 
  1.83      +57 -34    openide/src/org/openide/explorer/view/TreeView.java
  
 
http://openide.netbeans.org/source/browse/openide/src/org/openide/explorer/view/TreeView.java.diff?r1=1.82&r2=1.83
Comment 18 _ ttran 2002-04-06 21:30:12 UTC
I don't think Dafe's suggested solution is the good one, mostly
because the problem is not limited to global property sheet.  It can
be any TopComponent which falls into a similar situation as our global
prop sheet.

There are two other possible solutions (IMO better :-)

- glass pane on top of every TopComponent
- AWTEventListener

I am going to fix this bug using the latter.
Comment 19 _ ttran 2002-04-09 11:34:47 UTC
fixed in cvs trunk for NB 3.4

  User: ttran   
  Date: 02/04/09 03:33:22

  Modified:    src/org/netbeans/core/windows/frames
SplitContainerImpl.java
  Log:
  #11149: [MDI] Click on property sheet, and Explorer gets focus.  The fix
  is hacky.  See comments in the code for details.
  
  Revision  Changes    Path
  1.44      +73 -13   
core/src/org/netbeans/core/windows/frames/SplitContainerImpl.java
  
 
http://core.netbeans.org/source/browse/core/src/org/netbeans/core/windows/frames/SplitContainerImpl.java.diff?r1=1.43&r2=1.44
Comment 20 Jan Zajicek 2002-04-10 09:35:11 UTC
Seems it is working now.
Comment 21 Quality Engineering 2003-07-01 16:19:30 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.