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 43617 - Can't use + and - of keypad to fold | unfold node in the Projects|Files|All Files Window
Summary: Can't use + and - of keypad to fold | unfold node in the Projects|Files|All F...
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Petr Nejedly
Depends on:
Reported: 2004-05-20 13:36 UTC by vbrabant
Modified: 2008-12-22 20:45 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description vbrabant 2004-05-20 13:36:46 UTC
NB200405181800 & JDK 1.4.2
When I am in the Editor Window, I can use Ctrl-+
or Ctrl-- to fold/unfold the code.
When I am in the Projects|Files|All Files Windows,
I can't use Ctrl-+ or Ctrl-- to expand or not the
And when I use the + of the keypad, a text field
appears on the screen with + therein.
Comment 1 Milos Kleint 2004-05-20 13:47:29 UTC
I think the defaults for expanding/collapsing in trees is left and
right arrow.

Ctrl+ and Ctrl- are workarounds in the editor because the arrows have
other default meaning.

Or did this setup work before?
Comment 2 vbrabant 2004-05-20 14:10:32 UTC
It's just that in all Windows application, each time you need to
navigate through a tree, + and - of keypad are used for expanding or
not the selected node.
Because I am conditionned by Windows, and because NetBeans is now
using the Windows Look and Feel, I just used + and - of the keypad.
For me, it was a normal attitude.

I agree with you that it's not a defect, but maybe can I reopen it as
a enhancement in place of a defect

And, if you agree, I will create a new issue for the problem of text
field appearing on the screen when I type somes characters when a node
is selected.

I am just waiting what you think about my proposal before processing.
Comment 3 Milos Kleint 2004-05-20 14:26:04 UTC
sure, feel free to reopen, I will redirect the issue to the HIE
department for evaluation.

I believe the text area appearing is actually a feature which lets you
find a node in the tree structure tha tmatches the pattern.
Comment 4 David Simonek 2004-05-20 14:26:48 UTC
Yes Vincent, you are right, we should be consistent with OS and use
keypad + and - for expanding/collapsing.
Probably we have too aggresive key listener attached in Projects/Files
windows, so that it eats these keys.

I'm going to reopen this issue, it's correct, you don't need to enter
new one.

Right fix of this issue is that keypad + and - keys will work as in
windows OS, however Ctrl+ and Ctrl- will remain special for code folding.
Comment 5 David Simonek 2004-05-20 14:28:41 UTC
OK, as Milos suggested, I'm passing issue to HIE to decide on solution.
Comment 6 vbrabant 2004-05-20 14:51:45 UTC
Thanks Milo.
I confirm that when a node is selected and I type Dictionary, nb is
positionning on the next node having name begining with Dictionary.

Thanks for the tip.

I discover near everyday new tips.
Comment 7 jrojcek 2004-06-17 16:40:45 UTC
+/- keys should perform expanding/collapsing in explorer trees.
Comment 8 David Simonek 2004-06-18 12:18:23 UTC
OK, Milos then please modify explorer fast search to not eat + and -,
probably for all platforms (+ and - in the name are pretty rare, often
refused by OS filesystem AFAIK). CCing explorer owner also.
Comment 9 Milos Kleint 2004-06-24 08:58:28 UTC
btw. regular JTrees do not handle +/- signs the way it works in native
Comment 10 Milos Kleint 2004-06-24 09:25:05 UTC
suggested patch to ignore +/- signs in explorer. It still doesn't work
as described in the bug, but at least it doesn't show the node search
textfield. passing to explorer subcomponent.

RCS file: /cvs/openide/src/org/openide/explorer/view/,v
retrieving revision 1.164
diff -r1.164
>                    //#43617 - don't eat + and -
> //                   if (e.getKeyLocation() ==
>                        if (keyCode == KeyEvent.VK_PLUS || keyCode ==
KeyEvent.VK_MINUS || keyCode == KeyEvent.VK_ADD || keyCode ==
>                            return;
>                        }
Comment 11 Petr Nejedly 2004-08-17 10:53:22 UTC

Behaves as specified by jrojcek.

Comment 12 Tomas Danek 2005-07-15 09:20:34 UTC
verified on 4.1 final , + - works