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 30055 - Bad modifier key for option-dialog on context-menu
Summary: Bad modifier key for option-dialog on context-menu
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: vcscore (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P4 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-14 11:50 UTC by afischer
Modified: 2003-12-11 14:27 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description afischer 2003-01-14 11:50:05 UTC
On the context-menu for the mounted CVS-system you
can get the options-dialog for different actions
like update or checkout with pressing a
modifier-key while clicking the right
mouse-button. On the documentation the ctrl-key is
described as the correct key, but on my german
win2000 I must use the alt-key for getting the
details. This is not so good, because the alt-key
has some more functions on windows and I would
prefer the old variant with the strg-key or a
configurable system.
On version 3.3 the strg-key is working, since
version 3.4 not working.
Comment 1 Martin Entlicher 2003-01-14 12:19:36 UTC
Well, it seems, that this depends on what
java.awt.event.InputEvent.isControlDown() returns. This might be a
problem in JDK implementation. I don't think we used different
approach in 3.3 and 3.4. Are there any differences under JDK 1.3 and
JDK 1.4?

Can you please test whether java.awt.event.InputEvent.isControlDown()
works for your ctrl-key?
Comment 2 afischer 2003-01-14 12:47:33 UTC
I just have tried Netbeans 3.4 on a JDK1.4.1 under WinXP on a
different computer. There is also the alt-key the modifier-key.
On my computer I have Netbeans 3.4.1RC2 with JDK1.3.1_06 under Win2000.
With the older versions (3.2, 3.3, if I correct remember) the ctrl-key
was the correct key.
I will try the JDK-functions later with a small test-program.
Comment 3 Martin Entlicher 2003-08-07 12:27:03 UTC
Any update on this? I can hardly use a different approach then the
standard: java.awt.event.InputEvent.isControlDown(). Maybe that this
is a bug of JDK implementation?


Following line is used to detect the CTRL key:
menuKeyPressed(javax.swing.event.MenuKeyEvent p1) {
boolean CTRL_Down =
 "Ctrl".equals(p1.getKeyText(p1.getKeyCode())) || p1.isControlDown();

This is wrong, since p1.getKeyText() can be localized.
p1.getKeyCode() == MenuKeyEvent.VK_CONTROL should be used instead.
However p1.isControlDown() should work anyway, so the first condition
seems to be redundant. I'll change it to used the different condition,
but I doubt it will change anything for you if the mapping of CTRL is
wrong.

Comment 4 Martin Entlicher 2003-08-07 12:48:17 UTC
Ah, there's a bug in ClusteringAction class:

boolean newCTRL_Down =
 "Ctrl".equals(p1.getKeyText(p1.getKeyCode())) || !p1.isControlDown();

This obviously does not work if p1.getKeyText() is localized to
something else then "Ctrl", which may be your case.

You use JavaCVS, don't you? Due to this bug, you can use *any* key
except localized CTRL to get the advanced options. (e.g. "A" key if
you wish :-)
Comment 5 Martin Entlicher 2003-08-07 12:49:26 UTC
Also moving to vcscore module - the bug is there.
Comment 6 Martin Entlicher 2003-08-07 13:05:18 UTC
Fixed in projects and dev builds:

Checking in ClusteringAction.java;
/cvs/vcscore/src/org/netbeans/modules/vcscore/actions/ClusteringAction.java,v 
<--  ClusteringAction.java
new revision: 1.3.68.3; previous revision: 1.3.68.2
done
Checking in CommandMenu.java;
/cvs/vcscore/src/org/netbeans/modules/vcscore/actions/CommandMenu.java,v 
<--  CommandMenu.java
new revision: 1.1.2.3; previous revision: 1.1.2.2
done

Checking in ClusteringAction.java;
/cvs/vcscore/src/org/netbeans/modules/vcscore/actions/ClusteringAction.java,v 
<--  ClusteringAction.java
new revision: 1.7; previous revision: 1.6
done
Checking in CommandMenu.java;
/cvs/vcscore/src/org/netbeans/modules/vcscore/actions/CommandMenu.java,v 
<--  CommandMenu.java
new revision: 1.8; previous revision: 1.7
done
Comment 7 Jiri Kovalsky 2003-08-07 13:53:13 UTC
Can you afischer please verify that the fix is successful ? Use
tomorrow's development build #200308080100 for this. Thanks very much !
Comment 8 Jiri Kovalsky 2003-10-14 15:34:19 UTC
afischer is probably satisfied. Thus verifying instead of him/her.
Comment 9 afischer 2003-10-14 15:48:37 UTC
Hello,
sorry for my long time for response.

On my Win2K-System (german) with Netbeans3.51 (release) and Java
1.3.1_08 I get the same error again...
I can only use the alt-key for getting the details.
Comment 10 Martin Entlicher 2003-10-14 16:16:55 UTC
Yes, this is not surprising. The problem is fixed only in the
development version of NetBeans (Target Milestone is set to 4.0 - the
next release).
The problem was fixed after the release of 3.5 and 3.5.1.
Comment 11 Jiri Kovalsky 2003-10-15 07:57:19 UTC
Verifying again. If you want to try the fix, you must download the
development version of NetBeans 4.0.