Fall back to using previous methhod of java syntax highlighting

This commit is contained in:
Akash Yadav
2021-12-26 18:54:06 +05:30
parent 6f141fcdfa
commit 1052c5b6d3
4 changed files with 1 additions and 52 deletions
-20
View File
@@ -1,20 +0,0 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.itsaky.androidide",
"variantName": "debug",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 200,
"versionName": "2.0-beta",
"outputFile": "app-debug.apk"
}
],
"elementType": "File"
}
Binary file not shown.
@@ -91,37 +91,6 @@ public class JavaLexerImpl extends io.github.rosemoe.editor.langs.AbstractCodeAn
stringMap.clear();
if (languageServer != null && file != null) {
if (lastRequest != null && !lastRequest.isDone()) {
lastRequest.cancel(true);
}
this.lastRequest = languageServer.getTextDocumentService()
.semanticHighlights(
new SemanticHighlightsParams(
new TextDocumentIdentifier(
file.toURI().toString()
)
)
);
try {
var result = Objects.requireNonNull(this.lastRequest).get();
result = Objects.requireNonNull(result).stream()
.filter(semanticHighlight -> file.toURI().toString().equals(semanticHighlight.uri))
.collect(Collectors.toList());
if (result.size() > 0) {
setSemanticHighlights(result.get(0));
}
} catch (Throwable throwable) {
LOG.error("An error occurred while retrieving semantic highlight for Java file.", throwable);
}
}
while (delegate.shouldAnalyze()) {
// null = EOF
if (lexer.nextToken() == null)
@@ -35,7 +35,7 @@ public class ToolsManager {
private static PreferenceManager prefs;
public static final int JLS_VERSION = 26;
public static final int JLS_VERSION = 27;
public static final int LOGSENDER_VERSION = 2;
public static final String KEY_JLS_VERSION = "tools_jlsVersion";