Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ private WurstCompilerJassImpl getCompiler(WurstGui gui) {
}

private void updateModel(CompilationUnit cu, WurstGui gui) {
WLogger.info("update model with " + cu.getCuInfo().getFile());
WLogger.trace("update model with " + cu.getCuInfo().getFile());
parseErrors.put(wFile(cu), new ArrayList<>(gui.getErrorsAndWarnings()));

WurstModel model2 = model;
Expand Down Expand Up @@ -518,23 +518,26 @@ private CompilationUnit replaceCompilationUnit(WFile filename, String contents,
}
if (fileHashcodes.containsKey(filename)) {
int oldHash = fileHashcodes.get(filename);
WLogger.info("oldHash = " + oldHash + " == " + contents.hashCode());
if (oldHash == contents.hashCode()) {
// no change
WLogger.info("CU " + filename + " was unchanged.");
WLogger.trace("CU " + filename + " was unchanged.");
return getCompilationUnit(filename);
} else {
WLogger.info("CU changed. oldHash = " + oldHash + " == " + contents.hashCode());
}
}

WLogger.info("replace CU " + filename);
WLogger.trace("replace CU " + filename);
WurstGui gui = new WurstGuiLogger();
WurstCompilerJassImpl c = getCompiler(gui);
CompilationUnit cu = c.parse(filename.toString(), new StringReader(contents));
cu.getCuInfo().setFile(filename.toString());
updateModel(cu, gui);
fileHashcodes.put(filename, contents.hashCode());
if (reportErrors) {
WLogger.info("found " + gui.getErrorCount() + " errors in file " + filename);
if (gui.getErrorCount() > 0) {
WLogger.info("found " + gui.getErrorCount() + " errors in file " + filename);
}
reportErrors("sync cu " + filename, filename, gui.getErrorsAndWarnings());
}
return cu;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ public CompletableFuture<List<? extends SymbolInformation>> symbol(WorkspaceSymb

@Override
public void didChangeConfiguration(DidChangeConfigurationParams params) {
WLogger.info("didChangeConfiguration");
WLogger.trace("didChangeConfiguration");

}

@Override
public void didChangeWatchedFiles(DidChangeWatchedFilesParams params) {
WLogger.info("didChangeWatchedFiles");
WLogger.trace("didChangeWatchedFiles");
server.worker().handleFileChanged(params);
}

Expand Down