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 67030 - extend HyperlinkProvider spi bypass states of control keys
Summary: extend HyperlinkProvider spi bypass states of control keys
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jan Becicka
URL:
Keywords: API
Depends on:
Blocks:
 
Reported: 2005-10-18 10:14 UTC by Vladimir Voskresensky
Modified: 2010-09-23 07:56 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2005-10-18 10:14:39 UTC
Current provider doesn't pass states of control keys (Shift, Alt, Meta) which
were pressed during moving mouse or clicking on code item. 
interface HyperlinkProvider2 {
}
the same as HyperlinkProvider + additional parameter in methods with states of
conrol keys.

Usecase:
 - we use the same provider for C/C++ code. In this languages there are
different meaning of definition/declaration => need to destinguish the required
user action. For example:
Ctrl+click => go to definition of method
Ctrl+Shift+click => go to declaration of method
Comment 1 Vladimir Voskresensky 2006-02-15 09:08:19 UTC
As another solution we can allow to register different providers for different
key bindings. As I see in implementation now only one key bindings is used for
hyperlinks.
Comment 2 Vladimir Voskresensky 2006-02-16 14:55:19 UTC
Added simplest prototype on branch "deimos"
New file
cvs/editor/libsrc/org/netbeans/lib/editor/hyperlink/spi/HyperlinkProviderEx.java
Updated file
cvs/editor/libsrc/org/netbeans/lib/editor/hyperlink/HyperlinkOperation.java
39d38
< import org.netbeans.lib.editor.hyperlink.spi.HyperlinkProviderEx;
197c196
<     private void performAction(int position, int modifiers) {
---
>     private void performAction(int position) {
207,212c206
<             // vv159170 workaround to pass mouse event modifiers when perform
action
<             if (provider instanceof HyperlinkProviderEx) {
<                
((HyperlinkProviderEx)provider).performClickAction(component.getDocument(),
position, modifiers);
<             } else {
<                 provider.performClickAction(component.getDocument(), position);
<             }
---
>             provider.performClickAction(component.getDocument(), position);
340c334
<             performAction(position, e.getModifiers() | e.getModifiersEx());
---
>             performAction(position);
Comment 3 Miloslav Metelka 2007-01-17 13:40:50 UTC
According to jlahoda there was an agreement to implement this request into 6.0.
Comment 4 Thomas Preisler 2007-01-31 16:09:50 UTC
Removed MARS keyword. A fix for this is not needed in 5.5.1.
Comment 5 Jiri Prox 2008-04-11 00:42:54 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 6 Vladimir Voskresensky 2010-09-23 07:56:57 UTC
no need anymore since we have now alternative hyperlink functionality