From f92ea1e9e3d9f771cb253a7e5b5c59846f44b354 Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Tue, 22 Oct 2024 09:22:07 +0200 Subject: [PATCH 01/21] Starting boot-cycle for new rascal-maven release --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 800eeb4e2e7..ec4c260a023 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ org.rascalmpl.shell.RascalShell 2 11 - 0.28.6 + 0.28.7-BOOT1 From 44f6b95cf31132edbd6aebf2266f757ddcfca67d Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Tue, 22 Oct 2024 09:23:13 +0200 Subject: [PATCH 02/21] [maven-release-plugin] prepare release v0.40.13-BOOT1 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index ec4c260a023..24fcd26f618 100644 --- a/pom.xml +++ b/pom.xml @@ -3,12 +3,12 @@ org.rascalmpl rascal - 0.40.13-SNAPSHOT + 0.40.13-BOOT1 jar scm:git:ssh://git@github.com/usethesource/rascal.git - v0.40.12 + v0.40.13-BOOT1 From 5e21c4f216604e8d91ad7b7fe524a1607b106cec Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Tue, 22 Oct 2024 09:23:16 +0200 Subject: [PATCH 03/21] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 24fcd26f618..ec4c260a023 100644 --- a/pom.xml +++ b/pom.xml @@ -3,12 +3,12 @@ org.rascalmpl rascal - 0.40.13-BOOT1 + 0.40.13-SNAPSHOT jar scm:git:ssh://git@github.com/usethesource/rascal.git - v0.40.13-BOOT1 + v0.40.12 From a5c5f3f258328660063a7df29037b3a2adb3e36c Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Wed, 23 Oct 2024 09:40:59 +0200 Subject: [PATCH 04/21] Using rascal-maven plugin with bugfix --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ec4c260a023..d22186684fc 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ org.rascalmpl.shell.RascalShell 2 11 - 0.28.7-BOOT1 + 0.28.7-BOOT3 From 621427e2404766115fdf11c3f67086ac5bc5abda Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Wed, 23 Oct 2024 11:23:58 +0200 Subject: [PATCH 05/21] moved definitions of Message, Command and CodeAction from util::LanguageServer in rascal-lsp to standard library util::IDEServices --- .../rascalmpl/library/util/IDEServices.rsc | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/org/rascalmpl/library/util/IDEServices.rsc b/src/org/rascalmpl/library/util/IDEServices.rsc index 32950e82142..2950b0458af 100644 --- a/src/org/rascalmpl/library/util/IDEServices.rsc +++ b/src/org/rascalmpl/library/util/IDEServices.rsc @@ -4,7 +4,6 @@ extend analysis::diff::edits::TextEdits; extend Content; extend Message; - @synopsis{Open a browser for a given location.} @javaClass{org.rascalmpl.library.util.IDEServicesLibrary} java void browse(loc uri, str title = "", int viewColumn=1); @@ -45,3 +44,28 @@ public java void registerDiagnostics(list[Message] messages); @javaClass{org.rascalmpl.library.util.IDEServicesLibrary} public java void unregisterDiagnostics(list[loc] resources); + +@synopsis{Fixes are an extension to error messages that allow for interactive code fixes in the IDE.} +@description{ +This definition adds lists of ((CodeActions)) as optional fields to any message. In collaboration +with a language server, these messages then lead to interactive quick fixes in IDEs. +} +data Message(list[CodeAction] fixes = []); + +@synopsis{Code actions bundle synchronous text edits and command execution with a title for the menu option.} +@description{ +For any action instance, the IDE will: +* show a menu option with the given title. +* if the title is selected, then the (optional) edits will be executed first +* and then the (optional) command is executed via the `execution` service of the language service protocol. +} +data CodeAction + = action(list[DocumentEdit] edits = [], Command command = noop(), str title = command.title); + +@synopsis{Commands are an open data-type for describing interactive functions that may be attached to CodeActions.} +@description{ +Commands are simply immutable constructors with parameters. To use a command you can attach it to a ((Message)) +via a ((CodeAction)), and then have it executed by the respective language server. +} +data Command(str title="") + = noop(); From bb6043b4a6860b585285bf1e2032d9d951a20baf Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Wed, 23 Oct 2024 20:05:54 +0200 Subject: [PATCH 06/21] fixed documentation links --- src/org/rascalmpl/library/util/IDEServices.rsc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/rascalmpl/library/util/IDEServices.rsc b/src/org/rascalmpl/library/util/IDEServices.rsc index 2950b0458af..2de6d3fac2a 100644 --- a/src/org/rascalmpl/library/util/IDEServices.rsc +++ b/src/org/rascalmpl/library/util/IDEServices.rsc @@ -47,7 +47,7 @@ public java void unregisterDiagnostics(list[loc] resources); @synopsis{Fixes are an extension to error messages that allow for interactive code fixes in the IDE.} @description{ -This definition adds lists of ((CodeActions)) as optional fields to any message. In collaboration +This definition adds lists of ((CodeAction))s as optional fields to any message. In collaboration with a language server, these messages then lead to interactive quick fixes in IDEs. } data Message(list[CodeAction] fixes = []); @@ -64,7 +64,7 @@ data CodeAction @synopsis{Commands are an open data-type for describing interactive functions that may be attached to CodeActions.} @description{ -Commands are simply immutable constructors with parameters. To use a command you can attach it to a ((Message)) +Commands are simply immutable constructors with parameters. To use a command you can attach it to a ((module:Message)) via a ((CodeAction)), and then have it executed by the respective language server. } data Command(str title="") From 31708dbd47f52d12ea7626b64e773e9bca189196 Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Sat, 26 Oct 2024 13:39:13 +0200 Subject: [PATCH 07/21] Using boot version of rascal-maven --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d22186684fc..f123a6c5d2e 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ org.rascalmpl.shell.RascalShell 2 11 - 0.28.7-BOOT3 + 0.28.7-BOOT4 From 01428e752b0691b6c7c029b9b56ce5076a0e9f5f Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Sat, 26 Oct 2024 13:40:38 +0200 Subject: [PATCH 08/21] [maven-release-plugin] prepare release v0.40.13-BOOT2 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f123a6c5d2e..bc92e6b4634 100644 --- a/pom.xml +++ b/pom.xml @@ -3,12 +3,12 @@ org.rascalmpl rascal - 0.40.13-SNAPSHOT + 0.40.13-BOOT2 jar scm:git:ssh://git@github.com/usethesource/rascal.git - v0.40.12 + v0.40.13-BOOT2 From f7efc0f61df2f0818ce725764cf34856b6e16a5d Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Sat, 26 Oct 2024 13:40:43 +0200 Subject: [PATCH 09/21] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index bc92e6b4634..f123a6c5d2e 100644 --- a/pom.xml +++ b/pom.xml @@ -3,12 +3,12 @@ org.rascalmpl rascal - 0.40.13-BOOT2 + 0.40.13-SNAPSHOT jar scm:git:ssh://git@github.com/usethesource/rascal.git - v0.40.13-BOOT2 + v0.40.12 From 25dd2f1f9f6de628e92d3e55044bfcb9e81346d0 Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Sat, 26 Oct 2024 15:59:42 +0200 Subject: [PATCH 10/21] Closing boot cycle --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f123a6c5d2e..8bfc7799bd2 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ org.rascalmpl.shell.RascalShell 2 11 - 0.28.7-BOOT4 + 0.28.7 From ef0019d3fe24edfa598c0300e5b0a208ba7edb99 Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Sat, 26 Oct 2024 16:00:39 +0200 Subject: [PATCH 11/21] [maven-release-plugin] prepare release v0.40.13 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 8bfc7799bd2..9b48a2a3ad9 100644 --- a/pom.xml +++ b/pom.xml @@ -3,12 +3,12 @@ org.rascalmpl rascal - 0.40.13-SNAPSHOT + 0.40.13 jar scm:git:ssh://git@github.com/usethesource/rascal.git - v0.40.12 + v0.40.13 From b575b562caf4eb57fb86679b55e105abd863e19d Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Sat, 26 Oct 2024 16:00:43 +0200 Subject: [PATCH 12/21] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 9b48a2a3ad9..9636e0344e4 100644 --- a/pom.xml +++ b/pom.xml @@ -3,12 +3,12 @@ org.rascalmpl rascal - 0.40.13 + 0.40.14-SNAPSHOT jar scm:git:ssh://git@github.com/usethesource/rascal.git - v0.40.13 + v0.40.12 From e2d4477297c5b5f9ac9c7bd9b097844bff32931e Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Mon, 28 Oct 2024 19:30:22 +0100 Subject: [PATCH 13/21] bumped to latest rascal-maven-plugin for latest rascal-tutor, and fixed a broken link in a synopsis text --- pom.xml | 2 +- src/org/rascalmpl/library/Content.rsc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 9636e0344e4..656e8c99adf 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ org.rascalmpl.shell.RascalShell 2 11 - 0.28.7 + 0.28.8 diff --git a/src/org/rascalmpl/library/Content.rsc b/src/org/rascalmpl/library/Content.rsc index 28be88bbe94..54600a5021f 100644 --- a/src/org/rascalmpl/library/Content.rsc +++ b/src/org/rascalmpl/library/Content.rsc @@ -4,7 +4,7 @@ module Content @synopsis{Content wraps the HTTP Request/Response API to support interactive visualization types -on the terminal ((RascalShell)).} +on the terminal.} @description{ Values wrapped in a `Content` wrapper will be displayed by interactive Rascal applications such as the IDE, the REPL terminal and the documentation pages. From 66c204c94af7c54470be302ee5cc052ee9898da9 Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Mon, 28 Oct 2024 19:44:51 +0100 Subject: [PATCH 14/21] [maven-release-plugin] prepare release v0.40.14 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 656e8c99adf..dcec1e447c3 100644 --- a/pom.xml +++ b/pom.xml @@ -3,12 +3,12 @@ org.rascalmpl rascal - 0.40.14-SNAPSHOT + 0.40.14 jar scm:git:ssh://git@github.com/usethesource/rascal.git - v0.40.12 + v0.40.14 From 3a894dbf6b52e199e1fc00aac76b49558cc49244 Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Mon, 28 Oct 2024 19:45:16 +0100 Subject: [PATCH 15/21] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index dcec1e447c3..ae223781bf2 100644 --- a/pom.xml +++ b/pom.xml @@ -3,12 +3,12 @@ org.rascalmpl rascal - 0.40.14 + 0.40.15-SNAPSHOT jar scm:git:ssh://git@github.com/usethesource/rascal.git - v0.40.14 + v0.40.12 From 8b4bfaafad90ab0a50578cafb9ec1ebd837dd08a Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Tue, 29 Oct 2024 18:50:37 +0100 Subject: [PATCH 16/21] added proper @deprecated tag --- src/org/rascalmpl/library/Set.rsc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/org/rascalmpl/library/Set.rsc b/src/org/rascalmpl/library/Set.rsc index 10e0f819cdd..729b96ea4c0 100644 --- a/src/org/rascalmpl/library/Set.rsc +++ b/src/org/rascalmpl/library/Set.rsc @@ -218,7 +218,7 @@ power1({1,2,3,4}); } public set[set[&T]] power1(set[&T] st) = power(st) - {{}}; -@synopsis{Apply a function to successive elements of a set and combine the results (__deprecated__).} +@synopsis{Apply a function to successive elements of a set and combine the results.} @description{ Apply the function `fn` to successive elements of set `s` starting with `unit`. } @@ -229,11 +229,7 @@ int add(int x, int y) { return x + y; } reducer({10, 20, 30, 40}, add, 0); ``` } -@pitfalls{ -:::warning -This function is *deprecated*, use a reducer expression instead, such as `(init | fn(it,e) | e <- st)`. -::: -} +@deprecated{Use a reducer expression instead, such as `(init | fn(it,e) | e <- st)`.} public &T reducer(set[&T] st, &T (&T,&T) fn, &T unit) = (unit | fn(it,elm) | elm <- st); From 0ac1c4a6dcc3d55bd603dca991d14a3ea2b48f9c Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Thu, 31 Oct 2024 16:30:24 +0100 Subject: [PATCH 17/21] added documentation --- .../library/analysis/diff/edits/TextEdits.rsc | 49 +++++++++++++++++-- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/src/org/rascalmpl/library/analysis/diff/edits/TextEdits.rsc b/src/org/rascalmpl/library/analysis/diff/edits/TextEdits.rsc index 55cf05f948b..2957ca920e5 100644 --- a/src/org/rascalmpl/library/analysis/diff/edits/TextEdits.rsc +++ b/src/org/rascalmpl/library/analysis/diff/edits/TextEdits.rsc @@ -1,5 +1,33 @@ +@license{ +Copyright (c) 2022, NWO-I Centrum Wiskunde & Informatica (CWI) +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +} +@synopsis{Intermediate representation for file creation, removal and changing, including textual (string) rewriting.} +@description{ +((DocumentEdit))s can be produced by source-to-source transformation tools, and then executed +via ((executeDocumentEdits)) in the REPL or ((applyDocumentsEdits)) by the IDE. +} +@benefits{ +* Document edits can be attached to ((data:CodeAction))s and error ((data:Message))s, to achieve interactive +source code rewriting utilities. +* Document edits can be tested via ((executeDocumentEdits)) +* Document edits can be "high fidelity", avoiding unnecessary damage to a source text. +} +@pitfalls{ +* Code edits depend on a specific state of the source file that may be transient while editing. Use the ((CodeAction)) interface +to avoid racing for the state of the source file. +} module analysis::diff::edits::TextEdits +@synopsis{File changing operations} data DocumentEdit = removed(loc file) | created(loc file) @@ -7,9 +35,24 @@ data DocumentEdit | changed(loc file, list[TextEdit] edits) ; +@synopsis{String rewriting operations} +@description{ +The core operation is to replace a substring with another. +The replace operator uses a `loc` value to point to a range inside a string, +and a `str` as its replacement. +} data TextEdit - = replace(loc range, str replacement) - ; + = replace(loc range, str replacement); + +@synopsis{Deletion is replacement with an empty string.} +TextEdit delete(loc range) + = replace(range, ""); -TextEdit delete(loc range) = replace(range, ""); +@synopsis{Inserting before a given range.} +TextEdit insertBefore(loc range, str insertion, str separator=" ") + = replace(range.top(range.offset, 0), ""); +@synopsis{Inserting after a given range.} +TextEdit insertAfter(loc range, str insertion, str separator=" ") + = replace(range.top(range.offset + range.length, 0), ""); + \ No newline at end of file From b74692dbeddccd94d60bacdb4c46e7268b40c4f1 Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Thu, 31 Oct 2024 16:36:19 +0100 Subject: [PATCH 18/21] fixed --- src/org/rascalmpl/library/analysis/diff/edits/TextEdits.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/rascalmpl/library/analysis/diff/edits/TextEdits.rsc b/src/org/rascalmpl/library/analysis/diff/edits/TextEdits.rsc index 2957ca920e5..ca104095d47 100644 --- a/src/org/rascalmpl/library/analysis/diff/edits/TextEdits.rsc +++ b/src/org/rascalmpl/library/analysis/diff/edits/TextEdits.rsc @@ -16,7 +16,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND via ((executeDocumentEdits)) in the REPL or ((applyDocumentsEdits)) by the IDE. } @benefits{ -* Document edits can be attached to ((data:CodeAction))s and error ((data:Message))s, to achieve interactive +* Document edits can be attached to ((data:CodeAction))s and error ((util::IDEServices-Message))s, to achieve interactive source code rewriting utilities. * Document edits can be tested via ((executeDocumentEdits)) * Document edits can be "high fidelity", avoiding unnecessary damage to a source text. From a10f8cd911fac2bdc2bc0d9cb550597a761e6740 Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Fri, 1 Nov 2024 18:14:37 +0100 Subject: [PATCH 19/21] Update TextEdits.rsc Added a convenience function to avoid having to repeat the file location again. --- src/org/rascalmpl/library/analysis/diff/edits/TextEdits.rsc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/org/rascalmpl/library/analysis/diff/edits/TextEdits.rsc b/src/org/rascalmpl/library/analysis/diff/edits/TextEdits.rsc index ca104095d47..8721673cd72 100644 --- a/src/org/rascalmpl/library/analysis/diff/edits/TextEdits.rsc +++ b/src/org/rascalmpl/library/analysis/diff/edits/TextEdits.rsc @@ -35,6 +35,10 @@ data DocumentEdit | changed(loc file, list[TextEdit] edits) ; +@synopsis{Shorthand for file changes.} +DocumentEdit changed(list[TextEdit] edits:[replace(loc l, str _), *_]) + = changed(l.top, edits); + @synopsis{String rewriting operations} @description{ The core operation is to replace a substring with another. @@ -55,4 +59,4 @@ TextEdit insertBefore(loc range, str insertion, str separator=" ") @synopsis{Inserting after a given range.} TextEdit insertAfter(loc range, str insertion, str separator=" ") = replace(range.top(range.offset + range.length, 0), ""); - \ No newline at end of file + From d95267f74c835d998409073fc3ab5e05684cb423 Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Tue, 5 Nov 2024 08:37:29 +0100 Subject: [PATCH 20/21] prevent crash of modules that import util::IDEServices outside of the IDE environment --- src/org/rascalmpl/interpreter/utils/JavaBridge.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/org/rascalmpl/interpreter/utils/JavaBridge.java b/src/org/rascalmpl/interpreter/utils/JavaBridge.java index 201703578f1..71362ef5f39 100644 --- a/src/org/rascalmpl/interpreter/utils/JavaBridge.java +++ b/src/org/rascalmpl/interpreter/utils/JavaBridge.java @@ -45,6 +45,7 @@ import org.rascalmpl.exceptions.JavaCompilation; import org.rascalmpl.exceptions.JavaMethodLink; import org.rascalmpl.exceptions.RuntimeExceptionFactory; +import org.rascalmpl.ideservices.BasicIDEServices; import org.rascalmpl.ideservices.IDEServices; import org.rascalmpl.interpreter.Configuration; import org.rascalmpl.interpreter.IEvaluator; @@ -445,7 +446,7 @@ else if (formals[i].isAssignableFrom(IDEServices.class)) { args[i] = (IDEServices) monitor; } else { - throw new IllegalArgumentException("no IDE services are available in this environment"); + args[i] = new BasicIDEServices(err, monitor); } } else if (formals[i].isAssignableFrom(IResourceLocationProvider.class)) { From 417887b78e7fd43da62768ce98a6ae07492bc438 Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Tue, 5 Nov 2024 08:41:16 +0100 Subject: [PATCH 21/21] added doc string --- .../interpreter/utils/IResourceLocationProvider.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/org/rascalmpl/interpreter/utils/IResourceLocationProvider.java b/src/org/rascalmpl/interpreter/utils/IResourceLocationProvider.java index 4721bbb4391..36b5521f36c 100644 --- a/src/org/rascalmpl/interpreter/utils/IResourceLocationProvider.java +++ b/src/org/rascalmpl/interpreter/utils/IResourceLocationProvider.java @@ -4,6 +4,14 @@ import io.usethesource.vallang.ISourceLocation; +/** + * This is a injected configuration parameter of a Rascal run-time + * environment like IRascalMonitor and IDEServices. The goal is + * to find all the file names that have the given `fileName` in + * the current run-time environment. For compiled Rascal this would + * be ClassLoader.findResources, while for the interpreter it is + * typically a search through all the roots of the source folders. + */ public interface IResourceLocationProvider { Set findResources(String fileName); }