mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
Fall back to using previous methhod of java syntax highlighting
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user