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.

View | Details | Raw Unified | Return to bug 136219
Collapse All | Expand All

(-)a/editor.lib/src/org/netbeans/lib/editor/hyperlink/HyperlinkOperation.java (-1 / +10 lines)
Lines 56-61 Link Here
56
import java.util.Set;
56
import java.util.Set;
57
import java.util.logging.Logger;
57
import java.util.logging.Logger;
58
import java.util.prefs.Preferences;
58
import java.util.prefs.Preferences;
59
import javax.swing.SwingUtilities;
59
import javax.swing.text.AttributeSet;
60
import javax.swing.text.AttributeSet;
60
import javax.swing.text.Document;
61
import javax.swing.text.Document;
61
import javax.swing.text.JTextComponent;
62
import javax.swing.text.JTextComponent;
Lines 77-82 Link Here
77
import org.netbeans.spi.editor.highlighting.HighlightsLayerFactory;
78
import org.netbeans.spi.editor.highlighting.HighlightsLayerFactory;
78
import org.netbeans.spi.editor.highlighting.ZOrder;
79
import org.netbeans.spi.editor.highlighting.ZOrder;
79
import org.netbeans.spi.editor.highlighting.support.OffsetsBag;
80
import org.netbeans.spi.editor.highlighting.support.OffsetsBag;
81
import org.openide.util.Utilities;
80
82
81
/**
83
/**
82
 *
84
 *
Lines 394-402 Link Here
394
    }
396
    }
395
397
396
    public void mouseClicked(MouseEvent e) {
398
    public void mouseClicked(MouseEvent e) {
399
        boolean activate = false;
397
        HyperlinkType type = getHyperlinkType(e);
400
        HyperlinkType type = getHyperlinkType(e);
401
        if ( type != null ) {
402
            activate = !e.isPopupTrigger() && e.getClickCount() == 1 && SwingUtilities.isLeftMouseButton(e);
403
        } else if ( Utilities.isWindows() && e.getClickCount() == 1 && SwingUtilities.isMiddleMouseButton(e) ) {
404
            activate = true;
405
            type = HyperlinkType.GO_TO_DECLARATION;
406
        }
398
        
407
        
399
        if (type != null && !e.isPopupTrigger() && e.getClickCount() == 1 && e.getButton() == MouseEvent.BUTTON1) {
408
        if ( activate ) {
400
            int position = component.viewToModel(e.getPoint());
409
            int position = component.viewToModel(e.getPoint());
401
            
410
            
402
            if (position < 0) {
411
            if (position < 0) {

Return to bug 136219