mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
Update editor to version 0.17.1
This commit is contained in:
@@ -291,7 +291,7 @@ open class EditorActionsMenu constructor(val editor: IDEEditor) :
|
||||
) // For LSP actions, as they cannot access IDEEditor class
|
||||
data.put(File::class.java, editor.file)
|
||||
data.put(DiagnosticItem::class.java, getDiagnosticAtCursor())
|
||||
data.put(com.itsaky.androidide.models.Range::class.java, editor.cursorRange)
|
||||
data.put(com.itsaky.androidide.models.Range::class.java, editor.cursorLSPRange)
|
||||
data.put(
|
||||
JavaLanguageServer::class.java,
|
||||
ILanguageServerRegistry.getDefault().getServer(JavaLanguageServer.SERVER_ID)
|
||||
@@ -308,7 +308,7 @@ open class EditorActionsMenu constructor(val editor: IDEEditor) :
|
||||
protected open fun getMenu(): Menu = menu
|
||||
|
||||
private fun getDiagnosticAtCursor(): DiagnosticItem? {
|
||||
val start = editor.cursorRange.start
|
||||
val start = editor.cursorLSPRange.start
|
||||
return editor.languageClient?.getDiagnosticAt(editor.file, start.line, start.column)
|
||||
}
|
||||
|
||||
|
||||
@@ -714,7 +714,7 @@ public class IDEEditor extends CodeEditor {
|
||||
CompletableFuture.supplyAsync(
|
||||
() ->
|
||||
languageServer.expandSelection(
|
||||
new ExpandSelectionParams(getFile().toPath(), getCursorRange())));
|
||||
new ExpandSelectionParams(getFile().toPath(), getCursorLSPRange())));
|
||||
|
||||
future.whenComplete(
|
||||
((range, throwable) -> {
|
||||
@@ -735,7 +735,7 @@ public class IDEEditor extends CodeEditor {
|
||||
*
|
||||
* @return The {@link Range} of the cursor.
|
||||
*/
|
||||
public Range getCursorRange() {
|
||||
public Range getCursorLSPRange() {
|
||||
final var cursor = getCursor();
|
||||
final var start = new Position(cursor.getLeftLine(), cursor.getLeftColumn());
|
||||
final var end = new Position(cursor.getRightLine(), cursor.getRightColumn());
|
||||
@@ -748,7 +748,7 @@ public class IDEEditor extends CodeEditor {
|
||||
* @return The {@link Position} of the cursor.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public Position getCursorAsLSPPosition() {
|
||||
public Position getCursorLSPPosition() {
|
||||
return new Position(getCursor().getLeftLine(), getCursor().getLeftColumn());
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ ext {
|
||||
]
|
||||
|
||||
common = [
|
||||
editor : 'io.github.Rosemoe.sora-editor:editor:0.16.5',
|
||||
editor : 'io.github.Rosemoe.sora-editor:editor:0.17.1',
|
||||
utilcode : 'com.blankj:utilcodex:1.31.0',
|
||||
glide : 'com.github.bumptech.glide:glide:4.13.2',
|
||||
glide_ap : 'com.github.bumptech.glide:compiler:4.13.2',
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user