summaryrefslogtreecommitdiff
path: root/platform/editor-ui-api/src/com/intellij/openapi/editor/CaretModel.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/editor-ui-api/src/com/intellij/openapi/editor/CaretModel.java')
-rw-r--r--platform/editor-ui-api/src/com/intellij/openapi/editor/CaretModel.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/platform/editor-ui-api/src/com/intellij/openapi/editor/CaretModel.java b/platform/editor-ui-api/src/com/intellij/openapi/editor/CaretModel.java
index df247d5be401..a5053923fa31 100644
--- a/platform/editor-ui-api/src/com/intellij/openapi/editor/CaretModel.java
+++ b/platform/editor-ui-api/src/com/intellij/openapi/editor/CaretModel.java
@@ -222,6 +222,8 @@ public interface CaretModel {
* selection boundaries will mean that corresponding caret's position and/or selection won't be changed.
* <p>
* If multiple carets are not supported, the behaviour is unspecified.
+ * <p>
+ * System selection will be updated, if such feature is supported by current editor.
*
* @see #supportsMultipleCarets()
* @see #getCaretsAndSelections()
@@ -229,6 +231,20 @@ public interface CaretModel {
void setCaretsAndSelections(@NotNull List<CaretState> caretStates);
/**
+ * Sets the number of carets, their positions and selection ranges according to the provided data. Null values for caret position or
+ * selection boundaries will mean that corresponding caret's position and/or selection won't be changed.
+ * <p>
+ * If multiple carets are not supported, the behaviour is unspecified.
+ * <p>
+ * System selection will be updated, if such feature is supported by current editor
+ * and corresponding invocation parameter is set to <code>true</code>.
+ *
+ * @see #supportsMultipleCarets()
+ * @see #getCaretsAndSelections()
+ */
+ void setCaretsAndSelections(@NotNull List<CaretState> caretStates, boolean updateSystemSelection);
+
+ /**
* Returns the current positions of all carets and their selections. The order of entries in the returned list does not necessarily
* correspond to the order of {@link #getAllCarets()} method results. Passing the result of this method to
* {@link #setCaretsAndSelections(java.util.List)} will restore the state of carets, including the internal caret order, in particular,