From a382420f9680251ab78d9d2d6ba23862ba1374ba Mon Sep 17 00:00:00 2001
From: Gareth
Date: Mon, 8 Dec 2025 20:18:33 +0000
Subject: [PATCH 1/5] #78 - Fix XML manging in Rider
---
CHANGELOG.md | 3 ++
Directory.Build.props | 4 +-
build.gradle.kts | 5 +-
gradle.properties | 6 +--
.../RimworldDLLParameter.cs | 2 +-
src/rider/main/kotlin/XmlTypingPolicy.kt | 16 ++++++
.../remodder/RemodderToolWindowFactory.kt | 52 ++++++++++---------
src/rider/main/kotlin/run/RunConfiguration.kt | 5 ++
src/rider/main/resources/META-INF/plugin.xml | 5 +-
9 files changed, 63 insertions(+), 35 deletions(-)
create mode 100644 src/rider/main/kotlin/XmlTypingPolicy.kt
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5397358..d2c1ab3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,8 @@
# Changelog
+## 2025.1.5
+ * Fix the issue with XML tags getting messed up in Rider
+
## 2025.1.4
* Fixed Autocomplete in XML
diff --git a/Directory.Build.props b/Directory.Build.props
index 066f197..8ba4335 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,7 +1,7 @@
- 2025.1.0
+ 2025.3.*
Rimworld Development Environment
Bring the intelligence of your IDE to Rimworld XML files. Use information backed by Rimworlds DLL file to autocomplete your XML, Ctrl+Click into the C# that your XML gets translated into and see what options you have when adding items in your mods!
@@ -36,7 +36,7 @@
-
+
diff --git a/build.gradle.kts b/build.gradle.kts
index a57877b..383959a 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -167,10 +167,7 @@ dependencies {
jetbrainsRuntime()
bundledPlugin("com.intellij.resharper.unity")
-
- if (ProductVersion.contains("2025.2")) {
- bundledModule("intellij.spellchecker")
- }
+ bundledModule("intellij.spellchecker")
}
}
diff --git a/gradle.properties b/gradle.properties
index 71664e2..3fe06ae 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -4,7 +4,7 @@
DotnetPluginId=ReSharperPlugin.RimworldDev
DotnetSolution=ReSharperPlugin.RimworldDev.sln
RiderPluginId=com.jetbrains.rider.plugins.rimworlddev
-PluginVersion=2025.1.4
+PluginVersion=2025.1.5
BuildConfiguration=Release
@@ -14,14 +14,14 @@ PublishToken="_PLACEHOLDER_"
# Release: 2020.2
# Nightly: 2020.3-SNAPSHOT
# EAP: 2020.3-EAP2-SNAPSHOT
-ProductVersion=2025.1
+ProductVersion=2025.3
# Kotlin 1.4 will bundle the stdlib dependency by default, causing problems with the version bundled with the IDE
# https://blog.jetbrains.com/kotlin/2020/07/kotlin-1-4-rc-released/#stdlib-default
kotlin.stdlib.default.dependency=false
org.gradle.jvmargs=-Xmx4g
-rdVersion=2025.1
+rdVersion=2025.3
rdKotlinVersion=2.1.0
intellijPlatformGradlePluginVersion=2.2.1
gradleJvmWrapperVersion=0.14.0
diff --git a/src/dotnet/ReSharperPlugin.RimworldDev/TemplateParameters/RimworldDLLParameter.cs b/src/dotnet/ReSharperPlugin.RimworldDev/TemplateParameters/RimworldDLLParameter.cs
index 8595df3..5c0968f 100644
--- a/src/dotnet/ReSharperPlugin.RimworldDev/TemplateParameters/RimworldDLLParameter.cs
+++ b/src/dotnet/ReSharperPlugin.RimworldDev/TemplateParameters/RimworldDLLParameter.cs
@@ -18,7 +18,7 @@ public override RdProjectTemplateOption CreateContent(ITemplateInfo templateInfo
{
var detectedPath = ScopeHelper.FindRimworldDll(Directory.GetCurrentDirectory())?.FullPath;
- return new RdProjectTemplateTextOption(detectedPath ?? "", "string", Name, PresentableName, Tooltip);
+ return new RdProjectTemplateTextOption(detectedPath ?? "", "string", Name, PresentableName, Tooltip, "");
}
}
diff --git a/src/rider/main/kotlin/XmlTypingPolicy.kt b/src/rider/main/kotlin/XmlTypingPolicy.kt
new file mode 100644
index 0000000..667c441
--- /dev/null
+++ b/src/rider/main/kotlin/XmlTypingPolicy.kt
@@ -0,0 +1,16 @@
+package RimworldDev.Rider
+
+import com.jetbrains.rider.editorActions.RiderEditorActionPolicy
+import com.jetbrains.rider.editorActions.RiderTypingPolicy
+
+class XmlTypingPolicy : RiderTypingPolicy {
+ override fun forceFrontendExecution(): Boolean {
+ return true
+ }
+}
+
+class XmlEditorActionPolicy : RiderEditorActionPolicy {
+ override fun forceFrontendExecution(): Boolean {
+ return true
+ }
+}
\ No newline at end of file
diff --git a/src/rider/main/kotlin/remodder/RemodderToolWindowFactory.kt b/src/rider/main/kotlin/remodder/RemodderToolWindowFactory.kt
index 86b2a32..3d93b69 100644
--- a/src/rider/main/kotlin/remodder/RemodderToolWindowFactory.kt
+++ b/src/rider/main/kotlin/remodder/RemodderToolWindowFactory.kt
@@ -9,6 +9,7 @@ import com.intellij.openapi.fileEditor.TextEditor
import com.intellij.openapi.project.Project
import com.intellij.openapi.ui.DialogBuilder
import com.intellij.openapi.ui.Messages
+import com.intellij.openapi.vfs.VirtualFile
import com.intellij.openapi.wm.ToolWindow
import com.intellij.openapi.wm.ToolWindowFactory
import com.intellij.psi.PsiElement
@@ -52,36 +53,39 @@ class RemodderToolWindowFactory : ToolWindowFactory {
refresh.addActionListener {
val userAssemblies = project.getService(RemodderStateComponent::class.java).state.userAssemblies
val editor = (FileEditorManager.getInstance(project).selectedEditor as TextEditor).editor
- val view = PsiManager.getInstance(project).findViewProvider(editor.virtualFile)
- val el = view?.findElementAt(editor.caretModel.offset) ?: return@addActionListener
+ var virtualFile: VirtualFile? = editor.virtualFile
+ if (virtualFile != null) {
+ val view = PsiManager.getInstance(project).findViewProvider(virtualFile)
+ val el = view?.findElementAt(editor.caretModel.offset) ?: return@addActionListener
- val filePath = editor.virtualFile.path
- val typeName = namespaceAndClassOfElement(el) ?: ""
+ val filePath = virtualFile.path
+ val typeName = namespaceAndClassOfElement(el) ?: ""
- statusLabel.text = "$typeName..."
- errorDetails.isVisible = false
+ statusLabel.text = "$typeName..."
+ errorDetails.isVisible = false
- project.solution.remodderProtocolModel.decompile.start(arrayOf(filePath, typeName) + userAssemblies).toPromise().then {
- if (it.size == 1)
- {
- statusLabel.text = "$typeName: ${it[0]}"
- errorDetails.isVisible = false
- return@then
- }
+ project.solution.remodderProtocolModel.decompile.start(arrayOf(filePath, typeName) + userAssemblies)
+ .toPromise().then {
+ if (it.size == 1) {
+ statusLabel.text = "$typeName: ${it[0]}"
+ errorDetails.isVisible = false
+ return@then
+ }
- val content1 = DiffContentFactory.getInstance().create(project, it[0], editor.virtualFile)
- val content2 = DiffContentFactory.getInstance().create(project, it[1], editor.virtualFile)
- content2.putUserData(DiffUserDataKeys.FORCE_READ_ONLY, true)
+ val content1 = DiffContentFactory.getInstance().create(project, it[0], virtualFile)
+ val content2 = DiffContentFactory.getInstance().create(project, it[1], virtualFile)
+ content2.putUserData(DiffUserDataKeys.FORCE_READ_ONLY, true)
- val request = SimpleDiffRequest("Original/Transpiled", content1, content2, "Original", "Transpiled")
- diffPanel.setRequest(request)
+ val request = SimpleDiffRequest("Original/Transpiled", content1, content2, "Original", "Transpiled")
+ diffPanel.setRequest(request)
- statusLabel.text = typeName
- errorDetails.isVisible = false
- }.onError {
- errorMsg = it.toString()
- statusLabel.text = "$typeName: ERROR"
- errorDetails.isVisible = true
+ statusLabel.text = typeName
+ errorDetails.isVisible = false
+ }.onError {
+ errorMsg = it.toString()
+ statusLabel.text = "$typeName: ERROR"
+ errorDetails.isVisible = true
+ }
}
}
diff --git a/src/rider/main/kotlin/run/RunConfiguration.kt b/src/rider/main/kotlin/run/RunConfiguration.kt
index 33e5eac..6cfe968 100644
--- a/src/rider/main/kotlin/run/RunConfiguration.kt
+++ b/src/rider/main/kotlin/run/RunConfiguration.kt
@@ -132,6 +132,11 @@ class RunConfiguration(project: Project, factory: ConfigurationFactory, name: St
pathToRun = "/bin/sh"
}
+ if (OS.CURRENT == OS.macOS) {
+ arguments = "$pathToRun $arguments"
+ pathToRun = "open"
+ }
+
val commandLine = GeneralCommandLine(pathToRun)
.withParameters(arguments.split(' ').filter { it.isNotEmpty() })
diff --git a/src/rider/main/resources/META-INF/plugin.xml b/src/rider/main/resources/META-INF/plugin.xml
index 7c4eca1..b88c914 100644
--- a/src/rider/main/resources/META-INF/plugin.xml
+++ b/src/rider/main/resources/META-INF/plugin.xml
@@ -3,7 +3,7 @@
Rimworld Development Environment
0.0.0
Garethp
-
+
com.intellij.modules.rider
com.intellij.resharper.unity
@@ -30,6 +30,9 @@ in your mods!
+
+
+
From 12d47be2177c7968e6ee350b3d0428aa7f23f9c2 Mon Sep 17 00:00:00 2001
From: Gareth
Date: Mon, 8 Dec 2025 21:10:04 +0000
Subject: [PATCH 2/5] Try to debug space issues on runners
---
.github/workflows/CI.yml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
index c16194a..a15c55a 100644
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -13,13 +13,16 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
+ - run: df -h
- name: configure_java
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '21'
cache: 'gradle'
+ - run: df -h
- run: ./gradlew :buildPlugin --no-daemon
+ - run: df -h
- run: ./gradlew :buildResharperPlugin --no-daemon
- uses: actions/upload-artifact@v4
if: always()
@@ -36,6 +39,6 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'corretto'
- java-version: '17'
+ java-version: '21'
cache: 'gradle'
- run: ./gradlew :testDotNet --no-daemon
\ No newline at end of file
From 9ad156a77097bde1e1c0120188620a503a1093fe Mon Sep 17 00:00:00 2001
From: Gareth
Date: Mon, 8 Dec 2025 21:21:07 +0000
Subject: [PATCH 3/5] Try adding free-disk-space
---
.github/workflows/CI.yml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
index a15c55a..da68e6d 100644
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -10,6 +10,9 @@ jobs:
Build:
runs-on: ubuntu-latest
steps:
+ - run: df -h
+ - uses: jlumbroso/free-disk-space@main
+ - run: df -h
- uses: actions/checkout@v4
with:
submodules: recursive
From 662e1d3bf418a88dd219bc8f9e22e546607df7fb Mon Sep 17 00:00:00 2001
From: Gareth
Date: Mon, 8 Dec 2025 21:36:08 +0000
Subject: [PATCH 4/5] Try adding free-disk-space
---
.github/workflows/CI.yml | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
index da68e6d..a854909 100644
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -23,6 +23,10 @@ jobs:
distribution: 'corretto'
java-version: '21'
cache: 'gradle'
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: 8.0.x
- run: df -h
- run: ./gradlew :buildPlugin --no-daemon
- run: df -h
@@ -35,6 +39,7 @@ jobs:
Test:
runs-on: ubuntu-latest
steps:
+ - uses: jlumbroso/free-disk-space@main
- uses: actions/checkout@v4
with:
submodules: recursive
@@ -44,4 +49,8 @@ jobs:
distribution: 'corretto'
java-version: '21'
cache: 'gradle'
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: 8.0.x
- run: ./gradlew :testDotNet --no-daemon
\ No newline at end of file
From be3868971cef1fb668bbfc63b6749ee130e76371 Mon Sep 17 00:00:00 2001
From: Gareth
Date: Mon, 8 Dec 2025 21:48:00 +0000
Subject: [PATCH 5/5] Fix the pipeline
---
.github/workflows/CI.yml | 5 -----
.github/workflows/Deploy.yml | 3 ++-
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
index a854909..14ae2bc 100644
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -10,13 +10,10 @@ jobs:
Build:
runs-on: ubuntu-latest
steps:
- - run: df -h
- uses: jlumbroso/free-disk-space@main
- - run: df -h
- uses: actions/checkout@v4
with:
submodules: recursive
- - run: df -h
- name: configure_java
uses: actions/setup-java@v4
with:
@@ -27,9 +24,7 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- - run: df -h
- run: ./gradlew :buildPlugin --no-daemon
- - run: df -h
- run: ./gradlew :buildResharperPlugin --no-daemon
- uses: actions/upload-artifact@v4
if: always()
diff --git a/.github/workflows/Deploy.yml b/.github/workflows/Deploy.yml
index 1d79630..ca49c61 100644
--- a/.github/workflows/Deploy.yml
+++ b/.github/workflows/Deploy.yml
@@ -10,6 +10,7 @@ jobs:
runs-on: ubuntu-latest
environment: Deploy
steps:
+ - uses: jlumbroso/free-disk-space@main
- uses: actions/checkout@v4
with:
submodules: recursive
@@ -17,7 +18,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'corretto'
- java-version: '17'
+ java-version: '21'
cache: 'gradle'
- name: Setup .NET
uses: actions/setup-dotnet@v4