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 56277 - allow editor window to be fronted when a breakpoint is hit
Summary: allow editor window to be fronted when a breakpoint is hit
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Stanislav Aubrecht
Depends on:
Blocks: 47825
  Show dependency tree
Reported: 2005-03-11 14:22 UTC by Stanislav Aubrecht
Modified: 2008-12-22 17:35 UTC (History)
1 user (show)

See Also:
Exception Reporter:

Proposed fix (3.80 KB, patch)
2005-03-11 14:25 UTC, Stanislav Aubrecht
Details | Diff
Improved patch (5.22 KB, patch)
2005-03-18 11:24 UTC, Stanislav Aubrecht
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stanislav Aubrecht 2005-03-11 14:22:40 UTC
when debugging an application it is desired to bring the editor window to
foreground when a breakpoint is hit. the current interface for this feature
( kind)) offers only to request focus to the
editor window (Line.SHOW_GOTO). this is not enough if the editor window is
obscured by other windows on the desktop or if it is minimized to task bar. the
user does not have any visual feedback that the application hangs on a breakpoint.

i suggest to add another constant to the org.netbeans.openide.text.Line class -
SHOW_TOFRONT. using this constant in the kind) method would mean
the editor window is first restored from iconized state (if necessary), brought
to foreground (java.awt.Window.toFront()) and then focused.

module developers (especially debugger) then can use this parameter to implement
the desired behavior.
Comment 1 Stanislav Aubrecht 2005-03-11 14:25:12 UTC
Created attachment 20786 [details]
Proposed fix
Comment 2 Jaroslav Tulach 2005-03-15 08:56:24 UTC
req: @since is missing in SHOW_TOFRONT
req: Utilities.toFront does not have any documentation
req: please do not forget about apichanges, increment of module version, etc.
adv: should not the contant be SHOW_TO_FRONT as "to front" are two words?
adv: Should not the toFront method be somewhere in window system api? Might be
useful for giving the window system impl control over what the method does and
text package depends on windows package anyway.
Comment 3 Stanislav Aubrecht 2005-03-18 11:24:25 UTC
Created attachment 20948 [details]
Improved patch
Comment 4 Stanislav Aubrecht 2005-03-18 11:27:22 UTC
added a new patch implementing jarda's requirements.
i also moved the fronting implementation to the window system -

i left the constant name intact to make it consistent with existing SHOW_GOTO.
Comment 5 Stanislav Aubrecht 2005-03-22 08:28:28 UTC
fixed - the patch is integrated into the trunk code

Checking in api/doc/changes/apichanges.xml;
/cvs/openide/api/doc/changes/apichanges.xml,v  <--  apichanges.xml
new revision: 1.237; previous revision: 1.236
Checking in src/org/openide/text/;
/cvs/openide/src/org/openide/text/,v  <--
new revision: 1.42; previous revision: 1.41
Checking in src/org/openide/text/;
/cvs/openide/src/org/openide/text/,v  <--
new revision: 1.31; previous revision: 1.30
Checking in src/org/openide/windows/;
/cvs/openide/src/org/openide/windows/,v  <--
new revision: 1.139; previous revision: 1.138
Checking in src/org/openide/windows/;
/cvs/openide/src/org/openide/windows/,v  <--
new revision: 1.49; previous revision: 1.48
Checking in;
/cvs/openide/,v  <--
new revision: 1.169; previous revision: 1.168