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 28311 - Regressions in KB shortcut handling from TreeView patch
Summary: Regressions in KB shortcut handling from TreeView patch
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 3.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords: A11Y
Depends on:
Blocks: 28244
  Show dependency tree
 
Reported: 2002-10-28 17:28 UTC by Jesse Glick
Modified: 2008-12-22 18:39 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
the new patch (12.05 KB, patch)
2002-10-28 19:44 UTC, _ leonchiver
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2002-10-28 17:28:40 UTC
[dev oct 25] There are a number of problems now in
the Explorer as a result of the recent TreeView
patch, all of which are basically the same bug:
control sequences of various sorts, which are
supposed to be treated as key bindings, are
swallowed and used to search for nodes. This
applies to *a lot* of common bindings, e.g. Ctrl-C
for Copy no longer copies; it displays a search
box with a square "undisplayable character" entry
(I guess it is trying to display "\u0003"). I see:

public void keyPressed(KeyEvent e) {
    char c = e.getKeyChar();
    if (Character.isJavaIdentifierPart(c)||
           (c == File.separatorChar)) {
        // ...

Presumably this needs to check also that there
were no modifier keys pressed! Non-alphanumeric
keystrokes such as S-F10 (popup) continue to work.

I also noticed that after successfully finding a
node, if you do not press Escape first, pressing
Enter expands the tree node rather than running
its default action. E.g. type letters until a Java
source is selected, then press Enter: it is
expanded, showing the parse result. If you press
Escape first, the source is opened in the editor.
I would expect this to happen without pressing
Escape, too.
Comment 1 _ leonchiver 2002-10-28 19:43:31 UTC
I've refactored the search handling code a little bit, added some
functionality and fixed this bug. I'll attach the new patch.

Here are the changes:

1) I followed David Simonkek's suggestion (see bug #28244) and reduced
the number of instantiated anonymous classes by combining more
listeners in a single class (SearchFieldListener)

2) Up and down arrow keys can now be used to navigate through matching
nodes (this means that if you have two nodes called for example
'openide' and the textfield contains 'open' you can use the arrow keys
to select the desired node)

3) There should be no problems now with the tree key bindings. However
I've tested only the common combinations (cut, copy, paste, delete).

4) Pressing Enter now runs the default action. It also expands the
node, but this can be easily switched off.
Comment 2 _ leonchiver 2002-10-28 19:44:13 UTC
Created attachment 7787 [details]
the new patch
Comment 3 Jiri Rechtacek 2002-10-29 13:08:54 UTC
The problem with the modifiers was fixed at 25 Oct, I leave it open
since I assure all consequences.
Comment 4 _ leonchiver 2002-10-29 13:36:52 UTC
Jiri, could you have a look over the new patch attached here? It
contains your fixes (the delete key and the modifiers), but adds some
nice (I hope so :)) enhancements.
Comment 5 David Simonek 2002-10-29 15:00:50 UTC
I look at the source code of the patch and it seems ok to me, enhs are
good!
Just one minor comment - after talks with colleagues, we came to
conclusion that basically any printable character should trigger
search field open, because explorer as part of netbeans platform can
be used in environments where directory names can contain virtually
any printable characters.
However I didn't find better method then isJavaIdentifierPart,
completed with '/' and perhaps some other characters permissible in
directory names.
Comment 6 Jesse Glick 2002-10-29 15:20:36 UTC
Re. "any printable character" - maybe !Character.isISOControl(c) would
work. (After ensuring that there are no modifier keys pressed, and
that the keystroke maps to a character, not only a keycap.)
isJavaIdentifierPart plus '/' includes a lot of Unicode, but excludes
many characters that would commonly be found in node names: '.', '-',
and so on.
Comment 7 Jiri Rechtacek 2002-10-30 16:33:03 UTC
fixed, isICOControl is used. added Leon' patch and add completion to
the longest possibled prefix by TAB
Comment 8 Marian Mirilovic 2004-03-01 07:25:22 UTC
verified