Lines 2676-2682
Link Here
|
2676 |
c.requestFocus(); |
2676 |
c.requestFocus(); |
2677 |
} |
2677 |
} |
2678 |
c.setDragEnabled(true); |
2678 |
c.setDragEnabled(true); |
2679 |
if (evt.isControlDown() && evt.isShiftDown()) { |
2679 |
if (isControlShiftDown(evt)) { |
2680 |
mouseState = MouseState.CHAR_SELECTION; |
2680 |
mouseState = MouseState.CHAR_SELECTION; |
2681 |
try { |
2681 |
try { |
2682 |
Position pos = doc.createPosition(offset); |
2682 |
Position pos = doc.createPosition(offset); |
Lines 2711-2717
Link Here
|
2711 |
foldExpanded = caretFoldExpander.checkExpandFold(c, evt.getPoint()); |
2711 |
foldExpanded = caretFoldExpander.checkExpandFold(c, evt.getPoint()); |
2712 |
} |
2712 |
} |
2713 |
if (!foldExpanded) { |
2713 |
if (!foldExpanded) { |
2714 |
if (evt.isControlDown() && evt.isShiftDown()) { |
2714 |
if (isControlShiftDown(evt)) { |
2715 |
try { |
2715 |
try { |
2716 |
int begOffs = Utilities.getWordStart(c, offset); |
2716 |
int begOffs = Utilities.getWordStart(c, offset); |
2717 |
int endOffs = Utilities.getWordEnd(c, offset); |
2717 |
int endOffs = Utilities.getWordEnd(c, offset); |
Lines 2746-2752
Link Here
|
2746 |
mouseState = MouseState.LINE_SELECTION; |
2746 |
mouseState = MouseState.LINE_SELECTION; |
2747 |
// Disable drag which would otherwise occur when mouse would be over text |
2747 |
// Disable drag which would otherwise occur when mouse would be over text |
2748 |
c.setDragEnabled(false); |
2748 |
c.setDragEnabled(false); |
2749 |
if (evt.isControlDown() && evt.isShiftDown()) { |
2749 |
if (isControlShiftDown(evt)) { |
2750 |
try { |
2750 |
try { |
2751 |
int begOffs = Utilities.getRowStart(c, offset); |
2751 |
int begOffs = Utilities.getRowStart(c, offset); |
2752 |
int endOffs = Utilities.getRowEnd(c, offset); |
2752 |
int endOffs = Utilities.getRowEnd(c, offset); |
Lines 2781-2786
Link Here
|
2781 |
} |
2781 |
} |
2782 |
} |
2782 |
} |
2783 |
|
2783 |
|
|
|
2784 |
private boolean isControlShiftDown(MouseEvent mouseEvent) { |
2785 |
boolean ctrlDown = org.openide.util.Utilities.isMac() ? mouseEvent.isMetaDown() |
2786 |
: mouseEvent.isControlDown(); |
2787 |
boolean shiftDown = mouseEvent.isShiftDown(); |
2788 |
return ctrlDown && shiftDown; |
2789 |
} |
2790 |
|
2784 |
@Override |
2791 |
@Override |
2785 |
public void mouseReleased(MouseEvent evt) { |
2792 |
public void mouseReleased(MouseEvent evt) { |
2786 |
if (LOG.isLoggable(Level.FINE)) { |
2793 |
if (LOG.isLoggable(Level.FINE)) { |
Lines 2836-2842
Link Here
|
2836 |
|
2843 |
|
2837 |
JTextComponent c = component; |
2844 |
JTextComponent c = component; |
2838 |
if (c != null) { |
2845 |
if (c != null) { |
2839 |
if (evt.getClickCount() == 1 && evt.isControlDown() && evt.isShiftDown()) { |
2846 |
if (evt.getClickCount() == 1 && isControlShiftDown(evt)) { |
2840 |
evt.consume(); // consume event already handled by mousePressed |
2847 |
evt.consume(); // consume event already handled by mousePressed |
2841 |
} |
2848 |
} |
2842 |
if (isMiddleMouseButtonExt(evt)) { |
2849 |
if (isMiddleMouseButtonExt(evt)) { |