Skip to content

Commit 33340c3

Browse files
committed
Downgrade to IntelliJ platform 2023.2
1 parent 1545b7a commit 33340c3

File tree

13 files changed

+34
-21
lines changed

13 files changed

+34
-21
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ dependencies {
5454

5555
intellijPlatform {
5656
pluginConfiguration {
57-
version = providers.gradleProperty("pluginVersion")
57+
name = providers.gradleProperty("pluginName")
5858

5959
description = providers.fileContents(layout.projectDirectory.file("README.md")).asText.map {
6060
val start = "<!-- Plugin description -->"

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
pluginGroup = me.waleedyaseen
2-
pluginName = intellij-runescript
2+
pluginName = RuneScript
33
pluginRepositoryUrl = https://github.com/waleedyaseen/intellij-runescript
44
pluginVersion = 1.5.1
55

66
pluginSinceBuild = 232
77
pluginUntilBuild = 242.2
88

99
platformType = IC
10-
platformVersion = 2024.1.4
10+
platformVersion = 2023.2
1111

1212
platformPlugins =
1313
platformBundledPlugins = com.intellij.java,org.toml.lang

src/main/gen/io/runescript/plugin/symbollang/parser/RsSymParser.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,27 @@ public static boolean Field(PsiBuilder b, int l) {
4949
}
5050

5151
/* ********************************************************** */
52-
// Symbol*
52+
// (Symbol | '\n' | '\t')*
5353
static boolean File(PsiBuilder b, int l) {
5454
if (!recursion_guard_(b, l, "File")) return false;
5555
while (true) {
5656
int c = current_position_(b);
57-
if (!Symbol(b, l + 1)) break;
57+
if (!File_0(b, l + 1)) break;
5858
if (!empty_element_parsed_guard_(b, "File", c)) break;
5959
}
6060
return true;
6161
}
6262

63+
// Symbol | '\n' | '\t'
64+
private static boolean File_0(PsiBuilder b, int l) {
65+
if (!recursion_guard_(b, l, "File_0")) return false;
66+
boolean r;
67+
r = Symbol(b, l + 1);
68+
if (!r) r = consumeToken(b, NEW_LINE);
69+
if (!r) r = consumeToken(b, TAB);
70+
return r;
71+
}
72+
6373
/* ********************************************************** */
6474
// Field '\t' Field ('\t' Field)* '\t'* '\n'
6575
public static boolean Symbol(PsiBuilder b, int l) {

src/main/grammars/Symbol.bnf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
]
2222
}
2323

24-
File ::= Symbol*
24+
File ::= (Symbol | '\n' | '\t')*
2525
Symbol ::= Field '\t' Field ('\t' Field)* '\t'* '\n' {
2626
mixin="io.runescript.plugin.symbollang.psi.mixin.RsSymSymbolMixin"
2727
stubClass="io.runescript.plugin.symbollang.psi.stub.RsSymSymbolStub"

src/main/kotlin/io/runescript/plugin/ide/RsBundle.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ import org.jetbrains.annotations.PropertyKey
77

88

99
object RsBundle {
10-
private const val BUNDLE_FQN: @NonNls String = "messages.RsBundle"
10+
@NonNls private const val BUNDLE_FQN: String = "messages.RsBundle"
1111
private val BUNDLE = DynamicBundle(RsBundle::class.java, BUNDLE_FQN)
1212

13-
fun message(@PropertyKey(resourceBundle = BUNDLE_FQN) key: String, vararg params: Any): @Nls String {
13+
@Nls
14+
fun message(@PropertyKey(resourceBundle = BUNDLE_FQN) key: String, vararg params: Any): String {
1415
return BUNDLE.getMessage(key, *params)
1516
}
1617

src/main/kotlin/io/runescript/plugin/ide/neptune/NeptuneProjectResolver.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ class NeptuneProjectResolver : ExternalSystemProjectResolver<NeptuneExecutionSet
3232
return null
3333
}
3434

35-
log.info("JVM Arguments: ${settings.jvmArguments?.toTypedArray()?.contentToString()}")
36-
log.info("Environment Variables: ${settings.env?.toMap()?.entries?.joinToString(", ") { "${it.key}=${it.value}" }}")
35+
log.info("JVM Arguments: ${settings.jvmArguments.toTypedArray().contentToString()}")
36+
log.info("Environment Variables: ${settings.env.toMap().entries.joinToString(", ") { "${it.key}=${it.value}" }}")
3737
log.info("Execution Name: ${settings.arguments}")
3838

3939
val projectRoot = File(projectPath)

src/main/kotlin/io/runescript/plugin/ide/neptune/NeptuneUnlinkedProjectAware.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ class NeptuneUnlinkedProjectAware : ExternalSystemUnlinkedProjectAware {
1818
return project.service<NeptuneSettings>().linkedProjectsSettings.isNotEmpty()
1919
}
2020

21+
override fun linkAndLoadProject(project: Project, externalProjectPath: String) {
22+
// TODO: Convert to async upon upgrading
23+
NeptuneOpenProjectProvider.linkToExistingProject(externalProjectPath, project)
24+
}
25+
2126
override fun subscribe(
2227
project: Project,
2328
listener: ExternalSystemProjectLinkListener,
@@ -34,8 +39,4 @@ class NeptuneUnlinkedProjectAware : ExternalSystemUnlinkedProjectAware {
3439
}
3540
}, parentDisposable)
3641
}
37-
38-
override suspend fun linkAndLoadProjectAsync(project: Project, externalProjectPath: String) {
39-
NeptuneOpenProjectProvider.linkToExistingProjectAsync(externalProjectPath, project)
40-
}
4142
}

src/main/kotlin/io/runescript/plugin/lang/psi/RsElementType.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ import com.intellij.psi.tree.IElementType
44
import io.runescript.plugin.lang.RuneScript
55
import org.jetbrains.annotations.NonNls
66

7-
class RsElementType(debugName: @NonNls String) : IElementType(debugName, RuneScript)
7+
class RsElementType(@NonNls debugName: String) : IElementType(debugName, RuneScript)

src/main/kotlin/io/runescript/plugin/lang/psi/RsStubType.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import com.intellij.psi.stubs.StubElement
66
import io.runescript.plugin.lang.RuneScript
77
import org.jetbrains.annotations.NonNls
88

9-
abstract class RsStubType<StubT : StubElement<*>, PsiT : PsiElement>(debugName: @NonNls String)
9+
abstract class RsStubType<StubT : StubElement<*>, PsiT : PsiElement>(@NonNls debugName: String)
1010
: IStubElementType<StubT, PsiT>(debugName, RuneScript) {
1111

1212
override fun getExternalId(): String {

src/main/kotlin/io/runescript/plugin/lang/psi/psi.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package io.runescript.plugin.lang.psi
22

33
import com.intellij.openapi.project.Project
4+
import com.intellij.openapi.project.guessProjectDir
45
import com.intellij.openapi.roots.ProjectFileIndex
56
import com.intellij.psi.PsiElement
67
import com.intellij.psi.util.parentOfType
@@ -72,7 +73,7 @@ fun RsLocalVariableExpression.isForArrayAccess(): Boolean {
7273
}
7374

7475
fun Project.isRsProject(): Boolean {
75-
val file = baseDir.findChild("neptune.toml")
76+
val file = guessProjectDir()?.findChild("neptune.toml")
7677
return file != null
7778
}
7879

0 commit comments

Comments
 (0)