From 574625ce2b7ff5fc971f9575683b9407d87a004f Mon Sep 17 00:00:00 2001 From: Jaroslav Tulach Date: Thu, 16 Jun 2022 11:58:54 +0200 Subject: [PATCH] Connecting documentation of setLiteralSource with PatchedModuleValues --- .../src/main/java/org/enso/interpreter/runtime/Module.java | 1 + .../java/org/enso/interpreter/runtime/PatchedModuleValues.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/engine/runtime/src/main/java/org/enso/interpreter/runtime/Module.java b/engine/runtime/src/main/java/org/enso/interpreter/runtime/Module.java index 1ae4fe1ced9d..a3a6034a7559 100644 --- a/engine/runtime/src/main/java/org/enso/interpreter/runtime/Module.java +++ b/engine/runtime/src/main/java/org/enso/interpreter/runtime/Module.java @@ -205,6 +205,7 @@ public void setLiteralSource(String source) { * * @param source the module source. * @param update suggested small change in a single literal or {@code null} + * @see PatchedModuleValues */ public void setLiteralSource(Rope source, SimpleUpdate update) { if (this.scope != null && update != null) { diff --git a/engine/runtime/src/main/java/org/enso/interpreter/runtime/PatchedModuleValues.java b/engine/runtime/src/main/java/org/enso/interpreter/runtime/PatchedModuleValues.java index fb7b99bb1a95..d6afa2739fec 100644 --- a/engine/runtime/src/main/java/org/enso/interpreter/runtime/PatchedModuleValues.java +++ b/engine/runtime/src/main/java/org/enso/interpreter/runtime/PatchedModuleValues.java @@ -50,7 +50,8 @@ synchronized void dispose() { * Edits are always deleting few characters and inserting another few characters * at a given location. The idea here is to use {@code SortedMap} to keep * information about "deltas" at each offset of modification. Whenever new - * + * edit is made, the delta at its offset is recorded and all deltas after + * the offset adjusted as they shift too. * * @param instr instrumented to attach itself as a ultimate source of values * for {@link Patchable.Tag} nodes