Skip to content

Commit ffa8030

Browse files
committed
feat: Add script path to run config and enhance dir listing checks
1 parent d24b458 commit ffa8030

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

core/src/main/kotlin/cc/unitmesh/devti/gui/snippet/AutoDevRunAction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import com.intellij.openapi.project.DumbAwareAction
1111
import com.intellij.psi.PsiManager
1212
import java.io.File
1313

14-
class AutoDevRunAction : DumbAwareAction() {
14+
class AutoDevRunAction : DumbAwareAction("Run this file") {
1515
override fun getActionUpdateThread(): ActionUpdateThread = ActionUpdateThread.EDT
1616

1717
override fun update(e: AnActionEvent) {

exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/compiler/exec/DirInsCommand.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class DirInsCommand(private val myProject: Project, private val dir: String) : I
4747

4848
private fun listDirectory(project: Project, directory: PsiDirectory, depth: Int) {
4949
val isExclude = ProjectFileIndex.getInstance(project).isUnderIgnored(directory.virtualFile)
50+
|| ProjectFileIndex.getInstance(project).isExcluded(directory.virtualFile)
5051
if (isExclude) {
5152
return
5253
}

exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/compiler/service/DevInRunService.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ class DevInRunService : RunService {
3232

3333
runConfiguration.showConsole = !isFromToolAction
3434

35+
runConfiguration.setScriptPath(virtualFile.path)
36+
3537
val executorInstance = DefaultRunExecutor.getRunExecutorInstance()
3638
val builder = ExecutionEnvironmentBuilder.createOrNull(executorInstance, runConfiguration)
3739
?: return null

0 commit comments

Comments
 (0)