Skip to content

Commit

Permalink
feat(testing): add webstorm version to build.gradle.kts
Browse files Browse the repository at this point in the history
Add the `webstormVersion` property to the `build.gradle.kts` file to specify the version of WebStorm IDE to be used. This allows for easier management of IDE versions in the project.
  • Loading branch information
phodal committed Jan 16, 2024
1 parent e7a3a93 commit 363329b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Expand Up @@ -86,13 +86,13 @@ val platformVersion = prop("platformVersion").toInt()
val ideaVersion = prop("ideaVersion")
val golandVersion = prop("golandVersion")
val pycharmVersion = prop("pycharmVersion")

val webstormVersion = prop("webstormVersion")

val baseVersion = when (baseIDE) {
"idea" -> ideaVersion
"pycharm" -> pycharmVersion
"goland" -> golandVersion
// "webstorm" -> prop("webstormVersion")
// "javascript" -> webstormVersion
"clion" -> clionVersion
"rider" -> riderVersion
else -> error("Unexpected IDE name: `$baseIDE`")
Expand Down
Expand Up @@ -8,7 +8,8 @@ import cc.unitmesh.ide.javascript.util.JSPsiUtil
import cc.unitmesh.ide.javascript.util.LanguageApplicableUtil
import com.intellij.execution.configurations.RunProfile
import com.intellij.lang.javascript.buildTools.npm.rc.NpmRunConfiguration
import com.intellij.lang.javascript.psi.*
import com.intellij.lang.javascript.psi.JSFunction
import com.intellij.lang.javascript.psi.JSVarStatement
import com.intellij.lang.javascript.psi.ecmal4.JSClass
import com.intellij.openapi.application.ReadAction
import com.intellij.openapi.application.runReadAction
Expand All @@ -17,12 +18,12 @@ import com.intellij.openapi.project.Project
import com.intellij.openapi.project.guessProjectDir
import com.intellij.openapi.vfs.LocalFileSystem
import com.intellij.openapi.vfs.VfsUtil
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.openapi.vfs.findDirectory
import com.intellij.psi.*
import com.intellij.psi.PsiDirectory
import com.intellij.psi.PsiElement
import com.intellij.psi.PsiFile
import com.intellij.psi.PsiManager
import com.intellij.psi.util.PsiTreeUtil
import java.io.File
import java.io.IOException
import java.nio.file.Path
import kotlin.io.path.Path

Expand Down
Expand Up @@ -52,7 +52,7 @@ abstract class WriteTestService : LazyExtensionInstance<WriteTestService>() {
}

val configurationSettings =
runManager.findConfigurationByTypeAndName(testConfig.getType(), testConfig.name)
runManager.findConfigurationByTypeAndName(testConfig.type, testConfig.name)

if (configurationSettings == null) {
log.warn("Failed to find test configuration for: ${virtualFile.nameWithoutExtension}")
Expand Down

0 comments on commit 363329b

Please sign in to comment.