File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
exts/ext-container/src/241/main/kotlin/cc/unitmesh/container Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -9,24 +9,17 @@ import com.intellij.docker.deploymentSource.DockerImageDeploymentSourceType
9
9
import com.intellij.docker.runtimes.DockerServerRuntime
10
10
import com.intellij.execution.configurations.RunConfiguration
11
11
import com.intellij.execution.configurations.RunProfile
12
- import com.intellij.openapi.application.runReadAction
13
12
import com.intellij.openapi.project.Project
14
13
import com.intellij.openapi.vfs.VirtualFile
15
- import com.intellij.psi.PsiManager
16
14
import com.intellij.remoteServer.ServerType
17
15
import com.intellij.remoteServer.configuration.RemoteServer
18
16
import com.intellij.remoteServer.configuration.RemoteServersManager
19
17
import kotlinx.coroutines.future.await
20
18
21
19
class RunDockerfileService : RunService {
22
20
override fun isApplicable (project : Project , file : VirtualFile ): Boolean {
23
- if (file.name == " Dockerfile" ) {
24
- return true
25
- }
26
-
27
- return runReadAction {
28
- PsiManager .getInstance(project).findFile(file)?.language?.displayName == " Dockerfile"
29
- }
21
+ if (file.name == " Dockerfile" ) return true
22
+ return file.extension == " Dockerfile"
30
23
}
31
24
32
25
override fun runConfigurationClass (project : Project ): Class <out RunProfile >? = null
You can’t perform that action at this time.
0 commit comments