Skip to content

Commit 70d875c

Browse files
committed
feat(react): new 'page' concept for defining custom endpoints
Instead of opening a node you open a page that calls a named renderer. This allows designing UIs that have a different structure than the AST.
1 parent c1b1800 commit 70d875c

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

mps/build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ mpsBuild {
3737
search("modules")
3838
publication("baseLanguage-notation") {
3939
module("org.modelix.mps.notation.impl.baseLanguage")
40-
}
41-
publication("react-demo") {
4240
module("org.modelix.mps.react.impl.baseLanguage")
4341
}
4442
publication("editor-devkit") {

projectional-editor-ssr-mps-languages/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ intellij {
3333
plugins = listOf(
3434
project(":projectional-editor-ssr-mps"),
3535
project(":editor-common-mps"),
36+
project(":react-ssr-mps"),
3637
) + listOf(
3738
// "Git4Idea",
3839
// "Subversion",
@@ -129,7 +130,7 @@ tasks {
129130
intoChild(pluginName.map { "$it/plugins" })
130131
.from(modelAdaptersPlugin)
131132

132-
listOf("editor-devkit", "baseLanguage-notation", "react-demo").forEach { publicationName ->
133+
listOf("editor-devkit", "baseLanguage-notation").forEach { publicationName ->
133134
intoChild(pluginName.map { "$it/languages" })
134135
.from(zipTree({ project(":mps").layout.buildDirectory.file("mpsbuild/publications/$publicationName.zip") }))
135136
.eachFile {

projectional-editor-ssr-mps-languages/src/main/resources/META-INF/plugin.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<depends>com.intellij.modules.mps</depends>
2323
<depends>jetbrains.mps.core</depends>
2424
<depends>org.modelix.mps.editor</depends>
25+
<depends>org.modelix.mps.react</depends>
2526
<extensions defaultExtensionNs="com.intellij">
2627
<mps.LanguageLibrary dir="/languages" />
2728
</extensions>

react-ssr-mps-test/build.gradle.kts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,20 @@ dependencies {
1212
testImplementation(libs.testcontainers)
1313
}
1414

15+
val pluginsDir = layout.buildDirectory.dir("plugins")
16+
val collectPlugins by tasks.registering(Sync::class) {
17+
dependsOn(":packageAllPlugins")
18+
from(zipTree { rootProject.tasks.named<Zip>("packageAllPlugins").map { it.archiveFile.get() } })
19+
into(pluginsDir)
20+
}
21+
1522
tasks {
1623
test {
17-
dependsOn(":react-ssr-mps-languages:prepareSandbox")
24+
dependsOn(collectPlugins)
1825
environment("MPS_VERSION", mpsVersion)
1926
environment(
2027
"MODELIX_MPS_PLUGINS_PATH",
21-
project(":react-ssr-mps-languages").layout.buildDirectory.dir("idea-sandbox/plugins").get().asFile.absolutePath,
28+
pluginsDir.get().asFile.absolutePath,
2229
)
2330
}
2431
}

0 commit comments

Comments
 (0)