Skip to content
Open
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
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ jobs:
java-version: '17'
distribution: 'temurin'

- name: Build 2023.1
- name: Build 2024.3
env:
IDEA_VER: 231
IDEA_VER: 243
run: ./gradlew buildPlugin

- name: Upload artifact
uses: actions/upload-artifact@v3.1.0
uses: actions/upload-artifact@v4
with:
name: v${{ env.CI_BUILD_VERSION }}
path: build/distributions/*.zip
55 changes: 15 additions & 40 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,38 +41,13 @@ data class BuildData(

val buildDataList = listOf(
BuildData(
ideaSDKShortVersion = "231",
// 223.7571.123-EAP-SNAPSHOT
// LATEST-EAP-SNAPSHOT
ideaSDKVersion = "233.11799.6-EAP-SNAPSHOT",
sinceBuild = "232",
untilBuild = "233.*",
ideaSDKShortVersion = "243",
ideaSDKVersion = "243.21565.193",
sinceBuild = "243",
untilBuild = "243.*",
bunch = "212",
targetCompatibilityLevel = JavaVersion.VERSION_17,
jvmTarget = "17"
),
BuildData(
ideaSDKShortVersion = "223",
ideaSDKVersion = "2022.3",
sinceBuild = "223",
untilBuild = "223.*",
bunch = "212",
targetCompatibilityLevel = JavaVersion.VERSION_17,
jvmTarget = "17"
),
BuildData(
ideaSDKShortVersion = "222",
ideaSDKVersion = "2022.2",
sinceBuild = "212",
untilBuild = "222.*",
bunch = "212"
),
BuildData(
ideaSDKShortVersion = "211",
ideaSDKVersion = "2021.1",
sinceBuild = "211",
untilBuild = "211.*",
bunch = "203"
)
)

Expand Down Expand Up @@ -211,15 +186,15 @@ project(":") {
doLast {
val rev = getRev()
// reset
exec {
executable = "git"
args("reset", "HEAD", "--hard")
}
//exec {
//executable = "git"
//args("reset", "HEAD", "--hard")
//}
// clean untracked files
exec {
executable = "git"
args("clean", "-d", "-f")
}
//exec {
//executable = "git"
//args("clean", "-d", "-f")
//}
// switch
exec {
executable = if (isWin) "bunch/bin/bunch.bat" else "bunch/bin/bunch"
Expand Down Expand Up @@ -253,9 +228,9 @@ project(":") {
untilBuild.set(buildVersionData.untilBuild)
}

instrumentCode {
compilerVersion.set(buildVersionData.instrumentCodeCompilerVersion)
}
//instrumentCode {
// compilerVersion.set(buildVersionData.instrumentCodeCompilerVersion)
//}

publishPlugin {
token.set(System.getenv("IDEA_PUBLISH_TOKEN"))
Expand Down
84 changes: 83 additions & 1 deletion gen/com/tang/intellij/lua/psi/impl/LuaCallExprImpl.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -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

/**
Expand Down Expand Up @@ -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()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,18 @@ public class LuaAppSettingsEditor extends SettingsEditor<LuaAppRunConfiguration>
private EnvironmentVariablesTextFieldWithBrowseButton myEnvironments;
private ComboBox<String> outputCharset;
private JCheckBox showConsoleWindowCheckBox;
private Project project;
private final Project project;

LuaAppSettingsEditor(Project project) {
this.project = project;
FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor();
myProgram.addBrowseFolderListener("Choose Program", "Choose program file", project, descriptor);
descriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
myWorkingDir.addBrowseFolderListener("Choose Working Dir", "Choose working dir", project, descriptor);
FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor()
.withTitle("Choose Program")
.withDescription("Choose program file");
myProgram.addBrowseFolderListener(project, descriptor);
descriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor()
.withTitle("Choose Working Dir")
.withDescription("Choose working dir");
myWorkingDir.addBrowseFolderListener(project, descriptor);

DebuggerType[] debuggerTypes = new DebuggerType[] { DebuggerType.Mob };
/*if (SystemInfoRt.isWindows)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -45,6 +44,7 @@ abstract class EmmyDebugProcessBase(session: XDebugSession) : LuaDebugProcess(se

override fun sessionInitialized() {
super.sessionInitialized()
session.setPauseActionSupported(true)
ApplicationManager.getApplication().executeOnPooledThread {
setupTransporter()
}
Expand All @@ -69,6 +69,7 @@ abstract class EmmyDebugProcessBase(session: XDebugSession) : LuaDebugProcess(se
registerBreakpoint(position, breakpoint)
}
}
session.setPauseActionSupported(true);
// send ready
transporter?.send(Message(MessageCMD.ReadyReq))
}
Expand Down Expand Up @@ -168,11 +169,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()
}
}
Expand Down Expand Up @@ -208,7 +211,6 @@ abstract class EmmyDebugProcessBase(session: XDebugSession) : LuaDebugProcess(se
override fun getEditorsProvider(): XDebuggerEditorsProvider {
return editorsProvider
}

fun addEvalResultHandler(handler: IEvalResultHandler) {
evalHandlers.add(handler)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}*/
}
}

Expand Down
Loading