Steps to reproduction:
1) open a java file by CLI -open:
./netbeans -open Java.java
The file got fucus.
2) open the same java (from other console) by CLI
The file hasn't got focus.
Once the JEditorPane is obtained, find its nearest (containment
hierarchy) parent TopComponent and activate it by calling
The described code should be put into file
below statement "if (panes != null)" (currently at line 219).
I cannot reproduce this bug.
NetBeans custom build 040920
Fedora Core Linux running on Intel
Sun JDK 1.4/1.5: (tested on both)
If you still can reproduce this bug, feel free to reopen it but do not
forget to accurately specify your platform, OS, Java version and
NetBeans build number.
the file doesn't get focus when is active in editor
Please specify your platform, OS, Java version and NetBeans build number.
RedHat Linux 9
ava version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)
1) shutdown NetBeans
2) open console and start NetBeans with parameter
(the file gets open in editor, the editor window gets activated
and cursor starts blinking at the first line of the file)
3) repeat step 2) in another console
The file remains open in editor, the editor is still activated (i.e.
its tab highlighted) but the cursor vanishes and the user cannot work
with the file until they do one of the following:
- click in the editor window so that the cursor appears
- activate another window and then activate the editor window again
Actually the bug is that the already opened (and focused) file
_looses_ focus. But this is not caused by the Utilities code at all.
The IDE looses focus as soon as the user invokes
./netbeans <whatever arguments>
Even if I disabled the CLI handler of the Utilities module, I still
encountered the same behaviour.
I am moving this issue to "core".
I know where the problem is - in CLIOptions*.java
/cvs/core/src/org/netbeans/core/CLIOptions2.java,v <-- CLIOptions2.java
new revision: 1.4; previous revision: 1.3
Processing log script arguments...
Mailing the commit message to email@example.com (from
~/work/core$ cvs ci -m "#49076: Not calling mainFrame.requestFocus to
prevent the focus to be stolen from the editor"