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.
Summary: | Editor cursor disappears when CLI activated | ||
---|---|---|---|
Product: | platform | Reporter: | pzajac <pzajac> |
Component: | Execution | Assignee: | Jaroslav Tulach <jtulach> |
Status: | CLOSED FIXED | ||
Severity: | blocker | Keywords: | FOCUS |
Priority: | P4 | ||
Version: | 4.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
pzajac
2004-09-15 13:25:34 UTC
Accepted. Possible solution: Once the JEditorPane is obtained, find its nearest (containment hierarchy) parent TopComponent and activate it by calling TopComponent.requestActive(). The described code should be put into file utilities/src/org/netbeans/modules/openfile/DefaultOpenFileImpl.java, below statement "if (panes != null)" (currently at line 219). I cannot reproduce this bug. My configuration: NetBeans custom build 040920 Fedora Core Linux running on Intel Sun JDK 1.4/1.5: (tested on both) J2SDK 1.4.2_05 J2SDK 1.5.0-rc 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 Kde desktop jdk : 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) Confirmed. To reproduce: 1) shutdown NetBeans 2) open console and start NetBeans with parameter -open myfile.txt (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 done Processing log script arguments... Mailing the commit message to cvs@core.netbeans.org (from jtulach@netbeans.org) ~/work/core$ cvs ci -m "#49076: Not calling mainFrame.requestFocus to prevent the focus to be stolen from the editor" v |