summaryrefslogtreecommitdiff
path: root/platform/platform-impl/src/com/intellij/openapi/editor/actions/CloneCaretBelow.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/platform-impl/src/com/intellij/openapi/editor/actions/CloneCaretBelow.java')
-rw-r--r--platform/platform-impl/src/com/intellij/openapi/editor/actions/CloneCaretBelow.java27
1 files changed, 1 insertions, 26 deletions
diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/actions/CloneCaretBelow.java b/platform/platform-impl/src/com/intellij/openapi/editor/actions/CloneCaretBelow.java
index 17d17708b900..974087796e08 100644
--- a/platform/platform-impl/src/com/intellij/openapi/editor/actions/CloneCaretBelow.java
+++ b/platform/platform-impl/src/com/intellij/openapi/editor/actions/CloneCaretBelow.java
@@ -15,35 +15,10 @@
*/
package com.intellij.openapi.editor.actions;
-import com.intellij.openapi.actionSystem.DataContext;
-import com.intellij.openapi.editor.Caret;
-import com.intellij.openapi.editor.CaretModel;
-import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.editor.actionSystem.EditorAction;
-import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
-import org.jetbrains.annotations.NotNull;
public class CloneCaretBelow extends EditorAction {
public CloneCaretBelow() {
- super(new Handler());
- }
-
- private static class Handler extends EditorActionHandler {
- public Handler() {
- super(true);
- }
-
- @Override
- public void doExecute(Editor editor, @NotNull Caret caret, DataContext dataContext) {
- CaretModel caretModel = editor.getCaretModel();
- if (caretModel.supportsMultipleCarets()) {
- caret.clone(false);
- }
- }
-
- @Override
- public boolean isEnabled(Editor editor, DataContext dataContext) {
- return editor.getCaretModel().supportsMultipleCarets();
- }
+ super(new CloneCaretActionHandler(false));
}
}