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
2727import com.intellij.openapi.progress.impl.BackgroundableProcessIndicator
2828import com.intellij.openapi.project.Project
2929import com.intellij.openapi.project.ProjectManager
30- import com.intellij.openapi.projectRoots.JavaSdk
3130import com.intellij.openapi.projectRoots.ProjectJdkTable
3231import com.intellij.openapi.projectRoots.Sdk
3332import com.intellij.openapi.roots.ProjectRootManager
@@ -194,14 +193,14 @@ class ProcessExecutor(val project: Project) {
194193 companion object {
195194 fun getJdkVersion (project : Project ): String? {
196195 val projectSdk = ProjectRootManager .getInstance(project).projectSdk
197- if (projectSdk != null && projectSdk.sdkType is JavaSdk ) {
196+ if (projectSdk != null && projectSdk.sdkType.name == " JavaSDK " ) {
198197 return projectSdk.homePath
199198 }
200199
201200 val projectJdkTable = ProjectJdkTable .getInstance()
202201 if (projectJdkTable.allJdks.isNotEmpty()) {
203202 for (jdk in projectJdkTable.allJdks) {
204- if (jdk.sdkType is JavaSdk ) {
203+ if (jdk.sdkType.name == " JavaSDK " ) {
205204 return jdk.homePath
206205 }
207206 }
You can’t perform that action at this time.
0 commit comments