Skip to content

Commit

Permalink
Fixes after PR review.
Browse files Browse the repository at this point in the history
  • Loading branch information
toinehartman committed Dec 9, 2024
1 parent a62056b commit 841ef40
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.eclipse.lsp4j.services.TextDocumentService;
import org.rascalmpl.vscode.lsp.terminal.ITerminalIDEServer.LanguageParameter;
import org.rascalmpl.vscode.lsp.util.locations.LineColumnOffsetMap;

import io.usethesource.vallang.ISourceLocation;
import io.usethesource.vallang.IValue;

Expand All @@ -47,7 +48,6 @@ public interface IBaseTextDocumentService extends TextDocumentService {
void unregisterLanguage(LanguageParameter lang);
CompletableFuture<IValue> executeCommand(String languageName, String command);
LineColumnOffsetMap getColumnMap(ISourceLocation file);
String getContents(ISourceLocation file);

default void didRenameFiles(RenameFilesParams params, Set<ISourceLocation> workspaceFolders) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ public LineColumnOffsetMap getColumnMap(ISourceLocation file) {
return columns.get(file);
}

@Override
public String getContents(ISourceLocation file) {
file = file.top();
TextDocumentState ideState = files.get(file);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,9 @@ private ISet qualfiedNameChangesFromRenames(List<FileRename> renames, Set<ISourc
}

public InterruptibleFuture<ITuple> getModuleRenames(List<FileRename> fileRenames, Set<ISourceLocation> workspaceFolders, Function<ISourceLocation, PathConfig> getPathConfig) {
var emptyResult = VF.tuple(VF.list(), VF.map());
if (fileRenames.isEmpty()) {
return InterruptibleFuture.completedFuture(null);
return InterruptibleFuture.completedFuture(emptyResult);
}

final ISet qualifiedNameChanges = qualfiedNameChangesFromRenames(fileRenames, workspaceFolders, getPathConfig);
Expand All @@ -312,7 +313,7 @@ public InterruptibleFuture<ITuple> getModuleRenames(List<FileRename> fileRenames
} catch (Throw e) {
throw new RuntimeException(e.getMessage());
}
}, VF.tuple(VF.list(), VF.map()), exec, false, client);
}, emptyResult, exec, false, client);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ public LineColumnOffsetMap getColumnMap(ISourceLocation file) {
return columns.get(file);
}

@Override
public String getContents(ISourceLocation file) {
file = file.top();
TextDocumentState ideState = documents.get(file);
Expand Down

0 comments on commit 841ef40

Please sign in to comment.