From 2977d06441d7cb38e42b1eea9cd5962f32d51913 Mon Sep 17 00:00:00 2001 From: Toine Hartman Date: Thu, 7 Nov 2024 16:29:28 +0100 Subject: [PATCH] Fix rename TModel load. --- .../src/main/rascal/lang/rascal/lsp/refactor/Rename.rsc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rascal-lsp/src/main/rascal/lang/rascal/lsp/refactor/Rename.rsc b/rascal-lsp/src/main/rascal/lang/rascal/lsp/refactor/Rename.rsc index e50b9f164..d40dc2859 100644 --- a/rascal-lsp/src/main/rascal/lang/rascal/lsp/refactor/Rename.rsc +++ b/rascal-lsp/src/main/rascal/lang/rascal/lsp/refactor/Rename.rsc @@ -549,7 +549,11 @@ list[DocumentEdit] rascalRenameSymbol(Tree cursorT, set[loc] workspaceFolders, s [logPathConfig = false]; for ( <- \files) { ms = rascalTModelForLocs([file], ccfg, dummy_compile1); - tmodels += {convertTModel2PhysicalLocs(tm) | m <- ms.tmodels, tm := ms.tmodels[m]}; + for (modName <- ms.moduleLocs) { + = getTModelForModule(modName, ms); + if (!found) throw unexpectedFailure("Cannot read TModel for module \'\'"); + tmodels += convertTModel2PhysicalLocs(tm); + } } } return tmodels;