mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
do not set breakpoints if clicked to the right of the gutter separator line
This commit is contained in:
+8
-1
@@ -276,7 +276,7 @@ public class XLineBreakpointManager {
|
||||
|| mouseEvent.isMetaDown() || mouseEvent.isControlDown()
|
||||
|| mouseEvent.getButton() != MouseEvent.BUTTON1
|
||||
|| MarkupEditorFilterFactory.createIsDiffFilter().avaliableIn(editor)
|
||||
|| (e.getArea() != EditorMouseEventArea.LINE_MARKERS_AREA && e.getArea() != EditorMouseEventArea.FOLDING_OUTLINE_AREA)
|
||||
|| !isInsideGutter(e, editor)
|
||||
|| ConsoleViewUtil.isConsoleViewEditor(editor)
|
||||
|| !isFromMyProject(editor)
|
||||
|| (editor.getSelectionModel().hasSelection() && myDragDetected)
|
||||
@@ -318,6 +318,13 @@ public class XLineBreakpointManager {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private boolean isInsideGutter(EditorMouseEvent e, Editor editor) {
|
||||
if (e.getArea() != EditorMouseEventArea.LINE_MARKERS_AREA && e.getArea() != EditorMouseEventArea.FOLDING_OUTLINE_AREA) {
|
||||
return false;
|
||||
}
|
||||
return e.getMouseEvent().getX() <= ((EditorEx)editor).getGutterComponentEx().getWhitespaceSeparatorOffset();
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isFromMyProject(@NotNull Editor editor) {
|
||||
|
||||
Reference in New Issue
Block a user