mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
expand/collapse block recursively on Shift-click on gutter icon (IDEA-92889)
This commit is contained in:
@@ -5627,7 +5627,7 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
|
||||
}
|
||||
}
|
||||
|
||||
private boolean processMousePressed(@NotNull MouseEvent e) {
|
||||
private boolean processMousePressed(@NotNull final MouseEvent e) {
|
||||
myInitialMouseEvent = e;
|
||||
|
||||
if (myMouseSelectionState != MOUSE_SELECTION_STATE_NONE &&
|
||||
@@ -5656,6 +5656,13 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
|
||||
public void run() {
|
||||
myFoldingModel.flushCaretShift();
|
||||
range.setExpanded(expansion);
|
||||
if (e.isShiftDown()) {
|
||||
for (FoldRegion region : myFoldingModel.getAllFoldRegions()) {
|
||||
if (region.getStartOffset() >= range.getStartOffset() && region.getEndOffset() <= range.getEndOffset()) {
|
||||
region.setExpanded(expansion);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
getFoldingModel().runBatchFoldingOperation(processor);
|
||||
|
||||
Reference in New Issue
Block a user