From d0ad7b23625561df0270528b6c6b7bacd961aa12 Mon Sep 17 00:00:00 2001 From: tangzx Date: Sun, 17 Nov 2024 23:41:57 +0800 Subject: [PATCH] fix compatibility verification issues --- build.gradle.kts | 2 +- .../com/tang/intellij/lua/debugger/LuaDebugProcess.kt | 7 ++++--- .../intellij/lua/debugger/emmy/EmmyDebugProcessBase.kt | 7 ++++--- .../tang/intellij/lua/debugger/remote/value/LuaRTable.kt | 9 +++++---- .../lua/project/LuaLibraryRootsComponentDescriptor.kt | 5 +++-- .../lua/refactoring/rename/LuaIntroduceVarHandler.kt | 6 +----- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 065e5c0d4..d7b4c6bc5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -42,7 +42,7 @@ data class BuildData( val buildDataList = listOf( BuildData( ideaSDKShortVersion = "243", - ideaSDKVersion = "243-EAP-SNAPSHOT", + ideaSDKVersion = "243.21565.193", sinceBuild = "232", untilBuild = "243.*", bunch = "212", diff --git a/src/main/java/com/tang/intellij/lua/debugger/LuaDebugProcess.kt b/src/main/java/com/tang/intellij/lua/debugger/LuaDebugProcess.kt index aca995bf3..f6b2c3f60 100644 --- a/src/main/java/com/tang/intellij/lua/debugger/LuaDebugProcess.kt +++ b/src/main/java/com/tang/intellij/lua/debugger/LuaDebugProcess.kt @@ -32,7 +32,6 @@ import com.intellij.xdebugger.breakpoints.XBreakpointHandler import com.intellij.xdebugger.breakpoints.XBreakpointProperties import com.intellij.xdebugger.breakpoints.XLineBreakpoint import com.intellij.xdebugger.frame.XSuspendContext -import com.intellij.xdebugger.impl.XDebugSessionImpl import com.intellij.xdebugger.impl.actions.XDebuggerActions /** @@ -144,11 +143,13 @@ abstract class LuaDebugProcess protected constructor(session: XDebugSession) : X } } else { ApplicationManager.getApplication().invokeLater { - val se = session + // todo: fix "Internal classes usages" & "Internal methods usages" problem + /*val se = session if (se is XDebugSessionImpl) se.positionReached(LuaSuspendContext(stack), true) else - se.positionReached(LuaSuspendContext(stack)) + se.positionReached(LuaSuspendContext(stack))*/ + session.positionReached(LuaSuspendContext(stack)) session.showExecutionPoint() } } diff --git a/src/main/java/com/tang/intellij/lua/debugger/emmy/EmmyDebugProcessBase.kt b/src/main/java/com/tang/intellij/lua/debugger/emmy/EmmyDebugProcessBase.kt index 69fba873e..22e8ea925 100644 --- a/src/main/java/com/tang/intellij/lua/debugger/emmy/EmmyDebugProcessBase.kt +++ b/src/main/java/com/tang/intellij/lua/debugger/emmy/EmmyDebugProcessBase.kt @@ -26,7 +26,6 @@ import com.intellij.xdebugger.XSourcePosition import com.intellij.xdebugger.breakpoints.XLineBreakpoint import com.intellij.xdebugger.evaluation.XDebuggerEditorsProvider import com.intellij.xdebugger.frame.XSuspendContext -import com.intellij.xdebugger.impl.XDebugSessionImpl import com.tang.intellij.lua.debugger.* import com.tang.intellij.lua.psi.LuaFileManager import com.tang.intellij.lua.psi.LuaFileUtil @@ -168,11 +167,13 @@ abstract class EmmyDebugProcessBase(session: XDebugSession) : LuaDebugProcess(se } } else { ApplicationManager.getApplication().invokeLater { - val se = session + // todo: fix "Internal classes usages" & "Internal methods usages" problem + /*val se = session if (se is XDebugSessionImpl) se.positionReached(LuaSuspendContext(stack), true) else - se.positionReached(LuaSuspendContext(stack)) + se.positionReached(LuaSuspendContext(stack))*/ + session.positionReached(LuaSuspendContext(stack)) session.showExecutionPoint() } } diff --git a/src/main/java/com/tang/intellij/lua/debugger/remote/value/LuaRTable.kt b/src/main/java/com/tang/intellij/lua/debugger/remote/value/LuaRTable.kt index 7acc5d690..2dd50ab16 100644 --- a/src/main/java/com/tang/intellij/lua/debugger/remote/value/LuaRTable.kt +++ b/src/main/java/com/tang/intellij/lua/debugger/remote/value/LuaRTable.kt @@ -19,7 +19,6 @@ package com.tang.intellij.lua.debugger.remote.value import com.intellij.icons.AllIcons import com.intellij.xdebugger.evaluation.XDebuggerEvaluator import com.intellij.xdebugger.frame.* -import com.intellij.xdebugger.impl.XDebugSessionImpl import com.tang.intellij.lua.debugger.remote.LuaMobDebugProcess import org.luaj.vm2.LuaValue @@ -75,11 +74,13 @@ class LuaRTable(name: String) : LuaRValue(name) { override fun evaluated(tv: XValue) { //////////tmp solution,非栈顶帧处理 - var tableValue = tv - if (data != null && !(process.session as XDebugSessionImpl).isTopFrameSelected) - tableValue = LuaRValue.create(myName, data as LuaValue, myName, process.session) + // todo: fix "Internal classes usages" & "Internal methods usages" problem + //var tableValue = tv + //if (data != null && !(process.session as XDebugSessionImpl).isTopFrameSelected) + // tableValue = LuaRValue.create(myName, data as LuaValue, myName, process.session) ////////// + val tableValue = tv val list = XValueChildrenList() val tbl = tableValue as? LuaRTable ?: return val table = tbl.data?.checktable() diff --git a/src/main/java/com/tang/intellij/lua/project/LuaLibraryRootsComponentDescriptor.kt b/src/main/java/com/tang/intellij/lua/project/LuaLibraryRootsComponentDescriptor.kt index ee63c5c8d..66b6452ab 100644 --- a/src/main/java/com/tang/intellij/lua/project/LuaLibraryRootsComponentDescriptor.kt +++ b/src/main/java/com/tang/intellij/lua/project/LuaLibraryRootsComponentDescriptor.kt @@ -34,13 +34,14 @@ open class LuaLibraryRootsComponentDescriptor : LibraryRootsComponentDescriptor( override fun createAttachFilesChooserDescriptor(libraryName: String?): FileChooserDescriptor { return object : FileChooserDescriptor(super.createAttachFilesChooserDescriptor(libraryName)) { - override fun isFileVisible(file: VirtualFile, showHiddenFiles: Boolean): Boolean { + // todo: fix "Non-extendable method usage violation" problem + /*override fun isFileVisible(file: VirtualFile, showHiddenFiles: Boolean): Boolean { if (file.isDirectory) return true val ext = file.extension return ext != null && ext.equals("zip", ignoreCase = true) - } + }*/ } } diff --git a/src/main/java/com/tang/intellij/lua/refactoring/rename/LuaIntroduceVarHandler.kt b/src/main/java/com/tang/intellij/lua/refactoring/rename/LuaIntroduceVarHandler.kt index c0868064f..32cba9310 100644 --- a/src/main/java/com/tang/intellij/lua/refactoring/rename/LuaIntroduceVarHandler.kt +++ b/src/main/java/com/tang/intellij/lua/refactoring/rename/LuaIntroduceVarHandler.kt @@ -22,15 +22,11 @@ import com.intellij.openapi.command.WriteCommandAction import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Project import com.intellij.openapi.util.Pass -import com.intellij.psi.PsiDocumentManager -import com.intellij.psi.PsiElement -import com.intellij.psi.PsiFile -import com.intellij.psi.SmartPsiElementPointer +import com.intellij.psi.* import com.intellij.psi.util.PsiTreeUtil import com.intellij.refactoring.RefactoringActionHandler import com.intellij.refactoring.introduce.inplace.InplaceVariableIntroducer import com.intellij.refactoring.introduce.inplace.OccurrencesChooser -import com.intellij.refactoring.suggested.createSmartPointer import com.tang.intellij.lua.psi.* import com.tang.intellij.lua.refactoring.LuaRefactoringUtil