@@ -8,13 +8,9 @@ import com.intellij.openapi.application.runReadAction
88import com.intellij.openapi.project.Project
99import com.intellij.openapi.vfs.VirtualFile
1010import com.intellij.psi.PsiElement
11- import com.phodal.shirecore.config.InteractionType
12- import com.phodal.shirecore.config.ShireActionLocation
1311import com.phodal.shirecore.provider.shire.FileRunService
14- import com.phodal.shirelang.ShireBundle
1512import com.phodal.shirelang.actions.ShireRunFileAction.Companion.executeFile
1613import com.phodal.shirelang.actions.base.DynamicShireActionConfig
17- import com.phodal.shirelang.compiler.ast.hobbit.HobbitHole
1814import com.phodal.shirelang.psi.ShireFile
1915import com.phodal.shirelang.run.ShireConfiguration
2016import com.phodal.shirelang.run.ShireConfigurationType
@@ -50,25 +46,11 @@ class ShireFileRunService : FileRunService, Disposable {
5046
5147 return setting
5248 }
53-
54- /* *
55- * Create ChatBox Run
56- */
5749 override fun runFile (project : Project , virtualFile : VirtualFile , psiElement : PsiElement ? ): String? {
5850 val settings = createRunSettings(project, virtualFile, psiElement) ? : return null
5951 val psiFile = ShireFile .lookup(project, virtualFile) ? : return null
6052
61- var config = DynamicShireActionConfig .from(psiFile)
62- if (config.hole == null ) {
63- config = config.copy(
64- hole = HobbitHole .create(
65- ShireBundle .message(" shire.actions.chat-box" ),
66- ShireBundle .message(" shire.actions.run-from-chat-box" ),
67- InteractionType .RightPanel ,
68- ShireActionLocation .CHAT_BOX
69- )
70- )
71- }
53+ val config = DynamicShireActionConfig .from(psiFile)
7254
7355 executeFile(project, config, settings)
7456 return " Running Shire file: ${virtualFile.name} "
0 commit comments