File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
core/src/main/kotlin/cc/unitmesh/devti/sketch/run Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ import com.intellij.openapi.progress.Task
27
27
import com.intellij.openapi.progress.impl.BackgroundableProcessIndicator
28
28
import com.intellij.openapi.project.Project
29
29
import com.intellij.openapi.project.ProjectManager
30
- import com.intellij.openapi.projectRoots.JavaSdk
31
30
import com.intellij.openapi.projectRoots.ProjectJdkTable
32
31
import com.intellij.openapi.projectRoots.Sdk
33
32
import com.intellij.openapi.roots.ProjectRootManager
@@ -194,14 +193,14 @@ class ProcessExecutor(val project: Project) {
194
193
companion object {
195
194
fun getJdkVersion (project : Project ): String? {
196
195
val projectSdk = ProjectRootManager .getInstance(project).projectSdk
197
- if (projectSdk != null && projectSdk.sdkType is JavaSdk ) {
196
+ if (projectSdk != null && projectSdk.sdkType.name == " JavaSDK " ) {
198
197
return projectSdk.homePath
199
198
}
200
199
201
200
val projectJdkTable = ProjectJdkTable .getInstance()
202
201
if (projectJdkTable.allJdks.isNotEmpty()) {
203
202
for (jdk in projectJdkTable.allJdks) {
204
- if (jdk.sdkType is JavaSdk ) {
203
+ if (jdk.sdkType.name == " JavaSDK " ) {
205
204
return jdk.homePath
206
205
}
207
206
}
You can’t perform that action at this time.
0 commit comments