From a07f4f6f5fec26f31f1ff2776e985774c7f427ae Mon Sep 17 00:00:00 2001 From: ice1000 Date: Sat, 30 Mar 2019 00:08:59 -0400 Subject: [PATCH] [ resolve ] Fix resolving and find usages --- build.gradle.kts | 32 ++++++++------ docs/change-notes.html | 2 + .../julia/lang/psi/impl/julia-psi-mixin.kt | 44 ++++++------------- .../ice1000/julia/lang/psi/julia-resolving.kt | 4 +- src/org/ice1000/julia/lang/utils.kt | 1 + 5 files changed, 38 insertions(+), 45 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index f66da5c7..96fff7b7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -30,30 +30,36 @@ version = pluginVersion plugins { java - id("org.jetbrains.intellij") version "0.4.4" + id("org.jetbrains.intellij") version "0.4.6" id("org.jetbrains.grammarkit") version "2018.3.1" kotlin("jvm") version "1.2.70" } +fun fromToolbox(path: String) = file(path).listFiles().orEmpty().filter { it.isDirectory }.maxBy { + val (major, minor, patch) = it.name.split('.') + String.format("%5s%5s%5s", major, minor, patch) +} + allprojects { apply { plugin("org.jetbrains.grammarkit") } intellij { updateSinceUntilBuild = false instrumentCode = true - val username = System.getProperty("user.name") - val root = "/home/$username/.local/share/JetBrains/Toolbox/apps" - when (username) { - "ice1000" -> { - localPath = "$root/IDEA-C/ch-0/191.6183.20" - alternativeIdePath = "$root/PyCharm-C/ch-0/191.6183.9" - } - "hoshino" -> version = "2018.2.1" - "zxj5470" -> { - version = "2018.3" -// alternativeIdePath = "$root/PyCharm-P/ch-0/183.4284.139" + val user = System.getProperty("user.name") + when (System.getProperty("os.name")) { + "Linux" -> { + val root = "/home/$user/.local/share/JetBrains/Toolbox/apps" + val intellijPath = fromToolbox("$root/IDEA-C/ch-0") + ?: fromToolbox("$root/IDEA-C-JDK11/ch-0") + ?: fromToolbox("$root/IDEA-U/ch-0") + ?: fromToolbox("$root/IDEA-JDK11/ch-0") + intellijPath?.absolutePath?.let { localPath = it } + val pycharmPath = fromToolbox("$root/PyCharm-C/ch-0") + ?: fromToolbox("$root/IDEA-C-JDK11/ch-0") + ?: fromToolbox("$root/IDEA-C/ch-0") + pycharmPath?.absolutePath?.let { alternativeIdePath = it } } - /* for CI */ else -> version = "2018.3" } setMarkdownDependency() } diff --git a/docs/change-notes.html b/docs/change-notes.html index 1282b2db..73431891 100644 --- a/docs/change-notes.html +++ b/docs/change-notes.html @@ -1,5 +1,7 @@ 0.3.13
0.3.12