Skip to content

Commit

Permalink
Clean up code.
Browse files Browse the repository at this point in the history
  • Loading branch information
toinehartman committed Dec 23, 2024
1 parent c81ff47 commit b3f0dc9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,9 @@ private ITree getCursorFromPosition(ISourceLocation file, ITree moduleTree, Posi
// Find all trees containing the cursor, in ascending order of size
IList focusList = TreeSearch.computeFocusList(moduleTree, rascalCursorPos.getLine(), rascalCursorPos.getCharacter());
List<String> sortNames = focusList.stream()
.map(tree -> ProductionAdapter.getSortName(TreeAdapter.getProduction((ITree) tree)))
.map(ITree.class::cast)
.map(TreeAdapter::getProduction)
.map(ProductionAdapter::getSortName)
.collect(Collectors.toList());

int qNameIdx = sortNames.indexOf("QualifiedName");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@ public void didRenameFiles(RenameFilesParams params) {
.map(f -> Locations.toLoc(f.getUri()))
.collect(Collectors.toSet())
, getExecuter()
).thenAccept(folders -> ((RascalTextDocumentService) docService).didRenameFiles(params, folders));
).thenAccept(folders -> docService.didRenameFiles(params, folders));
}
}

0 comments on commit b3f0dc9

Please sign in to comment.