author
int64 658
755k
| date
stringlengths 19
19
| timezone
int64 -46,800
43.2k
| hash
stringlengths 40
40
| message
stringlengths 5
490
| mods
list | language
stringclasses 20
values | license
stringclasses 3
values | repo
stringlengths 5
68
| original_message
stringlengths 12
491
|
---|---|---|---|---|---|---|---|---|---|
426,496 | 22.11.2021 22:34:14 | -3,600 | e63e11d0ba831358581883f8e54b5ffd81510f0e | Credentials were missing when building with github actions (4) | [
{
"change_type": "MODIFY",
"old_path": "build.gradle",
"new_path": "build.gradle",
"diff": "@@ -16,6 +16,11 @@ buildscript {\nusername = project.findProperty(\"gpr.user\").toString()\npassword = project.findProperty(\"gpr.key\").toString()\n}\n+ } else if (System.getenv(\"GITHUB_ACTOR\") != null && System.getenv(\"GITHUB_TOKEN\") != null) {\n+ credentials {\n+ username = System.getenv(\"GITHUB_ACTOR\")\n+ password = System.getenv(\"GITHUB_TOKEN\")\n+ }\n} else {\n//throw org.gradle.api.GradleException(\"Please specify your github username (gpr.user) and access token (gpr.key) in ~/.gradle/gradle.properties\")\n}\n@@ -107,8 +112,13 @@ allprojects {\nusername = project.findProperty(\"gpr.user\").toString()\npassword = project.findProperty(\"gpr.key\").toString()\n}\n+ } else if (System.getenv(\"GITHUB_ACTOR\") != null && System.getenv(\"GITHUB_TOKEN\") != null) {\n+ credentials {\n+ username = System.getenv(\"GITHUB_ACTOR\")\n+ password = System.getenv(\"GITHUB_TOKEN\")\n+ }\n} else {\n- throw org.gradle.api.GradleException(\"Please specify your github username (gpr.user) and access token (gpr.key) in ~/.gradle/gradle.properties\")\n+ //throw org.gradle.api.GradleException(\"Please specify your github username (gpr.user) and access token (gpr.key) in ~/.gradle/gradle.properties\")\n}\n}\nmaven {\n@@ -118,6 +128,11 @@ allprojects {\nusername = project.findProperty(\"gpr.user\").toString()\npassword = project.findProperty(\"gpr.key\").toString()\n}\n+ } else if (System.getenv(\"GITHUB_ACTOR\") != null && System.getenv(\"GITHUB_TOKEN\") != null) {\n+ credentials {\n+ username = System.getenv(\"GITHUB_ACTOR\")\n+ password = System.getenv(\"GITHUB_TOKEN\")\n+ }\n} else {\n//throw org.gradle.api.GradleException(\"Please specify your github username (gpr.user) and access token (gpr.key) in ~/.gradle/gradle.properties\")\n}\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Credentials were missing when building with github actions (4) |
426,496 | 22.11.2021 22:44:13 | -3,600 | 1c5619da6d3bdfde184fb7d8099246c6416d2bcb | 'logger.error' instead of 'throw GradleException'
Somehow throw GradleException makes the build fail without actually
showing the error message. | [
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -174,7 +174,7 @@ To use them in your gradle script add this repository:\npassword = project.findProperty(\"gpr.key\").toString()\n}\n} else {\n- throw GradleException(\"Please specify your github username (gpr.user) and access token (gpr.key) in ~/.gradle/gradle.properties\")\n+ logger.error(\"Please specify your github username (gpr.user) and access token (gpr.key) in ~/.gradle/gradle.properties\")\n}\n}\n```\n"
},
{
"change_type": "MODIFY",
"old_path": "build.gradle",
"new_path": "build.gradle",
"diff": "@@ -22,7 +22,7 @@ buildscript {\npassword = System.getenv(\"GITHUB_TOKEN\")\n}\n} else {\n- //throw org.gradle.api.GradleException(\"Please specify your github username (gpr.user) and access token (gpr.key) in ~/.gradle/gradle.properties\")\n+ logger.error(\"Please specify your github username (gpr.user) and access token (gpr.key) in ~/.gradle/gradle.properties\")\n}\n}\n//maven { url 'https://projects.itemis.de/nexus/content/repositories/mbeddr' }\n@@ -118,7 +118,7 @@ allprojects {\npassword = System.getenv(\"GITHUB_TOKEN\")\n}\n} else {\n- //throw org.gradle.api.GradleException(\"Please specify your github username (gpr.user) and access token (gpr.key) in ~/.gradle/gradle.properties\")\n+ logger.error(\"Please specify your github username (gpr.user) and access token (gpr.key) in ~/.gradle/gradle.properties\")\n}\n}\nmaven {\n@@ -134,7 +134,7 @@ allprojects {\npassword = System.getenv(\"GITHUB_TOKEN\")\n}\n} else {\n- //throw org.gradle.api.GradleException(\"Please specify your github username (gpr.user) and access token (gpr.key) in ~/.gradle/gradle.properties\")\n+ logger.error(\"Please specify your github username (gpr.user) and access token (gpr.key) in ~/.gradle/gradle.properties\")\n}\n}\n//maven { url 'https://projects.itemis.de/nexus/content/repositories/mbeddr' }\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | 'logger.error' instead of 'throw GradleException'
Somehow throw GradleException makes the build fail without actually
showing the error message. |
426,496 | 23.11.2021 10:50:01 | -3,600 | 26193d37f70cb9e2b56673873802f1cc0d963445 | script for running only the model server and the database in kubernetes | [
{
"change_type": "ADD",
"old_path": null,
"new_path": "kubernetes-apply-modelserver.sh",
"diff": "+#!/bin/sh\n+\n+kubectl apply \\\n+ -f kubernetes/local/db-data-persistentvolumeclaim.yaml \\\n+ -f kubernetes/local/db-deployment.yaml \\\n+ -f kubernetes/common/db-service.yaml \\\n+ -f kubernetes/common/model-deployment.yaml \\\n+ -f kubernetes/common/model-service.yaml \\\n+ -f kubernetes/common/proxy-deployment.yaml \\\n+ -f kubernetes/common/proxy-service.yaml \\\n+ -f kubernetes/common/proxy-service.yaml\n\\ No newline at end of file\n"
},
{
"change_type": "DELETE",
"old_path": "kubernetes/local/db-service.yaml",
"new_path": null,
"diff": "-apiVersion: v1\n-kind: Service\n-metadata:\n- annotations:\n- creationTimestamp: null\n- labels:\n- app: db\n- name: db\n-spec:\n- ports:\n- - name: \"5432\"\n- port: 5432\n- targetPort: 5432\n- selector:\n- app: db\n-status:\n- loadBalancer: {}\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | script for running only the model server and the database in kubernetes |
426,496 | 23.11.2021 10:51:09 | -3,600 | a53fb0073206f738688b17ae57af3965e05d20f8 | use version 0.0.67 in the kubernetes configs | [
{
"change_type": "MODIFY",
"old_path": "kubernetes/common/model-deployment.yaml",
"new_path": "kubernetes/common/model-deployment.yaml",
"diff": "@@ -27,7 +27,7 @@ spec:\n- env:\n- name: jdbc_url\nvalue: jdbc:postgresql://db:5432/\n- image: modelix/modelix-model:0.0.54\n+ image: modelix/modelix-model:0.0.67\nimagePullPolicy: IfNotPresent\nname: model\nports:\n"
},
{
"change_type": "MODIFY",
"old_path": "kubernetes/common/projector-deployment.yaml",
"new_path": "kubernetes/common/projector-deployment.yaml",
"diff": "@@ -23,7 +23,7 @@ spec:\nspec:\ncontainers:\n- name: projector\n- image: modelix/modelix-projector:2020.3-202110281810-SNAPSHOT\n+ image: modelix/modelix-projector:0.0.67\nimagePullPolicy: IfNotPresent\nenv:\n- name: \"MODEL_URI\"\n"
},
{
"change_type": "MODIFY",
"old_path": "kubernetes/common/proxy-deployment.yaml",
"new_path": "kubernetes/common/proxy-deployment.yaml",
"diff": "@@ -25,7 +25,7 @@ spec:\nspec:\ncontainers:\n- name: proxy\n- image: modelix/modelix-proxy:0.0.54\n+ image: modelix/modelix-proxy:0.0.67\nimagePullPolicy: IfNotPresent\nenv:\nports:\n"
},
{
"change_type": "MODIFY",
"old_path": "kubernetes/common/ui-deployment.yaml",
"new_path": "kubernetes/common/ui-deployment.yaml",
"diff": "@@ -25,7 +25,7 @@ spec:\nspec:\ncontainers:\n- name: ui\n- image: modelix/modelix-ui:0.0.54\n+ image: modelix/modelix-ui:0.0.67\nimagePullPolicy: IfNotPresent\nenv:\n- name: MODEL_URI\n"
},
{
"change_type": "MODIFY",
"old_path": "kubernetes/common/uiproxy-deployment.yaml",
"new_path": "kubernetes/common/uiproxy-deployment.yaml",
"diff": "@@ -23,7 +23,7 @@ spec:\nspec:\nserviceAccountName: uiproxy\ncontainers:\n- - image: modelix/modelix-uiproxy:0.0.54\n+ - image: modelix/modelix-uiproxy:0.0.67\nimagePullPolicy: IfNotPresent\nname: uiproxy\nports:\n"
},
{
"change_type": "MODIFY",
"old_path": "kubernetes/local/db-deployment.yaml",
"new_path": "kubernetes/local/db-deployment.yaml",
"diff": "@@ -29,7 +29,7 @@ spec:\nvalue: modelix\n- name: PGDATA\nvalue: /var/lib/postgresql/data/pgdata\n- image: modelix/modelix-db:0.0.54\n+ image: modelix/modelix-db:0.0.67\nimagePullPolicy: IfNotPresent\nname: db\nresources: {}\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | use version 0.0.67 in the kubernetes configs |
426,496 | 23.11.2021 15:51:50 | -3,600 | f86ece1c07a38179bc3a2932192cab3be94921d8 | moved mavenLocal repository to the end | [
{
"change_type": "MODIFY",
"old_path": "build.gradle",
"new_path": "build.gradle",
"diff": "@@ -104,7 +104,6 @@ allprojects {\nas it is more reliable */\nmaven { url \"https://repo.maven.apache.org/maven2\" }\nmavenCentral()\n- mavenLocal()\nmaven {\nurl = uri(\"https://maven.pkg.github.com/JetBrains/MPS-extensions\")\nif (project.hasProperty(\"gpr.user\") && project.hasProperty(\"gpr.key\")) {\n@@ -139,6 +138,7 @@ allprojects {\n}\n//maven { url 'https://projects.itemis.de/nexus/content/repositories/mbeddr' }\n//maven { url = uri(\"https://modelix.jfrog.io/artifactory/itemis/\") } // caching proxy for the itemis repo\n+ mavenLocal()\n}\n}\ndescription = \"Cloud storage and web UI for MPS\"\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | moved mavenLocal repository to the end |
426,496 | 23.11.2021 15:52:53 | -3,600 | bfdd9363843629f534a924acc6369c593bc078d9 | replaced "grp.user" with "gpr.user" in the readme | [
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -182,9 +182,9 @@ To use them in your gradle script add this repository:\nYou also have to add your GitHub credential to `~/.gradle/gradle.properties`:\n```\n-grp.user=YOUR_USER_NAME\n-grp.key=TOKEN_WITH_PACKAGES_READ_ACCESS\n+gpr.user=YOUR_USER_NAME\n+gpr.key=TOKEN_WITH_PACKAGES_READ_ACCESS\n```\n-`grp.key` is an access token that you can generate at https://github.com/settings/tokens.\n+`gpr.key` is an access token that you can generate at https://github.com/settings/tokens.\nThis token needs the `read:packages` permission.\n\\ No newline at end of file\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | replaced "grp.user" with "gpr.user" in the readme |
426,496 | 23.11.2021 18:21:52 | -3,600 | b96a64a7dd13cc658dfb18b2d92cdf3c0cae57cb | Updated the instructions to run modelix | [
{
"change_type": "MODIFY",
"old_path": "doc/running-modelix.md",
"new_path": "doc/running-modelix.md",
"diff": "-In production modelix uses docker images running in a kubernetes cluster.\n+In production Modelix uses docker images running in a kubernetes cluster.\nDuring development you can run the different components without docker/kubernetes.\nYou need a PostgreSQL database, the model server and the MPS plugin for the UI server.\n-## Running without kubernetes\n+## Model Server\n-- `./gradlew` in the root directory\n-- open the project in the folder \"mps\" with MPS 2020.1.1\n-- <http://localhost:33333/>\n-\n-This allows you to edit the models stored locally in MPS.\n-Optionally, you can run the model server and connect your MPS to it:\n-\n-- database\n- - option 1: run the docker image\n- - install docker: <https://docs.docker.com/get-docker/>\n- - `./docker-build-db.sh`\n- - `./docker-run-db.sh`\n- - option 2: use your own PostgreSQL server\n+- Option 1: Install your own PostgreSQL database and start the model server from the command line.\n- check the file [../db/initdb.sql](../db/initdb.sql) for the required schema\n- adjust the connection properties in [../model-server/src/main/resources/org/modelix/model/server/database.properties](../model-server/src/main/resources/org/modelix/model/server/database.properties)\n- model server\n- `cd model-server`\n- `../gradlew run`\n-- connect MPS to the model server\n- - open the \"Cloud\" view in the bottom left corner\n- - In the context menu of the root node labeled \"Cloud\" choose \"Add Repository\"\n- - type `http://localhost:28101/`\n- - navigate to \"default tree (default)\" > \"data [master]\" > \"ROOT #1\" and choose \"Add Module\" from the context menu\n+- Option 2: Use Kubernetes and run the existing images.\n+ Choose this option if you didn't change anything in the model server code.\n+ - `./kubernetes-modelsecret.sh`\n+ - `./kubernetes-use-latest-tag.sh`\n+ - `./kubernetes-apply-modelserver.sh`\n+- Option 3: Use kubernetes and build your own images. Choose this option while developing the model server.\n+ - `./kubernetes-modelsecret.sh`\n+ - `./docker-build-db.sh`\n+ - `./docker-build-model.sh`\n+ - `./kubernetes-apply-modelserver.sh`\n+\n+## Web Editor\n+\n+The web editor is an MPS plugin that requires a running MPS instance.\n+This can be your usual local IDE or an instance running in kubernetes with [Projector](https://lp.jetbrains.com/projector/).\n+\n+- Option 1: Local IDE\n+ - `./gradlew` in the root directory\n+ - open the project in the [/mps/](../mps/) folder with the MPS version specified in [mps-version.properties](../mps-version.properties)\n+ - <http://localhost:33333/>\n+- Option 2: Projector and Kubernetes using the existing docker image\n+ - `./kubernetes-use-latest-tag.sh`\n+ - `./kubernetes-apply-projector.sh`\n+ - `./kubernetes-open-projector.sh`\n+- Option 3: Projector and Kubernetes using you own image. Use this option while developing the MPS plugins.\n+ - `./gradlew`\n+ - `./docker-build-projector.sh`\n+ - `./kubernetes-apply-projector.sh`\n+ - `./kubernetes-open-projector.sh`\n+\n+### Connect MPS to the Model Server\n+\n+When running MPS with Kubernetes it will automatically connect to the model server and synchronize the modules and projects.\n+\n+To connect your local MPS IDE follow these instructions:\n+- `./kubernetes-print-modelserver-url.sh`\n+- copy this URL to your clipboard\n+- open the \"Cloud\" view in the bottom left corner of MPS\n+- in the context menu of the root node labeled \"Cloud\" choose \"Add Model Server\"\n+- paste the model server URL\n+- navigate to \"default\" > \"data [master]\" > \"ROOT #1\" and choose \"Add Module\" from the context menu\n- add a model to that module using the context menu\n- choose \"Bind to Transient Module\" from the context menu of the module\n- you should now see that module and the new model in the \"Cloud\" section at the end in the \"Project\" view\n- open the \"Model Properties\" of the new model and add at least one language dependency\n- now you are able to add new root nodes to the model from the MPS \"Project\" view\n-## Running a local kubernetes cluster\n-\n-- Option 1: Docker Desktop\n- - Download and install [Docker Desktop](https://www.docker.com/products/docker-desktop)\n- - Enable kubernetes in the preferences\n- - Increase memory to 4-8 GB in Preferences > Resources\n-- Option 2: minikube\n- - `minikube start --cpus=4 --memory=8GB --disk-size=40GB`\n- - `eval $(minikube -p minikube docker-env)`\n-- `./kubernetes-modelsecret.sh`\n-- SSL certificate\n- - `cd ssl`\n- - `./generate.sh`\n- - `./kubernetes-create-secret.sh`\n- - `cd ..`\n-- Option 1: Use the latest published docker images\n- - `./kubernetes-use-latest-tag.sh`\n-- Option 2: Build your own docker images\n- - `./docker-build-all.sh`\n-- `./kubernetes-apply-local.sh`\n-- Wait ~2 minutes. You can check the status of the cluster using `kubectl get all` (or `minikube dashboard`)\n-- Docker Desktop: `./kubernetes-open-proxy.sh`, minikube: `minikube service proxy`\n-- connect MPS to the model server: same steps as described at \"Running without kubernetes\", but use the URL you see when you executed `./kubernetes-open-proxy.sh` / `minikube service proxy` and append \"model/\" (e.g. http://192.168.64.2:31894/model/)\n-\n## Running in the google cloud\n- https://console.cloud.google.com/kubernetes/list?project=webmps\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "kubernetes-apply-projector.sh",
"diff": "+#!/bin/sh\n+\n+kubectl apply \\\n+ -f kubernetes/common/projector-service.yaml \\\n+ -f kubernetes/common/projector-deployment.yaml\n\\ No newline at end of file\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "kubernetes-open-projector.sh",
"diff": "+#!/bin/sh\n+\n+SERVICEPORT=$(kubectl get service/proxy | sed -n \"s/.*80:\\([0-9]*\\)\\/TCP.*/\\1/p\")\n+open \"http://localhost:${SERVICEPORT}/projector/ide/\"\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "kubernetes-print-modelserver-url.sh",
"diff": "+#!/bin/sh\n+\n+SERVICEPORT=$(kubectl get service/proxy | sed -n \"s/.*80:\\([0-9]*\\)\\/TCP.*/\\1/p\")\n+echo \"http://localhost:${SERVICEPORT}/model/\"\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Updated the instructions to run modelix |
426,496 | 24.11.2021 06:32:47 | -3,600 | d9c34fb915792d87c8e035b2a8318ebde81dc198 | ModelSynchronizer: Exception handling during sync to MPS | [
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"diff": "<ref role=\"3cqZAo\" node=\"4_k_9wJuePt\" resolve=\"childrenSyncToMPSRequired\" />\n</node>\n<node concept=\"3clFbS\" id=\"4_k_9wJAAl4\" role=\"2LFqv$\">\n+ <node concept=\"3J1_TO\" id=\"5ddlQKfIMkk\" role=\"3cqZAp\">\n+ <node concept=\"3uVAMA\" id=\"5ddlQKfIMkl\" role=\"1zxBo5\">\n+ <node concept=\"XOnhg\" id=\"5ddlQKfIMkm\" role=\"1zc67B\">\n+ <property role=\"TrG5h\" value=\"ex\" />\n+ <node concept=\"nSUau\" id=\"5ddlQKfIMkn\" role=\"1tU5fm\">\n+ <node concept=\"3uibUv\" id=\"5ddlQKfIMko\" role=\"nSUat\">\n+ <ref role=\"3uigEE\" to=\"wyt6:~Exception\" resolve=\"Exception\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbS\" id=\"5ddlQKfIMkp\" role=\"1zc67A\">\n+ <node concept=\"RRSsy\" id=\"5ddlQKfIMkq\" role=\"3cqZAp\">\n+ <property role=\"RRSoG\" value=\"gZ5fh_4/error\" />\n+ <node concept=\"Xl_RD\" id=\"5ddlQKfIMkr\" role=\"RRSoy\" />\n+ <node concept=\"37vLTw\" id=\"5ddlQKfIMks\" role=\"RRSow\">\n+ <ref role=\"3cqZAo\" node=\"5ddlQKfIMkm\" resolve=\"ex\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbS\" id=\"5ddlQKfIMkt\" role=\"1zxBo7\">\n<node concept=\"3clFbF\" id=\"4_k_9wJABKW\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"4_k_9wJACao\" role=\"3clFbG\">\n<node concept=\"37vLTw\" id=\"4_k_9wJABKV\" role=\"2Oq$k0\">\n</node>\n</node>\n</node>\n+ </node>\n+ </node>\n<node concept=\"3clFbF\" id=\"4_k_9wJEzmY\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"4_k_9wJE$yb\" role=\"3clFbG\">\n<node concept=\"37vLTw\" id=\"4_k_9wJEzmW\" role=\"2Oq$k0\">\n<ref role=\"3cqZAo\" node=\"4_k_9wJuHpX\" resolve=\"referenceSyncToMPSRequired\" />\n</node>\n<node concept=\"3clFbS\" id=\"4_k_9wJAGpC\" role=\"2LFqv$\">\n+ <node concept=\"3J1_TO\" id=\"5ddlQKfILIJ\" role=\"3cqZAp\">\n+ <node concept=\"3uVAMA\" id=\"5ddlQKfILIK\" role=\"1zxBo5\">\n+ <node concept=\"XOnhg\" id=\"5ddlQKfILIL\" role=\"1zc67B\">\n+ <property role=\"TrG5h\" value=\"ex\" />\n+ <node concept=\"nSUau\" id=\"5ddlQKfILIM\" role=\"1tU5fm\">\n+ <node concept=\"3uibUv\" id=\"5ddlQKfILIN\" role=\"nSUat\">\n+ <ref role=\"3uigEE\" to=\"wyt6:~Exception\" resolve=\"Exception\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbS\" id=\"5ddlQKfILIO\" role=\"1zc67A\">\n+ <node concept=\"RRSsy\" id=\"5ddlQKfILIP\" role=\"3cqZAp\">\n+ <property role=\"RRSoG\" value=\"gZ5fh_4/error\" />\n+ <node concept=\"Xl_RD\" id=\"5ddlQKfILIQ\" role=\"RRSoy\" />\n+ <node concept=\"37vLTw\" id=\"5ddlQKfILIR\" role=\"RRSow\">\n+ <ref role=\"3cqZAo\" node=\"5ddlQKfILIL\" resolve=\"ex\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbS\" id=\"5ddlQKfILIS\" role=\"1zxBo7\">\n<node concept=\"3clFbF\" id=\"4_k_9wJAIvi\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"4_k_9wJAIvj\" role=\"3clFbG\">\n<node concept=\"37vLTw\" id=\"4_k_9wJAIvk\" role=\"2Oq$k0\">\n</node>\n</node>\n</node>\n+ </node>\n+ </node>\n<node concept=\"3clFbF\" id=\"4_k_9wJED0p\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"4_k_9wJEEce\" role=\"3clFbG\">\n<node concept=\"37vLTw\" id=\"4_k_9wJED0n\" role=\"2Oq$k0\">\n<ref role=\"3cqZAo\" node=\"4_k_9wJuWVs\" resolve=\"propertySyncToMPSRequired\" />\n</node>\n<node concept=\"3clFbS\" id=\"4_k_9wJB2gW\" role=\"2LFqv$\">\n+ <node concept=\"3J1_TO\" id=\"5ddlQKfIL8Q\" role=\"3cqZAp\">\n+ <node concept=\"3uVAMA\" id=\"5ddlQKfIL8R\" role=\"1zxBo5\">\n+ <node concept=\"XOnhg\" id=\"5ddlQKfIL8S\" role=\"1zc67B\">\n+ <property role=\"TrG5h\" value=\"ex\" />\n+ <node concept=\"nSUau\" id=\"5ddlQKfIL8T\" role=\"1tU5fm\">\n+ <node concept=\"3uibUv\" id=\"5ddlQKfIL8U\" role=\"nSUat\">\n+ <ref role=\"3uigEE\" to=\"wyt6:~Exception\" resolve=\"Exception\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbS\" id=\"5ddlQKfIL8V\" role=\"1zc67A\">\n+ <node concept=\"RRSsy\" id=\"5ddlQKfIL8W\" role=\"3cqZAp\">\n+ <property role=\"RRSoG\" value=\"gZ5fh_4/error\" />\n+ <node concept=\"Xl_RD\" id=\"5ddlQKfIL8X\" role=\"RRSoy\" />\n+ <node concept=\"37vLTw\" id=\"5ddlQKfIL8Y\" role=\"RRSow\">\n+ <ref role=\"3cqZAo\" node=\"5ddlQKfIL8S\" resolve=\"ex\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbS\" id=\"5ddlQKfIL8Z\" role=\"1zxBo7\">\n<node concept=\"3clFbF\" id=\"4_k_9wJB3iH\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"4_k_9wJB3iI\" role=\"3clFbG\">\n<node concept=\"37vLTw\" id=\"4_k_9wJB3iJ\" role=\"2Oq$k0\">\n</node>\n</node>\n</node>\n+ </node>\n+ </node>\n<node concept=\"3clFbF\" id=\"4_k_9wJEIwE\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"4_k_9wJEJH6\" role=\"3clFbG\">\n<node concept=\"37vLTw\" id=\"4_k_9wJEIwC\" role=\"2Oq$k0\">\n<node concept=\"3cpWsb\" id=\"4_k_9wJESvV\" role=\"1tU5fm\" />\n</node>\n<node concept=\"3clFbS\" id=\"4_k_9wJERXz\" role=\"1bW5cS\">\n+ <node concept=\"3J1_TO\" id=\"5ddlQKfIImA\" role=\"3cqZAp\">\n+ <node concept=\"3uVAMA\" id=\"5ddlQKfIIwh\" role=\"1zxBo5\">\n+ <node concept=\"XOnhg\" id=\"5ddlQKfIIwi\" role=\"1zc67B\">\n+ <property role=\"TrG5h\" value=\"ex\" />\n+ <node concept=\"nSUau\" id=\"5ddlQKfIIwj\" role=\"1tU5fm\">\n+ <node concept=\"3uibUv\" id=\"5ddlQKfIINp\" role=\"nSUat\">\n+ <ref role=\"3uigEE\" to=\"wyt6:~Exception\" resolve=\"Exception\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbS\" id=\"5ddlQKfIIwk\" role=\"1zc67A\">\n+ <node concept=\"RRSsy\" id=\"5ddlQKfIJ$n\" role=\"3cqZAp\">\n+ <property role=\"RRSoG\" value=\"gZ5fh_4/error\" />\n+ <node concept=\"Xl_RD\" id=\"5ddlQKfIJ$p\" role=\"RRSoy\" />\n+ <node concept=\"37vLTw\" id=\"5ddlQKfIJUf\" role=\"RRSow\">\n+ <ref role=\"3cqZAo\" node=\"5ddlQKfIIwi\" resolve=\"ex\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbS\" id=\"5ddlQKfIImC\" role=\"1zxBo7\">\n<node concept=\"3clFbF\" id=\"4_k_9wJA7gO\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"4_k_9wJA7CY\" role=\"3clFbG\">\n<node concept=\"37vLTw\" id=\"4_k_9wJA7gN\" role=\"2Oq$k0\">\n</node>\n</node>\n</node>\n+ </node>\n+ </node>\n<node concept=\"3clFbF\" id=\"4_k_9wJEZ9c\" role=\"3cqZAp\">\n<node concept=\"3clFbT\" id=\"4_k_9wJEZ9b\" role=\"3clFbG\">\n<property role=\"3clFbU\" value=\"true\" />\n<node concept=\"3clFbH\" id=\"4_k_9wJF3be\" role=\"3cqZAp\" />\n<node concept=\"3clFbJ\" id=\"4_k_9wJEsos\" role=\"3cqZAp\">\n<node concept=\"3clFbS\" id=\"4_k_9wJEsou\" role=\"3clFbx\">\n+ <node concept=\"3J1_TO\" id=\"5ddlQKfIN8d\" role=\"3cqZAp\">\n+ <node concept=\"3uVAMA\" id=\"5ddlQKfIN8e\" role=\"1zxBo5\">\n+ <node concept=\"XOnhg\" id=\"5ddlQKfIN8f\" role=\"1zc67B\">\n+ <property role=\"TrG5h\" value=\"ex\" />\n+ <node concept=\"nSUau\" id=\"5ddlQKfIN8g\" role=\"1tU5fm\">\n+ <node concept=\"3uibUv\" id=\"5ddlQKfIN8h\" role=\"nSUat\">\n+ <ref role=\"3uigEE\" to=\"wyt6:~Exception\" resolve=\"Exception\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbS\" id=\"5ddlQKfIN8i\" role=\"1zc67A\">\n+ <node concept=\"RRSsy\" id=\"5ddlQKfIN8j\" role=\"3cqZAp\">\n+ <property role=\"RRSoG\" value=\"gZ5fh_4/error\" />\n+ <node concept=\"Xl_RD\" id=\"5ddlQKfIN8k\" role=\"RRSoy\" />\n+ <node concept=\"37vLTw\" id=\"5ddlQKfIN8l\" role=\"RRSow\">\n+ <ref role=\"3cqZAo\" node=\"5ddlQKfIN8f\" resolve=\"ex\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbS\" id=\"5ddlQKfIN8m\" role=\"1zxBo7\">\n<node concept=\"3clFbF\" id=\"4_k_9wJEtKB\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"4_k_9wJEu8H\" role=\"3clFbG\">\n<node concept=\"37vLTw\" id=\"4_k_9wJEtK_\" role=\"2Oq$k0\">\n</node>\n</node>\n</node>\n+ </node>\n+ </node>\n<node concept=\"37vLTw\" id=\"4_k_9wJEt4d\" role=\"3clFbw\">\n<ref role=\"3cqZAo\" node=\"4_k_9wJu$kG\" resolve=\"modelPropertiesSyncToMPSRequired\" />\n</node>\n<ref role=\"3cqZAo\" node=\"4_k_9wJ_0dj\" resolve=\"pendingReferences\" />\n</node>\n<node concept=\"3clFbS\" id=\"4_k_9wJ_0Kf\" role=\"2LFqv$\">\n+ <node concept=\"3J1_TO\" id=\"5ddlQKfIRyf\" role=\"3cqZAp\">\n+ <node concept=\"3uVAMA\" id=\"5ddlQKfIRyg\" role=\"1zxBo5\">\n+ <node concept=\"XOnhg\" id=\"5ddlQKfIRyh\" role=\"1zc67B\">\n+ <property role=\"TrG5h\" value=\"ex\" />\n+ <node concept=\"nSUau\" id=\"5ddlQKfIRyi\" role=\"1tU5fm\">\n+ <node concept=\"3uibUv\" id=\"5ddlQKfIRyj\" role=\"nSUat\">\n+ <ref role=\"3uigEE\" to=\"wyt6:~Exception\" resolve=\"Exception\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbS\" id=\"5ddlQKfIRyk\" role=\"1zc67A\">\n+ <node concept=\"RRSsy\" id=\"5ddlQKfIRyl\" role=\"3cqZAp\">\n+ <property role=\"RRSoG\" value=\"gZ5fh_4/error\" />\n+ <node concept=\"Xl_RD\" id=\"5ddlQKfIRym\" role=\"RRSoy\" />\n+ <node concept=\"37vLTw\" id=\"5ddlQKfIRyn\" role=\"RRSow\">\n+ <ref role=\"3cqZAo\" node=\"5ddlQKfIRyh\" resolve=\"ex\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbS\" id=\"5ddlQKfIRyo\" role=\"1zxBo7\">\n<node concept=\"3clFbF\" id=\"4_k_9wJ_0Kg\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"4_k_9wJ_0Kh\" role=\"3clFbG\">\n<node concept=\"2GrUjf\" id=\"4_k_9wJ_0Ki\" role=\"2Oq$k0\">\n</node>\n</node>\n</node>\n+ </node>\n+ </node>\n<node concept=\"3clFbF\" id=\"4_k_9wJ_0Kk\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"4_k_9wJ_0Kl\" role=\"3clFbG\">\n<node concept=\"37vLTw\" id=\"4_k_9wJ_0Km\" role=\"2Oq$k0\">\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | ModelSynchronizer: Exception handling during sync to MPS |
426,496 | 24.11.2021 10:23:11 | -3,600 | 13f6910df9fcd2bd9abd051aaa6aed50cfd9f686 | Moved the github credentials section to the top in the README | [
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "[](https://github.com/modelix/modelix/actions/workflows/overallbuild.yml)\n-# The modelix Project\n+# The Modelix Project\n-The modelix project develops a next generation language workbench that is native to the web and the cloud, inspired by [this document](http://voelter.de/data/pub/APlatformForSystemsAndBusinessModeling.pdf). On the path to this final vision, the short-term goal is to use MPS as the backend. To this end, we currently develop two components:\n+The Modelix project develops a next generation language workbench that is native to the web and the cloud, inspired by [this document](http://voelter.de/data/pub/APlatformForSystemsAndBusinessModeling.pdf). On the path to this final vision, the short-term goal is to use MPS as the backend. To this end, we currently develop two components:\n* Database/Cloud storage for MPS models with realtime collaboration\n* Server-based execution of MPS and browser-based editors\n-# How to run modelix\n-- At this time there are no builds or releases available. You have to clone the repo to use modelix.\n-- You can run modelix locally and in the Google cloud. The details are described in [Running modelix](doc/running-modelix.md).\n+## Access to Github Packages\n+\n+Modelix itself and some of its dependencies are published to Github Packages Repositories.\n+To access these repositories from gradle you have to add your GitHub credentials to `~/.gradle/gradle.properties`:\n+\n+```\n+gpr.user=YOUR_USER_NAME\n+gpr.key=TOKEN_WITH_PACKAGES_READ_ACCESS\n+```\n+\n+`gpr.key` is an access token that you can generate at https://github.com/settings/tokens.\n+This token needs the `read:packages` permission.\n+\n+# How to run Modelix\n+\n+- At this time there are no builds or releases available. You have to clone the repo to use Modelix.\n+- You can run Modelix locally and in the Google cloud. The details are described in [Running Modelix](doc/running-modelix.md).\n- Then check out some of the [samples](doc/samples.md).\n- Or check out the [tutorials](doc/tutorials.md).\n@@ -24,7 +38,7 @@ The modelix project develops a next generation language workbench that is native\n\n-The image above shows the components that modelix currently consists of.\n+The image above shows the components that Modelix currently consists of.\nMPS is running in headless mode on the server with an HTTP server installed as a plugin.\nThe browser connects to that server and receives the HTML and JavaScript code required for the interactive model editor.\n@@ -52,9 +66,9 @@ To access the web editor a user has to login in with a google account first.\nAn OAuth proxy takes care of that and adds an HTTP header with the users e-mail address to the request.\n## Editor\n-modelix provides an editor in the browser for the languages implemented in MPS.\n+Modelix provides an editor in the browser for the languages implemented in MPS.\nThis can be an image based editor that renders the editor in MPS using the default editor definition\n-or an HTML based editor that requires a separate editor definition in a language provided by modelix.\n+or an HTML based editor that requires a separate editor definition in a language provided by Modelix.\nCommon to both approaches is that the user input (keyboard, mouse) is processed on the server\nand the update of the projection after a model change also happens on the server.\n@@ -64,7 +78,7 @@ This removes the need to replicate the model into the browser, which would resul\n## Model\nRunning MPS in the cloud requires an alternative to the file system for storing models.\n-modelix implements a data structure that allows replication between all MPS instances connected to the same model server.\n+Modelix implements a data structure that allows replication between all MPS instances connected to the same model server.\nIt is very similar to the [git storage format](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects),\nbut instead of files it stores nodes in its key-value data store.\n@@ -91,7 +105,7 @@ File | Description\n[doc](doc) | Documentation\n[gradle-plugin](gradle-plugin) | gradle plugin for downloading a model from the model server to an MPS model file\n[gradle-plugin-test](gradle-plugin-test) | Demo project that uses the gradle plugin.\n-[kubernetes](kubernetes) | YAML configuration files for running modelix in a kubernetes cluster\n+[kubernetes](kubernetes) | YAML configuration files for running Modelix in a kubernetes cluster\n[model-client](model-client) | Model implementation with real-time collaboration support implemented in kotlin\n[model-server](model-server) | Java project that implements a REST API on top of an [Apache Ignite](https://ignite.apache.org/) key value store. It is very generic and lightweight and doesn't know anything about models and their storage format. The mapping between the model data structure and the key value entries happens in MPS.\n[mps](mps) | MPS project that implements all the MPS plugins. That's a plugin for synchronizing models with the model server and plugins for editing models in the browser.\n@@ -127,10 +141,10 @@ File | Description\n[kubernetes-apply-local.sh](kubernetes-apply-local.sh) |\n[kubernetes-gcloud-dbsecret.sh](kubernetes-gcloud-dbsecret.sh) |\n[kubernetes-modelsecret.sh](kubernetes-modelsecret.sh) |\n-[kubernetes-open-proxy.sh](kubernetes-open-proxy.sh) | Opens modelix in the browser after loading the kubernetes configuration in docker desktop\n-[kubernetes-use-latest-tag.sh](kubernetes-use-latest-tag.sh) | Use this before [kubernetes-apply-local.sh](kubernetes-apply-local.sh) to update the kubernetes configurations to use the latest modelix version\n+[kubernetes-open-proxy.sh](kubernetes-open-proxy.sh) | Opens Modelix in the browser after loading the kubernetes configuration in docker desktop\n+[kubernetes-use-latest-tag.sh](kubernetes-use-latest-tag.sh) | Use this before [kubernetes-apply-local.sh](kubernetes-apply-local.sh) to update the kubernetes configurations to use the latest Modelix version\n[modelix-version.sh](modelix-version.sh) | Reads or creates a modelix.version file that is used to tag the docker images\n-[mps-version.properties](mps-version.properties) | The MPS version that modelix is based on\n+[mps-version.properties](mps-version.properties) | The MPS version that Modelix is based on\n[run-ui-server.sh](run-ui-server.sh) | This is packaged into the docker image and doesn't work outside of it.\n[settings.gradle](settings.gradle) |\n[update-gcloud.sh](update-gcloud.sh) | If you want to build and run your own images inside you cluster.\n@@ -142,7 +156,7 @@ Here are some open topics that we may work on in the future. The order doesn't h\n- CI integration\n- Gradle plugin for downloading models from the model server\n-- Code review tool based on modelix\n+- Code review tool based on Modelix\n- Git integration: Allow to specify a repository and a branch/version that is then loaded into an MPS instance running in kubernetes\n- Collaborative editing in MPS\n- Show list of active users working on the same model\n@@ -178,13 +192,3 @@ To use them in your gradle script add this repository:\n}\n}\n```\n-\n-You also have to add your GitHub credential to `~/.gradle/gradle.properties`:\n-\n-```\n-gpr.user=YOUR_USER_NAME\n-gpr.key=TOKEN_WITH_PACKAGES_READ_ACCESS\n-```\n-\n-`gpr.key` is an access token that you can generate at https://github.com/settings/tokens.\n-This token needs the `read:packages` permission.\n\\ No newline at end of file\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Moved the github credentials section to the top in the README |
426,496 | 24.11.2021 10:23:57 | -3,600 | 23c907b15c775c7661db481ba24c755d891368ac | Wrong header level | [
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -8,7 +8,7 @@ The Modelix project develops a next generation language workbench that is native\n* Server-based execution of MPS and browser-based editors\n-## Access to Github Packages\n+# Access to Github Packages\nModelix itself and some of its dependencies are published to Github Packages Repositories.\nTo access these repositories from gradle you have to add your GitHub credentials to `~/.gradle/gradle.properties`:\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Wrong header level |
426,496 | 29.11.2021 19:40:42 | -3,600 | 45a83b71d4aa042a3b8c783bf8f3f1db0057c12b | GraphQL: Schema loading from the model server (1) | [
{
"change_type": "MODIFY",
"old_path": "graphql-server/build.gradle.kts",
"new_path": "graphql-server/build.gradle.kts",
"diff": "@@ -22,6 +22,7 @@ dependencies {\nimplementation(\"io.ktor\", \"ktor-server-netty\", ktorVersion)\nimplementation(\"ch.qos.logback\", \"logback-classic\", logbackVersion)\nimplementation(\"org.jetbrains.kotlinx\", \"kotlinx-coroutines-jdk8\", kotlinCoroutinesVersion)\n+ implementation(project(\":model-client\"))\n}\ngraphql {\n"
},
{
"change_type": "MODIFY",
"old_path": "graphql-server/src/main/kotlin/org/modelix/graphql/server/GraphQLModule.kt",
"new_path": "graphql-server/src/main/kotlin/org/modelix/graphql/server/GraphQLModule.kt",
"diff": "@@ -28,9 +28,10 @@ import io.ktor.routing.routing\nfun Application.graphQLModule() {\ninstall(Routing)\n+ val modelixGraphQLServer = ModelixGraphQLServer()\nrouting {\npost(\"graphql\") {\n- ModelixGraphQLServer().handle(this.call)\n+ modelixGraphQLServer.handle(this.call)\n}\nget(\"playground\") {\n"
},
{
"change_type": "MODIFY",
"old_path": "graphql-server/src/main/kotlin/org/modelix/graphql/server/ModelixGraphQLServer.kt",
"new_path": "graphql-server/src/main/kotlin/org/modelix/graphql/server/ModelixGraphQLServer.kt",
"diff": "package org.modelix.graphql.server\nimport com.expediagroup.graphql.generator.extensions.deepName\n-import com.expediagroup.graphql.server.execution.GraphQLRequestParser\nimport com.expediagroup.graphql.server.extensions.toGraphQLError\nimport com.expediagroup.graphql.server.extensions.toGraphQLKotlinType\nimport com.expediagroup.graphql.server.extensions.toGraphQLResponse\n@@ -30,20 +29,30 @@ import io.ktor.http.*\nimport io.ktor.request.*\nimport io.ktor.response.*\nimport kotlinx.coroutines.future.await\n+import org.modelix.model.api.ITree\n+import org.modelix.model.client.ReplicatedRepository\n+import org.modelix.model.client.RestWebModelClient\n+import org.modelix.model.lazy.RepositoryId\n+import org.modelix.model.metameta.MetaMetaLanguage\n+import org.modelix.model.metameta.MetaModelIndex\nimport java.io.IOException\nclass ModelixGraphQLServer {\nprivate val mapper = jacksonObjectMapper()\n+ private val modelClient = RestWebModelClient(\"http://localhost:32631/model/\")\n+ private val repository = ReplicatedRepository(modelClient, RepositoryId(\"default\"), \"master\", { \"GraphQL\" })\nsuspend fun handle(applicationCall: ApplicationCall) {\n+ val tree = repository.branch.computeReadT { it.tree }\n+\nval request = parseRequest(applicationCall.request)\nval result: GraphQLServerResponse? = when (request) {\n- is GraphQLRequest -> handleGQLRequest(request)\n+ is GraphQLRequest -> handleGQLRequest(request, tree)\nis GraphQLBatchRequest -> GraphQLBatchResponse(\nrequest.requests.map {\n- handleGQLRequest(it)\n+ handleGQLRequest(it, tree)\n}\n)\nelse -> null\n@@ -64,9 +73,9 @@ class ModelixGraphQLServer {\nthrow IOException(\"Unable to parse GraphQL payload.\")\n}\n- suspend fun handleGQLRequest(request: GraphQLRequest): GraphQLResponse<*> {\n+ suspend fun handleGQLRequest(request: GraphQLRequest, tree: ITree): GraphQLResponse<*> {\nval executionInput = toExecutionInput(request)\n- val schema = buildSchema()\n+ val schema = buildSchema(tree)\nval graphQL = GraphQL.newGraphQL(schema).build()\nreturn try {\ngraphQL.executeAsync(executionInput).await().toGraphQLResponse()\n@@ -88,7 +97,26 @@ class ModelixGraphQLServer {\nreturn \"value for $fieldName\"\n}\n- fun buildSchema(): GraphQLSchema {\n+ fun buildSchema(tree: ITree): GraphQLSchema {\n+ val typeBuilders = HashMap<String, GraphQLObjectType.Builder>()\n+\n+ for (languageId in tree.getChildren(ITree.ROOT_ID, MetaModelIndex.LANGUAGES_ROLE)) {\n+ val languageName = tree.getProperty(languageId, MetaMetaLanguage.property_Language_name.name) ?: continue\n+ for (conceptId in tree.getChildren(languageId, MetaMetaLanguage.childLink_Language_concepts.name)) {\n+ val conceptName = tree.getProperty(conceptId, MetaMetaLanguage.property_Concept_name.name) ?: continue\n+ val fqName = toValidName(\"$languageName.$conceptName\")\n+ val type = GraphQLObjectType.newObject()\n+ .name(fqName)\n+ .field { it.name(\"_modelix_id\").type(Scalars.GraphQLString) }\n+ .apply {\n+ for (property in tree.getChildren(conceptId, MetaMetaLanguage.childLink_Concept_properties.name)) {\n+ field { it.name(tree.getProperty(property, MetaMetaLanguage.property_Property_name.name)).type(Scalars.GraphQLString) }\n+ }\n+ }\n+ typeBuilders[fqName] = type\n+ }\n+ }\n+\nval customer = GraphQLObjectType.newObject()\n.name(\"Customer\")\n.field { it.name(\"name\").type(Scalars.GraphQLString) }\n@@ -106,13 +134,14 @@ class ModelixGraphQLServer {\nif (env.fieldDefinition.type == Scalars.GraphQLString || env.fieldDefinition.name == \"customers\") fetcher else PropertyDataFetcher.fetching<Any>(env.fieldDefinition.name)\n}\n-\n-\nreturn GraphQLSchema.newSchema()\n.query(GraphQLObjectType.newObject()\n.name(\"Query\")\n.field { it.name(\"customers\").type(GraphQLList.list(customer)) })\n+ .also { schemaBuilder -> typeBuilders.values.forEach { schemaBuilder.additionalType(it.build()) } }\n.codeRegistry(GraphQLCodeRegistry.newCodeRegistry().defaultDataFetcher(fetcherFactory).build())\n.build()\n}\n+\n+ fun toValidName(name: String) = name.replace(\"[^_0-9A-Za-z]\".toRegex(), \"_\")\n}\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | GraphQL: Schema loading from the model server (1) |
426,496 | 29.11.2021 20:12:46 | -3,600 | 382321d767bb5d697a63e2f1db2cd47781dcad49 | GraphQL: Extracted schema generation into a new class | [
{
"change_type": "MODIFY",
"old_path": "graphql-server/src/main/kotlin/org/modelix/graphql/server/ModelixGraphQLServer.kt",
"new_path": "graphql-server/src/main/kotlin/org/modelix/graphql/server/ModelixGraphQLServer.kt",
"diff": "@@ -75,7 +75,7 @@ class ModelixGraphQLServer {\nsuspend fun handleGQLRequest(request: GraphQLRequest, tree: ITree): GraphQLResponse<*> {\nval executionInput = toExecutionInput(request)\n- val schema = buildSchema(tree)\n+ val schema = ModelixSchemaGenerator(tree).generate()\nval graphQL = GraphQL.newGraphQL(schema).build()\nreturn try {\ngraphQL.executeAsync(executionInput).await().toGraphQLResponse()\n@@ -96,52 +96,4 @@ class ModelixGraphQLServer {\nfun load(fieldName: String): String {\nreturn \"value for $fieldName\"\n}\n-\n- fun buildSchema(tree: ITree): GraphQLSchema {\n- val typeBuilders = HashMap<String, GraphQLObjectType.Builder>()\n-\n- for (languageId in tree.getChildren(ITree.ROOT_ID, MetaModelIndex.LANGUAGES_ROLE)) {\n- val languageName = tree.getProperty(languageId, MetaMetaLanguage.property_Language_name.name) ?: continue\n- for (conceptId in tree.getChildren(languageId, MetaMetaLanguage.childLink_Language_concepts.name)) {\n- val conceptName = tree.getProperty(conceptId, MetaMetaLanguage.property_Concept_name.name) ?: continue\n- val fqName = toValidName(\"$languageName.$conceptName\")\n- val type = GraphQLObjectType.newObject()\n- .name(fqName)\n- .field { it.name(\"_modelix_id\").type(Scalars.GraphQLString) }\n- .apply {\n- for (property in tree.getChildren(conceptId, MetaMetaLanguage.childLink_Concept_properties.name)) {\n- field { it.name(tree.getProperty(property, MetaMetaLanguage.property_Property_name.name)).type(Scalars.GraphQLString) }\n- }\n- }\n- typeBuilders[fqName] = type\n- }\n- }\n-\n- val customer = GraphQLObjectType.newObject()\n- .name(\"Customer\")\n- .field { it.name(\"name\").type(Scalars.GraphQLString) }\n- .build()\n-\n- val fetcher: DataFetcher<Any> = DataFetcher{ env ->\n- if (env.field.name == \"customers\") listOf(\"customer A\", \"customer B\")\n- else when (env.fieldType) {\n- Scalars.GraphQLString -> \"field: ${env.field.name}: ${env.fieldType.deepName}\"\n- customer -> \"Customer: \" + env.parentType.toString()\n- else -> null\n- }\n- }\n- val fetcherFactory: DataFetcherFactory<Any> = DataFetcherFactory{ env ->\n- if (env.fieldDefinition.type == Scalars.GraphQLString || env.fieldDefinition.name == \"customers\") fetcher else PropertyDataFetcher.fetching<Any>(env.fieldDefinition.name)\n- }\n-\n- return GraphQLSchema.newSchema()\n- .query(GraphQLObjectType.newObject()\n- .name(\"Query\")\n- .field { it.name(\"customers\").type(GraphQLList.list(customer)) })\n- .also { schemaBuilder -> typeBuilders.values.forEach { schemaBuilder.additionalType(it.build()) } }\n- .codeRegistry(GraphQLCodeRegistry.newCodeRegistry().defaultDataFetcher(fetcherFactory).build())\n- .build()\n- }\n-\n- fun toValidName(name: String) = name.replace(\"[^_0-9A-Za-z]\".toRegex(), \"_\")\n}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "graphql-server/src/main/kotlin/org/modelix/graphql/server/ModelixSchemaGenerator.kt",
"diff": "+/*\n+ * Copyright 2003-2021 JetBrains s.r.o.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.modelix.graphql.server\n+\n+import com.expediagroup.graphql.generator.extensions.deepName\n+import graphql.Scalars\n+import graphql.schema.*\n+import org.modelix.model.api.ITree\n+import org.modelix.model.metameta.MetaMetaLanguage\n+import org.modelix.model.metameta.MetaModelIndex\n+\n+class ModelixSchemaGenerator(val tree: ITree) {\n+\n+ fun generate(): GraphQLSchema {\n+ val typeBuilders = HashMap<Long, GraphQLObjectType.Builder>()\n+\n+ val baseConcept = GraphQLObjectType.newObject()\n+ .name(\"BaseConcept\")\n+ .field { it.name(\"_modelix_id\").type(Scalars.GraphQLString) }\n+ .build()\n+\n+ for (languageId in tree.getChildren(ITree.ROOT_ID, MetaModelIndex.LANGUAGES_ROLE)) {\n+ for (conceptId in tree.getChildren(languageId, MetaMetaLanguage.childLink_Language_concepts.name)) {\n+ val fqName = getConceptFqName(conceptId, tree)\n+ val type = GraphQLObjectType.newObject()\n+ .name(fqName)\n+ .field { it.name(\"_modelix_id\").type(Scalars.GraphQLString) }\n+ .apply {\n+ for (property in tree.getChildren(conceptId, MetaMetaLanguage.childLink_Concept_properties.name)) {\n+ field { it.name(tree.getProperty(property, MetaMetaLanguage.property_Property_name.name)).type(Scalars.GraphQLString) }\n+ }\n+ for (childLink in tree.getChildren(conceptId, MetaMetaLanguage.childLink_Concept_childLinks.name)) {\n+ field { it.name(tree.getProperty(childLink, MetaMetaLanguage.property_ChildLink_name.name)).type(baseConcept) }\n+ }\n+ for (referenceLink in tree.getChildren(conceptId, MetaMetaLanguage.childLink_Concept_referenceLinks.name)) {\n+ field { it.name(tree.getProperty(referenceLink, MetaMetaLanguage.property_ReferenceLink_name.name)).type(baseConcept) }\n+ }\n+ }\n+ typeBuilders[conceptId] = type\n+ }\n+ }\n+\n+\n+\n+// val fetcher: DataFetcher<Any> = DataFetcher{ env ->\n+// if (env.field.name == \"customers\") listOf(\"customer A\", \"customer B\")\n+// else when (env.fieldType) {\n+// Scalars.GraphQLString -> \"field: ${env.field.name}: ${env.fieldType.deepName}\"\n+// customer -> \"Customer: \" + env.parentType.toString()\n+// else -> null\n+// }\n+// }\n+// val fetcherFactory: DataFetcherFactory<Any> = DataFetcherFactory{ env ->\n+// if (env.fieldDefinition.type == Scalars.GraphQLString || env.fieldDefinition.name == \"customers\") fetcher else PropertyDataFetcher.fetching<Any>(env.fieldDefinition.name)\n+// }\n+\n+ return GraphQLSchema.newSchema()\n+ .query(GraphQLObjectType.newObject()\n+ .name(\"Query\")\n+ .field { it.name(\"dummy\").type(Scalars.GraphQLString) })\n+ .also { schemaBuilder -> typeBuilders.values.forEach { schemaBuilder.additionalType(it.build()) } }\n+// .codeRegistry(GraphQLCodeRegistry.newCodeRegistry().defaultDataFetcher(fetcherFactory).build())\n+ .build()\n+ }\n+\n+ fun getConceptFqName(conceptId: Long, tree: ITree): String {\n+ val conceptName = tree.getProperty(conceptId, MetaMetaLanguage.property_Concept_name.name)\n+ val languageId = tree.getParent(conceptId)\n+ val languageName = tree.getProperty(languageId, MetaMetaLanguage.property_Language_name.name)\n+ return toValidName(\"$languageName.$conceptName\")\n+ }\n+\n+ fun toValidName(name: String) = name.replace(\"[^_0-9A-Za-z]\".toRegex(), \"_\")\n+}\n\\ No newline at end of file\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | GraphQL: Extracted schema generation into a new class |
426,496 | 29.11.2021 20:32:35 | -3,600 | 151d79835db1abe65fbfcfc58e9080f287ccfb85 | GraphQL: Correct types for reference and child links | [
{
"change_type": "MODIFY",
"old_path": "graphql-server/src/main/kotlin/org/modelix/graphql/server/ModelixSchemaGenerator.kt",
"new_path": "graphql-server/src/main/kotlin/org/modelix/graphql/server/ModelixSchemaGenerator.kt",
"diff": "*/\npackage org.modelix.graphql.server\n-import com.expediagroup.graphql.generator.extensions.deepName\nimport graphql.Scalars\nimport graphql.schema.*\n+import org.modelix.model.api.INodeReference\nimport org.modelix.model.api.ITree\n+import org.modelix.model.api.PNodeReference\nimport org.modelix.model.metameta.MetaMetaLanguage\nimport org.modelix.model.metameta.MetaModelIndex\nclass ModelixSchemaGenerator(val tree: ITree) {\n-\n- fun generate(): GraphQLSchema {\n- val typeBuilders = HashMap<Long, GraphQLObjectType.Builder>()\n-\n- val baseConcept = GraphQLObjectType.newObject()\n+ private val conceptTypes = HashMap<Long, GraphQLType>()\n+ private val baseConcept = GraphQLObjectType.newObject()\n.name(\"BaseConcept\")\n.field { it.name(\"_modelix_id\").type(Scalars.GraphQLString) }\n.build()\n+ fun generate(): GraphQLSchema {\nfor (languageId in tree.getChildren(ITree.ROOT_ID, MetaModelIndex.LANGUAGES_ROLE)) {\nfor (conceptId in tree.getChildren(languageId, MetaMetaLanguage.childLink_Language_concepts.name)) {\n- val fqName = getConceptFqName(conceptId, tree)\n- val type = GraphQLObjectType.newObject()\n+ val fqName = getConceptFqName(conceptId)\n+ conceptTypes[conceptId] = GraphQLObjectType.newObject()\n.name(fqName)\n.field { it.name(\"_modelix_id\").type(Scalars.GraphQLString) }\n.apply {\n@@ -43,18 +42,22 @@ class ModelixSchemaGenerator(val tree: ITree) {\nfield { it.name(tree.getProperty(property, MetaMetaLanguage.property_Property_name.name)).type(Scalars.GraphQLString) }\n}\nfor (childLink in tree.getChildren(conceptId, MetaMetaLanguage.childLink_Concept_childLinks.name)) {\n- field { it.name(tree.getProperty(childLink, MetaMetaLanguage.property_ChildLink_name.name)).type(baseConcept) }\n+ field(generateField(\n+ tree.getProperty(childLink, MetaMetaLanguage.property_ChildLink_name.name),\n+ tree.getReferenceTarget(childLink, MetaMetaLanguage.referenceLink_ChildLink_childConcept.name)\n+ ))\n}\nfor (referenceLink in tree.getChildren(conceptId, MetaMetaLanguage.childLink_Concept_referenceLinks.name)) {\n- field { it.name(tree.getProperty(referenceLink, MetaMetaLanguage.property_ReferenceLink_name.name)).type(baseConcept) }\n+ field(generateField(\n+ tree.getProperty(referenceLink, MetaMetaLanguage.property_ReferenceLink_name.name),\n+ tree.getReferenceTarget(referenceLink, MetaMetaLanguage.referenceLink_ReferenceLink_targetConcept.name)\n+ ))\n}\n}\n- typeBuilders[conceptId] = type\n+ .build()\n}\n}\n-\n-\n// val fetcher: DataFetcher<Any> = DataFetcher{ env ->\n// if (env.field.name == \"customers\") listOf(\"customer A\", \"customer B\")\n// else when (env.fieldType) {\n@@ -71,12 +74,12 @@ class ModelixSchemaGenerator(val tree: ITree) {\n.query(GraphQLObjectType.newObject()\n.name(\"Query\")\n.field { it.name(\"dummy\").type(Scalars.GraphQLString) })\n- .also { schemaBuilder -> typeBuilders.values.forEach { schemaBuilder.additionalType(it.build()) } }\n+ .also { schemaBuilder -> conceptTypes.values.forEach { schemaBuilder.additionalType(it) } }\n// .codeRegistry(GraphQLCodeRegistry.newCodeRegistry().defaultDataFetcher(fetcherFactory).build())\n.build()\n}\n- fun getConceptFqName(conceptId: Long, tree: ITree): String {\n+ fun getConceptFqName(conceptId: Long): String {\nval conceptName = tree.getProperty(conceptId, MetaMetaLanguage.property_Concept_name.name)\nval languageId = tree.getParent(conceptId)\nval languageName = tree.getProperty(languageId, MetaMetaLanguage.property_Language_name.name)\n@@ -84,4 +87,16 @@ class ModelixSchemaGenerator(val tree: ITree) {\n}\nfun toValidName(name: String) = name.replace(\"[^_0-9A-Za-z]\".toRegex(), \"_\")\n+\n+ fun generateField(name: String?, targetConcept: INodeReference?): GraphQLFieldDefinition {\n+ val targetType = if (targetConcept is PNodeReference) {\n+ GraphQLTypeReference.typeRef(getConceptFqName(targetConcept.id))\n+ } else {\n+ baseConcept\n+ }\n+ return GraphQLFieldDefinition.newFieldDefinition()\n+ .name(name)\n+ .type(targetType)\n+ .build()\n+ }\n}\n\\ No newline at end of file\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | GraphQL: Correct types for reference and child links |
426,496 | 29.11.2021 21:23:06 | -3,600 | 7b4b8770340fb62c0e2e2a8d50f00e83537cb075 | GraphQL: Any type (a union type of all concepts) | [
{
"change_type": "MODIFY",
"old_path": "graphql-server/src/main/kotlin/org/modelix/graphql/server/ModelixSchemaGenerator.kt",
"new_path": "graphql-server/src/main/kotlin/org/modelix/graphql/server/ModelixSchemaGenerator.kt",
"diff": "@@ -20,11 +20,13 @@ import graphql.schema.*\nimport org.modelix.model.api.INodeReference\nimport org.modelix.model.api.ITree\nimport org.modelix.model.api.PNodeReference\n+import org.modelix.model.api.SimpleConcept\nimport org.modelix.model.metameta.MetaMetaLanguage\nimport org.modelix.model.metameta.MetaModelIndex\n+import org.modelix.model.metameta.PersistedConcept\nclass ModelixSchemaGenerator(val tree: ITree) {\n- private val conceptTypes = HashMap<Long, GraphQLType>()\n+ private val conceptTypes = HashMap<Long, GraphQLObjectType>()\nprivate val baseConcept = GraphQLObjectType.newObject()\n.name(\"BaseConcept\")\n.field { it.name(\"_modelix_id\").type(Scalars.GraphQLString) }\n@@ -37,6 +39,11 @@ class ModelixSchemaGenerator(val tree: ITree) {\nconceptTypes[conceptId] = GraphQLObjectType.newObject()\n.name(fqName)\n.field { it.name(\"_modelix_id\").type(Scalars.GraphQLString) }\n+ .field { it\n+ .name(\"role\")\n+ .type(Scalars.GraphQLString)\n+ .dataFetcher { env -> tree.getRole(env.getSource()) }\n+ }\n.apply {\nfor (property in tree.getChildren(conceptId, MetaMetaLanguage.childLink_Concept_properties.name)) {\nfield { it.name(tree.getProperty(property, MetaMetaLanguage.property_Property_name.name)).type(Scalars.GraphQLString) }\n@@ -58,6 +65,12 @@ class ModelixSchemaGenerator(val tree: ITree) {\n}\n}\n+ val anyType = GraphQLUnionType.newUnionType()\n+ .name(\"Any\")\n+ .also { union -> conceptTypes.values.sortedBy { it.name }.forEach { union.possibleType(it) }}\n+ .build()\n+\n+\n// val fetcher: DataFetcher<Any> = DataFetcher{ env ->\n// if (env.field.name == \"customers\") listOf(\"customer A\", \"customer B\")\n// else when (env.fieldType) {\n@@ -73,9 +86,21 @@ class ModelixSchemaGenerator(val tree: ITree) {\nreturn GraphQLSchema.newSchema()\n.query(GraphQLObjectType.newObject()\n.name(\"Query\")\n- .field { it.name(\"dummy\").type(Scalars.GraphQLString) })\n- .also { schemaBuilder -> conceptTypes.values.forEach { schemaBuilder.additionalType(it) } }\n-// .codeRegistry(GraphQLCodeRegistry.newCodeRegistry().defaultDataFetcher(fetcherFactory).build())\n+ .field { it\n+ .name(\"roots\")\n+ .type(GraphQLList.list(anyType))\n+ .dataFetcher { env -> tree.getAllChildren(ITree.ROOT_ID).filter { tree.getConcept(it) !is SimpleConcept } }\n+ })\n+ .also { schemaBuilder -> conceptTypes.values.sortedBy { it.name }.forEach { schemaBuilder.additionalType(it) } }\n+ .additionalType(anyType)\n+ .codeRegistry(GraphQLCodeRegistry.newCodeRegistry()\n+// .defaultDataFetcher(fetcherFactory)\n+ .typeResolver(\"Any\") { env ->\n+ val nodeId = env.getObject() as Long\n+ val concept = tree.getConcept(nodeId) as PersistedConcept\n+ conceptTypes[concept.id]\n+ }\n+ .build())\n.build()\n}\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | GraphQL: Any type (a union type of all concepts) |
426,496 | 30.11.2021 13:25:04 | -3,600 | 9bc8447a77b3c4cee6a449a2087f82f0c518655f | Inspector for the image editor is optional | [
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.ui.sm/models/org.modelix.ui.sm.transformations.mps",
"new_path": "mps/org.modelix.ui.sm/models/org.modelix.ui.sm.transformations.mps",
"diff": "<node concept=\"214gnc\" id=\"7trMQm3aFic\" role=\"027rp\">\n<ref role=\"1YEVMl\" node=\"7trMQm3W2UH\" resolve=\"imageNodeEditor\" />\n<node concept=\"214o7A\" id=\"7trMQm3aFiA\" role=\"214sll\" />\n+ <node concept=\"3clFbT\" id=\"2A42BCgWIpN\" role=\"214sll\">\n+ <property role=\"3clFbU\" value=\"true\" />\n+ </node>\n</node>\n</node>\n</node>\n<ref role=\"02i3$\" to=\"tpck:gw2VY9q\" resolve=\"BaseConcept\" />\n</node>\n</node>\n+ <node concept=\"02i3K\" id=\"2A42BCgQylo\" role=\"02i3f\">\n+ <property role=\"TrG5h\" value=\"showInspector\" />\n+ <node concept=\"29qXpG\" id=\"2A42BCgQyxh\" role=\"02i2B\" />\n+ </node>\n<node concept=\"026TG\" id=\"7trMQm3W2UK\" role=\"026TK\">\n<node concept=\"027og\" id=\"4qSU4CXyXVY\" role=\"026TJ\">\n<ref role=\"02LMe\" to=\"70w2:4qSU4CXgOj4\" resolve=\"HTMLMainElement\" />\n</node>\n</node>\n</node>\n+ <node concept=\"2155sH\" id=\"2A42BCgWHQD\" role=\"3coYjR\">\n+ <ref role=\"2155sG\" node=\"2A42BCgQylo\" resolve=\"showInspector\" />\n+ </node>\n</node>\n- <node concept=\"2OrE70\" id=\"3GZ$saVVLQi\" role=\"02LM9\" />\n<node concept=\"027rt\" id=\"2sCgtIfe2nI\" role=\"02LM9\">\n<ref role=\"027rv\" to=\"70w2:7NImM053Sep\" resolve=\"children\" />\n<node concept=\"027og\" id=\"2sCgtIfe2nJ\" role=\"027rp\">\n</node>\n</node>\n</node>\n+ <node concept=\"2155sH\" id=\"2A42BCgWHU_\" role=\"3coYjR\">\n+ <ref role=\"2155sG\" node=\"2A42BCgQylo\" resolve=\"showInspector\" />\n+ </node>\n</node>\n</node>\n</node>\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Inspector for the image editor is optional |
426,496 | 30.11.2021 19:01:37 | -3,600 | 3356d9eb9a4305e46f77a3476c84097ab58988af | Dockerfile for project split into two
To avoid running "apt install unzip" each time there is a change in modelix. | [
{
"change_type": "MODIFY",
"old_path": "Dockerfile-projector",
"new_path": "Dockerfile-projector",
"diff": "-FROM modelix/projector-mps:2020.3.5\n+FROM modelix/modelix-projector-base\n-COPY install-plugins.sh /\n-COPY build/branding.zip /projector/ide/lib/branding.jar\n+USER root\nCOPY artifacts/de.itemis.mps.extensions/ /mps-plugins/MPS-extensions\nCOPY build/org.modelix/build/artifacts/org.modelix/plugins/ /mps-plugins/modelix\n-USER root\n-RUN apt-get update \\\n- && apt-get install unzip -y \\\n- && rm -rf /var/lib/apt/lists/* \\\n- && rm -rf /var/cache/apt\nRUN /install-plugins.sh /projector/ide/plugins/\nCOPY projector-user-home /home/projector-user\nCOPY log.xml /projector/ide/bin/log.xml\n-RUN mkdir -p /mps-plugins\n-RUN mkdir -p /mps-languages\n+\nRUN chown -R projector-user:projector-user /home/projector-user\nRUN chown -R projector-user:projector-user /mps-plugins\nRUN chown -R projector-user:projector-user /mps-languages\nRUN chown -R projector-user:projector-user /projector/ide/\n+\nUSER projector-user\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "Dockerfile-projector-base",
"diff": "+FROM modelix/projector-mps:2020.3.5\n+\n+USER root\n+COPY install-plugins.sh /\n+COPY build/branding.zip /projector/ide/lib/branding.jar\n+\n+RUN apt-get update \\\n+ && apt-get install unzip -y \\\n+ && rm -rf /var/lib/apt/lists/* \\\n+ && rm -rf /var/cache/apt\n+\n+RUN mkdir -p /mps-plugins\n+RUN mkdir -p /mps-languages\n+RUN chown -R projector-user:projector-user /home/projector-user\n+RUN chown -R projector-user:projector-user /mps-plugins\n+RUN chown -R projector-user:projector-user /mps-languages\n+RUN chown -R projector-user:projector-user /projector/ide/\n+\n+USER projector-user\n"
},
{
"change_type": "MODIFY",
"old_path": "docker-build-all.sh",
"new_path": "docker-build-all.sh",
"diff": "./docker-build-mps.sh\n./docker-build-base.sh\n./docker-build-ui.sh\n+./docker-build-projector-base.sh\n./docker-build-projector.sh\n./docker-build-proxy.sh\n./docker-build-uiproxy.sh\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "docker-build-projector-base.sh",
"diff": "+#!/bin/sh\n+\n+set -e\n+\n+# patch branding.jar to not show EULA and data sharing agreement at startup\n+rm -rf build/branding\n+rm -f build/branding.zip\n+unzip -d build/branding artifacts/mps/lib/branding.jar\n+(\n+ cd build/branding\n+ sed -i.bak -E \"s/JetBrains s.r.o./Modelix/\" idea/IdeaApplicationInfo.xml\n+ rm idea/IdeaApplicationInfo.xml.bak\n+ zip -r ../branding.zip ./*\n+)\n+\n+docker build --no-cache -f Dockerfile-projector-base -t modelix/modelix-projector-base .\n"
},
{
"change_type": "MODIFY",
"old_path": "docker-build-projector.sh",
"new_path": "docker-build-projector.sh",
"diff": "@@ -4,17 +4,6 @@ set -e\nTAG=$( ./modelix-version.sh )\n-# patch branding.jar to not show EULA and data sharing agreement at startup\n-rm -rf build/branding\n-rm -f build/branding.zip\n-unzip -d build/branding artifacts/mps/lib/branding.jar\n-(\n- cd build/branding\n- sed -i.bak -E \"s/JetBrains s.r.o./Modelix/\" idea/IdeaApplicationInfo.xml\n- rm idea/IdeaApplicationInfo.xml.bak\n- zip -r ../branding.zip ./*\n-)\n-\ndocker build --no-cache -f Dockerfile-projector -t modelix/modelix-projector .\ndocker tag modelix/modelix-projector:latest \"modelix/modelix-projector:${TAG}\"\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Dockerfile for project split into two
To avoid running "apt install unzip" each time there is a change in modelix. |
426,496 | 30.11.2021 21:31:37 | -3,600 | bcf5a235ce519b8cff163b9622860bb02f351f34 | Dockerfile for projector split into two (2) | [
{
"change_type": "MODIFY",
"old_path": "doc/running-modelix.md",
"new_path": "doc/running-modelix.md",
"diff": "@@ -36,6 +36,7 @@ This can be your usual local IDE or an instance running in kubernetes with [Proj\n- `./kubernetes-open-projector.sh`\n- Option 3: Projector and Kubernetes using you own image. Use this option while developing the MPS plugins.\n- `./gradlew`\n+ - `./docker-build-projector-base.sh`\n- `./docker-build-projector.sh`\n- `./kubernetes-apply-projector.sh`\n- `./kubernetes-open-projector.sh`\n"
},
{
"change_type": "MODIFY",
"old_path": "docker-ci.sh",
"new_path": "docker-ci.sh",
"diff": "@@ -19,6 +19,7 @@ docker login -u \"$DOCKER_HUB_USER\" -p \"$DOCKER_HUB_KEY\"\n./docker-build-mps.sh\n./docker-build-base.sh\n./docker-build-ui.sh\n+./docker-build-projector-base.sh\n./docker-build-projector.sh\n./docker-build-proxy.sh\n./docker-build-uiproxy.sh\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Dockerfile for projector split into two (2) |
426,496 | 01.12.2021 17:45:27 | -3,600 | 98aab1af2e05d00975178b66c2608c2cb9e3f490 | New proxy that starts a separate MPS instance for each user | [
{
"change_type": "MODIFY",
"old_path": ".idea/gradle.xml",
"new_path": ".idea/gradle.xml",
"diff": "<set>\n<option value=\"$PROJECT_DIR$\" />\n<option value=\"$PROJECT_DIR$/gradle-plugin\" />\n+ <option value=\"$PROJECT_DIR$/instances-manager\" />\n<option value=\"$PROJECT_DIR$/manual-tests\" />\n<option value=\"$PROJECT_DIR$/model-client\" />\n<option value=\"$PROJECT_DIR$/model-server\" />\n"
},
{
"change_type": "MODIFY",
"old_path": "docker-build-all.sh",
"new_path": "docker-build-all.sh",
"diff": "./docker-build-projector.sh\n./docker-build-proxy.sh\n./docker-build-uiproxy.sh\n+./docker-build-instances-manager.sh\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "docker-build-instances-manager.sh",
"diff": "+#!/bin/sh\n+\n+set -e\n+\n+TAG=$( ./modelix-version.sh )\n+\n+(\n+ cd instances-manager\n+ docker build --no-cache -t modelix/modelix-instances-manager .\n+)\n+\n+docker tag modelix/modelix-instances-manager:latest \"modelix/modelix-instances-manager:${TAG}\"\n+sed -i.bak -E \"s/(image:.*:).*/\\1${TAG}/\" kubernetes/common/instances-manager-deployment.yaml\n+rm kubernetes/common/instances-manager-deployment.yaml.bak\n"
},
{
"change_type": "MODIFY",
"old_path": "docker-ci.sh",
"new_path": "docker-ci.sh",
"diff": "@@ -23,13 +23,14 @@ docker login -u \"$DOCKER_HUB_USER\" -p \"$DOCKER_HUB_KEY\"\n./docker-build-projector.sh\n./docker-build-proxy.sh\n./docker-build-uiproxy.sh\n+./docker-build-instances-manager.sh\nMODELIX_VERSION=$( ./modelix-version.sh )\nTAGS=\"$MODELIX_VERSION mps-$mpsVersion\"\nif [ \"$mpsVersion\" != \"$mpsMajorVersion\" ]; then\nTAGS=\"$TAGS mps-$mpsMajorVersion\"\nfi\n-IMAGE_NAMES=\"db model mps base ui projector proxy uiproxy\"\n+IMAGE_NAMES=\"db model mps base ui projector proxy uiproxy instances-manager\"\nfor TAG in $TAGS ; do\necho \"Pushing Tag $TAG\"\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "instances-manager/Dockerfile",
"diff": "+FROM openjdk:11\n+WORKDIR /usr/ui-proxy\n+EXPOSE 33332\n+COPY build/libs/* /instances-manager/\n+COPY build/dependencies/* /instances-manager/\n+CMD [\"java\",\"-XX:MaxRAMPercentage=85\", \"-cp\", \"/instances-manager/*\", \"org.modelix.instancesmanager.Main\"]\n\\ No newline at end of file\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "instances-manager/build.gradle",
"diff": "+plugins {\n+ id 'java'\n+}\n+\n+group 'org.modelix'\n+version modelixVersion\n+\n+description = \"Starts a separate MPS instance for each user\"\n+\n+compileJava {\n+ sourceCompatibility = '11'\n+ targetCompatibility = '11'\n+}\n+\n+defaultTasks 'build'\n+\n+repositories {\n+ mavenCentral()\n+}\n+\n+dependencies {\n+ testCompile group: 'junit', name: 'junit', version: '4.12'\n+ compile 'io.kubernetes:client-java:8.0.2'\n+ compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.30'\n+ compile group: 'log4j', name: 'log4j', version: '1.2.17'\n+ compile group: 'commons-codec', name: 'commons-codec', version: '1.14'\n+ compile group: 'commons-io', name: 'commons-io', version: '2.6'\n+ compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.10'\n+\n+ ext.jettyVersion = '9.4.30.v20200611'\n+ compile group: 'org.eclipse.jetty', name: 'jetty-server', version: jettyVersion\n+ compile group: 'org.eclipse.jetty', name: 'jetty-proxy', version: jettyVersion\n+ compile group: 'org.eclipse.jetty', name: 'jetty-servlet', version: jettyVersion\n+ compile group: 'org.eclipse.jetty.websocket', name: 'websocket-servlet', version: jettyVersion\n+ compile group: 'org.eclipse.jetty.websocket', name: 'websocket-client', version: jettyVersion\n+ compile group: 'org.eclipse.jetty.websocket', name: 'websocket-server', version: jettyVersion\n+\n+ compile group: 'org.eclipse.jgit', name: 'org.eclipse.jgit', version: '5.8.0.202006091008-r'\n+ compile group: 'org.kohsuke', name: 'github-api', version: '1.115'\n+}\n+\n+task copyRuntimeLibs(type: Copy) {\n+ into \"$buildDir/dependencies\"\n+ from configurations.runtime\n+}\n+\n+assemble.dependsOn copyRuntimeLibs\n\\ No newline at end of file\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/DeploymentManagingHandler.java",
"diff": "+/*\n+ * Copyright 2003-2021 JetBrains s.r.o.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.modelix.instancesmanager;\n+\n+import io.kubernetes.client.openapi.ApiException;\n+import io.kubernetes.client.openapi.Configuration;\n+import io.kubernetes.client.openapi.apis.AppsV1Api;\n+import io.kubernetes.client.openapi.apis.CoreV1Api;\n+import io.kubernetes.client.openapi.models.V1Deployment;\n+import io.kubernetes.client.openapi.models.V1DeploymentList;\n+import io.kubernetes.client.openapi.models.V1Pod;\n+import io.kubernetes.client.openapi.models.V1PodList;\n+import io.kubernetes.client.openapi.models.V1Service;\n+import io.kubernetes.client.openapi.models.V1ServiceList;\n+import io.kubernetes.client.util.ClientBuilder;\n+import io.kubernetes.client.util.Yaml;\n+import org.apache.commons.collections4.map.HashedMap;\n+import org.apache.commons.lang.StringEscapeUtils;\n+import org.apache.log4j.Logger;\n+import org.eclipse.jetty.server.Request;\n+import org.eclipse.jetty.server.handler.AbstractHandler;\n+\n+import javax.servlet.http.HttpServletRequest;\n+import javax.servlet.http.HttpServletResponse;\n+import java.io.IOException;\n+import java.util.Collections;\n+import java.util.Map;\n+\n+public class DeploymentManagingHandler extends AbstractHandler {\n+ private static final Logger LOG = Logger.getLogger(DeploymentManagingHandler.class);\n+ public static final String KUBERNETES_NAMESPACE = \"default\";\n+\n+ private Map<String, Long> deploymentTimeouts = Collections.synchronizedMap(new HashedMap<>());\n+ private Thread cleanupThread = new Thread() {\n+ @Override\n+ public void run() {\n+ while (true) {\n+ try {\n+ cleanupDeployments();\n+ } catch (Exception ex) {\n+ LOG.error(\"\", ex);\n+ }\n+ try {\n+ Thread.sleep(10_000);\n+ } catch (InterruptedException e) {\n+ return;\n+ }\n+ }\n+ }\n+ };\n+\n+ public DeploymentManagingHandler() {\n+ try {\n+ Configuration.setDefaultApiClient(ClientBuilder.cluster().build());\n+ } catch (IOException e) {\n+ throw new RuntimeException(e);\n+ }\n+ cleanupThread.start();\n+ }\n+\n+ @Override\n+ public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) {\n+ try {\n+ RedirectedURL redirectedURL = RedirectedURL.redirect(baseRequest, request);\n+ deploymentTimeouts.put(redirectedURL.personalDeploymentName, System.currentTimeMillis() + 30*60*1000);\n+ boolean deploymentCreated = createDeployment(redirectedURL.originalDeploymentName, redirectedURL.personalDeploymentName);\n+ if (!deploymentCreated) throw new RuntimeException(\"Deployment doesn't exist: \" + redirectedURL.originalDeploymentName);\n+\n+ V1Deployment deployment = getDeployment(redirectedURL.personalDeploymentName);\n+ if (deployment == null) throw new RuntimeException(\"Failed to create deployment\");\n+\n+ Integer readyReplicas = deployment.getStatus() != null ? deployment.getStatus().getReadyReplicas() : null;\n+ if (readyReplicas == null || readyReplicas == 0) {\n+ baseRequest.setHandled(true);\n+ response.setContentType(\"text/html\");\n+ response.setStatus(HttpServletResponse.SC_OK);\n+ String podLogs = getPodLogs(redirectedURL.personalDeploymentName);\n+\n+ response.getWriter()\n+ .append(\"<html>\")\n+ .append(\"<head>\")\n+ .append(\"<meta http-equiv=\\\"refresh\\\" content=\\\"5\\\">\")\n+ .append(\"</head>\")\n+ .append(\"<body>\")\n+ .append(\"<div>Starting MPS ...</div>\");\n+\n+ if (podLogs != null) {\n+ response.getWriter().append(\"<br/><hr/><br/><pre>\");\n+ StringEscapeUtils.escapeHtml(response.getWriter(), podLogs);\n+ response.getWriter().append(\"</pre>\");\n+ }\n+\n+ response.getWriter()\n+ .append(\"</body>\")\n+ .append(\"</html>\");\n+ }\n+\n+ cleanupDeployments();\n+ } catch (Exception ex) {\n+ throw new RuntimeException(ex);\n+ }\n+ }\n+\n+ private final Object cleanupLock = new Object();\n+ private void cleanupDeployments() {\n+ // TODO doesn't work with multiple instances of this proxy\n+ synchronized (cleanupLock) {\n+ try {\n+ AppsV1Api appsApi = new AppsV1Api();\n+ CoreV1Api coreApi = new CoreV1Api();\n+ V1DeploymentList deployments = null;\n+ deployments = appsApi.listNamespacedDeployment(KUBERNETES_NAMESPACE, null, null, null, null, null, null, null, null, null);\n+ for (V1Deployment deployment : deployments.getItems()) {\n+ String name = deployment.getMetadata().getName();\n+ if (!name.startsWith(RedirectedURL.PERSONAL_DEPLOYMENT_PREFIX)) continue;\n+ Long timeout = deploymentTimeouts.get(name);\n+ if (timeout != null && timeout > System.currentTimeMillis()) continue;\n+ deploymentTimeouts.remove(name);\n+ appsApi.deleteNamespacedDeployment(name, KUBERNETES_NAMESPACE, null, null, null, null, null, null);\n+ coreApi.deleteNamespacedService(name, KUBERNETES_NAMESPACE, null, null, null, null, null, null);\n+ }\n+ } catch (ApiException e) {\n+ LOG.error(\"Deployment cleanup failed\", e);\n+ }\n+ }\n+ }\n+\n+ private V1Deployment getDeployment(String name) throws ApiException {\n+ AppsV1Api appsApi = new AppsV1Api();\n+ V1DeploymentList deployments = appsApi.listNamespacedDeployment(KUBERNETES_NAMESPACE, null, null, null, null, null, null, null, null, null);\n+ for (V1Deployment deployment : deployments.getItems()) {\n+ if (name.equals(deployment.getMetadata().getName())) return deployment;\n+ }\n+ return null;\n+ }\n+\n+ private String getPodLogs(String deploymentName) {\n+ try {\n+ CoreV1Api coreApi = new CoreV1Api();\n+ V1PodList pods = coreApi.listNamespacedPod(KUBERNETES_NAMESPACE, null, null, null, null, null, null, null, null, null);\n+ for (V1Pod pod : pods.getItems()) {\n+ if (!pod.getMetadata().getName().startsWith(deploymentName)) continue;\n+ return coreApi.readNamespacedPodLog(\n+ pod.getMetadata().getName(),\n+ KUBERNETES_NAMESPACE,\n+ pod.getSpec().getContainers().get(0).getName(),\n+ null, null, \"true\", null, null, 10_000, null);\n+ }\n+ } catch (Exception e) {\n+ LOG.error(\"\", e);\n+ return null;\n+ }\n+\n+ return null;\n+ }\n+\n+ private boolean createDeployment(String originalDeploymentName, String personalDeploymentName) throws IOException, ApiException {\n+ AppsV1Api appsApi = new AppsV1Api();\n+\n+ V1DeploymentList deployments = appsApi.listNamespacedDeployment(KUBERNETES_NAMESPACE, null, null, null, null, null, null, null, 5, false);\n+ boolean deploymentExists = deployments.getItems().stream().anyMatch(d -> personalDeploymentName.equals(d.getMetadata().getName()));\n+ if (!deploymentExists) {\n+// long numExisting = deployments.getItems().stream().filter(d -> d.getMetadata().getName().startsWith(personalDeploymentPrefix)).count();\n+// if (numExisting > 10) throw new RuntimeException(\"Too many existing deployments\");\n+\n+ V1Deployment deployment = appsApi.readNamespacedDeployment(originalDeploymentName, KUBERNETES_NAMESPACE, null, null, null);\n+ deployment.getMetadata().creationTimestamp(null);\n+ deployment.getMetadata().setManagedFields(null);\n+ deployment.getMetadata().setUid(null);\n+ deployment.getMetadata().resourceVersion(null);\n+ deployment.setStatus(null);\n+ deployment.getMetadata().putAnnotationsItem(\"kubectl.kubernetes.io/last-applied-configuration\", null);\n+\n+ deployment.getMetadata().name(personalDeploymentName);\n+ deployment.getMetadata().putLabelsItem(\"app\", personalDeploymentName);\n+ deployment.getSpec().getSelector().putMatchLabelsItem(\"app\", personalDeploymentName);\n+ deployment.getSpec().getTemplate().getMetadata().putLabelsItem(\"app\", personalDeploymentName);\n+\n+ System.out.println(\"Creating deployment: \");\n+ System.out.println(Yaml.dump(deployment));\n+ appsApi.createNamespacedDeployment(KUBERNETES_NAMESPACE, deployment, null, null, null);\n+ }\n+\n+ CoreV1Api coreApi = new CoreV1Api();\n+ V1ServiceList services = coreApi.listNamespacedService(KUBERNETES_NAMESPACE, null, null, null, null, null, null, null, 5, false);\n+ boolean serviceExists = services.getItems().stream().anyMatch(s -> personalDeploymentName.equals(s.getMetadata().getName()));\n+ if (!serviceExists) {\n+ V1Service service = coreApi.readNamespacedService(originalDeploymentName, KUBERNETES_NAMESPACE, null, null, null);\n+ service.getMetadata().putAnnotationsItem(\"kubectl.kubernetes.io/last-applied-configuration\", null);\n+ service.getMetadata().setManagedFields(null);\n+ service.getMetadata().setUid(null);\n+ service.getMetadata().resourceVersion(null);\n+ service.getSpec().setClusterIP(null);\n+ service.getSpec().getPorts().forEach(p -> p.nodePort(null));\n+ service.setStatus(null);\n+\n+ service.getMetadata().name(personalDeploymentName);\n+ service.getMetadata().putLabelsItem(\"app\", personalDeploymentName);\n+ service.getMetadata().name(personalDeploymentName);\n+ service.getSpec().putSelectorItem(\"app\", personalDeploymentName);\n+\n+\n+ System.out.println(\"Creating service: \");\n+ System.out.println(Yaml.dump(service));\n+\n+ coreApi.createNamespacedService(KUBERNETES_NAMESPACE, service, null, null, null);\n+ }\n+\n+ return true;\n+ }\n+}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/Main.java",
"diff": "+/*\n+ * Copyright 2003-2021 JetBrains s.r.o.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.modelix.instancesmanager;\n+\n+import io.kubernetes.client.openapi.ApiException;\n+import org.apache.log4j.Logger;\n+import org.eclipse.jetty.proxy.ProxyServlet;\n+import org.eclipse.jetty.server.Request;\n+import org.eclipse.jetty.server.Server;\n+import org.eclipse.jetty.server.handler.DefaultHandler;\n+import org.eclipse.jetty.server.handler.HandlerList;\n+import org.eclipse.jetty.server.handler.HandlerWrapper;\n+import org.eclipse.jetty.servlet.ServletContextHandler;\n+import org.eclipse.jetty.servlet.ServletHolder;\n+import org.eclipse.jetty.websocket.servlet.ServletUpgradeRequest;\n+import org.eclipse.jetty.websocket.servlet.WebSocketServlet;\n+\n+import javax.servlet.ServletException;\n+import javax.servlet.http.HttpServletRequest;\n+import javax.servlet.http.HttpServletResponse;\n+import java.io.IOException;\n+import java.net.URI;\n+import java.net.URISyntaxException;\n+\n+public class Main {\n+ private static final Logger LOG = Logger.getLogger(Main.class);\n+\n+ public static void main(String[] args) {\n+ try {\n+ startServer();\n+ } catch (ApiException ex) {\n+ LOG.error(\"\", ex);\n+ LOG.error(\"code: \" + ex.getCode());\n+ LOG.error(\"body: \" + ex.getResponseBody());\n+ } catch (Exception ex) {\n+ LOG.error(\"\", ex);\n+ }\n+ }\n+\n+ private static void startServer() throws Exception {\n+ Server server = new Server(33332);\n+ HandlerList handlerList = new HandlerList();\n+ server.setHandler(handlerList);\n+\n+ DeploymentManagingHandler deploymentManagingHandler = new DeploymentManagingHandler();\n+ handlerList.addHandler(deploymentManagingHandler);\n+\n+ WebSocketServlet webSocketServlet = new WebSocketProxyServlet() {\n+ @Override\n+ protected URI redirect(ServletUpgradeRequest request) {\n+ RedirectedURL redirectedURL = RedirectedURL.redirect(null, request.getHttpServletRequest());\n+ if (redirectedURL == null) return null;\n+ try {\n+ return new URI(redirectedURL.getRedirectedUrl(true));\n+ } catch (URISyntaxException e) {\n+ throw new RuntimeException(e);\n+ }\n+ }\n+ };\n+ HandlerWrapper webSocketHandlerCondition = new HandlerWrapper() {\n+ @Override\n+ public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {\n+ if (RedirectedURL.redirect(baseRequest, request) == null) return;\n+ if (!baseRequest.getRequestURI().contains(\"/ws/\")) return;\n+ super.handle(target, baseRequest, request, response);\n+ }\n+ };\n+ ServletContextHandler webSocketHandler = new ServletContextHandler();\n+ webSocketHandler.addServlet(new ServletHolder(webSocketServlet), \"/*\");\n+ webSocketHandlerCondition.setHandler(webSocketHandler);\n+ handlerList.addHandler(webSocketHandlerCondition);\n+\n+\n+ ProxyServlet proxyServlet = new ProxyServlet() {\n+ @Override\n+ protected String rewriteTarget(HttpServletRequest clientRequest) {\n+ RedirectedURL redirectedURL = RedirectedURL.redirect(null, clientRequest);\n+ if (redirectedURL == null) return null;\n+ return redirectedURL.getRedirectedUrl(false);\n+ }\n+ };\n+ proxyServlet.setTimeout(60_000);\n+\n+ ServletContextHandler proxyHandler = new ServletContextHandler();\n+ proxyHandler.addServlet(new ServletHolder(proxyServlet), \"/*\");\n+ handlerList.addHandler(proxyHandler);\n+\n+ handlerList.addHandler(new DefaultHandler());\n+ server.start();\n+\n+ Runtime.getRuntime().addShutdownHook(new Thread() {\n+ @Override\n+ public void run() {\n+ try {\n+ server.stop();\n+ } catch (Exception ex) {\n+ System.out.println(ex.getMessage());\n+ ex.printStackTrace();\n+ }\n+ }\n+ });\n+ }\n+}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/RedirectedURL.java",
"diff": "+/*\n+ * Copyright 2003-2021 JetBrains s.r.o.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.modelix.instancesmanager;\n+\n+import org.eclipse.jetty.http.HttpCookie;\n+import org.eclipse.jetty.server.Request;\n+\n+import javax.annotation.Nullable;\n+import javax.servlet.http.Cookie;\n+import javax.servlet.http.HttpServletRequest;\n+import java.util.UUID;\n+\n+public class RedirectedURL {\n+ public static final String PERSONAL_DEPLOYMENT_PREFIX = \"user-copy-\";\n+ public static final String COOKIE_NAME = \"modelix-mps-instance\";\n+\n+ public static RedirectedURL redirect(@Nullable Request baseRequest, HttpServletRequest request) {\n+ String path = request.getRequestURI();\n+ if (path.charAt(0) != '/') return null;\n+ int indexOfSlash = path.indexOf('/', 1);\n+ if (indexOfSlash < 0) return null;\n+\n+ String originalDeploymentName = path.substring(1, indexOfSlash);\n+ String remainingPath = path.substring(indexOfSlash);\n+\n+ // TODO use the ID of an authenticated user instead (or in addition)\n+ String personalDeploymentSuffix = null;\n+ for (Cookie cookie : request.getCookies()) {\n+ if (COOKIE_NAME.equals(cookie.getName())) {\n+ personalDeploymentSuffix = cookie.getValue();\n+ }\n+ }\n+ if (personalDeploymentSuffix == null) {\n+ personalDeploymentSuffix = UUID.randomUUID().toString();\n+ }\n+ if (baseRequest != null) {\n+ baseRequest.getResponse().addCookie(new HttpCookie(COOKIE_NAME, personalDeploymentSuffix, null, \"/\", 30 * 24 * 60 * 60, true, false));\n+ }\n+\n+ String personalDeploymentName = PERSONAL_DEPLOYMENT_PREFIX + originalDeploymentName + \"-\" + personalDeploymentSuffix;\n+\n+ return new RedirectedURL(remainingPath, originalDeploymentName, personalDeploymentName);\n+ }\n+\n+ public final String remainingPath;\n+ public final String originalDeploymentName;\n+ public final String personalDeploymentName;\n+\n+ public RedirectedURL(String remainingPath, String originalDeploymentName, String personalDeploymentName) {\n+ this.remainingPath = remainingPath;\n+ this.originalDeploymentName = originalDeploymentName;\n+ this.personalDeploymentName = personalDeploymentName;\n+ System.out.println(\"Redirect: \" + remainingPath + \" / \" + originalDeploymentName + \" / \" + personalDeploymentName);\n+ }\n+\n+ public String getRedirectedUrl(boolean websocket) {\n+ String url = (websocket ? \"ws\" : \"http\") + \"://\" + personalDeploymentName;\n+ if (remainingPath.startsWith(\"/ide/\")) {\n+ url += \":8887\" + remainingPath;\n+ } else {\n+ url += \":33333\" + remainingPath;\n+ }\n+ return url;\n+ }\n+}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/WebSocketProxyServlet.java",
"diff": "+/*\n+ * Copyright 2003-2021 JetBrains s.r.o.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.modelix.instancesmanager;\n+\n+import org.apache.log4j.Logger;\n+import org.eclipse.jetty.websocket.api.Session;\n+import org.eclipse.jetty.websocket.api.WebSocketListener;\n+import org.eclipse.jetty.websocket.client.ClientUpgradeRequest;\n+import org.eclipse.jetty.websocket.client.WebSocketClient;\n+import org.eclipse.jetty.websocket.servlet.*;\n+\n+import java.io.IOException;\n+import java.net.URI;\n+import java.nio.ByteBuffer;\n+\n+public abstract class WebSocketProxyServlet extends WebSocketServlet {\n+ private static final Logger LOG = Logger.getLogger(WebSocketProxyServlet.class);\n+\n+ protected abstract URI redirect(ServletUpgradeRequest request);\n+\n+ @Override\n+ public void configure(WebSocketServletFactory factory) {\n+ factory.getPolicy().setMaxTextMessageSize(20 * 1024 * 1024);\n+ factory.setCreator(new WebSocketCreator() {\n+ @Override\n+ public Object createWebSocket(ServletUpgradeRequest req, ServletUpgradeResponse resp) {\n+ URI redirectURL = redirect(req);\n+ if (redirectURL == null) return null;\n+ return new WebSocketListener() {\n+ private WebSocketClient client = new WebSocketClient();\n+ private Session sessionA;\n+ private Session sessionB;\n+\n+ @Override\n+ public void onWebSocketConnect(final Session session) {\n+ sessionA = session;\n+ try {\n+ client.start();\n+ client.getPolicy().setMaxTextMessageSize(20 * 1024 * 1024);\n+ URI redirectURL = redirect(req);\n+ client.connect(new WebSocketListener() {\n+ @Override\n+ public void onWebSocketBinary(byte[] payload, int offset, int len) {\n+\n+ }\n+\n+ @Override\n+ public void onWebSocketText(String message) {\n+ try {\n+ sessionA.getRemote().sendString(message);\n+ } catch (IOException e) {\n+ throw new RuntimeException(e);\n+ }\n+ }\n+\n+ @Override\n+ public void onWebSocketClose(int statusCode, String reason) {\n+ sessionA.close(statusCode, reason);\n+ }\n+\n+ @Override\n+ public void onWebSocketConnect(Session session) {\n+ sessionB = session;\n+ }\n+\n+ @Override\n+ public void onWebSocketError(Throwable cause) {\n+ LOG.error(\"\", cause);\n+ }\n+ }, redirectURL, new ClientUpgradeRequest()).get();\n+ } catch (Exception e) {\n+ throw new RuntimeException(e);\n+ }\n+ }\n+\n+ @Override\n+ public void onWebSocketText(String message) {\n+ try {\n+ sessionB.getRemote().sendString(message);\n+ } catch (IOException e) {\n+ throw new RuntimeException(e);\n+ }\n+ }\n+\n+ @Override\n+ public void onWebSocketBinary(byte[] payload, int offset, int len) {\n+ try {\n+ sessionB.getRemote().sendBytes(ByteBuffer.wrap(payload, offset, len));\n+ } catch (IOException e) {\n+ throw new RuntimeException(e);\n+ }\n+ }\n+\n+ @Override\n+ public void onWebSocketClose(int statusCode, String reason) {\n+ sessionB.close(statusCode, reason);\n+ try {\n+ client.stop();\n+ } catch (Exception e) {\n+ LOG.error(\"\", e);\n+ }\n+ }\n+\n+ @Override\n+ public void onWebSocketError(Throwable cause) {\n+ LOG.error(\"\", cause);\n+ }\n+ };\n+ }\n+ });\n+ }\n+}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "instances-manager/src/main/resources/log4j.xml",
"diff": "+<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n+<!DOCTYPE log4j:configuration SYSTEM \"log4j.dtd\">\n+<log4j:configuration debug=\"true\"\n+ xmlns:log4j='http://jakarta.apache.org/log4j/'>\n+\n+ <appender name=\"console\" class=\"org.apache.log4j.ConsoleAppender\">\n+ <param name=\"follow\" value=\"true\"/>\n+ <layout class=\"org.apache.log4j.PatternLayout\">\n+ <param name=\"ConversionPattern\" value=\"[%7r] %6p - %30.30c - %m \\n\" />\n+ </layout>\n+ </appender>\n+\n+ <category name=\"org.modelix\" additivity=\"true\">\n+ <priority value=\"DEBUG\"/>\n+ <appender-ref ref=\"console\"/>\n+ </category>\n+\n+ <root>\n+ <level value=\"INFO\" />\n+ <appender-ref ref=\"console\" />\n+ </root>\n+\n+</log4j:configuration>\n\\ No newline at end of file\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "kubernetes/common/instances-manager-deployment.yaml",
"diff": "+apiVersion: apps/v1\n+kind: Deployment\n+metadata:\n+ labels:\n+ app: instances-manager\n+ name: instances-manager\n+spec:\n+ revisionHistoryLimit: 5\n+ replicas: 1\n+ strategy:\n+ type: RollingUpdate\n+ rollingUpdate:\n+ maxUnavailable: 1\n+ maxSurge: 0\n+ selector:\n+ matchLabels:\n+ app: instances-manager\n+ template:\n+ metadata:\n+ creationTimestamp: null\n+ labels:\n+ app: instances-manager\n+ spec:\n+ serviceAccountName: uiproxy\n+ containers:\n+ - image: modelix/modelix-instances-manager:0.0.67\n+ imagePullPolicy: IfNotPresent\n+ name: instances-manager\n+ ports:\n+ - containerPort: 33332\n+ resources:\n+ requests:\n+ memory: \"100Mi\"\n+ cpu: \"0.1\"\n+ limits:\n+ memory: \"200Mi\"\n+ cpu: \"1.0\"\n+ restartPolicy: Always\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "kubernetes/common/instances-manager-service.yaml",
"diff": "+apiVersion: v1\n+kind: Service\n+metadata:\n+ labels:\n+ app: instances-manager\n+ name: instances-manager\n+spec:\n+ type: NodePort\n+ ports:\n+ - name: \"33332\"\n+ port: 33332\n+ targetPort: 33332\n+ selector:\n+ app: instances-manager\n"
},
{
"change_type": "MODIFY",
"old_path": "proxy/nginx.conf",
"new_path": "proxy/nginx.conf",
"diff": "@@ -32,22 +32,22 @@ http {\nproxy_cache off;\n}\n- location ~ ^/([\\w-]+)/ide/(.*)$ {\n- proxy_http_version 1.1;\n- proxy_set_header Upgrade $http_upgrade;\n- proxy_set_header Connection \"upgrade\";\n- proxy_pass http://$1.default.svc.cluster.local:8887/$2$is_args$args;\n- }\n-\n- location ~ ^/([\\w-]+)/ws/(.*)$ {\n- proxy_http_version 1.1;\n- proxy_set_header Upgrade $http_upgrade;\n- proxy_set_header Connection \"upgrade\";\n- proxy_pass http://$1.default.svc.cluster.local:33333/ws/$2$is_args$args;\n- }\n-\n- location ~ ^/([\\w-]+)/(.*)$ {\n- proxy_pass http://$1.default.svc.cluster.local:33333/$2$is_args$args;\n+# location ~ ^/([\\w-]+)/ide/(.*)$ {\n+# proxy_http_version 1.1;\n+# proxy_set_header Upgrade $http_upgrade;\n+# proxy_set_header Connection \"upgrade\";\n+# proxy_pass http://$1.default.svc.cluster.local:8887/$2$is_args$args;\n+# }\n+#\n+# location ~ ^/([\\w-]+)/ws/(.*)$ {\n+# proxy_http_version 1.1;\n+# proxy_set_header Upgrade $http_upgrade;\n+# proxy_set_header Connection \"upgrade\";\n+# proxy_pass http://$1.default.svc.cluster.local:33333/ws/$2$is_args$args;\n+# }\n+\n+ location ~ ^/([\\w-]+/.*)$ {\n+ proxy_pass http://instances-manager.default.svc.cluster.local:33332/$1$is_args$args;\n}\nlocation / {\n"
},
{
"change_type": "MODIFY",
"old_path": "settings.gradle",
"new_path": "settings.gradle",
"diff": "@@ -6,5 +6,6 @@ include 'model-client'\ninclude 'mps'\ninclude 'ui-server'\ninclude 'ui-proxy'\n+include 'instances-manager'\ninclude 'gradle-plugin'\ninclude 'manual-tests'\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | New proxy that starts a separate MPS instance for each user |
426,496 | 02.12.2021 09:11:19 | -3,600 | 99faf2d01b6fcbd9456dc1a1b35a9e2adaf5746e | New proxy that starts a separate MPS instance for each user (2) | [
{
"change_type": "MODIFY",
"old_path": "instances-manager/src/main/java/org/modelix/instancesmanager/RedirectedURL.java",
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/RedirectedURL.java",
"diff": "@@ -63,13 +63,13 @@ public class RedirectedURL {\nthis.remainingPath = remainingPath;\nthis.originalDeploymentName = originalDeploymentName;\nthis.personalDeploymentName = personalDeploymentName;\n- System.out.println(\"Redirect: \" + remainingPath + \" / \" + originalDeploymentName + \" / \" + personalDeploymentName);\n+ System.out.println(\"Redirect: \" + remainingPath + \" # \" + originalDeploymentName + \" # \" + personalDeploymentName + \" # \" + getRedirectedUrl(false));\n}\npublic String getRedirectedUrl(boolean websocket) {\nString url = (websocket ? \"ws\" : \"http\") + \"://\" + personalDeploymentName;\nif (remainingPath.startsWith(\"/ide/\")) {\n- url += \":8887\" + remainingPath;\n+ url += \":8887\" + remainingPath.substring(\"/ide\".length());\n} else {\nurl += \":33333\" + remainingPath;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "proxy/nginx.conf",
"new_path": "proxy/nginx.conf",
"diff": "@@ -47,6 +47,9 @@ http {\n# }\nlocation ~ ^/([\\w-]+/.*)$ {\n+ proxy_http_version 1.1;\n+ proxy_set_header Upgrade $http_upgrade;\n+ proxy_set_header Connection \"upgrade\";\nproxy_pass http://instances-manager.default.svc.cluster.local:33332/$1$is_args$args;\n}\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | New proxy that starts a separate MPS instance for each user (2) |
426,496 | 02.12.2021 13:47:23 | -3,600 | a227114579c0861fd4f99ee222b62fa5e96aa325 | New proxy that starts a separate MPS instance for each user (3) | [
{
"change_type": "MODIFY",
"old_path": "instances-manager/src/main/java/org/modelix/instancesmanager/DeploymentManagingHandler.java",
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/DeploymentManagingHandler.java",
"diff": "@@ -75,6 +75,8 @@ public class DeploymentManagingHandler extends AbstractHandler {\npublic void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) {\ntry {\nRedirectedURL redirectedURL = RedirectedURL.redirect(baseRequest, request);\n+ if (redirectedURL == null) return;\n+ if (redirectedURL.personalDeploymentName == null) return;\ndeploymentTimeouts.put(redirectedURL.personalDeploymentName, System.currentTimeMillis() + 30*60*1000);\nboolean deploymentCreated = createDeployment(redirectedURL.originalDeploymentName, redirectedURL.personalDeploymentName);\nif (!deploymentCreated) throw new RuntimeException(\"Deployment doesn't exist: \" + redirectedURL.originalDeploymentName);\n"
},
{
"change_type": "MODIFY",
"old_path": "instances-manager/src/main/java/org/modelix/instancesmanager/Main.java",
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/Main.java",
"diff": "@@ -58,7 +58,7 @@ public class Main {\nDeploymentManagingHandler deploymentManagingHandler = new DeploymentManagingHandler();\nhandlerList.addHandler(deploymentManagingHandler);\n- WebSocketServlet webSocketServlet = new WebSocketProxyServlet() {\n+ ProxyServletWithWebsocketSupport webSocketServlet = new ProxyServletWithWebsocketSupport() {\n@Override\nprotected URI redirect(ServletUpgradeRequest request) {\nRedirectedURL redirectedURL = RedirectedURL.redirect(null, request.getHttpServletRequest());\n@@ -69,12 +69,19 @@ public class Main {\nthrow new RuntimeException(e);\n}\n}\n+\n+ @Override\n+ protected String rewriteTarget(HttpServletRequest clientRequest) {\n+ RedirectedURL redirectedURL = RedirectedURL.redirect(null, clientRequest);\n+ if (redirectedURL == null) return null;\n+ return redirectedURL.getRedirectedUrl(false);\n+ }\n};\nHandlerWrapper webSocketHandlerCondition = new HandlerWrapper() {\n@Override\npublic void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {\nif (RedirectedURL.redirect(baseRequest, request) == null) return;\n- if (!baseRequest.getRequestURI().contains(\"/ws/\")) return;\n+// if (!baseRequest.getRequestURI().contains(\"/ws/\")) return;\nsuper.handle(target, baseRequest, request, response);\n}\n};\n@@ -84,19 +91,19 @@ public class Main {\nhandlerList.addHandler(webSocketHandlerCondition);\n- ProxyServlet proxyServlet = new ProxyServlet() {\n- @Override\n- protected String rewriteTarget(HttpServletRequest clientRequest) {\n- RedirectedURL redirectedURL = RedirectedURL.redirect(null, clientRequest);\n- if (redirectedURL == null) return null;\n- return redirectedURL.getRedirectedUrl(false);\n- }\n- };\n- proxyServlet.setTimeout(60_000);\n-\n- ServletContextHandler proxyHandler = new ServletContextHandler();\n- proxyHandler.addServlet(new ServletHolder(proxyServlet), \"/*\");\n- handlerList.addHandler(proxyHandler);\n+// ProxyServlet proxyServlet = new ProxyServlet() {\n+// @Override\n+// protected String rewriteTarget(HttpServletRequest clientRequest) {\n+// RedirectedURL redirectedURL = RedirectedURL.redirect(null, clientRequest);\n+// if (redirectedURL == null) return null;\n+// return redirectedURL.getRedirectedUrl(false);\n+// }\n+// };\n+// proxyServlet.setTimeout(60_000);\n+//\n+// ServletContextHandler proxyHandler = new ServletContextHandler();\n+// proxyHandler.addServlet(new ServletHolder(proxyServlet), \"/*\");\n+// handlerList.addHandler(proxyHandler);\nhandlerList.addHandler(new DefaultHandler());\nserver.start();\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/ProxyServletWithWebsocketSupport.java",
"diff": "+/*\n+ * Copyright 2003-2021 JetBrains s.r.o.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.modelix.instancesmanager;\n+\n+import org.apache.log4j.Logger;\n+import org.eclipse.jetty.proxy.ProxyServlet;\n+import org.eclipse.jetty.websocket.api.Session;\n+import org.eclipse.jetty.websocket.api.WebSocketBehavior;\n+import org.eclipse.jetty.websocket.api.WebSocketListener;\n+import org.eclipse.jetty.websocket.api.WebSocketPolicy;\n+import org.eclipse.jetty.websocket.client.ClientUpgradeRequest;\n+import org.eclipse.jetty.websocket.client.WebSocketClient;\n+import org.eclipse.jetty.websocket.servlet.ServletUpgradeRequest;\n+import org.eclipse.jetty.websocket.servlet.ServletUpgradeResponse;\n+import org.eclipse.jetty.websocket.servlet.WebSocketCreator;\n+import org.eclipse.jetty.websocket.servlet.WebSocketServletFactory;\n+\n+import javax.servlet.ServletContext;\n+import javax.servlet.ServletException;\n+import javax.servlet.http.HttpServletRequest;\n+import javax.servlet.http.HttpServletResponse;\n+import java.io.IOException;\n+import java.net.URI;\n+import java.nio.ByteBuffer;\n+\n+public abstract class ProxyServletWithWebsocketSupport extends ProxyServlet {\n+\n+\n+ // --------------------------- copied from org.eclipse.jetty.websocket.servlet.WebSocketServlet --------------------\n+\n+ private WebSocketServletFactory factory;\n+\n+ @Override\n+ public void destroy() {\n+ try {\n+ factory.stop();\n+ } catch (Exception ignore) {\n+ // ignore;\n+ }\n+ }\n+\n+ /**\n+ * @see javax.servlet.GenericServlet#init()\n+ */\n+ @Override\n+ public void init() throws ServletException {\n+ super.init();\n+ try {\n+ WebSocketPolicy policy = new WebSocketPolicy(WebSocketBehavior.SERVER);\n+\n+ String max = getInitParameter(\"maxIdleTime\");\n+ if (max != null) {\n+ policy.setIdleTimeout(Long.parseLong(max));\n+ }\n+\n+ max = getInitParameter(\"maxTextMessageSize\");\n+ if (max != null) {\n+ policy.setMaxTextMessageSize(Integer.parseInt(max));\n+ }\n+\n+ max = getInitParameter(\"maxBinaryMessageSize\");\n+ if (max != null) {\n+ policy.setMaxBinaryMessageSize(Integer.parseInt(max));\n+ }\n+\n+ max = getInitParameter(\"inputBufferSize\");\n+ if (max != null) {\n+ policy.setInputBufferSize(Integer.parseInt(max));\n+ }\n+\n+ ServletContext ctx = getServletContext();\n+ factory = WebSocketServletFactory.Loader.load(ctx, policy);\n+\n+ configure(factory);\n+\n+ factory.start();\n+\n+ ctx.setAttribute(WebSocketServletFactory.class.getName(), factory);\n+ } catch (Exception x) {\n+ throw new ServletException(x);\n+ }\n+ }\n+\n+ /**\n+ * @see javax.servlet.http.HttpServlet#service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)\n+ */\n+ @Override\n+ protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n+ if (factory.isUpgradeRequest(request, response)) {\n+ // We have an upgrade request\n+ if (factory.acceptWebSocket(request, response)) {\n+ // We have a socket instance created\n+ return;\n+ }\n+ // If we reach this point, it means we had an incoming request to upgrade\n+ // but it was either not a proper websocket upgrade, or it was possibly rejected\n+ // due to incoming request constraints (controlled by WebSocketCreator)\n+ if (response.isCommitted()) {\n+ // not much we can do at this point.\n+ return;\n+ }\n+ }\n+\n+ // All other processing\n+ super.service(request, response);\n+ }\n+\n+\n+ // --------------------------- copied from org.modelix.instancesmanager.WebSocketProxyServlet ----------------------\n+\n+\n+ private static final Logger LOG = Logger.getLogger(WebSocketProxyServlet.class);\n+\n+ protected abstract URI redirect(ServletUpgradeRequest request);\n+\n+ public void configure(WebSocketServletFactory factory) {\n+ factory.getPolicy().setMaxTextMessageSize(50 * 1024 * 1024);\n+ factory.getPolicy().setMaxBinaryMessageSize(50 * 1024 * 1024);\n+ factory.setCreator(new WebSocketCreator() {\n+ @Override\n+ public Object createWebSocket(ServletUpgradeRequest req, ServletUpgradeResponse resp) {\n+ URI redirectURL = redirect(req);\n+ if (redirectURL == null) return null;\n+ return new WebSocketListener() {\n+ private WebSocketClient client = new WebSocketClient();\n+ private Session sessionA;\n+ private Session sessionB;\n+\n+ @Override\n+ public void onWebSocketConnect(final Session session) {\n+ sessionA = session;\n+ try {\n+ client.start();\n+ client.getPolicy().setMaxTextMessageSize(50 * 1024 * 1024);\n+ client.getPolicy().setMaxBinaryMessageSize(50 * 1024 * 1024);\n+ URI redirectURL = redirect(req);\n+ client.connect(new WebSocketListener() {\n+ @Override\n+ public void onWebSocketBinary(byte[] payload, int offset, int len) {\n+ try {\n+ sessionA.getRemote().sendBytes(ByteBuffer.wrap(payload, offset, len));\n+ } catch (IOException e) {\n+ throw new RuntimeException(e);\n+ }\n+ }\n+\n+ @Override\n+ public void onWebSocketText(String message) {\n+ try {\n+ sessionA.getRemote().sendString(message);\n+ } catch (IOException e) {\n+ throw new RuntimeException(e);\n+ }\n+ }\n+\n+ @Override\n+ public void onWebSocketClose(int statusCode, String reason) {\n+ sessionA.close(statusCode, reason);\n+ }\n+\n+ @Override\n+ public void onWebSocketConnect(Session session) {\n+ sessionB = session;\n+ }\n+\n+ @Override\n+ public void onWebSocketError(Throwable cause) {\n+ LOG.error(\"\", cause);\n+ }\n+ }, redirectURL, new ClientUpgradeRequest()).get();\n+ } catch (Exception e) {\n+ throw new RuntimeException(e);\n+ }\n+ }\n+\n+ @Override\n+ public void onWebSocketText(String message) {\n+ try {\n+ sessionB.getRemote().sendString(message);\n+ } catch (IOException e) {\n+ throw new RuntimeException(e);\n+ }\n+ }\n+\n+ @Override\n+ public void onWebSocketBinary(byte[] payload, int offset, int len) {\n+ try {\n+ sessionB.getRemote().sendBytes(ByteBuffer.wrap(payload, offset, len));\n+ } catch (IOException e) {\n+ throw new RuntimeException(e);\n+ }\n+ }\n+\n+ @Override\n+ public void onWebSocketClose(int statusCode, String reason) {\n+ sessionB.close(statusCode, reason);\n+ try {\n+ client.stop();\n+ } catch (Exception e) {\n+ LOG.error(\"\", e);\n+ }\n+ }\n+\n+ @Override\n+ public void onWebSocketError(Throwable cause) {\n+ LOG.error(\"\", cause);\n+ }\n+ };\n+ }\n+ });\n+ }\n+\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "instances-manager/src/main/java/org/modelix/instancesmanager/RedirectedURL.java",
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/RedirectedURL.java",
"diff": "@@ -38,20 +38,28 @@ public class RedirectedURL {\n// TODO use the ID of an authenticated user instead (or in addition)\nString personalDeploymentSuffix = null;\n- for (Cookie cookie : request.getCookies()) {\n+ Cookie[] cookies = request.getCookies();\n+ if (cookies != null) {\n+ for (Cookie cookie : cookies) {\nif (COOKIE_NAME.equals(cookie.getName())) {\npersonalDeploymentSuffix = cookie.getValue();\n}\n}\n+ }\nif (personalDeploymentSuffix == null) {\n+ if (\"/\".equals(path)) {\npersonalDeploymentSuffix = UUID.randomUUID().toString();\n+ } else {\n+ // Requests for manifest.webmanifest doesn't contain cookies and would trigger the creating\n+ // of a new deployment.\n+ return new RedirectedURL(remainingPath, originalDeploymentName ,null);\n+ }\n}\nif (baseRequest != null) {\n- baseRequest.getResponse().addCookie(new HttpCookie(COOKIE_NAME, personalDeploymentSuffix, null, \"/\", 30 * 24 * 60 * 60, true, false));\n+ baseRequest.getResponse().addCookie(new HttpCookie(COOKIE_NAME, personalDeploymentSuffix, null, \"/\", 30 * 24 * 60 * 60, false, false));\n}\nString personalDeploymentName = PERSONAL_DEPLOYMENT_PREFIX + originalDeploymentName + \"-\" + personalDeploymentSuffix;\n-\nreturn new RedirectedURL(remainingPath, originalDeploymentName, personalDeploymentName);\n}\n@@ -67,7 +75,8 @@ public class RedirectedURL {\n}\npublic String getRedirectedUrl(boolean websocket) {\n- String url = (websocket ? \"ws\" : \"http\") + \"://\" + personalDeploymentName;\n+ String url = (websocket ? \"ws\" : \"http\") + \"://\";\n+ url += personalDeploymentName != null ? personalDeploymentName : originalDeploymentName;\nif (remainingPath.startsWith(\"/ide/\")) {\nurl += \":8887\" + remainingPath.substring(\"/ide\".length());\n} else {\n"
},
{
"change_type": "MODIFY",
"old_path": "instances-manager/src/main/java/org/modelix/instancesmanager/WebSocketProxyServlet.java",
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/WebSocketProxyServlet.java",
"diff": "@@ -27,6 +27,7 @@ import java.net.URI;\nimport java.nio.ByteBuffer;\npublic abstract class WebSocketProxyServlet extends WebSocketServlet {\n+\nprivate static final Logger LOG = Logger.getLogger(WebSocketProxyServlet.class);\nprotected abstract URI redirect(ServletUpgradeRequest request);\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | New proxy that starts a separate MPS instance for each user (3) |
426,496 | 02.12.2021 15:13:39 | -3,600 | d9e2fe0553469f4cff5d395e2d83adad5cb1a543 | Keep deployment alive while there is still an active websocket connection | [
{
"change_type": "MODIFY",
"old_path": "instances-manager/src/main/java/org/modelix/instancesmanager/DeploymentManagingHandler.java",
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/DeploymentManagingHandler.java",
"diff": "/*\n- * Copyright 2003-2021 JetBrains s.r.o.\n- *\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n@@ -43,7 +41,6 @@ public class DeploymentManagingHandler extends AbstractHandler {\nprivate static final Logger LOG = Logger.getLogger(DeploymentManagingHandler.class);\npublic static final String KUBERNETES_NAMESPACE = \"default\";\n- private Map<String, Long> deploymentTimeouts = Collections.synchronizedMap(new HashedMap<>());\nprivate Thread cleanupThread = new Thread() {\n@Override\npublic void run() {\n@@ -77,7 +74,7 @@ public class DeploymentManagingHandler extends AbstractHandler {\nRedirectedURL redirectedURL = RedirectedURL.redirect(baseRequest, request);\nif (redirectedURL == null) return;\nif (redirectedURL.personalDeploymentName == null) return;\n- deploymentTimeouts.put(redirectedURL.personalDeploymentName, System.currentTimeMillis() + 30*60*1000);\n+ DeploymentTimeouts.INSTANCE.update(redirectedURL.personalDeploymentName);\nboolean deploymentCreated = createDeployment(redirectedURL.originalDeploymentName, redirectedURL.personalDeploymentName);\nif (!deploymentCreated) throw new RuntimeException(\"Deployment doesn't exist: \" + redirectedURL.originalDeploymentName);\n@@ -128,12 +125,11 @@ public class DeploymentManagingHandler extends AbstractHandler {\nfor (V1Deployment deployment : deployments.getItems()) {\nString name = deployment.getMetadata().getName();\nif (!name.startsWith(RedirectedURL.PERSONAL_DEPLOYMENT_PREFIX)) continue;\n- Long timeout = deploymentTimeouts.get(name);\n- if (timeout != null && timeout > System.currentTimeMillis()) continue;\n- deploymentTimeouts.remove(name);\n+ if (DeploymentTimeouts.INSTANCE.isTimedOut(name)) {\nappsApi.deleteNamespacedDeployment(name, KUBERNETES_NAMESPACE, null, null, null, null, null, null);\ncoreApi.deleteNamespacedService(name, KUBERNETES_NAMESPACE, null, null, null, null, null, null);\n}\n+ }\n} catch (ApiException e) {\nLOG.error(\"Deployment cleanup failed\", e);\n}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/DeploymentTimeouts.java",
"diff": "+/*\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.modelix.instancesmanager;\n+\n+import org.apache.commons.collections4.map.HashedMap;\n+\n+import java.util.Collections;\n+import java.util.Map;\n+\n+public class DeploymentTimeouts {\n+\n+ public static final DeploymentTimeouts INSTANCE = new DeploymentTimeouts();\n+\n+ private final Map<String, Long> timeouts = Collections.synchronizedMap(new HashedMap<>());\n+\n+ public void update(String deploymentName) {\n+ timeouts.put(deploymentName, System.currentTimeMillis() + 3*60*1000);\n+ }\n+\n+ public boolean isTimedOut(String deploymentName) {\n+ synchronized (timeouts) {\n+ Long timeout = timeouts.get(deploymentName);\n+ if (timeout == null) return true;\n+ if (timeout > System.currentTimeMillis()) return false;\n+ timeouts.remove(deploymentName);\n+ return true;\n+ }\n+ }\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "instances-manager/src/main/java/org/modelix/instancesmanager/Main.java",
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/Main.java",
"diff": "/*\n- * Copyright 2003-2021 JetBrains s.r.o.\n- *\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n@@ -25,6 +23,7 @@ import org.eclipse.jetty.server.handler.HandlerList;\nimport org.eclipse.jetty.server.handler.HandlerWrapper;\nimport org.eclipse.jetty.servlet.ServletContextHandler;\nimport org.eclipse.jetty.servlet.ServletHolder;\n+import org.eclipse.jetty.websocket.api.Session;\nimport org.eclipse.jetty.websocket.servlet.ServletUpgradeRequest;\nimport org.eclipse.jetty.websocket.servlet.WebSocketServlet;\n@@ -59,6 +58,12 @@ public class Main {\nhandlerList.addHandler(deploymentManagingHandler);\nProxyServletWithWebsocketSupport webSocketServlet = new ProxyServletWithWebsocketSupport() {\n+ @Override\n+ protected void dataTransferred(Session clientSession, Session proxySession) {\n+ String deploymentName = proxySession.getUpgradeRequest().getHost();\n+ DeploymentTimeouts.INSTANCE.update(deploymentName);\n+ }\n+\n@Override\nprotected URI redirect(ServletUpgradeRequest request) {\nRedirectedURL redirectedURL = RedirectedURL.redirect(null, request.getHttpServletRequest());\n"
},
{
"change_type": "MODIFY",
"old_path": "instances-manager/src/main/java/org/modelix/instancesmanager/ProxyServletWithWebsocketSupport.java",
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/ProxyServletWithWebsocketSupport.java",
"diff": "/*\n- * Copyright 2003-2021 JetBrains s.r.o.\n- *\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n@@ -38,6 +36,7 @@ import java.nio.ByteBuffer;\npublic abstract class ProxyServletWithWebsocketSupport extends ProxyServlet {\n+ protected void dataTransferred(Session clientSession, Session proxySession) {}\n// --------------------------- copied from org.eclipse.jetty.websocket.servlet.WebSocketServlet --------------------\n@@ -152,6 +151,7 @@ public abstract class ProxyServletWithWebsocketSupport extends ProxyServlet {\npublic void onWebSocketBinary(byte[] payload, int offset, int len) {\ntry {\nsessionA.getRemote().sendBytes(ByteBuffer.wrap(payload, offset, len));\n+ dataTransferred(sessionA, sessionB);\n} catch (IOException e) {\nthrow new RuntimeException(e);\n}\n@@ -161,6 +161,7 @@ public abstract class ProxyServletWithWebsocketSupport extends ProxyServlet {\npublic void onWebSocketText(String message) {\ntry {\nsessionA.getRemote().sendString(message);\n+ dataTransferred(sessionA, sessionB);\n} catch (IOException e) {\nthrow new RuntimeException(e);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "instances-manager/src/main/java/org/modelix/instancesmanager/RedirectedURL.java",
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/RedirectedURL.java",
"diff": "/*\n- * Copyright 2003-2021 JetBrains s.r.o.\n- *\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n"
},
{
"change_type": "MODIFY",
"old_path": "instances-manager/src/main/java/org/modelix/instancesmanager/WebSocketProxyServlet.java",
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/WebSocketProxyServlet.java",
"diff": "/*\n- * Copyright 2003-2021 JetBrains s.r.o.\n- *\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Keep deployment alive while there is still an active websocket connection |
426,496 | 02.12.2021 15:32:13 | -3,600 | 3d943d730047c3b198ae59d5f7671bbe2d9a35bb | Increased timeout for cleaning up deployments to 10 minutes | [
{
"change_type": "MODIFY",
"old_path": "instances-manager/src/main/java/org/modelix/instancesmanager/DeploymentTimeouts.java",
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/DeploymentTimeouts.java",
"diff": "@@ -25,7 +25,7 @@ public class DeploymentTimeouts {\nprivate final Map<String, Long> timeouts = Collections.synchronizedMap(new HashedMap<>());\npublic void update(String deploymentName) {\n- timeouts.put(deploymentName, System.currentTimeMillis() + 3*60*1000);\n+ timeouts.put(deploymentName, System.currentTimeMillis() + 10*60*1000);\n}\npublic boolean isTimedOut(String deploymentName) {\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Increased timeout for cleaning up deployments to 10 minutes |
426,496 | 02.12.2021 15:35:52 | -3,600 | 29c1d381670ed491545b415bf490725c12ab2c30 | Timeout can be configured using the environment variable DEPLOYMENT_USER_COPY_TIMEOUT | [
{
"change_type": "MODIFY",
"old_path": "instances-manager/src/main/java/org/modelix/instancesmanager/DeploymentTimeouts.java",
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/DeploymentTimeouts.java",
"diff": "@@ -25,7 +25,15 @@ public class DeploymentTimeouts {\nprivate final Map<String, Long> timeouts = Collections.synchronizedMap(new HashedMap<>());\npublic void update(String deploymentName) {\n- timeouts.put(deploymentName, System.currentTimeMillis() + 10*60*1000);\n+ String timeoutStr = System.getProperty(\"DEPLOYMENT_USER_COPY_TIMEOUT\");\n+ if (timeoutStr == null) timeoutStr = System.getenv(\"DEPLOYMENT_USER_COPY_TIMEOUT\");\n+ int timeout;\n+ try {\n+ timeout = Integer.parseInt(timeoutStr);\n+ } catch (NumberFormatException ex) {\n+ timeout = 10;\n+ }\n+ timeouts.put(deploymentName, System.currentTimeMillis() + timeout*60*1000);\n}\npublic boolean isTimedOut(String deploymentName) {\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Timeout can be configured using the environment variable DEPLOYMENT_USER_COPY_TIMEOUT |
426,496 | 02.12.2021 15:47:43 | -3,600 | ef006af6c1a24180493ad563234dedd930c09f91 | Default timeout increased to 60 minutes
Especially if you do something else while MPS starts and you come back
later, it's enoying having to wait again, because the MPS instance is
already cleaned up. | [
{
"change_type": "MODIFY",
"old_path": "instances-manager/src/main/java/org/modelix/instancesmanager/DeploymentTimeouts.java",
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/DeploymentTimeouts.java",
"diff": "@@ -27,13 +27,13 @@ public class DeploymentTimeouts {\npublic void update(String deploymentName) {\nString timeoutStr = System.getProperty(\"DEPLOYMENT_USER_COPY_TIMEOUT\");\nif (timeoutStr == null) timeoutStr = System.getenv(\"DEPLOYMENT_USER_COPY_TIMEOUT\");\n- int timeout;\n+ long timeout = 60;\n+ if (timeoutStr != null && timeoutStr.length() > 0) {\ntry {\n- timeout = Integer.parseInt(timeoutStr);\n- } catch (NumberFormatException ex) {\n- timeout = 10;\n+ timeout = Long.parseLong(timeoutStr);\n+ } catch (NumberFormatException ex) {}\n}\n- timeouts.put(deploymentName, System.currentTimeMillis() + timeout*60*1000);\n+ timeouts.put(deploymentName, System.currentTimeMillis() + timeout*60L*1000L);\n}\npublic boolean isTimedOut(String deploymentName) {\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Default timeout increased to 60 minutes
Especially if you do something else while MPS starts and you come back
later, it's enoying having to wait again, because the MPS instance is
already cleaned up. |
426,496 | 02.12.2021 17:09:49 | -3,600 | 3558d5bc4796ed0fc0c606c4174cd32512890b8d | ? was missing in the proxy target URL | [
{
"change_type": "MODIFY",
"old_path": "instances-manager/src/main/java/org/modelix/instancesmanager/RedirectedURL.java",
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/RedirectedURL.java",
"diff": "@@ -34,6 +34,8 @@ public class RedirectedURL {\nString originalDeploymentName = path.substring(1, indexOfSlash);\nString remainingPath = path.substring(indexOfSlash);\n+ if (request.getQueryString() != null) remainingPath += \"?\" + request.getQueryString();\n+\n// TODO use the ID of an authenticated user instead (or in addition)\nString personalDeploymentSuffix = null;\nCookie[] cookies = request.getCookies();\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | ? was missing in the proxy target URL |
426,496 | 02.12.2021 17:37:28 | -3,600 | a1e8cd6437b9cb5a69cc2cd96d4f4e9f8473cf81 | If the cookie is missing return 401 instead of forwarding to the default deplyoment | [
{
"change_type": "MODIFY",
"old_path": "instances-manager/src/main/java/org/modelix/instancesmanager/Main.java",
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/Main.java",
"diff": "@@ -57,7 +57,7 @@ public class Main {\nDeploymentManagingHandler deploymentManagingHandler = new DeploymentManagingHandler();\nhandlerList.addHandler(deploymentManagingHandler);\n- ProxyServletWithWebsocketSupport webSocketServlet = new ProxyServletWithWebsocketSupport() {\n+ ProxyServletWithWebsocketSupport proxyServlet = new ProxyServletWithWebsocketSupport() {\n@Override\nprotected void dataTransferred(Session clientSession, Session proxySession) {\nString deploymentName = proxySession.getUpgradeRequest().getHost();\n@@ -82,18 +82,26 @@ public class Main {\nreturn redirectedURL.getRedirectedUrl(false);\n}\n};\n- HandlerWrapper webSocketHandlerCondition = new HandlerWrapper() {\n+ HandlerWrapper proxyHandlerCondition = new HandlerWrapper() {\n@Override\npublic void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {\n- if (RedirectedURL.redirect(baseRequest, request) == null) return;\n+ RedirectedURL redirect = RedirectedURL.redirect(baseRequest, request);\n+ if (redirect == null) return;\n+ if (redirect.personalDeploymentName == null) {\n+ baseRequest.setHandled(true);\n+ response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n+ response.setContentType(\"text/plain\");\n+ response.getWriter().write(\"Cookie with deployment ID missing. Refresh this page to send a new valid request.\");\n+ return;\n+ }\n// if (!baseRequest.getRequestURI().contains(\"/ws/\")) return;\nsuper.handle(target, baseRequest, request, response);\n}\n};\n- ServletContextHandler webSocketHandler = new ServletContextHandler();\n- webSocketHandler.addServlet(new ServletHolder(webSocketServlet), \"/*\");\n- webSocketHandlerCondition.setHandler(webSocketHandler);\n- handlerList.addHandler(webSocketHandlerCondition);\n+ ServletContextHandler proxyHandler = new ServletContextHandler();\n+ proxyHandler.addServlet(new ServletHolder(proxyServlet), \"/*\");\n+ proxyHandlerCondition.setHandler(proxyHandler);\n+ handlerList.addHandler(proxyHandlerCondition);\n// ProxyServlet proxyServlet = new ProxyServlet() {\n"
},
{
"change_type": "MODIFY",
"old_path": "instances-manager/src/main/java/org/modelix/instancesmanager/RedirectedURL.java",
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/RedirectedURL.java",
"diff": "@@ -37,29 +37,24 @@ public class RedirectedURL {\nif (request.getQueryString() != null) remainingPath += \"?\" + request.getQueryString();\n// TODO use the ID of an authenticated user instead (or in addition)\n- String personalDeploymentSuffix = null;\n+ String cookieValue = null;\nCookie[] cookies = request.getCookies();\nif (cookies != null) {\nfor (Cookie cookie : cookies) {\nif (COOKIE_NAME.equals(cookie.getName())) {\n- personalDeploymentSuffix = cookie.getValue();\n+ cookieValue = cookie.getValue();\n}\n}\n}\n- if (personalDeploymentSuffix == null) {\n- if (\"/\".equals(path)) {\n- personalDeploymentSuffix = UUID.randomUUID().toString();\n- } else {\n- // Requests for manifest.webmanifest doesn't contain cookies and would trigger the creating\n- // of a new deployment.\n- return new RedirectedURL(remainingPath, originalDeploymentName ,null);\n- }\n- }\nif (baseRequest != null) {\n- baseRequest.getResponse().addCookie(new HttpCookie(COOKIE_NAME, personalDeploymentSuffix, null, \"/\", 30 * 24 * 60 * 60, false, false));\n+ baseRequest.getResponse().addCookie(new HttpCookie(COOKIE_NAME, cookieValue != null ? cookieValue : UUID.randomUUID().toString(), null, \"/\", 30 * 24 * 60 * 60, false, false));\n+ }\n+\n+ if (cookieValue == null) {\n+ return new RedirectedURL(remainingPath, originalDeploymentName ,null);\n}\n- String personalDeploymentName = PERSONAL_DEPLOYMENT_PREFIX + originalDeploymentName + \"-\" + personalDeploymentSuffix;\n+ String personalDeploymentName = PERSONAL_DEPLOYMENT_PREFIX + originalDeploymentName + \"-\" + cookieValue;\nreturn new RedirectedURL(remainingPath, originalDeploymentName, personalDeploymentName);\n}\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | If the cookie is missing return 401 instead of forwarding to the default deplyoment |
426,496 | 03.12.2021 16:04:09 | -3,600 | e9d5e18ffbf2521fff9866184831c52cd3beb81f | Start one more MPS instance than required so that new users don't have to wait
There is always a fresh MPS instance waiting for a user that is assigned
to him on first access. Then a new instance is started for the next user. | [
{
"change_type": "ADD",
"old_path": null,
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/DeploymentManager.java",
"diff": "+/*\n+ * Copyright 2003-2021 JetBrains s.r.o.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.modelix.instancesmanager;\n+\n+import io.kubernetes.client.openapi.ApiException;\n+import io.kubernetes.client.openapi.Configuration;\n+import io.kubernetes.client.openapi.apis.AppsV1Api;\n+import io.kubernetes.client.openapi.apis.CoreV1Api;\n+import io.kubernetes.client.openapi.models.V1Deployment;\n+import io.kubernetes.client.openapi.models.V1DeploymentList;\n+import io.kubernetes.client.openapi.models.V1Pod;\n+import io.kubernetes.client.openapi.models.V1PodList;\n+import io.kubernetes.client.openapi.models.V1Service;\n+import io.kubernetes.client.openapi.models.V1ServiceList;\n+import io.kubernetes.client.util.ClientBuilder;\n+import io.kubernetes.client.util.Yaml;\n+import org.apache.log4j.Logger;\n+import org.eclipse.jetty.server.Request;\n+\n+import javax.annotation.Nullable;\n+import javax.servlet.http.HttpServletRequest;\n+import java.io.IOException;\n+import java.util.ArrayList;\n+import java.util.Collections;\n+import java.util.HashMap;\n+import java.util.HashSet;\n+import java.util.LinkedList;\n+import java.util.List;\n+import java.util.Map;\n+import java.util.Set;\n+import java.util.concurrent.atomic.AtomicBoolean;\n+import java.util.concurrent.atomic.AtomicLong;\n+import java.util.stream.Collectors;\n+import java.util.stream.Stream;\n+\n+public class DeploymentManager {\n+ private static final Logger LOG = Logger.getLogger(DeploymentManager.class);\n+ public static final String KUBERNETES_NAMESPACE = \"default\";\n+ public static final DeploymentManager INSTANCE = new DeploymentManager();\n+ public static final String INSTANCE_PER_USER_ANNOTATION_KEY = \"instance-per-user\";\n+ public static final String MAX_UNASSIGNED_INSTANCES_ANNOTATION_KEY = \"max-unassigned-instances\";\n+ public static final String PERSONAL_DEPLOYMENT_PREFIX = \"user-copy-\";\n+\n+ private Thread cleanupThread = new Thread() {\n+ @Override\n+ public void run() {\n+ while (true) {\n+ try {\n+ reconcileDeployments();\n+ } catch (Exception ex) {\n+ LOG.error(\"\", ex);\n+ }\n+ try {\n+ Thread.sleep(10_000);\n+ } catch (InterruptedException e) {\n+ return;\n+ }\n+ }\n+ }\n+ };\n+\n+ private final String managerId = Long.toHexString(System.currentTimeMillis());\n+ private final AtomicLong deploymentSuffixSequence = new AtomicLong(0);\n+ private final Map<String, Assignments> assignments = Collections.synchronizedMap(new HashMap<>());\n+ private final AtomicBoolean dirty = new AtomicBoolean(true);\n+\n+ public DeploymentManager() {\n+ try {\n+ Configuration.setDefaultApiClient(ClientBuilder.cluster().build());\n+ } catch (IOException e) {\n+ throw new RuntimeException(e);\n+ }\n+ cleanupThread.start();\n+ }\n+\n+ private Assignments getAssignments(String originalDeploymentName) {\n+ return assignments.computeIfAbsent(originalDeploymentName, Assignments::new);\n+ }\n+\n+ private String generatePersonalDeploymentName(String originalDeploymentName) {\n+ return PERSONAL_DEPLOYMENT_PREFIX + originalDeploymentName + \"-\" + managerId + \"-\" + deploymentSuffixSequence.incrementAndGet();\n+ }\n+\n+ public RedirectedURL redirect(@Nullable Request baseRequest, HttpServletRequest request) {\n+ RedirectedURL redirected = RedirectedURL.redirect(baseRequest, request);\n+ if (redirected == null) return null;\n+\n+ try {\n+ V1Deployment originalDeployment = getDeployment(redirected.originalDeploymentName, 3);\n+ boolean isInstancePerUser = \"true\".equals(originalDeployment.getMetadata().getAnnotations().get(INSTANCE_PER_USER_ANNOTATION_KEY));\n+ if (!isInstancePerUser) {\n+ redirected.noPersonalDeployment();\n+ } else {\n+ Assignments assignments = getAssignments(redirected.originalDeploymentName);\n+ redirected.personalDeploymentName = assignments.getOrCreate(redirected.userId);\n+\n+ int maxUnassignedInstances = 1;\n+ try {\n+ String maxUnassignedInstancesStr = originalDeployment.getMetadata().getAnnotations().get(MAX_UNASSIGNED_INSTANCES_ANNOTATION_KEY);\n+ if (maxUnassignedInstancesStr != null) {\n+ maxUnassignedInstances = Integer.parseInt(maxUnassignedInstancesStr);\n+ }\n+ } catch (NumberFormatException e) {}\n+ assignments.setNumberOfUnassigned(Math.max(0, maxUnassignedInstances));\n+\n+ reconcileIfDirty();\n+ }\n+ } catch (ApiException e) {\n+ LOG.error(\"Failed to get deployment \" + redirected.originalDeploymentName, e);\n+ }\n+\n+ return redirected;\n+ }\n+\n+ private final Object reconcileLock = new Object();\n+ private void reconcileDeployments() {\n+ // TODO doesn't work with multiple instances of this proxy\n+ synchronized (reconcileLock) {\n+ try {\n+ Map<String, String> expectedDeployments = new HashMap<>();\n+ Set<String> existingDeployments = new HashSet<>();\n+ synchronized (assignments) {\n+ for (Assignments assignment : assignments.values()) {\n+ assignment.removeTimedOut();\n+ for (String deployment : assignment.getAllDeploymentNames()) {\n+ expectedDeployments.put(deployment, assignment.originalDeploymentName);\n+ }\n+ }\n+ }\n+\n+ AppsV1Api appsApi = new AppsV1Api();\n+ CoreV1Api coreApi = new CoreV1Api();\n+ V1DeploymentList deployments = appsApi.listNamespacedDeployment(KUBERNETES_NAMESPACE, null, null, null, null, null, null, null, null, null);\n+ for (V1Deployment deployment : deployments.getItems()) {\n+ String name = deployment.getMetadata().getName();\n+ if (name.startsWith(PERSONAL_DEPLOYMENT_PREFIX)) {\n+ existingDeployments.add(name);\n+ }\n+ }\n+\n+ List<String> toAdd = expectedDeployments.keySet().stream().filter(d -> !existingDeployments.contains(d)).collect(Collectors.toList());\n+ List<String> toRemove = existingDeployments.stream().filter(d -> !expectedDeployments.containsKey(d)).collect(Collectors.toList());\n+\n+ for (String d : toRemove) {\n+ appsApi.deleteNamespacedDeployment(d, KUBERNETES_NAMESPACE, null, null, null, null, null, null);\n+ coreApi.deleteNamespacedService(d, KUBERNETES_NAMESPACE, null, null, null, null, null, null);\n+ }\n+\n+ for (String d : toAdd) {\n+ try {\n+ createDeployment(expectedDeployments.get(d), d);\n+ } catch (IOException e) {\n+ LOG.error(\"Failed to create deployment \" + d, e);\n+ }\n+ }\n+ } catch (ApiException e) {\n+ LOG.error(\"Deployment cleanup failed\", e);\n+ }\n+ }\n+ }\n+\n+ private void reconcileIfDirty() {\n+ if (dirty.getAndSet(false)) reconcileDeployments();\n+ }\n+\n+ public V1Deployment getDeployment(String name, int attempts) throws ApiException {\n+ AppsV1Api appsApi = new AppsV1Api();\n+ V1Deployment deployment = null;\n+ for (int i = 0; i < attempts; i++) {\n+ try {\n+ deployment = appsApi.readNamespacedDeployment(name, KUBERNETES_NAMESPACE, null, null, null);\n+ } catch (ApiException ex) {\n+ }\n+ if (deployment != null) break;\n+ try {\n+ Thread.sleep(1000L);\n+ } catch (InterruptedException e) {\n+ return null;\n+ }\n+ }\n+ return deployment;\n+ }\n+\n+ public String getPodLogs(String deploymentName) {\n+ try {\n+ CoreV1Api coreApi = new CoreV1Api();\n+ V1PodList pods = coreApi.listNamespacedPod(KUBERNETES_NAMESPACE, null, null, null, null, null, null, null, null, null);\n+ for (V1Pod pod : pods.getItems()) {\n+ if (!pod.getMetadata().getName().startsWith(deploymentName)) continue;\n+ return coreApi.readNamespacedPodLog(\n+ pod.getMetadata().getName(),\n+ KUBERNETES_NAMESPACE,\n+ pod.getSpec().getContainers().get(0).getName(),\n+ null, null, \"true\", null, null, 10_000, null);\n+ }\n+ } catch (Exception e) {\n+ LOG.error(\"\", e);\n+ return null;\n+ }\n+\n+ return null;\n+ }\n+\n+ public boolean createDeployment(String originalDeploymentName, String personalDeploymentName) throws IOException, ApiException {\n+ AppsV1Api appsApi = new AppsV1Api();\n+\n+ V1DeploymentList deployments = appsApi.listNamespacedDeployment(KUBERNETES_NAMESPACE, null, null, null, null, null, null, null, 5, false);\n+ boolean deploymentExists = deployments.getItems().stream().anyMatch(d -> personalDeploymentName.equals(d.getMetadata().getName()));\n+ if (!deploymentExists) {\n+// long numExisting = deployments.getItems().stream().filter(d -> d.getMetadata().getName().startsWith(personalDeploymentPrefix)).count();\n+// if (numExisting > 10) throw new RuntimeException(\"Too many existing deployments\");\n+\n+ V1Deployment deployment = appsApi.readNamespacedDeployment(originalDeploymentName, KUBERNETES_NAMESPACE, null, null, null);\n+ deployment.getMetadata().creationTimestamp(null);\n+ deployment.getMetadata().setManagedFields(null);\n+ deployment.getMetadata().setUid(null);\n+ deployment.getMetadata().resourceVersion(null);\n+ deployment.setStatus(null);\n+ deployment.getMetadata().putAnnotationsItem(\"kubectl.kubernetes.io/last-applied-configuration\", null);\n+\n+ deployment.getMetadata().name(personalDeploymentName);\n+ deployment.getMetadata().putLabelsItem(\"app\", personalDeploymentName);\n+ deployment.getSpec().getSelector().putMatchLabelsItem(\"app\", personalDeploymentName);\n+ deployment.getSpec().getTemplate().getMetadata().putLabelsItem(\"app\", personalDeploymentName);\n+ deployment.getSpec().replicas(1);\n+\n+ System.out.println(\"Creating deployment: \");\n+ System.out.println(Yaml.dump(deployment));\n+ appsApi.createNamespacedDeployment(KUBERNETES_NAMESPACE, deployment, null, null, null);\n+ }\n+\n+ CoreV1Api coreApi = new CoreV1Api();\n+ V1ServiceList services = coreApi.listNamespacedService(KUBERNETES_NAMESPACE, null, null, null, null, null, null, null, 5, false);\n+ boolean serviceExists = services.getItems().stream().anyMatch(s -> personalDeploymentName.equals(s.getMetadata().getName()));\n+ if (!serviceExists) {\n+ V1Service service = coreApi.readNamespacedService(originalDeploymentName, KUBERNETES_NAMESPACE, null, null, null);\n+ service.getMetadata().putAnnotationsItem(\"kubectl.kubernetes.io/last-applied-configuration\", null);\n+ service.getMetadata().setManagedFields(null);\n+ service.getMetadata().setUid(null);\n+ service.getMetadata().resourceVersion(null);\n+ service.getSpec().setClusterIP(null);\n+ service.getSpec().getPorts().forEach(p -> p.nodePort(null));\n+ service.setStatus(null);\n+\n+ service.getMetadata().name(personalDeploymentName);\n+ service.getMetadata().putLabelsItem(\"app\", personalDeploymentName);\n+ service.getMetadata().name(personalDeploymentName);\n+ service.getSpec().putSelectorItem(\"app\", personalDeploymentName);\n+\n+\n+ System.out.println(\"Creating service: \");\n+ System.out.println(Yaml.dump(service));\n+\n+ coreApi.createNamespacedService(KUBERNETES_NAMESPACE, service, null, null, null);\n+ }\n+\n+ return true;\n+ }\n+\n+ private class Assignments {\n+ private final String originalDeploymentName;\n+ private final Map<String, String> userId2deployment = new HashMap<>();\n+ private final List<String> unassignedDeployments = new LinkedList<>();\n+\n+ public Assignments(String originalDeploymentName) {\n+ this.originalDeploymentName = originalDeploymentName;\n+ }\n+\n+ public synchronized String getOrCreate(String userId) {\n+ String personalDeployment = userId2deployment.get(userId);\n+ if (personalDeployment == null) {\n+ if (unassignedDeployments.isEmpty()) {\n+ personalDeployment = generatePersonalDeploymentName(originalDeploymentName);\n+ } else {\n+ personalDeployment = unassignedDeployments.remove(0);\n+ unassignedDeployments.add(generatePersonalDeploymentName(originalDeploymentName));\n+ }\n+ userId2deployment.put(userId, personalDeployment);\n+ dirty.set(true);\n+ }\n+ DeploymentTimeouts.INSTANCE.update(personalDeployment);\n+ return personalDeployment;\n+ }\n+\n+ public synchronized void setNumberOfUnassigned(int targetNumber) {\n+ while (unassignedDeployments.size() > targetNumber) {\n+ unassignedDeployments.remove(unassignedDeployments.size() - 1);\n+ dirty.set(true);\n+ }\n+ while (unassignedDeployments.size() < targetNumber) {\n+ unassignedDeployments.add(generatePersonalDeploymentName(originalDeploymentName));\n+ dirty.set(true);\n+ }\n+ }\n+\n+ public synchronized List<String> getAllDeploymentNames() {\n+ return Stream.concat(\n+ userId2deployment.values().stream(),\n+ unassignedDeployments.stream()\n+ ).collect(Collectors.toList());\n+ }\n+\n+ public synchronized void removeTimedOut() {\n+ ArrayList<Map.Entry<String, String>> entries = new ArrayList<>(userId2deployment.entrySet());\n+ for (Map.Entry<String, String> entry : entries) {\n+ if (DeploymentTimeouts.INSTANCE.isTimedOut(entry.getValue())) {\n+ userId2deployment.remove(entry.getKey(), entry.getValue());\n+ dirty.set(true);\n+ }\n+ }\n+ }\n+ }\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "instances-manager/src/main/java/org/modelix/instancesmanager/DeploymentManagingHandler.java",
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/DeploymentManagingHandler.java",
"diff": "@@ -39,54 +39,29 @@ import java.util.Map;\npublic class DeploymentManagingHandler extends AbstractHandler {\nprivate static final Logger LOG = Logger.getLogger(DeploymentManagingHandler.class);\n- public static final String KUBERNETES_NAMESPACE = \"default\";\n-\n- private Thread cleanupThread = new Thread() {\n- @Override\n- public void run() {\n- while (true) {\n- try {\n- cleanupDeployments();\n- } catch (Exception ex) {\n- LOG.error(\"\", ex);\n- }\n- try {\n- Thread.sleep(10_000);\n- } catch (InterruptedException e) {\n- return;\n- }\n- }\n- }\n- };\npublic DeploymentManagingHandler() {\n- try {\n- Configuration.setDefaultApiClient(ClientBuilder.cluster().build());\n- } catch (IOException e) {\n- throw new RuntimeException(e);\n- }\n- cleanupThread.start();\n+\n}\n@Override\npublic void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) {\ntry {\n- RedirectedURL redirectedURL = RedirectedURL.redirect(baseRequest, request);\n+ DeploymentManager deploymentManager = DeploymentManager.INSTANCE;\n+ RedirectedURL redirectedURL = deploymentManager.redirect(baseRequest, request);\nif (redirectedURL == null) return;\nif (redirectedURL.personalDeploymentName == null) return;\nDeploymentTimeouts.INSTANCE.update(redirectedURL.personalDeploymentName);\n- boolean deploymentCreated = createDeployment(redirectedURL.originalDeploymentName, redirectedURL.personalDeploymentName);\n- if (!deploymentCreated) throw new RuntimeException(\"Deployment doesn't exist: \" + redirectedURL.originalDeploymentName);\n- V1Deployment deployment = getDeployment(redirectedURL.personalDeploymentName);\n- if (deployment == null) throw new RuntimeException(\"Failed to create deployment\");\n+ V1Deployment deployment = deploymentManager.getDeployment(redirectedURL.personalDeploymentName, 3);\n+ if (deployment == null) throw new RuntimeException(\"Failed to create deployment \" + redirectedURL.personalDeploymentName + \" for user \" + redirectedURL.userId);\nInteger readyReplicas = deployment.getStatus() != null ? deployment.getStatus().getReadyReplicas() : null;\nif (readyReplicas == null || readyReplicas == 0) {\nbaseRequest.setHandled(true);\nresponse.setContentType(\"text/html\");\nresponse.setStatus(HttpServletResponse.SC_OK);\n- String podLogs = getPodLogs(redirectedURL.personalDeploymentName);\n+ String podLogs = deploymentManager.getPodLogs(redirectedURL.personalDeploymentName);\nresponse.getWriter()\n.append(\"<html>\")\n@@ -106,117 +81,9 @@ public class DeploymentManagingHandler extends AbstractHandler {\n.append(\"</body>\")\n.append(\"</html>\");\n}\n-\n- cleanupDeployments();\n} catch (Exception ex) {\nthrow new RuntimeException(ex);\n}\n}\n- private final Object cleanupLock = new Object();\n- private void cleanupDeployments() {\n- // TODO doesn't work with multiple instances of this proxy\n- synchronized (cleanupLock) {\n- try {\n- AppsV1Api appsApi = new AppsV1Api();\n- CoreV1Api coreApi = new CoreV1Api();\n- V1DeploymentList deployments = null;\n- deployments = appsApi.listNamespacedDeployment(KUBERNETES_NAMESPACE, null, null, null, null, null, null, null, null, null);\n- for (V1Deployment deployment : deployments.getItems()) {\n- String name = deployment.getMetadata().getName();\n- if (!name.startsWith(RedirectedURL.PERSONAL_DEPLOYMENT_PREFIX)) continue;\n- if (DeploymentTimeouts.INSTANCE.isTimedOut(name)) {\n- appsApi.deleteNamespacedDeployment(name, KUBERNETES_NAMESPACE, null, null, null, null, null, null);\n- coreApi.deleteNamespacedService(name, KUBERNETES_NAMESPACE, null, null, null, null, null, null);\n- }\n- }\n- } catch (ApiException e) {\n- LOG.error(\"Deployment cleanup failed\", e);\n- }\n- }\n- }\n-\n- private V1Deployment getDeployment(String name) throws ApiException {\n- AppsV1Api appsApi = new AppsV1Api();\n- V1DeploymentList deployments = appsApi.listNamespacedDeployment(KUBERNETES_NAMESPACE, null, null, null, null, null, null, null, null, null);\n- for (V1Deployment deployment : deployments.getItems()) {\n- if (name.equals(deployment.getMetadata().getName())) return deployment;\n- }\n- return null;\n- }\n-\n- private String getPodLogs(String deploymentName) {\n- try {\n- CoreV1Api coreApi = new CoreV1Api();\n- V1PodList pods = coreApi.listNamespacedPod(KUBERNETES_NAMESPACE, null, null, null, null, null, null, null, null, null);\n- for (V1Pod pod : pods.getItems()) {\n- if (!pod.getMetadata().getName().startsWith(deploymentName)) continue;\n- return coreApi.readNamespacedPodLog(\n- pod.getMetadata().getName(),\n- KUBERNETES_NAMESPACE,\n- pod.getSpec().getContainers().get(0).getName(),\n- null, null, \"true\", null, null, 10_000, null);\n- }\n- } catch (Exception e) {\n- LOG.error(\"\", e);\n- return null;\n- }\n-\n- return null;\n- }\n-\n- private boolean createDeployment(String originalDeploymentName, String personalDeploymentName) throws IOException, ApiException {\n- AppsV1Api appsApi = new AppsV1Api();\n-\n- V1DeploymentList deployments = appsApi.listNamespacedDeployment(KUBERNETES_NAMESPACE, null, null, null, null, null, null, null, 5, false);\n- boolean deploymentExists = deployments.getItems().stream().anyMatch(d -> personalDeploymentName.equals(d.getMetadata().getName()));\n- if (!deploymentExists) {\n-// long numExisting = deployments.getItems().stream().filter(d -> d.getMetadata().getName().startsWith(personalDeploymentPrefix)).count();\n-// if (numExisting > 10) throw new RuntimeException(\"Too many existing deployments\");\n-\n- V1Deployment deployment = appsApi.readNamespacedDeployment(originalDeploymentName, KUBERNETES_NAMESPACE, null, null, null);\n- deployment.getMetadata().creationTimestamp(null);\n- deployment.getMetadata().setManagedFields(null);\n- deployment.getMetadata().setUid(null);\n- deployment.getMetadata().resourceVersion(null);\n- deployment.setStatus(null);\n- deployment.getMetadata().putAnnotationsItem(\"kubectl.kubernetes.io/last-applied-configuration\", null);\n-\n- deployment.getMetadata().name(personalDeploymentName);\n- deployment.getMetadata().putLabelsItem(\"app\", personalDeploymentName);\n- deployment.getSpec().getSelector().putMatchLabelsItem(\"app\", personalDeploymentName);\n- deployment.getSpec().getTemplate().getMetadata().putLabelsItem(\"app\", personalDeploymentName);\n-\n- System.out.println(\"Creating deployment: \");\n- System.out.println(Yaml.dump(deployment));\n- appsApi.createNamespacedDeployment(KUBERNETES_NAMESPACE, deployment, null, null, null);\n- }\n-\n- CoreV1Api coreApi = new CoreV1Api();\n- V1ServiceList services = coreApi.listNamespacedService(KUBERNETES_NAMESPACE, null, null, null, null, null, null, null, 5, false);\n- boolean serviceExists = services.getItems().stream().anyMatch(s -> personalDeploymentName.equals(s.getMetadata().getName()));\n- if (!serviceExists) {\n- V1Service service = coreApi.readNamespacedService(originalDeploymentName, KUBERNETES_NAMESPACE, null, null, null);\n- service.getMetadata().putAnnotationsItem(\"kubectl.kubernetes.io/last-applied-configuration\", null);\n- service.getMetadata().setManagedFields(null);\n- service.getMetadata().setUid(null);\n- service.getMetadata().resourceVersion(null);\n- service.getSpec().setClusterIP(null);\n- service.getSpec().getPorts().forEach(p -> p.nodePort(null));\n- service.setStatus(null);\n-\n- service.getMetadata().name(personalDeploymentName);\n- service.getMetadata().putLabelsItem(\"app\", personalDeploymentName);\n- service.getMetadata().name(personalDeploymentName);\n- service.getSpec().putSelectorItem(\"app\", personalDeploymentName);\n-\n-\n- System.out.println(\"Creating service: \");\n- System.out.println(Yaml.dump(service));\n-\n- coreApi.createNamespacedService(KUBERNETES_NAMESPACE, service, null, null, null);\n- }\n-\n- return true;\n- }\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "instances-manager/src/main/java/org/modelix/instancesmanager/Main.java",
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/Main.java",
"diff": "@@ -66,7 +66,7 @@ public class Main {\n@Override\nprotected URI redirect(ServletUpgradeRequest request) {\n- RedirectedURL redirectedURL = RedirectedURL.redirect(null, request.getHttpServletRequest());\n+ RedirectedURL redirectedURL = DeploymentManager.INSTANCE.redirect(null, request.getHttpServletRequest());\nif (redirectedURL == null) return null;\ntry {\nreturn new URI(redirectedURL.getRedirectedUrl(true));\n@@ -77,7 +77,7 @@ public class Main {\n@Override\nprotected String rewriteTarget(HttpServletRequest clientRequest) {\n- RedirectedURL redirectedURL = RedirectedURL.redirect(null, clientRequest);\n+ RedirectedURL redirectedURL = DeploymentManager.INSTANCE.redirect(null, clientRequest);\nif (redirectedURL == null) return null;\nreturn redirectedURL.getRedirectedUrl(false);\n}\n@@ -85,9 +85,9 @@ public class Main {\nHandlerWrapper proxyHandlerCondition = new HandlerWrapper() {\n@Override\npublic void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {\n- RedirectedURL redirect = RedirectedURL.redirect(baseRequest, request);\n+ RedirectedURL redirect = DeploymentManager.INSTANCE.redirect(baseRequest, request);\nif (redirect == null) return;\n- if (redirect.personalDeploymentName == null) {\n+ if (redirect.userId == null) {\nbaseRequest.setHandled(true);\nresponse.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\nresponse.setContentType(\"text/plain\");\n"
},
{
"change_type": "MODIFY",
"old_path": "instances-manager/src/main/java/org/modelix/instancesmanager/RedirectedURL.java",
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/RedirectedURL.java",
"diff": "@@ -22,7 +22,7 @@ import javax.servlet.http.HttpServletRequest;\nimport java.util.UUID;\npublic class RedirectedURL {\n- public static final String PERSONAL_DEPLOYMENT_PREFIX = \"user-copy-\";\n+\npublic static final String COOKIE_NAME = \"modelix-mps-instance\";\npublic static RedirectedURL redirect(@Nullable Request baseRequest, HttpServletRequest request) {\n@@ -51,22 +51,26 @@ public class RedirectedURL {\n}\nif (cookieValue == null) {\n- return new RedirectedURL(remainingPath, originalDeploymentName ,null);\n+ return new RedirectedURL(remainingPath, originalDeploymentName ,null, null);\n}\n- String personalDeploymentName = PERSONAL_DEPLOYMENT_PREFIX + originalDeploymentName + \"-\" + cookieValue;\n- return new RedirectedURL(remainingPath, originalDeploymentName, personalDeploymentName);\n+ return new RedirectedURL(remainingPath, originalDeploymentName, null, cookieValue);\n}\npublic final String remainingPath;\npublic final String originalDeploymentName;\n- public final String personalDeploymentName;\n+ public String personalDeploymentName;\n+ public final String userId;\n- public RedirectedURL(String remainingPath, String originalDeploymentName, String personalDeploymentName) {\n+ public RedirectedURL(String remainingPath, String originalDeploymentName, String personalDeploymentName, String userId) {\nthis.remainingPath = remainingPath;\nthis.originalDeploymentName = originalDeploymentName;\nthis.personalDeploymentName = personalDeploymentName;\n- System.out.println(\"Redirect: \" + remainingPath + \" # \" + originalDeploymentName + \" # \" + personalDeploymentName + \" # \" + getRedirectedUrl(false));\n+ this.userId = userId;\n+ }\n+\n+ public void noPersonalDeployment() {\n+ personalDeploymentName = null;\n}\npublic String getRedirectedUrl(boolean websocket) {\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Start one more MPS instance than required so that new users don't have to wait
There is always a fresh MPS instance waiting for a user that is assigned
to him on first access. Then a new instance is started for the next user. |
426,496 | 03.12.2021 16:56:07 | -3,600 | b87eae27f79731732bcadfd4c7d9ef71eb07dd2a | First unassigned instance wasn't started
The manager was started on the first HTTP request. There wasn't an MPS
instance waiting for the first user. For any following user it worked. | [
{
"change_type": "MODIFY",
"old_path": "instances-manager/src/main/java/org/modelix/instancesmanager/DeploymentManager.java",
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/DeploymentManager.java",
"diff": "@@ -21,6 +21,7 @@ import io.kubernetes.client.openapi.apis.AppsV1Api;\nimport io.kubernetes.client.openapi.apis.CoreV1Api;\nimport io.kubernetes.client.openapi.models.V1Deployment;\nimport io.kubernetes.client.openapi.models.V1DeploymentList;\n+import io.kubernetes.client.openapi.models.V1ObjectMeta;\nimport io.kubernetes.client.openapi.models.V1Pod;\nimport io.kubernetes.client.openapi.models.V1PodList;\nimport io.kubernetes.client.openapi.models.V1Service;\n@@ -83,6 +84,8 @@ public class DeploymentManager {\n} catch (IOException e) {\nthrow new RuntimeException(e);\n}\n+ init();\n+ reconcileDeployments();\ncleanupThread.start();\n}\n@@ -94,27 +97,41 @@ public class DeploymentManager {\nreturn PERSONAL_DEPLOYMENT_PREFIX + originalDeploymentName + \"-\" + managerId + \"-\" + deploymentSuffixSequence.incrementAndGet();\n}\n+ private void init() {\n+ AppsV1Api appsApi = new AppsV1Api();\n+ V1DeploymentList deployments = null;\n+ try {\n+ deployments = appsApi.listNamespacedDeployment(KUBERNETES_NAMESPACE, null, null, null, null, null, null, null, null, null);\n+ for (V1Deployment deployment : deployments.getItems()) {\n+ V1ObjectMeta metadata = deployment.getMetadata();\n+ if (metadata == null) continue;\n+ Map<String, String> annotations = metadata.getAnnotations();\n+ if (annotations == null) continue;\n+ if (\"true\".equals(annotations.get(INSTANCE_PER_USER_ANNOTATION_KEY))) {\n+ getAssignments(metadata.getName()).setNumberOfUnassigned(deployment);\n+ }\n+ }\n+ } catch (ApiException e) {\n+ LOG.error(\"\", e);\n+ }\n+ }\n+\npublic RedirectedURL redirect(@Nullable Request baseRequest, HttpServletRequest request) {\nRedirectedURL redirected = RedirectedURL.redirect(baseRequest, request);\nif (redirected == null) return null;\n+ if (redirected.userId == null) return redirected;\ntry {\nV1Deployment originalDeployment = getDeployment(redirected.originalDeploymentName, 3);\n- boolean isInstancePerUser = \"true\".equals(originalDeployment.getMetadata().getAnnotations().get(INSTANCE_PER_USER_ANNOTATION_KEY));\n+ V1ObjectMeta metadata = originalDeployment.getMetadata();\n+ Map<String, String> annotations = metadata != null ? metadata.getAnnotations() : null;\n+ boolean isInstancePerUser = annotations != null && \"true\".equals(annotations.get(INSTANCE_PER_USER_ANNOTATION_KEY));\nif (!isInstancePerUser) {\n- redirected.noPersonalDeployment();\n+ return null;\n} else {\nAssignments assignments = getAssignments(redirected.originalDeploymentName);\nredirected.personalDeploymentName = assignments.getOrCreate(redirected.userId);\n-\n- int maxUnassignedInstances = 1;\n- try {\n- String maxUnassignedInstancesStr = originalDeployment.getMetadata().getAnnotations().get(MAX_UNASSIGNED_INSTANCES_ANNOTATION_KEY);\n- if (maxUnassignedInstancesStr != null) {\n- maxUnassignedInstances = Integer.parseInt(maxUnassignedInstancesStr);\n- }\n- } catch (NumberFormatException e) {}\n- assignments.setNumberOfUnassigned(Math.max(0, maxUnassignedInstances));\n+ assignments.setNumberOfUnassigned(originalDeployment);\nreconcileIfDirty();\n}\n@@ -160,10 +177,11 @@ public class DeploymentManager {\n}\nfor (String d : toAdd) {\n+ String originalDeploymentName = expectedDeployments.get(d);\ntry {\n- createDeployment(expectedDeployments.get(d), d);\n- } catch (IOException e) {\n- LOG.error(\"Failed to create deployment \" + d, e);\n+ createDeployment(originalDeploymentName, d);\n+ } catch (Exception e) {\n+ LOG.error(\"Failed to create deployment \" + originalDeploymentName + \" / \" + d, e);\n}\n}\n} catch (ApiException e) {\n@@ -230,6 +248,8 @@ public class DeploymentManager {\ndeployment.getMetadata().resourceVersion(null);\ndeployment.setStatus(null);\ndeployment.getMetadata().putAnnotationsItem(\"kubectl.kubernetes.io/last-applied-configuration\", null);\n+ deployment.getMetadata().putAnnotationsItem(INSTANCE_PER_USER_ANNOTATION_KEY, null);\n+ deployment.getMetadata().putAnnotationsItem(MAX_UNASSIGNED_INSTANCES_ANNOTATION_KEY, null);\ndeployment.getMetadata().name(personalDeploymentName);\ndeployment.getMetadata().putLabelsItem(\"app\", personalDeploymentName);\n@@ -306,6 +326,23 @@ public class DeploymentManager {\n}\n}\n+ public void setNumberOfUnassigned(V1Deployment deployment) {\n+ int maxUnassignedInstances = 1;\n+ try {\n+ V1ObjectMeta metadata = deployment.getMetadata();\n+ if (metadata != null) {\n+ Map<String, String> annotations = metadata.getAnnotations();\n+ if (annotations != null) {\n+ String maxUnassignedInstancesStr = annotations.get(MAX_UNASSIGNED_INSTANCES_ANNOTATION_KEY);\n+ if (maxUnassignedInstancesStr != null) {\n+ maxUnassignedInstances = Integer.parseInt(maxUnassignedInstancesStr);\n+ }\n+ }\n+ }\n+ } catch (NumberFormatException e) {}\n+ setNumberOfUnassigned(Math.max(0, maxUnassignedInstances));\n+ }\n+\npublic synchronized List<String> getAllDeploymentNames() {\nreturn Stream.concat(\nuserId2deployment.values().stream(),\n"
},
{
"change_type": "MODIFY",
"old_path": "instances-manager/src/main/java/org/modelix/instancesmanager/Main.java",
"new_path": "instances-manager/src/main/java/org/modelix/instancesmanager/Main.java",
"diff": "@@ -132,5 +132,8 @@ public class Main {\n}\n}\n});\n+\n+ // Trigger creation of the instance so that it starts the first MPS instance\n+ DeploymentManager.INSTANCE.toString();\n}\n}\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | First unassigned instance wasn't started
The manager was started on the first HTTP request. There wasn't an MPS
instance waiting for the first user. For any following user it worked. |
426,496 | 05.12.2021 11:06:17 | -3,600 | ba5e69602e0368c7e108a1980791add5398694b7 | Projector deployment now has 0 replicas
It's only used as a template for user specific copies. | [
{
"change_type": "MODIFY",
"old_path": "kubernetes-use-latest-tag.sh",
"new_path": "kubernetes-use-latest-tag.sh",
"diff": "@@ -9,6 +9,7 @@ sed -i.bak -E \"s/(image:.*:).*/\\1${TAG}/\" kubernetes/common/proxy-deployment.yam\nsed -i.bak -E \"s/(image:.*:).*/\\1${TAG}/\" kubernetes/common/ui-deployment.yaml\nsed -i.bak -E \"s/(image:.*:).*/\\1${TAG}/\" kubernetes/common/projector-deployment.yaml\nsed -i.bak -E \"s/(image:.*:).*/\\1${TAG}/\" kubernetes/common/uiproxy-deployment.yaml\n+sed -i.bak -E \"s/(image:.*:).*/\\1${TAG}/\" kubernetes/common/instances-manager-deployment.yaml\nrm kubernetes/local/db-deployment.yaml.bak\nrm kubernetes/common/model-deployment.yaml.bak\n@@ -16,3 +17,4 @@ rm kubernetes/common/proxy-deployment.yaml.bak\nrm kubernetes/common/ui-deployment.yaml.bak\nrm kubernetes/common/projector-deployment.yaml.bak\nrm kubernetes/common/uiproxy-deployment.yaml.bak\n+rm kubernetes/common/instances-manager-deployment.yaml.bak\n"
},
{
"change_type": "MODIFY",
"old_path": "kubernetes/common/instances-manager-deployment.yaml",
"new_path": "kubernetes/common/instances-manager-deployment.yaml",
"diff": "@@ -17,22 +17,22 @@ spec:\napp: instances-manager\ntemplate:\nmetadata:\n- creationTimestamp: null\nlabels:\napp: instances-manager\nspec:\nserviceAccountName: uiproxy\ncontainers:\n- - image: modelix/modelix-instances-manager:0.0.67\n+ - image: modelix/modelix-instances-manager:0.0.72\nimagePullPolicy: IfNotPresent\nname: instances-manager\nports:\n- containerPort: 33332\n+ - containerPort: 5005\nresources:\nrequests:\n- memory: \"100Mi\"\n+ memory: \"300Mi\"\ncpu: \"0.1\"\nlimits:\n- memory: \"200Mi\"\n+ memory: \"500Mi\"\ncpu: \"1.0\"\nrestartPolicy: Always\n"
},
{
"change_type": "MODIFY",
"old_path": "kubernetes/common/instances-manager-service.yaml",
"new_path": "kubernetes/common/instances-manager-service.yaml",
"diff": "@@ -10,5 +10,8 @@ spec:\n- name: \"33332\"\nport: 33332\ntargetPort: 33332\n+ - name: \"jvm-debug\"\n+ port: 5005\n+ targetPort: 5005\nselector:\napp: instances-manager\n"
},
{
"change_type": "MODIFY",
"old_path": "kubernetes/common/model-deployment.yaml",
"new_path": "kubernetes/common/model-deployment.yaml",
"diff": "@@ -27,7 +27,7 @@ spec:\n- env:\n- name: jdbc_url\nvalue: jdbc:postgresql://db:5432/\n- image: modelix/modelix-model:0.0.67\n+ image: modelix/modelix-model:0.0.72\nimagePullPolicy: IfNotPresent\nname: model\nports:\n"
},
{
"change_type": "MODIFY",
"old_path": "kubernetes/common/projector-deployment.yaml",
"new_path": "kubernetes/common/projector-deployment.yaml",
"diff": "@@ -2,12 +2,14 @@ apiVersion: apps/v1\nkind: Deployment\nmetadata:\nannotations:\n+ instance-per-user: true\n+ max-unassigned-instances: 1\nlabels:\napp: projector\nname: projector\nspec:\nrevisionHistoryLimit: 5\n- replicas: 1\n+ replicas: 0\nstrategy:\ntype: RollingUpdate\nrollingUpdate:\n@@ -23,7 +25,7 @@ spec:\nspec:\ncontainers:\n- name: projector\n- image: modelix/modelix-projector:0.0.67\n+ image: modelix/modelix-projector:0.0.72\nimagePullPolicy: IfNotPresent\nenv:\n- name: \"MODEL_URI\"\n"
},
{
"change_type": "MODIFY",
"old_path": "kubernetes/common/proxy-deployment.yaml",
"new_path": "kubernetes/common/proxy-deployment.yaml",
"diff": "@@ -25,7 +25,7 @@ spec:\nspec:\ncontainers:\n- name: proxy\n- image: modelix/modelix-proxy:0.0.67\n+ image: modelix/modelix-proxy:0.0.72\nimagePullPolicy: IfNotPresent\nenv:\nports:\n"
},
{
"change_type": "MODIFY",
"old_path": "kubernetes/common/ui-deployment.yaml",
"new_path": "kubernetes/common/ui-deployment.yaml",
"diff": "@@ -25,7 +25,7 @@ spec:\nspec:\ncontainers:\n- name: ui\n- image: modelix/modelix-ui:0.0.67\n+ image: modelix/modelix-ui:0.0.72\nimagePullPolicy: IfNotPresent\nenv:\n- name: MODEL_URI\n"
},
{
"change_type": "MODIFY",
"old_path": "kubernetes/common/uiproxy-deployment.yaml",
"new_path": "kubernetes/common/uiproxy-deployment.yaml",
"diff": "@@ -23,7 +23,7 @@ spec:\nspec:\nserviceAccountName: uiproxy\ncontainers:\n- - image: modelix/modelix-uiproxy:0.0.67\n+ - image: modelix/modelix-uiproxy:0.0.72\nimagePullPolicy: IfNotPresent\nname: uiproxy\nports:\n"
},
{
"change_type": "MODIFY",
"old_path": "kubernetes/local/db-deployment.yaml",
"new_path": "kubernetes/local/db-deployment.yaml",
"diff": "@@ -29,7 +29,7 @@ spec:\nvalue: modelix\n- name: PGDATA\nvalue: /var/lib/postgresql/data/pgdata\n- image: modelix/modelix-db:0.0.67\n+ image: modelix/modelix-db:0.0.72\nimagePullPolicy: IfNotPresent\nname: db\nresources: {}\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Projector deployment now has 0 replicas
It's only used as a template for user specific copies. |
426,496 | 05.12.2021 13:41:48 | -3,600 | 508b48111667da36697e7f9f075c2a47acf9f35a | Super concept references were not synchronized to the model server | [
{
"change_type": "MODIFY",
"old_path": "model-client/src/commonMain/kotlin/org/modelix/model/metameta/MetaMetaLanguage.kt",
"new_path": "model-client/src/commonMain/kotlin/org/modelix/model/metameta/MetaMetaLanguage.kt",
"diff": "@@ -46,9 +46,9 @@ object MetaMetaLanguage {\n.addProperty(property_ChildLink_optional)\n.addReferenceLink(referenceLink_ChildLink_childConcept)\n- val reference_ConceptReference_concept = SimpleReferenceLink(\"concept\", false, concept_Concept)\n+ val referenceLink_ConceptReference_concept = SimpleReferenceLink(\"concept\", false, concept_Concept)\nval concept_ConceptReference = SimpleConcept(\"ConceptReference\", false, listOf(concept_IHasUID))\n- .addReferenceLink(reference_ConceptReference_concept)\n+ .addReferenceLink(referenceLink_ConceptReference_concept)\nval property_ReferenceLink_name = SimpleProperty(\"name\")\nval property_ReferenceLink_optional = SimpleProperty(\"optional\")\n"
},
{
"change_type": "MODIFY",
"old_path": "model-client/src/commonMain/kotlin/org/modelix/model/metameta/MetaModelSynchronizer.kt",
"new_path": "model-client/src/commonMain/kotlin/org/modelix/model/metameta/MetaModelSynchronizer.kt",
"diff": "@@ -154,6 +154,16 @@ class MetaModelSynchronizer(val branch: IBranch) {\nwt.setProperty(id, MetaMetaLanguage.property_Concept_name.name, concept.getShortName())\nwt.setProperty(id, MetaMetaLanguage.property_Concept_abstract.name, concept.isAbstract().toString())\n+ pendingReferences += {\n+ for (superConcept in concept.getDirectSuperConcepts()) {\n+ val superRef = wt.addNewChild(id, MetaMetaLanguage.childLink_Concept_superConcepts.name, -1, MetaMetaLanguage.concept_ConceptReference)\n+ val superConceptId = it.getConceptId(superConcept)\n+ if (superConceptId != null) {\n+ wt.setReferenceTarget(superRef, MetaMetaLanguage.referenceLink_ConceptReference_concept.name, LocalPNodeReference(superConceptId))\n+ }\n+ }\n+ }\n+\nfor (property in concept.getOwnProperties()) {\nstoreProperty(id, property, pendingReferences)\n}\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Super concept references were not synchronized to the model server |
426,496 | 05.12.2021 13:55:45 | -3,600 | 0ada9a5a28ba604fa5999dc6f0fb406389ec7510 | GraphQL: Include properties/links from super concepts in the schema | [
{
"change_type": "MODIFY",
"old_path": "graphql-server/src/main/kotlin/org/modelix/graphql/server/ModelixSchemaGenerator.kt",
"new_path": "graphql-server/src/main/kotlin/org/modelix/graphql/server/ModelixSchemaGenerator.kt",
"diff": "@@ -45,22 +45,24 @@ class ModelixSchemaGenerator(val tree: ITree) {\n.dataFetcher { env -> tree.getRole(env.getSource()) }\n}\n.apply {\n- for (property in tree.getChildren(conceptId, MetaMetaLanguage.childLink_Concept_properties.name)) {\n+ for (superConcept in collectSuperConcepts(conceptId)) {\n+ for (property in tree.getChildren(superConcept, MetaMetaLanguage.childLink_Concept_properties.name)) {\nfield { it.name(tree.getProperty(property, MetaMetaLanguage.property_Property_name.name)).type(Scalars.GraphQLString) }\n}\n- for (childLink in tree.getChildren(conceptId, MetaMetaLanguage.childLink_Concept_childLinks.name)) {\n+ for (childLink in tree.getChildren(superConcept, MetaMetaLanguage.childLink_Concept_childLinks.name)) {\nfield(generateField(\ntree.getProperty(childLink, MetaMetaLanguage.property_ChildLink_name.name),\ntree.getReferenceTarget(childLink, MetaMetaLanguage.referenceLink_ChildLink_childConcept.name)\n))\n}\n- for (referenceLink in tree.getChildren(conceptId, MetaMetaLanguage.childLink_Concept_referenceLinks.name)) {\n+ for (referenceLink in tree.getChildren(superConcept, MetaMetaLanguage.childLink_Concept_referenceLinks.name)) {\nfield(generateField(\ntree.getProperty(referenceLink, MetaMetaLanguage.property_ReferenceLink_name.name),\ntree.getReferenceTarget(referenceLink, MetaMetaLanguage.referenceLink_ReferenceLink_targetConcept.name)\n))\n}\n}\n+ }\n.build()\n}\n}\n@@ -124,4 +126,18 @@ class ModelixSchemaGenerator(val tree: ITree) {\n.type(targetType)\n.build()\n}\n+\n+ fun collectSuperConcepts(conceptId: Long, acc: MutableSet<Long> = HashSet()): Set<Long> {\n+ if (acc.contains(conceptId)) return acc;\n+ acc += conceptId;\n+\n+ for (superConceptRef in tree.getChildren(conceptId, MetaMetaLanguage.childLink_Concept_superConcepts.name)) {\n+ val superConcept = tree.getReferenceTarget(superConceptRef, MetaMetaLanguage.referenceLink_ConceptReference_concept.name)\n+ if (superConcept is PNodeReference) {\n+ collectSuperConcepts(superConcept.id, acc)\n+ }\n+ }\n+\n+ return acc\n+ }\n}\n\\ No newline at end of file\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | GraphQL: Include properties/links from super concepts in the schema |
426,496 | 05.12.2021 22:49:28 | -3,600 | cb82820b3eacf6b885b0bb7454b13a1ec57702fd | GraphQL: Concept hierarchy implemented with GraphQL interfaces
Also added a generic "getProperty" query to the concept types.
This allows queries like this:
... on jetbrains_mps_baseLanguage_ClassConcept {
name: getProperty(name: "name")
} | [
{
"change_type": "MODIFY",
"old_path": "graphql-server/src/main/kotlin/org/modelix/graphql/server/ModelixSchemaGenerator.kt",
"new_path": "graphql-server/src/main/kotlin/org/modelix/graphql/server/ModelixSchemaGenerator.kt",
"diff": "@@ -17,18 +17,21 @@ package org.modelix.graphql.server\nimport graphql.Scalars\nimport graphql.schema.*\n-import org.modelix.model.api.INodeReference\n-import org.modelix.model.api.ITree\n-import org.modelix.model.api.PNodeReference\n-import org.modelix.model.api.SimpleConcept\n+import org.modelix.model.api.*\nimport org.modelix.model.metameta.MetaMetaLanguage\nimport org.modelix.model.metameta.MetaModelIndex\nimport org.modelix.model.metameta.PersistedConcept\nclass ModelixSchemaGenerator(val tree: ITree) {\nprivate val conceptTypes = HashMap<Long, GraphQLObjectType>()\n+ private val interfaceTypes = HashMap<Long, GraphQLInterfaceType>()\n+ private val iBaseConcept = GraphQLInterfaceType.newInterface()\n+ .name(\"BaseConcept\")\n+ .field { it.name(\"role\").type(Scalars.GraphQLString) }\n+ .build()\nprivate val baseConcept = GraphQLObjectType.newObject()\n.name(\"BaseConcept\")\n+ .withInterface(iBaseConcept)\n.field { it.name(\"_modelix_id\").type(Scalars.GraphQLString) }\n.build()\n@@ -36,30 +39,72 @@ class ModelixSchemaGenerator(val tree: ITree) {\nfor (languageId in tree.getChildren(ITree.ROOT_ID, MetaModelIndex.LANGUAGES_ROLE)) {\nfor (conceptId in tree.getChildren(languageId, MetaMetaLanguage.childLink_Language_concepts.name)) {\nval fqName = getConceptFqName(conceptId)\n+\n+ interfaceTypes[conceptId] = GraphQLInterfaceType.newInterface()\n+ .name(\"I_$fqName\")\n+// .apply {\n+// for (superConcept in collectSuperConcepts(conceptId)) {\n+// if (superConcept == conceptId) continue\n+// withInterface(GraphQLTypeReference(\"I_\" + getConceptFqName(superConcept)))\n+// }\n+// }\n+ .field { it\n+ .name(\"role\")\n+ .type(Scalars.GraphQLString)\n+ }\n+ .build()\n+\nconceptTypes[conceptId] = GraphQLObjectType.newObject()\n.name(fqName)\n- .field { it.name(\"_modelix_id\").type(Scalars.GraphQLString) }\n+ .apply {\n+ for (superConcept in collectSuperConcepts(conceptId)) {\n+ withInterface(GraphQLTypeReference(\"I_\" + getConceptFqName(superConcept)))\n+ }\n+ }\n+ .withInterface(iBaseConcept)\n+ .field { it.name(\"_modelix_id\").type(Scalars.GraphQLID).dataFetcher { env -> env.getSource<Long>().toString() } }\n.field { it\n.name(\"role\")\n.type(Scalars.GraphQLString)\n.dataFetcher { env -> tree.getRole(env.getSource()) }\n}\n+ .field {\n+ it\n+ .name(\"getProperty\")\n+ .type(Scalars.GraphQLString)\n+ .argument { it.name(\"name\").type(Scalars.GraphQLString) }\n+ .dataFetcher { env -> tree.getProperty(env.getSource(), env.getArgument(\"name\"))}\n+ }\n.apply {\nfor (superConcept in collectSuperConcepts(conceptId)) {\nfor (property in tree.getChildren(superConcept, MetaMetaLanguage.childLink_Concept_properties.name)) {\nfield { it.name(tree.getProperty(property, MetaMetaLanguage.property_Property_name.name)).type(Scalars.GraphQLString) }\n}\nfor (childLink in tree.getChildren(superConcept, MetaMetaLanguage.childLink_Concept_childLinks.name)) {\n+ val multiple = tree.getProperty(childLink, MetaMetaLanguage.property_ChildLink_multiple.name) == \"true\"\n+ val linkName = tree.getProperty(childLink, MetaMetaLanguage.property_ChildLink_name.name)\nfield(generateField(\n- tree.getProperty(childLink, MetaMetaLanguage.property_ChildLink_name.name),\n- tree.getReferenceTarget(childLink, MetaMetaLanguage.referenceLink_ChildLink_childConcept.name)\n- ))\n+ linkName,\n+ tree.getReferenceTarget(childLink, MetaMetaLanguage.referenceLink_ChildLink_childConcept.name),\n+ multiple\n+ ) { env ->\n+ tree.getChildren(env.getSource(), linkName).let {\n+ if (multiple) it.toList()\n+ else it.firstOrNull()\n+ }\n+ })\n}\nfor (referenceLink in tree.getChildren(superConcept, MetaMetaLanguage.childLink_Concept_referenceLinks.name)) {\n+ val linkName = tree.getProperty(referenceLink, MetaMetaLanguage.property_ReferenceLink_name.name)\n+ ?: continue\nfield(generateField(\n- tree.getProperty(referenceLink, MetaMetaLanguage.property_ReferenceLink_name.name),\n- tree.getReferenceTarget(referenceLink, MetaMetaLanguage.referenceLink_ReferenceLink_targetConcept.name)\n- ))\n+ linkName,\n+ tree.getReferenceTarget(referenceLink, MetaMetaLanguage.referenceLink_ReferenceLink_targetConcept.name),\n+ false\n+ ) { env -> tree.getReferenceTarget(env.getSource(), linkName)?.let {\n+ if (it is LocalPNodeReference) it.id else null\n+ }})\n+\n}\n}\n}\n@@ -94,14 +139,29 @@ class ModelixSchemaGenerator(val tree: ITree) {\n.dataFetcher { env -> tree.getAllChildren(ITree.ROOT_ID).filter { tree.getConcept(it) !is SimpleConcept } }\n})\n.also { schemaBuilder -> conceptTypes.values.sortedBy { it.name }.forEach { schemaBuilder.additionalType(it) } }\n+ .also { schemaBuilder -> interfaceTypes.values.sortedBy { it.name }.forEach { schemaBuilder.additionalType(it) } }\n.additionalType(anyType)\n.codeRegistry(GraphQLCodeRegistry.newCodeRegistry()\n// .defaultDataFetcher(fetcherFactory)\n- .typeResolver(\"Any\") { env ->\n+ .typeResolver(anyType) { env ->\n+ val nodeId = env.getObject() as Long\n+ val concept = tree.getConcept(nodeId) as PersistedConcept\n+ conceptTypes[concept.id]\n+ }\n+ .typeResolver(iBaseConcept) { env ->\n+ val nodeId = env.getObject() as Long\n+ val concept = tree.getConcept(nodeId) as PersistedConcept\n+ conceptTypes[concept.id]\n+ }\n+ .apply {\n+ for (interfaceType in interfaceTypes) {\n+ typeResolver(interfaceType.value) { env ->\nval nodeId = env.getObject() as Long\nval concept = tree.getConcept(nodeId) as PersistedConcept\nconceptTypes[concept.id]\n}\n+ }\n+ }\n.build())\n.build()\n}\n@@ -115,15 +175,18 @@ class ModelixSchemaGenerator(val tree: ITree) {\nfun toValidName(name: String) = name.replace(\"[^_0-9A-Za-z]\".toRegex(), \"_\")\n- fun generateField(name: String?, targetConcept: INodeReference?): GraphQLFieldDefinition {\n+ fun generateField(name: String?, targetConcept: INodeReference?, multiple: Boolean, fetcher: DataFetcher<*>): GraphQLFieldDefinition {\nval targetType = if (targetConcept is PNodeReference) {\nGraphQLTypeReference.typeRef(getConceptFqName(targetConcept.id))\n} else {\n- baseConcept\n+ iBaseConcept\n}\n+ val fieldType = if (multiple) GraphQLList.list(GraphQLNonNull.nonNull(targetType)) else targetType\n+\nreturn GraphQLFieldDefinition.newFieldDefinition()\n.name(name)\n- .type(targetType)\n+ .type(fieldType)\n+ .dataFetcher(fetcher)\n.build()\n}\n@@ -131,13 +194,15 @@ class ModelixSchemaGenerator(val tree: ITree) {\nif (acc.contains(conceptId)) return acc;\nacc += conceptId;\n- for (superConceptRef in tree.getChildren(conceptId, MetaMetaLanguage.childLink_Concept_superConcepts.name)) {\n- val superConcept = tree.getReferenceTarget(superConceptRef, MetaMetaLanguage.referenceLink_ConceptReference_concept.name)\n- if (superConcept is PNodeReference) {\n- collectSuperConcepts(superConcept.id, acc)\n- }\n- }\n+ directSuperConcepts(conceptId).forEach { collectSuperConcepts(it, acc) }\nreturn acc\n}\n+\n+ fun directSuperConcepts(conceptId: Long): List<Long> {\n+ return tree.getChildren(conceptId, MetaMetaLanguage.childLink_Concept_superConcepts.name)\n+ .map { tree.getReferenceTarget(it, MetaMetaLanguage.referenceLink_ConceptReference_concept.name) }\n+ .filterIsInstance<PNodeReference>()\n+ .map { it.id }\n+ }\n}\n\\ No newline at end of file\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | GraphQL: Concept hierarchy implemented with GraphQL interfaces
Also added a generic "getProperty" query to the concept types.
This allows queries like this:
... on jetbrains_mps_baseLanguage_ClassConcept {
name: getProperty(name: "name")
} |
426,496 | 06.12.2021 12:25:44 | -3,600 | 871aef4dd6fc9c118a2428e82bdaa8d9464415a9 | Don't show the migration wizard when first starting projector
It was shown because there are some outdated language version in the
module descriptor. They are now also updated during synchronization.
There are now no popups or messages anymore that the user has to close. | [
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"diff": "</node>\n</node>\n</node>\n+ <node concept=\"3clFbH\" id=\"7z1ex5oQuZN\" role=\"3cqZAp\" />\n+ <node concept=\"3J1_TO\" id=\"7z1ex5oQOkC\" role=\"3cqZAp\">\n+ <node concept=\"3uVAMA\" id=\"7z1ex5oQOt4\" role=\"1zxBo5\">\n+ <node concept=\"XOnhg\" id=\"7z1ex5oQOt5\" role=\"1zc67B\">\n+ <property role=\"TrG5h\" value=\"ex\" />\n+ <node concept=\"nSUau\" id=\"7z1ex5oQOt6\" role=\"1tU5fm\">\n+ <node concept=\"3uibUv\" id=\"7z1ex5oQOOs\" role=\"nSUat\">\n+ <ref role=\"3uigEE\" to=\"wyt6:~Exception\" resolve=\"Exception\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbS\" id=\"7z1ex5oQOt7\" role=\"1zc67A\">\n+ <node concept=\"RRSsy\" id=\"7z1ex5oQQDE\" role=\"3cqZAp\">\n+ <property role=\"RRSoG\" value=\"gZ5fh_4/error\" />\n+ <node concept=\"3cpWs3\" id=\"7z1ex5oQRju\" role=\"RRSoy\">\n+ <node concept=\"2OqwBi\" id=\"7z1ex5oQTS9\" role=\"3uHU7w\">\n+ <node concept=\"2OqwBi\" id=\"7z1ex5oQS$i\" role=\"2Oq$k0\">\n+ <node concept=\"37vLTw\" id=\"7z1ex5oQRIz\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"4_k_9wJ_0fJ\" resolve=\"model\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"7z1ex5oQTKy\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"mhbf:~SModel.getName()\" resolve=\"getName\" />\n+ </node>\n+ </node>\n+ <node concept=\"liA8E\" id=\"7z1ex5oQVa_\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"mhbf:~SModelName.getValue()\" resolve=\"getValue\" />\n+ </node>\n+ </node>\n+ <node concept=\"Xl_RD\" id=\"7z1ex5oQQDG\" role=\"3uHU7B\">\n+ <property role=\"Xl_RC\" value=\"Failed to update language version after change in model \" />\n+ </node>\n+ </node>\n+ <node concept=\"37vLTw\" id=\"7z1ex5oQQRF\" role=\"RRSow\">\n+ <ref role=\"3cqZAo\" node=\"7z1ex5oQOt5\" resolve=\"ex\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbS\" id=\"7z1ex5oQOkE\" role=\"1zxBo7\">\n+ <node concept=\"3cpWs8\" id=\"7z1ex5oQzCT\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"7z1ex5oQzCU\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"projects\" />\n+ <node concept=\"_YKpA\" id=\"7z1ex5oQzOv\" role=\"1tU5fm\">\n+ <node concept=\"3uibUv\" id=\"7z1ex5oQzOx\" role=\"_ZDj9\">\n+ <ref role=\"3uigEE\" to=\"z1c3:~Project\" resolve=\"Project\" />\n+ </node>\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"7z1ex5oQzCV\" role=\"33vP2m\">\n+ <node concept=\"2YIFZM\" id=\"7z1ex5oQzCW\" role=\"2Oq$k0\">\n+ <ref role=\"37wK5l\" to=\"z1c3:~ProjectManager.getInstance()\" resolve=\"getInstance\" />\n+ <ref role=\"1Pybhd\" to=\"z1c3:~ProjectManager\" resolve=\"ProjectManager\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"7z1ex5oQzCX\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"z1c3:~ProjectManager.getOpenedProjects()\" resolve=\"getOpenedProjects\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbJ\" id=\"7z1ex5oQ$kG\" role=\"3cqZAp\">\n+ <node concept=\"3clFbS\" id=\"7z1ex5oQ$kI\" role=\"3clFbx\">\n+ <node concept=\"3clFbF\" id=\"7z1ex5oQDIH\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"7z1ex5oQM1l\" role=\"3clFbG\">\n+ <node concept=\"2ShNRf\" id=\"7z1ex5oQDID\" role=\"2Oq$k0\">\n+ <node concept=\"1pGfFk\" id=\"7z1ex5oQFSZ\" role=\"2ShVmc\">\n+ <ref role=\"37wK5l\" to=\"6f4m:5gIiJF05pI8\" resolve=\"VersionFixer\" />\n+ <node concept=\"2OqwBi\" id=\"7z1ex5oQHhv\" role=\"37wK5m\">\n+ <node concept=\"37vLTw\" id=\"7z1ex5oQGjj\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"7z1ex5oQzCU\" resolve=\"projects\" />\n+ </node>\n+ <node concept=\"1uHKPH\" id=\"7z1ex5oQIxU\" role=\"2OqNvi\" />\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"7z1ex5oQKkk\" role=\"37wK5m\">\n+ <node concept=\"37vLTw\" id=\"7z1ex5oQIYh\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"4_k_9wJ_0fJ\" resolve=\"model\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"7z1ex5oQKOj\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"mhbf:~SModel.getModule()\" resolve=\"getModule\" />\n+ </node>\n+ </node>\n+ <node concept=\"3clFbT\" id=\"7z1ex5oQLRq\" role=\"37wK5m\">\n+ <property role=\"3clFbU\" value=\"true\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"liA8E\" id=\"7z1ex5oQNiz\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"6f4m:2V3ml1v0Uym\" resolve=\"updateImportVersions\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"7z1ex5oQ_FX\" role=\"3clFbw\">\n+ <node concept=\"37vLTw\" id=\"7z1ex5oQ$Cn\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"7z1ex5oQzCU\" resolve=\"projects\" />\n+ </node>\n+ <node concept=\"3GX2aA\" id=\"7z1ex5oQDkM\" role=\"2OqNvi\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n</node>\n<node concept=\"3cqZAl\" id=\"4_k_9wJ_0fG\" role=\"3clF45\" />\n<node concept=\"37vLTG\" id=\"4_k_9wJ_0fH\" role=\"3clF46\">\n</node>\n</node>\n<node concept=\"2tJIrI\" id=\"4_k_9wJgbPn\" role=\"jymVt\" />\n+ <node concept=\"2tJIrI\" id=\"7z1ex5oMI05\" role=\"jymVt\" />\n+ <node concept=\"3clFb_\" id=\"7z1ex5oMIWu\" role=\"jymVt\">\n+ <property role=\"TrG5h\" value=\"syncToMPS\" />\n+ <node concept=\"37vLTG\" id=\"7z1ex5oMIWv\" role=\"3clF46\">\n+ <property role=\"TrG5h\" value=\"tree\" />\n+ <node concept=\"3uibUv\" id=\"7z1ex5oMIWw\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"jks5:~ITree\" resolve=\"ITree\" />\n+ </node>\n+ </node>\n+ <node concept=\"3rvAFt\" id=\"7z1ex5oMIWx\" role=\"3clF45\">\n+ <node concept=\"3cpWsb\" id=\"7z1ex5oMIWy\" role=\"3rvQeY\" />\n+ <node concept=\"3uibUv\" id=\"7z1ex5oMIXS\" role=\"3rvSg0\">\n+ <ref role=\"3uigEE\" to=\"mhbf:~SModel\" resolve=\"SModel\" />\n+ </node>\n+ </node>\n+ <node concept=\"3Tm1VV\" id=\"7z1ex5oMIW$\" role=\"1B3o_S\" />\n+ <node concept=\"3clFbS\" id=\"7z1ex5oMIXT\" role=\"3clF47\">\n+ <node concept=\"3cpWs8\" id=\"7z1ex5oMO15\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"7z1ex5oMO16\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"result\" />\n+ <node concept=\"3rvAFt\" id=\"7z1ex5oMNj7\" role=\"1tU5fm\">\n+ <node concept=\"3cpWsb\" id=\"7z1ex5oMNjc\" role=\"3rvQeY\" />\n+ <node concept=\"3uibUv\" id=\"7z1ex5oMNjd\" role=\"3rvSg0\">\n+ <ref role=\"3uigEE\" to=\"mhbf:~SModel\" resolve=\"SModel\" />\n+ </node>\n+ </node>\n+ <node concept=\"3nyPlj\" id=\"7z1ex5oMO17\" role=\"33vP2m\">\n+ <ref role=\"37wK5l\" node=\"7ZZZU$ltJ7Z\" resolve=\"syncToMPS\" />\n+ <node concept=\"37vLTw\" id=\"7z1ex5oMO18\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"7z1ex5oMIWv\" resolve=\"tree\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbH\" id=\"7z1ex5oMLaO\" role=\"3cqZAp\" />\n+ <node concept=\"3cpWs8\" id=\"7z1ex5oMz6M\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"7z1ex5oMz6N\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"projects\" />\n+ <node concept=\"_YKpA\" id=\"7z1ex5oMziD\" role=\"1tU5fm\">\n+ <node concept=\"3uibUv\" id=\"7z1ex5oMziF\" role=\"_ZDj9\">\n+ <ref role=\"3uigEE\" to=\"z1c3:~Project\" resolve=\"Project\" />\n+ </node>\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"7z1ex5oMz6O\" role=\"33vP2m\">\n+ <node concept=\"2YIFZM\" id=\"7z1ex5oMz6P\" role=\"2Oq$k0\">\n+ <ref role=\"37wK5l\" to=\"z1c3:~ProjectManager.getInstance()\" resolve=\"getInstance\" />\n+ <ref role=\"1Pybhd\" to=\"z1c3:~ProjectManager\" resolve=\"ProjectManager\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"7z1ex5oMz6Q\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"z1c3:~ProjectManager.getOpenedProjects()\" resolve=\"getOpenedProjects\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbJ\" id=\"7z1ex5oON_F\" role=\"3cqZAp\">\n+ <node concept=\"3clFbS\" id=\"7z1ex5oON_H\" role=\"3clFbx\">\n+ <node concept=\"3clFbF\" id=\"7z1ex5oM4oJ\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"7z1ex5oMNcR\" role=\"3clFbG\">\n+ <node concept=\"2ShNRf\" id=\"7z1ex5oM4oF\" role=\"2Oq$k0\">\n+ <node concept=\"1pGfFk\" id=\"7z1ex5oMpfN\" role=\"2ShVmc\">\n+ <ref role=\"37wK5l\" to=\"6f4m:5gIiJF05pI8\" resolve=\"VersionFixer\" />\n+ <node concept=\"2OqwBi\" id=\"7z1ex5oM$Oa\" role=\"37wK5m\">\n+ <node concept=\"37vLTw\" id=\"7z1ex5oMzQc\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"7z1ex5oMz6N\" resolve=\"projects\" />\n+ </node>\n+ <node concept=\"1uHKPH\" id=\"7z1ex5oMAHh\" role=\"2OqNvi\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"7z1ex5oMMcF\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"7ZZZU$lwQdD\" resolve=\"module\" />\n+ </node>\n+ <node concept=\"3clFbT\" id=\"7z1ex5oMMZs\" role=\"37wK5m\">\n+ <property role=\"3clFbU\" value=\"true\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"liA8E\" id=\"7z1ex5oMNXt\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"6f4m:2V3ml1v0Uym\" resolve=\"updateImportVersions\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"7z1ex5oOPGY\" role=\"3clFbw\">\n+ <node concept=\"37vLTw\" id=\"7z1ex5oOOAH\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"7z1ex5oMz6N\" resolve=\"projects\" />\n+ </node>\n+ <node concept=\"3GX2aA\" id=\"7z1ex5oOTeN\" role=\"2OqNvi\" />\n+ </node>\n+ </node>\n+ <node concept=\"3clFbH\" id=\"7z1ex5oMOZ5\" role=\"3cqZAp\" />\n+ <node concept=\"3cpWs6\" id=\"7z1ex5oMPq7\" role=\"3cqZAp\">\n+ <node concept=\"37vLTw\" id=\"7z1ex5oMPq9\" role=\"3cqZAk\">\n+ <ref role=\"3cqZAo\" node=\"7z1ex5oMO16\" resolve=\"result\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"2AHcQZ\" id=\"7z1ex5oMIXU\" role=\"2AJF6D\">\n+ <ref role=\"2AI5Lk\" to=\"wyt6:~Override\" resolve=\"Override\" />\n+ </node>\n+ </node>\n</node>\n<node concept=\"312cEu\" id=\"4_k_9wJm9Lz\">\n<property role=\"TrG5h\" value=\"ProjectModulesSynchronizer\" />\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Don't show the migration wizard when first starting projector
It was shown because there are some outdated language version in the
module descriptor. They are now also updated during synchronization.
There are now no popups or messages anymore that the user has to close. |
426,496 | 06.12.2021 16:24:36 | -3,600 | 42daaf5b6ff8ecf4988e27375a6dbdf366da262c | Update model imports after synchronization
References to nodes in other models were showing an error, because
the model and module dependencies were missing. | [
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"diff": "<node concept=\"3Tmbuc\" id=\"4_k_9wJ_0dk\" role=\"1B3o_S\" />\n<node concept=\"_YKpA\" id=\"4_k_9wJ_0dl\" role=\"1tU5fm\">\n<node concept=\"1ajhzC\" id=\"4_k_9wJ_0dm\" role=\"_ZDj9\">\n- <node concept=\"3cqZAl\" id=\"4_k_9wJ_0dn\" role=\"1ajl9A\" />\n+ <node concept=\"3uibUv\" id=\"7z1ex5oUd3S\" role=\"1ajl9A\">\n+ <ref role=\"3uigEE\" to=\"mhbf:~SNode\" resolve=\"SNode\" />\n+ </node>\n</node>\n</node>\n<node concept=\"2ShNRf\" id=\"4_k_9wJ_0do\" role=\"33vP2m\">\n<node concept=\"Tc6Ow\" id=\"4_k_9wJ_0dp\" role=\"2ShVmc\">\n<node concept=\"1ajhzC\" id=\"4_k_9wJ_0dq\" role=\"HW$YZ\">\n- <node concept=\"3cqZAl\" id=\"4_k_9wJ_0dr\" role=\"1ajl9A\" />\n+ <node concept=\"3uibUv\" id=\"7z1ex5oUjaQ\" role=\"1ajl9A\">\n+ <ref role=\"3uigEE\" to=\"mhbf:~SNode\" resolve=\"SNode\" />\n+ </node>\n</node>\n</node>\n</node>\n</node>\n</node>\n</node>\n- <node concept=\"3clFbF\" id=\"4_k_9wJ_0uk\" role=\"3cqZAp\">\n- <node concept=\"2OqwBi\" id=\"4_k_9wJ_0ul\" role=\"3clFbG\">\n- <node concept=\"37vLTw\" id=\"4_k_9wJ_0um\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"4_k_9wJ_0sj\" resolve=\"node\" />\n+ <node concept=\"3cpWs8\" id=\"7z1ex5oTNHt\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"7z1ex5oTNHu\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"link\" />\n+ <node concept=\"3uibUv\" id=\"7z1ex5oTNjN\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"c17a:~SReferenceLink\" resolve=\"SReferenceLink\" />\n</node>\n- <node concept=\"liA8E\" id=\"4_k_9wJ_0un\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"mhbf:~SNode.setReferenceTarget(org.jetbrains.mps.openapi.language.SReferenceLink,org.jetbrains.mps.openapi.model.SNode)\" resolve=\"setReferenceTarget\" />\n- <node concept=\"1rXfSq\" id=\"4_k_9wJ_0uo\" role=\"37wK5m\">\n+ <node concept=\"1rXfSq\" id=\"7z1ex5oTNHv\" role=\"33vP2m\">\n<ref role=\"37wK5l\" node=\"4_k_9wJ_0BF\" resolve=\"findReferenceLink\" />\n- <node concept=\"2OqwBi\" id=\"4_k_9wJ_0up\" role=\"37wK5m\">\n- <node concept=\"37vLTw\" id=\"4_k_9wJ_0uq\" role=\"2Oq$k0\">\n+ <node concept=\"2OqwBi\" id=\"7z1ex5oTNHw\" role=\"37wK5m\">\n+ <node concept=\"37vLTw\" id=\"7z1ex5oTNHx\" role=\"2Oq$k0\">\n<ref role=\"3cqZAo\" node=\"4_k_9wJ_0sj\" resolve=\"node\" />\n</node>\n- <node concept=\"liA8E\" id=\"4_k_9wJ_0ur\" role=\"2OqNvi\">\n+ <node concept=\"liA8E\" id=\"7z1ex5oTNHy\" role=\"2OqNvi\">\n<ref role=\"37wK5l\" to=\"mhbf:~SNode.getConcept()\" resolve=\"getConcept\" />\n</node>\n</node>\n- <node concept=\"37vLTw\" id=\"4_k_9wJ_0us\" role=\"37wK5m\">\n+ <node concept=\"37vLTw\" id=\"7z1ex5oTNHz\" role=\"37wK5m\">\n<ref role=\"3cqZAo\" node=\"4_k_9wJ_0rP\" resolve=\"role\" />\n</node>\n</node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbF\" id=\"4_k_9wJ_0uk\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"4_k_9wJ_0ul\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"4_k_9wJ_0um\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"4_k_9wJ_0sj\" resolve=\"node\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"4_k_9wJ_0un\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"mhbf:~SNode.setReferenceTarget(org.jetbrains.mps.openapi.language.SReferenceLink,org.jetbrains.mps.openapi.model.SNode)\" resolve=\"setReferenceTarget\" />\n+ <node concept=\"37vLTw\" id=\"7z1ex5oTNH$\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"7z1ex5oTNHu\" resolve=\"link\" />\n+ </node>\n<node concept=\"37vLTw\" id=\"4_k_9wJ_0ut\" role=\"37wK5m\">\n<ref role=\"3cqZAo\" node=\"4_k_9wJ_0tm\" resolve=\"targetSNode\" />\n</node>\n</node>\n</node>\n</node>\n+ <node concept=\"3cpWs6\" id=\"7z1ex5oTK7v\" role=\"3cqZAp\">\n+ <node concept=\"37vLTw\" id=\"7z1ex5oUnbu\" role=\"3cqZAk\">\n+ <ref role=\"3cqZAo\" node=\"4_k_9wJ_0tm\" resolve=\"targetSNode\" />\n+ </node>\n+ </node>\n</node>\n</node>\n</node>\n</node>\n</node>\n</node>\n+ <node concept=\"3cpWs6\" id=\"7z1ex5oU0GK\" role=\"3cqZAp\">\n+ <node concept=\"10QFUN\" id=\"7z1ex5oWf5r\" role=\"3cqZAk\">\n+ <node concept=\"10Nm6u\" id=\"7z1ex5oWf5q\" role=\"10QFUP\" />\n+ <node concept=\"3uibUv\" id=\"7z1ex5oWian\" role=\"10QFUM\">\n+ <ref role=\"3uigEE\" to=\"mhbf:~SNode\" resolve=\"SNode\" />\n+ </node>\n+ </node>\n+ </node>\n</node>\n</node>\n</node>\n<node concept=\"3cqZAl\" id=\"4_k_9wJ_0K9\" role=\"3clF45\" />\n<node concept=\"3Tmbuc\" id=\"4_k_9wJ_0Ka\" role=\"1B3o_S\" />\n<node concept=\"3clFbS\" id=\"4_k_9wJ_0Kb\" role=\"3clF47\">\n+ <node concept=\"3cpWs8\" id=\"7z1ex5oUrZj\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"7z1ex5oUrZm\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"targetModels\" />\n+ <node concept=\"2hMVRd\" id=\"7z1ex5oUrZf\" role=\"1tU5fm\">\n+ <node concept=\"3uibUv\" id=\"7z1ex5oUs_i\" role=\"2hN53Y\">\n+ <ref role=\"3uigEE\" to=\"mhbf:~SModel\" resolve=\"SModel\" />\n+ </node>\n+ </node>\n+ <node concept=\"2ShNRf\" id=\"7z1ex5oUu9y\" role=\"33vP2m\">\n+ <node concept=\"2i4dXS\" id=\"7z1ex5oUtUQ\" role=\"2ShVmc\">\n+ <node concept=\"3uibUv\" id=\"7z1ex5oUtUR\" role=\"HW$YZ\">\n+ <ref role=\"3uigEE\" to=\"mhbf:~SModel\" resolve=\"SModel\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"2Gpval\" id=\"4_k_9wJ_0Kc\" role=\"3cqZAp\">\n<node concept=\"2GrKxI\" id=\"4_k_9wJ_0Kd\" role=\"2Gsz3X\">\n<property role=\"TrG5h\" value=\"r\" />\n</node>\n</node>\n<node concept=\"3clFbS\" id=\"5ddlQKfIRyo\" role=\"1zxBo7\">\n- <node concept=\"3clFbF\" id=\"4_k_9wJ_0Kg\" role=\"3cqZAp\">\n- <node concept=\"2OqwBi\" id=\"4_k_9wJ_0Kh\" role=\"3clFbG\">\n- <node concept=\"2GrUjf\" id=\"4_k_9wJ_0Ki\" role=\"2Oq$k0\">\n+ <node concept=\"3cpWs8\" id=\"7z1ex5oUoXP\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"7z1ex5oUoXQ\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"targetNode\" />\n+ <node concept=\"3uibUv\" id=\"7z1ex5oUkh2\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"mhbf:~SNode\" resolve=\"SNode\" />\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"7z1ex5oUoXR\" role=\"33vP2m\">\n+ <node concept=\"2GrUjf\" id=\"7z1ex5oUoXS\" role=\"2Oq$k0\">\n<ref role=\"2Gs0qQ\" node=\"4_k_9wJ_0Kd\" resolve=\"r\" />\n</node>\n- <node concept=\"1Bd96e\" id=\"4_k_9wJ_0Kj\" role=\"2OqNvi\" />\n+ <node concept=\"1Bd96e\" id=\"7z1ex5oUoXT\" role=\"2OqNvi\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbF\" id=\"4_k_9wJ_0Kg\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"7z1ex5oUwKY\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"7z1ex5oUvRk\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"7z1ex5oUrZm\" resolve=\"targetModels\" />\n+ </node>\n+ <node concept=\"TSZUe\" id=\"7z1ex5oUyr4\" role=\"2OqNvi\">\n+ <node concept=\"2EnYce\" id=\"7z1ex5oUruU\" role=\"25WWJ7\">\n+ <node concept=\"37vLTw\" id=\"7z1ex5oUoXU\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"7z1ex5oUoXQ\" resolve=\"targetNode\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"7z1ex5oUr9a\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"mhbf:~SNode.getModel()\" resolve=\"getModel\" />\n+ </node>\n+ </node>\n+ </node>\n</node>\n</node>\n</node>\n<node concept=\"2Kehj3\" id=\"4_k_9wJ_0Kn\" role=\"2OqNvi\" />\n</node>\n</node>\n+ <node concept=\"3clFbH\" id=\"7z1ex5oTrYS\" role=\"3cqZAp\" />\n+ <node concept=\"3cpWs8\" id=\"4kvLV9j58hj\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"4kvLV9j58hk\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"modelsToImport\" />\n+ <node concept=\"A3Dl8\" id=\"4kvLV9j54$u\" role=\"1tU5fm\">\n+ <node concept=\"3uibUv\" id=\"4kvLV9j54$x\" role=\"A3Ik2\">\n+ <ref role=\"3uigEE\" to=\"mhbf:~SModel\" resolve=\"SModel\" />\n+ </node>\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"4kvLV9j58hl\" role=\"33vP2m\">\n+ <node concept=\"37vLTw\" id=\"4kvLV9j58hm\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"7z1ex5oUrZm\" resolve=\"targetModels\" />\n+ </node>\n+ <node concept=\"3zZkjj\" id=\"4kvLV9j58hn\" role=\"2OqNvi\">\n+ <node concept=\"1bVj0M\" id=\"4kvLV9j58ho\" role=\"23t8la\">\n+ <node concept=\"3clFbS\" id=\"4kvLV9j58hp\" role=\"1bW5cS\">\n+ <node concept=\"3clFbF\" id=\"4kvLV9j58hq\" role=\"3cqZAp\">\n+ <node concept=\"1Wc70l\" id=\"4kvLV9j58hr\" role=\"3clFbG\">\n+ <node concept=\"3y3z36\" id=\"4kvLV9j58hs\" role=\"3uHU7w\">\n+ <node concept=\"37vLTw\" id=\"4kvLV9j58ht\" role=\"3uHU7w\">\n+ <ref role=\"3cqZAo\" node=\"4_k_9wJ_0dg\" resolve=\"model\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"4kvLV9j58hu\" role=\"3uHU7B\">\n+ <ref role=\"3cqZAo\" node=\"4kvLV9j58hy\" resolve=\"it\" />\n+ </node>\n+ </node>\n+ <node concept=\"3y3z36\" id=\"4kvLV9j58hv\" role=\"3uHU7B\">\n+ <node concept=\"37vLTw\" id=\"4kvLV9j58hw\" role=\"3uHU7B\">\n+ <ref role=\"3cqZAo\" node=\"4kvLV9j58hy\" resolve=\"it\" />\n+ </node>\n+ <node concept=\"10Nm6u\" id=\"4kvLV9j58hx\" role=\"3uHU7w\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"Rh6nW\" id=\"4kvLV9j58hy\" role=\"1bW2Oz\">\n+ <property role=\"TrG5h\" value=\"it\" />\n+ <node concept=\"2jxLKc\" id=\"4kvLV9j58hz\" role=\"1tU5fm\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbJ\" id=\"4kvLV9j5dPG\" role=\"3cqZAp\">\n+ <node concept=\"3clFbS\" id=\"4kvLV9j5dPI\" role=\"3clFbx\">\n+ <node concept=\"3cpWs8\" id=\"7z1ex5oYh8x\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"7z1ex5oYh8y\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"importer\" />\n+ <node concept=\"3uibUv\" id=\"7z1ex5oYfWG\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"z1c4:~ModelImporter\" resolve=\"ModelImporter\" />\n+ </node>\n+ <node concept=\"2ShNRf\" id=\"7z1ex5oYh8z\" role=\"33vP2m\">\n+ <node concept=\"1pGfFk\" id=\"7z1ex5oYh8$\" role=\"2ShVmc\">\n+ <ref role=\"37wK5l\" to=\"z1c4:~ModelImporter.<init>(org.jetbrains.mps.openapi.model.SModel)\" resolve=\"ModelImporter\" />\n+ <node concept=\"37vLTw\" id=\"7z1ex5oYh8_\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"4_k_9wJ_0dg\" resolve=\"model\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbF\" id=\"7z1ex5oUzQ7\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"7z1ex5oUF69\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"4kvLV9j58h$\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"4kvLV9j58hk\" resolve=\"modelsToImport\" />\n+ </node>\n+ <node concept=\"2es0OD\" id=\"7z1ex5oUHgC\" role=\"2OqNvi\">\n+ <node concept=\"1bVj0M\" id=\"7z1ex5oUHgE\" role=\"23t8la\">\n+ <node concept=\"3clFbS\" id=\"7z1ex5oUHgF\" role=\"1bW5cS\">\n+ <node concept=\"3clFbF\" id=\"7z1ex5oUOsq\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"7z1ex5oUONP\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"7z1ex5oYk8T\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"7z1ex5oYh8y\" resolve=\"importer\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"7z1ex5oUOWF\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"z1c4:~ModelImporter.prepare(org.jetbrains.mps.openapi.model.SModelReference)\" resolve=\"prepare\" />\n+ <node concept=\"2OqwBi\" id=\"7z1ex5oUPEa\" role=\"37wK5m\">\n+ <node concept=\"37vLTw\" id=\"7z1ex5oUPgC\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"7z1ex5oUHgG\" resolve=\"it\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"7z1ex5oUPX7\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"mhbf:~SModel.getReference()\" resolve=\"getReference\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"Rh6nW\" id=\"7z1ex5oUHgG\" role=\"1bW2Oz\">\n+ <property role=\"TrG5h\" value=\"it\" />\n+ <node concept=\"2jxLKc\" id=\"7z1ex5oUHgH\" role=\"1tU5fm\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbF\" id=\"7z1ex5oYmeg\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"7z1ex5oYmRi\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"7z1ex5oYmee\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"7z1ex5oYh8y\" resolve=\"importer\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"7z1ex5oYnnv\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"z1c4:~ModelImporter.execute()\" resolve=\"execute\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"4kvLV9j5f$J\" role=\"3clFbw\">\n+ <node concept=\"37vLTw\" id=\"4kvLV9j5ePY\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"4kvLV9j58hk\" resolve=\"modelsToImport\" />\n+ </node>\n+ <node concept=\"3GX2aA\" id=\"4kvLV9j5gRj\" role=\"2OqNvi\" />\n+ </node>\n+ </node>\n</node>\n</node>\n<node concept=\"2tJIrI\" id=\"4_k_9wJHQVA\" role=\"jymVt\" />\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Update model imports after synchronization
References to nodes in other models were showing an error, because
the model and module dependencies were missing. |
426,496 | 07.12.2021 13:14:33 | -3,600 | a25beabf08a5960af847f64c714fefd6aa83d180 | Support for loading the expand/collapse icons of the java tree view | [
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.ui.common/models/org.modelix.ui.common.mps",
"new_path": "mps/org.modelix.ui.common/models/org.modelix.ui.common.mps",
"diff": "</node>\n</node>\n<node concept=\"3clFbH\" id=\"5GP2kxJi3Oa\" role=\"3cqZAp\" />\n+ <node concept=\"3clFbJ\" id=\"1JbEZjaRYgI\" role=\"3cqZAp\">\n+ <node concept=\"3clFbS\" id=\"1JbEZjaRYgK\" role=\"3clFbx\">\n+ <node concept=\"3clFbF\" id=\"1JbEZjaS2yD\" role=\"3cqZAp\">\n+ <node concept=\"37vLTI\" id=\"1JbEZjaS2WB\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"1JbEZjaS2y_\" role=\"37vLTJ\">\n+ <ref role=\"3cqZAo\" node=\"2i1MHcnrfbP\" resolve=\"icon\" />\n+ </node>\n+ <node concept=\"2YIFZM\" id=\"1JbEZjaS0Pf\" role=\"37vLTx\">\n+ <ref role=\"1Pybhc\" to=\"dxuu:~UIManager\" resolve=\"UIManager\" />\n+ <ref role=\"37wK5l\" to=\"dxuu:~UIManager.getIcon(java.lang.Object)\" resolve=\"getIcon\" />\n+ <node concept=\"37vLTw\" id=\"1JbEZjaS1zS\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"5GP2kxJi7tg\" resolve=\"iconName\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbC\" id=\"1JbEZjaRZxj\" role=\"3clFbw\">\n+ <node concept=\"10Nm6u\" id=\"1JbEZjaRZW_\" role=\"3uHU7w\" />\n+ <node concept=\"37vLTw\" id=\"1JbEZjaRZ8V\" role=\"3uHU7B\">\n+ <ref role=\"3cqZAo\" node=\"2i1MHcnrfbP\" resolve=\"icon\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbH\" id=\"1JbEZjaRWcG\" role=\"3cqZAp\" />\n<node concept=\"3clFbJ\" id=\"2i1MHcnqWOB\" role=\"3cqZAp\">\n<node concept=\"3clFbS\" id=\"2i1MHcnqWOC\" role=\"3clFbx\">\n<node concept=\"3clFbF\" id=\"2i1MHcnqWOD\" role=\"3cqZAp\">\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Support for loading the expand/collapse icons of the java tree view |
426,496 | 08.12.2021 10:05:45 | -3,600 | e49af9c27c8930261daccee474b23ee9471f6e13 | Support loading icons from the AllIcons class | [
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.ui.common/models/org.modelix.ui.common.mps",
"new_path": "mps/org.modelix.ui.common/models/org.modelix.ui.common.mps",
"diff": "<import index=\"z2i8\" ref=\"498d89d2-c2e9-11e2-ad49-6cf049e62fe5/java:com.intellij.icons(MPS.IDEA/)\" />\n<import index=\"ia5i\" ref=\"r:53d14de3-e820-4a3b-9328-a2833dcab0bd(org.modelix.common)\" />\n<import index=\"g1qu\" ref=\"498d89d2-c2e9-11e2-ad49-6cf049e62fe5/java:com.intellij.util.ui(MPS.IDEA/)\" />\n+ <import index=\"t6h5\" ref=\"6354ebe7-c22a-4a0f-ac54-50b52ab9b065/java:java.lang.reflect(JDK/)\" />\n</imports>\n<registry>\n<language id=\"f3061a53-9226-4cc5-a443-f952ceaf5816\" name=\"jetbrains.mps.baseLanguage\">\n<concept id=\"540871147943773365\" name=\"jetbrains.mps.baseLanguage.collections.structure.SingleArgumentSequenceOperation\" flags=\"nn\" index=\"25WWJ4\">\n<child id=\"540871147943773366\" name=\"argument\" index=\"25WWJ7\" />\n</concept>\n+ <concept id=\"1172650591544\" name=\"jetbrains.mps.baseLanguage.collections.structure.SkipOperation\" flags=\"nn\" index=\"7r0gD\">\n+ <child id=\"1172658456740\" name=\"elementsToSkip\" index=\"7T0AP\" />\n+ </concept>\n<concept id=\"1226511727824\" name=\"jetbrains.mps.baseLanguage.collections.structure.SetType\" flags=\"in\" index=\"2hMVRd\">\n<child id=\"1226511765987\" name=\"elementType\" index=\"2hN53Y\" />\n</concept>\n</node>\n</node>\n<node concept=\"3clFbH\" id=\"2i1MHcnrkS2\" role=\"3cqZAp\" />\n+ <node concept=\"3clFbJ\" id=\"1JbEZjb0cXw\" role=\"3cqZAp\">\n+ <node concept=\"3clFbS\" id=\"1JbEZjb0cXy\" role=\"3clFbx\">\n+ <node concept=\"3clFbF\" id=\"1JbEZjb1Aqn\" role=\"3cqZAp\">\n+ <node concept=\"37vLTI\" id=\"1JbEZjb1AyG\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"1JbEZjb1Aqa\" role=\"37vLTJ\">\n+ <ref role=\"3cqZAo\" node=\"2i1MHcnrfbP\" resolve=\"icon\" />\n+ </node>\n+ <node concept=\"1rXfSq\" id=\"1JbEZjb1une\" role=\"37vLTx\">\n+ <ref role=\"37wK5l\" node=\"1JbEZjb0mJp\" resolve=\"resolveIcon\" />\n+ <node concept=\"3VsKOn\" id=\"1JbEZjb1vgN\" role=\"37wK5m\">\n+ <ref role=\"3VsUkX\" to=\"z2i8:~AllIcons\" resolve=\"AllIcons\" />\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"1JbEZjb1$AZ\" role=\"37wK5m\">\n+ <node concept=\"2OqwBi\" id=\"1JbEZjb1y0q\" role=\"2Oq$k0\">\n+ <node concept=\"2OqwBi\" id=\"1JbEZjb1wKM\" role=\"2Oq$k0\">\n+ <node concept=\"37vLTw\" id=\"1JbEZjb1w7E\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"5GP2kxJi7tg\" resolve=\"iconName\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"1JbEZjb1x6e\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"wyt6:~String.split(java.lang.String)\" resolve=\"split\" />\n+ <node concept=\"Xl_RD\" id=\"1JbEZjb1x$w\" role=\"37wK5m\">\n+ <property role=\"Xl_RC\" value=\"/\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"39bAoz\" id=\"1JbEZjb1ys4\" role=\"2OqNvi\" />\n+ </node>\n+ <node concept=\"7r0gD\" id=\"1JbEZjb1_8A\" role=\"2OqNvi\">\n+ <node concept=\"3cmrfG\" id=\"1JbEZjb1_$K\" role=\"7T0AP\">\n+ <property role=\"3cmrfH\" value=\"1\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"1Wc70l\" id=\"1JbEZjb0gvH\" role=\"3clFbw\">\n+ <node concept=\"2OqwBi\" id=\"1JbEZjb0hOC\" role=\"3uHU7w\">\n+ <node concept=\"37vLTw\" id=\"1JbEZjb0h8w\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"5GP2kxJi7tg\" resolve=\"iconName\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"1JbEZjb0i9P\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"wyt6:~String.startsWith(java.lang.String)\" resolve=\"startsWith\" />\n+ <node concept=\"Xl_RD\" id=\"1JbEZjb0iwB\" role=\"37wK5m\">\n+ <property role=\"Xl_RC\" value=\"AllIcons/\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbC\" id=\"1JbEZjb0fzL\" role=\"3uHU7B\">\n+ <node concept=\"37vLTw\" id=\"1JbEZjb0dT0\" role=\"3uHU7B\">\n+ <ref role=\"3cqZAo\" node=\"2i1MHcnrfbP\" resolve=\"icon\" />\n+ </node>\n+ <node concept=\"10Nm6u\" id=\"1JbEZjb0fOn\" role=\"3uHU7w\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbH\" id=\"1JbEZjb0c4O\" role=\"3cqZAp\" />\n<node concept=\"3clFbJ\" id=\"5GP2kxJi4pn\" role=\"3cqZAp\">\n<node concept=\"3clFbS\" id=\"5GP2kxJi4pp\" role=\"3clFbx\">\n<node concept=\"3cpWs8\" id=\"5GP2kxJi9gR\" role=\"3cqZAp\">\n<ref role=\"2AI5Lk\" to=\"wyt6:~Override\" resolve=\"Override\" />\n</node>\n</node>\n+ <node concept=\"2tJIrI\" id=\"1JbEZjb0lCz\" role=\"jymVt\" />\n+ <node concept=\"3clFb_\" id=\"1JbEZjb0mJp\" role=\"jymVt\">\n+ <property role=\"TrG5h\" value=\"resolveIcon\" />\n+ <node concept=\"37vLTG\" id=\"1JbEZjb0ozq\" role=\"3clF46\">\n+ <property role=\"TrG5h\" value=\"cls\" />\n+ <node concept=\"3uibUv\" id=\"1JbEZjb0pyS\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"wyt6:~Class\" resolve=\"Class\" />\n+ </node>\n+ </node>\n+ <node concept=\"37vLTG\" id=\"1JbEZjb0pGu\" role=\"3clF46\">\n+ <property role=\"TrG5h\" value=\"path\" />\n+ <node concept=\"A3Dl8\" id=\"1JbEZjb0qSw\" role=\"1tU5fm\">\n+ <node concept=\"17QB3L\" id=\"1JbEZjb0qSx\" role=\"A3Ik2\" />\n+ </node>\n+ </node>\n+ <node concept=\"3uibUv\" id=\"1JbEZjb0Kkx\" role=\"3clF45\">\n+ <ref role=\"3uigEE\" to=\"dxuu:~Icon\" resolve=\"Icon\" />\n+ </node>\n+ <node concept=\"3Tm1VV\" id=\"1JbEZjb0mJs\" role=\"1B3o_S\" />\n+ <node concept=\"3clFbS\" id=\"1JbEZjb0mJt\" role=\"3clF47\">\n+ <node concept=\"3cpWs8\" id=\"1JbEZjb0INX\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"1JbEZjb0INY\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"remainingPath\" />\n+ <node concept=\"A3Dl8\" id=\"1JbEZjb0IMT\" role=\"1tU5fm\">\n+ <node concept=\"17QB3L\" id=\"1JbEZjb0IMW\" role=\"A3Ik2\" />\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"1JbEZjb0INZ\" role=\"33vP2m\">\n+ <node concept=\"37vLTw\" id=\"1JbEZjb0IO0\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"1JbEZjb0pGu\" resolve=\"path\" />\n+ </node>\n+ <node concept=\"7r0gD\" id=\"1JbEZjb0IO1\" role=\"2OqNvi\">\n+ <node concept=\"3cmrfG\" id=\"1JbEZjb0IO2\" role=\"7T0AP\">\n+ <property role=\"3cmrfH\" value=\"1\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbJ\" id=\"1JbEZjb0y_u\" role=\"3cqZAp\">\n+ <node concept=\"3clFbS\" id=\"1JbEZjb0y_w\" role=\"3clFbx\">\n+ <node concept=\"3cpWs8\" id=\"1JbEZjb2rIy\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"1JbEZjb2rIz\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"nestedClasses\" />\n+ <node concept=\"A3Dl8\" id=\"1JbEZjb223V\" role=\"1tU5fm\">\n+ <node concept=\"3uibUv\" id=\"1JbEZjb2t_6\" role=\"A3Ik2\">\n+ <ref role=\"3uigEE\" to=\"wyt6:~Class\" resolve=\"Class\" />\n+ </node>\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"1JbEZjb2rI$\" role=\"33vP2m\">\n+ <node concept=\"2OqwBi\" id=\"1JbEZjb2rI_\" role=\"2Oq$k0\">\n+ <node concept=\"37vLTw\" id=\"1JbEZjb2rIA\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"1JbEZjb0ozq\" resolve=\"cls\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"1JbEZjb2rIB\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"wyt6:~Class.getDeclaredClasses()\" resolve=\"getDeclaredClasses\" />\n+ </node>\n+ </node>\n+ <node concept=\"39bAoz\" id=\"1JbEZjb2rIC\" role=\"2OqNvi\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3cpWs8\" id=\"1JbEZjb0xqw\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"1JbEZjb0xqx\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"nestedCls\" />\n+ <node concept=\"2OqwBi\" id=\"1JbEZjb0xqy\" role=\"33vP2m\">\n+ <node concept=\"37vLTw\" id=\"1JbEZjb2rID\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"1JbEZjb2rIz\" resolve=\"nestedClasses\" />\n+ </node>\n+ <node concept=\"1z4cxt\" id=\"1JbEZjb0xqC\" role=\"2OqNvi\">\n+ <node concept=\"1bVj0M\" id=\"1JbEZjb0xqD\" role=\"23t8la\">\n+ <node concept=\"3clFbS\" id=\"1JbEZjb0xqE\" role=\"1bW5cS\">\n+ <node concept=\"3clFbF\" id=\"1JbEZjb0xqF\" role=\"3cqZAp\">\n+ <node concept=\"17R0WA\" id=\"1JbEZjb0xqG\" role=\"3clFbG\">\n+ <node concept=\"2OqwBi\" id=\"1JbEZjb0xqH\" role=\"3uHU7w\">\n+ <node concept=\"37vLTw\" id=\"1JbEZjb0xqI\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"1JbEZjb0pGu\" resolve=\"path\" />\n+ </node>\n+ <node concept=\"1uHKPH\" id=\"1JbEZjb0xqJ\" role=\"2OqNvi\" />\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"1JbEZjb0xqK\" role=\"3uHU7B\">\n+ <node concept=\"37vLTw\" id=\"1JbEZjb0xqL\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"1JbEZjb0xqN\" resolve=\"it\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"1JbEZjb0xqM\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"wyt6:~Class.getSimpleName()\" resolve=\"getSimpleName\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"Rh6nW\" id=\"1JbEZjb0xqN\" role=\"1bW2Oz\">\n+ <property role=\"TrG5h\" value=\"it\" />\n+ <node concept=\"2jxLKc\" id=\"1JbEZjb0xqO\" role=\"1tU5fm\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3uibUv\" id=\"1JbEZjb21V5\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"wyt6:~Class\" resolve=\"Class\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3cpWs6\" id=\"1JbEZjb0JS3\" role=\"3cqZAp\">\n+ <node concept=\"3K4zz7\" id=\"1JbEZjb0JS5\" role=\"3cqZAk\">\n+ <node concept=\"10Nm6u\" id=\"1JbEZjb0JS6\" role=\"3K4E3e\" />\n+ <node concept=\"1rXfSq\" id=\"1JbEZjb0JS7\" role=\"3K4GZi\">\n+ <ref role=\"37wK5l\" node=\"1JbEZjb0mJp\" resolve=\"resolveIcon\" />\n+ <node concept=\"37vLTw\" id=\"1JbEZjb0JS8\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"1JbEZjb0xqx\" resolve=\"nestedCls\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"1JbEZjb0JS9\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"1JbEZjb0INY\" resolve=\"remainingPath\" />\n+ </node>\n+ </node>\n+ <node concept=\"3clFbC\" id=\"1JbEZjb0JSa\" role=\"3K4Cdx\">\n+ <node concept=\"10Nm6u\" id=\"1JbEZjb0JSb\" role=\"3uHU7w\" />\n+ <node concept=\"37vLTw\" id=\"1JbEZjb0JSc\" role=\"3uHU7B\">\n+ <ref role=\"3cqZAo\" node=\"1JbEZjb0xqx\" resolve=\"nestedCls\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"1JbEZjb0$EA\" role=\"3clFbw\">\n+ <node concept=\"37vLTw\" id=\"1JbEZjb0IO4\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"1JbEZjb0INY\" resolve=\"remainingPath\" />\n+ </node>\n+ <node concept=\"3GX2aA\" id=\"1JbEZjb0_8i\" role=\"2OqNvi\" />\n+ </node>\n+ <node concept=\"9aQIb\" id=\"1JbEZjb0AaC\" role=\"9aQIa\">\n+ <node concept=\"3clFbS\" id=\"1JbEZjb0AaD\" role=\"9aQI4\">\n+ <node concept=\"3cpWs8\" id=\"1JbEZjb0QNY\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"1JbEZjb0QNZ\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"field\" />\n+ <node concept=\"3uibUv\" id=\"1JbEZjb0QAv\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"t6h5:~Field\" resolve=\"Field\" />\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"1JbEZjb0QO0\" role=\"33vP2m\">\n+ <node concept=\"2OqwBi\" id=\"1JbEZjb0QO1\" role=\"2Oq$k0\">\n+ <node concept=\"2OqwBi\" id=\"1JbEZjb0QO2\" role=\"2Oq$k0\">\n+ <node concept=\"37vLTw\" id=\"1JbEZjb0QO3\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"1JbEZjb0ozq\" resolve=\"cls\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"1JbEZjb0QO4\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"wyt6:~Class.getDeclaredFields()\" resolve=\"getDeclaredFields\" />\n+ </node>\n+ </node>\n+ <node concept=\"39bAoz\" id=\"1JbEZjb0QO5\" role=\"2OqNvi\" />\n+ </node>\n+ <node concept=\"1z4cxt\" id=\"1JbEZjb0QO6\" role=\"2OqNvi\">\n+ <node concept=\"1bVj0M\" id=\"1JbEZjb0QO7\" role=\"23t8la\">\n+ <node concept=\"3clFbS\" id=\"1JbEZjb0QO8\" role=\"1bW5cS\">\n+ <node concept=\"3clFbF\" id=\"1JbEZjb0QO9\" role=\"3cqZAp\">\n+ <node concept=\"17R0WA\" id=\"1JbEZjb0QOa\" role=\"3clFbG\">\n+ <node concept=\"2OqwBi\" id=\"1JbEZjb0QOb\" role=\"3uHU7w\">\n+ <node concept=\"37vLTw\" id=\"1JbEZjb0QOc\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"1JbEZjb0pGu\" resolve=\"path\" />\n+ </node>\n+ <node concept=\"1uHKPH\" id=\"1JbEZjb0QOd\" role=\"2OqNvi\" />\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"1JbEZjb0QOe\" role=\"3uHU7B\">\n+ <node concept=\"37vLTw\" id=\"1JbEZjb0QOf\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"1JbEZjb0QOh\" resolve=\"it\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"1JbEZjb0QOg\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"t6h5:~Field.getName()\" resolve=\"getName\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"Rh6nW\" id=\"1JbEZjb0QOh\" role=\"1bW2Oz\">\n+ <property role=\"TrG5h\" value=\"it\" />\n+ <node concept=\"2jxLKc\" id=\"1JbEZjb0QOi\" role=\"1tU5fm\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbJ\" id=\"1JbEZjb0RzH\" role=\"3cqZAp\">\n+ <node concept=\"3clFbS\" id=\"1JbEZjb0RzJ\" role=\"3clFbx\">\n+ <node concept=\"3J1_TO\" id=\"1JbEZjb1mX9\" role=\"3cqZAp\">\n+ <node concept=\"3clFbS\" id=\"1JbEZjb1mXa\" role=\"1zxBo7\">\n+ <node concept=\"3cpWs8\" id=\"1JbEZjb15u3\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"1JbEZjb15u4\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"value\" />\n+ <node concept=\"3uibUv\" id=\"1JbEZjb14Xr\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"wyt6:~Object\" resolve=\"Object\" />\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"1JbEZjb15u5\" role=\"33vP2m\">\n+ <node concept=\"37vLTw\" id=\"1JbEZjb15u6\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"1JbEZjb0QNZ\" resolve=\"field\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"1JbEZjb15u7\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"t6h5:~Field.get(java.lang.Object)\" resolve=\"get\" />\n+ <node concept=\"10Nm6u\" id=\"1JbEZjb15u8\" role=\"37wK5m\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3cpWs6\" id=\"1JbEZjb1opl\" role=\"3cqZAp\">\n+ <node concept=\"3K4zz7\" id=\"1JbEZjb1opn\" role=\"3cqZAk\">\n+ <node concept=\"1eOMI4\" id=\"1JbEZjb1opo\" role=\"3K4E3e\">\n+ <node concept=\"10QFUN\" id=\"1JbEZjb1opp\" role=\"1eOMHV\">\n+ <node concept=\"37vLTw\" id=\"1JbEZjb1opq\" role=\"10QFUP\">\n+ <ref role=\"3cqZAo\" node=\"1JbEZjb15u4\" resolve=\"value\" />\n+ </node>\n+ <node concept=\"3uibUv\" id=\"1JbEZjb1opr\" role=\"10QFUM\">\n+ <ref role=\"3uigEE\" to=\"dxuu:~Icon\" resolve=\"Icon\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"10Nm6u\" id=\"1JbEZjb1ops\" role=\"3K4GZi\" />\n+ <node concept=\"2ZW3vV\" id=\"1JbEZjb1opt\" role=\"3K4Cdx\">\n+ <node concept=\"3uibUv\" id=\"1JbEZjb1opu\" role=\"2ZW6by\">\n+ <ref role=\"3uigEE\" to=\"dxuu:~Icon\" resolve=\"Icon\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"1JbEZjb1opv\" role=\"2ZW6bz\">\n+ <ref role=\"3cqZAo\" node=\"1JbEZjb15u4\" resolve=\"value\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3uVAMA\" id=\"1JbEZjb1mXc\" role=\"1zxBo5\">\n+ <node concept=\"3clFbS\" id=\"1JbEZjb1mXd\" role=\"1zc67A\" />\n+ <node concept=\"XOnhg\" id=\"1JbEZjb1mXe\" role=\"1zc67B\">\n+ <property role=\"TrG5h\" value=\"e\" />\n+ <node concept=\"nSUau\" id=\"1JbEZjb1mXf\" role=\"1tU5fm\">\n+ <node concept=\"3uibUv\" id=\"1JbEZjb1mXb\" role=\"nSUat\">\n+ <ref role=\"3uigEE\" to=\"wyt6:~IllegalAccessException\" resolve=\"IllegalAccessException\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"1Wc70l\" id=\"1JbEZjb0WI3\" role=\"3clFbw\">\n+ <node concept=\"2OqwBi\" id=\"1JbEZjb0X_O\" role=\"3uHU7w\">\n+ <node concept=\"37vLTw\" id=\"1JbEZjb0X1J\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"1JbEZjb0QNZ\" resolve=\"field\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"1JbEZjb0XPJ\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"t6h5:~AccessibleObject.canAccess(java.lang.Object)\" resolve=\"canAccess\" />\n+ <node concept=\"10Nm6u\" id=\"1JbEZjb0Y94\" role=\"37wK5m\" />\n+ </node>\n+ </node>\n+ <node concept=\"1Wc70l\" id=\"1JbEZjb0Tcf\" role=\"3uHU7B\">\n+ <node concept=\"3y3z36\" id=\"1JbEZjb0Sxm\" role=\"3uHU7B\">\n+ <node concept=\"37vLTw\" id=\"1JbEZjb0RYa\" role=\"3uHU7B\">\n+ <ref role=\"3cqZAo\" node=\"1JbEZjb0QNZ\" resolve=\"field\" />\n+ </node>\n+ <node concept=\"10Nm6u\" id=\"1JbEZjb0SUl\" role=\"3uHU7w\" />\n+ </node>\n+ <node concept=\"2YIFZM\" id=\"1JbEZjb0Vis\" role=\"3uHU7w\">\n+ <ref role=\"37wK5l\" to=\"t6h5:~Modifier.isStatic(int)\" resolve=\"isStatic\" />\n+ <ref role=\"1Pybhc\" to=\"t6h5:~Modifier\" resolve=\"Modifier\" />\n+ <node concept=\"2OqwBi\" id=\"1JbEZjb0Wa4\" role=\"37wK5m\">\n+ <node concept=\"37vLTw\" id=\"1JbEZjb0V$t\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"1JbEZjb0QNZ\" resolve=\"field\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"1JbEZjb0Wpu\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"t6h5:~Field.getModifiers()\" resolve=\"getModifiers\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3cpWs6\" id=\"1JbEZjb1iMj\" role=\"3cqZAp\">\n+ <node concept=\"10Nm6u\" id=\"1JbEZjb1jJE\" role=\"3cqZAk\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"3Tm1VV\" id=\"2i1MHcnqWRb\" role=\"1B3o_S\" />\n<node concept=\"3uibUv\" id=\"2i1MHcnqWRc\" role=\"1zkMxy\">\n<ref role=\"3uigEE\" to=\"cgcg:~AbstractHandler\" resolve=\"AbstractHandler\" />\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Support loading icons from the AllIcons class |
426,496 | 11.12.2021 12:21:43 | -3,600 | 19a7571be5677ef50f38610e49729f2dc8c3899f | GraphQL: Concept hierarchy mapping to GraphQL schema complete | [
{
"change_type": "MODIFY",
"old_path": "graphql-server/src/main/kotlin/org/modelix/graphql/server/ModelixSchemaGenerator.kt",
"new_path": "graphql-server/src/main/kotlin/org/modelix/graphql/server/ModelixSchemaGenerator.kt",
"diff": "package org.modelix.graphql.server\nimport graphql.Scalars\n+import graphql.TypeResolutionEnvironment\nimport graphql.schema.*\nimport org.modelix.model.api.*\nimport org.modelix.model.metameta.MetaMetaLanguage\nimport org.modelix.model.metameta.MetaModelIndex\nimport org.modelix.model.metameta.PersistedConcept\n+val I_BASE_CONCEPT_NAME = \"I_BaseConcept\"\n+\nclass ModelixSchemaGenerator(val tree: ITree) {\nprivate val conceptTypes = HashMap<Long, GraphQLObjectType>()\nprivate val interfaceTypes = HashMap<Long, GraphQLInterfaceType>()\nprivate val iBaseConcept = GraphQLInterfaceType.newInterface()\n- .name(\"BaseConcept\")\n- .field { it.name(\"role\").type(Scalars.GraphQLString) }\n+ .name(I_BASE_CONCEPT_NAME)\n+ .apply { generateGenericFields { field(it) } }\n.build()\nprivate val baseConcept = GraphQLObjectType.newObject()\n.name(\"BaseConcept\")\n.withInterface(iBaseConcept)\n- .field { it.name(\"_modelix_id\").type(Scalars.GraphQLString) }\n+ .apply { generateGenericFields { field(it) } }\n.build()\nfun generate(): GraphQLSchema {\n@@ -48,9 +51,8 @@ class ModelixSchemaGenerator(val tree: ITree) {\n// withInterface(GraphQLTypeReference(\"I_\" + getConceptFqName(superConcept)))\n// }\n// }\n- .field { it\n- .name(\"role\")\n- .type(Scalars.GraphQLString)\n+ .apply {\n+ generateFields(conceptId) { field(it) }\n}\n.build()\n@@ -62,60 +64,17 @@ class ModelixSchemaGenerator(val tree: ITree) {\n}\n}\n.withInterface(iBaseConcept)\n- .field { it.name(\"_modelix_id\").type(Scalars.GraphQLID).dataFetcher { env -> env.getSource<Long>().toString() } }\n- .field { it\n- .name(\"role\")\n- .type(Scalars.GraphQLString)\n- .dataFetcher { env -> tree.getRole(env.getSource()) }\n- }\n- .field {\n- it\n- .name(\"getProperty\")\n- .type(Scalars.GraphQLString)\n- .argument { it.name(\"name\").type(Scalars.GraphQLString) }\n- .dataFetcher { env -> tree.getProperty(env.getSource(), env.getArgument(\"name\"))}\n- }\n.apply {\n- for (superConcept in collectSuperConcepts(conceptId)) {\n- for (property in tree.getChildren(superConcept, MetaMetaLanguage.childLink_Concept_properties.name)) {\n- field { it.name(tree.getProperty(property, MetaMetaLanguage.property_Property_name.name)).type(Scalars.GraphQLString) }\n- }\n- for (childLink in tree.getChildren(superConcept, MetaMetaLanguage.childLink_Concept_childLinks.name)) {\n- val multiple = tree.getProperty(childLink, MetaMetaLanguage.property_ChildLink_multiple.name) == \"true\"\n- val linkName = tree.getProperty(childLink, MetaMetaLanguage.property_ChildLink_name.name)\n- field(generateField(\n- linkName,\n- tree.getReferenceTarget(childLink, MetaMetaLanguage.referenceLink_ChildLink_childConcept.name),\n- multiple\n- ) { env ->\n- tree.getChildren(env.getSource(), linkName).let {\n- if (multiple) it.toList()\n- else it.firstOrNull()\n- }\n- })\n- }\n- for (referenceLink in tree.getChildren(superConcept, MetaMetaLanguage.childLink_Concept_referenceLinks.name)) {\n- val linkName = tree.getProperty(referenceLink, MetaMetaLanguage.property_ReferenceLink_name.name)\n- ?: continue\n- field(generateField(\n- linkName,\n- tree.getReferenceTarget(referenceLink, MetaMetaLanguage.referenceLink_ReferenceLink_targetConcept.name),\n- false\n- ) { env -> tree.getReferenceTarget(env.getSource(), linkName)?.let {\n- if (it is LocalPNodeReference) it.id else null\n- }})\n-\n- }\n- }\n+ generateFields(conceptId) { field(it) }\n}\n.build()\n}\n}\n- val anyType = GraphQLUnionType.newUnionType()\n- .name(\"Any\")\n- .also { union -> conceptTypes.values.sortedBy { it.name }.forEach { union.possibleType(it) }}\n- .build()\n+// val anyType = GraphQLUnionType.newUnionType()\n+// .name(\"Any\")\n+// .also { union -> conceptTypes.values.sortedBy { it.name }.forEach { union.possibleType(it) }}\n+// .build()\n// val fetcher: DataFetcher<Any> = DataFetcher{ env ->\n@@ -130,42 +89,102 @@ class ModelixSchemaGenerator(val tree: ITree) {\n// if (env.fieldDefinition.type == Scalars.GraphQLString || env.fieldDefinition.name == \"customers\") fetcher else PropertyDataFetcher.fetching<Any>(env.fieldDefinition.name)\n// }\n+ val conceptResolver = { env: TypeResolutionEnvironment ->\n+ val nodeId = env.getObject() as Long\n+ val concept = tree.getConcept(nodeId) as PersistedConcept\n+ conceptTypes[concept.id]\n+ }\nreturn GraphQLSchema.newSchema()\n.query(GraphQLObjectType.newObject()\n.name(\"Query\")\n.field { it\n.name(\"roots\")\n- .type(GraphQLList.list(anyType))\n+ .type(GraphQLList.list(iBaseConcept))\n.dataFetcher { env -> tree.getAllChildren(ITree.ROOT_ID).filter { tree.getConcept(it) !is SimpleConcept } }\n})\n.also { schemaBuilder -> conceptTypes.values.sortedBy { it.name }.forEach { schemaBuilder.additionalType(it) } }\n.also { schemaBuilder -> interfaceTypes.values.sortedBy { it.name }.forEach { schemaBuilder.additionalType(it) } }\n- .additionalType(anyType)\n+// .additionalType(anyType)\n.codeRegistry(GraphQLCodeRegistry.newCodeRegistry()\n// .defaultDataFetcher(fetcherFactory)\n- .typeResolver(anyType) { env ->\n- val nodeId = env.getObject() as Long\n- val concept = tree.getConcept(nodeId) as PersistedConcept\n- conceptTypes[concept.id]\n- }\n- .typeResolver(iBaseConcept) { env ->\n- val nodeId = env.getObject() as Long\n- val concept = tree.getConcept(nodeId) as PersistedConcept\n- conceptTypes[concept.id]\n- }\n+// .typeResolver(anyType) { env ->\n+// val nodeId = env.getObject() as Long\n+// val concept = tree.getConcept(nodeId) as PersistedConcept\n+// conceptTypes[concept.id]\n+// }\n+ .typeResolver(iBaseConcept, conceptResolver)\n.apply {\nfor (interfaceType in interfaceTypes) {\n- typeResolver(interfaceType.value) { env ->\n- val nodeId = env.getObject() as Long\n- val concept = tree.getConcept(nodeId) as PersistedConcept\n- conceptTypes[concept.id]\n- }\n+ typeResolver(interfaceType.value, conceptResolver)\n}\n}\n.build())\n.build()\n}\n+ private fun generateFields(conceptId: Long, field: (GraphQLFieldDefinition) -> Unit) {\n+ generateGenericFields(field)\n+ for (superConcept in collectSuperConcepts(conceptId)) {\n+ for (property in tree.getChildren(superConcept, MetaMetaLanguage.childLink_Concept_properties.name)) {\n+ field(GraphQLFieldDefinition.newFieldDefinition().name(tree.getProperty(property, MetaMetaLanguage.property_Property_name.name)).type(Scalars.GraphQLString).build())\n+ }\n+ for (childLink in tree.getChildren(superConcept, MetaMetaLanguage.childLink_Concept_childLinks.name)) {\n+ val multiple = tree.getProperty(childLink, MetaMetaLanguage.property_ChildLink_multiple.name) == \"true\"\n+ val linkName = tree.getProperty(childLink, MetaMetaLanguage.property_ChildLink_name.name)\n+ field(generateField(\n+ linkName,\n+ tree.getReferenceTarget(childLink, MetaMetaLanguage.referenceLink_ChildLink_childConcept.name),\n+ multiple\n+ ) { env ->\n+ tree.getChildren(env.getSource(), linkName).let {\n+ if (multiple) it.toList()\n+ else it.firstOrNull()\n+ }\n+ })\n+ }\n+ for (referenceLink in tree.getChildren(superConcept, MetaMetaLanguage.childLink_Concept_referenceLinks.name)) {\n+ val linkName = tree.getProperty(referenceLink, MetaMetaLanguage.property_ReferenceLink_name.name)\n+ ?: continue\n+ field(generateField(\n+ linkName,\n+ tree.getReferenceTarget(referenceLink, MetaMetaLanguage.referenceLink_ReferenceLink_targetConcept.name),\n+ false\n+ ) { env ->\n+ tree.getReferenceTarget(env.getSource(), linkName)?.let {\n+ if (it is LocalPNodeReference) it.id else null\n+ }\n+ })\n+\n+ }\n+ }\n+ }\n+\n+ private fun generateGenericFields(field: (GraphQLFieldDefinition) -> Unit) {\n+ field(GraphQLFieldDefinition.newFieldDefinition().name(\"_modelix_id\")\n+ .type(Scalars.GraphQLID)\n+ .dataFetcher { env -> java.lang.Long.toHexString(env.getSource()) }.build())\n+ field(GraphQLFieldDefinition.newFieldDefinition().name(\"_role\")\n+ .type(Scalars.GraphQLString)\n+ .dataFetcher { env -> tree.getRole(env.getSource()) }.build())\n+ field(GraphQLFieldDefinition.newFieldDefinition().name(\"_getProperty\")\n+ .type(Scalars.GraphQLString)\n+ .argument { it.name(\"name\").type(Scalars.GraphQLString) }\n+ .dataFetcher { env -> tree.getProperty(env.getSource(), env.getArgument(\"name\")) }.build())\n+ field(GraphQLFieldDefinition.newFieldDefinition().name(\"_getChildren\")\n+ .type(GraphQLList.list(GraphQLNonNull.nonNull(GraphQLTypeReference.typeRef(I_BASE_CONCEPT_NAME))))\n+ .argument { it.name(\"role\").type(Scalars.GraphQLString) }\n+ .dataFetcher { env -> tree.getChildren(env.getSource(), env.getArgument(\"role\")) }.build())\n+ field(GraphQLFieldDefinition.newFieldDefinition().name(\"_getAllChildren\")\n+ .type(GraphQLList.list(GraphQLNonNull.nonNull(GraphQLTypeReference.typeRef(I_BASE_CONCEPT_NAME))))\n+ .dataFetcher { env -> tree.getAllChildren(env.getSource()) }.build())\n+ field(GraphQLFieldDefinition.newFieldDefinition().name(\"_getReferenceTarget\")\n+ .type(GraphQLTypeReference.typeRef(I_BASE_CONCEPT_NAME))\n+ .argument { it.name(\"role\").type(Scalars.GraphQLString) }\n+ .dataFetcher { env -> val referenceTarget = tree.getReferenceTarget(env.getSource(), env.getArgument(\"role\"))\n+ if (referenceTarget is PNodeReference) referenceTarget.id else null\n+ }.build())\n+ }\n+\nfun getConceptFqName(conceptId: Long): String {\nval conceptName = tree.getProperty(conceptId, MetaMetaLanguage.property_Concept_name.name)\nval languageId = tree.getParent(conceptId)\n@@ -177,7 +196,7 @@ class ModelixSchemaGenerator(val tree: ITree) {\nfun generateField(name: String?, targetConcept: INodeReference?, multiple: Boolean, fetcher: DataFetcher<*>): GraphQLFieldDefinition {\nval targetType = if (targetConcept is PNodeReference) {\n- GraphQLTypeReference.typeRef(getConceptFqName(targetConcept.id))\n+ GraphQLTypeReference.typeRef( \"I_\" + getConceptFqName(targetConcept.id))\n} else {\niBaseConcept\n}\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | GraphQL: Concept hierarchy mapping to GraphQL schema complete |
426,496 | 14.12.2021 14:32:37 | -3,600 | 08b23066429c55de39949210cecbbb788cf46103 | Author was missing when changes were done in projector | [
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.common/models/org.modelix.common.mps",
"new_path": "mps/org.modelix.common/models/org.modelix.common.mps",
"diff": "<concept id=\"1081236700937\" name=\"jetbrains.mps.baseLanguage.structure.StaticMethodCall\" flags=\"nn\" index=\"2YIFZM\">\n<reference id=\"1144433194310\" name=\"classConcept\" index=\"1Pybhc\" />\n</concept>\n+ <concept id=\"1070534058343\" name=\"jetbrains.mps.baseLanguage.structure.NullLiteral\" flags=\"nn\" index=\"10Nm6u\" />\n<concept id=\"1068390468198\" name=\"jetbrains.mps.baseLanguage.structure.ClassConcept\" flags=\"ig\" index=\"312cEu\" />\n<concept id=\"1068431474542\" name=\"jetbrains.mps.baseLanguage.structure.VariableDeclaration\" flags=\"ng\" index=\"33uBYm\">\n<child id=\"1068431790190\" name=\"initializer\" index=\"33vP2m\" />\n<child id=\"1068581242865\" name=\"localVariableDeclaration\" index=\"3cpWs9\" />\n</concept>\n<concept id=\"1068581242863\" name=\"jetbrains.mps.baseLanguage.structure.LocalVariableDeclaration\" flags=\"nr\" index=\"3cpWsn\" />\n+ <concept id=\"1068581517677\" name=\"jetbrains.mps.baseLanguage.structure.VoidType\" flags=\"in\" index=\"3cqZAl\" />\n<concept id=\"1204053956946\" name=\"jetbrains.mps.baseLanguage.structure.IMethodCall\" flags=\"ng\" index=\"1ndlxa\">\n<reference id=\"1068499141037\" name=\"baseMethodDeclaration\" index=\"37wK5l\" />\n<child id=\"1068499141038\" name=\"actualArgument\" index=\"37wK5m\" />\n<child id=\"1163668934364\" name=\"ifFalse\" index=\"3K4GZi\" />\n</concept>\n<concept id=\"1146644602865\" name=\"jetbrains.mps.baseLanguage.structure.PublicVisibility\" flags=\"nn\" index=\"3Tm1VV\" />\n+ <concept id=\"1146644623116\" name=\"jetbrains.mps.baseLanguage.structure.PrivateVisibility\" flags=\"nn\" index=\"3Tm6S6\" />\n<concept id=\"1080120340718\" name=\"jetbrains.mps.baseLanguage.structure.AndExpression\" flags=\"nn\" index=\"1Wc70l\" />\n<concept id=\"1200397529627\" name=\"jetbrains.mps.baseLanguage.structure.CharConstant\" flags=\"nn\" index=\"1Xhbcc\">\n<property id=\"1200397540847\" name=\"charConstant\" index=\"1XhdNS\" />\n</node>\n</node>\n</node>\n- <node concept=\"2tJIrI\" id=\"5MA9wbc5ta5\" role=\"jymVt\" />\n+ <node concept=\"Wx3nA\" id=\"3PyXc8TCEIN\" role=\"jymVt\">\n+ <property role=\"TrG5h\" value=\"instanceOwner\" />\n+ <node concept=\"17QB3L\" id=\"3PyXc8TCDKu\" role=\"1tU5fm\" />\n+ <node concept=\"3Tm6S6\" id=\"3PyXc8TCFHI\" role=\"1B3o_S\" />\n+ <node concept=\"10Nm6u\" id=\"3PyXc8TCDM6\" role=\"33vP2m\" />\n+ </node>\n+ <node concept=\"2tJIrI\" id=\"3PyXc8TCDIw\" role=\"jymVt\" />\n+ <node concept=\"2YIFZL\" id=\"3PyXc8TCJbF\" role=\"jymVt\">\n+ <property role=\"TrG5h\" value=\"setInstanceOwner\" />\n+ <node concept=\"3clFbS\" id=\"3PyXc8TCFLS\" role=\"3clF47\">\n+ <node concept=\"3clFbF\" id=\"3PyXc8TCFUU\" role=\"3cqZAp\">\n+ <node concept=\"37vLTI\" id=\"3PyXc8TCGdA\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"3PyXc8TCGe4\" role=\"37vLTx\">\n+ <ref role=\"3cqZAo\" node=\"3PyXc8TCFPf\" resolve=\"owner\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"3PyXc8TCFUT\" role=\"37vLTJ\">\n+ <ref role=\"3cqZAo\" node=\"3PyXc8TCEIN\" resolve=\"instanceOwner\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"37vLTG\" id=\"3PyXc8TCFPf\" role=\"3clF46\">\n+ <property role=\"TrG5h\" value=\"owner\" />\n+ <node concept=\"17QB3L\" id=\"3PyXc8TCFQD\" role=\"1tU5fm\" />\n+ </node>\n+ <node concept=\"3cqZAl\" id=\"3PyXc8TCFLQ\" role=\"3clF45\" />\n+ <node concept=\"3Tm1VV\" id=\"3PyXc8TCFLR\" role=\"1B3o_S\" />\n+ </node>\n+ <node concept=\"2tJIrI\" id=\"3PyXc8TCFKv\" role=\"jymVt\" />\n<node concept=\"2YIFZL\" id=\"5MA9wbc5wh4\" role=\"jymVt\">\n<property role=\"TrG5h\" value=\"apply\" />\n<node concept=\"3clFbS\" id=\"5MA9wbc5teF\" role=\"3clF47\">\n</node>\n</node>\n</node>\n- <node concept=\"3clFbF\" id=\"5MA9wbc5tV9\" role=\"3cqZAp\">\n- <node concept=\"3K4zz7\" id=\"5MA9wbc5vC8\" role=\"3clFbG\">\n- <node concept=\"37vLTw\" id=\"5MA9wbc5w07\" role=\"3K4E3e\">\n+ <node concept=\"3clFbJ\" id=\"3PyXc8TCDX9\" role=\"3cqZAp\">\n+ <node concept=\"3clFbS\" id=\"3PyXc8TCDXb\" role=\"3clFbx\">\n+ <node concept=\"3cpWs6\" id=\"3PyXc8TCE_L\" role=\"3cqZAp\">\n+ <node concept=\"37vLTw\" id=\"3PyXc8TCEBY\" role=\"3cqZAk\">\n<ref role=\"3cqZAo\" node=\"5MA9wbc5uui\" resolve=\"override\" />\n</node>\n- <node concept=\"37vLTw\" id=\"5MA9wbc5wck\" role=\"3K4GZi\">\n- <ref role=\"3cqZAo\" node=\"5MA9wbc5tko\" resolve=\"author\" />\n</node>\n- <node concept=\"2OqwBi\" id=\"5MA9wbc5uYY\" role=\"3K4Cdx\">\n- <node concept=\"37vLTw\" id=\"5MA9wbc5uum\" role=\"2Oq$k0\">\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"3PyXc8TCElv\" role=\"3clFbw\">\n+ <node concept=\"37vLTw\" id=\"3PyXc8TCDYX\" role=\"2Oq$k0\">\n<ref role=\"3cqZAo\" node=\"5MA9wbc5uui\" resolve=\"override\" />\n</node>\n- <node concept=\"17RvpY\" id=\"5MA9wbc5veb\" role=\"2OqNvi\" />\n+ <node concept=\"17RvpY\" id=\"3PyXc8TCE_e\" role=\"2OqNvi\" />\n+ </node>\n</node>\n+ <node concept=\"3clFbJ\" id=\"3PyXc8TCEG1\" role=\"3cqZAp\">\n+ <node concept=\"3clFbS\" id=\"3PyXc8TCEG3\" role=\"3clFbx\">\n+ <node concept=\"3cpWs6\" id=\"3PyXc8TCFy5\" role=\"3cqZAp\">\n+ <node concept=\"37vLTw\" id=\"3PyXc8TCF$G\" role=\"3cqZAk\">\n+ <ref role=\"3cqZAo\" node=\"3PyXc8TCEIN\" resolve=\"instanceOwner\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"1Wc70l\" id=\"3PyXc8TDA8R\" role=\"3clFbw\">\n+ <node concept=\"2OqwBi\" id=\"3PyXc8TDAhH\" role=\"3uHU7B\">\n+ <node concept=\"37vLTw\" id=\"3PyXc8TDAbU\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"5MA9wbc5tko\" resolve=\"author\" />\n+ </node>\n+ <node concept=\"17RlXB\" id=\"3PyXc8TDAli\" role=\"2OqNvi\" />\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"3PyXc8TCF72\" role=\"3uHU7w\">\n+ <node concept=\"37vLTw\" id=\"3PyXc8TCEKj\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"3PyXc8TCEIN\" resolve=\"instanceOwner\" />\n+ </node>\n+ <node concept=\"17RvpY\" id=\"3PyXc8TCFxn\" role=\"2OqNvi\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3cpWs6\" id=\"3PyXc8TCFBn\" role=\"3cqZAp\">\n+ <node concept=\"37vLTw\" id=\"3PyXc8TCFFZ\" role=\"3cqZAk\">\n+ <ref role=\"3cqZAo\" node=\"5MA9wbc5tko\" resolve=\"author\" />\n</node>\n</node>\n</node>\n"
},
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.ui.server/models/org.modelix.ui.server.plugin.mps",
"new_path": "mps/org.modelix.ui.server/models/org.modelix.ui.server.plugin.mps",
"diff": "<import index=\"6t7w\" ref=\"6354ebe7-c22a-4a0f-ac54-50b52ab9b065/java:java.time.format(JDK/)\" />\n<import index=\"5440\" ref=\"0a2651ab-f212-45c2-a2f0-343e76cbc26b/java:org.modelix.model.client(org.modelix.model.client/)\" />\n<import index=\"v18h\" ref=\"cc99dce1-49f3-4392-8dbf-e22ca47bd0af/java:kotlin(org.modelix.model.api/)\" />\n+ <import index=\"nhvc\" ref=\"r:38471075-de8a-4a91-a626-13195397f5c5(org.modelix.model.mpsplugin.plugin)\" />\n+ <import index=\"ia5i\" ref=\"r:53d14de3-e820-4a3b-9328-a2833dcab0bd(org.modelix.common)\" />\n<import index=\"6sky\" ref=\"fc3c2aa8-0d4b-463f-a774-40d450aa04a0/java:org.eclipse.jetty.util.component(org.modelix.jetty/)\" implicit=\"true\" />\n<import index=\"ubtp\" ref=\"498d89d2-c2e9-11e2-ad49-6cf049e62fe5/java:com.intellij.openapi.fileEditor.impl(MPS.IDEA/)\" implicit=\"true\" />\n</imports>\n</node>\n</node>\n<node concept=\"3clFbH\" id=\"5Sw$pxbVJ7i\" role=\"3cqZAp\" />\n+ <node concept=\"3clFbF\" id=\"3PyXc8TCT0D\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"3PyXc8TCT0E\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"3PyXc8TCT0F\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"1MbrkMIxeOZ\" resolve=\"handlerList\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"3PyXc8TCT0G\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"cgcg:~HandlerCollection.addHandler(org.eclipse.jetty.server.Handler)\" resolve=\"addHandler\" />\n+ <node concept=\"2ShNRf\" id=\"3PyXc8TCT0H\" role=\"37wK5m\">\n+ <node concept=\"HV5vD\" id=\"3PyXc8TCT0I\" role=\"2ShVmc\">\n+ <ref role=\"HV5vE\" node=\"3PyXc8TBXq0\" resolve=\"DefaultAuthorHandler\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"3clFbF\" id=\"2A42BChq9xT\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"2A42BChq9xU\" role=\"3clFbG\">\n<node concept=\"37vLTw\" id=\"2A42BChq9xV\" role=\"2Oq$k0\">\n<ref role=\"3uigEE\" to=\"cgcg:~AbstractHandler\" resolve=\"AbstractHandler\" />\n</node>\n</node>\n+ <node concept=\"312cEu\" id=\"3PyXc8TBXq0\">\n+ <property role=\"TrG5h\" value=\"DefaultAuthorHandler\" />\n+ <node concept=\"3clFb_\" id=\"3PyXc8TBXq1\" role=\"jymVt\">\n+ <property role=\"TrG5h\" value=\"handle\" />\n+ <node concept=\"3Tm1VV\" id=\"3PyXc8TBXq2\" role=\"1B3o_S\" />\n+ <node concept=\"3cqZAl\" id=\"3PyXc8TBXq3\" role=\"3clF45\" />\n+ <node concept=\"37vLTG\" id=\"3PyXc8TBXq4\" role=\"3clF46\">\n+ <property role=\"TrG5h\" value=\"target\" />\n+ <node concept=\"17QB3L\" id=\"3PyXc8TBXq5\" role=\"1tU5fm\" />\n+ </node>\n+ <node concept=\"37vLTG\" id=\"3PyXc8TBXq6\" role=\"3clF46\">\n+ <property role=\"TrG5h\" value=\"baseRequest\" />\n+ <node concept=\"3uibUv\" id=\"3PyXc8TBXq7\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"m2xw:~Request\" resolve=\"Request\" />\n+ </node>\n+ </node>\n+ <node concept=\"37vLTG\" id=\"3PyXc8TBXq8\" role=\"3clF46\">\n+ <property role=\"TrG5h\" value=\"request\" />\n+ <node concept=\"3uibUv\" id=\"3PyXc8TBXq9\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"nwfd:~HttpServletRequest\" resolve=\"HttpServletRequest\" />\n+ </node>\n+ </node>\n+ <node concept=\"37vLTG\" id=\"3PyXc8TBXqa\" role=\"3clF46\">\n+ <property role=\"TrG5h\" value=\"response\" />\n+ <node concept=\"3uibUv\" id=\"3PyXc8TBXqb\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"nwfd:~HttpServletResponse\" resolve=\"HttpServletResponse\" />\n+ </node>\n+ </node>\n+ <node concept=\"3uibUv\" id=\"3PyXc8TBXqc\" role=\"Sfmx6\">\n+ <ref role=\"3uigEE\" to=\"guwi:~IOException\" resolve=\"IOException\" />\n+ </node>\n+ <node concept=\"3uibUv\" id=\"3PyXc8TBXqd\" role=\"Sfmx6\">\n+ <ref role=\"3uigEE\" to=\"opgt:~ServletException\" resolve=\"ServletException\" />\n+ </node>\n+ <node concept=\"3clFbS\" id=\"3PyXc8TBXqe\" role=\"3clF47\">\n+ <node concept=\"3clFbJ\" id=\"3PyXc8TCho1\" role=\"3cqZAp\">\n+ <node concept=\"3clFbS\" id=\"3PyXc8TCho3\" role=\"3clFbx\">\n+ <node concept=\"3cpWs8\" id=\"3PyXc8TCgRw\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"3PyXc8TCgRx\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"user\" />\n+ <node concept=\"17QB3L\" id=\"3PyXc8TCh40\" role=\"1tU5fm\" />\n+ <node concept=\"2OqwBi\" id=\"3PyXc8TCgRy\" role=\"33vP2m\">\n+ <node concept=\"37vLTw\" id=\"3PyXc8TCgRz\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"3PyXc8TBXq8\" resolve=\"request\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"3PyXc8TCgR$\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"nwfd:~HttpServletRequest.getHeader(java.lang.String)\" resolve=\"getHeader\" />\n+ <node concept=\"Xl_RD\" id=\"3PyXc8TCgR_\" role=\"37wK5m\">\n+ <property role=\"Xl_RC\" value=\"X-Forwarded-Email\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbJ\" id=\"3PyXc8TCpuX\" role=\"3cqZAp\">\n+ <node concept=\"3clFbS\" id=\"3PyXc8TCpuZ\" role=\"3clFbx\">\n+ <node concept=\"3clFbF\" id=\"3PyXc8TCrDS\" role=\"3cqZAp\">\n+ <node concept=\"2YIFZM\" id=\"3PyXc8TCJq3\" role=\"3clFbG\">\n+ <ref role=\"37wK5l\" to=\"ia5i:3PyXc8TCJbF\" resolve=\"setInstanceOwner\" />\n+ <ref role=\"1Pybhc\" to=\"ia5i:5MA9wbc5skS\" resolve=\"AuthorOverride\" />\n+ <node concept=\"37vLTw\" id=\"3PyXc8TCJKk\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"3PyXc8TCgRx\" resolve=\"user\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"3PyXc8TCql9\" role=\"3clFbw\">\n+ <node concept=\"37vLTw\" id=\"3PyXc8TCpPt\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"3PyXc8TCgRx\" resolve=\"user\" />\n+ </node>\n+ <node concept=\"17RvpY\" id=\"3PyXc8TCqKw\" role=\"2OqNvi\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbC\" id=\"3PyXc8TCoaH\" role=\"3clFbw\">\n+ <node concept=\"Rm8GO\" id=\"3PyXc8TCoSP\" role=\"3uHU7w\">\n+ <ref role=\"Rm8GQ\" to=\"nhvc:DOf0T7u4WT\" resolve=\"PROJECTOR\" />\n+ <ref role=\"1Px2BO\" to=\"nhvc:5Le8ZRJdWor\" resolve=\"EModelixExecutionMode\" />\n+ </node>\n+ <node concept=\"2YIFZM\" id=\"3PyXc8TCnH8\" role=\"3uHU7B\">\n+ <ref role=\"37wK5l\" to=\"nhvc:54meraTAO3V\" resolve=\"getExecutionMode\" />\n+ <ref role=\"1Pybhc\" to=\"nhvc:7Qo$o7gTdFI\" resolve=\"ModelixConfigurationSystemProperties\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"2AHcQZ\" id=\"3PyXc8TBXtg\" role=\"2AJF6D\">\n+ <ref role=\"2AI5Lk\" to=\"wyt6:~Override\" resolve=\"Override\" />\n+ </node>\n+ </node>\n+ <node concept=\"2tJIrI\" id=\"3PyXc8TBXth\" role=\"jymVt\" />\n+ <node concept=\"3Tm1VV\" id=\"3PyXc8TBXFq\" role=\"1B3o_S\" />\n+ <node concept=\"3uibUv\" id=\"3PyXc8TBXFr\" role=\"1zkMxy\">\n+ <ref role=\"3uigEE\" to=\"cgcg:~AbstractHandler\" resolve=\"AbstractHandler\" />\n+ </node>\n+ </node>\n</model>\n"
},
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.ui.server/org.modelix.ui.server.msd",
"new_path": "mps/org.modelix.ui.server/org.modelix.ui.server.msd",
"diff": "<dependency reexport=\"false\">5622e615-959d-4843-9df6-ef04ee578c18(org.modelix.model.mpsadapters)</dependency>\n<dependency reexport=\"false\">1ed103c3-3aa6-49b7-9c21-6765ee11f224(MPS.Editor)</dependency>\n<dependency reexport=\"false\">0a2651ab-f212-45c2-a2f0-343e76cbc26b(org.modelix.model.client)</dependency>\n+ <dependency reexport=\"false\">acf6d2e2-4f00-4425-b7e9-fbf011feddf1(org.modelix.common)</dependency>\n</dependencies>\n<languageVersions>\n<language slang=\"l:bc963c22-d419-49b6-8543-ea411eb9d3a1:de.q60.mps.polymorphicfunctions\" version=\"0\" />\n<module reference=\"a1250a4d-c090-42c3-ad7c-d298a3357dd4(jetbrains.mps.make.runtime)\" version=\"0\" />\n<module reference=\"df9d410f-2ebb-43f7-893a-483a4f085250(jetbrains.mps.smodel.resources)\" version=\"0\" />\n<module reference=\"b0f8641f-bd77-4421-8425-30d9088a82f7(org.apache.commons)\" version=\"0\" />\n+ <module reference=\"acf6d2e2-4f00-4425-b7e9-fbf011feddf1(org.modelix.common)\" version=\"0\" />\n<module reference=\"fc3c2aa8-0d4b-463f-a774-40d450aa04a0(org.modelix.jetty)\" version=\"0\" />\n<module reference=\"87f4b21e-a3a5-459e-a54b-408fd9eb7350(org.modelix.lib)\" version=\"0\" />\n<module reference=\"cc99dce1-49f3-4392-8dbf-e22ca47bd0af(org.modelix.model.api)\" version=\"0\" />\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Author was missing when changes were done in projector |
426,496 | 14.12.2021 16:40:57 | -3,600 | 7a18d8bb00ed56ec9fa800b712762a110f9b8ff2 | History still contained "<no email>" in the author field | [
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"diff": "<node concept=\"17QB3L\" id=\"5MA9wbc62$o\" role=\"3clF45\" />\n<node concept=\"3Tm1VV\" id=\"7$Qv9nHUE2a\" role=\"1B3o_S\" />\n<node concept=\"3clFbS\" id=\"5MA9wbc62$q\" role=\"3clF47\">\n+ <node concept=\"3cpWs8\" id=\"6LY23Ps39Yg\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"6LY23Ps39Yh\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"email\" />\n+ <node concept=\"17QB3L\" id=\"6LY23Ps33fY\" role=\"1tU5fm\" />\n+ <node concept=\"1rXfSq\" id=\"6LY23Ps39Yi\" role=\"33vP2m\">\n+ <ref role=\"37wK5l\" node=\"2EzI5qKowuu\" resolve=\"getEmail\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbJ\" id=\"6LY23Ps3yCh\" role=\"3cqZAp\">\n+ <node concept=\"3clFbS\" id=\"6LY23Ps3yCj\" role=\"3clFbx\">\n+ <node concept=\"3clFbF\" id=\"6LY23Ps3zTh\" role=\"3cqZAp\">\n+ <node concept=\"37vLTI\" id=\"6LY23Ps3$of\" role=\"3clFbG\">\n+ <node concept=\"10Nm6u\" id=\"6LY23Ps3$$N\" role=\"37vLTx\" />\n+ <node concept=\"37vLTw\" id=\"6LY23Ps3zTf\" role=\"37vLTJ\">\n+ <ref role=\"3cqZAo\" node=\"6LY23Ps39Yh\" resolve=\"email\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"17R0WA\" id=\"6LY23Ps3zot\" role=\"3clFbw\">\n+ <node concept=\"Xl_RD\" id=\"6LY23Ps3zAc\" role=\"3uHU7w\">\n+ <property role=\"Xl_RC\" value=\"<no email>\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"6LY23Ps3yOU\" role=\"3uHU7B\">\n+ <ref role=\"3cqZAo\" node=\"6LY23Ps39Yh\" resolve=\"email\" />\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"3clFbF\" id=\"5MA9wbc6czO\" role=\"3cqZAp\">\n<node concept=\"2YIFZM\" id=\"5MA9wbc6D2Y\" role=\"3clFbG\">\n<ref role=\"37wK5l\" to=\"ia5i:5MA9wbc5wh4\" resolve=\"apply\" />\n<ref role=\"1Pybhd\" to=\"ia5i:5MA9wbc5skS\" resolve=\"AuthorOverride\" />\n- <node concept=\"1rXfSq\" id=\"5MA9wbc6cVQ\" role=\"37wK5m\">\n- <ref role=\"37wK5l\" node=\"2EzI5qKowuu\" resolve=\"getEmail\" />\n+ <node concept=\"37vLTw\" id=\"6LY23Ps39Yj\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"6LY23Ps39Yh\" resolve=\"email\" />\n</node>\n</node>\n</node>\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | History still contained "<no email>" in the author field |
426,504 | 15.12.2021 09:53:28 | -3,600 | 9ba4236be07bfac3e74322093aea8893a6a28327 | allow partial loading of repositories | [
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.history.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.history.mps",
"diff": "<import index=\"tpck\" ref=\"r:00000000-0000-4000-0000-011c89590288(jetbrains.mps.lang.core.structure)\" />\n<import index=\"bd8o\" ref=\"498d89d2-c2e9-11e2-ad49-6cf049e62fe5/java:com.intellij.openapi.application(MPS.IDEA/)\" />\n<import index=\"3a50\" ref=\"742f6602-5a2f-4313-aa6e-ae1cd4ffdc61/java:jetbrains.mps.ide(MPS.Platform/)\" />\n- <import index=\"w1kc\" ref=\"6ed54515-acc8-4d1e-a16c-9fd6cfe951ea/java:jetbrains.mps.smodel(MPS.Core/)\" />\n<import index=\"fbzs\" ref=\"6354ebe7-c22a-4a0f-ac54-50b52ab9b065/java:java.awt.geom(JDK/)\" />\n<import index=\"z2i8\" ref=\"498d89d2-c2e9-11e2-ad49-6cf049e62fe5/java:com.intellij.icons(MPS.IDEA/)\" />\n<import index=\"xkhl\" ref=\"0a2651ab-f212-45c2-a2f0-343e76cbc26b/java:org.modelix.model.lazy(org.modelix.model.client/)\" />\n<node concept=\"3clFbS\" id=\"5JOZTo7orxL\" role=\"1bW5cS\">\n<node concept=\"3clFbF\" id=\"5JOZTo7ozTK\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"5JOZTo7orxU\" role=\"3clFbG\">\n+ <node concept=\"2OqwBi\" id=\"7lOG3NPqTwn\" role=\"2Oq$k0\">\n<node concept=\"2OqwBi\" id=\"5JOZTo7orxV\" role=\"2Oq$k0\">\n<node concept=\"3$u5V9\" id=\"5JOZTo7orxW\" role=\"2OqNvi\">\n<node concept=\"1bVj0M\" id=\"5JOZTo7orxX\" role=\"23t8la\">\n<node concept=\"3uibUv\" id=\"5JOZTo7ory1\" role=\"1tU5fm\">\n<ref role=\"3uigEE\" to=\"rgfa:~TreeNode\" resolve=\"TreeNode\" />\n</node>\n- <node concept=\"3K4zz7\" id=\"5JOZTo7ory2\" role=\"33vP2m\">\n+ <node concept=\"10Nm6u\" id=\"7lOG3NPreZZ\" role=\"33vP2m\" />\n+ </node>\n+ </node>\n+ <node concept=\"3J1_TO\" id=\"7lOG3NPqirW\" role=\"3cqZAp\">\n+ <node concept=\"3uVAMA\" id=\"7lOG3NPqlly\" role=\"1zxBo5\">\n+ <node concept=\"XOnhg\" id=\"7lOG3NPqllz\" role=\"1zc67B\">\n+ <property role=\"TrG5h\" value=\"t\" />\n+ <node concept=\"nSUau\" id=\"7lOG3NPqll$\" role=\"1tU5fm\">\n+ <node concept=\"3uibUv\" id=\"7lOG3NPqm4u\" role=\"nSUat\">\n+ <ref role=\"3uigEE\" to=\"wyt6:~Throwable\" resolve=\"Throwable\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbS\" id=\"7lOG3NPqll_\" role=\"1zc67A\">\n+ <node concept=\"3clFbF\" id=\"7lOG3NPqmUs\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"7lOG3NPqnFk\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"7lOG3NPqmUr\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"7lOG3NPqllz\" resolve=\"t\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"7lOG3NPqof7\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"wyt6:~Throwable.printStackTrace()\" resolve=\"printStackTrace\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbF\" id=\"7lOG3NPsxrs\" role=\"3cqZAp\">\n+ <node concept=\"2YIFZM\" id=\"7lOG3NPsxTq\" role=\"3clFbG\">\n+ <ref role=\"37wK5l\" to=\"csg2:7lOG3NPsfuK\" resolve=\"notifyError\" />\n+ <ref role=\"1Pybhc\" to=\"csg2:7lOG3NPrKOz\" resolve=\"ModelixNotifications\" />\n+ <node concept=\"Xl_RD\" id=\"7lOG3NPsyeq\" role=\"37wK5m\">\n+ <property role=\"Xl_RC\" value=\"Repository in invalid state\" />\n+ </node>\n+ <node concept=\"3cpWs3\" id=\"7lOG3NPsyer\" role=\"37wK5m\">\n+ <node concept=\"2OqwBi\" id=\"7lOG3NPsyes\" role=\"3uHU7w\">\n+ <node concept=\"37vLTw\" id=\"7lOG3NPsyet\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"7lOG3NPqllz\" resolve=\"t\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"7lOG3NPsyeu\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"wyt6:~Throwable.getMessage()\" resolve=\"getMessage\" />\n+ </node>\n+ </node>\n+ <node concept=\"3cpWs3\" id=\"7lOG3NPsyev\" role=\"3uHU7B\">\n+ <node concept=\"3cpWs3\" id=\"7lOG3NPsyew\" role=\"3uHU7B\">\n+ <node concept=\"Xl_RD\" id=\"7lOG3NPsyex\" role=\"3uHU7B\">\n+ <property role=\"Xl_RC\" value=\"Repository \" />\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"7lOG3NPsyey\" role=\"3uHU7w\">\n+ <node concept=\"37vLTw\" id=\"7lOG3NPsyez\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"5JOZTo7oryg\" resolve=\"it\" />\n+ </node>\n+ <node concept=\"3TrcHB\" id=\"7lOG3NPsye$\" role=\"2OqNvi\">\n+ <ref role=\"3TsBF5\" to=\"w7di:6aRQr1WVbN6\" resolve=\"id\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"Xl_RD\" id=\"7lOG3NPsye_\" role=\"3uHU7w\">\n+ <property role=\"Xl_RC\" value=\" cannot be loaded: \" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbS\" id=\"7lOG3NPqirY\" role=\"1zxBo7\">\n+ <node concept=\"3clFbF\" id=\"7lOG3NPqj_r\" role=\"3cqZAp\">\n+ <node concept=\"37vLTI\" id=\"7lOG3NPqj_t\" role=\"3clFbG\">\n+ <node concept=\"3K4zz7\" id=\"5JOZTo7ory2\" role=\"37vLTx\">\n<node concept=\"3EllGN\" id=\"5JOZTo7ory3\" role=\"3K4E3e\">\n<node concept=\"37vLTw\" id=\"5JOZTo7ory4\" role=\"3ElVtu\">\n<ref role=\"3cqZAo\" node=\"5JOZTo7oryg\" resolve=\"it\" />\n</node>\n</node>\n</node>\n+ <node concept=\"37vLTw\" id=\"7lOG3NPqj_x\" role=\"37vLTJ\">\n+ <ref role=\"3cqZAo\" node=\"5JOZTo7ory0\" resolve=\"tn\" />\n+ </node>\n+ </node>\n+ </node>\n</node>\n</node>\n<node concept=\"3clFbF\" id=\"5JOZTo7orye\" role=\"3cqZAp\">\n</node>\n</node>\n</node>\n+ <node concept=\"1KnU$U\" id=\"7lOG3NPqUY_\" role=\"2OqNvi\" />\n+ </node>\n<node concept=\"ANE8D\" id=\"5JOZTo7oryl\" role=\"2OqNvi\" />\n</node>\n</node>\n"
},
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"diff": "<ref role=\"3cqZAo\" node=\"cwXJrjMCEw\" resolve=\"t\" />\n</node>\n</node>\n- <node concept=\"3clFbF\" id=\"1ydTf_swdUI\" role=\"3cqZAp\">\n- <node concept=\"2YIFZM\" id=\"1ydTf_swe5f\" role=\"3clFbG\">\n- <ref role=\"37wK5l\" to=\"fnpx:~Notifications$Bus.notify(com.intellij.notification.Notification)\" resolve=\"notify\" />\n- <ref role=\"1Pybhd\" to=\"fnpx:~Notifications$Bus\" resolve=\"Notifications.Bus\" />\n- <node concept=\"2ShNRf\" id=\"1ydTf_sweuI\" role=\"37wK5m\">\n- <node concept=\"1pGfFk\" id=\"1ydTf_swFJs\" role=\"2ShVmc\">\n- <ref role=\"37wK5l\" to=\"fnpx:~Notification.<init>(java.lang.String,java.lang.String,java.lang.String,com.intellij.notification.NotificationType)\" resolve=\"Notification\" />\n- <node concept=\"Xl_RD\" id=\"1ydTf_swFWG\" role=\"37wK5m\">\n- <property role=\"Xl_RC\" value=\"Modelix\" />\n- </node>\n- <node concept=\"3cpWs3\" id=\"1ydTf_swGJs\" role=\"37wK5m\">\n- <node concept=\"37vLTw\" id=\"1ydTf_swGJt\" role=\"3uHU7w\">\n+ <node concept=\"3clFbF\" id=\"7lOG3NPsvBz\" role=\"3cqZAp\">\n+ <node concept=\"2YIFZM\" id=\"7lOG3NPsvDH\" role=\"3clFbG\">\n+ <ref role=\"37wK5l\" node=\"7lOG3NPsfuK\" resolve=\"notifyError\" />\n+ <ref role=\"1Pybhd\" node=\"7lOG3NPrKOz\" resolve=\"ModelixNotifications\" />\n+ <node concept=\"3cpWs3\" id=\"7lOG3NPsvEu\" role=\"37wK5m\">\n+ <node concept=\"37vLTw\" id=\"7lOG3NPsvEv\" role=\"3uHU7w\">\n<ref role=\"3cqZAo\" node=\"1JFLVobfVqM\" resolve=\"url\" />\n</node>\n- <node concept=\"Xl_RD\" id=\"1ydTf_swGJu\" role=\"3uHU7B\">\n+ <node concept=\"Xl_RD\" id=\"7lOG3NPsvEw\" role=\"3uHU7B\">\n<property role=\"Xl_RC\" value=\"Failure while adding model server \" />\n</node>\n</node>\n- <node concept=\"2OqwBi\" id=\"1ydTf_swHoz\" role=\"37wK5m\">\n- <node concept=\"37vLTw\" id=\"1ydTf_swH4r\" role=\"2Oq$k0\">\n+ <node concept=\"2OqwBi\" id=\"7lOG3NPsvEx\" role=\"37wK5m\">\n+ <node concept=\"37vLTw\" id=\"7lOG3NPsvEy\" role=\"2Oq$k0\">\n<ref role=\"3cqZAo\" node=\"cwXJrjMCEw\" resolve=\"t\" />\n</node>\n- <node concept=\"liA8E\" id=\"1ydTf_swHKo\" role=\"2OqNvi\">\n+ <node concept=\"liA8E\" id=\"7lOG3NPsvEz\" role=\"2OqNvi\">\n<ref role=\"37wK5l\" to=\"wyt6:~Throwable.getMessage()\" resolve=\"getMessage\" />\n</node>\n</node>\n- <node concept=\"Rm8GO\" id=\"1ydTf_swIBL\" role=\"37wK5m\">\n- <ref role=\"Rm8GQ\" to=\"fnpx:~NotificationType.ERROR\" resolve=\"ERROR\" />\n- <ref role=\"1Px2BO\" to=\"fnpx:~NotificationType\" resolve=\"NotificationType\" />\n- </node>\n- </node>\n- </node>\n</node>\n</node>\n</node>\n<node concept=\"3Tm1VV\" id=\"46h4oXMtHnn\" role=\"1B3o_S\" />\n<node concept=\"3cqZAl\" id=\"46h4oXMtHno\" role=\"3clF45\" />\n<node concept=\"3clFbS\" id=\"46h4oXMtHnp\" role=\"3clF47\">\n- <node concept=\"3clFbF\" id=\"75_St3$ZyQz\" role=\"3cqZAp\">\n- <node concept=\"2YIFZM\" id=\"75_St3$ZEVU\" role=\"3clFbG\">\n- <ref role=\"1Pybhd\" to=\"fnpx:~Notifications$Bus\" resolve=\"Notifications.Bus\" />\n- <ref role=\"37wK5l\" to=\"fnpx:~Notifications$Bus.notify(com.intellij.notification.Notification)\" resolve=\"notify\" />\n- <node concept=\"2ShNRf\" id=\"75_St3$ZEVV\" role=\"37wK5m\">\n- <node concept=\"1pGfFk\" id=\"75_St3$ZEVW\" role=\"2ShVmc\">\n- <ref role=\"37wK5l\" to=\"fnpx:~Notification.<init>(java.lang.String,java.lang.String,java.lang.String,com.intellij.notification.NotificationType)\" resolve=\"Notification\" />\n- <node concept=\"Xl_RD\" id=\"75_St3$ZEVX\" role=\"37wK5m\">\n- <property role=\"Xl_RC\" value=\"Modelix\" />\n- </node>\n- <node concept=\"Xl_RD\" id=\"75_St3$ZEVY\" role=\"37wK5m\">\n+ <node concept=\"3clFbF\" id=\"7lOG3NPsqEP\" role=\"3cqZAp\">\n+ <node concept=\"2YIFZM\" id=\"7lOG3NPsrDA\" role=\"3clFbG\">\n+ <ref role=\"37wK5l\" node=\"7lOG3NPsfuK\" resolve=\"notifyError\" />\n+ <ref role=\"1Pybhd\" node=\"7lOG3NPrKOz\" resolve=\"ModelixNotifications\" />\n+ <node concept=\"Xl_RD\" id=\"7lOG3NPsrF3\" role=\"37wK5m\">\n<property role=\"Xl_RC\" value=\"Forbidden Access\" />\n</node>\n- <node concept=\"3cpWs3\" id=\"75_St3$ZIXK\" role=\"37wK5m\">\n- <node concept=\"3cpWs3\" id=\"75_St3$ZIXL\" role=\"3uHU7B\">\n- <node concept=\"Xl_RD\" id=\"75_St3$ZIXM\" role=\"3uHU7B\">\n+ <node concept=\"3cpWs3\" id=\"7lOG3NPsrF4\" role=\"37wK5m\">\n+ <node concept=\"3cpWs3\" id=\"7lOG3NPsrF5\" role=\"3uHU7B\">\n+ <node concept=\"Xl_RD\" id=\"7lOG3NPsrF6\" role=\"3uHU7B\">\n<property role=\"Xl_RC\" value=\"Unauthorized to connect to Model Server \" />\n</node>\n- <node concept=\"37vLTw\" id=\"75_St3$ZIXN\" role=\"3uHU7w\">\n+ <node concept=\"37vLTw\" id=\"7lOG3NPsrF7\" role=\"3uHU7w\">\n<ref role=\"3cqZAo\" node=\"46h4oXMu_sX\" resolve=\"baseUrl\" />\n</node>\n</node>\n- <node concept=\"Xl_RD\" id=\"75_St3$ZIXO\" role=\"3uHU7w\">\n+ <node concept=\"Xl_RD\" id=\"7lOG3NPsrF8\" role=\"3uHU7w\">\n<property role=\"Xl_RC\" value=\". Check you are logged in and have the right to access that Model Server\" />\n</node>\n</node>\n- <node concept=\"Rm8GO\" id=\"75_St3$ZEW0\" role=\"37wK5m\">\n- <ref role=\"1Px2BO\" to=\"fnpx:~NotificationType\" resolve=\"NotificationType\" />\n- <ref role=\"Rm8GQ\" to=\"fnpx:~NotificationType.ERROR\" resolve=\"ERROR\" />\n- </node>\n- </node>\n- </node>\n</node>\n</node>\n- <node concept=\"3clFbH\" id=\"75_St3$Zy_d\" role=\"3cqZAp\" />\n</node>\n<node concept=\"2AHcQZ\" id=\"46h4oXMtHny\" role=\"2AJF6D\">\n<ref role=\"2AI5Lk\" to=\"wyt6:~Override\" resolve=\"Override\" />\n</node>\n<node concept=\"3clFbJ\" id=\"7PLbr3VCxL4\" role=\"3cqZAp\">\n<node concept=\"3clFbS\" id=\"7PLbr3VCxL6\" role=\"3clFbx\">\n- <node concept=\"3clFbF\" id=\"4S9EsdAOLoO\" role=\"3cqZAp\">\n- <node concept=\"2YIFZM\" id=\"4S9EsdAOLO$\" role=\"3clFbG\">\n- <ref role=\"37wK5l\" to=\"fnpx:~Notifications$Bus.notify(com.intellij.notification.Notification)\" resolve=\"notify\" />\n- <ref role=\"1Pybhd\" to=\"fnpx:~Notifications$Bus\" resolve=\"Notifications.Bus\" />\n- <node concept=\"2ShNRf\" id=\"4S9EsdAOM2j\" role=\"37wK5m\">\n- <node concept=\"1pGfFk\" id=\"4S9EsdAPmEt\" role=\"2ShVmc\">\n- <ref role=\"37wK5l\" to=\"fnpx:~Notification.<init>(java.lang.String,java.lang.String,java.lang.String,com.intellij.notification.NotificationType)\" resolve=\"Notification\" />\n- <node concept=\"Xl_RD\" id=\"4S9EsdAPpnE\" role=\"37wK5m\">\n- <property role=\"Xl_RC\" value=\"modelix\" />\n- </node>\n- <node concept=\"Xl_RD\" id=\"4S9EsdAPqr_\" role=\"37wK5m\">\n+ <node concept=\"3clFbF\" id=\"7lOG3NPscgG\" role=\"3cqZAp\">\n+ <node concept=\"2YIFZM\" id=\"7lOG3NPsh9b\" role=\"3clFbG\">\n+ <ref role=\"37wK5l\" node=\"7lOG3NPsfuK\" resolve=\"notifyError\" />\n+ <ref role=\"1Pybhd\" node=\"7lOG3NPrKOz\" resolve=\"ModelixNotifications\" />\n+ <node concept=\"Xl_RD\" id=\"7lOG3NPsh9A\" role=\"37wK5m\">\n<property role=\"Xl_RC\" value=\"Module without ID\" />\n</node>\n- <node concept=\"3cpWs3\" id=\"4S9EsdAPt6E\" role=\"37wK5m\">\n- <node concept=\"Xl_RD\" id=\"4S9EsdAPtk9\" role=\"3uHU7w\">\n+ <node concept=\"3cpWs3\" id=\"7lOG3NPsh9B\" role=\"37wK5m\">\n+ <node concept=\"Xl_RD\" id=\"7lOG3NPsh9C\" role=\"3uHU7w\">\n<property role=\"Xl_RC\" value=\" has been stored without an ID. Please ID and check it out again\" />\n</node>\n- <node concept=\"3cpWs3\" id=\"4S9EsdAPs7K\" role=\"3uHU7B\">\n- <node concept=\"Xl_RD\" id=\"4S9EsdAPqLV\" role=\"3uHU7B\">\n+ <node concept=\"3cpWs3\" id=\"7lOG3NPsh9D\" role=\"3uHU7B\">\n+ <node concept=\"Xl_RD\" id=\"7lOG3NPsh9E\" role=\"3uHU7B\">\n<property role=\"Xl_RC\" value=\"Module \" />\n</node>\n- <node concept=\"37vLTw\" id=\"4S9EsdAPsqi\" role=\"3uHU7w\">\n+ <node concept=\"37vLTw\" id=\"7lOG3NPsh9F\" role=\"3uHU7w\">\n<ref role=\"3cqZAo\" node=\"29etMtbjRmI\" resolve=\"name\" />\n</node>\n</node>\n</node>\n- <node concept=\"Rm8GO\" id=\"4S9EsdAPBGn\" role=\"37wK5m\">\n- <ref role=\"Rm8GQ\" to=\"fnpx:~NotificationType.ERROR\" resolve=\"ERROR\" />\n- <ref role=\"1Px2BO\" to=\"fnpx:~NotificationType\" resolve=\"NotificationType\" />\n- </node>\n- </node>\n- </node>\n</node>\n</node>\n<node concept=\"3cpWs6\" id=\"4S9EsdAPvte\" role=\"3cqZAp\">\n</node>\n</node>\n</node>\n+ <node concept=\"312cEu\" id=\"7lOG3NPrKOz\">\n+ <property role=\"3GE5qa\" value=\"util\" />\n+ <property role=\"TrG5h\" value=\"ModelixNotifications\" />\n+ <node concept=\"Wx3nA\" id=\"7lOG3NPs_Yi\" role=\"jymVt\">\n+ <property role=\"TrG5h\" value=\"GROUP_ID\" />\n+ <property role=\"3TUv4t\" value=\"true\" />\n+ <node concept=\"3Tm6S6\" id=\"7lOG3NPs__p\" role=\"1B3o_S\" />\n+ <node concept=\"17QB3L\" id=\"7lOG3NPs_Y3\" role=\"1tU5fm\" />\n+ <node concept=\"Xl_RD\" id=\"7lOG3NPsAbv\" role=\"33vP2m\">\n+ <property role=\"Xl_RC\" value=\"modelix\" />\n+ </node>\n+ </node>\n+ <node concept=\"2YIFZL\" id=\"7lOG3NPsfuK\" role=\"jymVt\">\n+ <property role=\"TrG5h\" value=\"notifyError\" />\n+ <node concept=\"3clFbS\" id=\"7lOG3NPsfuM\" role=\"3clF47\">\n+ <node concept=\"3clFbF\" id=\"7lOG3NPsfuN\" role=\"3cqZAp\">\n+ <node concept=\"2YIFZM\" id=\"7lOG3NPsfuO\" role=\"3clFbG\">\n+ <ref role=\"37wK5l\" to=\"fnpx:~Notifications$Bus.notify(com.intellij.notification.Notification)\" resolve=\"notify\" />\n+ <ref role=\"1Pybhd\" to=\"fnpx:~Notifications$Bus\" resolve=\"Notifications.Bus\" />\n+ <node concept=\"2ShNRf\" id=\"7lOG3NPsfuP\" role=\"37wK5m\">\n+ <node concept=\"1pGfFk\" id=\"7lOG3NPsfuQ\" role=\"2ShVmc\">\n+ <ref role=\"37wK5l\" to=\"fnpx:~Notification.<init>(java.lang.String,java.lang.String,java.lang.String,com.intellij.notification.NotificationType)\" resolve=\"Notification\" />\n+ <node concept=\"37vLTw\" id=\"7lOG3NPsAAh\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"7lOG3NPs_Yi\" resolve=\"GROUP_ID\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"7lOG3NPsfuS\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"7lOG3NPsfuX\" resolve=\"title\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"7lOG3NPsfuT\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"7lOG3NPsfuZ\" resolve=\"message\" />\n+ </node>\n+ <node concept=\"Rm8GO\" id=\"7lOG3NPsfuU\" role=\"37wK5m\">\n+ <ref role=\"Rm8GQ\" to=\"fnpx:~NotificationType.ERROR\" resolve=\"ERROR\" />\n+ <ref role=\"1Px2BO\" to=\"fnpx:~NotificationType\" resolve=\"NotificationType\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3cqZAl\" id=\"7lOG3NPsfuW\" role=\"3clF45\" />\n+ <node concept=\"37vLTG\" id=\"7lOG3NPsfuX\" role=\"3clF46\">\n+ <property role=\"TrG5h\" value=\"title\" />\n+ <node concept=\"17QB3L\" id=\"7lOG3NPsfuY\" role=\"1tU5fm\" />\n+ </node>\n+ <node concept=\"37vLTG\" id=\"7lOG3NPsfuZ\" role=\"3clF46\">\n+ <property role=\"TrG5h\" value=\"message\" />\n+ <node concept=\"17QB3L\" id=\"7lOG3NPsfv0\" role=\"1tU5fm\" />\n+ </node>\n+ <node concept=\"3Tm1VV\" id=\"7lOG3NPsfuV\" role=\"1B3o_S\" />\n+ </node>\n+ <node concept=\"2YIFZL\" id=\"7lOG3NPs_8z\" role=\"jymVt\">\n+ <property role=\"TrG5h\" value=\"notifyError\" />\n+ <node concept=\"3clFbS\" id=\"7lOG3NPs_8$\" role=\"3clF47\">\n+ <node concept=\"3clFbF\" id=\"7lOG3NPs_8_\" role=\"3cqZAp\">\n+ <node concept=\"2YIFZM\" id=\"7lOG3NPs_8A\" role=\"3clFbG\">\n+ <ref role=\"1Pybhd\" to=\"fnpx:~Notifications$Bus\" resolve=\"Notifications.Bus\" />\n+ <ref role=\"37wK5l\" to=\"fnpx:~Notifications$Bus.notify(com.intellij.notification.Notification,com.intellij.openapi.project.Project)\" resolve=\"notify\" />\n+ <node concept=\"2ShNRf\" id=\"7lOG3NPs_8B\" role=\"37wK5m\">\n+ <node concept=\"1pGfFk\" id=\"7lOG3NPs_8C\" role=\"2ShVmc\">\n+ <ref role=\"37wK5l\" to=\"fnpx:~Notification.<init>(java.lang.String,java.lang.String,java.lang.String,com.intellij.notification.NotificationType)\" resolve=\"Notification\" />\n+ <node concept=\"37vLTw\" id=\"7lOG3NPsACj\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"7lOG3NPs_Yi\" resolve=\"GROUP_ID\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"7lOG3NPs_8E\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"7lOG3NPs_8I\" resolve=\"title\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"7lOG3NPs_8F\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"7lOG3NPs_8K\" resolve=\"message\" />\n+ </node>\n+ <node concept=\"Rm8GO\" id=\"7lOG3NPs_8G\" role=\"37wK5m\">\n+ <ref role=\"1Px2BO\" to=\"fnpx:~NotificationType\" resolve=\"NotificationType\" />\n+ <ref role=\"Rm8GQ\" to=\"fnpx:~NotificationType.ERROR\" resolve=\"ERROR\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"2YIFZM\" id=\"fizU0316HO\" role=\"37wK5m\">\n+ <ref role=\"1Pybhd\" to=\"alof:~ProjectHelper\" resolve=\"ProjectHelper\" />\n+ <ref role=\"37wK5l\" to=\"alof:~ProjectHelper.toIdeaProject(jetbrains.mps.project.Project)\" resolve=\"toIdeaProject\" />\n+ <node concept=\"37vLTw\" id=\"7lOG3NPsFZl\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"7lOG3NPs_aQ\" resolve=\"mpsProject\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3cqZAl\" id=\"7lOG3NPs_8H\" role=\"3clF45\" />\n+ <node concept=\"37vLTG\" id=\"7lOG3NPs_8I\" role=\"3clF46\">\n+ <property role=\"TrG5h\" value=\"title\" />\n+ <node concept=\"17QB3L\" id=\"7lOG3NPs_8J\" role=\"1tU5fm\" />\n+ </node>\n+ <node concept=\"37vLTG\" id=\"7lOG3NPs_8K\" role=\"3clF46\">\n+ <property role=\"TrG5h\" value=\"message\" />\n+ <node concept=\"17QB3L\" id=\"7lOG3NPs_8L\" role=\"1tU5fm\" />\n+ </node>\n+ <node concept=\"37vLTG\" id=\"7lOG3NPs_aQ\" role=\"3clF46\">\n+ <property role=\"TrG5h\" value=\"mpsProject\" />\n+ <node concept=\"3uibUv\" id=\"7lOG3NPs_sc\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"z1c4:~MPSProject\" resolve=\"MPSProject\" />\n+ </node>\n+ </node>\n+ <node concept=\"3Tm1VV\" id=\"7lOG3NPs_8M\" role=\"1B3o_S\" />\n+ </node>\n+ <node concept=\"3Tm1VV\" id=\"7lOG3NPrKO$\" role=\"1B3o_S\" />\n+ </node>\n</model>\n"
},
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.plugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.plugin.mps",
"diff": "</node>\n<node concept=\"3clFbJ\" id=\"fizU030Hm0\" role=\"3cqZAp\">\n<node concept=\"3clFbS\" id=\"fizU030Hm2\" role=\"3clFbx\">\n- <node concept=\"3clFbF\" id=\"fizU030Poi\" role=\"3cqZAp\">\n- <node concept=\"2YIFZM\" id=\"fizU030Ppg\" role=\"3clFbG\">\n- <ref role=\"1Pybhc\" to=\"fnpx:~Notifications$Bus\" resolve=\"Notifications.Bus\" />\n- <ref role=\"37wK5l\" to=\"fnpx:~Notifications$Bus.notify(com.intellij.notification.Notification,com.intellij.openapi.project.Project)\" resolve=\"notify\" />\n- <node concept=\"2ShNRf\" id=\"fizU030PpG\" role=\"37wK5m\">\n- <node concept=\"1pGfFk\" id=\"fizU0311e_\" role=\"2ShVmc\">\n- <ref role=\"37wK5l\" to=\"fnpx:~Notification.<init>(java.lang.String,java.lang.String,java.lang.String,com.intellij.notification.NotificationType)\" resolve=\"Notification\" />\n- <node concept=\"Xl_RD\" id=\"fizU0311kj\" role=\"37wK5m\">\n- <property role=\"Xl_RC\" value=\"Modelix\" />\n- </node>\n- <node concept=\"Xl_RD\" id=\"fizU0311lH\" role=\"37wK5m\">\n+ <node concept=\"3clFbF\" id=\"7lOG3NPsDra\" role=\"3cqZAp\">\n+ <node concept=\"2YIFZM\" id=\"7lOG3NPsDvL\" role=\"3clFbG\">\n+ <ref role=\"1Pybhc\" to=\"csg2:7lOG3NPrKOz\" resolve=\"ModelixNotifications\" />\n+ <ref role=\"37wK5l\" to=\"csg2:7lOG3NPs_8z\" resolve=\"notifyError\" />\n+ <node concept=\"Xl_RD\" id=\"7lOG3NPsEce\" role=\"37wK5m\">\n<property role=\"Xl_RC\" value=\"Unable to unwrap concept\" />\n</node>\n- <node concept=\"3cpWs3\" id=\"fizU03154L\" role=\"37wK5m\">\n- <node concept=\"Xl_RD\" id=\"fizU03155u\" role=\"3uHU7w\">\n+ <node concept=\"3cpWs3\" id=\"7lOG3NPsEcf\" role=\"37wK5m\">\n+ <node concept=\"Xl_RD\" id=\"7lOG3NPsEcg\" role=\"3uHU7w\">\n<property role=\"Xl_RC\" value=\")\" />\n</node>\n- <node concept=\"3cpWs3\" id=\"fizU03131b\" role=\"3uHU7B\">\n- <node concept=\"3cpWs3\" id=\"fizU0312UL\" role=\"3uHU7B\">\n- <node concept=\"3cpWs3\" id=\"fizU03121g\" role=\"3uHU7B\">\n- <node concept=\"Xl_RD\" id=\"fizU0311rx\" role=\"3uHU7B\">\n+ <node concept=\"3cpWs3\" id=\"7lOG3NPsEch\" role=\"3uHU7B\">\n+ <node concept=\"3cpWs3\" id=\"7lOG3NPsEci\" role=\"3uHU7B\">\n+ <node concept=\"3cpWs3\" id=\"7lOG3NPsEcj\" role=\"3uHU7B\">\n+ <node concept=\"Xl_RD\" id=\"7lOG3NPsEck\" role=\"3uHU7B\">\n<property role=\"Xl_RC\" value=\"We were unable to unwrap concept \" />\n</node>\n- <node concept=\"2OqwBi\" id=\"fizU0312lN\" role=\"3uHU7w\">\n- <node concept=\"37vLTw\" id=\"fizU03122H\" role=\"2Oq$k0\">\n+ <node concept=\"2OqwBi\" id=\"7lOG3NPsEcl\" role=\"3uHU7w\">\n+ <node concept=\"37vLTw\" id=\"7lOG3NPsEcm\" role=\"2Oq$k0\">\n<ref role=\"3cqZAo\" node=\"4mhRRpyE_IH\" resolve=\"concept\" />\n</node>\n- <node concept=\"liA8E\" id=\"fizU0312vk\" role=\"2OqNvi\">\n+ <node concept=\"liA8E\" id=\"7lOG3NPsEcn\" role=\"2OqNvi\">\n<ref role=\"37wK5l\" to=\"jks5:~IConcept.getLongName()\" resolve=\"getLongName\" />\n</node>\n</node>\n</node>\n- <node concept=\"Xl_RD\" id=\"fizU0312Vc\" role=\"3uHU7w\">\n+ <node concept=\"Xl_RD\" id=\"7lOG3NPsEco\" role=\"3uHU7w\">\n<property role=\"Xl_RC\" value=\" (\" />\n</node>\n</node>\n- <node concept=\"2OqwBi\" id=\"fizU0313QJ\" role=\"3uHU7w\">\n- <node concept=\"2OqwBi\" id=\"fizU0313mE\" role=\"2Oq$k0\">\n- <node concept=\"37vLTw\" id=\"fizU03133k\" role=\"2Oq$k0\">\n+ <node concept=\"2OqwBi\" id=\"7lOG3NPsEcp\" role=\"3uHU7w\">\n+ <node concept=\"2OqwBi\" id=\"7lOG3NPsEcq\" role=\"2Oq$k0\">\n+ <node concept=\"37vLTw\" id=\"7lOG3NPsEcr\" role=\"2Oq$k0\">\n<ref role=\"3cqZAo\" node=\"4mhRRpyE_IH\" resolve=\"concept\" />\n</node>\n- <node concept=\"liA8E\" id=\"fizU0313wD\" role=\"2OqNvi\">\n+ <node concept=\"liA8E\" id=\"7lOG3NPsEcs\" role=\"2OqNvi\">\n<ref role=\"37wK5l\" to=\"wyt6:~Object.getClass()\" resolve=\"getClass\" />\n</node>\n</node>\n- <node concept=\"liA8E\" id=\"fizU0314GH\" role=\"2OqNvi\">\n+ <node concept=\"liA8E\" id=\"7lOG3NPsEct\" role=\"2OqNvi\">\n<ref role=\"37wK5l\" to=\"wyt6:~Class.getCanonicalName()\" resolve=\"getCanonicalName\" />\n</node>\n</node>\n</node>\n</node>\n- <node concept=\"Rm8GO\" id=\"fizU0315Nh\" role=\"37wK5m\">\n- <ref role=\"Rm8GQ\" to=\"fnpx:~NotificationType.ERROR\" resolve=\"ERROR\" />\n- <ref role=\"1Px2BO\" to=\"fnpx:~NotificationType\" resolve=\"NotificationType\" />\n- </node>\n- </node>\n- </node>\n- <node concept=\"2YIFZM\" id=\"fizU0316HO\" role=\"37wK5m\">\n- <ref role=\"37wK5l\" to=\"alof:~ProjectHelper.toIdeaProject(jetbrains.mps.project.Project)\" resolve=\"toIdeaProject\" />\n- <ref role=\"1Pybhc\" to=\"alof:~ProjectHelper\" resolve=\"ProjectHelper\" />\n- <node concept=\"37vLTw\" id=\"fizU0316LC\" role=\"37wK5m\">\n+ <node concept=\"37vLTw\" id=\"7lOG3NPsECT\" role=\"37wK5m\">\n<ref role=\"3cqZAo\" node=\"4mhRRpyEJ3q\" resolve=\"project\" />\n</node>\n</node>\n</node>\n- </node>\n<node concept=\"3cpWs6\" id=\"fizU0311jC\" role=\"3cqZAp\" />\n</node>\n<node concept=\"3clFbC\" id=\"fizU030K4c\" role=\"3clFbw\">\n"
},
{
"change_type": "MODIFY",
"old_path": "mps/test.org.modelix.model.mpsplugin/models/[email protected]",
"new_path": "mps/test.org.modelix.model.mpsplugin/models/[email protected]",
"diff": "<node concept=\"3cpWsn\" id=\"6hBdEE_hRAA\" role=\"3cpWs9\">\n<property role=\"TrG5h\" value=\"binding\" />\n<node concept=\"3uibUv\" id=\"6hBdEE_jeho\" role=\"1tU5fm\">\n- <ref role=\"3uigEE\" to=\"csg2:4_k_9wJt0QR\" resolve=\"_ModelBinding\" />\n+ <ref role=\"3uigEE\" to=\"csg2:4_k_9wJt0QR\" resolve=\"ModelBinding\" />\n</node>\n<node concept=\"2ShNRf\" id=\"6hBdEE_hVTh\" role=\"33vP2m\">\n<node concept=\"1pGfFk\" id=\"6hBdEE_hVDL\" role=\"2ShVmc\">\n- <ref role=\"37wK5l\" to=\"csg2:4_k_9wJtBLu\" resolve=\"_ModelBinding\" />\n+ <ref role=\"37wK5l\" to=\"csg2:4_k_9wJtBLu\" resolve=\"ModelBinding\" />\n<node concept=\"37vLTw\" id=\"6hBdEE_j8IQ\" role=\"37wK5m\">\n<ref role=\"3cqZAo\" node=\"6hBdEE_j49l\" resolve=\"modelNodeId\" />\n</node>\n<ref role=\"37wK5l\" to=\"csg2:74bn2Kw$if_\" resolve=\"setOwner\" />\n<node concept=\"2ShNRf\" id=\"6hBdEE_zE7A\" role=\"37wK5m\">\n<node concept=\"1pGfFk\" id=\"6hBdEE_zISg\" role=\"2ShVmc\">\n- <ref role=\"37wK5l\" to=\"csg2:6hBdEE_zKnQ\" resolve=\"_RootBinding\" />\n+ <ref role=\"37wK5l\" to=\"csg2:6hBdEE_zKnQ\" resolve=\"RootBinding\" />\n<node concept=\"2ShNRf\" id=\"6hBdEE_$q$f\" role=\"37wK5m\">\n<node concept=\"1pGfFk\" id=\"6hBdEE_$ray\" role=\"2ShVmc\">\n<ref role=\"37wK5l\" to=\"csg2:6hBdEE_zUqA\" resolve=\"TestCloudRepository\" />\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | allow partial loading of repositories |
426,496 | 15.12.2021 14:12:31 | -3,600 | 615e170e9758419cd7cc4f86fc253844bed61b83 | /history/ page is now part of the model server | [
{
"change_type": "MODIFY",
"old_path": "docker-build-model.sh",
"new_path": "docker-build-model.sh",
"diff": "#!/bin/sh\n+set -e\n+\nTAG=$( ./modelix-version.sh )\n+(\ncd model-server\ndocker build --no-cache -t modelix/modelix-model .\n+)\n-cd ..\ndocker tag modelix/modelix-model:latest \"modelix/modelix-model:${TAG}\"\nsed -i.bak -E \"s/(image:.*:).*/\\1${TAG}/\" kubernetes/common/model-deployment.yaml\nrm kubernetes/common/model-deployment.yaml.bak\n"
},
{
"change_type": "MODIFY",
"old_path": "model-client/src/commonMain/kotlin/org/modelix/model/lazy/RepositoryId.kt",
"new_path": "model-client/src/commonMain/kotlin/org/modelix/model/lazy/RepositoryId.kt",
"diff": "@@ -23,16 +23,20 @@ data class RepositoryId(val id: String) {\nfun getBranchKey(branchName: String?): String {\nvar branchName = branchName\nif (branchName == null || branchName.isEmpty()) {\n- branchName = \"master\"\n+ branchName = DEFAULT_BRANCH\n}\nreturn \"branch_\" + id + \"_\" + branchName\n}\n+ fun getBranchKey(): String = getBranchKey(null)\n+\noverride fun toString(): String {\nreturn id\n}\ncompanion object {\n+ const val DEFAULT_BRANCH = \"master\"\n+\n@JvmStatic\nfun random(): RepositoryId {\nreturn RepositoryId(randomUUID())\n"
},
{
"change_type": "MODIFY",
"old_path": "model-server/build.gradle",
"new_path": "model-server/build.gradle",
"diff": "@@ -16,28 +16,33 @@ compileJava {\n}\ndependencies {\n- compile group: 'org.json', name: 'json', version:'20180813'\n- compile group: 'org.java-websocket', name: 'Java-WebSocket', version:'1.4.0'\n- compile group: 'org.apache.commons', name: 'commons-collections4', version:'4.4'\n- compile group: 'io.lettuce', name: 'lettuce-core', version:'5.1.8.RELEASE'\n- compile group: 'ch.qos.logback', name: 'logback-classic', version:'1.2.7'\n+ implementation group: 'org.modelix', name: 'model-api', version: \"$mpsExtensionsVersion\"\n+ implementation project(':model-client')\n+ implementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: kotlinVersion\n+ implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10'\n+\n+ implementation group: 'org.json', name: 'json', version:'20180813'\n+ implementation group: 'org.java-websocket', name: 'Java-WebSocket', version:'1.4.0'\n+ implementation group: 'org.apache.commons', name: 'commons-collections4', version:'4.4'\n+ implementation group: 'io.lettuce', name: 'lettuce-core', version:'5.1.8.RELEASE'\n+ implementation group: 'ch.qos.logback', name: 'logback-classic', version:'1.2.7'\ndef igniteVersion = '2.10.0'\n- compile group: 'org.apache.ignite', name: 'ignite-core', version: igniteVersion\n- compile group: 'org.apache.ignite', name: 'ignite-spring', version: igniteVersion\n- compile group: 'org.apache.ignite', name: 'ignite-indexing', version: igniteVersion\n+ implementation group: 'org.apache.ignite', name: 'ignite-core', version: igniteVersion\n+ implementation group: 'org.apache.ignite', name: 'ignite-spring', version: igniteVersion\n+ implementation group: 'org.apache.ignite', name: 'ignite-indexing', version: igniteVersion\n- compile group: 'org.postgresql', name: 'postgresql', version:'42.2.14'\n+ implementation group: 'org.postgresql', name: 'postgresql', version:'42.2.14'\n- compile group: 'org.eclipse.jetty', name: 'jetty-server', version: '9.4.21.v20190926'\n- compile group: 'org.eclipse.jetty.websocket', name: 'websocket-servlet', version: '9.4.21.v20190926'\n- compile group: 'org.eclipse.jetty', name: 'jetty-servlet', version: '9.4.21.v20190926'\n- compile group: 'org.eclipse.jetty.websocket', name: 'websocket-server', version: '9.4.21.v20190926'\n- compile group: 'org.eclipse.jetty', name: 'jetty-servlets', version: '9.4.21.v20190926'\n+ implementation group: 'org.eclipse.jetty', name: 'jetty-server', version: '9.4.21.v20190926'\n+ implementation group: 'org.eclipse.jetty.websocket', name: 'websocket-servlet', version: '9.4.21.v20190926'\n+ implementation group: 'org.eclipse.jetty', name: 'jetty-servlet', version: '9.4.21.v20190926'\n+ implementation group: 'org.eclipse.jetty.websocket', name: 'websocket-server', version: '9.4.21.v20190926'\n+ implementation group: 'org.eclipse.jetty', name: 'jetty-servlets', version: '9.4.21.v20190926'\n- compile group: 'commons-io', name: 'commons-io', version: '2.6'\n- compile group: 'com.google.guava', name: 'guava', version: '28.1-jre'\n- compile group: 'com.beust', name: 'jcommander', version: '1.7'\n+ implementation group: 'commons-io', name: 'commons-io', version: '2.6'\n+ implementation group: 'com.google.guava', name: 'guava', version: '28.1-jre'\n+ implementation group: 'com.beust', name: 'jcommander', version: '1.7'\nimplementation group: 'org.apache.cxf', name: 'cxf-rt-rs-sse', version: '3.3.7'\nimplementation group: 'org.apache.cxf', name: 'cxf-rt-rs-client', version: '3.3.7'\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "model-server/src/main/java/org/modelix/model/server/HistoryHandler.java",
"diff": "+package org.modelix.model.server;\n+\n+import com.google.common.collect.Streams;\n+import kotlin.Pair;\n+import kotlin.Unit;\n+import org.apache.commons.lang3.StringEscapeUtils;\n+import org.eclipse.jetty.server.Request;\n+import org.eclipse.jetty.server.handler.AbstractHandler;\n+import org.modelix.model.LinearHistory;\n+import org.modelix.model.api.IBranch;\n+import org.modelix.model.api.ITree;\n+import org.modelix.model.api.IWriteTransaction;\n+import org.modelix.model.api.IdGeneratorDummy;\n+import org.modelix.model.api.PBranch;\n+import org.modelix.model.client.IModelClient;\n+import org.modelix.model.lazy.CLTree;\n+import org.modelix.model.lazy.CLVersion;\n+import org.modelix.model.lazy.IDeserializingKeyValueStore;\n+import org.modelix.model.lazy.KVEntryReference;\n+import org.modelix.model.lazy.RepositoryId;\n+import org.modelix.model.metameta.MetaModelBranch;\n+import org.modelix.model.operations.IAppliedOperation;\n+import org.modelix.model.operations.IOperation;\n+import org.modelix.model.operations.OTBranch;\n+import org.modelix.model.operations.OTWriteTransactionKt;\n+import org.modelix.model.operations.RevertToOp;\n+import org.modelix.model.persistent.CPVersion;\n+\n+import javax.servlet.ServletException;\n+import javax.servlet.http.HttpServletRequest;\n+import javax.servlet.http.HttpServletResponse;\n+import java.io.IOException;\n+import java.io.PrintWriter;\n+import java.net.URLEncoder;\n+import java.nio.charset.StandardCharsets;\n+import java.time.LocalDateTime;\n+import java.time.format.DateTimeFormatter;\n+import java.util.Arrays;\n+import java.util.HashSet;\n+import java.util.List;\n+import java.util.Objects;\n+import java.util.Set;\n+import java.util.stream.Collectors;\n+\n+public class HistoryHandler extends AbstractHandler {\n+\n+ private final IModelClient client;\n+\n+ public HistoryHandler(IModelClient client) {\n+ this.client = client;\n+ }\n+\n+ @Override\n+ public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {\n+ if (!(target.startsWith(\"/history/\"))) {\n+ return;\n+ }\n+ List<String> parts = Arrays.stream(target.split(\"/\"))\n+ .filter(it -> it != null && it.length() > 0)\n+ .collect(Collectors.toList());\n+\n+\n+ if (parts.size() == 1) {\n+ baseRequest.setHandled(true);\n+ response.setStatus(HttpServletResponse.SC_OK);\n+ response.setContentType(\"text/html\");\n+ buildMainPage(response.getWriter());\n+ return;\n+ } else if (parts.size() == 3) {\n+ String repositoryId = parts.get(1);\n+ String branch = parts.get(2);\n+ baseRequest.setHandled(true);\n+ response.setStatus(HttpServletResponse.SC_OK);\n+ response.setContentType(\"text/html\");\n+ int limit = toInt(request.getParameter(\"limit\"), 500);\n+ int skip = toInt(request.getParameter(\"skip\"), 0);\n+ buildRepositoryPage(response.getWriter(), new RepositoryAndBranch(repositoryId, branch), request.getParameter(\"head\"), skip, limit);\n+ } else if (parts.size() == 4 && Objects.equals(parts.get(3), \"revert\")) {\n+ if (Objects.equals(request.getMethod(), \"POST\")) {\n+ String repositoryId = parts.get(1);\n+ String branch = parts.get(2);\n+ String fromVersion = request.getParameter(\"from\");\n+ String toVersion = request.getParameter(\"to\");\n+ if ((repositoryId != null && repositoryId.length() > 0) && (fromVersion != null && fromVersion.length() > 0) && (toVersion != null && toVersion.length() > 0)) {\n+ revert(new RepositoryAndBranch(repositoryId, branch), fromVersion, toVersion, request.getHeader(\"X-Forwarded-Email\"));\n+ baseRequest.setHandled(true);\n+ response.setStatus(HttpServletResponse.SC_OK);\n+ response.setContentType(\"text/html\");\n+ response.getWriter().append(\"<html><head><meta http-equiv='refresh' content='1; url=./' /></head><body>Revert successful</body></html>\");\n+ }\n+ } else {\n+ baseRequest.setHandled(true);\n+ response.setStatus(HttpServletResponse.SC_METHOD_NOT_ALLOWED);\n+ }\n+ }\n+ }\n+\n+ public void revert(final RepositoryAndBranch repositoryAndBranch, final String from, final String to, String author) {\n+ String versionHash = client.get(repositoryAndBranch.getBranchKey());\n+ CLVersion version = new CLVersion(versionHash, client.getStoreCache());\n+ OTBranch branch = new OTBranch(new PBranch(version.getTree(), client.getIdGenerator()), client.getIdGenerator(), client.getStoreCache());\n+\n+ branch.runWrite(() -> {\n+ IWriteTransaction t = branch.getWriteTransaction();\n+ CPVersion.Companion.getDESERIALIZER();\n+ OTWriteTransactionKt.applyOperation(t, new RevertToOp(new KVEntryReference<CPVersion>(from, CPVersion.Companion.getDESERIALIZER()), new KVEntryReference<CPVersion>(to, CPVersion.Companion.getDESERIALIZER())));\n+ return Unit.INSTANCE;\n+ });\n+\n+ Pair<List<IAppliedOperation>, ITree> operationsAndTree = (Pair<List<IAppliedOperation>, ITree>) branch.getOperationsAndTree();\n+ var newVersion = CLVersion.Companion.createRegularVersion(\n+ client.getIdGenerator().generate(),\n+ LocalDateTime.now().toString(),\n+ author != null ? author : \"<server>\",\n+ (CLTree) operationsAndTree.getSecond(),\n+ version,\n+ operationsAndTree.getFirst().stream().map(IAppliedOperation::getOriginalOp).toArray(IOperation[]::new)\n+ );\n+\n+ client.put(repositoryAndBranch.getBranchKey(), newVersion.write());\n+ }\n+\n+ public Set<RepositoryAndBranch> getKnownRepositoryIds() {\n+ Set<RepositoryAndBranch> result = new HashSet<>();\n+ String infoVersionHash = client.get(new RepositoryId(\"info\").getBranchKey());\n+ CLVersion infoVersion = new CLVersion(infoVersionHash, client.getStoreCache());\n+ IBranch infoBranch = new MetaModelBranch(new PBranch(infoVersion.getTree(), new IdGeneratorDummy()));\n+ infoBranch.runReadT(t -> {\n+ for (long infoNodeId : t.getChildren(ITree.ROOT_ID, \"info\")) {\n+ for (long repositoryNodeId : t.getChildren(infoNodeId, \"repositories\")) {\n+ String repositoryId = t.getProperty(repositoryNodeId, \"id\");\n+ result.add(new RepositoryAndBranch(repositoryId));\n+ for (long branchNodeId : t.getChildren(repositoryNodeId, \"branches\")) {\n+ String branchName = t.getProperty(branchNodeId, \"name\");\n+ result.add(new RepositoryAndBranch(repositoryId, branchName));\n+ }\n+ }\n+ }\n+ return Unit.INSTANCE;\n+ });\n+\n+ return result;\n+ }\n+\n+ public void buildMainPage(PrintWriter out) {\n+ out.append(\"<html>\");\n+ out.append(\"<head>\");\n+ out.append(\"<style>\");\n+ out.append(\"</style>\");\n+ out.append(\"</head>\");\n+ out.append(\"<body>\");\n+ out.append(\"<h1>Choose Repository</h1>\");\n+ out.append(\"<ul>\");\n+\n+ for (RepositoryAndBranch repositoryAndBranch : getKnownRepositoryIds()) {\n+ out.append(\"<li><a href='\")\n+ .append(escapeURL(repositoryAndBranch.repository))\n+ .append(\"/\")\n+ .append(escapeURL(repositoryAndBranch.branch))\n+ .append(\"/'>\");\n+ out.append(escape(repositoryAndBranch.toString()));\n+ out.append(\"</a></li>\");\n+ }\n+ out.append(\"</ul>\");\n+\n+ out.append(\"</body>\");\n+ out.append(\"</html>\");\n+ }\n+\n+ protected void buildRepositoryPage(final PrintWriter out, RepositoryAndBranch repositoryAndBranch, String headHash, final int skip, final int limit) {\n+ out.append(\"<html>\");\n+ out.append(\"<head>\");\n+ out.append(\"<style>\");\n+ out.append(\"table {\");\n+ out.append(\" border-collapse: collapse;\");\n+ out.append(\" font-family: sans-serif;\");\n+ out.append(\" margin: 25px 0;\");\n+ out.append(\" font-size: 0.9em;\");\n+ out.append(\" border-radius:6px;\");\n+ out.append(\"}\");\n+ out.append(\"thead tr {\");\n+ out.append(\" background-color: #009879;\");\n+ out.append(\" color: #ffffff;\");\n+ out.append(\" text-align: left;\");\n+ out.append(\"}\");\n+ out.append(\"th {\");\n+ out.append(\" padding: 12px 15px;\");\n+ out.append(\"}\");\n+ out.append(\"td {\");\n+ out.append(\" padding: 3px 15px;\");\n+ out.append(\"}\");\n+ out.append(\"tbody tr {\");\n+ out.append(\" border-bottom: 1px solid #dddddd;\");\n+ out.append(\" border-left: 1px solid #dddddd;\");\n+ out.append(\" border-right: 1px solid #dddddd;\");\n+ out.append(\"}\");\n+ out.append(\"tbody tr:nth-of-type(even) {\");\n+ out.append(\" background-color: #f3f3f3;\");\n+ out.append(\"}\");\n+ out.append(\"tbody tr:last-of-type\");\n+ out.append(\" border-bottom: 2px solid #009879;\");\n+ out.append(\"}\");\n+ out.append(\"tbody tr.active-row {\");\n+ out.append(\" font-weight: bold;\");\n+ out.append(\" color: #009879;\");\n+ out.append(\"}\");\n+ out.append(\"ul {\");\n+ out.append(\" padding-left: 15px;\");\n+ out.append(\"}\");\n+ out.append(\".hash {\");\n+ out.append(\" color: #888;\");\n+ out.append(\"}\");\n+ out.append(\".BtnGroup {\");\n+ out.append(\" display: inline-block;\");\n+ out.append(\" vertical-align: middle;\");\n+ out.append(\"}\");\n+ out.append(\".BtnGroup-item {\");\n+ out.append(\" background-color: #f6f8fa;\");\n+ out.append(\" border: 1px solid rgba(27,31,36,0.15);\");\n+ out.append(\" padding: 5px 16px;\");\n+ out.append(\" position: relative;\");\n+ out.append(\" float: left;\");\n+ out.append(\" border-right-width: 0;\");\n+ out.append(\" border-radius: 0;\");\n+ out.append(\"}\");\n+ out.append(\".BtnGroup-item:first-child {\");\n+ out.append(\" border-top-left-radius: 6px;\");\n+ out.append(\" border-bottom-left-radius: 6px;\");\n+ out.append(\"}\");\n+ out.append(\".BtnGroup-item:last-child {\");\n+ out.append(\" border-right-width: 1px;\");\n+ out.append(\" border-top-right-radius: 6px;\");\n+ out.append(\" border-bottom-right-radius: 6px;\");\n+ out.append(\"}\");\n+ out.append(\"</style>\");\n+ out.append(\"</head>\");\n+ out.append(\"<body>\");\n+\n+ final CLVersion latestVersion = new CLVersion(client.get(repositoryAndBranch.getBranchKey()), client.getStoreCache());\n+ final CLVersion headVersion = ((headHash == null || headHash.length() == 0) ? latestVersion : new CLVersion(headHash, client.getStoreCache()));\n+ CLVersion version = headVersion;\n+ int rowIndex = 0;\n+\n+ out.append(\"<h1>History for Repository \");\n+ out.append(escape(repositoryAndBranch.toString()));\n+ out.append(\"</h1>\");\n+ Runnable buttons = () -> {\n+ out.append(\"<div class='BtnGroup'>\");\n+ if (skip == 0) {\n+ out.append(\"<a class='BtnGroup-item' href='?head=\" + escapeURL(latestVersion.getHash()) + \"&skip=0&limit=\" + limit + \"'>Newer</a>\");\n+ } else {\n+ out.append(\"<a class='BtnGroup-item' href='?head=\" + escapeURL(headVersion.getHash()) + \"&skip=\" + (Math.max(0, skip - limit)) + \"&limit=\" + limit + \"'>Newer</a>\");\n+ }\n+ out.append(\"<a class='BtnGroup-item' href='?head=\" + escapeURL(headVersion.getHash()) + \"&skip=\" + (skip + limit) + \"&limit=\" + limit + \"'>Older</a>\");\n+ out.append(\"</div>\");\n+ };\n+ buttons.run();\n+ out.append(\"<table>\");\n+ out.append(\"<thead><tr><th>ID<br/>Hash</th><th>Author</th><th>Time</th><th>Operations</th><th></th></tr></thead><tbody>\");\n+ while (version != null) {\n+ if (rowIndex >= skip) {\n+ createTableRow(out, version, latestVersion);\n+ if (version.isMerge()) {\n+ IDeserializingKeyValueStore store = version.getStore();\n+ for (CLVersion v : new LinearHistory(version.getBaseVersion().getHash()).load(version.getMergedVersion1(), version.getMergedVersion2())) {\n+ createTableRow(out, v, latestVersion);\n+ rowIndex++;\n+ if (rowIndex >= skip + limit) {\n+ break;\n+ }\n+ }\n+ }\n+ }\n+ rowIndex++;\n+ if (rowIndex >= skip + limit) {\n+ break;\n+ }\n+ version = version.getBaseVersion();\n+ }\n+\n+ out.append(\"</tbody></table>\");\n+ buttons.run();\n+\n+ out.append(\"</body>\");\n+ out.append(\"</html>\");\n+ }\n+\n+ public void createTableRow(PrintWriter out, CLVersion version, CLVersion latestVersion) {\n+ out.append(\"<tr>\");\n+ out.append(\"<td>\");\n+ out.append(Long.toHexString(version.getId()));\n+ out.append(\"<br/>\");\n+ out.append(\"<span class='hash'>\").append(version.getHash()).append(\"</span>\");\n+ out.append(\"</td>\");\n+ out.append(\"<td>\");\n+ out.append(nbsp(escape(version.getAuthor())));\n+ out.append(\"</td>\");\n+ out.append(\"<td style='white-space: nowrap;'>\");\n+ out.append(escape(reformatTime(version.getTime())));\n+ out.append(\"</td>\");\n+ out.append(\"<td>\");\n+ String opsDescription;\n+ if (version.isMerge()) {\n+ opsDescription = \"merge \" + version.getMergedVersion1().getId() + \" + \" + version.getMergedVersion2().getId() + \" (base \" + version.getBaseVersion() + \")\";\n+ } else {\n+ if (version.operationsInlined()) {\n+ opsDescription = \"<ul><li>\" + Streams.stream(version.getOperations()).map(Object::toString).collect(Collectors.joining(\"</li><li>\")) + \"</li></ul>\";\n+ } else {\n+ opsDescription = \"(\" + version.getNumberOfOperations() + \") \";\n+ }\n+ }\n+ out.append(opsDescription);\n+ out.append(\"</td>\");\n+ out.append(\"<td>\");\n+ out.append(\"<form action='revert' method='POST'>\");\n+ out.append(\"<input type='hidden' name='from' value='\").append(escapeURL(latestVersion.getHash())).append(\"'/>\");\n+ out.append(\"<input type='hidden' name='to' value='\").append(escapeURL(version.getHash())).append(\"'/>\");\n+ out.append(\"<input type='submit' value='Revert To'/>\");\n+ out.append(\"</form>\");\n+ out.append(\"</td>\");\n+ out.append(\"</tr>\");\n+ }\n+\n+ public String reformatTime(String dateTimeStr) {\n+ LocalDateTime dateTime = LocalDateTime.parse(dateTimeStr);\n+ return dateTime.format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\"));\n+ }\n+\n+ public String escape(String text) {\n+ return StringEscapeUtils.escapeHtml4(text);\n+ }\n+\n+ public String escapeURL(String text) {\n+ return URLEncoder.encode(text, StandardCharsets.UTF_8);\n+ }\n+\n+ public String nbsp(String text) {\n+ if (text == null) return null;\n+ return text.replace(\" \", \" \");\n+ }\n+\n+ public int toInt(String text, int defaultValue) {\n+ try {\n+ if ((text != null && text.length() > 0)) {\n+ return Integer.parseInt(text);\n+ }\n+ } catch (NumberFormatException ex) {\n+ }\n+ return defaultValue;\n+ }\n+\n+ private class RepositoryAndBranch {\n+ public final String repository;\n+ public final String branch;\n+\n+ public RepositoryAndBranch(String repository, String branch) {\n+ this.repository = repository;\n+ this.branch = branch;\n+ }\n+\n+ public RepositoryAndBranch(String repository) {\n+ this(repository, RepositoryId.DEFAULT_BRANCH);\n+ }\n+\n+ public String getBranchKey() {\n+ return new RepositoryId(repository).getBranchKey(branch);\n+ }\n+\n+ @Override\n+ public boolean equals(Object o) {\n+ if (this == o) return true;\n+ if (o == null || getClass() != o.getClass()) return false;\n+ RepositoryAndBranch that = (RepositoryAndBranch) o;\n+ return Objects.equals(repository, that.repository) && Objects.equals(branch, that.branch);\n+ }\n+\n+ @Override\n+ public int hashCode() {\n+ return Objects.hash(repository, branch);\n+ }\n+\n+ @Override\n+ public String toString() {\n+ return repository + \"/\" + branch;\n+ }\n+ }\n+}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "model-server/src/main/java/org/modelix/model/server/LocalModelClient.java",
"diff": "+/*\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.modelix.model.server;\n+\n+import org.apache.commons.collections4.IterableUtils;\n+import org.jetbrains.annotations.NotNull;\n+import org.jetbrains.annotations.Nullable;\n+import org.modelix.model.IKeyListener;\n+import org.modelix.model.IKeyValueStore;\n+import org.modelix.model.api.IIdGenerator;\n+import org.modelix.model.client.IModelClient;\n+import org.modelix.model.client.IdGenerator;\n+import org.modelix.model.lazy.IDeserializingKeyValueStore;\n+import org.modelix.model.lazy.ObjectStoreCache;\n+\n+import java.util.LinkedHashMap;\n+import java.util.List;\n+import java.util.Map;\n+\n+public class LocalModelClient implements IModelClient {\n+\n+ private IStoreClient store;\n+ private int clientId;\n+ private IIdGenerator idGenerator;\n+ private IDeserializingKeyValueStore objectCache = new ObjectStoreCache(this);\n+\n+ public LocalModelClient(IStoreClient store) {\n+ this.store = store;\n+ this.clientId = ((int) store.generateId(\"clientId\"));\n+ this.idGenerator = new IdGenerator(clientId);\n+ }\n+\n+ @Nullable\n+ @Override\n+ public String get(@NotNull String key) {\n+ return store.get(key);\n+ }\n+\n+ @Override\n+ public void put(@NotNull String key, @Nullable String value) {\n+ store.put(key, value);\n+ }\n+\n+ @NotNull\n+ @Override\n+ public Map<String, String> getAll(@NotNull Iterable<String> keys_) {\n+ List<String> keys = IterableUtils.toList(keys_);\n+ List<String> values = store.getAll(keys);\n+ Map<String, String> result = new LinkedHashMap<>();\n+ for (int i = 0; i < keys.size(); i++) {\n+ result.put(keys.get(i), values.get(i));\n+ }\n+ return result;\n+ }\n+\n+ @Override\n+ public void putAll(@NotNull Map<String, String> entries) {\n+ store.putAll(entries);\n+ }\n+\n+ @Override\n+ public void prefetch(@NotNull String key) {\n+ throw new UnsupportedOperationException();\n+ }\n+\n+ @Override\n+ public void listen(@NotNull String key, @NotNull IKeyListener listener) {\n+ throw new UnsupportedOperationException();\n+ }\n+\n+ @Override\n+ public void removeListener(@NotNull String key, @NotNull IKeyListener listener) {\n+ throw new UnsupportedOperationException();\n+ }\n+\n+ @Override\n+ public int getPendingSize() {\n+ return 0;\n+ }\n+\n+ @Override\n+ public int getClientId() {\n+ return clientId;\n+ }\n+\n+ @NotNull\n+ @Override\n+ public IIdGenerator getIdGenerator() {\n+ return idGenerator;\n+ }\n+\n+ @Nullable\n+ @Override\n+ public IDeserializingKeyValueStore getStoreCache() {\n+ return objectCache;\n+ }\n+\n+ @Nullable\n+ @Override\n+ public IKeyValueStore getAsyncStore() {\n+ return this;\n+ }\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "model-server/src/main/java/org/modelix/model/server/Main.java",
"new_path": "model-server/src/main/java/org/modelix/model/server/Main.java",
"diff": "@@ -272,6 +272,7 @@ public class Main {\n}\nRestModelServer modelServer = new RestModelServer(storeClient);\n+ LocalModelClient localModelClient = new LocalModelClient(storeClient);\nFile sharedSecretFile = cmdLineArgs.secretFile;\nif (sharedSecretFile.exists()) {\n@@ -283,6 +284,7 @@ public class Main {\nServletContextHandler servletHandler = new ServletContextHandler();\nmodelServer.init(servletHandler);\nHandlerList handlerList = new HandlerList();\n+ handlerList.addHandler(new HistoryHandler(localModelClient));\nhandlerList.addHandler(servletHandler);\nserver.setHandler(handlerList);\nserver.start();\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | /history/ page is now part of the model server |
426,496 | 15.12.2021 15:48:57 | -3,600 | bfc0bea9ba43fa38cc39012ddf7ef585b96ef949 | /history/ implementation converted to kotlin
kotlin kultiplatform doesn't work well with java in case of transient
dependencies (model-api). | [
{
"change_type": "MODIFY",
"old_path": "model-server/build.gradle",
"new_path": "model-server/build.gradle",
"diff": "@@ -4,6 +4,7 @@ plugins {\nid \"com.diffplug.gradle.spotless\"\nid 'maven-publish'\nid 'com.adarshr.test-logger' version '2.1.0'\n+ id \"org.jetbrains.kotlin.jvm\"\n}\ndescription = 'Model Server offering access to model storage'\n"
},
{
"change_type": "DELETE",
"old_path": "model-server/src/main/java/org/modelix/model/server/HistoryHandler.java",
"new_path": null,
"diff": "-package org.modelix.model.server;\n-\n-import com.google.common.collect.Streams;\n-import kotlin.Pair;\n-import kotlin.Unit;\n-import org.apache.commons.lang3.StringEscapeUtils;\n-import org.eclipse.jetty.server.Request;\n-import org.eclipse.jetty.server.handler.AbstractHandler;\n-import org.modelix.model.LinearHistory;\n-import org.modelix.model.api.IBranch;\n-import org.modelix.model.api.ITree;\n-import org.modelix.model.api.IWriteTransaction;\n-import org.modelix.model.api.IdGeneratorDummy;\n-import org.modelix.model.api.PBranch;\n-import org.modelix.model.client.IModelClient;\n-import org.modelix.model.lazy.CLTree;\n-import org.modelix.model.lazy.CLVersion;\n-import org.modelix.model.lazy.IDeserializingKeyValueStore;\n-import org.modelix.model.lazy.KVEntryReference;\n-import org.modelix.model.lazy.RepositoryId;\n-import org.modelix.model.metameta.MetaModelBranch;\n-import org.modelix.model.operations.IAppliedOperation;\n-import org.modelix.model.operations.IOperation;\n-import org.modelix.model.operations.OTBranch;\n-import org.modelix.model.operations.OTWriteTransactionKt;\n-import org.modelix.model.operations.RevertToOp;\n-import org.modelix.model.persistent.CPVersion;\n-\n-import javax.servlet.ServletException;\n-import javax.servlet.http.HttpServletRequest;\n-import javax.servlet.http.HttpServletResponse;\n-import java.io.IOException;\n-import java.io.PrintWriter;\n-import java.net.URLEncoder;\n-import java.nio.charset.StandardCharsets;\n-import java.time.LocalDateTime;\n-import java.time.format.DateTimeFormatter;\n-import java.util.Arrays;\n-import java.util.HashSet;\n-import java.util.List;\n-import java.util.Objects;\n-import java.util.Set;\n-import java.util.stream.Collectors;\n-\n-public class HistoryHandler extends AbstractHandler {\n-\n- private final IModelClient client;\n-\n- public HistoryHandler(IModelClient client) {\n- this.client = client;\n- }\n-\n- @Override\n- public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {\n- if (!(target.startsWith(\"/history/\"))) {\n- return;\n- }\n- List<String> parts = Arrays.stream(target.split(\"/\"))\n- .filter(it -> it != null && it.length() > 0)\n- .collect(Collectors.toList());\n-\n-\n- if (parts.size() == 1) {\n- baseRequest.setHandled(true);\n- response.setStatus(HttpServletResponse.SC_OK);\n- response.setContentType(\"text/html\");\n- buildMainPage(response.getWriter());\n- return;\n- } else if (parts.size() == 3) {\n- String repositoryId = parts.get(1);\n- String branch = parts.get(2);\n- baseRequest.setHandled(true);\n- response.setStatus(HttpServletResponse.SC_OK);\n- response.setContentType(\"text/html\");\n- int limit = toInt(request.getParameter(\"limit\"), 500);\n- int skip = toInt(request.getParameter(\"skip\"), 0);\n- buildRepositoryPage(response.getWriter(), new RepositoryAndBranch(repositoryId, branch), request.getParameter(\"head\"), skip, limit);\n- } else if (parts.size() == 4 && Objects.equals(parts.get(3), \"revert\")) {\n- if (Objects.equals(request.getMethod(), \"POST\")) {\n- String repositoryId = parts.get(1);\n- String branch = parts.get(2);\n- String fromVersion = request.getParameter(\"from\");\n- String toVersion = request.getParameter(\"to\");\n- if ((repositoryId != null && repositoryId.length() > 0) && (fromVersion != null && fromVersion.length() > 0) && (toVersion != null && toVersion.length() > 0)) {\n- revert(new RepositoryAndBranch(repositoryId, branch), fromVersion, toVersion, request.getHeader(\"X-Forwarded-Email\"));\n- baseRequest.setHandled(true);\n- response.setStatus(HttpServletResponse.SC_OK);\n- response.setContentType(\"text/html\");\n- response.getWriter().append(\"<html><head><meta http-equiv='refresh' content='1; url=./' /></head><body>Revert successful</body></html>\");\n- }\n- } else {\n- baseRequest.setHandled(true);\n- response.setStatus(HttpServletResponse.SC_METHOD_NOT_ALLOWED);\n- }\n- }\n- }\n-\n- public void revert(final RepositoryAndBranch repositoryAndBranch, final String from, final String to, String author) {\n- String versionHash = client.get(repositoryAndBranch.getBranchKey());\n- CLVersion version = new CLVersion(versionHash, client.getStoreCache());\n- OTBranch branch = new OTBranch(new PBranch(version.getTree(), client.getIdGenerator()), client.getIdGenerator(), client.getStoreCache());\n-\n- branch.runWrite(() -> {\n- IWriteTransaction t = branch.getWriteTransaction();\n- CPVersion.Companion.getDESERIALIZER();\n- OTWriteTransactionKt.applyOperation(t, new RevertToOp(new KVEntryReference<CPVersion>(from, CPVersion.Companion.getDESERIALIZER()), new KVEntryReference<CPVersion>(to, CPVersion.Companion.getDESERIALIZER())));\n- return Unit.INSTANCE;\n- });\n-\n- Pair<List<IAppliedOperation>, ITree> operationsAndTree = (Pair<List<IAppliedOperation>, ITree>) branch.getOperationsAndTree();\n- var newVersion = CLVersion.Companion.createRegularVersion(\n- client.getIdGenerator().generate(),\n- LocalDateTime.now().toString(),\n- author != null ? author : \"<server>\",\n- (CLTree) operationsAndTree.getSecond(),\n- version,\n- operationsAndTree.getFirst().stream().map(IAppliedOperation::getOriginalOp).toArray(IOperation[]::new)\n- );\n-\n- client.put(repositoryAndBranch.getBranchKey(), newVersion.write());\n- }\n-\n- public Set<RepositoryAndBranch> getKnownRepositoryIds() {\n- Set<RepositoryAndBranch> result = new HashSet<>();\n- String infoVersionHash = client.get(new RepositoryId(\"info\").getBranchKey());\n- CLVersion infoVersion = new CLVersion(infoVersionHash, client.getStoreCache());\n- IBranch infoBranch = new MetaModelBranch(new PBranch(infoVersion.getTree(), new IdGeneratorDummy()));\n- infoBranch.runReadT(t -> {\n- for (long infoNodeId : t.getChildren(ITree.ROOT_ID, \"info\")) {\n- for (long repositoryNodeId : t.getChildren(infoNodeId, \"repositories\")) {\n- String repositoryId = t.getProperty(repositoryNodeId, \"id\");\n- result.add(new RepositoryAndBranch(repositoryId));\n- for (long branchNodeId : t.getChildren(repositoryNodeId, \"branches\")) {\n- String branchName = t.getProperty(branchNodeId, \"name\");\n- result.add(new RepositoryAndBranch(repositoryId, branchName));\n- }\n- }\n- }\n- return Unit.INSTANCE;\n- });\n-\n- return result;\n- }\n-\n- public void buildMainPage(PrintWriter out) {\n- out.append(\"<html>\");\n- out.append(\"<head>\");\n- out.append(\"<style>\");\n- out.append(\"</style>\");\n- out.append(\"</head>\");\n- out.append(\"<body>\");\n- out.append(\"<h1>Choose Repository</h1>\");\n- out.append(\"<ul>\");\n-\n- for (RepositoryAndBranch repositoryAndBranch : getKnownRepositoryIds()) {\n- out.append(\"<li><a href='\")\n- .append(escapeURL(repositoryAndBranch.repository))\n- .append(\"/\")\n- .append(escapeURL(repositoryAndBranch.branch))\n- .append(\"/'>\");\n- out.append(escape(repositoryAndBranch.toString()));\n- out.append(\"</a></li>\");\n- }\n- out.append(\"</ul>\");\n-\n- out.append(\"</body>\");\n- out.append(\"</html>\");\n- }\n-\n- protected void buildRepositoryPage(final PrintWriter out, RepositoryAndBranch repositoryAndBranch, String headHash, final int skip, final int limit) {\n- out.append(\"<html>\");\n- out.append(\"<head>\");\n- out.append(\"<style>\");\n- out.append(\"table {\");\n- out.append(\" border-collapse: collapse;\");\n- out.append(\" font-family: sans-serif;\");\n- out.append(\" margin: 25px 0;\");\n- out.append(\" font-size: 0.9em;\");\n- out.append(\" border-radius:6px;\");\n- out.append(\"}\");\n- out.append(\"thead tr {\");\n- out.append(\" background-color: #009879;\");\n- out.append(\" color: #ffffff;\");\n- out.append(\" text-align: left;\");\n- out.append(\"}\");\n- out.append(\"th {\");\n- out.append(\" padding: 12px 15px;\");\n- out.append(\"}\");\n- out.append(\"td {\");\n- out.append(\" padding: 3px 15px;\");\n- out.append(\"}\");\n- out.append(\"tbody tr {\");\n- out.append(\" border-bottom: 1px solid #dddddd;\");\n- out.append(\" border-left: 1px solid #dddddd;\");\n- out.append(\" border-right: 1px solid #dddddd;\");\n- out.append(\"}\");\n- out.append(\"tbody tr:nth-of-type(even) {\");\n- out.append(\" background-color: #f3f3f3;\");\n- out.append(\"}\");\n- out.append(\"tbody tr:last-of-type\");\n- out.append(\" border-bottom: 2px solid #009879;\");\n- out.append(\"}\");\n- out.append(\"tbody tr.active-row {\");\n- out.append(\" font-weight: bold;\");\n- out.append(\" color: #009879;\");\n- out.append(\"}\");\n- out.append(\"ul {\");\n- out.append(\" padding-left: 15px;\");\n- out.append(\"}\");\n- out.append(\".hash {\");\n- out.append(\" color: #888;\");\n- out.append(\"}\");\n- out.append(\".BtnGroup {\");\n- out.append(\" display: inline-block;\");\n- out.append(\" vertical-align: middle;\");\n- out.append(\"}\");\n- out.append(\".BtnGroup-item {\");\n- out.append(\" background-color: #f6f8fa;\");\n- out.append(\" border: 1px solid rgba(27,31,36,0.15);\");\n- out.append(\" padding: 5px 16px;\");\n- out.append(\" position: relative;\");\n- out.append(\" float: left;\");\n- out.append(\" border-right-width: 0;\");\n- out.append(\" border-radius: 0;\");\n- out.append(\"}\");\n- out.append(\".BtnGroup-item:first-child {\");\n- out.append(\" border-top-left-radius: 6px;\");\n- out.append(\" border-bottom-left-radius: 6px;\");\n- out.append(\"}\");\n- out.append(\".BtnGroup-item:last-child {\");\n- out.append(\" border-right-width: 1px;\");\n- out.append(\" border-top-right-radius: 6px;\");\n- out.append(\" border-bottom-right-radius: 6px;\");\n- out.append(\"}\");\n- out.append(\"</style>\");\n- out.append(\"</head>\");\n- out.append(\"<body>\");\n-\n- final CLVersion latestVersion = new CLVersion(client.get(repositoryAndBranch.getBranchKey()), client.getStoreCache());\n- final CLVersion headVersion = ((headHash == null || headHash.length() == 0) ? latestVersion : new CLVersion(headHash, client.getStoreCache()));\n- CLVersion version = headVersion;\n- int rowIndex = 0;\n-\n- out.append(\"<h1>History for Repository \");\n- out.append(escape(repositoryAndBranch.toString()));\n- out.append(\"</h1>\");\n- Runnable buttons = () -> {\n- out.append(\"<div class='BtnGroup'>\");\n- if (skip == 0) {\n- out.append(\"<a class='BtnGroup-item' href='?head=\" + escapeURL(latestVersion.getHash()) + \"&skip=0&limit=\" + limit + \"'>Newer</a>\");\n- } else {\n- out.append(\"<a class='BtnGroup-item' href='?head=\" + escapeURL(headVersion.getHash()) + \"&skip=\" + (Math.max(0, skip - limit)) + \"&limit=\" + limit + \"'>Newer</a>\");\n- }\n- out.append(\"<a class='BtnGroup-item' href='?head=\" + escapeURL(headVersion.getHash()) + \"&skip=\" + (skip + limit) + \"&limit=\" + limit + \"'>Older</a>\");\n- out.append(\"</div>\");\n- };\n- buttons.run();\n- out.append(\"<table>\");\n- out.append(\"<thead><tr><th>ID<br/>Hash</th><th>Author</th><th>Time</th><th>Operations</th><th></th></tr></thead><tbody>\");\n- while (version != null) {\n- if (rowIndex >= skip) {\n- createTableRow(out, version, latestVersion);\n- if (version.isMerge()) {\n- IDeserializingKeyValueStore store = version.getStore();\n- for (CLVersion v : new LinearHistory(version.getBaseVersion().getHash()).load(version.getMergedVersion1(), version.getMergedVersion2())) {\n- createTableRow(out, v, latestVersion);\n- rowIndex++;\n- if (rowIndex >= skip + limit) {\n- break;\n- }\n- }\n- }\n- }\n- rowIndex++;\n- if (rowIndex >= skip + limit) {\n- break;\n- }\n- version = version.getBaseVersion();\n- }\n-\n- out.append(\"</tbody></table>\");\n- buttons.run();\n-\n- out.append(\"</body>\");\n- out.append(\"</html>\");\n- }\n-\n- public void createTableRow(PrintWriter out, CLVersion version, CLVersion latestVersion) {\n- out.append(\"<tr>\");\n- out.append(\"<td>\");\n- out.append(Long.toHexString(version.getId()));\n- out.append(\"<br/>\");\n- out.append(\"<span class='hash'>\").append(version.getHash()).append(\"</span>\");\n- out.append(\"</td>\");\n- out.append(\"<td>\");\n- out.append(nbsp(escape(version.getAuthor())));\n- out.append(\"</td>\");\n- out.append(\"<td style='white-space: nowrap;'>\");\n- out.append(escape(reformatTime(version.getTime())));\n- out.append(\"</td>\");\n- out.append(\"<td>\");\n- String opsDescription;\n- if (version.isMerge()) {\n- opsDescription = \"merge \" + version.getMergedVersion1().getId() + \" + \" + version.getMergedVersion2().getId() + \" (base \" + version.getBaseVersion() + \")\";\n- } else {\n- if (version.operationsInlined()) {\n- opsDescription = \"<ul><li>\" + Streams.stream(version.getOperations()).map(Object::toString).collect(Collectors.joining(\"</li><li>\")) + \"</li></ul>\";\n- } else {\n- opsDescription = \"(\" + version.getNumberOfOperations() + \") \";\n- }\n- }\n- out.append(opsDescription);\n- out.append(\"</td>\");\n- out.append(\"<td>\");\n- out.append(\"<form action='revert' method='POST'>\");\n- out.append(\"<input type='hidden' name='from' value='\").append(escapeURL(latestVersion.getHash())).append(\"'/>\");\n- out.append(\"<input type='hidden' name='to' value='\").append(escapeURL(version.getHash())).append(\"'/>\");\n- out.append(\"<input type='submit' value='Revert To'/>\");\n- out.append(\"</form>\");\n- out.append(\"</td>\");\n- out.append(\"</tr>\");\n- }\n-\n- public String reformatTime(String dateTimeStr) {\n- LocalDateTime dateTime = LocalDateTime.parse(dateTimeStr);\n- return dateTime.format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\"));\n- }\n-\n- public String escape(String text) {\n- return StringEscapeUtils.escapeHtml4(text);\n- }\n-\n- public String escapeURL(String text) {\n- return URLEncoder.encode(text, StandardCharsets.UTF_8);\n- }\n-\n- public String nbsp(String text) {\n- if (text == null) return null;\n- return text.replace(\" \", \" \");\n- }\n-\n- public int toInt(String text, int defaultValue) {\n- try {\n- if ((text != null && text.length() > 0)) {\n- return Integer.parseInt(text);\n- }\n- } catch (NumberFormatException ex) {\n- }\n- return defaultValue;\n- }\n-\n- private class RepositoryAndBranch {\n- public final String repository;\n- public final String branch;\n-\n- public RepositoryAndBranch(String repository, String branch) {\n- this.repository = repository;\n- this.branch = branch;\n- }\n-\n- public RepositoryAndBranch(String repository) {\n- this(repository, RepositoryId.DEFAULT_BRANCH);\n- }\n-\n- public String getBranchKey() {\n- return new RepositoryId(repository).getBranchKey(branch);\n- }\n-\n- @Override\n- public boolean equals(Object o) {\n- if (this == o) return true;\n- if (o == null || getClass() != o.getClass()) return false;\n- RepositoryAndBranch that = (RepositoryAndBranch) o;\n- return Objects.equals(repository, that.repository) && Objects.equals(branch, that.branch);\n- }\n-\n- @Override\n- public int hashCode() {\n- return Objects.hash(repository, branch);\n- }\n-\n- @Override\n- public String toString() {\n- return repository + \"/\" + branch;\n- }\n- }\n-}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "model-server/src/main/kotlin/org/modelix/model/server/HistoryHandler.kt",
"diff": "+package org.modelix.model.server\n+\n+import com.google.common.collect.Streams\n+import org.apache.commons.lang3.StringEscapeUtils\n+import org.eclipse.jetty.server.Request\n+import org.eclipse.jetty.server.handler.AbstractHandler\n+import org.modelix.model.persistent.CPVersion.Companion.DESERIALIZER\n+import org.modelix.model.operations.applyOperation\n+import org.modelix.model.lazy.CLVersion.Companion.createRegularVersion\n+import org.modelix.model.client.IModelClient\n+import java.io.IOException\n+import javax.servlet.ServletException\n+import javax.servlet.http.HttpServletRequest\n+import javax.servlet.http.HttpServletResponse\n+import org.modelix.model.lazy.CLVersion\n+import org.modelix.model.operations.OTBranch\n+import org.modelix.model.operations.RevertToOp\n+import org.modelix.model.lazy.KVEntryReference\n+import org.modelix.model.lazy.CLTree\n+import org.modelix.model.operations.IOperation\n+import org.modelix.model.lazy.RepositoryId\n+import org.modelix.model.metameta.MetaModelBranch\n+import java.io.PrintWriter\n+import java.lang.Runnable\n+import org.modelix.model.LinearHistory\n+import org.modelix.model.api.*\n+import java.net.URLEncoder\n+import java.lang.NumberFormatException\n+import java.nio.charset.StandardCharsets\n+import java.time.LocalDateTime\n+import java.time.format.DateTimeFormatter\n+import java.util.*\n+import java.util.stream.Collectors\n+\n+class HistoryHandler(private val client: IModelClient) : AbstractHandler() {\n+ @Throws(IOException::class, ServletException::class)\n+ override fun handle(target: String, baseRequest: Request, request: HttpServletRequest, response: HttpServletResponse) {\n+ if (!target.startsWith(\"/history/\")) {\n+ return\n+ }\n+ val parts = Arrays.stream(target.split(\"/\".toRegex()).toTypedArray())\n+ .filter { it: String? -> it != null && it.length > 0 }\n+ .collect(Collectors.toList())\n+ if (parts.size == 1) {\n+ baseRequest.isHandled = true\n+ response.status = HttpServletResponse.SC_OK\n+ response.contentType = \"text/html\"\n+ buildMainPage(response.writer)\n+ return\n+ } else if (parts.size == 3) {\n+ val repositoryId = parts[1]\n+ val branch = parts[2]\n+ baseRequest.isHandled = true\n+ response.status = HttpServletResponse.SC_OK\n+ response.contentType = \"text/html\"\n+ val limit = toInt(request.getParameter(\"limit\"), 500)\n+ val skip = toInt(request.getParameter(\"skip\"), 0)\n+ buildRepositoryPage(response.writer, RepositoryAndBranch(repositoryId, branch), request.getParameter(\"head\"), skip, limit)\n+ } else if (parts.size == 4 && parts[3] == \"revert\") {\n+ if (request.method == \"POST\") {\n+ val repositoryId = parts[1]\n+ val branch = parts[2]\n+ val fromVersion = request.getParameter(\"from\")\n+ val toVersion = request.getParameter(\"to\")\n+ if (repositoryId != null && repositoryId.length > 0 && fromVersion != null && fromVersion.length > 0 && toVersion != null && toVersion.length > 0) {\n+ revert(RepositoryAndBranch(repositoryId, branch), fromVersion, toVersion, request.getHeader(\"X-Forwarded-Email\"))\n+ baseRequest.isHandled = true\n+ response.status = HttpServletResponse.SC_OK\n+ response.contentType = \"text/html\"\n+ response.writer.append(\"<html><head><meta http-equiv='refresh' content='1; url=./' /></head><body>Revert successful</body></html>\")\n+ }\n+ } else {\n+ baseRequest.isHandled = true\n+ response.status = HttpServletResponse.SC_METHOD_NOT_ALLOWED\n+ }\n+ }\n+ }\n+\n+ fun revert(repositoryAndBranch: RepositoryAndBranch, from: String?, to: String?, author: String?) {\n+ val versionHash = client[repositoryAndBranch.branchKey]\n+ val version = CLVersion(versionHash!!, client.storeCache!!)\n+ val branch = OTBranch(PBranch(version.tree, client.idGenerator), client.idGenerator, client.storeCache!!)\n+ branch.runWriteT { t ->\n+ t.applyOperation(RevertToOp(KVEntryReference(from!!, DESERIALIZER), KVEntryReference(to!!, DESERIALIZER)))\n+ }\n+ val (ops, tree) = branch.operationsAndTree\n+ val newVersion = createRegularVersion(\n+ client.idGenerator.generate(),\n+ LocalDateTime.now().toString(),\n+ author ?: \"<server>\",\n+ (tree as CLTree),\n+ version,\n+ ops.map { it.getOriginalOp() }.toTypedArray()\n+ )\n+ client.put(repositoryAndBranch.branchKey, newVersion.write())\n+ }\n+\n+ val knownRepositoryIds: Set<RepositoryAndBranch>\n+ get() {\n+ val result: MutableSet<RepositoryAndBranch> = HashSet()\n+ val infoVersionHash = client[RepositoryId(\"info\").getBranchKey()]\n+ val infoVersion = CLVersion(infoVersionHash!!, client.storeCache!!)\n+ val infoBranch: IBranch = MetaModelBranch(PBranch(infoVersion.tree, IdGeneratorDummy()))\n+ infoBranch.runReadT { t: IReadTransaction ->\n+ for (infoNodeId in t.getChildren(ITree.ROOT_ID, \"info\")) {\n+ for (repositoryNodeId in t.getChildren(infoNodeId, \"repositories\")) {\n+ val repositoryId = t.getProperty(repositoryNodeId, \"id\") ?: continue\n+ result.add(RepositoryAndBranch(repositoryId))\n+ for (branchNodeId in t.getChildren(repositoryNodeId, \"branches\")) {\n+ val branchName = t.getProperty(branchNodeId, \"name\") ?: continue\n+ result.add(RepositoryAndBranch(repositoryId, branchName))\n+ }\n+ }\n+ }\n+ Unit\n+ }\n+ return result\n+ }\n+\n+ fun buildMainPage(out: PrintWriter) {\n+ out.append(\"<html>\")\n+ out.append(\"<head>\")\n+ out.append(\"<style>\")\n+ out.append(\"</style>\")\n+ out.append(\"</head>\")\n+ out.append(\"<body>\")\n+ out.append(\"<h1>Choose Repository</h1>\")\n+ out.append(\"<ul>\")\n+ for (repositoryAndBranch in knownRepositoryIds) {\n+ out.append(\"<li><a href='\")\n+ .append(escapeURL(repositoryAndBranch.repository))\n+ .append(\"/\")\n+ .append(escapeURL(repositoryAndBranch.branch))\n+ .append(\"/'>\")\n+ out.append(escape(repositoryAndBranch.toString()))\n+ out.append(\"</a></li>\")\n+ }\n+ out.append(\"</ul>\")\n+ out.append(\"</body>\")\n+ out.append(\"</html>\")\n+ }\n+\n+ protected fun buildRepositoryPage(out: PrintWriter, repositoryAndBranch: RepositoryAndBranch, headHash: String?, skip: Int, limit: Int) {\n+ out.append(\"<html>\")\n+ out.append(\"<head>\")\n+ out.append(\"<style>\")\n+ out.append(\"table {\")\n+ out.append(\" border-collapse: collapse;\")\n+ out.append(\" font-family: sans-serif;\")\n+ out.append(\" margin: 25px 0;\")\n+ out.append(\" font-size: 0.9em;\")\n+ out.append(\" border-radius:6px;\")\n+ out.append(\"}\")\n+ out.append(\"thead tr {\")\n+ out.append(\" background-color: #009879;\")\n+ out.append(\" color: #ffffff;\")\n+ out.append(\" text-align: left;\")\n+ out.append(\"}\")\n+ out.append(\"th {\")\n+ out.append(\" padding: 12px 15px;\")\n+ out.append(\"}\")\n+ out.append(\"td {\")\n+ out.append(\" padding: 3px 15px;\")\n+ out.append(\"}\")\n+ out.append(\"tbody tr {\")\n+ out.append(\" border-bottom: 1px solid #dddddd;\")\n+ out.append(\" border-left: 1px solid #dddddd;\")\n+ out.append(\" border-right: 1px solid #dddddd;\")\n+ out.append(\"}\")\n+ out.append(\"tbody tr:nth-of-type(even) {\")\n+ out.append(\" background-color: #f3f3f3;\")\n+ out.append(\"}\")\n+ out.append(\"tbody tr:last-of-type\")\n+ out.append(\" border-bottom: 2px solid #009879;\")\n+ out.append(\"}\")\n+ out.append(\"tbody tr.active-row {\")\n+ out.append(\" font-weight: bold;\")\n+ out.append(\" color: #009879;\")\n+ out.append(\"}\")\n+ out.append(\"ul {\")\n+ out.append(\" padding-left: 15px;\")\n+ out.append(\"}\")\n+ out.append(\".hash {\")\n+ out.append(\" color: #888;\")\n+ out.append(\"}\")\n+ out.append(\".BtnGroup {\")\n+ out.append(\" display: inline-block;\")\n+ out.append(\" vertical-align: middle;\")\n+ out.append(\"}\")\n+ out.append(\".BtnGroup-item {\")\n+ out.append(\" background-color: #f6f8fa;\")\n+ out.append(\" border: 1px solid rgba(27,31,36,0.15);\")\n+ out.append(\" padding: 5px 16px;\")\n+ out.append(\" position: relative;\")\n+ out.append(\" float: left;\")\n+ out.append(\" border-right-width: 0;\")\n+ out.append(\" border-radius: 0;\")\n+ out.append(\"}\")\n+ out.append(\".BtnGroup-item:first-child {\")\n+ out.append(\" border-top-left-radius: 6px;\")\n+ out.append(\" border-bottom-left-radius: 6px;\")\n+ out.append(\"}\")\n+ out.append(\".BtnGroup-item:last-child {\")\n+ out.append(\" border-right-width: 1px;\")\n+ out.append(\" border-top-right-radius: 6px;\")\n+ out.append(\" border-bottom-right-radius: 6px;\")\n+ out.append(\"}\")\n+ out.append(\"</style>\")\n+ out.append(\"</head>\")\n+ out.append(\"<body>\")\n+ val latestVersion = CLVersion(client[repositoryAndBranch.branchKey]!!, client.storeCache!!)\n+ val headVersion = if (headHash == null || headHash.length == 0) latestVersion else CLVersion(headHash, client.storeCache!!)\n+ var version: CLVersion? = headVersion\n+ var rowIndex = 0\n+ out.append(\"<h1>History for Repository \")\n+ out.append(escape(repositoryAndBranch.toString()))\n+ out.append(\"</h1>\")\n+ val buttons = Runnable {\n+ out.append(\"<div class='BtnGroup'>\")\n+ if (skip == 0) {\n+ out.append(\"<a class='BtnGroup-item' href='?head=\" + escapeURL(latestVersion.hash) + \"&skip=0&limit=\" + limit + \"'>Newer</a>\")\n+ } else {\n+ out.append(\"<a class='BtnGroup-item' href='?head=\" + escapeURL(headVersion.hash) + \"&skip=\" + Math.max(0, skip - limit) + \"&limit=\" + limit + \"'>Newer</a>\")\n+ }\n+ out.append(\"<a class='BtnGroup-item' href='?head=\" + escapeURL(headVersion.hash) + \"&skip=\" + (skip + limit) + \"&limit=\" + limit + \"'>Older</a>\")\n+ out.append(\"</div>\")\n+ }\n+ buttons.run()\n+ out.append(\"<table>\")\n+ out.append(\"<thead><tr><th>ID<br/>Hash</th><th>Author</th><th>Time</th><th>Operations</th><th></th></tr></thead><tbody>\")\n+ while (version != null) {\n+ if (rowIndex >= skip) {\n+ createTableRow(out, version, latestVersion)\n+ if (version.isMerge()) {\n+ for (v in LinearHistory(version.baseVersion!!.hash).load(version.getMergedVersion1()!!, version.getMergedVersion2()!!)) {\n+ createTableRow(out, v, latestVersion)\n+ rowIndex++\n+ if (rowIndex >= skip + limit) {\n+ break\n+ }\n+ }\n+ }\n+ }\n+ rowIndex++\n+ if (rowIndex >= skip + limit) {\n+ break\n+ }\n+ version = version.baseVersion\n+ }\n+ out.append(\"</tbody></table>\")\n+ buttons.run()\n+ out.append(\"</body>\")\n+ out.append(\"</html>\")\n+ }\n+\n+ fun createTableRow(out: PrintWriter, version: CLVersion, latestVersion: CLVersion) {\n+ out.append(\"<tr>\")\n+ out.append(\"<td>\")\n+ out.append(java.lang.Long.toHexString(version.id))\n+ out.append(\"<br/>\")\n+ out.append(\"<span class='hash'>\").append(version.hash).append(\"</span>\")\n+ out.append(\"</td>\")\n+ out.append(\"<td>\")\n+ out.append(nbsp(escape(version.author)))\n+ out.append(\"</td>\")\n+ out.append(\"<td style='white-space: nowrap;'>\")\n+ out.append(escape(reformatTime(version.time)))\n+ out.append(\"</td>\")\n+ out.append(\"<td>\")\n+ val opsDescription: String\n+ opsDescription = if (version.isMerge()) {\n+ \"merge \" + version.getMergedVersion1()!!.id + \" + \" + version.getMergedVersion2()!!.id + \" (base \" + version.baseVersion + \")\"\n+ } else {\n+ if (version.operationsInlined()) {\n+ \"<ul><li>\" + Streams.stream(version.operations).map { obj: IOperation -> obj.toString() }.collect(Collectors.joining(\"</li><li>\")) + \"</li></ul>\"\n+ } else {\n+ \"(\" + version.numberOfOperations + \") \"\n+ }\n+ }\n+ out.append(opsDescription)\n+ out.append(\"</td>\")\n+ out.append(\"<td>\")\n+ out.append(\"<form action='revert' method='POST'>\")\n+ out.append(\"<input type='hidden' name='from' value='\").append(escapeURL(latestVersion.hash)).append(\"'/>\")\n+ out.append(\"<input type='hidden' name='to' value='\").append(escapeURL(version.hash)).append(\"'/>\")\n+ out.append(\"<input type='submit' value='Revert To'/>\")\n+ out.append(\"</form>\")\n+ out.append(\"</td>\")\n+ out.append(\"</tr>\")\n+ }\n+\n+ private fun reformatTime(dateTimeStr: String?): String {\n+ val dateTime = LocalDateTime.parse(dateTimeStr)\n+ return dateTime.format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\"))\n+ }\n+\n+ private fun escape(text: String?): String? {\n+ return StringEscapeUtils.escapeHtml4(text)\n+ }\n+\n+ private fun escapeURL(text: String?): String? {\n+ return URLEncoder.encode(text, StandardCharsets.UTF_8)\n+ }\n+\n+ private fun nbsp(text: String?): String? {\n+ return text?.replace(\" \", \" \")\n+ }\n+\n+ private fun toInt(text: String?, defaultValue: Int): Int {\n+ try {\n+ if (!text.isNullOrEmpty()) {\n+ return text.toInt()\n+ }\n+ } catch (ex: NumberFormatException) {\n+ }\n+ return defaultValue\n+ }\n+\n+ data class RepositoryAndBranch(val repository: String, val branch: String = RepositoryId.DEFAULT_BRANCH) {\n+ val branchKey: String\n+ get() = RepositoryId(repository).getBranchKey(branch)\n+\n+ override fun toString() = \"$repository/$branch\"\n+ }\n+}\n\\ No newline at end of file\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | /history/ implementation converted to kotlin
kotlin kultiplatform doesn't work well with java in case of transient
dependencies (model-api). |
426,496 | 16.12.2021 10:01:05 | -3,600 | 96dbf191ad5904193ebd385c05f0282acb30ccf5 | Performance issue in ModelSynchronizer | [
{
"change_type": "MODIFY",
"old_path": "model-client/src/commonMain/kotlin/org/modelix/model/lazy/CLTree.kt",
"new_path": "model-client/src/commonMain/kotlin/org/modelix/model/lazy/CLTree.kt",
"diff": "@@ -26,7 +26,7 @@ import org.modelix.model.persistent.CPNodeRef.Companion.foreign\nimport org.modelix.model.persistent.CPNodeRef.Companion.global\nimport org.modelix.model.persistent.CPNodeRef.Companion.local\n-class CLTree : ITree {\n+class CLTree : ITree, IBulkTree {\nval store: IDeserializingKeyValueStore\nval data: CPTree\n@@ -267,7 +267,7 @@ class CLTree : ITree {\nreturn children.map { it.id }\n}\n- fun getDescendants(root: Long, includeSelf: Boolean): Iterable<CLNode> {\n+ override fun getDescendants(root: Long, includeSelf: Boolean): Iterable<CLNode> {\nval parent = resolveElement(root)\nreturn parent!!.getDescendants(BulkQuery(store), includeSelf).execute()\n}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "model-client/src/commonMain/kotlin/org/modelix/model/lazy/IBulkTree.kt",
"diff": "+/*\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.modelix.model.lazy\n+\n+import org.modelix.model.api.ITree\n+\n+interface IBulkTree : ITree {\n+ fun getDescendants(root: Long, includeSelf: Boolean): Iterable<CLNode>\n+}\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "model-client/src/commonMain/kotlin/org/modelix/model/metameta/MetaModelBranch.kt",
"new_path": "model-client/src/commonMain/kotlin/org/modelix/model/metameta/MetaModelBranch.kt",
"diff": "@@ -15,6 +15,8 @@ package org.modelix.model.metameta\nimport org.modelix.model.ITransactionWrapper\nimport org.modelix.model.api.*\n+import org.modelix.model.lazy.CLNode\n+import org.modelix.model.lazy.IBulkTree\nimport org.modelix.model.lazy.IConceptReferenceSerializer\nclass MetaModelBranch(val branch: IBranch) : IBranch by branch {\n@@ -60,13 +62,15 @@ class MetaModelBranch(val branch: IBranch) : IBranch by branch {\nreturn PersistedConcept(localConceptId, globalConcept.getUID())\n}\n+ fun wrapTree(tree: ITree) = if (tree is IBulkTree) MMBulkTree(tree) else MMTree(tree)\n+\ninner class MMReadTransaction(val transaction: IReadTransaction) : IReadTransaction by transaction, ITransactionWrapper {\noverride fun unwrap(): ITransaction = transaction\noverride val branch: IBranch\nget() = this@MetaModelBranch\noverride val tree: ITree\n- get() = MMTree(transaction.tree)\n+ get() = wrapTree(transaction.tree)\noverride fun getConcept(nodeId: Long): IConcept? {\nreturn transaction.getConcept(nodeId)?.let { toGlobalConcept(it, transaction.tree) }\n@@ -79,7 +83,7 @@ class MetaModelBranch(val branch: IBranch) : IBranch by branch {\noverride val branch: IBranch\nget() = this@MetaModelBranch\noverride var tree: ITree\n- get() = MMTree(transaction.tree)\n+ get() = wrapTree(transaction.tree)\nset(value) {\ntransaction.tree = if (value is MMTree) value.tree else tree\n}\n@@ -96,7 +100,7 @@ class MetaModelBranch(val branch: IBranch) : IBranch by branch {\n}\n}\n- inner class MMTree(val tree: ITree) : ITree by tree {\n+ open inner class MMTree(open val tree: ITree) : ITree by tree {\noverride fun getConcept(nodeId: Long): IConcept? {\nreturn tree.getConcept(nodeId)?.let { toGlobalConcept(it, tree) }\n}\n@@ -107,31 +111,31 @@ class MetaModelBranch(val branch: IBranch) : IBranch by branch {\n}\noverride fun addNewChild(parentId: Long, role: String?, index: Int, childId: Long, concept: IConcept?): ITree {\n- return MMTree(tree.addNewChild(parentId, role, index, childId, concept))\n+ return wrapTree(tree.addNewChild(parentId, role, index, childId, concept))\n}\noverride fun addNewChildren(parentId: Long, role: String?, index: Int, newIds: LongArray, concepts: Array<IConcept?>): ITree {\n- return MMTree(tree.addNewChildren(parentId, role, index, newIds, concepts))\n+ return wrapTree(tree.addNewChildren(parentId, role, index, newIds, concepts))\n}\noverride fun deleteNode(nodeId: Long): ITree {\n- return MMTree(tree.deleteNode(nodeId))\n+ return wrapTree(tree.deleteNode(nodeId))\n}\noverride fun deleteNodes(nodeIds: LongArray): ITree {\n- return MMTree(tree.deleteNodes(nodeIds))\n+ return wrapTree(tree.deleteNodes(nodeIds))\n}\noverride fun moveChild(newParentId: Long, newRole: String?, newIndex: Int, childId: Long): ITree {\n- return MMTree(tree.moveChild(newParentId, newRole, newIndex, childId))\n+ return wrapTree(tree.moveChild(newParentId, newRole, newIndex, childId))\n}\noverride fun setProperty(nodeId: Long, role: String, value: String?): ITree {\n- return MMTree(tree.setProperty(nodeId, role, value))\n+ return wrapTree(tree.setProperty(nodeId, role, value))\n}\noverride fun setReferenceTarget(sourceId: Long, role: String, target: INodeReference?): ITree {\n- return MMTree(tree.setReferenceTarget(sourceId, role, target))\n+ return wrapTree(tree.setReferenceTarget(sourceId, role, target))\n}\noverride fun equals(other: Any?): Boolean {\n@@ -154,9 +158,15 @@ class MetaModelBranch(val branch: IBranch) : IBranch by branch {\n}\n}\n+ inner class MMBulkTree(override val tree: IBulkTree): MMTree(tree), IBulkTree {\n+ override fun getDescendants(root: Long, includeSelf: Boolean): Iterable<CLNode> {\n+ return tree.getDescendants(root, includeSelf)\n+ }\n+ }\n+\ninner class MMBranchListener(val listener: IBranchListener) : IBranchListener {\noverride fun treeChanged(oldTree: ITree?, newTree: ITree) {\n- listener.treeChanged(oldTree?.let { MMTree(it) }, MMTree(newTree))\n+ listener.treeChanged(oldTree?.let { wrapTree(it) }, wrapTree(newTree))\n}\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"diff": "<ref role=\"3cqZAo\" node=\"4_k_9wJ_0ee\" resolve=\"withInitialRemoval\" />\n</node>\n</node>\n+ <node concept=\"3clFbF\" id=\"bErqUx3Lhc\" role=\"3cqZAp\">\n+ <node concept=\"1rXfSq\" id=\"bErqUx3Lha\" role=\"3clFbG\">\n+ <ref role=\"37wK5l\" node=\"bErqUx3kqW\" resolve=\"prefetchModelContent\" />\n+ <node concept=\"37vLTw\" id=\"bErqUx4axK\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"4_k_9wJ_0ec\" resolve=\"tree\" />\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"3clFbF\" id=\"4_k_9wJ_0f1\" role=\"3cqZAp\">\n<node concept=\"1rXfSq\" id=\"4_k_9wJ_0f2\" role=\"3clFbG\">\n<ref role=\"37wK5l\" node=\"4_k_9wJ_0uZ\" resolve=\"syncChildrenToMPS\" />\n</node>\n</node>\n</node>\n+ <node concept=\"2tJIrI\" id=\"bErqUx3a0j\" role=\"jymVt\" />\n+ <node concept=\"3clFb_\" id=\"bErqUx3kqW\" role=\"jymVt\">\n+ <property role=\"TrG5h\" value=\"prefetchModelContent\" />\n+ <node concept=\"37vLTG\" id=\"bErqUx3MHT\" role=\"3clF46\">\n+ <property role=\"TrG5h\" value=\"tree\" />\n+ <node concept=\"3uibUv\" id=\"bErqUx3Ugo\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"jks5:~ITree\" resolve=\"ITree\" />\n+ </node>\n+ </node>\n+ <node concept=\"3cqZAl\" id=\"bErqUx3kqY\" role=\"3clF45\" />\n+ <node concept=\"3Tm1VV\" id=\"bErqUx3kqZ\" role=\"1B3o_S\" />\n+ <node concept=\"3clFbS\" id=\"bErqUx3kr0\" role=\"3clF47\">\n+ <node concept=\"3clFbJ\" id=\"bErqUx3G0s\" role=\"3cqZAp\">\n+ <node concept=\"3clFbS\" id=\"bErqUx3G0t\" role=\"3clFbx\">\n+ <node concept=\"3SKdUt\" id=\"bErqUx3G0u\" role=\"3cqZAp\">\n+ <node concept=\"1PaTwC\" id=\"bErqUx3G0v\" role=\"1aUNEU\">\n+ <node concept=\"3oM_SD\" id=\"bErqUx3G0w\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"prefetch\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"bErqUx3G0x\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"model\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"bErqUx3G0y\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"content\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbF\" id=\"bErqUx3G0z\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"bErqUx3G0$\" role=\"3clFbG\">\n+ <node concept=\"1eOMI4\" id=\"bErqUx3G0_\" role=\"2Oq$k0\">\n+ <node concept=\"10QFUN\" id=\"bErqUx3G0A\" role=\"1eOMHV\">\n+ <node concept=\"3uibUv\" id=\"bErqUx3G0B\" role=\"10QFUM\">\n+ <ref role=\"3uigEE\" to=\"xkhl:~IBulkTree\" resolve=\"IBulkTree\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"bErqUx3G0C\" role=\"10QFUP\">\n+ <ref role=\"3cqZAo\" node=\"bErqUx3MHT\" resolve=\"tree\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"liA8E\" id=\"bErqUx3G0D\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"xkhl:~IBulkTree.getDescendants(long,boolean)\" resolve=\"getDescendants\" />\n+ <node concept=\"37vLTw\" id=\"bErqUx3G0E\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"4_k_9wJ_0ds\" resolve=\"modelNodeId\" />\n+ </node>\n+ <node concept=\"3clFbT\" id=\"bErqUx3G0F\" role=\"37wK5m\">\n+ <property role=\"3clFbU\" value=\"true\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"2ZW3vV\" id=\"bErqUx3G0G\" role=\"3clFbw\">\n+ <node concept=\"3uibUv\" id=\"bErqUx3G0H\" role=\"2ZW6by\">\n+ <ref role=\"3uigEE\" to=\"xkhl:~IBulkTree\" resolve=\"IBulkTree\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"bErqUx3G0I\" role=\"2ZW6bz\">\n+ <ref role=\"3cqZAo\" node=\"bErqUx3MHT\" resolve=\"tree\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"2tJIrI\" id=\"4_k_9wJ_0fj\" role=\"jymVt\" />\n<node concept=\"3clFb_\" id=\"4_k_9wJ_0fk\" role=\"jymVt\">\n<property role=\"TrG5h\" value=\"syncModelPropertiesToMPS\" />\n<node concept=\"3cqZAl\" id=\"6f5fca_czcF\" role=\"3clF45\" />\n<node concept=\"3Tm1VV\" id=\"6f5fca_czcG\" role=\"1B3o_S\" />\n<node concept=\"3clFbS\" id=\"6f5fca_czcH\" role=\"3clF47\">\n+ <node concept=\"3clFbF\" id=\"bErqUx4vj5\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"bErqUx4Bi7\" role=\"3clFbG\">\n+ <node concept=\"2ShNRf\" id=\"bErqUx4vj1\" role=\"2Oq$k0\">\n+ <node concept=\"1pGfFk\" id=\"bErqUx4_rp\" role=\"2ShVmc\">\n+ <ref role=\"37wK5l\" to=\"qvpu:~PArea.<init>(org.modelix.model.api.IBranch)\" resolve=\"PArea\" />\n+ <node concept=\"1rXfSq\" id=\"bErqUx4_UY\" role=\"37wK5m\">\n+ <ref role=\"37wK5l\" node=\"4_k_9wJ_0e0\" resolve=\"getBranch\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"liA8E\" id=\"bErqUx4CVf\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"qvpu:~PArea.executeWrite(kotlin.jvm.functions.Function0)\" resolve=\"executeWrite\" />\n+ <node concept=\"1bVj0M\" id=\"bErqUx4FVA\" role=\"37wK5m\">\n+ <node concept=\"3clFbS\" id=\"bErqUx4FVB\" role=\"1bW5cS\">\n+ <node concept=\"3clFbF\" id=\"bErqUx4cwG\" role=\"3cqZAp\">\n+ <node concept=\"1rXfSq\" id=\"bErqUx4cwE\" role=\"3clFbG\">\n+ <ref role=\"37wK5l\" node=\"bErqUx3kqW\" resolve=\"prefetchModelContent\" />\n+ <node concept=\"2OqwBi\" id=\"bErqUx4M9b\" role=\"37wK5m\">\n+ <node concept=\"2OqwBi\" id=\"bErqUx4M9c\" role=\"2Oq$k0\">\n+ <node concept=\"1rXfSq\" id=\"bErqUx4M9d\" role=\"2Oq$k0\">\n+ <ref role=\"37wK5l\" node=\"4_k_9wJ_0e0\" resolve=\"getBranch\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"bErqUx4M9e\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"jks5:~IBranch.getTransaction()\" resolve=\"getTransaction\" />\n+ </node>\n+ </node>\n+ <node concept=\"liA8E\" id=\"bErqUx4M9f\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"jks5:~ITransaction.getTree()\" resolve=\"getTree\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"3clFbF\" id=\"6f5fca_d3Li\" role=\"3cqZAp\">\n<node concept=\"1rXfSq\" id=\"6f5fca_d3Lh\" role=\"3clFbG\">\n<ref role=\"37wK5l\" node=\"4_k_9wJ_0kH\" resolve=\"syncModelPropertiesFromMPS\" />\n<ref role=\"37wK5l\" node=\"4_k_9wJ_0K8\" resolve=\"processPendingReferences\" />\n</node>\n</node>\n+ <node concept=\"3cpWs6\" id=\"bErqUx5aKc\" role=\"3cqZAp\">\n+ <node concept=\"10M0yZ\" id=\"bErqUx5b9e\" role=\"3cqZAk\">\n+ <ref role=\"3cqZAo\" to=\"v18h:~Unit.INSTANCE\" resolve=\"INSTANCE\" />\n+ <ref role=\"1PxDUh\" to=\"v18h:~Unit\" resolve=\"Unit\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n</node>\n</node>\n<node concept=\"2tJIrI\" id=\"6xuwE2n_B0r\" role=\"jymVt\" />\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Performance issue in ModelSynchronizer |
426,496 | 16.12.2021 11:51:00 | -3,600 | ad8807be03840b67a450fd6b5e66626684d4b049 | Don't run tests when building/publishing a tag | [
{
"change_type": "MODIFY",
"old_path": ".github/workflows/publish.yml",
"new_path": ".github/workflows/publish.yml",
"diff": "@@ -23,4 +23,4 @@ jobs:\nNEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}\nNEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}\nGITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n- run: ./gradlew build publish && ./docker-ci.sh\n+ run: ./gradlew assemble publish && ./docker-ci.sh\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Don't run tests when building/publishing a tag |
426,496 | 16.12.2021 17:52:50 | -3,600 | 4ffa00c1540cb0fb37d58117d7b3e56011c73b5d | Performance issue while reading the meta model from the server | [
{
"change_type": "MODIFY",
"old_path": "model-client/src/commonMain/kotlin/org/modelix/model/metameta/MetaModelBranch.kt",
"new_path": "model-client/src/commonMain/kotlin/org/modelix/model/metameta/MetaModelBranch.kt",
"diff": "@@ -62,6 +62,53 @@ class MetaModelBranch(val branch: IBranch) : IBranch by branch {\nreturn PersistedConcept(localConceptId, globalConcept.getUID())\n}\n+ private fun prefetch() {\n+ // prefetch only for the root transaction, not for all nested ones\n+ if (!branch.canRead()) {\n+ metaModelSynchronizer.prefetch()\n+ }\n+ }\n+\n+ override fun <T> computeRead(computable: () -> T): T {\n+ prefetch()\n+ return branch.computeRead(computable)\n+ }\n+\n+ override fun <T> computeReadT(computable: (IReadTransaction) -> T): T {\n+ prefetch()\n+ return branch.computeReadT { computable(MMReadTransaction(it)) }\n+ }\n+\n+ override fun <T> computeWrite(computable: () -> T): T {\n+ prefetch()\n+ return branch.computeWrite(computable)\n+ }\n+\n+ override fun <T> computeWriteT(computable: (IWriteTransaction) -> T): T {\n+ prefetch()\n+ return branch.computeWriteT { computable(MMWriteTransaction(it)) }\n+ }\n+\n+ override fun runRead(runnable: () -> Unit) {\n+ prefetch()\n+ return branch.runRead(runnable)\n+ }\n+\n+ override fun runReadT(f: (IReadTransaction) -> Unit) {\n+ prefetch()\n+ return branch.runReadT { f(MMReadTransaction(it)) }\n+ }\n+\n+ override fun runWrite(runnable: () -> Unit) {\n+ prefetch()\n+ return branch.runWrite(runnable)\n+ }\n+\n+ override fun runWriteT(f: (IWriteTransaction) -> Unit) {\n+ prefetch()\n+ return branch.runWriteT { f(MMWriteTransaction(it)) }\n+ }\n+\nfun wrapTree(tree: ITree) = if (tree is IBulkTree) MMBulkTree(tree) else MMTree(tree)\ninner class MMReadTransaction(val transaction: IReadTransaction) : IReadTransaction by transaction, ITransactionWrapper {\n"
},
{
"change_type": "MODIFY",
"old_path": "model-client/src/commonMain/kotlin/org/modelix/model/metameta/MetaModelSynchronizer.kt",
"new_path": "model-client/src/commonMain/kotlin/org/modelix/model/metameta/MetaModelSynchronizer.kt",
"diff": "package org.modelix.model.metameta\nimport org.modelix.model.api.*\n+import org.modelix.model.lazy.IBulkTree\nclass MetaModelSynchronizer(val branch: IBranch) {\nprivate var cachedIndex: MetaModelIndex? = null\n@@ -37,6 +38,14 @@ class MetaModelSynchronizer(val branch: IBranch) {\nreturn idx\n}\n+ fun prefetch() {\n+ val tree = branch.computeReadT { it.tree }\n+ if (tree is IBulkTree) {\n+ tree.getChildren(ITree.ROOT_ID, MetaModelIndex.LANGUAGES_ROLE)\n+ .map { tree.getDescendants(it, false) }\n+ }\n+ }\n+\nfun getLanguageId(lang: ILanguage): Long {\nvar id: Long?\nval outdatedIndex = cachedIndex\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Performance issue while reading the meta model from the server |
426,504 | 22.12.2021 09:12:32 | -3,600 | c3d4c70909ad4c40747459ec9a99a05da4df6a38 | describing the release process | [
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -192,3 +192,7 @@ To use them in your gradle script add this repository:\n}\n}\n```\n+\n+To make a new release you will simply need to push a new tag. Everything is automated: it means that no version number have to be changed manually.\n+Code in master can be released under tags indicating the version numbers, without qualifiers.\n+For example, if the last tag from master branch has been \"0.0.1\", the next tag should be \"0.0.2\".\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | describing the release process |
426,504 | 23.12.2021 08:51:57 | -3,600 | ed5b234b65bb9822ca3df75326817cee2b029178 | introduce ModelixExportConfiguration | [
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.plugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.plugin.mps",
"diff": "</node>\n<node concept=\"liA8E\" id=\"5Le8ZRJerV5\" role=\"2OqNvi\">\n<ref role=\"37wK5l\" to=\"guwi:~PrintStream.println(java.lang.String)\" resolve=\"println\" />\n- <node concept=\"Xl_RD\" id=\"5Le8ZRJesqG\" role=\"37wK5m\">\n- <property role=\"Xl_RC\" value=\"modelix.export.path not provided\" />\n+ <node concept=\"3cpWs3\" id=\"4D52TXxAFrZ\" role=\"37wK5m\">\n+ <node concept=\"10M0yZ\" id=\"4D52TXxAFKO\" role=\"3uHU7B\">\n+ <ref role=\"3cqZAo\" node=\"4D52TXxAE_p\" resolve=\"STARTED\" />\n+ <ref role=\"1PxDUh\" node=\"4D52TXxApUP\" resolve=\"ModelixExportConfiguration\" />\n+ </node>\n+ <node concept=\"Xl_RD\" id=\"5Le8ZRJesqG\" role=\"3uHU7w\">\n+ <property role=\"Xl_RC\" value=\" not provided\" />\n+ </node>\n</node>\n</node>\n</node>\n<node concept=\"2YIFZM\" id=\"5$aoTsoylhD\" role=\"3clFbG\">\n<ref role=\"37wK5l\" to=\"wyt6:~System.setProperty(java.lang.String,java.lang.String)\" resolve=\"setProperty\" />\n<ref role=\"1Pybhc\" to=\"wyt6:~System\" resolve=\"System\" />\n- <node concept=\"Xl_RD\" id=\"5$aoTsoylhE\" role=\"37wK5m\">\n- <property role=\"Xl_RC\" value=\"modelix.export.started\" />\n+ <node concept=\"10M0yZ\" id=\"4D52TXxAH9V\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"4D52TXxAE_p\" resolve=\"STARTED\" />\n+ <ref role=\"1PxDUh\" node=\"4D52TXxApUP\" resolve=\"ModelixExportConfiguration\" />\n</node>\n<node concept=\"Xl_RD\" id=\"5$aoTsoylqn\" role=\"37wK5m\">\n<property role=\"Xl_RC\" value=\"true\" />\n<node concept=\"2YIFZM\" id=\"5wsTsVez30q\" role=\"37wK5m\">\n<ref role=\"37wK5l\" to=\"ia5i:3xX$Vyo0aHz\" resolve=\"get\" />\n<ref role=\"1Pybhc\" to=\"ia5i:3xX$Vyo038N\" resolve=\"PropertyOrEnv\" />\n- <node concept=\"Xl_RD\" id=\"rF2pzCbcAX\" role=\"37wK5m\">\n- <property role=\"Xl_RC\" value=\"modelix.export.serverUrl\" />\n+ <node concept=\"10M0yZ\" id=\"4D52TXxAMh0\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"4D52TXxALbd\" resolve=\"SERVER_URL\" />\n+ <ref role=\"1PxDUh\" node=\"4D52TXxApUP\" resolve=\"ModelixExportConfiguration\" />\n</node>\n</node>\n<node concept=\"2YIFZM\" id=\"5wsTsVez30r\" role=\"37wK5m\">\n<ref role=\"37wK5l\" to=\"ia5i:3xX$Vyo0aHz\" resolve=\"get\" />\n<ref role=\"1Pybhc\" to=\"ia5i:3xX$Vyo038N\" resolve=\"PropertyOrEnv\" />\n- <node concept=\"Xl_RD\" id=\"rF2pzCbcJ5\" role=\"37wK5m\">\n- <property role=\"Xl_RC\" value=\"modelix.export.treeId\" />\n+ <node concept=\"10M0yZ\" id=\"4D52TXxAIyT\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"4D52TXxAHxx\" resolve=\"REPOSITORY_ID\" />\n+ <ref role=\"1PxDUh\" node=\"4D52TXxApUP\" resolve=\"ModelixExportConfiguration\" />\n</node>\n</node>\n<node concept=\"2YIFZM\" id=\"5wsTsVez30s\" role=\"37wK5m\">\n<ref role=\"37wK5l\" to=\"ia5i:3xX$Vyo0aHz\" resolve=\"get\" />\n<ref role=\"1Pybhc\" to=\"ia5i:3xX$Vyo038N\" resolve=\"PropertyOrEnv\" />\n- <node concept=\"Xl_RD\" id=\"rF2pzCbcQX\" role=\"37wK5m\">\n- <property role=\"Xl_RC\" value=\"modelix.export.branchName\" />\n+ <node concept=\"10M0yZ\" id=\"4D52TXxAJRk\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"4D52TXxAIMW\" resolve=\"BRANCH_NAME\" />\n+ <ref role=\"1PxDUh\" node=\"4D52TXxApUP\" resolve=\"ModelixExportConfiguration\" />\n</node>\n</node>\n</node>\n<node concept=\"2YIFZM\" id=\"5$aoTsoyl$k\" role=\"3clFbG\">\n<ref role=\"37wK5l\" to=\"wyt6:~System.setProperty(java.lang.String,java.lang.String)\" resolve=\"setProperty\" />\n<ref role=\"1Pybhc\" to=\"wyt6:~System\" resolve=\"System\" />\n- <node concept=\"Xl_RD\" id=\"5$aoTsoyl$l\" role=\"37wK5m\">\n- <property role=\"Xl_RC\" value=\"modelix.export.done\" />\n+ <node concept=\"10M0yZ\" id=\"4D52TXxAKWJ\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"4D52TXxAIKy\" resolve=\"DONE\" />\n+ <ref role=\"1PxDUh\" node=\"4D52TXxApUP\" resolve=\"ModelixExportConfiguration\" />\n</node>\n<node concept=\"Xl_RD\" id=\"5$aoTsoyl$m\" role=\"37wK5m\">\n<property role=\"Xl_RC\" value=\"true\" />\n</node>\n</node>\n</node>\n+ <node concept=\"312cEu\" id=\"4D52TXxApUP\">\n+ <property role=\"3GE5qa\" value=\"init\" />\n+ <property role=\"TrG5h\" value=\"ModelixExportConfiguration\" />\n+ <node concept=\"Wx3nA\" id=\"4D52TXxABGO\" role=\"jymVt\">\n+ <property role=\"TrG5h\" value=\"PREFIX\" />\n+ <property role=\"3TUv4t\" value=\"true\" />\n+ <node concept=\"3Tm6S6\" id=\"4D52TXxA_uE\" role=\"1B3o_S\" />\n+ <node concept=\"Xl_RD\" id=\"4D52TXxABYP\" role=\"33vP2m\">\n+ <property role=\"Xl_RC\" value=\"modelix.export.\" />\n+ </node>\n+ <node concept=\"17QB3L\" id=\"4D52TXxABML\" role=\"1tU5fm\" />\n+ </node>\n+ <node concept=\"Wx3nA\" id=\"4D52TXxAG9P\" role=\"jymVt\">\n+ <property role=\"TrG5h\" value=\"PATH\" />\n+ <property role=\"3TUv4t\" value=\"true\" />\n+ <node concept=\"3Tm1VV\" id=\"4D52TXxAG9Q\" role=\"1B3o_S\" />\n+ <node concept=\"17QB3L\" id=\"4D52TXxAG9R\" role=\"1tU5fm\" />\n+ <node concept=\"3cpWs3\" id=\"4D52TXxAG9S\" role=\"33vP2m\">\n+ <node concept=\"Xl_RD\" id=\"4D52TXxAG9T\" role=\"3uHU7w\">\n+ <property role=\"Xl_RC\" value=\"path\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"4D52TXxAG9W\" role=\"3uHU7B\">\n+ <ref role=\"3cqZAo\" node=\"4D52TXxABGO\" resolve=\"PREFIX\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"Wx3nA\" id=\"4D52TXxAE_p\" role=\"jymVt\">\n+ <property role=\"TrG5h\" value=\"STARTED\" />\n+ <property role=\"3TUv4t\" value=\"true\" />\n+ <node concept=\"3Tm1VV\" id=\"4D52TXxAEjO\" role=\"1B3o_S\" />\n+ <node concept=\"17QB3L\" id=\"4D52TXxAE_e\" role=\"1tU5fm\" />\n+ <node concept=\"3cpWs3\" id=\"4D52TXxAF3f\" role=\"33vP2m\">\n+ <node concept=\"Xl_RD\" id=\"4D52TXxAF8Z\" role=\"3uHU7w\">\n+ <property role=\"Xl_RC\" value=\"started\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"4D52TXxAEFv\" role=\"3uHU7B\">\n+ <ref role=\"3cqZAo\" node=\"4D52TXxABGO\" resolve=\"PREFIX\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"Wx3nA\" id=\"4D52TXxAIKy\" role=\"jymVt\">\n+ <property role=\"TrG5h\" value=\"DONE\" />\n+ <property role=\"3TUv4t\" value=\"true\" />\n+ <node concept=\"3Tm1VV\" id=\"4D52TXxAIKz\" role=\"1B3o_S\" />\n+ <node concept=\"17QB3L\" id=\"4D52TXxAIK$\" role=\"1tU5fm\" />\n+ <node concept=\"3cpWs3\" id=\"4D52TXxAIK_\" role=\"33vP2m\">\n+ <node concept=\"Xl_RD\" id=\"4D52TXxAIKA\" role=\"3uHU7w\">\n+ <property role=\"Xl_RC\" value=\"done\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"4D52TXxAIKD\" role=\"3uHU7B\">\n+ <ref role=\"3cqZAo\" node=\"4D52TXxABGO\" resolve=\"PREFIX\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"Wx3nA\" id=\"4D52TXxAIMW\" role=\"jymVt\">\n+ <property role=\"TrG5h\" value=\"BRANCH_NAME\" />\n+ <property role=\"3TUv4t\" value=\"true\" />\n+ <node concept=\"3Tm1VV\" id=\"4D52TXxAIMX\" role=\"1B3o_S\" />\n+ <node concept=\"17QB3L\" id=\"4D52TXxAIMY\" role=\"1tU5fm\" />\n+ <node concept=\"3cpWs3\" id=\"4D52TXxAIMZ\" role=\"33vP2m\">\n+ <node concept=\"Xl_RD\" id=\"4D52TXxAIN0\" role=\"3uHU7w\">\n+ <property role=\"Xl_RC\" value=\"branchName\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"4D52TXxAIN3\" role=\"3uHU7B\">\n+ <ref role=\"3cqZAo\" node=\"4D52TXxABGO\" resolve=\"PREFIX\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"Wx3nA\" id=\"4D52TXxAHxx\" role=\"jymVt\">\n+ <property role=\"TrG5h\" value=\"REPOSITORY_ID\" />\n+ <property role=\"3TUv4t\" value=\"true\" />\n+ <node concept=\"3Tm1VV\" id=\"4D52TXxAHxy\" role=\"1B3o_S\" />\n+ <node concept=\"17QB3L\" id=\"4D52TXxAHxz\" role=\"1tU5fm\" />\n+ <node concept=\"3cpWs3\" id=\"4D52TXxAHx$\" role=\"33vP2m\">\n+ <node concept=\"Xl_RD\" id=\"4D52TXxAHx_\" role=\"3uHU7w\">\n+ <property role=\"Xl_RC\" value=\"repositoryId\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"4D52TXxAHxC\" role=\"3uHU7B\">\n+ <ref role=\"3cqZAo\" node=\"4D52TXxABGO\" resolve=\"PREFIX\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"Wx3nA\" id=\"4D52TXxALbd\" role=\"jymVt\">\n+ <property role=\"TrG5h\" value=\"SERVER_URL\" />\n+ <property role=\"3TUv4t\" value=\"true\" />\n+ <node concept=\"3Tm1VV\" id=\"4D52TXxALbe\" role=\"1B3o_S\" />\n+ <node concept=\"17QB3L\" id=\"4D52TXxALbf\" role=\"1tU5fm\" />\n+ <node concept=\"3cpWs3\" id=\"4D52TXxALbg\" role=\"33vP2m\">\n+ <node concept=\"Xl_RD\" id=\"4D52TXxALbh\" role=\"3uHU7w\">\n+ <property role=\"Xl_RC\" value=\"serverUrl\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"4D52TXxALbk\" role=\"3uHU7B\">\n+ <ref role=\"3cqZAo\" node=\"4D52TXxABGO\" resolve=\"PREFIX\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"2tJIrI\" id=\"4D52TXxAMEl\" role=\"jymVt\" />\n+ <node concept=\"3clFbW\" id=\"4D52TXxANhN\" role=\"jymVt\">\n+ <node concept=\"3cqZAl\" id=\"4D52TXxANhQ\" role=\"3clF45\" />\n+ <node concept=\"3Tm6S6\" id=\"4D52TXxANjh\" role=\"1B3o_S\" />\n+ <node concept=\"3clFbS\" id=\"4D52TXxANhS\" role=\"3clF47\">\n+ <node concept=\"3SKdUt\" id=\"4D52TXxANtx\" role=\"3cqZAp\">\n+ <node concept=\"1PaTwC\" id=\"4D52TXxANty\" role=\"1aUNEU\">\n+ <node concept=\"3oM_SD\" id=\"4D52TXxANtz\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"prevent\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"4D52TXxANtK\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"instantiation\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3Tm1VV\" id=\"4D52TXxApUQ\" role=\"1B3o_S\" />\n+ </node>\n</model>\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | introduce ModelixExportConfiguration |
426,504 | 29.12.2021 10:17:56 | -3,600 | f48c741cb3d2c97927c4783b05dff56e1441860d | working on supporting external MPS | [
{
"change_type": "DELETE",
"old_path": ".idea/runConfigurations.xml",
"new_path": null,
"diff": "-<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n-<project version=\"4\">\n- <component name=\"RunConfigurationProducerService\">\n- <option name=\"ignoredProducers\">\n- <set>\n- <option value=\"com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer\" />\n- </set>\n- </option>\n- </component>\n-</project>\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/EnvironmentLoader.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/EnvironmentLoader.java",
"diff": "@@ -46,10 +46,75 @@ public class EnvironmentLoader {\n//.withTestingPlugin()\n.withVcsPlugin()\n.withWorkbenchPath()\n- .addPlugin(PathManager.getHomePath()+\"/plugins/org.modelix.model\", \"org.modelix.model\")\n- .addPlugin(PathManager.getHomePath()+\"/plugins/org.modelix.common\", \"org.modelix.common\")\n;\n+ // Add MPS extensions and Modelix\n+ File extensionsPath = new File(System.getProperty(\"modelix.export.mpsExtensionsPath\"));\n+ if (!extensionsPath.exists()) {\n+ throw new RuntimeException(\"MPS Extensions path is not valid: \" + extensionsPath);\n+ }\n+\n+\n+ // Add Modelix\n+ File modelixPath = new File(System.getProperty(\"modelix.export.modelixPath\"));\n+ if (!modelixPath.exists()) {\n+ throw new RuntimeException(\"Modelix path is not valid: \" + modelixPath);\n+ }\n+ //.addPlugin(PathManager.getHomePath()+\"/plugins/org.modelix.model\", \"org.modelix.model\")\n+ //.addPlugin(PathManager.getHomePath()+\"/plugins/org.modelix.common\", \"org.modelix.common\")\n+\n+// extension.additionalPlugins.forEach {\n+// def f = new File(it.path)\n+// if (f.exists()) {\n+// plugin(path: it.path, id: it.id)\n+// } else {\n+// logger.warn(\"Provided plugin does not exist: ${it.path} (${it.id})\")\n+// }\n+// }\n+//\n+// extension.additionalPluginsDirs.forEach { entry ->\n+// if (entry.dir.exists()) {\n+// entry.dir.eachFileRecurse(groovy.io.FileType.FILES) { file ->\n+// if (file.name == \"plugin.xml\") {\n+// def xmlCode = new XmlSlurper().parseText(file.getText())\n+// def id = xmlCode.id.text()\n+// if (!entry.idsToExclude.contains(id)) {\n+// def dir = file.getParentFile().getParentFile()\n+// plugin(path: dir.getAbsolutePath(), id: id)\n+// }\n+// }\n+// }\n+// } else {\n+// logger.warn(\"Provided plugin dir does not exist: ${it}\")\n+// }\n+// }\n+//\n+//\n+// extension.additionalLibraries.forEach {\n+// if (it instanceof String){\n+// logger.info(\" -> library ${it}\")\n+// def f = new File(it)\n+// if (f.exists()) {\n+// library(file: it)\n+// } else {\n+// logger.warn(\"Provided library does not exist: ${f.absolutePath}\")\n+// }\n+// } else if (it instanceof File) {\n+// if (it.exists()) {\n+// it.eachFileRecurse { file ->\n+// logger.info(\" -> considering library dir ${file} in ${it}\")\n+// if (file.getName().endsWith(\".jar\")) {\n+// library(file: \"${file.getAbsolutePath()}\")\n+// }\n+// }\n+// } else {\n+// logger.warn(\"Provided library does not exist: ${it.absolutePath}\")\n+// }\n+// } else {\n+// logger.error(\"ignoring additionalLibraries ${it}, as they are not a String or a File\")\n+// }\n+// }\n+\nif (gitRepoDir != null) {\nconfig.addLib(gitRepoDir.getAbsolutePath());\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"diff": "package org.modelix.gradle.model;\n+import org.gradle.api.Action;\n+import org.gradle.api.DefaultTask;\nimport org.gradle.api.Plugin;\nimport org.gradle.api.Project;\n+import org.gradle.api.Task;\nimport org.gradle.api.artifacts.Configuration;\nimport org.gradle.api.file.RelativePath;\nimport org.gradle.api.tasks.Copy;\nimport org.gradle.api.tasks.JavaExec;\nimport java.io.File;\n+import java.io.FileReader;\nimport java.io.IOException;\nimport java.net.URL;\nimport java.time.Duration;\nimport java.util.Arrays;\nimport java.util.Enumeration;\n+import java.util.Properties;\nimport java.util.jar.Manifest;\nimport java.util.stream.Collectors;\n@@ -22,33 +27,53 @@ public class ModelPlugin implements Plugin<Project> {\nSystem.out.println(\"modelix model plugin loaded\");\nManifest manifest = readManifest();\nModelixModelSettings settings = project_.getExtensions().create(\"modelixModel\", ModelixModelSettings.class);\n- String mpsVersion = manifest.getMainAttributes().getValue(\"MPS-Version\");\n- String mpsMajorVersion = manifest.getMainAttributes().getValue(\"MPS-MajorVersion\");\n- System.out.println(\"Using MPS version \" + mpsVersion);\nString modelixVersion = manifest.getMainAttributes().getValue(\"modelix-Version\");\nSystem.out.println(\"Using modelix Version \" + modelixVersion);\nString extensionsVersion = manifest.getMainAttributes().getValue(\"MPS-extensions-Version\");\nSystem.out.println(\"Using MPS-extensions version \" + extensionsVersion);\nproject_.afterEvaluate((Project project) -> {\nSystem.out.println(\"modelix model plugin loaded for project \" + project.getDisplayName());\n+\n+ Configuration genConfig = project.getConfigurations().detachedConfiguration(\n+ project.getDependencies().create(\"org.modelix:gradle-plugin:\" + modelixVersion)\n+ );\n+\n+ Task setupTask = project.getTasks().create(\"setupModelixExport\", task -> {\n+ final boolean usingExistingMPS = settings.getMpsPath() != null;\n+ if (usingExistingMPS) {\n+ System.out.println(\"no setup needed for Modelix export because using existing MPS\");\n+ } else {\n+ System.out.println(\"setup needed for Modelix export because not using existing MPS\");\n+ String mpsVersion = manifest.getMainAttributes().getValue(\"MPS-Version\");\nConfiguration mpsConfig = project.getConfigurations().detachedConfiguration(\nproject.getDependencies().create(\"com.jetbrains:mps:\" + mpsVersion )\n);\n+ settings.setMpsConfig(mpsConfig);\nConfiguration pluginsConfig = project.getConfigurations().detachedConfiguration(\nproject.getDependencies().create(\"de.itemis.mps:extensions:\" + extensionsVersion),\n- project.getDependencies().create(\"org.modelix:mps-model-plugin:\" + modelixVersion)\n- );\n- Configuration genConfig = project.getConfigurations().detachedConfiguration(\n- project.getDependencies().create(\"org.modelix:gradle-plugin:\" + modelixVersion)\n- );\n+ project.getDependencies().create(\"org.modelix:mps-model-plugin:\" + modelixVersion));\n+ settings.setPluginsConfig(pluginsConfig);\n+ }\n+ });\n- File mpsLocation = new File(\"mpsForModelixExport\");\nCopy copyMpsTask = project.getTasks().create(\"copyMpsForModelixExport\", Copy.class, copy -> {\n+ copy.dependsOn(setupTask);\n+ final boolean usingExistingMPS = settings.getMpsPath() != null;\n+ if (usingExistingMPS) {\n+ System.out.println(\"no need to copy MPS, reusing MPS at \" + settings.getMpsPath());\n+ } else {\n+ Configuration mpsConfig = settings.getMpsConfig();\ncopy.from(mpsConfig.resolve().stream().map(project::zipTree).collect(Collectors.toList()));\n- copy.into(mpsLocation);\n+ copy.into(new File(\"mpsForModelixExport\"));\n+ }\n});\nCopy copyMpsModelPluginTask = project.getTasks().create(\"copyMpsModelPluginForModelixExport\", Copy.class, copy -> {\ncopy.dependsOn(copyMpsTask);\n+ final boolean usingExistingMPS = settings.getMpsPath() != null;\n+ if (usingExistingMPS) {\n+ System.out.println(\"no need to copy plugins into MPS, as we are reusing MPS at \" + settings.getMpsPath());\n+ } else {\n+ Configuration pluginsConfig = settings.getPluginsConfig();\ncopy.from(pluginsConfig.resolve().stream().map(it -> project.zipTree(it)).collect(Collectors.toList()));\ncopy.eachFile(fcd -> {\nif (fcd.getRelativePath().getSegments()[0].equals(\"de.itemis.mps.extensions\")) {\n@@ -56,18 +81,25 @@ public class ModelPlugin implements Plugin<Project> {\nfcd.setRelativePath(new RelativePath(true, Arrays.stream(fcd.getRelativePath().getSegments()).skip(1).toArray(String[]::new)));\n}\n});\n- copy.into(new File(mpsLocation, \"plugins\"));\n+ copy.into(new File(new File(\"mpsForModelixExport\"), \"plugins\"));\n+ }\n});\nproject.getTasks().create(\"downloadModel\", JavaExec.class, javaExec -> {\n- javaExec.dependsOn(copyMpsTask, copyMpsModelPluginTask);\n+ final boolean usingExistingMPS = settings.getMpsPath() != null;\n+ File mpsLocation = usingExistingMPS ? new File(settings.getMpsPath()) : new File(\"mpsForModelixExport\");\n+ File mpsExtensionsLocation = usingExistingMPS ? new File(settings.getMpsExtensionsArtifactsPath()) : new File(new File(\"mpsForModelixExport\"), \"plugins\");\n+ File modelixLocation = usingExistingMPS ? new File(settings.getModelixArtifactsPath()) : new File(new File(\"mpsForModelixExport\"), \"plugins\");\n+ javaExec.dependsOn(setupTask, copyMpsTask, copyMpsModelPluginTask);\njavaExec.setDescription(\"Export models from modelix model server to MPS files\");\njavaExec.classpath(project.fileTree(new File(mpsLocation, \"lib\")).include(\"**/*.jar\"));\njavaExec.classpath(genConfig);\njavaExec.args(\n\"serverUrl\", settings.getServerUrl(),\n\"repositoryId\", settings.getRepositoryId(),\n- \"branchName\", settings.getBranchName()\n+ \"branchName\", settings.getBranchName(),\n+ \"mpsExtensionsPath\", mpsExtensionsLocation.getAbsolutePath(),\n+ \"modelixPath\", modelixLocation.getAbsolutePath()\n);\nif (settings.isDebug()) javaExec.setDebug(true);\njavaExec.getTimeout().set(Duration.ofSeconds(settings.getTimeout()));\n"
},
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelixModelSettings.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelixModelSettings.java",
"diff": "*/\npackage org.modelix.gradle.model;\n+import org.gradle.api.artifacts.Configuration;\n+\n+import java.io.File;\n+import java.util.List;\n+import java.util.LinkedList;\n+import java.util.Collections;\n+\npublic class ModelixModelSettings {\n+\n+ private Configuration mpsConfig = null;\n+ private Configuration pluginsConfig = null;\n+\n+ public void setMpsConfig(Configuration mpsConfig) {\n+ this.mpsConfig = mpsConfig;\n+ }\n+\n+ public Configuration getMpsConfig() {\n+ return this.mpsConfig;\n+ }\n+\n+ public void setPluginsConfig(Configuration pluginsConfig) {\n+ this.pluginsConfig = pluginsConfig;\n+ }\n+\n+ public Configuration getPluginsConfig() {\n+ return this.pluginsConfig;\n+ }\n+\n+ private class PluginsEntry {\n+ File dir;\n+ List<String> idsToExclude;\n+ PluginsEntry(File dir, List<String> idsToExclude) {\n+ this.dir = dir;\n+ this.idsToExclude = idsToExclude;\n+ }\n+ }\n+\n+ private class PluginConf {\n+ public String path;\n+ public String id;\n+ }\n+\n+ private String mpsPath = null;\n+ private String mpsExtensionsArtifactsPath = null;\n+ private String modelixArtifactsPath = null;\nprivate String serverUrl = \"http://localhost:28101/\";\nprivate String repositoryId = \"default\";\nprivate String branchName = \"master\";\nprivate boolean debug = false;\nprivate int timeoutSeconds = 120;\n+ List<Object> additionalLibraries = new LinkedList<Object>();\n+ List<PluginConf> additionalPlugins = new LinkedList<PluginConf>();\n+ List<PluginsEntry> additionalPluginsDirs = new LinkedList<PluginsEntry>();\n+\n+ public String getMpsPath() {\n+ return this.mpsPath;\n+ }\n+\n+ public void setMpsPath(String mps) {\n+ this.mpsPath = mpsPath;\n+ }\n+\n+ public String getMpsExtensionsArtifactsPath() {\n+ return this.mpsExtensionsArtifactsPath;\n+ }\n+\n+ public void setMpsExtensionsArtifactsPath(String mpsExtensionsArtifactsPath) {\n+ this.mpsExtensionsArtifactsPath = mpsExtensionsArtifactsPath;\n+ }\n+\n+ public String getModelixArtifactsPath() {\n+ return this.modelixArtifactsPath;\n+ }\n+\n+ public void setModelixArtifactsPath(String modelixArtifactsPath) {\n+ this.modelixArtifactsPath = modelixArtifactsPath;\n+ }\n+\npublic String getServerUrl() {\nreturn serverUrl;\n}\n@@ -59,4 +131,27 @@ public class ModelixModelSettings {\npublic void setDebug(boolean debug) {\nthis.debug = debug;\n}\n+\n+ public void addLibrary(String library) {\n+ additionalLibraries.add(library);\n+ }\n+\n+ public void addPluginDir(File dir) {\n+ addPluginDir(dir, Collections.emptyList());\n+ }\n+\n+ public void addPluginDir(File dir, List<String> idsToExclude) {\n+ additionalPluginsDirs.add(new PluginsEntry(dir, idsToExclude));\n+ }\n+\n+ public void addPlugin(String path, String id) {\n+ PluginConf pc = new PluginConf();\n+ pc.path = path;\n+ pc.id = id;\n+ additionalPlugins.add(pc);\n+ }\n+\n+ public void addLibraryDir(File dir) {\n+ additionalLibraries.add(dir);\n+ }\n}\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | working on supporting external MPS |
426,504 | 29.12.2021 11:33:32 | -3,600 | 8363c7b470936da0ccfecef944af5eeb71d342e9 | postponing creation of tasks to when configuration is available | [
{
"change_type": "ADD",
"old_path": null,
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/DownloadModelFromModelixTask.java",
"diff": "+package org.modelix.gradle.model;\n+\n+import org.gradle.api.DefaultTask;\n+import org.gradle.api.provider.Property;\n+import org.gradle.api.tasks.Input;\n+import org.gradle.api.tasks.TaskAction;\n+\n+public abstract class DownloadModelFromModelixTask extends DefaultTask {\n+ @Input\n+ abstract public Property<String> mpsPath();\n+\n+ @Input\n+ abstract public Property<String> mpsExtensionPath();\n+\n+ @Input\n+ abstract public Property<String> modelixPath();\n+\n+ @TaskAction\n+ public void downloadModelFromModelix() {\n+ System.out.println(\"==============================\");\n+ System.out.println(\"Downloading Model from Modelix\");\n+ System.out.println(\"==============================\");\n+ System.out.println(\" mps path : \" + mpsPath());\n+ System.out.println(\" mps extensions path : \" + mpsExtensionPath());\n+ System.out.println(\" modelix path : \" + modelixPath());\n+ }\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"diff": "@@ -22,58 +22,54 @@ import java.util.jar.Manifest;\nimport java.util.stream.Collectors;\npublic class ModelPlugin implements Plugin<Project> {\n+\n@Override\npublic void apply(Project project_) {\n- System.out.println(\"modelix model plugin loaded\");\n- Manifest manifest = readManifest();\nModelixModelSettings settings = project_.getExtensions().create(\"modelixModel\", ModelixModelSettings.class);\n- String modelixVersion = manifest.getMainAttributes().getValue(\"modelix-Version\");\n- System.out.println(\"Using modelix Version \" + modelixVersion);\n- String extensionsVersion = manifest.getMainAttributes().getValue(\"MPS-extensions-Version\");\n- System.out.println(\"Using MPS-extensions version \" + extensionsVersion);\nproject_.afterEvaluate((Project project) -> {\n- System.out.println(\"modelix model plugin loaded for project \" + project.getDisplayName());\n+ System.out.println(\"===========================\");\n+ System.out.println(\"Modelix model plugin loaded\");\n+ System.out.println(\"===========================\");\n+ System.out.println(\" settings loaded from modelixModel.\");\n+ System.out.println(\" mps path : \" + settings.getMpsPath());\n+ System.out.println(\" mps extensions path : \" + settings.getMpsExtensionsArtifactsPath());\n+ System.out.println(\" modelix path : \" + settings.getModelixArtifactsPath());\n+ settings.validate();\n+ Manifest manifest = readManifest();\n+ String modelixVersion = manifest.getMainAttributes().getValue(\"modelix-Version\");\nConfiguration genConfig = project.getConfigurations().detachedConfiguration(\nproject.getDependencies().create(\"org.modelix:gradle-plugin:\" + modelixVersion)\n);\n- Task setupTask = project.getTasks().create(\"setupModelixExport\", task -> {\n- final boolean usingExistingMPS = settings.getMpsPath() != null;\n- if (usingExistingMPS) {\n- System.out.println(\"no setup needed for Modelix export because using existing MPS\");\n+ final Configuration mpsConfig;\n+ final Configuration pluginsConfig;\n+ if (settings.usingExistingMps()) {\n+ mpsConfig = null;\n+ pluginsConfig = null;\n} else {\n- System.out.println(\"setup needed for Modelix export because not using existing MPS\");\nString mpsVersion = manifest.getMainAttributes().getValue(\"MPS-Version\");\n- Configuration mpsConfig = project.getConfigurations().detachedConfiguration(\n+ String extensionsVersion = manifest.getMainAttributes().getValue(\"MPS-extensions-Version\");\n+ mpsConfig = project.getConfigurations().detachedConfiguration(\nproject.getDependencies().create(\"com.jetbrains:mps:\" + mpsVersion )\n);\n- settings.setMpsConfig(mpsConfig);\n- Configuration pluginsConfig = project.getConfigurations().detachedConfiguration(\n+ pluginsConfig = project.getConfigurations().detachedConfiguration(\nproject.getDependencies().create(\"de.itemis.mps:extensions:\" + extensionsVersion),\nproject.getDependencies().create(\"org.modelix:mps-model-plugin:\" + modelixVersion));\n- settings.setPluginsConfig(pluginsConfig);\n}\n- });\n- Copy copyMpsTask = project.getTasks().create(\"copyMpsForModelixExport\", Copy.class, copy -> {\n- copy.dependsOn(setupTask);\n- final boolean usingExistingMPS = settings.getMpsPath() != null;\n- if (usingExistingMPS) {\n- System.out.println(\"no need to copy MPS, reusing MPS at \" + settings.getMpsPath());\n+ final Copy copyMpsTask;\n+ final Copy copyMpsModelPluginTask;\n+ if (settings.usingExistingMps()) {\n+ copyMpsTask = null;\n+ copyMpsModelPluginTask = null;\n} else {\n- Configuration mpsConfig = settings.getMpsConfig();\n+ copyMpsTask = project.getTasks().create(\"copyMpsForModelixExport\", Copy.class, copy -> {\ncopy.from(mpsConfig.resolve().stream().map(project::zipTree).collect(Collectors.toList()));\ncopy.into(new File(\"mpsForModelixExport\"));\n- }\n});\n- Copy copyMpsModelPluginTask = project.getTasks().create(\"copyMpsModelPluginForModelixExport\", Copy.class, copy -> {\n+ copyMpsModelPluginTask = project.getTasks().create(\"copyMpsModelPluginForModelixExport\", Copy.class, copy -> {\ncopy.dependsOn(copyMpsTask);\n- final boolean usingExistingMPS = settings.getMpsPath() != null;\n- if (usingExistingMPS) {\n- System.out.println(\"no need to copy plugins into MPS, as we are reusing MPS at \" + settings.getMpsPath());\n- } else {\n- Configuration pluginsConfig = settings.getPluginsConfig();\ncopy.from(pluginsConfig.resolve().stream().map(it -> project.zipTree(it)).collect(Collectors.toList()));\ncopy.eachFile(fcd -> {\nif (fcd.getRelativePath().getSegments()[0].equals(\"de.itemis.mps.extensions\")) {\n@@ -82,15 +78,29 @@ public class ModelPlugin implements Plugin<Project> {\n}\n});\ncopy.into(new File(new File(\"mpsForModelixExport\"), \"plugins\"));\n- }\n});\n+ }\nproject.getTasks().create(\"downloadModel\", JavaExec.class, javaExec -> {\n- final boolean usingExistingMPS = settings.getMpsPath() != null;\n- File mpsLocation = usingExistingMPS ? new File(settings.getMpsPath()) : new File(\"mpsForModelixExport\");\n- File mpsExtensionsLocation = usingExistingMPS ? new File(settings.getMpsExtensionsArtifactsPath()) : new File(new File(\"mpsForModelixExport\"), \"plugins\");\n- File modelixLocation = usingExistingMPS ? new File(settings.getModelixArtifactsPath()) : new File(new File(\"mpsForModelixExport\"), \"plugins\");\n- javaExec.dependsOn(setupTask, copyMpsTask, copyMpsModelPluginTask);\n+ final boolean usingExistingMPS = settings.usingExistingMps();\n+ File mpsLocation = settings.getMpsLocation();\n+ File mpsExtensionsLocation = settings.getMpsExtensionsLocation();\n+ File modelixLocation = settings.getModelixLocation();\n+ System.out.println(\"=========================================\");\n+ System.out.println(\"Modelix model plugin: Download model task\");\n+ System.out.println(\"=========================================\");\n+ System.out.println(\" using existing MPS : \" + usingExistingMPS);\n+ System.out.println(\" mps location : \" + mpsLocation);\n+ System.out.println(\" mps extensions location : \" + mpsExtensionsLocation);\n+ System.out.println(\" modelix location : \" + modelixLocation);\n+ System.out.println(\" server URL : \" + settings.getServerUrl());\n+ System.out.println(\" repository ID : \" + settings.getRepositoryId());\n+ System.out.println(\" branch name : \" + settings.getBranchName());\n+ if (usingExistingMPS) {\n+ // no dependencies\n+ } else {\n+ javaExec.dependsOn(copyMpsTask, copyMpsModelPluginTask);\n+ }\njavaExec.setDescription(\"Export models from modelix model server to MPS files\");\njavaExec.classpath(project.fileTree(new File(mpsLocation, \"lib\")).include(\"**/*.jar\"));\njavaExec.classpath(genConfig);\n@@ -98,8 +108,8 @@ public class ModelPlugin implements Plugin<Project> {\n\"serverUrl\", settings.getServerUrl(),\n\"repositoryId\", settings.getRepositoryId(),\n\"branchName\", settings.getBranchName(),\n- \"mpsExtensionsPath\", mpsExtensionsLocation.getAbsolutePath(),\n- \"modelixPath\", modelixLocation.getAbsolutePath()\n+ \"mpsExtensionsPath\", settings.getMpsExtensionsArtifactsPath(),\n+ \"modelixPath\", settings.getModelixArtifactsPath()\n);\nif (settings.isDebug()) javaExec.setDebug(true);\njavaExec.getTimeout().set(Duration.ofSeconds(settings.getTimeout()));\n"
},
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelixModelSettings.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelixModelSettings.java",
"diff": "package org.modelix.gradle.model;\nimport org.gradle.api.artifacts.Configuration;\n+import org.gradle.api.internal.provider.DefaultProperty;\n+import org.gradle.api.provider.Property;\nimport java.io.File;\nimport java.util.List;\n@@ -68,11 +70,45 @@ public class ModelixModelSettings {\nList<PluginConf> additionalPlugins = new LinkedList<PluginConf>();\nList<PluginsEntry> additionalPluginsDirs = new LinkedList<PluginsEntry>();\n+ public boolean usingExistingMps() {\n+ return getMpsPath() != null;\n+ }\n+\n+ public void validate() {\n+ boolean valid = true;\n+ if (usingExistingMps()) {\n+ if (this.mpsExtensionsArtifactsPath == null) {\n+ System.err.println(\"When specifying MPS path also MPS extensions path must be specified\");\n+ valid = false;\n+ }\n+ if (this.modelixArtifactsPath == null) {\n+ System.err.println(\"When specifying MPS path also Modelix path must be specified\");\n+ valid = false;\n+ }\n+ }\n+ if (!valid) {\n+ throw new RuntimeException(\"Invalid Modelix Plugin configuration\");\n+ }\n+ }\n+\n+ public File getMpsLocation() {\n+ return this.usingExistingMps() ? new File(getMpsPath()) : new File(\"mpsForModelixExport\");\n+ }\n+\n+ public File getMpsExtensionsLocation() {\n+ return this.usingExistingMps() ? new File(getMpsExtensionsArtifactsPath()) : new File(new File(\"mpsForModelixExport\"), \"plugins\");\n+ }\n+\n+ public File getModelixLocation() {\n+ return this.usingExistingMps() ? new File(getModelixArtifactsPath()) : new File(new File(\"mpsForModelixExport\"), \"plugins\");\n+ }\n+\npublic String getMpsPath() {\nreturn this.mpsPath;\n}\n- public void setMpsPath(String mps) {\n+ public void setMpsPath(String mpsPath) {\n+ System.out.println(\"setting MPS Path\");\nthis.mpsPath = mpsPath;\n}\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | postponing creation of tasks to when configuration is available |
426,504 | 29.12.2021 11:53:52 | -3,600 | 513d958113ceb1bc8cb9a6c12388bcd5515ac9ea | resolving issue with unloaded modules | [
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/EnvironmentLoader.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/EnvironmentLoader.java",
"diff": "@@ -48,6 +48,14 @@ public class EnvironmentLoader {\n.withWorkbenchPath()\n;\n+ config.addPlugin(PathManager.getHomePath() + \"/plugins/mps-console\", \"jetbrains.mps.console\");\n+ config.addPlugin(PathManager.getHomePath() + \"/plugins/mps-debugger-api\", \"jetbrains.mps.debugger.api\");\n+ config.addPlugin(PathManager.getHomePath() + \"/plugins/mps-debugger-java\", \"jetbrains.mps.debugger.java\");\n+ config.addPlugin(PathManager.getHomePath() + \"/plugins/mps-devkit\", \"jetbrains.mps.ide.devkit\");\n+ config.addPlugin(PathManager.getHomePath() + \"/plugins/mps-httpsupport\", \"jetbrains.mps.ide.httpsupport\");\n+ config.addPlugin(PathManager.getHomePath() + \"/plugins/mps-execution-languages\", \"jetbrains.mps.execution.languages\");\n+\n+\n// Add MPS extensions and Modelix\nFile extensionsPath = new File(System.getProperty(\"modelix.export.mpsExtensionsPath\"));\nif (!extensionsPath.exists()) {\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | resolving issue with unloaded modules |
426,504 | 29.12.2021 12:43:52 | -3,600 | fa5019f5801c310742a8bcd01484d80cc0a5a5cf | supporting custom libraries and plugins | [
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/EnvironmentLoader.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/EnvironmentLoader.java",
"diff": "@@ -9,8 +9,18 @@ import jetbrains.mps.tool.environment.EnvironmentConfig;\nimport jetbrains.mps.tool.environment.IdeaEnvironment;\nimport jetbrains.mps.util.PathManager;\nimport jetbrains.mps.tool.common.PluginData;\n+import org.w3c.dom.Document;\n+import org.w3c.dom.Element;\n+import javax.xml.parsers.DocumentBuilder;\n+import javax.xml.parsers.DocumentBuilderFactory;\nimport java.io.File;\n+import java.io.IOException;\n+import java.nio.file.Files;\n+import java.nio.file.Paths;\n+import java.util.Arrays;\n+import java.util.HashSet;\n+import java.util.Set;\npublic class EnvironmentLoader {\n@@ -55,6 +65,96 @@ public class EnvironmentLoader {\nconfig.addPlugin(PathManager.getHomePath() + \"/plugins/mps-httpsupport\", \"jetbrains.mps.ide.httpsupport\");\nconfig.addPlugin(PathManager.getHomePath() + \"/plugins/mps-execution-languages\", \"jetbrains.mps.execution.languages\");\n+ // Add additionalLibraries\n+ String additionalLibrariesStr = System.getProperty(\"modelix.export.additionalLibraries\");\n+ String[] additionalLibraries = additionalLibrariesStr.isBlank() ? new String[]{} : additionalLibrariesStr.split(\",\");\n+ for (String additionalLibrary: additionalLibraries) {\n+ File f = new File(additionalLibrary);\n+ if (f.exists()) {\n+ config.addLib(f.getAbsolutePath());\n+ } else {\n+ throw new RuntimeException(\"Provided library does not exist: \" + f.getAbsolutePath());\n+ }\n+ }\n+\n+ // Add additionalLibraryDirs\n+ String additionalLibraryDirsStr = System.getProperty(\"modelix.export.additionalLibraryDirs\");\n+ String[] additionalLibraryDirs = additionalLibraryDirsStr.isBlank() ? new String[]{} : additionalLibraryDirsStr.split(\",\");\n+ for (String additionalLibraryDir: additionalLibraryDirs) {\n+ File f = new File(additionalLibraryDir);\n+ if (f.exists()) {\n+ try {\n+ Files.find(Paths.get(f.getAbsolutePath()), 999,\n+ (p, bfa) -> bfa.isRegularFile() && p.getFileName().toString().matches(\".*\\\\.jar\"))\n+ .forEach( file -> {\n+ config.addLib(file.toString());\n+ });\n+ } catch (IOException e) {\n+ throw new RuntimeException(e);\n+ }\n+ } else {\n+ throw new RuntimeException(\"Provided library dir does not exist: \" + f.getAbsolutePath());\n+ }\n+ }\n+\n+ // Add additionalPlugins\n+ String additionalPluginsStr = System.getProperty(\"modelix.export.additionalPlugins\");\n+ String[] additionalPlugins = additionalPluginsStr.isBlank() ? new String[]{} : additionalPluginsStr.split(\",\");\n+ for (String additionalPlugin: additionalPlugins) {\n+ String[] parts = additionalPlugin.split(\"#\");\n+ String id = parts[0];\n+ File f = new File(parts[1]);\n+ if (f.exists()) {\n+ config.addPlugin(f.getAbsolutePath(), id);\n+ } else {\n+ throw new RuntimeException(\"Provided plugin does not exist: \" + f.getAbsolutePath());\n+ }\n+ }\n+\n+ // Add additionalPluginDirs\n+ String additionalPluginDirsStr = System.getProperty(\"modelix.export.additionalPluginDirs\");\n+ String[] additionalPluginDirs = additionalPluginDirsStr.isBlank() ? new String[]{} : additionalPluginDirsStr.split(\"\\\\$\");\n+ for (String additionalPluginDir: additionalPluginDirs) {\n+ String[] parts = additionalPluginDir.split(\"#\");\n+ String path = parts[0];\n+ File f = new File(path);\n+ String[] idsToExcludeArray = (parts.length == 1 || parts[1].isBlank()) ? new String[]{} : parts[1].split(\",\");\n+ Set<String> idsToExclude = new HashSet<String>(Arrays.asList(idsToExcludeArray));\n+ if (f.exists()) {\n+ try {\n+ Files.find(Paths.get(f.getAbsolutePath()), 999,\n+ (p, bfa) -> bfa.isRegularFile() && p.getFileName().toString().matches(\"plugin.xml\"))\n+ .forEach( file -> {\n+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n+ try {\n+ DocumentBuilder db = dbf.newDocumentBuilder();\n+ Document doc = db.parse(file.toFile());\n+ Element element = (Element)doc.getFirstChild();\n+ Element idElement = (Element)element.getElementsByTagName(\"id\").item(0);\n+ String id = idElement.getTextContent();\n+ if (!idsToExclude.contains(id)) {\n+ File dir = file.toFile().getParentFile().getParentFile();\n+ config.addPlugin(dir.getAbsolutePath(), id);\n+ }\n+ } catch (Exception e) {\n+ throw new RuntimeException(e);\n+ }\n+\n+// def xmlCode = new XmlSlurper().parseText(file.getText())\n+// def id = xmlCode.id.text()\n+// if (!entry.idsToExclude.contains(id)) {\n+// def dir = file.getParentFile().getParentFile()\n+// plugin(path: dir.getAbsolutePath(), id: id)\n+// }\n+// }\n+ });\n+ } catch (IOException e) {\n+ throw new RuntimeException(e);\n+ }\n+ } else {\n+ throw new RuntimeException(\"Provided plugin dir does not exist: \" + f.getAbsolutePath());\n+ }\n+ }\n// Add MPS extensions and Modelix\nFile extensionsPath = new File(System.getProperty(\"modelix.export.mpsExtensionsPath\"));\n@@ -62,7 +162,6 @@ public class EnvironmentLoader {\nthrow new RuntimeException(\"MPS Extensions path is not valid: \" + extensionsPath);\n}\n-\n// Add Modelix\nFile modelixPath = new File(System.getProperty(\"modelix.export.modelixPath\"));\nif (!modelixPath.exists()) {\n"
},
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"diff": "@@ -96,6 +96,10 @@ public class ModelPlugin implements Plugin<Project> {\nSystem.out.println(\" server URL : \" + settings.getServerUrl());\nSystem.out.println(\" repository ID : \" + settings.getRepositoryId());\nSystem.out.println(\" branch name : \" + settings.getBranchName());\n+ System.out.println(\" additional libraries : \" + settings.getAdditionalLibrariesAsString());\n+ System.out.println(\" additional library dirs : \" + settings.getAdditionalLibraryDirsAsString());\n+ System.out.println(\" additional plugins : \" + settings.getAdditionalPluginsAsString());\n+ System.out.println(\" additional plugin dirs : \" + settings.getAdditionalPluginDirsAsString());\nif (usingExistingMPS) {\n// no dependencies\n} else {\n@@ -109,7 +113,11 @@ public class ModelPlugin implements Plugin<Project> {\n\"repositoryId\", settings.getRepositoryId(),\n\"branchName\", settings.getBranchName(),\n\"mpsExtensionsPath\", settings.getMpsExtensionsArtifactsPath(),\n- \"modelixPath\", settings.getModelixArtifactsPath()\n+ \"modelixPath\", settings.getModelixArtifactsPath(),\n+ \"additionalLibraries\", settings.getAdditionalLibrariesAsString(),\n+ \"additionalLibraryDirs\", settings.getAdditionalLibraryDirsAsString(),\n+ \"additionalPlugins\", settings.getAdditionalPluginsAsString(),\n+ \"additionalPluginDirs\", settings.getAdditionalPluginDirsAsString()\n);\nif (settings.isDebug()) javaExec.setDebug(true);\njavaExec.getTimeout().set(Duration.ofSeconds(settings.getTimeout()));\n"
},
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelixModelSettings.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelixModelSettings.java",
"diff": "@@ -21,6 +21,7 @@ import java.io.File;\nimport java.util.List;\nimport java.util.LinkedList;\nimport java.util.Collections;\n+import java.util.stream.Collectors;\npublic class ModelixModelSettings {\n@@ -66,7 +67,8 @@ public class ModelixModelSettings {\nprivate boolean debug = false;\nprivate int timeoutSeconds = 120;\n- List<Object> additionalLibraries = new LinkedList<Object>();\n+ List<String> additionalLibraries = new LinkedList<String>();\n+ List<String> additionalLibraryDirs = new LinkedList<String>();\nList<PluginConf> additionalPlugins = new LinkedList<PluginConf>();\nList<PluginsEntry> additionalPluginsDirs = new LinkedList<PluginsEntry>();\n@@ -188,6 +190,22 @@ public class ModelixModelSettings {\n}\npublic void addLibraryDir(File dir) {\n- additionalLibraries.add(dir);\n+ additionalLibraryDirs.add(dir.getAbsolutePath());\n+ }\n+\n+ public String getAdditionalLibrariesAsString() {\n+ return this.additionalLibraries.stream().map(o -> o.toString()).collect(Collectors.joining(\",\"));\n+ }\n+\n+ public String getAdditionalPluginDirsAsString() {\n+ return this.additionalPluginsDirs.stream().map(o -> o.dir.getPath()+\"#\"+o.idsToExclude.stream().collect(Collectors.joining(\",\"))).collect(Collectors.joining(\"$\"));\n+ }\n+\n+ public String getAdditionalPluginsAsString() {\n+ return this.additionalPlugins.stream().map(o -> o.id+\"#\"+o.path).collect(Collectors.joining(\",\"));\n+ }\n+\n+ public String getAdditionalLibraryDirsAsString() {\n+ return this.additionalLibraryDirs.stream().map(o -> o.toString()).collect(Collectors.joining(\",\"));\n}\n}\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | supporting custom libraries and plugins |
426,504 | 30.12.2021 09:38:43 | -3,600 | 935195dc2bf9b5526e8114b331511b7425383788 | working on loading additional libraries and plugins | [
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/EnvironmentLoader.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/EnvironmentLoader.java",
"diff": "@@ -71,6 +71,7 @@ public class EnvironmentLoader {\nfor (String additionalLibrary: additionalLibraries) {\nFile f = new File(additionalLibrary);\nif (f.exists()) {\n+ System.out.println(\"Loading library \" + f.getAbsolutePath());\nconfig.addLib(f.getAbsolutePath());\n} else {\nthrow new RuntimeException(\"Provided library does not exist: \" + f.getAbsolutePath());\n@@ -87,6 +88,7 @@ public class EnvironmentLoader {\nFiles.find(Paths.get(f.getAbsolutePath()), 999,\n(p, bfa) -> bfa.isRegularFile() && p.getFileName().toString().matches(\".*\\\\.jar\"))\n.forEach( file -> {\n+ System.out.println(\"Loading library \" + file);\nconfig.addLib(file.toString());\n});\n} catch (IOException e) {\n@@ -105,6 +107,7 @@ public class EnvironmentLoader {\nString id = parts[0];\nFile f = new File(parts[1]);\nif (f.exists()) {\n+ System.out.println(\"Loading plugin \" + f.getAbsolutePath() + \"(id: \"+ id+\")\");\nconfig.addPlugin(f.getAbsolutePath(), id);\n} else {\nthrow new RuntimeException(\"Provided plugin does not exist: \" + f.getAbsolutePath());\n@@ -134,19 +137,12 @@ public class EnvironmentLoader {\nString id = idElement.getTextContent();\nif (!idsToExclude.contains(id)) {\nFile dir = file.toFile().getParentFile().getParentFile();\n+ System.out.println(\"Loading plugin \" + dir.getAbsolutePath() + \"(id: \"+ id+\")\");\nconfig.addPlugin(dir.getAbsolutePath(), id);\n}\n} catch (Exception e) {\nthrow new RuntimeException(e);\n}\n-\n-// def xmlCode = new XmlSlurper().parseText(file.getText())\n-// def id = xmlCode.id.text()\n-// if (!entry.idsToExclude.contains(id)) {\n-// def dir = file.getParentFile().getParentFile()\n-// plugin(path: dir.getAbsolutePath(), id: id)\n-// }\n-// }\n});\n} catch (IOException e) {\nthrow new RuntimeException(e);\n@@ -170,57 +166,6 @@ public class EnvironmentLoader {\n//.addPlugin(PathManager.getHomePath()+\"/plugins/org.modelix.model\", \"org.modelix.model\")\n//.addPlugin(PathManager.getHomePath()+\"/plugins/org.modelix.common\", \"org.modelix.common\")\n-// extension.additionalPlugins.forEach {\n-// def f = new File(it.path)\n-// if (f.exists()) {\n-// plugin(path: it.path, id: it.id)\n-// } else {\n-// logger.warn(\"Provided plugin does not exist: ${it.path} (${it.id})\")\n-// }\n-// }\n-//\n-// extension.additionalPluginsDirs.forEach { entry ->\n-// if (entry.dir.exists()) {\n-// entry.dir.eachFileRecurse(groovy.io.FileType.FILES) { file ->\n-// if (file.name == \"plugin.xml\") {\n-// def xmlCode = new XmlSlurper().parseText(file.getText())\n-// def id = xmlCode.id.text()\n-// if (!entry.idsToExclude.contains(id)) {\n-// def dir = file.getParentFile().getParentFile()\n-// plugin(path: dir.getAbsolutePath(), id: id)\n-// }\n-// }\n-// }\n-// } else {\n-// logger.warn(\"Provided plugin dir does not exist: ${it}\")\n-// }\n-// }\n-//\n-//\n-// extension.additionalLibraries.forEach {\n-// if (it instanceof String){\n-// logger.info(\" -> library ${it}\")\n-// def f = new File(it)\n-// if (f.exists()) {\n-// library(file: it)\n-// } else {\n-// logger.warn(\"Provided library does not exist: ${f.absolutePath}\")\n-// }\n-// } else if (it instanceof File) {\n-// if (it.exists()) {\n-// it.eachFileRecurse { file ->\n-// logger.info(\" -> considering library dir ${file} in ${it}\")\n-// if (file.getName().endsWith(\".jar\")) {\n-// library(file: \"${file.getAbsolutePath()}\")\n-// }\n-// }\n-// } else {\n-// logger.warn(\"Provided library does not exist: ${it.absolutePath}\")\n-// }\n-// } else {\n-// logger.error(\"ignoring additionalLibraries ${it}, as they are not a String or a File\")\n-// }\n-// }\nif (gitRepoDir != null) {\nconfig.addLib(gitRepoDir.getAbsolutePath());\n@@ -244,10 +189,16 @@ public class EnvironmentLoader {\nSystem.out.println(\"IdeaEnvironment created\");\nRuntimeFlags.setTestMode(TestMode.NONE);\nSystem.out.println(\"Test mode set to None\");\n+ try {\n+ System.out.println(\"About to init environment \" + environment);\n((IdeaEnvironment) environment).init();\nSystem.out.println(\"IdeaEnvironment initialized\");\nourProject = environment.createEmptyProject();\nSystem.out.println(\"Empty project created\");\n+ } catch (Throwable e) {\n+ e.printStackTrace();\n+ throw new RuntimeException(e);\n+ }\n}\nreturn ourProject;\n"
},
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"diff": "package org.modelix.gradle.model;\n+import kotlin.text.Charsets;\nimport org.gradle.api.Action;\nimport org.gradle.api.DefaultTask;\nimport org.gradle.api.Plugin;\n@@ -9,7 +10,9 @@ import org.gradle.api.artifacts.Configuration;\nimport org.gradle.api.file.RelativePath;\nimport org.gradle.api.tasks.Copy;\nimport org.gradle.api.tasks.JavaExec;\n+import org.gradle.process.ExecResult;\n+import java.io.ByteArrayOutputStream;\nimport java.io.File;\nimport java.io.FileReader;\nimport java.io.IOException;\n@@ -105,6 +108,7 @@ public class ModelPlugin implements Plugin<Project> {\n} else {\njavaExec.dependsOn(copyMpsTask, copyMpsModelPluginTask);\n}\n+ //javaExec.setJvmArgs(Arrays.asList(\"-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5072\"));\njavaExec.setDescription(\"Export models from modelix model server to MPS files\");\njavaExec.classpath(project.fileTree(new File(mpsLocation, \"lib\")).include(\"**/*.jar\"));\njavaExec.classpath(genConfig);\n@@ -121,7 +125,32 @@ public class ModelPlugin implements Plugin<Project> {\n);\nif (settings.isDebug()) javaExec.setDebug(true);\njavaExec.getTimeout().set(Duration.ofSeconds(settings.getTimeout()));\n+ javaExec.setIgnoreExitValue(true);\n+ ByteArrayOutputStream stdOutput = new ByteArrayOutputStream();\n+ ByteArrayOutputStream errorOutput = new ByteArrayOutputStream();\n+// javaExec.setStandardOutput(stdOutput);\n+// javaExec.setErrorOutput(errorOutput);\njavaExec.setMain(ExportMain.class.getName());\n+ javaExec.doLast(task -> {\n+ System.out.println(\"After execution\");\n+ ExecResult execResult = javaExec.getExecutionResult().get();\n+ int exitValue = execResult.getExitValue();\n+ if (exitValue != 0) {\n+ System.err.println(\"Execution of ExportMain failed. Exit code: \" + exitValue);\n+\n+ System.out.println(\"=======================\");\n+ System.out.println(\"Export main err output \");\n+ System.out.println(\"=======================\");\n+ System.err.println(errorOutput.toString(Charsets.UTF_8));\n+ System.out.println();\n+\n+ System.out.println(\"=======================\");\n+ System.out.println(\"Export main std output \");\n+ System.out.println(\"=======================\");\n+ System.out.println(stdOutput.toString(Charsets.UTF_8));\n+ System.out.println();\n+ }\n+ });\n});\n});\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/resources/log4j.xml",
"new_path": "gradle-plugin/src/main/resources/log4j.xml",
"diff": "</appender>\n- <appender name=\"DIALOG\" class=\"jetbrains.mps.diagnostic.MPSDialogAppender\">\n+ <appender name=\"DIALOG\" class=\"org.apache.log4j.ConsoleAppender\">\n<filter class=\"org.apache.log4j.varia.LevelRangeFilter\">\n<param name=\"LevelMin\" value=\"ERROR\"/>\n</filter>\n"
},
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"diff": "<node concept=\"3clFb_\" id=\"29etMtbn5f1\" role=\"jymVt\">\n<property role=\"TrG5h\" value=\"export\" />\n<node concept=\"3clFbS\" id=\"29etMtbjInm\" role=\"3clF47\">\n+ <node concept=\"3clFbF\" id=\"OmBhSVK56R\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"OmBhSVK56S\" role=\"3clFbG\">\n+ <node concept=\"10M0yZ\" id=\"OmBhSVK56T\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" to=\"wyt6:~System.out\" resolve=\"out\" />\n+ <ref role=\"1PxDUh\" to=\"wyt6:~System\" resolve=\"System\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"OmBhSVK56U\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"guwi:~PrintStream.println(java.lang.String)\" resolve=\"println\" />\n+ <node concept=\"Xl_RD\" id=\"OmBhSVK56V\" role=\"37wK5m\">\n+ <property role=\"Xl_RC\" value=\"ModelCloudExporter - Starting export\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbH\" id=\"OmBhSVKiA4\" role=\"3cqZAp\" />\n<node concept=\"3cpWs8\" id=\"29etMtbjK8H\" role=\"3cqZAp\">\n<node concept=\"3cpWsn\" id=\"29etMtbjK8G\" role=\"3cpWs9\">\n<property role=\"TrG5h\" value=\"coreComponents\" />\n"
},
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.plugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.plugin.mps",
"diff": "<node concept=\"liA8E\" id=\"4D52TXxE5fV\" role=\"2OqNvi\">\n<ref role=\"37wK5l\" to=\"guwi:~PrintStream.println(java.lang.String)\" resolve=\"println\" />\n<node concept=\"Xl_RD\" id=\"4D52TXxE5fY\" role=\"37wK5m\">\n- <property role=\"Xl_RC\" value=\"Modelix Application Plugin\" />\n+ <property role=\"Xl_RC\" value=\"Modelix Application Plugin - Started\" />\n</node>\n</node>\n</node>\n<ref role=\"3cqZAo\" node=\"5Le8ZRJdYgt\" resolve=\"executionMode\" />\n</node>\n<node concept=\"Xl_RD\" id=\"5Le8ZRJeuUE\" role=\"3uHU7B\">\n- <property role=\"Xl_RC\" value=\"modelix execution mode: \" />\n+ <property role=\"Xl_RC\" value=\"Modelix Application Plugin - execution mode: \" />\n</node>\n</node>\n</node>\n</node>\n</node>\n</node>\n+ <node concept=\"3clFbF\" id=\"OmBhSVJT8o\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"OmBhSVJT8p\" role=\"3clFbG\">\n+ <node concept=\"10M0yZ\" id=\"OmBhSVJT8q\" role=\"2Oq$k0\">\n+ <ref role=\"1PxDUh\" to=\"wyt6:~System\" resolve=\"System\" />\n+ <ref role=\"3cqZAo\" to=\"wyt6:~System.out\" resolve=\"out\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"OmBhSVJT8r\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"guwi:~PrintStream.println(java.lang.String)\" resolve=\"println\" />\n+ <node concept=\"3cpWs3\" id=\"OmBhSVJT8s\" role=\"37wK5m\">\n+ <node concept=\"37vLTw\" id=\"OmBhSVJUNc\" role=\"3uHU7w\">\n+ <ref role=\"3cqZAo\" node=\"29etMtbjEs5\" resolve=\"exportPath\" />\n+ </node>\n+ <node concept=\"Xl_RD\" id=\"OmBhSVJT8u\" role=\"3uHU7B\">\n+ <property role=\"Xl_RC\" value=\"Modelix Application Plugin - export path: \" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"3clFbJ\" id=\"5Le8ZRJeoQZ\" role=\"3cqZAp\">\n<node concept=\"3clFbS\" id=\"5Le8ZRJeoR1\" role=\"3clFbx\">\n<node concept=\"3clFbF\" id=\"5Le8ZRJerV6\" role=\"3cqZAp\">\n<node concept=\"3clFbS\" id=\"5$aoTsovoEx\" role=\"1zc67A\">\n<node concept=\"RRSsy\" id=\"5$aoTsovprY\" role=\"3cqZAp\">\n<property role=\"RRSoG\" value=\"gZ5fh_4/error\" />\n- <node concept=\"Xl_RD\" id=\"5$aoTsovps0\" role=\"RRSoy\" />\n+ <node concept=\"Xl_RD\" id=\"5$aoTsovps0\" role=\"RRSoy\">\n+ <property role=\"Xl_RC\" value=\"Modelix Application Plugin Failure\" />\n+ </node>\n<node concept=\"37vLTw\" id=\"5$aoTsovpv3\" role=\"RRSow\">\n<ref role=\"3cqZAo\" node=\"5$aoTsovoEv\" resolve=\"ex\" />\n</node>\n</node>\n</node>\n<node concept=\"3clFbS\" id=\"5$aoTsovo1n\" role=\"1zxBo7\">\n- <node concept=\"3clFbF\" id=\"27OZ2T4kTtp\" role=\"3cqZAp\">\n- <node concept=\"2OqwBi\" id=\"27OZ2T4kU8m\" role=\"3clFbG\">\n- <node concept=\"2YIFZM\" id=\"27OZ2T4kTPB\" role=\"2Oq$k0\">\n- <ref role=\"37wK5l\" to=\"bd8o:~ApplicationManager.getApplication()\" resolve=\"getApplication\" />\n- <ref role=\"1Pybhc\" to=\"bd8o:~ApplicationManager\" resolve=\"ApplicationManager\" />\n- </node>\n- <node concept=\"liA8E\" id=\"27OZ2T4kV2W\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"bd8o:~Application.invokeLater(java.lang.Runnable)\" resolve=\"invokeLater\" />\n- <node concept=\"1bVj0M\" id=\"27OZ2T4kV61\" role=\"37wK5m\">\n- <property role=\"3yWfEV\" value=\"true\" />\n- <node concept=\"3clFbS\" id=\"27OZ2T4kV62\" role=\"1bW5cS\">\n- <node concept=\"3clFbF\" id=\"27OZ2T4l9ms\" role=\"3cqZAp\">\n- <node concept=\"2OqwBi\" id=\"27OZ2T4lak0\" role=\"3clFbG\">\n- <node concept=\"2YIFZM\" id=\"27OZ2T4l9Fz\" role=\"2Oq$k0\">\n- <ref role=\"37wK5l\" to=\"bd8o:~ApplicationManager.getApplication()\" resolve=\"getApplication\" />\n- <ref role=\"1Pybhc\" to=\"bd8o:~ApplicationManager\" resolve=\"ApplicationManager\" />\n- </node>\n- <node concept=\"liA8E\" id=\"27OZ2T4lbe$\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"bd8o:~Application.runWriteAction(java.lang.Runnable)\" resolve=\"runWriteAction\" />\n- <node concept=\"1bVj0M\" id=\"27OZ2T4lbyN\" role=\"37wK5m\">\n- <node concept=\"3clFbS\" id=\"27OZ2T4lbyO\" role=\"1bW5cS\">\n- <node concept=\"3J1_TO\" id=\"27OZ2T4lrvj\" role=\"3cqZAp\">\n- <node concept=\"3uVAMA\" id=\"27OZ2T4lrQh\" role=\"1zxBo5\">\n- <node concept=\"XOnhg\" id=\"27OZ2T4lrQi\" role=\"1zc67B\">\n- <property role=\"TrG5h\" value=\"ex\" />\n- <node concept=\"nSUau\" id=\"27OZ2T4lrQj\" role=\"1tU5fm\">\n- <node concept=\"3uibUv\" id=\"27OZ2T4lsj4\" role=\"nSUat\">\n- <ref role=\"3uigEE\" to=\"wyt6:~Exception\" resolve=\"Exception\" />\n- </node>\n- </node>\n- </node>\n- <node concept=\"3clFbS\" id=\"27OZ2T4lrQk\" role=\"1zc67A\">\n- <node concept=\"RRSsy\" id=\"27OZ2T4ltTf\" role=\"3cqZAp\">\n- <property role=\"RRSoG\" value=\"gZ5fh_4/error\" />\n- <node concept=\"Xl_RD\" id=\"27OZ2T4ltTg\" role=\"RRSoy\" />\n- <node concept=\"37vLTw\" id=\"27OZ2T4ltTh\" role=\"RRSow\">\n- <ref role=\"3cqZAo\" node=\"27OZ2T4lrQi\" resolve=\"ex\" />\n- </node>\n- </node>\n- <node concept=\"3clFbF\" id=\"27OZ2T4ltTi\" role=\"3cqZAp\">\n- <node concept=\"2YIFZM\" id=\"27OZ2T4ltTj\" role=\"3clFbG\">\n- <ref role=\"37wK5l\" to=\"wyt6:~System.exit(int)\" resolve=\"exit\" />\n- <ref role=\"1Pybhc\" to=\"wyt6:~System\" resolve=\"System\" />\n- <node concept=\"3cmrfG\" id=\"27OZ2T4ltTk\" role=\"37wK5m\">\n- <property role=\"3cmrfH\" value=\"1\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"3clFbS\" id=\"27OZ2T4lrvl\" role=\"1zxBo7\">\n<node concept=\"3clFbF\" id=\"rF2pzCbuFc\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"rF2pzCbuFd\" role=\"3clFbG\">\n<node concept=\"10M0yZ\" id=\"rF2pzCbuFe\" role=\"2Oq$k0\">\n<node concept=\"liA8E\" id=\"rF2pzCbuFf\" role=\"2OqNvi\">\n<ref role=\"37wK5l\" to=\"guwi:~PrintStream.println(java.lang.String)\" resolve=\"println\" />\n<node concept=\"Xl_RD\" id=\"rF2pzCbuFg\" role=\"37wK5m\">\n- <property role=\"Xl_RC\" value=\"Starting model export ...\" />\n+ <property role=\"Xl_RC\" value=\"Modelix Application Plugin - Starting model export ...\" />\n</node>\n</node>\n</node>\n<node concept=\"liA8E\" id=\"2pMrK1Si01Y\" role=\"2OqNvi\">\n<ref role=\"37wK5l\" to=\"guwi:~PrintStream.println(java.lang.String)\" resolve=\"println\" />\n<node concept=\"Xl_RD\" id=\"2pMrK1Si01Z\" role=\"37wK5m\">\n- <property role=\"Xl_RC\" value=\"Waiting for Model Server Connection\" />\n+ <property role=\"Xl_RC\" value=\"Modelix Application Plugin - Waiting for Model Server Connection\" />\n</node>\n</node>\n</node>\n</node>\n- <node concept=\"3clFbH\" id=\"2pMrK1ShZ$k\" role=\"3cqZAp\" />\n<node concept=\"3clFbF\" id=\"d9jdlYWJKG\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"d9jdlYWKfo\" role=\"3clFbG\">\n<node concept=\"37vLTw\" id=\"d9jdlYWJKE\" role=\"2Oq$k0\">\n<node concept=\"liA8E\" id=\"2pMrK1Sibbg\" role=\"2OqNvi\">\n<ref role=\"37wK5l\" to=\"guwi:~PrintStream.println(java.lang.String)\" resolve=\"println\" />\n<node concept=\"Xl_RD\" id=\"2pMrK1Sibbh\" role=\"37wK5m\">\n- <property role=\"Xl_RC\" value=\"Connected, starting ModelCloudExporter\" />\n+ <property role=\"Xl_RC\" value=\"Modelix Application Plugin - Connected, starting ModelCloudExporter\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbF\" id=\"OmBhSVLna0\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"OmBhSVLo6I\" role=\"3clFbG\">\n+ <node concept=\"2YIFZM\" id=\"OmBhSVLna2\" role=\"2Oq$k0\">\n+ <ref role=\"1Pybhc\" to=\"bd8o:~ApplicationManager\" resolve=\"ApplicationManager\" />\n+ <ref role=\"37wK5l\" to=\"bd8o:~ApplicationManager.getApplication()\" resolve=\"getApplication\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"OmBhSVLp0T\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"bd8o:~Application.invokeLaterOnWriteThread(java.lang.Runnable)\" resolve=\"invokeLaterOnWriteThread\" />\n+ <node concept=\"2ShNRf\" id=\"OmBhSVLprA\" role=\"37wK5m\">\n+ <node concept=\"YeOm9\" id=\"OmBhSVLCbB\" role=\"2ShVmc\">\n+ <node concept=\"1Y3b0j\" id=\"OmBhSVLCbE\" role=\"YeSDq\">\n+ <property role=\"2bfB8j\" value=\"true\" />\n+ <ref role=\"1Y3XeK\" to=\"wyt6:~Runnable\" resolve=\"Runnable\" />\n+ <ref role=\"37wK5l\" to=\"wyt6:~Object.<init>()\" resolve=\"Object\" />\n+ <node concept=\"3Tm1VV\" id=\"OmBhSVLCbF\" role=\"1B3o_S\" />\n+ <node concept=\"3clFb_\" id=\"OmBhSVLCbK\" role=\"jymVt\">\n+ <property role=\"TrG5h\" value=\"run\" />\n+ <node concept=\"3Tm1VV\" id=\"OmBhSVLCbL\" role=\"1B3o_S\" />\n+ <node concept=\"3cqZAl\" id=\"OmBhSVLCbN\" role=\"3clF45\" />\n+ <node concept=\"3clFbS\" id=\"OmBhSVLCbO\" role=\"3clF47\">\n+ <node concept=\"3clFbF\" id=\"27OZ2T4l9ms\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"27OZ2T4lak0\" role=\"3clFbG\">\n+ <node concept=\"2YIFZM\" id=\"27OZ2T4l9Fz\" role=\"2Oq$k0\">\n+ <ref role=\"37wK5l\" to=\"bd8o:~ApplicationManager.getApplication()\" resolve=\"getApplication\" />\n+ <ref role=\"1Pybhc\" to=\"bd8o:~ApplicationManager\" resolve=\"ApplicationManager\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"27OZ2T4lbe$\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"bd8o:~Application.runWriteAction(java.lang.Runnable)\" resolve=\"runWriteAction\" />\n+ <node concept=\"1bVj0M\" id=\"27OZ2T4lbyN\" role=\"37wK5m\">\n+ <node concept=\"3clFbS\" id=\"27OZ2T4lbyO\" role=\"1bW5cS\">\n+ <node concept=\"3J1_TO\" id=\"27OZ2T4lrvj\" role=\"3cqZAp\">\n+ <node concept=\"3uVAMA\" id=\"27OZ2T4lrQh\" role=\"1zxBo5\">\n+ <node concept=\"XOnhg\" id=\"27OZ2T4lrQi\" role=\"1zc67B\">\n+ <property role=\"TrG5h\" value=\"ex\" />\n+ <node concept=\"nSUau\" id=\"27OZ2T4lrQj\" role=\"1tU5fm\">\n+ <node concept=\"3uibUv\" id=\"27OZ2T4lsj4\" role=\"nSUat\">\n+ <ref role=\"3uigEE\" to=\"wyt6:~Exception\" resolve=\"Exception\" />\n</node>\n</node>\n</node>\n+ <node concept=\"3clFbS\" id=\"27OZ2T4lrQk\" role=\"1zc67A\">\n+ <node concept=\"RRSsy\" id=\"27OZ2T4ltTf\" role=\"3cqZAp\">\n+ <property role=\"RRSoG\" value=\"gZ5fh_4/error\" />\n+ <node concept=\"Xl_RD\" id=\"27OZ2T4ltTg\" role=\"RRSoy\">\n+ <property role=\"Xl_RC\" value=\"Modelix Application Plugin Failure\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"27OZ2T4ltTh\" role=\"RRSow\">\n+ <ref role=\"3cqZAo\" node=\"27OZ2T4lrQi\" resolve=\"ex\" />\n+ </node>\n+ </node>\n+ <node concept=\"3clFbF\" id=\"27OZ2T4ltTi\" role=\"3cqZAp\">\n+ <node concept=\"2YIFZM\" id=\"27OZ2T4ltTj\" role=\"3clFbG\">\n+ <ref role=\"37wK5l\" to=\"wyt6:~System.exit(int)\" resolve=\"exit\" />\n+ <ref role=\"1Pybhc\" to=\"wyt6:~System\" resolve=\"System\" />\n+ <node concept=\"3cmrfG\" id=\"27OZ2T4ltTk\" role=\"37wK5m\">\n+ <property role=\"3cmrfH\" value=\"1\" />\n+ </node>\n+ </node>\n</node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbS\" id=\"27OZ2T4lrvl\" role=\"1zxBo7\">\n<node concept=\"3cpWs8\" id=\"2pMrK1Sm$Iu\" role=\"3cqZAp\">\n<node concept=\"3cpWsn\" id=\"2pMrK1Sm$Iv\" role=\"3cpWs9\">\n<property role=\"TrG5h\" value=\"modelCloudExporter\" />\n</node>\n</node>\n<node concept=\"3clFbS\" id=\"2pMrK1So3E9\" role=\"3clF47\">\n+ <node concept=\"3clFbF\" id=\"OmBhSVK3Wz\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"OmBhSVK3W$\" role=\"3clFbG\">\n+ <node concept=\"10M0yZ\" id=\"OmBhSVK3W_\" role=\"2Oq$k0\">\n+ <ref role=\"1PxDUh\" to=\"wyt6:~System\" resolve=\"System\" />\n+ <ref role=\"3cqZAo\" to=\"wyt6:~System.out\" resolve=\"out\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"OmBhSVK3WA\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"guwi:~PrintStream.println(java.lang.String)\" resolve=\"println\" />\n+ <node concept=\"Xl_RD\" id=\"OmBhSVK3WB\" role=\"37wK5m\">\n+ <property role=\"Xl_RC\" value=\"Modelix Application Plugin - Got the project\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"1QHqEO\" id=\"2pMrK1SmBa1\" role=\"3cqZAp\">\n<node concept=\"1QHqEC\" id=\"2pMrK1SmBa3\" role=\"1QHqEI\">\n<node concept=\"3clFbS\" id=\"2pMrK1SmBa5\" role=\"1bW5cS\">\n+ <node concept=\"3clFbF\" id=\"OmBhSVK56R\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"OmBhSVK56S\" role=\"3clFbG\">\n+ <node concept=\"10M0yZ\" id=\"OmBhSVK56T\" role=\"2Oq$k0\">\n+ <ref role=\"1PxDUh\" to=\"wyt6:~System\" resolve=\"System\" />\n+ <ref role=\"3cqZAo\" to=\"wyt6:~System.out\" resolve=\"out\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"OmBhSVK56U\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"guwi:~PrintStream.println(java.lang.String)\" resolve=\"println\" />\n+ <node concept=\"Xl_RD\" id=\"OmBhSVK56V\" role=\"37wK5m\">\n+ <property role=\"Xl_RC\" value=\"Modelix Application Plugin - In Command, ready to export\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"3clFbF\" id=\"5$aoTsovmc3\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"5$aoTsovnma\" role=\"3clFbG\">\n<node concept=\"2OqwBi\" id=\"2pMrK1SmtBq\" role=\"2Oq$k0\">\n</node>\n</node>\n</node>\n- <node concept=\"2AHcQZ\" id=\"d9jdlYWMwt\" role=\"2AJF6D\">\n- <ref role=\"2AI5Lk\" to=\"wyt6:~Override\" resolve=\"Override\" />\n</node>\n</node>\n- <node concept=\"3uibUv\" id=\"d9jdlYWMwy\" role=\"2Ghqu4\">\n- <ref role=\"3uigEE\" to=\"csg2:6aRQr1WOV$v\" resolve=\"ModelServerConnection\" />\n</node>\n</node>\n</node>\n</node>\n</node>\n+ <node concept=\"2AHcQZ\" id=\"OmBhSVLCbQ\" role=\"2AJF6D\">\n+ <ref role=\"2AI5Lk\" to=\"wyt6:~Override\" resolve=\"Override\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n</node>\n</node>\n</node>\n</node>\n</node>\n+ <node concept=\"2AHcQZ\" id=\"d9jdlYWMwt\" role=\"2AJF6D\">\n+ <ref role=\"2AI5Lk\" to=\"wyt6:~Override\" resolve=\"Override\" />\n</node>\n</node>\n+ <node concept=\"3uibUv\" id=\"d9jdlYWMwy\" role=\"2Ghqu4\">\n+ <ref role=\"3uigEE\" to=\"csg2:6aRQr1WOV$v\" resolve=\"ModelServerConnection\" />\n</node>\n</node>\n</node>\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | working on loading additional libraries and plugins |
426,504 | 05.01.2022 10:10:20 | -3,600 | 65254cff8832eab968e5307777abf49e47bb6f3f | removing DownloadModelFromModelixTask | [
{
"change_type": "DELETE",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/DownloadModelFromModelixTask.java",
"new_path": null,
"diff": "-package org.modelix.gradle.model;\n-\n-import org.gradle.api.DefaultTask;\n-import org.gradle.api.provider.Property;\n-import org.gradle.api.tasks.Input;\n-import org.gradle.api.tasks.TaskAction;\n-\n-public abstract class DownloadModelFromModelixTask extends DefaultTask {\n- @Input\n- abstract public Property<String> mpsPath();\n-\n- @Input\n- abstract public Property<String> mpsExtensionPath();\n-\n- @Input\n- abstract public Property<String> modelixPath();\n-\n- @TaskAction\n- public void downloadModelFromModelix() {\n- System.out.println(\"==============================\");\n- System.out.println(\"Downloading Model from Modelix\");\n- System.out.println(\"==============================\");\n- System.out.println(\" mps path : \" + mpsPath());\n- System.out.println(\" mps extensions path : \" + mpsExtensionPath());\n- System.out.println(\" modelix path : \" + modelixPath());\n- }\n-}\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | removing DownloadModelFromModelixTask |
426,504 | 05.01.2022 10:32:39 | -3,600 | f25a9729465cfc9c2d50c3351a22335f40cd2beb | introducing EnvironmentLoader.Key | [
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/EnvironmentLoader.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/EnvironmentLoader.java",
"diff": "@@ -24,6 +24,41 @@ import java.util.Set;\npublic class EnvironmentLoader {\n+ public enum Key {\n+ SERVER_URL(\"serverUrl\"),\n+ REPOSITORY_ID(\"repositoryId\"),\n+ BRANCH_NAME(\"branchName\"),\n+ ADDITIONAL_LIBRARIES(\"additionalLibraries\"),\n+ ADDITIONAL_LIBRARY_DIRS(\"additionalLibraryDirs\"),\n+ ADDITIONAL_PLUGINS(\"additionalPlugins\"),\n+ ADDITIONAL_PLUGIN_DIRS(\"additionalPluginDirs\"),\n+ MPS_EXTENSIONS_PATH(\"mpsExtensionsPath\"),\n+ MODELIX_PATH(\"modelixPath\");\n+\n+ private String code;\n+\n+ Key(String code) {\n+ this.code = code;\n+ }\n+\n+ public String getCode() {\n+ return this.code;\n+ }\n+\n+ public String getPropertyKey() {\n+ return ExportMain.PROPERTY_PREFIX + this.code;\n+ }\n+\n+ public String readProperty() {\n+ return System.getProperty(getPropertyKey());\n+ }\n+\n+ public File readPropertyAsFile() {\n+ return new File(System.getProperty(getPropertyKey()));\n+ }\n+ }\n+\n+\nprivate static Environment environment;\nprivate static Project ourProject;\n@@ -32,42 +67,15 @@ public class EnvironmentLoader {\nourProject = project;\n}\n- public static Project loadEnvironment(File gitRepoDir) {\n- if (ourProject == null) {\n- // If you get the exception \"Could not find installation home path\"\n- // Set \"-Didea.home\" in the VM options\n-\n- ReflectionUtil.setField(PathManager.class, null, String.class, \"ourHomePath\", System.getProperty(\"idea.home\"));\n- ReflectionUtil.setField(PathManager.class, null, String.class, \"ourIdeaPath\", System.getProperty(\"idea.home\"));\n-\n- EnvironmentConfig config = EnvironmentConfig.defaultConfig()\n- .withBootstrapLibraries()\n- .withBuildPlugin()\n- .withCorePlugin()\n- .withDefaultPlugins()\n- .withDefaultSamples()\n- //.withDevkitPlugin()\n- .withGit4IdeaPlugin()\n- .withGit4IdeaStubsPlugin()\n- //.withDebuggerPlugin()\n- .withJavaPlugin()\n- //.withMakePlugin()\n- .withMigrationPlugin()\n- //.withTestingPlugin()\n- .withVcsPlugin()\n- .withWorkbenchPath()\n- ;\n-\n- config.addPlugin(PathManager.getHomePath() + \"/plugins/mps-console\", \"jetbrains.mps.console\");\n- config.addPlugin(PathManager.getHomePath() + \"/plugins/mps-debugger-api\", \"jetbrains.mps.debugger.api\");\n- config.addPlugin(PathManager.getHomePath() + \"/plugins/mps-debugger-java\", \"jetbrains.mps.debugger.java\");\n- config.addPlugin(PathManager.getHomePath() + \"/plugins/mps-devkit\", \"jetbrains.mps.ide.devkit\");\n- config.addPlugin(PathManager.getHomePath() + \"/plugins/mps-httpsupport\", \"jetbrains.mps.ide.httpsupport\");\n- config.addPlugin(PathManager.getHomePath() + \"/plugins/mps-execution-languages\", \"jetbrains.mps.execution.languages\");\n-\n- // Add additionalLibraries\n- String additionalLibrariesStr = System.getProperty(\"modelix.export.additionalLibraries\");\n- String[] additionalLibraries = additionalLibrariesStr.isBlank() ? new String[]{} : additionalLibrariesStr.split(\",\");\n+ /**\n+ * The user of the plugin can indicate single libraries to import or entire dirs to explore and import recursively.\n+ * The exploration is done at this time and not earlier because the directories could be filled by other tasks that\n+ * could have not yet been completed at configuration time.\n+ */\n+ private static void loadAdditionalLibraries(EnvironmentConfig config) {\n+ String additionalLibrariesStr = Key.ADDITIONAL_LIBRARIES.readProperty();\n+ String[] additionalLibraries = additionalLibrariesStr.isBlank() ? new String[]{}\n+ : additionalLibrariesStr.split(\",\");\nfor (String additionalLibrary: additionalLibraries) {\nFile f = new File(additionalLibrary);\nif (f.exists()) {\n@@ -78,15 +86,16 @@ public class EnvironmentLoader {\n}\n}\n- // Add additionalLibraryDirs\n- String additionalLibraryDirsStr = System.getProperty(\"modelix.export.additionalLibraryDirs\");\n- String[] additionalLibraryDirs = additionalLibraryDirsStr.isBlank() ? new String[]{} : additionalLibraryDirsStr.split(\",\");\n+ String additionalLibraryDirsStr = Key.ADDITIONAL_LIBRARY_DIRS.readProperty();\n+ String[] additionalLibraryDirs = additionalLibraryDirsStr.isBlank() ? new String[]{}\n+ : additionalLibraryDirsStr.split(\",\");\nfor (String additionalLibraryDir: additionalLibraryDirs) {\nFile f = new File(additionalLibraryDir);\nif (f.exists()) {\ntry {\nFiles.find(Paths.get(f.getAbsolutePath()), 999,\n- (p, bfa) -> bfa.isRegularFile() && p.getFileName().toString().matches(\".*\\\\.jar\"))\n+ (p, bfa) -> bfa.isRegularFile() && p.getFileName().toString()\n+ .matches(\".*\\\\.jar\"))\n.forEach( file -> {\nSystem.out.println(\"Loading library \" + file);\nconfig.addLib(file.toString());\n@@ -98,9 +107,15 @@ public class EnvironmentLoader {\nthrow new RuntimeException(\"Provided library dir does not exist: \" + f.getAbsolutePath());\n}\n}\n+ }\n- // Add additionalPlugins\n- String additionalPluginsStr = System.getProperty(\"modelix.export.additionalPlugins\");\n+ /**\n+ * The user of the plugin can indicate single plugins to import or entire dirs to explore and import recursively.\n+ * The exploration is done at this time and not earlier because the directories could be filled by other tasks that\n+ * could have not yet been completed at configuration time.\n+ */\n+ private static void loadAdditionalPlugins(EnvironmentConfig config) {\n+ String additionalPluginsStr = Key.ADDITIONAL_PLUGINS.readProperty();\nString[] additionalPlugins = additionalPluginsStr.isBlank() ? new String[]{} : additionalPluginsStr.split(\",\");\nfor (String additionalPlugin: additionalPlugins) {\nString[] parts = additionalPlugin.split(\"#\");\n@@ -114,8 +129,7 @@ public class EnvironmentLoader {\n}\n}\n- // Add additionalPluginDirs\n- String additionalPluginDirsStr = System.getProperty(\"modelix.export.additionalPluginDirs\");\n+ String additionalPluginDirsStr = Key.ADDITIONAL_PLUGIN_DIRS.readProperty();\nString[] additionalPluginDirs = additionalPluginDirsStr.isBlank() ? new String[]{} : additionalPluginDirsStr.split(\"\\\\$\");\nfor (String additionalPluginDir: additionalPluginDirs) {\nString[] parts = additionalPluginDir.split(\"#\");\n@@ -151,15 +165,48 @@ public class EnvironmentLoader {\nthrow new RuntimeException(\"Provided plugin dir does not exist: \" + f.getAbsolutePath());\n}\n}\n+ }\n+\n+ public static Project loadEnvironment(File gitRepoDir) {\n+ if (ourProject == null) {\n+ // If you get the exception \"Could not find installation home path\"\n+ // Set \"-Didea.home\" in the VM options\n+\n+ ReflectionUtil.setField(PathManager.class, null, String.class, \"ourHomePath\", System.getProperty(\"idea.home\"));\n+ ReflectionUtil.setField(PathManager.class, null, String.class, \"ourIdeaPath\", System.getProperty(\"idea.home\"));\n+\n+ EnvironmentConfig config = EnvironmentConfig.defaultConfig()\n+ .withBootstrapLibraries()\n+ .withBuildPlugin()\n+ .withCorePlugin()\n+ .withDefaultPlugins()\n+ .withDefaultSamples()\n+ .withGit4IdeaPlugin()\n+ .withGit4IdeaStubsPlugin()\n+ .withJavaPlugin()\n+ .withMigrationPlugin()\n+ .withVcsPlugin()\n+ .withWorkbenchPath()\n+ ;\n+\n+ config.addPlugin(PathManager.getHomePath() + \"/plugins/mps-console\", \"jetbrains.mps.console\");\n+ config.addPlugin(PathManager.getHomePath() + \"/plugins/mps-debugger-api\", \"jetbrains.mps.debugger.api\");\n+ config.addPlugin(PathManager.getHomePath() + \"/plugins/mps-debugger-java\", \"jetbrains.mps.debugger.java\");\n+ config.addPlugin(PathManager.getHomePath() + \"/plugins/mps-devkit\", \"jetbrains.mps.ide.devkit\");\n+ config.addPlugin(PathManager.getHomePath() + \"/plugins/mps-httpsupport\", \"jetbrains.mps.ide.httpsupport\");\n+ config.addPlugin(PathManager.getHomePath() + \"/plugins/mps-execution-languages\", \"jetbrains.mps.execution.languages\");\n+\n+ loadAdditionalLibraries(config);\n+ loadAdditionalPlugins(config);\n// Add MPS extensions and Modelix\n- File extensionsPath = new File(System.getProperty(\"modelix.export.mpsExtensionsPath\"));\n+ File extensionsPath = Key.MPS_EXTENSIONS_PATH.readPropertyAsFile();\nif (!extensionsPath.exists()) {\nthrow new RuntimeException(\"MPS Extensions path is not valid: \" + extensionsPath);\n}\n// Add Modelix\n- File modelixPath = new File(System.getProperty(\"modelix.export.modelixPath\"));\n+ File modelixPath = Key.MODELIX_PATH.readPropertyAsFile();\nif (!modelixPath.exists()) {\nthrow new RuntimeException(\"Modelix path is not valid: \" + modelixPath);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ExportMain.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ExportMain.java",
"diff": "@@ -24,7 +24,7 @@ import java.util.Map;\npublic class ExportMain {\n- private static final String PROPERTY_PREFIX = \"modelix.export.\";\n+ public static final String PROPERTY_PREFIX = \"modelix.export.\";\npublic static void main(String[] args) {\ntry {\n"
},
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"diff": "package org.modelix.gradle.model;\nimport kotlin.text.Charsets;\n-import org.gradle.api.Action;\n-import org.gradle.api.DefaultTask;\nimport org.gradle.api.Plugin;\nimport org.gradle.api.Project;\n-import org.gradle.api.Task;\nimport org.gradle.api.artifacts.Configuration;\nimport org.gradle.api.file.RelativePath;\nimport org.gradle.api.tasks.Copy;\nimport org.gradle.api.tasks.JavaExec;\nimport org.gradle.process.ExecResult;\n+import org.modelix.gradle.model.EnvironmentLoader.Key;\nimport java.io.ByteArrayOutputStream;\nimport java.io.File;\n-import java.io.FileReader;\nimport java.io.IOException;\nimport java.net.URL;\nimport java.time.Duration;\nimport java.util.Arrays;\nimport java.util.Enumeration;\n-import java.util.Properties;\nimport java.util.jar.Manifest;\nimport java.util.stream.Collectors;\n@@ -113,15 +109,15 @@ public class ModelPlugin implements Plugin<Project> {\njavaExec.classpath(project.fileTree(new File(mpsLocation, \"lib\")).include(\"**/*.jar\"));\njavaExec.classpath(genConfig);\njavaExec.args(\n- \"serverUrl\", settings.getServerUrl(),\n- \"repositoryId\", settings.getRepositoryId(),\n- \"branchName\", settings.getBranchName(),\n- \"mpsExtensionsPath\", settings.getMpsExtensionsArtifactsPath(),\n- \"modelixPath\", settings.getModelixArtifactsPath(),\n- \"additionalLibraries\", settings.getAdditionalLibrariesAsString(),\n- \"additionalLibraryDirs\", settings.getAdditionalLibraryDirsAsString(),\n- \"additionalPlugins\", settings.getAdditionalPluginsAsString(),\n- \"additionalPluginDirs\", settings.getAdditionalPluginDirsAsString()\n+ Key.SERVER_URL, settings.getServerUrl(),\n+ Key.REPOSITORY_ID, settings.getRepositoryId(),\n+ Key.BRANCH_NAME, settings.getBranchName(),\n+ Key.MPS_EXTENSIONS_PATH, settings.getMpsExtensionsArtifactsPath(),\n+ Key.MODELIX_PATH, settings.getModelixArtifactsPath(),\n+ Key.ADDITIONAL_LIBRARIES.getCode(), settings.getAdditionalLibrariesAsString(),\n+ Key.ADDITIONAL_LIBRARY_DIRS.getCode(), settings.getAdditionalLibraryDirsAsString(),\n+ Key.ADDITIONAL_PLUGINS, settings.getAdditionalPluginsAsString(),\n+ Key.ADDITIONAL_PLUGIN_DIRS, settings.getAdditionalPluginDirsAsString()\n);\nif (settings.isDebug()) javaExec.setDebug(true);\njavaExec.getTimeout().set(Duration.ofSeconds(settings.getTimeout()));\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | introducing EnvironmentLoader.Key |
426,504 | 05.01.2022 10:56:05 | -3,600 | 4cacf5d7d0064812c2d954152284c462920565ad | improving how parameters are passed to EnvironmentLoader | [
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/build.gradle",
"new_path": "gradle-plugin/build.gradle",
"diff": "@@ -17,6 +17,7 @@ repositories {\ndependencies {\ncompileOnly fileTree(dir: '../artifacts/mps/lib', include: '*.jar')\n+ implementation 'com.google.code.gson:gson:2.8.9'\ncompile gradleApi()\ntestCompile group: 'junit', name: 'junit', version: '4.12'\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/EnvironmentLoader.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/EnvironmentLoader.java",
"diff": "package org.modelix.gradle.model;\n+import com.google.gson.JsonArray;\n+import com.google.gson.JsonObject;\n+import com.google.gson.JsonParser;\nimport com.intellij.util.ReflectionUtil;\nimport jetbrains.mps.RuntimeFlags;\nimport jetbrains.mps.TestMode;\n@@ -24,6 +27,9 @@ import java.util.Set;\npublic class EnvironmentLoader {\n+ /**\n+ * Values passed to ExportMain and then exposed as System properties.\n+ */\npublic enum Key {\nSERVER_URL(\"serverUrl\"),\nREPOSITORY_ID(\"repositoryId\"),\n@@ -54,7 +60,12 @@ public class EnvironmentLoader {\n}\npublic File readPropertyAsFile() {\n- return new File(System.getProperty(getPropertyKey()));\n+ String path = System.getProperty(getPropertyKey());\n+ if (path == null) {\n+ return null;\n+ } else {\n+ return new File(path);\n+ }\n}\n}\n@@ -73,6 +84,7 @@ public class EnvironmentLoader {\n* could have not yet been completed at configuration time.\n*/\nprivate static void loadAdditionalLibraries(EnvironmentConfig config) {\n+ // We load a list of additional libraries. We expect them to be separated by commas\nString additionalLibrariesStr = Key.ADDITIONAL_LIBRARIES.readProperty();\nString[] additionalLibraries = additionalLibrariesStr.isBlank() ? new String[]{}\n: additionalLibrariesStr.split(\",\");\n@@ -86,6 +98,7 @@ public class EnvironmentLoader {\n}\n}\n+ // We load a list of directories containing additional libraries. We expect them to be separated by commas\nString additionalLibraryDirsStr = Key.ADDITIONAL_LIBRARY_DIRS.readProperty();\nString[] additionalLibraryDirs = additionalLibraryDirsStr.isBlank() ? new String[]{}\n: additionalLibraryDirsStr.split(\",\");\n@@ -116,41 +129,44 @@ public class EnvironmentLoader {\n*/\nprivate static void loadAdditionalPlugins(EnvironmentConfig config) {\nString additionalPluginsStr = Key.ADDITIONAL_PLUGINS.readProperty();\n- String[] additionalPlugins = additionalPluginsStr.isBlank() ? new String[]{} : additionalPluginsStr.split(\",\");\n- for (String additionalPlugin: additionalPlugins) {\n- String[] parts = additionalPlugin.split(\"#\");\n- String id = parts[0];\n- File f = new File(parts[1]);\n- if (f.exists()) {\n- System.out.println(\"Loading plugin \" + f.getAbsolutePath() + \"(id: \"+ id+\")\");\n- config.addPlugin(f.getAbsolutePath(), id);\n+ if (additionalPluginsStr != null) {\n+ JsonArray additionalPluginsEntries = JsonParser.parseString(additionalPluginsStr).getAsJsonArray();\n+ additionalPluginsEntries.forEach(entry -> {\n+ JsonObject entryAsJO = entry.getAsJsonObject();\n+ File file = new File(entryAsJO.get(\"path\").getAsString());\n+ String id = entryAsJO.get(\"id\").getAsString();\n+ if (file.exists()) {\n+ System.out.println(\"Loading plugin \" + file.getAbsolutePath() + \"(id: \" + id + \")\");\n+ config.addPlugin(file.getAbsolutePath(), id);\n} else {\n- throw new RuntimeException(\"Provided plugin does not exist: \" + f.getAbsolutePath());\n+ throw new RuntimeException(\"Provided plugin does not exist: \" + file.getAbsolutePath());\n}\n+ });\n}\nString additionalPluginDirsStr = Key.ADDITIONAL_PLUGIN_DIRS.readProperty();\n- String[] additionalPluginDirs = additionalPluginDirsStr.isBlank() ? new String[]{} : additionalPluginDirsStr.split(\"\\\\$\");\n- for (String additionalPluginDir: additionalPluginDirs) {\n- String[] parts = additionalPluginDir.split(\"#\");\n- String path = parts[0];\n- File f = new File(path);\n- String[] idsToExcludeArray = (parts.length == 1 || parts[1].isBlank()) ? new String[]{} : parts[1].split(\",\");\n- Set<String> idsToExclude = new HashSet<String>(Arrays.asList(idsToExcludeArray));\n- if (f.exists()) {\n+ if (additionalPluginDirsStr != null) {\n+ JsonArray additionalPluginDirsEntries = JsonParser.parseString(additionalPluginDirsStr).getAsJsonArray();\n+ additionalPluginDirsEntries.forEach(entry -> {\n+ JsonObject entryAsJO = entry.getAsJsonObject();\n+ JsonArray idsToExcludeJA = entryAsJO.get(\"idsToExclude\").getAsJsonArray();\n+ Set<String> idsToExclude = new HashSet<>();\n+ idsToExcludeJA.forEach(id -> idsToExclude.add(id.getAsString()));\n+ File rootFile = new File(entryAsJO.get(\"path\").getAsString());\n+ if (rootFile.exists()) {\ntry {\n- Files.find(Paths.get(f.getAbsolutePath()), 999,\n+ Files.find(Paths.get(rootFile.getAbsolutePath()), 999,\n(p, bfa) -> bfa.isRegularFile() && p.getFileName().toString().matches(\"plugin.xml\"))\n- .forEach( file -> {\n+ .forEach(descendantFile -> {\nDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\ntry {\nDocumentBuilder db = dbf.newDocumentBuilder();\n- Document doc = db.parse(file.toFile());\n+ Document doc = db.parse(descendantFile.toFile());\nElement element = (Element) doc.getFirstChild();\nElement idElement = (Element) element.getElementsByTagName(\"id\").item(0);\nString id = idElement.getTextContent();\nif (!idsToExclude.contains(id)) {\n- File dir = file.toFile().getParentFile().getParentFile();\n+ File dir = descendantFile.toFile().getParentFile().getParentFile();\nSystem.out.println(\"Loading plugin \" + dir.getAbsolutePath() + \"(id: \" + id + \")\");\nconfig.addPlugin(dir.getAbsolutePath(), id);\n}\n@@ -162,8 +178,9 @@ public class EnvironmentLoader {\nthrow new RuntimeException(e);\n}\n} else {\n- throw new RuntimeException(\"Provided plugin dir does not exist: \" + f.getAbsolutePath());\n+ throw new RuntimeException(\"Provided plugin dir does not exist: \" + rootFile.getAbsolutePath());\n}\n+ });\n}\n}\n@@ -201,7 +218,7 @@ public class EnvironmentLoader {\n// Add MPS extensions and Modelix\nFile extensionsPath = Key.MPS_EXTENSIONS_PATH.readPropertyAsFile();\n- if (!extensionsPath.exists()) {\n+ if (extensionsPath == null || !extensionsPath.exists()) {\nthrow new RuntimeException(\"MPS Extensions path is not valid: \" + extensionsPath);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"diff": "@@ -109,15 +109,15 @@ public class ModelPlugin implements Plugin<Project> {\njavaExec.classpath(project.fileTree(new File(mpsLocation, \"lib\")).include(\"**/*.jar\"));\njavaExec.classpath(genConfig);\njavaExec.args(\n- Key.SERVER_URL, settings.getServerUrl(),\n- Key.REPOSITORY_ID, settings.getRepositoryId(),\n- Key.BRANCH_NAME, settings.getBranchName(),\n- Key.MPS_EXTENSIONS_PATH, settings.getMpsExtensionsArtifactsPath(),\n- Key.MODELIX_PATH, settings.getModelixArtifactsPath(),\n+ Key.SERVER_URL.getCode(), settings.getServerUrl(),\n+ Key.REPOSITORY_ID.getCode(), settings.getRepositoryId(),\n+ Key.BRANCH_NAME.getCode(), settings.getBranchName(),\n+ Key.MPS_EXTENSIONS_PATH.getCode(), settings.getMpsExtensionsArtifactsPath(),\n+ Key.MODELIX_PATH.getCode(), settings.getModelixArtifactsPath(),\nKey.ADDITIONAL_LIBRARIES.getCode(), settings.getAdditionalLibrariesAsString(),\nKey.ADDITIONAL_LIBRARY_DIRS.getCode(), settings.getAdditionalLibraryDirsAsString(),\n- Key.ADDITIONAL_PLUGINS, settings.getAdditionalPluginsAsString(),\n- Key.ADDITIONAL_PLUGIN_DIRS, settings.getAdditionalPluginDirsAsString()\n+ Key.ADDITIONAL_PLUGINS.getCode(), settings.getAdditionalPluginsAsString(),\n+ Key.ADDITIONAL_PLUGIN_DIRS.getCode(), settings.getAdditionalPluginDirsAsString()\n);\nif (settings.isDebug()) javaExec.setDebug(true);\njavaExec.getTimeout().set(Duration.ofSeconds(settings.getTimeout()));\n"
},
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelixModelSettings.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelixModelSettings.java",
"diff": "*/\npackage org.modelix.gradle.model;\n+import com.google.gson.JsonArray;\n+import com.google.gson.JsonObject;\nimport org.gradle.api.artifacts.Configuration;\nimport org.gradle.api.internal.provider.DefaultProperty;\nimport org.gradle.api.provider.Property;\n@@ -198,11 +200,27 @@ public class ModelixModelSettings {\n}\npublic String getAdditionalPluginDirsAsString() {\n- return this.additionalPluginsDirs.stream().map(o -> o.dir.getPath()+\"#\"+o.idsToExclude.stream().collect(Collectors.joining(\",\"))).collect(Collectors.joining(\"$\"));\n+ JsonArray ja = new JsonArray();\n+ this.additionalPluginsDirs.stream().forEach(o -> {\n+ JsonObject entry = new JsonObject();\n+ entry.addProperty(\"path\", o.dir.getPath());\n+ JsonArray idsToExcludeJA = new JsonArray();\n+ o.idsToExclude.stream().forEach(id -> idsToExcludeJA.add(id));\n+ entry.add(\"idsToExclude\", idsToExcludeJA);\n+ ja.add(entry);\n+ });\n+ return ja.toString();\n}\npublic String getAdditionalPluginsAsString() {\n- return this.additionalPlugins.stream().map(o -> o.id+\"#\"+o.path).collect(Collectors.joining(\",\"));\n+ JsonArray ja = new JsonArray();\n+ this.additionalPlugins.stream().forEach(o -> {\n+ JsonObject entry = new JsonObject();\n+ entry.addProperty(\"path\", o.path);\n+ entry.addProperty(\"id\", o.id);\n+ ja.add(entry);\n+ });\n+ return ja.toString();\n}\npublic String getAdditionalLibraryDirsAsString() {\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | improving how parameters are passed to EnvironmentLoader |
426,504 | 05.01.2022 11:03:51 | -3,600 | f04991b3e0d11f86bd7b57b532ec2561ccff172b | commenting and cleaning EnvironmentLoader | [
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/EnvironmentLoader.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/EnvironmentLoader.java",
"diff": "@@ -224,23 +224,21 @@ public class EnvironmentLoader {\n// Add Modelix\nFile modelixPath = Key.MODELIX_PATH.readPropertyAsFile();\n+ // If the path is null we expect the plugins to be added manually\n+ if (modelixPath == null) {\n+ System.out.println(\"WARNING: modelix path was not specified, therefore we expect that Modelix plugins have been added explicitly.\");\n+ } else {\nif (!modelixPath.exists()) {\nthrow new RuntimeException(\"Modelix path is not valid: \" + modelixPath);\n}\n- //.addPlugin(PathManager.getHomePath()+\"/plugins/org.modelix.model\", \"org.modelix.model\")\n- //.addPlugin(PathManager.getHomePath()+\"/plugins/org.modelix.common\", \"org.modelix.common\")\n-\n+ config.addPlugin(modelixPath.getAbsolutePath() + \"/plugins/org.modelix.model\", \"org.modelix.model\");\n+ config.addPlugin(modelixPath.getAbsolutePath() + \"/plugins/org.modelix.common\", \"org.modelix.common\");\n+ }\nif (gitRepoDir != null) {\nconfig.addLib(gitRepoDir.getAbsolutePath());\n}\n- System.out.println(\"<Environment - Plugins start>\");\n- for (PluginData pd : config.getPlugins()) {\n- System.out.println(\" Plugin Data \" + pd.path+\" \" + pd.id);\n- }\n- System.out.println(\"<Environment - Plugins end>\");\n-\n// for (IdeaPluginDescriptorImpl plugin : PluginManagerCore.loadDescriptors(null, new ArrayList<String>())) {\n// System.out.println(\"addPlugin(\" + plugin.getPath() + \", \" + plugin.getPluginId().getIdString() + \")\");\n// config.addPlugin(plugin.getPath().toString(), plugin.getPluginId().getIdString());\n@@ -250,28 +248,18 @@ public class EnvironmentLoader {\nloadLangJars(config, new File(homePath,\"languages\"));\nloadLangJars(config, new File(homePath,\"plugins\"));\nenvironment = new IdeaEnvironment(config);\n- System.out.println(\"IdeaEnvironment created\");\nRuntimeFlags.setTestMode(TestMode.NONE);\n- System.out.println(\"Test mode set to None\");\ntry {\n- System.out.println(\"About to init environment \" + environment);\n((IdeaEnvironment) environment).init();\n- System.out.println(\"IdeaEnvironment initialized\");\nourProject = environment.createEmptyProject();\n- System.out.println(\"Empty project created\");\n} catch (Throwable e) {\n- e.printStackTrace();\n- throw new RuntimeException(e);\n+ throw new RuntimeException(\"Issue with initializing environment and creating empty project\", e);\n}\n}\nreturn ourProject;\n}\n- static {\n-\n- }\n-\nprotected static void loadLangJars(EnvironmentConfig config, File folder) {\nif (!folder.exists()) return;\nif (folder.isFile()) {\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | commenting and cleaning EnvironmentLoader |
426,504 | 05.01.2022 11:10:19 | -3,600 | e4efcce7144a5b0a16c3b01a546a94e998285882 | cleaning ModelPlugin | [
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"diff": "@@ -46,7 +46,11 @@ public class ModelPlugin implements Plugin<Project> {\nif (settings.usingExistingMps()) {\nmpsConfig = null;\npluginsConfig = null;\n+ // We are using an existing MPS. We also expect the user to add the version of MPS Extensions and\n+ // Modelix that they intend to use\n} else {\n+ // We are not using an existing MPS, therefore we will add one and we will add dependencies\n+ // to MPS Extensions and Modelix as well\nString mpsVersion = manifest.getMainAttributes().getValue(\"MPS-Version\");\nString extensionsVersion = manifest.getMainAttributes().getValue(\"MPS-extensions-Version\");\nmpsConfig = project.getConfigurations().detachedConfiguration(\n@@ -62,7 +66,9 @@ public class ModelPlugin implements Plugin<Project> {\nif (settings.usingExistingMps()) {\ncopyMpsTask = null;\ncopyMpsModelPluginTask = null;\n+ // When using an existing MPS we do not need to copy plugins\n} else {\n+ // When not using an existing MPS we do need to copy plugins under the downloaded MPS\ncopyMpsTask = project.getTasks().create(\"copyMpsForModelixExport\", Copy.class, copy -> {\ncopy.from(mpsConfig.resolve().stream().map(project::zipTree).collect(Collectors.toList()));\ncopy.into(new File(\"mpsForModelixExport\"));\n@@ -104,7 +110,6 @@ public class ModelPlugin implements Plugin<Project> {\n} else {\njavaExec.dependsOn(copyMpsTask, copyMpsModelPluginTask);\n}\n- //javaExec.setJvmArgs(Arrays.asList(\"-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5072\"));\njavaExec.setDescription(\"Export models from modelix model server to MPS files\");\njavaExec.classpath(project.fileTree(new File(mpsLocation, \"lib\")).include(\"**/*.jar\"));\njavaExec.classpath(genConfig);\n@@ -122,10 +127,6 @@ public class ModelPlugin implements Plugin<Project> {\nif (settings.isDebug()) javaExec.setDebug(true);\njavaExec.getTimeout().set(Duration.ofSeconds(settings.getTimeout()));\njavaExec.setIgnoreExitValue(true);\n- ByteArrayOutputStream stdOutput = new ByteArrayOutputStream();\n- ByteArrayOutputStream errorOutput = new ByteArrayOutputStream();\n-// javaExec.setStandardOutput(stdOutput);\n-// javaExec.setErrorOutput(errorOutput);\njavaExec.setMain(ExportMain.class.getName());\njavaExec.doLast(task -> {\nSystem.out.println(\"After execution\");\n@@ -133,18 +134,6 @@ public class ModelPlugin implements Plugin<Project> {\nint exitValue = execResult.getExitValue();\nif (exitValue != 0) {\nSystem.err.println(\"Execution of ExportMain failed. Exit code: \" + exitValue);\n-\n- System.out.println(\"=======================\");\n- System.out.println(\"Export main err output \");\n- System.out.println(\"=======================\");\n- System.err.println(errorOutput.toString(Charsets.UTF_8));\n- System.out.println();\n-\n- System.out.println(\"=======================\");\n- System.out.println(\"Export main std output \");\n- System.out.println(\"=======================\");\n- System.out.println(stdOutput.toString(Charsets.UTF_8));\n- System.out.println();\n}\n});\n});\n@@ -171,4 +160,3 @@ public class ModelPlugin implements Plugin<Project> {\nthrow new RuntimeException(\"No MANIFEST.MF found containing 'modelix-Version'\");\n}\n}\n-\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | cleaning ModelPlugin |
426,504 | 05.01.2022 12:06:41 | -3,600 | b1d23a8ddeed8bb4032392fe574463d376a6111a | correct usage of plugin parameters | [
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/EnvironmentLoader.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/EnvironmentLoader.java",
"diff": "@@ -218,9 +218,14 @@ public class EnvironmentLoader {\n// Add MPS extensions and Modelix\nFile extensionsPath = Key.MPS_EXTENSIONS_PATH.readPropertyAsFile();\n- if (extensionsPath == null || !extensionsPath.exists()) {\n+ if (extensionsPath == null) {\n+ System.out.println(\"WARNING: MPS extensions path was not specified, therefore we expect that MPS extensions plugins have been added explicitly.\");\n+ } else {\n+ if (!extensionsPath.exists()) {\nthrow new RuntimeException(\"MPS Extensions path is not valid: \" + extensionsPath);\n}\n+ loadLangJars(config, extensionsPath);\n+ }\n// Add Modelix\nFile modelixPath = Key.MODELIX_PATH.readPropertyAsFile();\n@@ -245,6 +250,7 @@ public class EnvironmentLoader {\n// }\nFile homePath = new File(PathManager.getHomePath());\n+ System.out.println(\"Loading languages and plugins from \" + homePath.getAbsolutePath());\nloadLangJars(config, new File(homePath,\"languages\"));\nloadLangJars(config, new File(homePath,\"plugins\"));\nenvironment = new IdeaEnvironment(config);\n"
},
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"diff": "@@ -17,6 +17,8 @@ import java.net.URL;\nimport java.time.Duration;\nimport java.util.Arrays;\nimport java.util.Enumeration;\n+import java.util.LinkedList;\n+import java.util.List;\nimport java.util.jar.Manifest;\nimport java.util.stream.Collectors;\n@@ -117,13 +119,17 @@ public class ModelPlugin implements Plugin<Project> {\nKey.SERVER_URL.getCode(), settings.getServerUrl(),\nKey.REPOSITORY_ID.getCode(), settings.getRepositoryId(),\nKey.BRANCH_NAME.getCode(), settings.getBranchName(),\n- Key.MPS_EXTENSIONS_PATH.getCode(), settings.getMpsExtensionsArtifactsPath(),\n- Key.MODELIX_PATH.getCode(), settings.getModelixArtifactsPath(),\nKey.ADDITIONAL_LIBRARIES.getCode(), settings.getAdditionalLibrariesAsString(),\nKey.ADDITIONAL_LIBRARY_DIRS.getCode(), settings.getAdditionalLibraryDirsAsString(),\nKey.ADDITIONAL_PLUGINS.getCode(), settings.getAdditionalPluginsAsString(),\nKey.ADDITIONAL_PLUGIN_DIRS.getCode(), settings.getAdditionalPluginDirsAsString()\n);\n+ if (settings.getMpsExtensionsArtifactsPath() != null) {\n+ javaExec.args(Key.MPS_EXTENSIONS_PATH.getCode(), settings.getMpsExtensionsArtifactsPath());\n+ }\n+ if (settings.getModelixArtifactsPath() != null) {\n+ javaExec.args(Key.MODELIX_PATH.getCode(), settings.getModelixArtifactsPath());\n+ }\nif (settings.isDebug()) javaExec.setDebug(true);\njavaExec.getTimeout().set(Duration.ofSeconds(settings.getTimeout()));\njavaExec.setIgnoreExitValue(true);\n"
},
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelixModelSettings.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelixModelSettings.java",
"diff": "@@ -79,20 +79,7 @@ public class ModelixModelSettings {\n}\npublic void validate() {\n- boolean valid = true;\n- if (usingExistingMps()) {\n- if (this.mpsExtensionsArtifactsPath == null) {\n- System.err.println(\"When specifying MPS path also MPS extensions path must be specified\");\n- valid = false;\n- }\n- if (this.modelixArtifactsPath == null) {\n- System.err.println(\"When specifying MPS path also Modelix path must be specified\");\n- valid = false;\n- }\n- }\n- if (!valid) {\n- throw new RuntimeException(\"Invalid Modelix Plugin configuration\");\n- }\n+ // nothing to check at the moment\n}\npublic File getMpsLocation() {\n@@ -100,11 +87,29 @@ public class ModelixModelSettings {\n}\npublic File getMpsExtensionsLocation() {\n- return this.usingExistingMps() ? new File(getMpsExtensionsArtifactsPath()) : new File(new File(\"mpsForModelixExport\"), \"plugins\");\n+ if (this.usingExistingMps()) {\n+ String path = getMpsExtensionsArtifactsPath();\n+ if (path == null) {\n+ return null;\n+ } else {\n+ return new File(path);\n+ }\n+ } else {\n+ return new File(new File(\"mpsForModelixExport\"), \"plugins\");\n+ }\n}\npublic File getModelixLocation() {\n- return this.usingExistingMps() ? new File(getModelixArtifactsPath()) : new File(new File(\"mpsForModelixExport\"), \"plugins\");\n+ if (this.usingExistingMps()) {\n+ String path = getModelixArtifactsPath();\n+ if (path == null) {\n+ return null;\n+ } else {\n+ return new File(path);\n+ }\n+ } else {\n+ return new File(new File(\"mpsForModelixExport\"), \"plugins\");\n+ }\n}\npublic String getMpsPath() {\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | correct usage of plugin parameters |
426,504 | 05.01.2022 13:57:08 | -3,600 | a0629605363ef2f49ff1f1230a509591283ec678 | use shadowJar plugin | [
{
"change_type": "MODIFY",
"old_path": "model-client/build.gradle",
"new_path": "model-client/build.gradle",
"diff": "@@ -90,7 +90,7 @@ kotlin {\n}\n}\n-jvmTest.dependsOn \":model-server:fatJar\"\n+jvmTest.dependsOn \":model-server:shadowJar\"\ntasks.jacocoTestReport {\n"
},
{
"change_type": "MODIFY",
"old_path": "model-client/src/jvmTest/kotlin/org/modelix/model/ModelServerManager.kt",
"new_path": "model-client/src/jvmTest/kotlin/org/modelix/model/ModelServerManager.kt",
"diff": "@@ -78,11 +78,11 @@ class ModelServerManager {\n\"${System.getProperty(\"java.home\")}/bin/java -jar ../model-server/build/libs/model-server-fatJar-latest.jar -inmemory\" +\nargsToSetValues\n)\n+ println(\"commandLine \" + commandLine)\np = Runtime.getRuntime().exec(commandLine)\nval stdInput = BufferedReader(InputStreamReader(p!!.inputStream))\nval stdError = BufferedReader(InputStreamReader(p!!.errorStream))\n- Thread(\n- Runnable {\n+ Thread {\ntry {\nvar s: String?\nwhile (stdInput.readLine().also { s = it } != null) {\n@@ -99,7 +99,6 @@ class ModelServerManager {\n// this may happen when closing\n}\n}\n- )\n.start()\ntry {\nThread.sleep(1000)\n"
},
{
"change_type": "MODIFY",
"old_path": "model-server/build.gradle",
"new_path": "model-server/build.gradle",
"diff": "@@ -5,6 +5,7 @@ plugins {\nid 'maven-publish'\nid 'com.adarshr.test-logger' version '2.1.0'\nid \"org.jetbrains.kotlin.jvm\"\n+ id 'com.github.johnrengelman.shadow' version '6.1.0'\n}\ndescription = 'Model Server offering access to model storage'\n@@ -57,6 +58,12 @@ configurations {\n}\n}\n+jar {\n+ manifest {\n+ attributes 'Main-Class': 'org.modelix.model.server.Main'\n+ }\n+}\n+\ntask fatJar(type: Jar) {\nmanifest {\nattributes 'Main-Class': 'org.modelix.model.server.Main'\n@@ -67,14 +74,20 @@ task fatJar(type: Jar) {\nwith jar\n}\n+shadowJar {\n+ archiveBaseName.set('model-server-fatJar')\n+ archiveClassifier.set('')\n+ archiveVersion.set('latest')\n+}\n+\ndef fatJarFile = file(\"$buildDir/libs/model-server-fatJar-latest.jar\")\ndef fatJarArtifact = artifacts.add('archives', fatJarFile) {\ntype 'jar'\n- builtBy 'fatJar'\n+ builtBy 'shadowJar'\n}\ntask cucumber() {\n- dependsOn fatJar, compileTestJava\n+ dependsOn shadowJar, compileTestJava\ndoLast {\njavaexec {\nmain = \"io.cucumber.core.cli.Main\"\n"
},
{
"change_type": "MODIFY",
"old_path": "mps/build.gradle",
"new_path": "mps/build.gradle",
"diff": "@@ -161,7 +161,7 @@ task runIntegrationTestsWithoutRebuildingModelix(dependsOn: [justBuildIntegratio\n}\n-task runIntegrationTests(dependsOn: [\":model-server:fatJar\", buildMpsModules, justBuildIntegrationTests, justRunIntegrationTests]) {\n+task runIntegrationTests(dependsOn: [\":model-server:shadowJar\", buildMpsModules, justBuildIntegrationTests, justRunIntegrationTests]) {\n}\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | use shadowJar plugin |
426,496 | 11.01.2022 15:07:14 | -3,600 | 0207ececfbd2d38ea851b3192e35e3486f43d36b | Model export performance
There is now a temporary cache that is not limit in size and doesn't
evict the prefetched entries. With the default caches it can happen that
big models don't fit into the cache and still many requests are required
after a prefetch. | [
{
"change_type": "MODIFY",
"old_path": "model-client/src/commonMain/kotlin/org/modelix/model/lazy/CLTree.kt",
"new_path": "model-client/src/commonMain/kotlin/org/modelix/model/lazy/CLTree.kt",
"diff": "@@ -272,6 +272,13 @@ class CLTree : ITree, IBulkTree {\nreturn parent!!.getDescendants(BulkQuery(store), includeSelf).execute()\n}\n+ override fun getDescendants(rootIds: Iterable<Long>, includeSelf: Boolean): Iterable<CLNode> {\n+ val bulkQuery = BulkQuery(store)\n+ val roots: IBulkQuery.Value<List<CLNode>> = resolveElements(rootIds.toList(), bulkQuery)\n+ val descendants = roots.mapBulk { bulkQuery.map(it) { it.getDescendants(bulkQuery, includeSelf) } }\n+ return descendants.execute().flatten()\n+ }\n+\noverride fun getChildren(parentId: Long, role: String?): Iterable<Long> {\nval parent = resolveElement(parentId)\nval children = parent!!.getChildren(BulkQuery(store)).execute()\n"
},
{
"change_type": "MODIFY",
"old_path": "model-client/src/commonMain/kotlin/org/modelix/model/lazy/IBulkTree.kt",
"new_path": "model-client/src/commonMain/kotlin/org/modelix/model/lazy/IBulkTree.kt",
"diff": "@@ -17,4 +17,5 @@ import org.modelix.model.api.ITree\ninterface IBulkTree : ITree {\nfun getDescendants(root: Long, includeSelf: Boolean): Iterable<CLNode>\n+ fun getDescendants(roots: Iterable<Long>, includeSelf: Boolean): Iterable<CLNode>\n}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "model-client/src/commonMain/kotlin/org/modelix/model/lazy/IndirectObjectStore.kt",
"diff": "+/*\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.modelix.model.lazy\n+\n+import org.modelix.model.IKeyValueStore\n+\n+abstract class IndirectObjectStore : IDeserializingKeyValueStore {\n+\n+ abstract fun getStore(): IDeserializingKeyValueStore\n+\n+ override val keyValueStore: IKeyValueStore\n+ get() = getStore().keyValueStore\n+\n+ override fun <T> get(hash: String, deserializer: (String) -> T): T? {\n+ return getStore().get(hash, deserializer)\n+ }\n+\n+ override fun <T> getAll(hash: Iterable<String>, deserializer: (String, String) -> T): Iterable<T> {\n+ return getStore().getAll(hash, deserializer)\n+ }\n+\n+ override fun put(hash: String, deserialized: Any, serialized: String) {\n+ getStore().put(hash, deserialized, serialized)\n+ }\n+\n+ override fun prefetch(hash: String) {\n+ getStore().prefetch(hash)\n+ }\n+}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "model-client/src/commonMain/kotlin/org/modelix/model/lazy/PrefetchCache.kt",
"diff": "+/*\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.modelix.model.lazy\n+\n+import org.modelix.model.IKeyValueStore\n+import org.modelix.model.api.ContextValue\n+import org.modelix.model.api.ITransaction\n+import org.modelix.model.api.ITree\n+\n+/**\n+ * There is no size limit. Entries are not evicted.\n+ * This guarantees that after a prefetch there are no more request required.\n+ * Not thread safe.\n+ */\n+class PrefetchCache(private val store: IDeserializingKeyValueStore) : IDeserializingKeyValueStore {\n+ init {\n+ if (store is ContextIndirectCache) throw IllegalArgumentException()\n+ if (store is PrefetchCache) throw IllegalArgumentException()\n+ }\n+\n+ private val entries: MutableMap<String, Any?> = HashMap()\n+\n+ override val keyValueStore: IKeyValueStore = store.keyValueStore\n+\n+ override fun <T> get(hash: String, deserializer: (String) -> T): T? {\n+ return if (entries.containsKey(hash)) entries[hash] as T? else {\n+ val value = store.get(hash, deserializer)\n+ entries[hash] = value\n+ value\n+ }\n+ }\n+\n+ override fun <T> getAll(hashes: Iterable<String>, deserializer: (String, String) -> T): Iterable<T> {\n+ val missingHashes = hashes.filterNot { entries.containsKey(it) }\n+ val missingValues = store.getAll(missingHashes, deserializer).toList()\n+ val missingEntries = missingHashes.mapIndexed { index, hash -> hash to missingValues[index] }.associate { it }\n+ return hashes.map { missingEntries[it] ?: entries[it] as T }\n+ }\n+\n+ override fun put(hash: String, deserialized: Any, serialized: String) {\n+ entries[hash] = deserialized\n+ store.put(hash, deserialized, serialized)\n+ }\n+\n+ override fun prefetch(hash: String) {\n+ TODO(\"Not yet implemented\")\n+ }\n+\n+ companion object {\n+ private val contextValue: ContextValue<PrefetchCache> = ContextValue()\n+\n+ fun <T> with(store_: IDeserializingKeyValueStore, f: () -> T): T {\n+ val store = if (store_ is ContextIndirectCache) store_.directStore else store_\n+ val unwrapped = unwrap(store)\n+ val current = contextValue.getValue()\n+ return if (current != null && current.store == unwrapped) {\n+ f()\n+ } else {\n+ if (store is PrefetchCache) {\n+ contextValue.computeWith(store, f)\n+ } else {\n+ contextValue.computeWith(PrefetchCache(unwrapped), f)\n+ }\n+ }\n+ }\n+\n+ fun <T> with(tree: ITree, f: () -> T): T {\n+ return with((tree as CLTree).store, f)\n+ }\n+\n+ fun unwrap(store: IDeserializingKeyValueStore): IDeserializingKeyValueStore {\n+ return when (store) {\n+ is PrefetchCache -> unwrap(store.store)\n+ is ContextIndirectCache -> store.directStore\n+ else -> store\n+ }\n+ }\n+\n+ fun contextIndirectCache(store: IDeserializingKeyValueStore): IDeserializingKeyValueStore {\n+ return ContextIndirectCache(store)\n+ }\n+\n+ class ContextIndirectCache(val directStore: IDeserializingKeyValueStore) : IndirectObjectStore() {\n+ init {\n+ if (directStore is ContextIndirectCache) throw IllegalArgumentException()\n+ if (directStore is PrefetchCache) throw IllegalArgumentException()\n+ }\n+\n+ override fun getStore(): IDeserializingKeyValueStore {\n+ return contextValue.getValue() ?: directStore\n+ }\n+ }\n+ }\n+\n+\n+}\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "model-client/src/commonMain/kotlin/org/modelix/model/metameta/MetaModelBranch.kt",
"new_path": "model-client/src/commonMain/kotlin/org/modelix/model/metameta/MetaModelBranch.kt",
"diff": "@@ -209,6 +209,10 @@ class MetaModelBranch(val branch: IBranch) : IBranch by branch {\noverride fun getDescendants(root: Long, includeSelf: Boolean): Iterable<CLNode> {\nreturn tree.getDescendants(root, includeSelf)\n}\n+\n+ override fun getDescendants(roots: Iterable<Long>, includeSelf: Boolean): Iterable<CLNode> {\n+ return tree.getDescendants(roots, includeSelf)\n+ }\n}\ninner class MMBranchListener(val listener: IBranchListener) : IBranchListener {\n"
},
{
"change_type": "MODIFY",
"old_path": "model-client/src/commonMain/kotlin/org/modelix/model/operations/OTWriteTransaction.kt",
"new_path": "model-client/src/commonMain/kotlin/org/modelix/model/operations/OTWriteTransaction.kt",
"diff": "@@ -132,6 +132,14 @@ class OTWriteTransaction(\nset(tree) {\nthrow UnsupportedOperationException()\n}\n+\n+ override fun getUserObject(key: Any): Any? {\n+ return transaction.getUserObject(key)\n+ }\n+\n+ override fun putUserObject(key: Any, value: Any?) {\n+ transaction.putUserObject(key, value)\n+ }\n}\nfun IWriteTransaction.applyOperation(op: IOperation) {\n"
},
{
"change_type": "MODIFY",
"old_path": "model-client/src/jvmMain/kotlin/org/modelix/model/client/RestWebModelClient.kt",
"new_path": "model-client/src/jvmMain/kotlin/org/modelix/model/client/RestWebModelClient.kt",
"diff": "@@ -27,6 +27,7 @@ import org.modelix.model.api.IIdGenerator\nimport org.modelix.model.client.SharedExecutors.fixDelay\nimport org.modelix.model.lazy.IDeserializingKeyValueStore\nimport org.modelix.model.lazy.ObjectStoreCache\n+import org.modelix.model.lazy.PrefetchCache\nimport org.modelix.model.persistent.HashUtil\nimport org.modelix.model.sleep\nimport org.modelix.model.util.StreamUtils.toStream\n@@ -147,7 +148,7 @@ class RestWebModelClient @JvmOverloads constructor(\nprivate val sseClient: Client\nprivate val listeners: MutableList<SseListener> = ArrayList()\noverride val asyncStore: IKeyValueStore = AsyncStore(this)\n- private val cache = ObjectStoreCache(KeyValueStoreCache(asyncStore))\n+ private val cache = PrefetchCache.contextIndirectCache(ObjectStoreCache(KeyValueStoreCache(asyncStore)))\nprivate val pendingWrites = AtomicInteger(0)\n@get:Synchronized\n"
},
{
"change_type": "MODIFY",
"old_path": "mps-version.properties",
"new_path": "mps-version.properties",
"diff": "mpsMajorVersion=2020.3\nmpsMinorVersion=5\nmpsVersion=2020.3.5\n-mpsExtensionsVersion=2020.3.2092.d53a335\n+mpsExtensionsVersion=2020.3.2156.fd3b720\n"
},
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"diff": "<ref role=\"37wK5l\" node=\"2Js2MfX9Evn\" resolve=\"computeRead\" />\n<node concept=\"1bVj0M\" id=\"1DvKhaCSOrY\" role=\"37wK5m\">\n<node concept=\"3clFbS\" id=\"1DvKhaCSOrZ\" role=\"1bW5cS\">\n+ <node concept=\"3cpWs8\" id=\"kXPgTlgu75\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"kXPgTlgu76\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"tree\" />\n+ <property role=\"3TUv4t\" value=\"true\" />\n+ <node concept=\"3uibUv\" id=\"kXPgTlgqfQ\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"xkhl:~CLTree\" resolve=\"CLTree\" />\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"kXPgTlgu77\" role=\"33vP2m\">\n+ <node concept=\"37vLTw\" id=\"kXPgTlgu78\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"1OzsJtaqLux\" resolve=\"version\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"kXPgTlgu79\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"xkhl:~CLVersion.getTree()\" resolve=\"getTree\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"3cpWs8\" id=\"1OzsJtaqLuT\" role=\"3cqZAp\">\n<node concept=\"3cpWsn\" id=\"1OzsJtaqLuU\" role=\"3cpWs9\">\n<property role=\"TrG5h\" value=\"branch\" />\n<node concept=\"2ShNRf\" id=\"1OzsJtaqLuW\" role=\"37wK5m\">\n<node concept=\"1pGfFk\" id=\"1OzsJtaqLuX\" role=\"2ShVmc\">\n<ref role=\"37wK5l\" to=\"jks5:~PBranch.<init>(org.modelix.model.api.ITree,org.modelix.model.api.IIdGenerator)\" resolve=\"PBranch\" />\n- <node concept=\"2OqwBi\" id=\"1OzsJtaqLuY\" role=\"37wK5m\">\n- <node concept=\"37vLTw\" id=\"1OzsJtaqLuZ\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"1OzsJtaqLux\" resolve=\"version\" />\n- </node>\n- <node concept=\"liA8E\" id=\"1OzsJtaqLv0\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"xkhl:~CLVersion.getTree()\" resolve=\"getTree\" />\n- </node>\n+ <node concept=\"37vLTw\" id=\"kXPgTlgu7a\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"kXPgTlgu76\" resolve=\"tree\" />\n</node>\n<node concept=\"2ShNRf\" id=\"1OzsJtaqLv1\" role=\"37wK5m\">\n<node concept=\"1pGfFk\" id=\"24PSXS84OwW\" role=\"2ShVmc\">\n<node concept=\"liA8E\" id=\"1OzsJtaqLv6\" role=\"2OqNvi\">\n<ref role=\"37wK5l\" to=\"qvpu:~PArea.executeRead(kotlin.jvm.functions.Function0)\" resolve=\"executeRead\" />\n<node concept=\"1bVj0M\" id=\"1OzsJtaqLv7\" role=\"37wK5m\">\n+ <property role=\"3yWfEV\" value=\"true\" />\n<node concept=\"3clFbS\" id=\"1OzsJtaqLv8\" role=\"1bW5cS\">\n+ <node concept=\"3clFbF\" id=\"kXPgTlgPtP\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"kXPgTlgQl1\" role=\"3clFbG\">\n+ <node concept=\"10M0yZ\" id=\"kXPgTlgPTv\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" to=\"xkhl:~PrefetchCache.Companion\" resolve=\"Companion\" />\n+ <ref role=\"1PxDUh\" to=\"xkhl:~PrefetchCache\" resolve=\"PrefetchCache\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"kXPgTlgQWg\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"xkhl:~PrefetchCache$Companion.with(org.modelix.model.api.ITree,kotlin.jvm.functions.Function0)\" resolve=\"with\" />\n+ <node concept=\"37vLTw\" id=\"kXPgTlgR$$\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"kXPgTlgu76\" resolve=\"tree\" />\n+ </node>\n+ <node concept=\"1bVj0M\" id=\"kXPgTlgSQp\" role=\"37wK5m\">\n+ <node concept=\"3clFbS\" id=\"kXPgTlgSQr\" role=\"1bW5cS\">\n<node concept=\"3cpWs8\" id=\"1OzsJtaqLv9\" role=\"3cqZAp\">\n<node concept=\"3cpWsn\" id=\"1OzsJtaqLva\" role=\"3cpWs9\">\n<property role=\"TrG5h\" value=\"t\" />\n</node>\n</node>\n</node>\n+ <node concept=\"3clFbH\" id=\"kXPgTlgO9h\" role=\"3cqZAp\" />\n+ <node concept=\"3SKdUt\" id=\"kXPgTlgMd_\" role=\"3cqZAp\">\n+ <node concept=\"1PaTwC\" id=\"kXPgTlgMdA\" role=\"1aUNEU\">\n+ <node concept=\"3oM_SD\" id=\"kXPgTlgMdB\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"prefetch\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"kXPgTlgMDb\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"module\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"kXPgTlgMYe\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"contents\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbF\" id=\"kXPgTlgvRm\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"kXPgTlgyEA\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"kXPgTlgvRk\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"kXPgTlgu76\" resolve=\"tree\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"kXPgTlgJnd\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"xkhl:~CLTree.getDescendants(java.lang.Iterable,boolean)\" resolve=\"getDescendants\" />\n+ <node concept=\"37vLTw\" id=\"kXPgTlgJX4\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"1OzsJtaqLvg\" resolve=\"moduleIds\" />\n+ </node>\n+ <node concept=\"3clFbT\" id=\"kXPgTlgLcG\" role=\"37wK5m\">\n+ <property role=\"3clFbU\" value=\"true\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbH\" id=\"kXPgTlgNGv\" role=\"3cqZAp\" />\n<node concept=\"3cpWs8\" id=\"1OzsJtaqLvo\" role=\"3cqZAp\">\n<node concept=\"3cpWsn\" id=\"1OzsJtaqLvp\" role=\"3cpWs9\">\n<property role=\"TrG5h\" value=\"modules\" />\n</node>\n</node>\n</node>\n- <node concept=\"3clFbF\" id=\"1OzsJtaqLvI\" role=\"3cqZAp\">\n- <node concept=\"1rXfSq\" id=\"1OzsJtaqLvJ\" role=\"3clFbG\">\n+ <node concept=\"3cpWs6\" id=\"kXPgTlgUk1\" role=\"3cqZAp\">\n+ <node concept=\"1rXfSq\" id=\"kXPgTlgUk3\" role=\"3cqZAk\">\n<ref role=\"37wK5l\" node=\"29etMtbn6gM\" resolve=\"createModules\" />\n- <node concept=\"37vLTw\" id=\"1OzsJtaqLvK\" role=\"37wK5m\">\n+ <node concept=\"37vLTw\" id=\"kXPgTlgUk4\" role=\"37wK5m\">\n<ref role=\"3cqZAo\" node=\"1OzsJtaqLvp\" resolve=\"modules\" />\n</node>\n- <node concept=\"37vLTw\" id=\"1OzsJtaqLvL\" role=\"37wK5m\">\n+ <node concept=\"37vLTw\" id=\"kXPgTlgUk5\" role=\"37wK5m\">\n<ref role=\"3cqZAo\" node=\"1OzsJtaqLvM\" resolve=\"outputFolder\" />\n</node>\n- <node concept=\"37vLTw\" id=\"Aop38Ig5ld\" role=\"37wK5m\">\n+ <node concept=\"37vLTw\" id=\"kXPgTlgUk6\" role=\"37wK5m\">\n<ref role=\"3cqZAo\" node=\"Aop38IfXqs\" resolve=\"mpsProject\" />\n</node>\n</node>\n</node>\n</node>\n</node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"2ShNRf\" id=\"6c6cqXTeGHJ\" role=\"2Oq$k0\">\n<node concept=\"1pGfFk\" id=\"6c6cqXTeGHK\" role=\"2ShVmc\">\n<ref role=\"37wK5l\" to=\"qvpu:~PArea.<init>(org.modelix.model.api.IBranch)\" resolve=\"PArea\" />\n<ref role=\"37wK5l\" to=\"qvpu:~PArea.executeRead(kotlin.jvm.functions.Function0)\" resolve=\"executeRead\" />\n<node concept=\"1bVj0M\" id=\"4_k_9wJ_0em\" role=\"37wK5m\">\n<node concept=\"3clFbS\" id=\"4_k_9wJ_0en\" role=\"1bW5cS\">\n+ <node concept=\"3clFbF\" id=\"kXPgTldz1$\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"kXPgTldz$3\" role=\"3clFbG\">\n+ <node concept=\"10M0yZ\" id=\"kXPgTldzlh\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" to=\"xkhl:~PrefetchCache.Companion\" resolve=\"Companion\" />\n+ <ref role=\"1PxDUh\" to=\"xkhl:~PrefetchCache\" resolve=\"PrefetchCache\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"kXPgTld$1$\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"xkhl:~PrefetchCache$Companion.with(org.modelix.model.api.ITree,kotlin.jvm.functions.Function0)\" resolve=\"with\" />\n+ <node concept=\"37vLTw\" id=\"kXPgTld$x$\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"4_k_9wJ_0ec\" resolve=\"tree\" />\n+ </node>\n+ <node concept=\"1bVj0M\" id=\"kXPgTldANO\" role=\"37wK5m\">\n+ <node concept=\"3clFbS\" id=\"kXPgTldANQ\" role=\"1bW5cS\">\n<node concept=\"RRSsy\" id=\"4_k_9wJ_0eo\" role=\"3cqZAp\">\n<property role=\"RRSoG\" value=\"gZ5frni/trace\" />\n<node concept=\"3cpWs3\" id=\"4_k_9wJ_0ep\" role=\"RRSoy\">\n</node>\n</node>\n</node>\n+ <node concept=\"3cpWs6\" id=\"kXPgTldCZr\" role=\"3cqZAp\">\n+ <node concept=\"10M0yZ\" id=\"kXPgTldCZs\" role=\"3cqZAk\">\n+ <ref role=\"3cqZAo\" to=\"v18h:~Unit.INSTANCE\" resolve=\"INSTANCE\" />\n+ <ref role=\"1PxDUh\" to=\"v18h:~Unit\" resolve=\"Unit\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"3cpWs6\" id=\"4_k_9wJ_0fe\" role=\"3cqZAp\">\n<node concept=\"10M0yZ\" id=\"4_k_9wJ_0ff\" role=\"3cqZAk\">\n<ref role=\"3cqZAo\" to=\"v18h:~Unit.INSTANCE\" resolve=\"INSTANCE\" />\n<node concept=\"3clFbS\" id=\"bErqUx3kr0\" role=\"3clF47\">\n<node concept=\"3clFbJ\" id=\"bErqUx3G0s\" role=\"3cqZAp\">\n<node concept=\"3clFbS\" id=\"bErqUx3G0t\" role=\"3clFbx\">\n- <node concept=\"3SKdUt\" id=\"bErqUx3G0u\" role=\"3cqZAp\">\n- <node concept=\"1PaTwC\" id=\"bErqUx3G0v\" role=\"1aUNEU\">\n- <node concept=\"3oM_SD\" id=\"bErqUx3G0w\" role=\"1PaTwD\">\n- <property role=\"3oM_SC\" value=\"prefetch\" />\n- </node>\n- <node concept=\"3oM_SD\" id=\"bErqUx3G0x\" role=\"1PaTwD\">\n- <property role=\"3oM_SC\" value=\"model\" />\n- </node>\n- <node concept=\"3oM_SD\" id=\"bErqUx3G0y\" role=\"1PaTwD\">\n- <property role=\"3oM_SC\" value=\"content\" />\n- </node>\n- </node>\n- </node>\n<node concept=\"3clFbF\" id=\"bErqUx3G0z\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"bErqUx3G0$\" role=\"3clFbG\">\n<node concept=\"1eOMI4\" id=\"bErqUx3G0_\" role=\"2Oq$k0\">\n<ref role=\"37wK5l\" to=\"qvpu:~PArea.executeWrite(kotlin.jvm.functions.Function0)\" resolve=\"executeWrite\" />\n<node concept=\"1bVj0M\" id=\"bErqUx4FVA\" role=\"37wK5m\">\n<node concept=\"3clFbS\" id=\"bErqUx4FVB\" role=\"1bW5cS\">\n- <node concept=\"3clFbF\" id=\"bErqUx4cwG\" role=\"3cqZAp\">\n- <node concept=\"1rXfSq\" id=\"bErqUx4cwE\" role=\"3clFbG\">\n- <ref role=\"37wK5l\" node=\"bErqUx3kqW\" resolve=\"prefetchModelContent\" />\n- <node concept=\"2OqwBi\" id=\"bErqUx4M9b\" role=\"37wK5m\">\n- <node concept=\"2OqwBi\" id=\"bErqUx4M9c\" role=\"2Oq$k0\">\n- <node concept=\"1rXfSq\" id=\"bErqUx4M9d\" role=\"2Oq$k0\">\n+ <node concept=\"3cpWs8\" id=\"2xQ40YD$91n\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"2xQ40YD$91o\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"tree\" />\n+ <property role=\"3TUv4t\" value=\"true\" />\n+ <node concept=\"3uibUv\" id=\"2xQ40YDzSn_\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"jks5:~ITree\" resolve=\"ITree\" />\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"2xQ40YD$91p\" role=\"33vP2m\">\n+ <node concept=\"2OqwBi\" id=\"2xQ40YD$91q\" role=\"2Oq$k0\">\n+ <node concept=\"1rXfSq\" id=\"2xQ40YD$91r\" role=\"2Oq$k0\">\n<ref role=\"37wK5l\" node=\"4_k_9wJ_0e0\" resolve=\"getBranch\" />\n</node>\n- <node concept=\"liA8E\" id=\"bErqUx4M9e\" role=\"2OqNvi\">\n+ <node concept=\"liA8E\" id=\"2xQ40YD$91s\" role=\"2OqNvi\">\n<ref role=\"37wK5l\" to=\"jks5:~IBranch.getTransaction()\" resolve=\"getTransaction\" />\n</node>\n</node>\n- <node concept=\"liA8E\" id=\"bErqUx4M9f\" role=\"2OqNvi\">\n+ <node concept=\"liA8E\" id=\"2xQ40YD$91t\" role=\"2OqNvi\">\n<ref role=\"37wK5l\" to=\"jks5:~ITransaction.getTree()\" resolve=\"getTree\" />\n</node>\n</node>\n</node>\n</node>\n+ <node concept=\"3clFbF\" id=\"kXPgTldtX_\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"kXPgTldubI\" role=\"3clFbG\">\n+ <node concept=\"10M0yZ\" id=\"kXPgTldu3C\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" to=\"xkhl:~PrefetchCache.Companion\" resolve=\"Companion\" />\n+ <ref role=\"1PxDUh\" to=\"xkhl:~PrefetchCache\" resolve=\"PrefetchCache\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"kXPgTlduoz\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"xkhl:~PrefetchCache$Companion.with(org.modelix.model.api.ITree,kotlin.jvm.functions.Function0)\" resolve=\"with\" />\n+ <node concept=\"37vLTw\" id=\"kXPgTlduFA\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"2xQ40YD$91o\" resolve=\"tree\" />\n+ </node>\n+ <node concept=\"1bVj0M\" id=\"kXPgTldvjH\" role=\"37wK5m\">\n+ <node concept=\"3clFbS\" id=\"kXPgTldvjJ\" role=\"1bW5cS\">\n+ <node concept=\"3clFbF\" id=\"bErqUx4cwG\" role=\"3cqZAp\">\n+ <node concept=\"1rXfSq\" id=\"bErqUx4cwE\" role=\"3clFbG\">\n+ <ref role=\"37wK5l\" node=\"bErqUx3kqW\" resolve=\"prefetchModelContent\" />\n+ <node concept=\"37vLTw\" id=\"2xQ40YD$91u\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"2xQ40YD$91o\" resolve=\"tree\" />\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"3clFbF\" id=\"6f5fca_d3Li\" role=\"3cqZAp\">\n<node concept=\"1rXfSq\" id=\"6f5fca_d3Lh\" role=\"3clFbG\">\n<ref role=\"37wK5l\" node=\"4_k_9wJ_0kH\" resolve=\"syncModelPropertiesFromMPS\" />\n</node>\n</node>\n</node>\n+ <node concept=\"3cpWs6\" id=\"kXPgTldwRV\" role=\"3cqZAp\">\n+ <node concept=\"10M0yZ\" id=\"kXPgTldwRW\" role=\"3cqZAk\">\n+ <ref role=\"3cqZAo\" to=\"v18h:~Unit.INSTANCE\" resolve=\"INSTANCE\" />\n+ <ref role=\"1PxDUh\" to=\"v18h:~Unit\" resolve=\"Unit\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n</node>\n</node>\n<node concept=\"2tJIrI\" id=\"6xuwE2n_B0r\" role=\"jymVt\" />\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Model export performance
There is now a temporary cache that is not limit in size and doesn't
evict the prefetched entries. With the default caches it can happen that
big models don't fit into the cache and still many requests are required
after a prefetch. |
426,496 | 11.01.2022 15:51:42 | -3,600 | 04829adbabcb5a77ebf3f7974aec997417b31f66 | cast exception to CLTree | [
{
"change_type": "ADD",
"old_path": null,
"new_path": "model-client/src/commonMain/kotlin/org/modelix/model/lazy/ITreeWrapper.kt",
"diff": "+/*\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.modelix.model.lazy\n+\n+import org.modelix.model.api.ITree\n+\n+interface ITreeWrapper : ITree {\n+ fun getWrappedTree(): ITree\n+}\n+\n+fun ITree.unwrap(): ITree = if (this is ITreeWrapper) this.getWrappedTree().unwrap() else this\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "model-client/src/commonMain/kotlin/org/modelix/model/lazy/PrefetchCache.kt",
"new_path": "model-client/src/commonMain/kotlin/org/modelix/model/lazy/PrefetchCache.kt",
"diff": "@@ -75,7 +75,7 @@ class PrefetchCache(private val store: IDeserializingKeyValueStore) : IDeseriali\n}\nfun <T> with(tree: ITree, f: () -> T): T {\n- return with((tree as CLTree).store, f)\n+ return with((tree.unwrap() as CLTree).store, f)\n}\nfun unwrap(store: IDeserializingKeyValueStore): IDeserializingKeyValueStore {\n"
},
{
"change_type": "MODIFY",
"old_path": "model-client/src/commonMain/kotlin/org/modelix/model/metameta/MetaModelBranch.kt",
"new_path": "model-client/src/commonMain/kotlin/org/modelix/model/metameta/MetaModelBranch.kt",
"diff": "@@ -18,6 +18,7 @@ import org.modelix.model.api.*\nimport org.modelix.model.lazy.CLNode\nimport org.modelix.model.lazy.IBulkTree\nimport org.modelix.model.lazy.IConceptReferenceSerializer\n+import org.modelix.model.lazy.ITreeWrapper\nclass MetaModelBranch(val branch: IBranch) : IBranch by branch {\nprivate val metaModelSynchronizer = MetaModelSynchronizer(branch)\n@@ -205,7 +206,7 @@ class MetaModelBranch(val branch: IBranch) : IBranch by branch {\n}\n}\n- inner class MMBulkTree(override val tree: IBulkTree) : MMTree(tree), IBulkTree {\n+ inner class MMBulkTree(override val tree: IBulkTree) : MMTree(tree), IBulkTree, ITreeWrapper {\noverride fun getDescendants(root: Long, includeSelf: Boolean): Iterable<CLNode> {\nreturn tree.getDescendants(root, includeSelf)\n}\n@@ -213,6 +214,10 @@ class MetaModelBranch(val branch: IBranch) : IBranch by branch {\noverride fun getDescendants(roots: Iterable<Long>, includeSelf: Boolean): Iterable<CLNode> {\nreturn tree.getDescendants(roots, includeSelf)\n}\n+\n+ override fun getWrappedTree(): ITree {\n+ return tree\n+ }\n}\ninner class MMBranchListener(val listener: IBranchListener) : IBranchListener {\n"
},
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.plugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.plugin.mps",
"diff": "<node concept=\"3uibUv\" id=\"3uWup9cFNbQ\" role=\"1tU5fm\">\n<ref role=\"3uigEE\" to=\"jks5:~ITree\" resolve=\"ITree\" />\n</node>\n- <node concept=\"2OqwBi\" id=\"3uWup9cFNbR\" role=\"33vP2m\">\n+ <node concept=\"2YIFZM\" id=\"kXPgTljNUN\" role=\"33vP2m\">\n+ <ref role=\"37wK5l\" to=\"xkhl:~ITreeWrapperKt.unwrap(org.modelix.model.api.ITree)\" resolve=\"unwrap\" />\n+ <ref role=\"1Pybhc\" to=\"xkhl:~ITreeWrapperKt\" resolve=\"ITreeWrapperKt\" />\n+ <node concept=\"2OqwBi\" id=\"3uWup9cFNbR\" role=\"37wK5m\">\n<node concept=\"2OqwBi\" id=\"3uWup9cFNbS\" role=\"2Oq$k0\">\n<node concept=\"37vLTw\" id=\"3uWup9cFNbT\" role=\"2Oq$k0\">\n<ref role=\"3cqZAo\" node=\"2Ju8iZ2HTgS\" resolve=\"branch\" />\n</node>\n</node>\n</node>\n- <node concept=\"3clFbJ\" id=\"3uWup9cFNbW\" role=\"3cqZAp\">\n- <node concept=\"3clFbS\" id=\"3uWup9cFNbX\" role=\"3clFbx\">\n- <node concept=\"3clFbF\" id=\"3uWup9cFNbY\" role=\"3cqZAp\">\n- <node concept=\"37vLTI\" id=\"3uWup9cFNbZ\" role=\"3clFbG\">\n- <node concept=\"2OqwBi\" id=\"3uWup9cFNc0\" role=\"37vLTx\">\n- <node concept=\"1eOMI4\" id=\"3uWup9cFNc1\" role=\"2Oq$k0\">\n- <node concept=\"10QFUN\" id=\"3uWup9cFNc2\" role=\"1eOMHV\">\n- <node concept=\"3uibUv\" id=\"3uWup9cFNc3\" role=\"10QFUM\">\n- <ref role=\"3uigEE\" to=\"kxov:~MetaModelBranch$MMTree\" resolve=\"MetaModelBranch.MMTree\" />\n- </node>\n- <node concept=\"37vLTw\" id=\"3uWup9cFNc4\" role=\"10QFUP\">\n- <ref role=\"3cqZAo\" node=\"3uWup9cFNbP\" resolve=\"tree\" />\n- </node>\n- </node>\n- </node>\n- <node concept=\"liA8E\" id=\"3uWup9cFNc5\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"kxov:~MetaModelBranch$MMTree.getTree()\" resolve=\"getTree\" />\n- </node>\n- </node>\n- <node concept=\"37vLTw\" id=\"3uWup9cFNc6\" role=\"37vLTJ\">\n- <ref role=\"3cqZAo\" node=\"3uWup9cFNbP\" resolve=\"tree\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"2ZW3vV\" id=\"3uWup9cFNc7\" role=\"3clFbw\">\n- <node concept=\"3uibUv\" id=\"3uWup9cFNc8\" role=\"2ZW6by\">\n- <ref role=\"3uigEE\" to=\"kxov:~MetaModelBranch$MMTree\" resolve=\"MetaModelBranch.MMTree\" />\n- </node>\n- <node concept=\"37vLTw\" id=\"3uWup9cFNc9\" role=\"2ZW6bz\">\n- <ref role=\"3cqZAo\" node=\"3uWup9cFNbP\" resolve=\"tree\" />\n- </node>\n- </node>\n</node>\n<node concept=\"3clFbJ\" id=\"3uWup9cFNca\" role=\"3cqZAp\">\n<node concept=\"3clFbS\" id=\"3uWup9cFNcb\" role=\"3clFbx\">\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | cast exception to CLTree |
426,504 | 12.01.2022 15:06:51 | -3,600 | f7c06565468e99abc32ebfbe125dfe07fd016040 | working on thread VFS issue because when creating models | [
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"diff": "@@ -115,6 +115,7 @@ public class ModelPlugin implements Plugin<Project> {\njavaExec.setDescription(\"Export models from modelix model server to MPS files\");\njavaExec.classpath(project.fileTree(new File(mpsLocation, \"lib\")).include(\"**/*.jar\"));\njavaExec.classpath(genConfig);\n+ javaExec.jvmArgs(\"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5072\");\njavaExec.args(\nKey.SERVER_URL.getCode(), settings.getServerUrl(),\nKey.REPOSITORY_ID.getCode(), settings.getRepositoryId(),\n"
},
{
"change_type": "MODIFY",
"old_path": "model-server/build.gradle",
"new_path": "model-server/build.gradle",
"diff": "@@ -64,23 +64,13 @@ jar {\n}\n}\n-task fatJar(type: Jar) {\n- manifest {\n- attributes 'Main-Class': 'org.modelix.model.server.Main'\n- }\n- archiveBaseName = 'model-server-fatJar'\n- archiveVersion = 'latest'\n- from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }\n- with jar\n-}\n-\nshadowJar {\n- archiveBaseName.set('model-server-fatJar')\n- archiveClassifier.set('')\n+ archiveBaseName.set('model-server')\n+ archiveClassifier.set('fatJar')\narchiveVersion.set('latest')\n}\n-def fatJarFile = file(\"$buildDir/libs/model-server-fatJar-latest.jar\")\n+def fatJarFile = file(\"$buildDir/libs/model-server-latest-fatJar.jar\")\ndef fatJarArtifact = artifacts.add('archives', fatJarFile) {\ntype 'jar'\nbuiltBy 'shadowJar'\n"
},
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"diff": "<import index=\"r1fg\" ref=\"87f4b21e-a3a5-459e-a54b-408fd9eb7350/java:gnu.trove.iterator(org.modelix.lib/)\" />\n<import index=\"j8aq\" ref=\"6ed54515-acc8-4d1e-a16c-9fd6cfe951ea/java:jetbrains.mps.module(MPS.Core/)\" />\n<import index=\"hvt5\" ref=\"0a2651ab-f212-45c2-a2f0-343e76cbc26b/java:org.modelix.model(org.modelix.model.client/)\" />\n+ <import index=\"pjrh\" ref=\"6ed54515-acc8-4d1e-a16c-9fd6cfe951ea/java:jetbrains.mps.smodel.adapter(MPS.Core/)\" />\n+ <import index=\"yzht\" ref=\"498d89d2-c2e9-11e2-ad49-6cf049e62fe5/java:org.jetbrains.concurrency(MPS.IDEA/)\" />\n<import index=\"onis\" ref=\"87f4b21e-a3a5-459e-a54b-408fd9eb7350/java:gnu.trove.set(org.modelix.lib/)\" implicit=\"true\" />\n</imports>\n<registry>\n<node concept=\"3cpWs8\" id=\"18La5_p9Iuv\" role=\"3cqZAp\">\n<node concept=\"3cpWsn\" id=\"18La5_p9Iuw\" role=\"3cpWs9\">\n<property role=\"TrG5h\" value=\"solutionDir\" />\n+ <property role=\"3TUv4t\" value=\"true\" />\n<node concept=\"3uibUv\" id=\"18La5_p9Iux\" role=\"1tU5fm\">\n<ref role=\"3uigEE\" to=\"3ju5:~IFile\" resolve=\"IFile\" />\n</node>\n</node>\n<node concept=\"3clFbJ\" id=\"18La5_pa_Tn\" role=\"3cqZAp\">\n<node concept=\"3clFbS\" id=\"18La5_pa_Tp\" role=\"3clFbx\">\n+ <node concept=\"3cpWs8\" id=\"1MKNcGA4HIX\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"1MKNcGA4HIY\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"res\" />\n+ <property role=\"3TUv4t\" value=\"true\" />\n+ <node concept=\"3uibUv\" id=\"1MKNcGA4HIZ\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"yzht:~AsyncPromise\" resolve=\"AsyncPromise\" />\n+ <node concept=\"3uibUv\" id=\"1MKNcGA4HJ0\" role=\"11_B2D\">\n+ <ref role=\"3uigEE\" to=\"wyt6:~Object\" resolve=\"Object\" />\n+ </node>\n+ </node>\n+ <node concept=\"2ShNRf\" id=\"1MKNcGA4HJ1\" role=\"33vP2m\">\n+ <node concept=\"1pGfFk\" id=\"1MKNcGA4HJ2\" role=\"2ShVmc\">\n+ <ref role=\"37wK5l\" to=\"yzht:~AsyncPromise.<init>()\" resolve=\"AsyncPromise\" />\n+ <node concept=\"3uibUv\" id=\"1MKNcGA4HJ3\" role=\"1pMfVU\">\n+ <ref role=\"3uigEE\" to=\"wyt6:~Object\" resolve=\"Object\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbF\" id=\"1MKNcGA4K2F\" role=\"3cqZAp\">\n+ <node concept=\"2YIFZM\" id=\"1MKNcGA4Kbc\" role=\"3clFbG\">\n+ <ref role=\"37wK5l\" to=\"3a50:~ThreadUtils.runInUIThreadNoWait(java.lang.Runnable)\" resolve=\"runInUIThreadNoWait\" />\n+ <ref role=\"1Pybhd\" to=\"3a50:~ThreadUtils\" resolve=\"ThreadUtils\" />\n+ <node concept=\"2ShNRf\" id=\"1MKNcGA4Kqq\" role=\"37wK5m\">\n+ <node concept=\"YeOm9\" id=\"1MKNcGA5m9Z\" role=\"2ShVmc\">\n+ <node concept=\"1Y3b0j\" id=\"1MKNcGA5ma2\" role=\"YeSDq\">\n+ <property role=\"2bfB8j\" value=\"true\" />\n+ <ref role=\"1Y3XeK\" to=\"wyt6:~Runnable\" resolve=\"Runnable\" />\n+ <ref role=\"37wK5l\" to=\"wyt6:~Object.<init>()\" resolve=\"Object\" />\n+ <node concept=\"3Tm1VV\" id=\"1MKNcGA5ma3\" role=\"1B3o_S\" />\n+ <node concept=\"3clFb_\" id=\"1MKNcGA5ma8\" role=\"jymVt\">\n+ <property role=\"TrG5h\" value=\"run\" />\n+ <node concept=\"3Tm1VV\" id=\"1MKNcGA5ma9\" role=\"1B3o_S\" />\n+ <node concept=\"3cqZAl\" id=\"1MKNcGA5mab\" role=\"3clF45\" />\n+ <node concept=\"3clFbS\" id=\"1MKNcGA5mac\" role=\"3clF47\">\n+ <node concept=\"3cpWs8\" id=\"1MKNcGA0ogc\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"1MKNcGA0ogd\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"modelsDirVirtual\" />\n+ <node concept=\"3uibUv\" id=\"1MKNcGA0oge\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"3ju5:~IFile\" resolve=\"IFile\" />\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"1MKNcGA0qdb\" role=\"33vP2m\">\n+ <node concept=\"37vLTw\" id=\"1MKNcGA0pNU\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"18La5_p9Iuw\" resolve=\"solutionDir\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"1MKNcGA0qpF\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"3ju5:~IFile.findChild(java.lang.String)\" resolve=\"findChild\" />\n+ <node concept=\"Xl_RD\" id=\"1MKNcGA0qEo\" role=\"37wK5m\">\n+ <property role=\"Xl_RC\" value=\"models\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbF\" id=\"1MKNcGA0$oA\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"1MKNcGA0$Ki\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"1MKNcGA0$o$\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"1MKNcGA0ogd\" resolve=\"modelsDirVirtual\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"1MKNcGA0$Sj\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"3ju5:~IFile.deleteIfExists()\" resolve=\"deleteIfExists\" />\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"3cpWs8\" id=\"18La5_p9Rvh\" role=\"3cqZAp\">\n<node concept=\"3cpWsn\" id=\"18La5_p9Rvi\" role=\"3cpWs9\">\n<property role=\"TrG5h\" value=\"modelsDir\" />\n<node concept=\"1Rwk04\" id=\"32pQaardoXK\" role=\"2OqNvi\" />\n</node>\n</node>\n+ <node concept=\"3clFbF\" id=\"1MKNcGA5sv4\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"1MKNcGA5tFv\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"1MKNcGA5sv2\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"1MKNcGA4HIY\" resolve=\"res\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"1MKNcGA5uEv\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"yzht:~AsyncPromise.setResult(java.lang.Object)\" resolve=\"setResult\" />\n+ <node concept=\"10Nm6u\" id=\"1MKNcGA5vp1\" role=\"37wK5m\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"2AHcQZ\" id=\"1MKNcGA5mae\" role=\"2AJF6D\">\n+ <ref role=\"2AI5Lk\" to=\"wyt6:~Override\" resolve=\"Override\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbF\" id=\"1MKNcGA5pEp\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"1MKNcGA5qCL\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"1MKNcGA5pEn\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"1MKNcGA4HIY\" resolve=\"res\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"1MKNcGA5r_O\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"yzht:~AsyncPromise.get()\" resolve=\"get\" />\n+ </node>\n+ </node>\n+ </node>\n</node>\n<node concept=\"37vLTw\" id=\"18La5_paDbS\" role=\"3clFbw\">\n<ref role=\"3cqZAo\" node=\"5Ns9HDw2a95\" resolve=\"inCheckoutMode\" />\n</node>\n</node>\n</node>\n- <node concept=\"3J1_TO\" id=\"3BReYNsI3nt\" role=\"3cqZAp\">\n- <node concept=\"3clFbS\" id=\"3BReYNsI3nv\" role=\"1zxBo7\">\n+ <node concept=\"3cpWs8\" id=\"6V$9xNdU9DP\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"6V$9xNdU9DQ\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"res\" />\n+ <node concept=\"3uibUv\" id=\"6V$9xNdU9DN\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"yzht:~AsyncPromise\" resolve=\"AsyncPromise\" />\n+ <node concept=\"3uibUv\" id=\"1MKNcGA5AtI\" role=\"11_B2D\">\n+ <ref role=\"3uigEE\" to=\"mhbf:~EditableSModel\" resolve=\"EditableSModel\" />\n+ </node>\n+ </node>\n+ <node concept=\"2ShNRf\" id=\"6V$9xNdUcv8\" role=\"33vP2m\">\n+ <node concept=\"1pGfFk\" id=\"6V$9xNdUcqo\" role=\"2ShVmc\">\n+ <ref role=\"37wK5l\" to=\"yzht:~AsyncPromise.<init>()\" resolve=\"AsyncPromise\" />\n+ <node concept=\"3uibUv\" id=\"1MKNcGA5CJK\" role=\"1pMfVU\">\n+ <ref role=\"3uigEE\" to=\"mhbf:~EditableSModel\" resolve=\"EditableSModel\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbH\" id=\"1MKNcGA4afV\" role=\"3cqZAp\" />\n+ <node concept=\"3clFbF\" id=\"1MKNcGA20ha\" role=\"3cqZAp\">\n+ <node concept=\"2YIFZM\" id=\"2rFgM0FVwul\" role=\"3clFbG\">\n+ <ref role=\"1Pybhd\" to=\"3a50:~ThreadUtils\" resolve=\"ThreadUtils\" />\n+ <ref role=\"37wK5l\" to=\"3a50:~ThreadUtils.runInUIThreadNoWait(java.lang.Runnable)\" resolve=\"runInUIThreadNoWait\" />\n+ <node concept=\"1bVj0M\" id=\"2rFgM0FVwum\" role=\"37wK5m\">\n+ <node concept=\"3clFbS\" id=\"2rFgM0FVwun\" role=\"1bW5cS\">\n+ <node concept=\"3J1_TO\" id=\"1MKNcGA3VY7\" role=\"3cqZAp\">\n+ <node concept=\"3uVAMA\" id=\"3BReYNsI4KJ\" role=\"1zxBo5\">\n+ <node concept=\"3clFbS\" id=\"3BReYNsI4KK\" role=\"1zc67A\">\n+ <node concept=\"3clFbF\" id=\"1MKNcGA4CK9\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"1MKNcGA4DD5\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"1MKNcGA4CK8\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"6V$9xNdU9DQ\" resolve=\"res\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"1MKNcGA4EXV\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"yzht:~AsyncPromise.setResult(java.lang.Object)\" resolve=\"setResult\" />\n+ <node concept=\"10Nm6u\" id=\"1MKNcGA4F_R\" role=\"37wK5m\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbH\" id=\"1MKNcGA5GHj\" role=\"3cqZAp\" />\n+ <node concept=\"YS8fn\" id=\"3BReYNsI5sL\" role=\"3cqZAp\">\n+ <node concept=\"2ShNRf\" id=\"3BReYNsI5_K\" role=\"YScLw\">\n+ <node concept=\"1pGfFk\" id=\"3BReYNsI6Zk\" role=\"2ShVmc\">\n+ <ref role=\"37wK5l\" to=\"wyt6:~RuntimeException.<init>(java.lang.Throwable)\" resolve=\"RuntimeException\" />\n+ <node concept=\"37vLTw\" id=\"3BReYNsI7dM\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"3BReYNsI4KL\" resolve=\"e\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"XOnhg\" id=\"3BReYNsI4KL\" role=\"1zc67B\">\n+ <property role=\"TrG5h\" value=\"e\" />\n+ <node concept=\"nSUau\" id=\"3BReYNsI4KM\" role=\"1tU5fm\">\n+ <node concept=\"3uibUv\" id=\"3BReYNsI4KI\" role=\"nSUat\">\n+ <ref role=\"3uigEE\" to=\"pa15:~ModelCannotBeCreatedException\" resolve=\"ModelCannotBeCreatedException\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbS\" id=\"1MKNcGA3VY9\" role=\"1zxBo7\">\n+ <node concept=\"3clFbH\" id=\"1MKNcGA3VY8\" role=\"3cqZAp\" />\n<node concept=\"3cpWs8\" id=\"3BReYNsHbX2\" role=\"3cqZAp\">\n<node concept=\"3cpWsn\" id=\"3BReYNsHbX3\" role=\"3cpWs9\">\n<property role=\"TrG5h\" value=\"smodel\" />\n</node>\n</node>\n</node>\n+ <node concept=\"abc8K\" id=\"32pQaarbLVv\" role=\"3cqZAp\">\n+ <node concept=\"Xl_RD\" id=\"32pQaarbMiW\" role=\"abp_N\">\n+ <property role=\"Xl_RC\" value=\"saving smodel \" />\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"32pQaarbNaD\" role=\"abp_N\">\n+ <node concept=\"37vLTw\" id=\"32pQaarbMLq\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"3BReYNsHbX3\" resolve=\"smodel\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"32pQaarbNpm\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"mhbf:~SModel.getName()\" resolve=\"getName\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbF\" id=\"1MKNcGA5EJb\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"1MKNcGA5EJc\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"1MKNcGA5EJd\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"6V$9xNdU9DQ\" resolve=\"res\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"1MKNcGA5EJe\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"yzht:~AsyncPromise.setResult(java.lang.Object)\" resolve=\"setResult\" />\n+ <node concept=\"37vLTw\" id=\"1MKNcGA5FHn\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"3BReYNsHbX3\" resolve=\"smodel\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3cpWs8\" id=\"1MKNcGA5KBM\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"1MKNcGA5KBN\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"smodel\" />\n+ <node concept=\"3uibUv\" id=\"1MKNcGA5KBO\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"mhbf:~EditableSModel\" resolve=\"EditableSModel\" />\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"1MKNcGA5OdA\" role=\"33vP2m\">\n+ <node concept=\"37vLTw\" id=\"1MKNcGA5Ntn\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"6V$9xNdU9DQ\" resolve=\"res\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"1MKNcGA5Q9q\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"yzht:~AsyncPromise.get()\" resolve=\"get\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbJ\" id=\"1MKNcGA5Te5\" role=\"3cqZAp\">\n+ <node concept=\"3clFbS\" id=\"1MKNcGA5Te7\" role=\"3clFbx\">\n<node concept=\"3clFbF\" id=\"5Ns9HDw2j_o\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"5Ns9HDw2j_p\" role=\"3clFbG\">\n<node concept=\"2ShNRf\" id=\"5Ns9HDw2j_q\" role=\"2Oq$k0\">\n<ref role=\"37wK5l\" to=\"jks5:~PNodeAdapter.getNodeId()\" resolve=\"getNodeId\" />\n</node>\n</node>\n- <node concept=\"37vLTw\" id=\"5Ns9HDw2j_$\" role=\"37wK5m\">\n- <ref role=\"3cqZAo\" node=\"3BReYNsHbX3\" resolve=\"smodel\" />\n+ <node concept=\"37vLTw\" id=\"1MKNcGA65fB\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"1MKNcGA5KBN\" resolve=\"smodel\" />\n</node>\n<node concept=\"37vLTw\" id=\"6gR8Ep$$tao\" role=\"37wK5m\">\n<ref role=\"3cqZAo\" node=\"729BXr3OMww\" resolve=\"repositoryInModelServer\" />\n</node>\n</node>\n</node>\n- <node concept=\"1X3_iC\" id=\"5cWpYFRGR7m\" role=\"lGtFl\">\n- <property role=\"3V$3am\" value=\"statement\" />\n- <property role=\"3V$3ak\" value=\"f3061a53-9226-4cc5-a443-f952ceaf5816/1068580123136/1068581517665\" />\n- <node concept=\"3clFbF\" id=\"5cWpYFREGip\" role=\"8Wnug\">\n- <node concept=\"2OqwBi\" id=\"5cWpYFREGUi\" role=\"3clFbG\">\n- <node concept=\"37vLTw\" id=\"5cWpYFREGin\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"5Ns9HDw2j$U\" resolve=\"module\" />\n- </node>\n- <node concept=\"liA8E\" id=\"5cWpYFREHYn\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"z1c3:~AbstractModule.updateModelsSet()\" resolve=\"updateModelsSet\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"1X3_iC\" id=\"5cWpYFRGSh9\" role=\"lGtFl\">\n- <property role=\"3V$3am\" value=\"statement\" />\n- <property role=\"3V$3ak\" value=\"f3061a53-9226-4cc5-a443-f952ceaf5816/1068580123136/1068581517665\" />\n- <node concept=\"3clFbF\" id=\"5XAq_$5SN_$\" role=\"8Wnug\">\n- <node concept=\"2OqwBi\" id=\"5XAq_$5SO0F\" role=\"3clFbG\">\n- <node concept=\"37vLTw\" id=\"5XAq_$5SN_y\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"3BReYNsHbX3\" resolve=\"smodel\" />\n- </node>\n- <node concept=\"liA8E\" id=\"5XAq_$5SOm9\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"mhbf:~EditableSModel.setChanged(boolean)\" resolve=\"setChanged\" />\n- <node concept=\"3clFbT\" id=\"5XAq_$5SOsU\" role=\"37wK5m\">\n- <property role=\"3clFbU\" value=\"true\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"abc8K\" id=\"32pQaarbLVv\" role=\"3cqZAp\">\n- <node concept=\"Xl_RD\" id=\"32pQaarbMiW\" role=\"abp_N\">\n- <property role=\"Xl_RC\" value=\"saving smodel \" />\n- </node>\n- <node concept=\"2OqwBi\" id=\"32pQaarbNaD\" role=\"abp_N\">\n- <node concept=\"37vLTw\" id=\"32pQaarbMLq\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"3BReYNsHbX3\" resolve=\"smodel\" />\n- </node>\n- <node concept=\"liA8E\" id=\"32pQaarbNpm\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"mhbf:~SModel.getName()\" resolve=\"getName\" />\n- </node>\n- </node>\n- </node>\n+ <node concept=\"1QHqEM\" id=\"1MKNcGA3HQG\" role=\"3cqZAp\">\n+ <node concept=\"1QHqEC\" id=\"1MKNcGA3HQI\" role=\"1QHqEI\">\n+ <node concept=\"3clFbS\" id=\"1MKNcGA3HQK\" role=\"1bW5cS\">\n<node concept=\"3clFbF\" id=\"5Ns9HDw2j_S\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"5Ns9HDw2j_T\" role=\"3clFbG\">\n- <node concept=\"37vLTw\" id=\"5Ns9HDw2j_U\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"3BReYNsHbX3\" resolve=\"smodel\" />\n+ <node concept=\"37vLTw\" id=\"1MKNcGA65TQ\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"1MKNcGA5KBN\" resolve=\"smodel\" />\n</node>\n<node concept=\"liA8E\" id=\"5Ns9HDw2j_V\" role=\"2OqNvi\">\n<ref role=\"37wK5l\" to=\"mhbf:~EditableSModel.save()\" resolve=\"save\" />\n</node>\n</node>\n</node>\n- <node concept=\"3uVAMA\" id=\"3BReYNsI4KJ\" role=\"1zxBo5\">\n- <node concept=\"3clFbS\" id=\"3BReYNsI4KK\" role=\"1zc67A\">\n- <node concept=\"YS8fn\" id=\"3BReYNsI5sL\" role=\"3cqZAp\">\n- <node concept=\"2ShNRf\" id=\"3BReYNsI5_K\" role=\"YScLw\">\n- <node concept=\"1pGfFk\" id=\"3BReYNsI6Zk\" role=\"2ShVmc\">\n- <ref role=\"37wK5l\" to=\"wyt6:~RuntimeException.<init>(java.lang.Throwable)\" resolve=\"RuntimeException\" />\n- <node concept=\"37vLTw\" id=\"3BReYNsI7dM\" role=\"37wK5m\">\n- <ref role=\"3cqZAo\" node=\"3BReYNsI4KL\" resolve=\"e\" />\n</node>\n+ <node concept=\"2OqwBi\" id=\"1MKNcGA3I3W\" role=\"ukAjM\">\n+ <node concept=\"37vLTw\" id=\"1MKNcGA3I3X\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"5Ns9HDw2j$U\" resolve=\"module\" />\n</node>\n+ <node concept=\"liA8E\" id=\"1MKNcGA3I3Y\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"31cb:~SModuleBase.getRepository()\" resolve=\"getRepository\" />\n</node>\n</node>\n</node>\n- <node concept=\"XOnhg\" id=\"3BReYNsI4KL\" role=\"1zc67B\">\n- <property role=\"TrG5h\" value=\"e\" />\n- <node concept=\"nSUau\" id=\"3BReYNsI4KM\" role=\"1tU5fm\">\n- <node concept=\"3uibUv\" id=\"3BReYNsI4KI\" role=\"nSUat\">\n- <ref role=\"3uigEE\" to=\"pa15:~ModelCannotBeCreatedException\" resolve=\"ModelCannotBeCreatedException\" />\n- </node>\n</node>\n+ <node concept=\"3y3z36\" id=\"1MKNcGA5YS1\" role=\"3clFbw\">\n+ <node concept=\"10Nm6u\" id=\"1MKNcGA5Z5E\" role=\"3uHU7w\" />\n+ <node concept=\"37vLTw\" id=\"1MKNcGA5Whw\" role=\"3uHU7B\">\n+ <ref role=\"3cqZAo\" node=\"1MKNcGA5KBN\" resolve=\"smodel\" />\n</node>\n</node>\n</node>\n</node>\n<node concept=\"3clFbJ\" id=\"32pQaar847A\" role=\"3cqZAp\">\n<node concept=\"3clFbS\" id=\"32pQaar847C\" role=\"3clFbx\">\n- <node concept=\"YS8fn\" id=\"32pQaar8VpA\" role=\"3cqZAp\">\n+ <node concept=\"1X3_iC\" id=\"1MKNcGA0458\" role=\"lGtFl\">\n+ <property role=\"3V$3am\" value=\"statement\" />\n+ <property role=\"3V$3ak\" value=\"f3061a53-9226-4cc5-a443-f952ceaf5816/1068580123136/1068581517665\" />\n+ <node concept=\"YS8fn\" id=\"32pQaar8VpA\" role=\"8Wnug\">\n<node concept=\"2ShNRf\" id=\"32pQaar8VpB\" role=\"YScLw\">\n<node concept=\"1pGfFk\" id=\"32pQaar8VpC\" role=\"2ShVmc\">\n<ref role=\"37wK5l\" to=\"wyt6:~RuntimeException.<init>(java.lang.String)\" resolve=\"RuntimeException\" />\n</node>\n</node>\n</node>\n+ <node concept=\"3SKdUt\" id=\"1MKNcGA06jE\" role=\"3cqZAp\">\n+ <node concept=\"1PaTwC\" id=\"1MKNcGA06jF\" role=\"1aUNEU\">\n+ <node concept=\"3oM_SD\" id=\"1MKNcGA06jG\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"For\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1MKNcGA06mn\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"the\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1MKNcGA06mq\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"time\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1MKNcGA06mu\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"being\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1MKNcGA06mz\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"we\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1MKNcGA06mD\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"do\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1MKNcGA06oX\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"not\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1MKNcGA06p5\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"instantiate\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1MKNcGA06rq\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"the\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1MKNcGA06r$\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"node\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3SKdUt\" id=\"1MKNcGA09xm\" role=\"3cqZAp\">\n+ <node concept=\"1PaTwC\" id=\"1MKNcGA09xn\" role=\"1aUNEU\">\n+ <node concept=\"3oM_SD\" id=\"1MKNcGA09xo\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"Eventually\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1MKNcGA09$f\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"this\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1MKNcGA09$i\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"should\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1MKNcGA09$m\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"be\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1MKNcGA09$r\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"fixed\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1MKNcGA09$x\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"as\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1MKNcGA09$C\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"part\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1MKNcGA09$K\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"of\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1MKNcGA09Bg\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"https://github.com/modelix/modelix/issues/149\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3cpWs8\" id=\"1MKNcGA2kUm\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"1MKNcGA2kUn\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"c\" />\n+ <node concept=\"3uibUv\" id=\"1MKNcGA2kUo\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"c17a:~SConcept\" resolve=\"SConcept\" />\n+ </node>\n+ <node concept=\"2YIFZM\" id=\"1MKNcGA2nx2\" role=\"33vP2m\">\n+ <ref role=\"37wK5l\" to=\"pjrh:~MetaAdapterByDeclaration.asInstanceConcept(org.jetbrains.mps.openapi.language.SAbstractConcept)\" resolve=\"asInstanceConcept\" />\n+ <ref role=\"1Pybhd\" to=\"pjrh:~MetaAdapterByDeclaration\" resolve=\"MetaAdapterByDeclaration\" />\n+ <node concept=\"1eOMI4\" id=\"1MKNcGA2oGH\" role=\"37wK5m\">\n+ <node concept=\"10QFUN\" id=\"1MKNcGA2oGE\" role=\"1eOMHV\">\n+ <node concept=\"3uibUv\" id=\"1MKNcGA2pfj\" role=\"10QFUM\">\n+ <ref role=\"3uigEE\" to=\"c17a:~SAbstractConcept\" resolve=\"SAbstractConcept\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"1MKNcGA2rWS\" role=\"10QFUP\">\n+ <ref role=\"3cqZAo\" node=\"32pQaar80at\" resolve=\"rawConcept\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbF\" id=\"1MKNcGA2s5o\" role=\"3cqZAp\">\n+ <node concept=\"37vLTI\" id=\"1MKNcGA2s5p\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"1MKNcGA2s5q\" role=\"37vLTJ\">\n+ <ref role=\"3cqZAo\" node=\"4_k_9wJ_0MN\" resolve=\"node\" />\n+ </node>\n+ <node concept=\"2ShNRf\" id=\"1MKNcGA2s5r\" role=\"37vLTx\">\n+ <node concept=\"1pGfFk\" id=\"1MKNcGA2s5s\" role=\"2ShVmc\">\n+ <ref role=\"37wK5l\" to=\"w1kc:~SNode.<init>(org.jetbrains.mps.openapi.language.SConcept,org.jetbrains.mps.openapi.model.SNodeId)\" resolve=\"SNode\" />\n+ <node concept=\"37vLTw\" id=\"1MKNcGA2s5t\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"1MKNcGA2kUn\" resolve=\"c\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"1MKNcGA2s5u\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"4_k_9wJ_0NV\" resolve=\"nodeId\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbF\" id=\"1MKNcGA2s5v\" role=\"3cqZAp\">\n+ <node concept=\"1rXfSq\" id=\"1MKNcGA2s5w\" role=\"3clFbG\">\n+ <ref role=\"37wK5l\" node=\"4_k_9wJ_0L5\" resolve=\"put\" />\n+ <node concept=\"37vLTw\" id=\"1MKNcGA2s5x\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"4_k_9wJ_0ME\" resolve=\"id\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"1MKNcGA2s5y\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"4_k_9wJ_0MN\" resolve=\"node\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"2ZW3vV\" id=\"32pQaar86c_\" role=\"3clFbw\">\n<node concept=\"3uibUv\" id=\"32pQaar8aHW\" role=\"2ZW6by\">\n<ref role=\"3uigEE\" to=\"c17a:~SInterfaceConcept\" resolve=\"SInterfaceConcept\" />\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | working on thread VFS issue because when creating models |
426,504 | 13.01.2022 09:23:50 | -3,600 | 127210a22972916e89254ca501d5beb381d88025 | solve issue with VFS during checkout of models | [
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.client/models/org.modelix.model.client.plugin.mps",
"new_path": "mps/org.modelix.model.client/models/org.modelix.model.client.plugin.mps",
"diff": "<node concept=\"2ShNRf\" id=\"4AFVQRWaBD8\" role=\"YScLw\">\n<node concept=\"1pGfFk\" id=\"4AFVQRWaC23\" role=\"2ShVmc\">\n<ref role=\"37wK5l\" to=\"wyt6:~RuntimeException.<init>(java.lang.String)\" resolve=\"RuntimeException\" />\n- <node concept=\"3cpWs3\" id=\"4AFVQRWaCG_\" role=\"37wK5m\">\n+ <node concept=\"3cpWs3\" id=\"5mIc0gCosM3\" role=\"37wK5m\">\n+ <node concept=\"Xl_RD\" id=\"5mIc0gCosME\" role=\"3uHU7w\">\n+ <property role=\"Xl_RC\" value=\")\" />\n+ </node>\n+ <node concept=\"3cpWs3\" id=\"5mIc0gCosmg\" role=\"3uHU7B\">\n+ <node concept=\"3cpWs3\" id=\"5mIc0gCorGw\" role=\"3uHU7B\">\n+ <node concept=\"3cpWs3\" id=\"4AFVQRWaCG_\" role=\"3uHU7B\">\n+ <node concept=\"Xl_RD\" id=\"4AFVQRWaC49\" role=\"3uHU7B\">\n+ <property role=\"Xl_RC\" value=\"MPS concept not found: \" />\n+ </node>\n<node concept=\"37vLTw\" id=\"4AFVQRWaCKZ\" role=\"3uHU7w\">\n<ref role=\"3cqZAo\" node=\"2wa1BbcP8L9\" resolve=\"sconceptId\" />\n</node>\n- <node concept=\"Xl_RD\" id=\"4AFVQRWaC49\" role=\"3uHU7B\">\n- <property role=\"Xl_RC\" value=\"MPs concept not found: \" />\n+ </node>\n+ <node concept=\"Xl_RD\" id=\"5mIc0gCorML\" role=\"3uHU7w\">\n+ <property role=\"Xl_RC\" value=\" (serialized as: \" />\n+ </node>\n+ </node>\n+ <node concept=\"37vLTw\" id=\"5mIc0gCospG\" role=\"3uHU7w\">\n+ <ref role=\"3cqZAo\" node=\"2lTt2KMwuc9\" resolve=\"serialized\" />\n+ </node>\n</node>\n</node>\n</node>\n"
},
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"diff": "<node concept=\"2tJIrI\" id=\"7PLbr3VI$7P\" role=\"jymVt\" />\n<node concept=\"2tJIrI\" id=\"32pQaarcZpI\" role=\"jymVt\" />\n<node concept=\"3clFb_\" id=\"32pQaard8uf\" role=\"jymVt\">\n- <property role=\"TrG5h\" value=\"deleteFile\" />\n+ <property role=\"TrG5h\" value=\"ensureDeletion\" />\n<node concept=\"3clFbS\" id=\"32pQaard8ui\" role=\"3clF47\">\n<node concept=\"3clFbJ\" id=\"32pQaardjTo\" role=\"3cqZAp\">\n<node concept=\"3clFbS\" id=\"32pQaardjTq\" role=\"3clFbx\">\n<node concept=\"2Gpval\" id=\"32pQaardhR8\" role=\"3cqZAp\">\n<node concept=\"2GrKxI\" id=\"32pQaardhR9\" role=\"2Gsz3X\">\n- <property role=\"TrG5h\" value=\"file\" />\n+ <property role=\"TrG5h\" value=\"child\" />\n</node>\n<node concept=\"2OqwBi\" id=\"32pQaardhRa\" role=\"2GsD0m\">\n<node concept=\"37vLTw\" id=\"32pQaardiUd\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"32pQaardcm5\" resolve=\"f\" />\n+ <ref role=\"3cqZAo\" node=\"32pQaardcm5\" resolve=\"virtualFile\" />\n</node>\n- <node concept=\"liA8E\" id=\"32pQaardhRc\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"guwi:~File.listFiles()\" resolve=\"listFiles\" />\n+ <node concept=\"liA8E\" id=\"5mIc0gCo10H\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"3ju5:~IFile.getChildren()\" resolve=\"getChildren\" />\n</node>\n</node>\n<node concept=\"3clFbS\" id=\"32pQaardhRd\" role=\"2LFqv$\">\n<node concept=\"3clFbF\" id=\"32pQaardhRe\" role=\"3cqZAp\">\n<node concept=\"1rXfSq\" id=\"32pQaardhRf\" role=\"3clFbG\">\n- <ref role=\"37wK5l\" node=\"32pQaard8uf\" resolve=\"deleteFile\" />\n+ <ref role=\"37wK5l\" node=\"32pQaard8uf\" resolve=\"ensureDeletion\" />\n<node concept=\"2GrUjf\" id=\"32pQaardhRg\" role=\"37wK5m\">\n- <ref role=\"2Gs0qQ\" node=\"32pQaardhR9\" resolve=\"file\" />\n+ <ref role=\"2Gs0qQ\" node=\"32pQaardhR9\" resolve=\"child\" />\n</node>\n</node>\n</node>\n</node>\n<node concept=\"2OqwBi\" id=\"32pQaardkgW\" role=\"3clFbw\">\n<node concept=\"37vLTw\" id=\"32pQaardk8R\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"32pQaardcm5\" resolve=\"f\" />\n+ <ref role=\"3cqZAo\" node=\"32pQaardcm5\" resolve=\"virtualFile\" />\n</node>\n<node concept=\"liA8E\" id=\"32pQaardkZN\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"guwi:~File.isDirectory()\" resolve=\"isDirectory\" />\n- </node>\n+ <ref role=\"37wK5l\" to=\"3ju5:~IFile.isDirectory()\" resolve=\"isDirectory\" />\n</node>\n</node>\n+ <node concept=\"9aQIb\" id=\"5mIc0gCniGb\" role=\"9aQIa\">\n+ <node concept=\"3clFbS\" id=\"5mIc0gCniGc\" role=\"9aQI4\">\n<node concept=\"3clFbF\" id=\"32pQaardmhE\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"32pQaardmms\" role=\"3clFbG\">\n<node concept=\"37vLTw\" id=\"32pQaardmhC\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"32pQaardcm5\" resolve=\"f\" />\n+ <ref role=\"3cqZAo\" node=\"32pQaardcm5\" resolve=\"virtualFile\" />\n</node>\n<node concept=\"liA8E\" id=\"32pQaardn5P\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"3ju5:~IFile.delete()\" resolve=\"delete\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3cpWs8\" id=\"5mIc0gCnkHc\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"5mIc0gCnkHd\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"physicalFile\" />\n+ <node concept=\"3uibUv\" id=\"5mIc0gCnkHe\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"guwi:~File\" resolve=\"File\" />\n+ </node>\n+ <node concept=\"2ShNRf\" id=\"5mIc0gCnlFU\" role=\"33vP2m\">\n+ <node concept=\"1pGfFk\" id=\"5mIc0gCnXxT\" role=\"2ShVmc\">\n+ <ref role=\"37wK5l\" to=\"guwi:~File.<init>(java.lang.String)\" resolve=\"File\" />\n+ <node concept=\"2OqwBi\" id=\"5mIc0gCnYoY\" role=\"37wK5m\">\n+ <node concept=\"37vLTw\" id=\"5mIc0gCnY43\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"32pQaardcm5\" resolve=\"virtualFile\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"5mIc0gCnZfp\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"3ju5:~IFile.getPath()\" resolve=\"getPath\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbF\" id=\"5mIc0gCo02F\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"5mIc0gCo0vJ\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"5mIc0gCo02D\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"5mIc0gCnkHd\" resolve=\"physicalFile\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"5mIc0gCo0Oa\" role=\"2OqNvi\">\n<ref role=\"37wK5l\" to=\"guwi:~File.delete()\" resolve=\"delete\" />\n</node>\n</node>\n</node>\n</node>\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"3Tm6S6\" id=\"32pQaard3zj\" role=\"1B3o_S\" />\n<node concept=\"3cqZAl\" id=\"32pQaard7Mb\" role=\"3clF45\" />\n<node concept=\"37vLTG\" id=\"32pQaardcm5\" role=\"3clF46\">\n- <property role=\"TrG5h\" value=\"f\" />\n- <node concept=\"3uibUv\" id=\"32pQaardcm4\" role=\"1tU5fm\">\n+ <property role=\"TrG5h\" value=\"virtualFile\" />\n+ <node concept=\"3uibUv\" id=\"5mIc0gCnaeZ\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"3ju5:~IFile\" resolve=\"IFile\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"2tJIrI\" id=\"5mIc0gCmfBC\" role=\"jymVt\" />\n+ <node concept=\"3clFb_\" id=\"5mIc0gCmM3I\" role=\"jymVt\">\n+ <property role=\"TrG5h\" value=\"ensureDirDeletionAndRecreation\" />\n+ <node concept=\"3clFbS\" id=\"5mIc0gCmM3L\" role=\"3clF47\">\n+ <node concept=\"3clFbF\" id=\"5mIc0gCncVY\" role=\"3cqZAp\">\n+ <node concept=\"1rXfSq\" id=\"5mIc0gCncVW\" role=\"3clFbG\">\n+ <ref role=\"37wK5l\" node=\"32pQaard8uf\" resolve=\"ensureDeletion\" />\n+ <node concept=\"37vLTw\" id=\"5mIc0gCnecY\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"5mIc0gCmQ$A\" resolve=\"virtualDir\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbF\" id=\"5mIc0gCnfCp\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"5mIc0gCngDD\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"5mIc0gCnfCn\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"5mIc0gCmQ$A\" resolve=\"virtualDir\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"5mIc0gCnh$m\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"3ju5:~IFile.mkdirs()\" resolve=\"mkdirs\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbH\" id=\"5mIc0gCnckr\" role=\"3cqZAp\" />\n+ <node concept=\"1X3_iC\" id=\"5mIc0gCnhAP\" role=\"lGtFl\">\n+ <property role=\"3V$3am\" value=\"statement\" />\n+ <property role=\"3V$3ak\" value=\"f3061a53-9226-4cc5-a443-f952ceaf5816/1068580123136/1068581517665\" />\n+ <node concept=\"3clFbF\" id=\"5mIc0gCmVch\" role=\"8Wnug\">\n+ <node concept=\"2OqwBi\" id=\"5mIc0gCmVci\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"5mIc0gCn0CE\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"5mIc0gCmQ$A\" resolve=\"virtualDir\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"5mIc0gCmVck\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"3ju5:~IFile.deleteIfExists()\" resolve=\"deleteIfExists\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"1X3_iC\" id=\"5mIc0gCnhAQ\" role=\"lGtFl\">\n+ <property role=\"3V$3am\" value=\"statement\" />\n+ <property role=\"3V$3ak\" value=\"f3061a53-9226-4cc5-a443-f952ceaf5816/1068580123136/1068581517665\" />\n+ <node concept=\"3cpWs8\" id=\"5mIc0gCmVcl\" role=\"8Wnug\">\n+ <node concept=\"3cpWsn\" id=\"5mIc0gCmVcm\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"physicalDir\" />\n+ <node concept=\"3uibUv\" id=\"5mIc0gCmVcn\" role=\"1tU5fm\">\n<ref role=\"3uigEE\" to=\"guwi:~File\" resolve=\"File\" />\n</node>\n+ <node concept=\"2ShNRf\" id=\"5mIc0gCmVcq\" role=\"33vP2m\">\n+ <node concept=\"1pGfFk\" id=\"5mIc0gCmVcr\" role=\"2ShVmc\">\n+ <ref role=\"37wK5l\" to=\"guwi:~File.<init>(java.lang.String)\" resolve=\"File\" />\n+ <node concept=\"2OqwBi\" id=\"5mIc0gCmVcs\" role=\"37wK5m\">\n+ <node concept=\"37vLTw\" id=\"5mIc0gCn1Eg\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"5mIc0gCmQ$A\" resolve=\"virtualDir\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"5mIc0gCmVcu\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"3ju5:~IFile.getPath()\" resolve=\"getPath\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"1X3_iC\" id=\"5mIc0gCnhAR\" role=\"lGtFl\">\n+ <property role=\"3V$3am\" value=\"statement\" />\n+ <property role=\"3V$3ak\" value=\"f3061a53-9226-4cc5-a443-f952ceaf5816/1068580123136/1068581517665\" />\n+ <node concept=\"3clFbJ\" id=\"5mIc0gCmVcw\" role=\"8Wnug\">\n+ <node concept=\"3clFbS\" id=\"5mIc0gCmVcx\" role=\"3clFbx\">\n+ <node concept=\"2Gpval\" id=\"5mIc0gCmVcy\" role=\"3cqZAp\">\n+ <node concept=\"2GrKxI\" id=\"5mIc0gCmVcz\" role=\"2Gsz3X\">\n+ <property role=\"TrG5h\" value=\"file\" />\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"5mIc0gCmVc$\" role=\"2GsD0m\">\n+ <node concept=\"37vLTw\" id=\"5mIc0gCmVc_\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"5mIc0gCmVcm\" resolve=\"physicalDir\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"5mIc0gCmVcA\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"guwi:~File.listFiles()\" resolve=\"listFiles\" />\n+ </node>\n+ </node>\n+ <node concept=\"3clFbS\" id=\"5mIc0gCmVcB\" role=\"2LFqv$\">\n+ <node concept=\"3clFbF\" id=\"5mIc0gCmVcC\" role=\"3cqZAp\">\n+ <node concept=\"1rXfSq\" id=\"5mIc0gCmVcD\" role=\"3clFbG\">\n+ <ref role=\"37wK5l\" node=\"32pQaard8uf\" resolve=\"ensureDeletion\" />\n+ <node concept=\"2GrUjf\" id=\"5mIc0gCmVcE\" role=\"37wK5m\">\n+ <ref role=\"2Gs0qQ\" node=\"5mIc0gCmVcz\" resolve=\"file\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"5mIc0gCmVcF\" role=\"3clFbw\">\n+ <node concept=\"37vLTw\" id=\"5mIc0gCmVcG\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"5mIc0gCmVcm\" resolve=\"physicalDir\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"5mIc0gCmVcH\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"guwi:~File.exists()\" resolve=\"exists\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"1X3_iC\" id=\"5mIc0gCnhAS\" role=\"lGtFl\">\n+ <property role=\"3V$3am\" value=\"statement\" />\n+ <property role=\"3V$3ak\" value=\"f3061a53-9226-4cc5-a443-f952ceaf5816/1068580123136/1068581517665\" />\n+ <node concept=\"3clFbJ\" id=\"5mIc0gCmVcI\" role=\"8Wnug\">\n+ <node concept=\"3clFbS\" id=\"5mIc0gCmVcJ\" role=\"3clFbx\">\n+ <node concept=\"3clFbF\" id=\"5mIc0gCmVcK\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"5mIc0gCmVcL\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"5mIc0gCmVcM\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"5mIc0gCmVcm\" resolve=\"physicalDir\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"5mIc0gCmVcN\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"guwi:~File.mkdirs()\" resolve=\"mkdirs\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3fqX7Q\" id=\"5mIc0gCmVcO\" role=\"3clFbw\">\n+ <node concept=\"2OqwBi\" id=\"5mIc0gCmVcP\" role=\"3fr31v\">\n+ <node concept=\"37vLTw\" id=\"5mIc0gCmVcQ\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"5mIc0gCmVcm\" resolve=\"physicalDir\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"5mIc0gCmVcR\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"guwi:~File.exists()\" resolve=\"exists\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3Tm6S6\" id=\"5mIc0gCmF0F\" role=\"1B3o_S\" />\n+ <node concept=\"3cqZAl\" id=\"5mIc0gCmJZK\" role=\"3clF45\" />\n+ <node concept=\"37vLTG\" id=\"5mIc0gCmQ$A\" role=\"3clF46\">\n+ <property role=\"TrG5h\" value=\"virtualDir\" />\n+ <node concept=\"3uibUv\" id=\"5mIc0gCmQ$_\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"3ju5:~IFile\" resolve=\"IFile\" />\n+ </node>\n</node>\n</node>\n<node concept=\"2tJIrI\" id=\"729BXr3QvLN\" role=\"jymVt\" />\n</node>\n</node>\n</node>\n- <node concept=\"3clFbF\" id=\"1MKNcGA0$oA\" role=\"3cqZAp\">\n+ <node concept=\"3clFbF\" id=\"5mIc0gCo2St\" role=\"3cqZAp\">\n+ <node concept=\"1rXfSq\" id=\"5mIc0gCo2Sr\" role=\"3clFbG\">\n+ <ref role=\"37wK5l\" node=\"5mIc0gCmM3I\" resolve=\"ensureDirDeletionAndRecreation\" />\n+ <node concept=\"37vLTw\" id=\"5mIc0gCo4XV\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"1MKNcGA0ogd\" resolve=\"modelsDirVirtual\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"1X3_iC\" id=\"5mIc0gCo51K\" role=\"lGtFl\">\n+ <property role=\"3V$3am\" value=\"statement\" />\n+ <property role=\"3V$3ak\" value=\"f3061a53-9226-4cc5-a443-f952ceaf5816/1068580123136/1068581517665\" />\n+ <node concept=\"3clFbF\" id=\"1MKNcGA0$oA\" role=\"8Wnug\">\n<node concept=\"2OqwBi\" id=\"1MKNcGA0$Ki\" role=\"3clFbG\">\n<node concept=\"37vLTw\" id=\"1MKNcGA0$o$\" role=\"2Oq$k0\">\n<ref role=\"3cqZAo\" node=\"1MKNcGA0ogd\" resolve=\"modelsDirVirtual\" />\n</node>\n</node>\n</node>\n- <node concept=\"3cpWs8\" id=\"18La5_p9Rvh\" role=\"3cqZAp\">\n- <node concept=\"3cpWsn\" id=\"18La5_p9Rvi\" role=\"3cpWs9\">\n- <property role=\"TrG5h\" value=\"modelsDir\" />\n- <node concept=\"3uibUv\" id=\"18La5_p9Rvj\" role=\"1tU5fm\">\n- <ref role=\"3uigEE\" to=\"guwi:~File\" resolve=\"File\" />\n- </node>\n- <node concept=\"2ShNRf\" id=\"18La5_papZ6\" role=\"33vP2m\">\n- <node concept=\"1pGfFk\" id=\"18La5_paro7\" role=\"2ShVmc\">\n- <ref role=\"37wK5l\" to=\"guwi:~File.<init>(java.io.File,java.lang.String)\" resolve=\"File\" />\n- <node concept=\"2ShNRf\" id=\"18La5_p9T7U\" role=\"37wK5m\">\n- <node concept=\"1pGfFk\" id=\"18La5_papzc\" role=\"2ShVmc\">\n- <ref role=\"37wK5l\" to=\"guwi:~File.<init>(java.lang.String)\" resolve=\"File\" />\n- <node concept=\"2OqwBi\" id=\"18La5_p9Nni\" role=\"37wK5m\">\n- <node concept=\"37vLTw\" id=\"18La5_p9M44\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"18La5_p9Iuw\" resolve=\"solutionDir\" />\n- </node>\n- <node concept=\"liA8E\" id=\"18La5_p9OUn\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"3ju5:~IFile.getPath()\" resolve=\"getPath\" />\n</node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"Xl_RD\" id=\"18La5_parMB\" role=\"37wK5m\">\n- <property role=\"Xl_RC\" value=\"models\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"3clFbJ\" id=\"32pQaarcVYL\" role=\"3cqZAp\">\n+ <node concept=\"1X3_iC\" id=\"5mIc0gCo51M\" role=\"lGtFl\">\n+ <property role=\"3V$3am\" value=\"statement\" />\n+ <property role=\"3V$3ak\" value=\"f3061a53-9226-4cc5-a443-f952ceaf5816/1068580123136/1068581517665\" />\n+ <node concept=\"3clFbJ\" id=\"32pQaarcVYL\" role=\"8Wnug\">\n<node concept=\"3clFbS\" id=\"32pQaarcVYN\" role=\"3clFbx\">\n<node concept=\"2Gpval\" id=\"32pQaarcYv0\" role=\"3cqZAp\">\n<node concept=\"2GrKxI\" id=\"32pQaarcYv5\" role=\"2Gsz3X\">\n<node concept=\"3clFbS\" id=\"32pQaarcYvf\" role=\"2LFqv$\">\n<node concept=\"3clFbF\" id=\"32pQaardgSx\" role=\"3cqZAp\">\n<node concept=\"1rXfSq\" id=\"32pQaardgSw\" role=\"3clFbG\">\n- <ref role=\"37wK5l\" node=\"32pQaard8uf\" resolve=\"deleteFile\" />\n+ <ref role=\"37wK5l\" node=\"32pQaard8uf\" resolve=\"ensureDeletion\" />\n<node concept=\"2GrUjf\" id=\"32pQaardhNG\" role=\"37wK5m\">\n<ref role=\"2Gs0qQ\" node=\"32pQaarcYv5\" resolve=\"file\" />\n</node>\n</node>\n</node>\n</node>\n- <node concept=\"3clFbJ\" id=\"18La5_paujq\" role=\"3cqZAp\">\n+ </node>\n+ <node concept=\"1X3_iC\" id=\"5mIc0gCo51N\" role=\"lGtFl\">\n+ <property role=\"3V$3am\" value=\"statement\" />\n+ <property role=\"3V$3ak\" value=\"f3061a53-9226-4cc5-a443-f952ceaf5816/1068580123136/1068581517665\" />\n+ <node concept=\"3clFbJ\" id=\"18La5_paujq\" role=\"8Wnug\">\n<node concept=\"3clFbS\" id=\"18La5_paujs\" role=\"3clFbx\">\n<node concept=\"3clFbF\" id=\"18La5_pa$bZ\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"18La5_pa$wS\" role=\"3clFbG\">\n</node>\n</node>\n</node>\n+ </node>\n+ <node concept=\"3cpWs8\" id=\"18La5_p9Rvh\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"18La5_p9Rvi\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"modelsDir\" />\n+ <node concept=\"3uibUv\" id=\"18La5_p9Rvj\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"guwi:~File\" resolve=\"File\" />\n+ </node>\n+ <node concept=\"2ShNRf\" id=\"18La5_papZ6\" role=\"33vP2m\">\n+ <node concept=\"1pGfFk\" id=\"18La5_paro7\" role=\"2ShVmc\">\n+ <ref role=\"37wK5l\" to=\"guwi:~File.<init>(java.io.File,java.lang.String)\" resolve=\"File\" />\n+ <node concept=\"2ShNRf\" id=\"18La5_p9T7U\" role=\"37wK5m\">\n+ <node concept=\"1pGfFk\" id=\"18La5_papzc\" role=\"2ShVmc\">\n+ <ref role=\"37wK5l\" to=\"guwi:~File.<init>(java.lang.String)\" resolve=\"File\" />\n+ <node concept=\"2OqwBi\" id=\"18La5_p9Nni\" role=\"37wK5m\">\n+ <node concept=\"37vLTw\" id=\"18La5_p9M44\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"18La5_p9Iuw\" resolve=\"solutionDir\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"18La5_p9OUn\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"3ju5:~IFile.getPath()\" resolve=\"getPath\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"Xl_RD\" id=\"18La5_parMB\" role=\"37wK5m\">\n+ <property role=\"Xl_RC\" value=\"models\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"abc8K\" id=\"32pQaarbLcG\" role=\"3cqZAp\">\n<node concept=\"Xl_RD\" id=\"32pQaarbLtb\" role=\"abp_N\">\n<property role=\"Xl_RC\" value=\"the models dir should exist now. Does it exists? \" />\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | solve issue with VFS during checkout of models |
426,504 | 13.01.2022 09:36:49 | -3,600 | ff844d8c27c43d776fca65a02c19b27d12a7a5bd | ensure the application terminat | [
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.plugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.plugin.mps",
"diff": "<node concept=\"1QHqEO\" id=\"2pMrK1SmBa1\" role=\"3cqZAp\">\n<node concept=\"1QHqEC\" id=\"2pMrK1SmBa3\" role=\"1QHqEI\">\n<node concept=\"3clFbS\" id=\"2pMrK1SmBa5\" role=\"1bW5cS\">\n+ <node concept=\"3J1_TO\" id=\"5mIc0gCoAMH\" role=\"3cqZAp\">\n+ <node concept=\"3uVAMA\" id=\"5mIc0gCoBX3\" role=\"1zxBo5\">\n+ <node concept=\"XOnhg\" id=\"5mIc0gCoBX4\" role=\"1zc67B\">\n+ <property role=\"TrG5h\" value=\"t\" />\n+ <node concept=\"nSUau\" id=\"5mIc0gCoBX5\" role=\"1tU5fm\">\n+ <node concept=\"3uibUv\" id=\"5mIc0gCoCLI\" role=\"nSUat\">\n+ <ref role=\"3uigEE\" to=\"wyt6:~Throwable\" resolve=\"Throwable\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbS\" id=\"5mIc0gCoBX6\" role=\"1zc67A\">\n+ <node concept=\"3clFbF\" id=\"5mIc0gCoEw2\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"5mIc0gCoEE2\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"5mIc0gCoEw1\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"5mIc0gCoBX4\" resolve=\"t\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"5mIc0gCoFjm\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"wyt6:~Throwable.printStackTrace()\" resolve=\"printStackTrace\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbF\" id=\"5mIc0gCoFIv\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"5mIc0gCoFIw\" role=\"3clFbG\">\n+ <node concept=\"10M0yZ\" id=\"5mIc0gCoFIx\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" to=\"wyt6:~System.out\" resolve=\"out\" />\n+ <ref role=\"1PxDUh\" to=\"wyt6:~System\" resolve=\"System\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"5mIc0gCoFIy\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"guwi:~PrintStream.println(java.lang.String)\" resolve=\"println\" />\n+ <node concept=\"Xl_RD\" id=\"5mIc0gCoFIz\" role=\"37wK5m\">\n+ <property role=\"Xl_RC\" value=\"CHECKOUT FAILED\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbS\" id=\"5mIc0gCoAMJ\" role=\"1zxBo7\">\n<node concept=\"3clFbF\" id=\"OmBhSVK56R\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"OmBhSVK56S\" role=\"3clFbG\">\n<node concept=\"10M0yZ\" id=\"OmBhSVK56T\" role=\"2Oq$k0\">\n</node>\n</node>\n</node>\n+ <node concept=\"3clFbF\" id=\"5mIc0gCox1f\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"5mIc0gCoxp$\" role=\"3clFbG\">\n+ <node concept=\"10M0yZ\" id=\"5mIc0gCox1_\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" to=\"wyt6:~System.out\" resolve=\"out\" />\n+ <ref role=\"1PxDUh\" to=\"wyt6:~System\" resolve=\"System\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"5mIc0gCoykT\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"guwi:~PrintStream.println(java.lang.String)\" resolve=\"println\" />\n+ <node concept=\"Xl_RD\" id=\"5mIc0gCozqh\" role=\"37wK5m\">\n+ <property role=\"Xl_RC\" value=\"CHECKOUT COMPLETED\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n</node>\n</node>\n<node concept=\"2OqwBi\" id=\"2pMrK1SmQ3y\" role=\"ukAjM\">\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | ensure the application terminat |
426,504 | 13.01.2022 11:41:21 | -3,600 | ee35d7cfddf67cd4989b221c29268a39e2540ac4 | revising code in gradle plugin | [
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ExportMain.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ExportMain.java",
"diff": "@@ -15,12 +15,8 @@ package org.modelix.gradle.model;\nimport com.intellij.ide.plugins.IdeaPluginDescriptor;\nimport com.intellij.ide.plugins.PluginManager;\n-import org.apache.log4j.Logger;\n-import javax.swing.*;\nimport java.io.File;\n-import java.util.HashMap;\n-import java.util.Map;\npublic class ExportMain {\n@@ -41,9 +37,7 @@ public class ExportMain {\nfor (IdeaPluginDescriptor p : PluginManager.getPlugins()) {\nSystem.out.println(\" \" + p.getName() + \" (\" + p.getPluginId() + \")\");\n}\n- System.out.println(\"Export main returned\");\n} catch (Exception ex) {\n- System.out.println(\"Export main exception\");\nSystem.out.println(ex.getMessage());\nex.printStackTrace();\nSystem.exit(1);\n"
},
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"diff": "package org.modelix.gradle.model;\n-import kotlin.text.Charsets;\nimport org.gradle.api.Plugin;\nimport org.gradle.api.Project;\nimport org.gradle.api.artifacts.Configuration;\n@@ -10,14 +9,12 @@ import org.gradle.api.tasks.JavaExec;\nimport org.gradle.process.ExecResult;\nimport org.modelix.gradle.model.EnvironmentLoader.Key;\n-import java.io.ByteArrayOutputStream;\nimport java.io.File;\nimport java.io.IOException;\nimport java.net.URL;\nimport java.time.Duration;\nimport java.util.Arrays;\nimport java.util.Enumeration;\n-import java.util.LinkedList;\nimport java.util.List;\nimport java.util.jar.Manifest;\nimport java.util.stream.Collectors;\n@@ -113,16 +110,11 @@ public class ModelPlugin implements Plugin<Project> {\njavaExec.dependsOn(copyMpsTask, copyMpsModelPluginTask);\n}\n-// OutputStream standardOutput = new ByteArrayOutputStream();\n-// javaExec.setStandardOutput(standardOutput);\n-\n-\n- StreamGobbler sg = StreamGobbler.go(javaExec, System.out);\n+ StreamContentCapture sg = StreamContentCapture.go(javaExec, System.out);\njavaExec.setDescription(\"Export models from modelix model server to MPS files\");\njavaExec.classpath(project.fileTree(new File(mpsLocation, \"lib\")).include(\"**/*.jar\"));\njavaExec.classpath(genConfig);\n- // javaExec.jvmArgs(\"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5072\");\njavaExec.args(\nKey.SERVER_URL.getCode(), settings.getServerUrl(),\nKey.REPOSITORY_ID.getCode(), settings.getRepositoryId(),\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/StreamContentCapture.java",
"diff": "+package org.modelix.gradle.model;\n+\n+import java.io.BufferedOutputStream;\n+import java.io.BufferedReader;\n+import java.io.ByteArrayInputStream;\n+import java.io.ByteArrayOutputStream;\n+import java.io.IOException;\n+import java.io.InputStreamReader;\n+import java.io.OutputStream;\n+import java.util.LinkedList;\n+import java.util.List;\n+import org.gradle.api.tasks.JavaExec;\n+\n+class StreamContentCapture {\n+ private List<String> lines;\n+ private final ByteArrayOutputStream baos;\n+\n+ public static StreamContentCapture go(JavaExec javaExec, OutputStream externalOutput) {\n+ ByteArrayOutputStream baos =new ByteArrayOutputStream();\n+ BufferedOutputStream bos = new BufferedOutputStream(baos);\n+ OutputStream internalOutput = new OutputStream() {\n+ @Override\n+ public void write(int b) throws IOException {\n+ externalOutput.write(b);\n+ bos.write(b);\n+ }\n+ };\n+ final StreamContentCapture gob = new StreamContentCapture(baos);\n+ javaExec.setStandardOutput(internalOutput);\n+ return gob;\n+ }\n+\n+ private StreamContentCapture(ByteArrayOutputStream baos) {\n+ this.baos = baos;\n+ this.lines = null;\n+ }\n+\n+ public List<String> getContent() {\n+ try {\n+ if (this.lines == null) {\n+ this.lines = new LinkedList<>();\n+ ByteArrayInputStream bais = new ByteArrayInputStream(this.baos.toByteArray());\n+ BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(bais));\n+ String line;\n+ while ((line = bufferedReader.readLine()) != null) {\n+ lines.add(line);\n+ }\n+ }\n+ return this.lines;\n+ } catch (IOException e) {\n+ throw new RuntimeException(e);\n+ }\n+ }\n+\n+}\n"
},
{
"change_type": "DELETE",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/StreamGobbler.java",
"new_path": null,
"diff": "-package org.modelix.gradle.model;\n-\n-import java.io.BufferedOutputStream;\n-import java.io.BufferedReader;\n-import java.io.BufferedWriter;\n-import java.io.ByteArrayInputStream;\n-import java.io.ByteArrayOutputStream;\n-import java.io.IOException;\n-import java.io.InputStream;\n-import java.io.InputStreamReader;\n-import java.io.OutputStream;\n-import java.io.PrintWriter;\n-import java.io.StringReader;\n-import java.util.LinkedList;\n-import java.util.List;\n-import org.gradle.api.tasks.JavaExec;\n-\n-class StreamGobbler {\n- private final OutputStream internalOutput;\n- private final OutputStream externalOutput;\n- private final List<String> lines;\n- private ByteArrayOutputStream baos;\n-\n- public static StreamGobbler go(JavaExec javaExec, OutputStream externalOutput) {\n- ByteArrayOutputStream baos =new ByteArrayOutputStream();\n- BufferedOutputStream bos = new BufferedOutputStream(baos);\n- OutputStream internalOutput = new OutputStream() {\n- @Override\n- public void write(int b) throws IOException {\n- externalOutput.write(b);\n- bos.write(b);\n- }\n- };\n- final StreamGobbler gob = new StreamGobbler(internalOutput, externalOutput, baos);\n- javaExec.setStandardOutput(internalOutput);\n- return gob;\n- }\n-\n- private StreamGobbler(OutputStream internalOutput, OutputStream os, ByteArrayOutputStream baos) {\n- this.internalOutput = internalOutput;\n- this.externalOutput = os;\n- this.baos = baos;\n- this.lines = new LinkedList<String>();\n- }\n-\n- public List<String> getContent() {\n- try {\n- ByteArrayInputStream bais = new ByteArrayInputStream(this.baos.toByteArray());\n- BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(bais));\n- String line;\n- while ((line = bufferedReader.readLine()) != null) {\n- lines.add(line);\n- }\n- return this.lines;\n- } catch (IOException e) {\n- throw new RuntimeException(e);\n- }\n- }\n-\n-// public void run() {\n-// try {\n-// final PrintWriter pw = ((externalOutput == null) ? null : new PrintWriter(externalOutput));\n-// final InputStreamReader isr = new InputStreamReader(is);\n-// final BufferedReader br = new BufferedReader(isr);\n-// String line = null;\n-// while ((line = br.readLine()) != null) {\n-// if (pw != null) {\n-// pw.println(line);\n-// }\n-// lines.add(line);\n-// }\n-// if (pw != null) {\n-// pw.flush();\n-// }\n-// } catch (IOException ioe) {\n-// ioe.printStackTrace();\n-// }\n-// }\n-}\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | revising code in gradle plugin |
426,504 | 13.01.2022 11:56:55 | -3,600 | 4ed391a70e2074aa088618ae23b794865847d7b5 | cleaning code in MPSPlugin | [
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"diff": "</node>\n</node>\n</node>\n- <node concept=\"2tJIrI\" id=\"32pQaarbV10\" role=\"jymVt\" />\n- <node concept=\"3clFb_\" id=\"32pQaarc9I7\" role=\"jymVt\">\n- <property role=\"TrG5h\" value=\"deleteIFile\" />\n- <node concept=\"3clFbS\" id=\"32pQaarc9Ia\" role=\"3clF47\">\n- <node concept=\"3clFbJ\" id=\"32pQaarcpAg\" role=\"3cqZAp\">\n- <node concept=\"3clFbS\" id=\"32pQaarcpAi\" role=\"3clFbx\">\n- <node concept=\"3cpWs6\" id=\"32pQaarcroO\" role=\"3cqZAp\" />\n- </node>\n- <node concept=\"3fqX7Q\" id=\"32pQaarcr7h\" role=\"3clFbw\">\n- <node concept=\"2OqwBi\" id=\"32pQaarcr7j\" role=\"3fr31v\">\n- <node concept=\"37vLTw\" id=\"32pQaarcr7k\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"32pQaarce1u\" resolve=\"f\" />\n- </node>\n- <node concept=\"liA8E\" id=\"32pQaarcr7l\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"3ju5:~IFile.exists()\" resolve=\"exists\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"2Gpval\" id=\"32pQaarclNQ\" role=\"3cqZAp\">\n- <node concept=\"2GrKxI\" id=\"32pQaarclNT\" role=\"2Gsz3X\">\n- <property role=\"TrG5h\" value=\"child\" />\n- </node>\n- <node concept=\"3clFbS\" id=\"32pQaarclNZ\" role=\"2LFqv$\">\n- <node concept=\"3clFbF\" id=\"32pQaarcn6Z\" role=\"3cqZAp\">\n- <node concept=\"1rXfSq\" id=\"32pQaarcn6Y\" role=\"3clFbG\">\n- <ref role=\"37wK5l\" node=\"32pQaarc9I7\" resolve=\"deleteIFile\" />\n- <node concept=\"2GrUjf\" id=\"32pQaarco52\" role=\"37wK5m\">\n- <ref role=\"2Gs0qQ\" node=\"32pQaarclNT\" resolve=\"child\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"2OqwBi\" id=\"32pQaarcjJE\" role=\"2GsD0m\">\n- <node concept=\"37vLTw\" id=\"32pQaarcjtU\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"32pQaarce1u\" resolve=\"f\" />\n- </node>\n- <node concept=\"liA8E\" id=\"32pQaarckr1\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"3ju5:~IFile.getChildren()\" resolve=\"getChildren\" />\n- </node>\n- </node>\n- </node>\n- <node concept=\"3clFbF\" id=\"32pQaarcotu\" role=\"3cqZAp\">\n- <node concept=\"2OqwBi\" id=\"32pQaarco$n\" role=\"3clFbG\">\n- <node concept=\"37vLTw\" id=\"32pQaarcots\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"32pQaarce1u\" resolve=\"f\" />\n- </node>\n- <node concept=\"liA8E\" id=\"32pQaarcsjg\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"3ju5:~IFile.delete()\" resolve=\"delete\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"3Tm6S6\" id=\"32pQaarc2yq\" role=\"1B3o_S\" />\n- <node concept=\"3cqZAl\" id=\"32pQaarc93b\" role=\"3clF45\" />\n- <node concept=\"37vLTG\" id=\"32pQaarce1u\" role=\"3clF46\">\n- <property role=\"TrG5h\" value=\"f\" />\n- <node concept=\"3uibUv\" id=\"32pQaarce1t\" role=\"1tU5fm\">\n- <ref role=\"3uigEE\" to=\"3ju5:~IFile\" resolve=\"IFile\" />\n- </node>\n- </node>\n- </node>\n<node concept=\"2tJIrI\" id=\"1OzsJtaqJ_q\" role=\"jymVt\" />\n<node concept=\"3clFb_\" id=\"1OzsJtaqLtr\" role=\"jymVt\">\n<property role=\"TrG5h\" value=\"export\" />\n<node concept=\"3clFbH\" id=\"5cWpYFR$rvf\" role=\"3cqZAp\" />\n<node concept=\"3clFbJ\" id=\"1OzsJtaqLtA\" role=\"3cqZAp\">\n<node concept=\"3clFbS\" id=\"1OzsJtaqLtB\" role=\"3clFbx\">\n- <node concept=\"3clFbF\" id=\"32pQaarctIa\" role=\"3cqZAp\">\n- <node concept=\"1rXfSq\" id=\"32pQaarctI9\" role=\"3clFbG\">\n- <ref role=\"37wK5l\" node=\"32pQaarc9I7\" resolve=\"deleteIFile\" />\n- <node concept=\"37vLTw\" id=\"32pQaarcuQw\" role=\"37wK5m\">\n+ <node concept=\"3clFbF\" id=\"1OzsJtaqLtC\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"1OzsJtaqLtD\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"5mIc0gCqvcN\" role=\"2Oq$k0\">\n<ref role=\"3cqZAo\" node=\"1OzsJtaqLvM\" resolve=\"outputFolder\" />\n</node>\n+ <node concept=\"liA8E\" id=\"1OzsJtaqLtF\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"3ju5:~IFile.deleteIfExists()\" resolve=\"deleteIfExists\" />\n+ </node>\n</node>\n</node>\n</node>\n</node>\n</node>\n</node>\n- <node concept=\"3clFbF\" id=\"32pQaarbChZ\" role=\"3cqZAp\">\n- <node concept=\"2OqwBi\" id=\"32pQaarbCi0\" role=\"3clFbG\">\n- <node concept=\"10M0yZ\" id=\"32pQaarbCi1\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" to=\"wyt6:~System.out\" resolve=\"out\" />\n- <ref role=\"1PxDUh\" to=\"wyt6:~System\" resolve=\"System\" />\n- </node>\n- <node concept=\"liA8E\" id=\"32pQaarbCi2\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"guwi:~PrintStream.println(java.lang.String)\" resolve=\"println\" />\n- <node concept=\"3cpWs3\" id=\"32pQaarcxpi\" role=\"37wK5m\">\n- <node concept=\"37vLTw\" id=\"32pQaarcyIn\" role=\"3uHU7w\">\n- <ref role=\"3cqZAo\" node=\"5Ns9HDw2a95\" resolve=\"inCheckoutMode\" />\n- </node>\n- <node concept=\"3cpWs3\" id=\"32pQaarcvZc\" role=\"3uHU7B\">\n- <node concept=\"3cpWs3\" id=\"32pQaarbCi3\" role=\"3uHU7B\">\n- <node concept=\"Xl_RD\" id=\"32pQaarbCi7\" role=\"3uHU7B\">\n- <property role=\"Xl_RC\" value=\"the output folder exists now? \" />\n- </node>\n- <node concept=\"2OqwBi\" id=\"32pQaarbCi4\" role=\"3uHU7w\">\n- <node concept=\"37vLTw\" id=\"32pQaarbCi5\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"1OzsJtaqLvM\" resolve=\"outputFolder\" />\n- </node>\n- <node concept=\"liA8E\" id=\"32pQaarbCi6\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"3ju5:~IFile.exists()\" resolve=\"exists\" />\n- </node>\n- </node>\n- </node>\n- <node concept=\"Xl_RD\" id=\"32pQaarcwcL\" role=\"3uHU7w\">\n- <property role=\"Xl_RC\" value=\". Checkout mode? \" />\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n<node concept=\"3clFbH\" id=\"1OzsJtaqLtI\" role=\"3cqZAp\" />\n<node concept=\"3cpWs8\" id=\"1OzsJtaqLtJ\" role=\"3cqZAp\">\n<node concept=\"3cpWsn\" id=\"1OzsJtaqLtK\" role=\"3cpWs9\">\n<node concept=\"1bVj0M\" id=\"1OzsJtaqLv7\" role=\"37wK5m\">\n<property role=\"3yWfEV\" value=\"true\" />\n<node concept=\"3clFbS\" id=\"1OzsJtaqLv8\" role=\"1bW5cS\">\n- <node concept=\"abc8K\" id=\"32pQaar4rjr\" role=\"3cqZAp\">\n- <node concept=\"Xl_RD\" id=\"32pQaar4s2f\" role=\"abp_N\">\n- <property role=\"Xl_RC\" value=\"Using the cool PrefetchCache\" />\n- </node>\n- </node>\n<node concept=\"3clFbF\" id=\"kXPgTlgPtP\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"kXPgTlgQl1\" role=\"3clFbG\">\n<node concept=\"10M0yZ\" id=\"kXPgTlgPTv\" role=\"2Oq$k0\">\n</node>\n</node>\n<node concept=\"2tJIrI\" id=\"7PLbr3VI$7P\" role=\"jymVt\" />\n- <node concept=\"2tJIrI\" id=\"32pQaarcZpI\" role=\"jymVt\" />\n<node concept=\"3clFb_\" id=\"32pQaard8uf\" role=\"jymVt\">\n<property role=\"TrG5h\" value=\"ensureDeletion\" />\n<node concept=\"3clFbS\" id=\"32pQaard8ui\" role=\"3clF47\">\n<ref role=\"3uigEE\" to=\"3ju5:~IFile\" resolve=\"IFile\" />\n</node>\n</node>\n+ <node concept=\"P$JXv\" id=\"5mIc0gCq$Rg\" role=\"lGtFl\">\n+ <node concept=\"TZ5HA\" id=\"5mIc0gCq$Rh\" role=\"TZ5H$\">\n+ <node concept=\"1dT_AC\" id=\"5mIc0gCq$Ri\" role=\"1dT_Ay\">\n+ <property role=\"1dT_AB\" value=\"We experienced issues with physical and virtual files being out of sync.\" />\n+ </node>\n+ </node>\n+ <node concept=\"TZ5HA\" id=\"5mIc0gCqD2P\" role=\"TZ5H$\">\n+ <node concept=\"1dT_AC\" id=\"5mIc0gCqD2Q\" role=\"1dT_Ay\">\n+ <property role=\"1dT_AB\" value=\"This method ensure that files are deleted, recursively both on the virtual filesystem and the physical filesystem\" />\n+ </node>\n+ </node>\n+ </node>\n</node>\n<node concept=\"2tJIrI\" id=\"5mIc0gCmfBC\" role=\"jymVt\" />\n<node concept=\"3clFb_\" id=\"5mIc0gCmM3I\" role=\"jymVt\">\n</node>\n</node>\n</node>\n- <node concept=\"3clFbH\" id=\"5mIc0gCnckr\" role=\"3cqZAp\" />\n- <node concept=\"1X3_iC\" id=\"5mIc0gCnhAP\" role=\"lGtFl\">\n- <property role=\"3V$3am\" value=\"statement\" />\n- <property role=\"3V$3ak\" value=\"f3061a53-9226-4cc5-a443-f952ceaf5816/1068580123136/1068581517665\" />\n- <node concept=\"3clFbF\" id=\"5mIc0gCmVch\" role=\"8Wnug\">\n- <node concept=\"2OqwBi\" id=\"5mIc0gCmVci\" role=\"3clFbG\">\n- <node concept=\"37vLTw\" id=\"5mIc0gCn0CE\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"5mIc0gCmQ$A\" resolve=\"virtualDir\" />\n- </node>\n- <node concept=\"liA8E\" id=\"5mIc0gCmVck\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"3ju5:~IFile.deleteIfExists()\" resolve=\"deleteIfExists\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"1X3_iC\" id=\"5mIc0gCnhAQ\" role=\"lGtFl\">\n- <property role=\"3V$3am\" value=\"statement\" />\n- <property role=\"3V$3ak\" value=\"f3061a53-9226-4cc5-a443-f952ceaf5816/1068580123136/1068581517665\" />\n- <node concept=\"3cpWs8\" id=\"5mIc0gCmVcl\" role=\"8Wnug\">\n- <node concept=\"3cpWsn\" id=\"5mIc0gCmVcm\" role=\"3cpWs9\">\n- <property role=\"TrG5h\" value=\"physicalDir\" />\n- <node concept=\"3uibUv\" id=\"5mIc0gCmVcn\" role=\"1tU5fm\">\n- <ref role=\"3uigEE\" to=\"guwi:~File\" resolve=\"File\" />\n- </node>\n- <node concept=\"2ShNRf\" id=\"5mIc0gCmVcq\" role=\"33vP2m\">\n- <node concept=\"1pGfFk\" id=\"5mIc0gCmVcr\" role=\"2ShVmc\">\n- <ref role=\"37wK5l\" to=\"guwi:~File.<init>(java.lang.String)\" resolve=\"File\" />\n- <node concept=\"2OqwBi\" id=\"5mIc0gCmVcs\" role=\"37wK5m\">\n- <node concept=\"37vLTw\" id=\"5mIc0gCn1Eg\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"5mIc0gCmQ$A\" resolve=\"virtualDir\" />\n- </node>\n- <node concept=\"liA8E\" id=\"5mIc0gCmVcu\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"3ju5:~IFile.getPath()\" resolve=\"getPath\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"1X3_iC\" id=\"5mIc0gCnhAR\" role=\"lGtFl\">\n- <property role=\"3V$3am\" value=\"statement\" />\n- <property role=\"3V$3ak\" value=\"f3061a53-9226-4cc5-a443-f952ceaf5816/1068580123136/1068581517665\" />\n- <node concept=\"3clFbJ\" id=\"5mIc0gCmVcw\" role=\"8Wnug\">\n- <node concept=\"3clFbS\" id=\"5mIc0gCmVcx\" role=\"3clFbx\">\n- <node concept=\"2Gpval\" id=\"5mIc0gCmVcy\" role=\"3cqZAp\">\n- <node concept=\"2GrKxI\" id=\"5mIc0gCmVcz\" role=\"2Gsz3X\">\n- <property role=\"TrG5h\" value=\"file\" />\n- </node>\n- <node concept=\"2OqwBi\" id=\"5mIc0gCmVc$\" role=\"2GsD0m\">\n- <node concept=\"37vLTw\" id=\"5mIc0gCmVc_\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"5mIc0gCmVcm\" resolve=\"physicalDir\" />\n- </node>\n- <node concept=\"liA8E\" id=\"5mIc0gCmVcA\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"guwi:~File.listFiles()\" resolve=\"listFiles\" />\n- </node>\n- </node>\n- <node concept=\"3clFbS\" id=\"5mIc0gCmVcB\" role=\"2LFqv$\">\n- <node concept=\"3clFbF\" id=\"5mIc0gCmVcC\" role=\"3cqZAp\">\n- <node concept=\"1rXfSq\" id=\"5mIc0gCmVcD\" role=\"3clFbG\">\n- <ref role=\"37wK5l\" node=\"32pQaard8uf\" resolve=\"ensureDeletion\" />\n- <node concept=\"2GrUjf\" id=\"5mIc0gCmVcE\" role=\"37wK5m\">\n- <ref role=\"2Gs0qQ\" node=\"5mIc0gCmVcz\" resolve=\"file\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"2OqwBi\" id=\"5mIc0gCmVcF\" role=\"3clFbw\">\n- <node concept=\"37vLTw\" id=\"5mIc0gCmVcG\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"5mIc0gCmVcm\" resolve=\"physicalDir\" />\n- </node>\n- <node concept=\"liA8E\" id=\"5mIc0gCmVcH\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"guwi:~File.exists()\" resolve=\"exists\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"1X3_iC\" id=\"5mIc0gCnhAS\" role=\"lGtFl\">\n- <property role=\"3V$3am\" value=\"statement\" />\n- <property role=\"3V$3ak\" value=\"f3061a53-9226-4cc5-a443-f952ceaf5816/1068580123136/1068581517665\" />\n- <node concept=\"3clFbJ\" id=\"5mIc0gCmVcI\" role=\"8Wnug\">\n- <node concept=\"3clFbS\" id=\"5mIc0gCmVcJ\" role=\"3clFbx\">\n- <node concept=\"3clFbF\" id=\"5mIc0gCmVcK\" role=\"3cqZAp\">\n- <node concept=\"2OqwBi\" id=\"5mIc0gCmVcL\" role=\"3clFbG\">\n- <node concept=\"37vLTw\" id=\"5mIc0gCmVcM\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"5mIc0gCmVcm\" resolve=\"physicalDir\" />\n- </node>\n- <node concept=\"liA8E\" id=\"5mIc0gCmVcN\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"guwi:~File.mkdirs()\" resolve=\"mkdirs\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"3fqX7Q\" id=\"5mIc0gCmVcO\" role=\"3clFbw\">\n- <node concept=\"2OqwBi\" id=\"5mIc0gCmVcP\" role=\"3fr31v\">\n- <node concept=\"37vLTw\" id=\"5mIc0gCmVcQ\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"5mIc0gCmVcm\" resolve=\"physicalDir\" />\n- </node>\n- <node concept=\"liA8E\" id=\"5mIc0gCmVcR\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"guwi:~File.exists()\" resolve=\"exists\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n</node>\n<node concept=\"3Tm6S6\" id=\"5mIc0gCmF0F\" role=\"1B3o_S\" />\n<node concept=\"3cqZAl\" id=\"5mIc0gCmJZK\" role=\"3clF45\" />\n</node>\n<node concept=\"3clFbJ\" id=\"5Ns9HDw2nqK\" role=\"3cqZAp\">\n<node concept=\"3clFbS\" id=\"5Ns9HDw2nqM\" role=\"3clFbx\">\n- <node concept=\"abc8K\" id=\"32pQaarbFwO\" role=\"3cqZAp\">\n- <node concept=\"Xl_RD\" id=\"32pQaarbFIS\" role=\"abp_N\">\n- <property role=\"Xl_RC\" value=\"ensuring output folder does not exist: \" />\n- </node>\n- <node concept=\"2OqwBi\" id=\"32pQaarbHmq\" role=\"abp_N\">\n- <node concept=\"37vLTw\" id=\"32pQaarbGtg\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"27OZ2T4lRsK\" resolve=\"outputFolder\" />\n- </node>\n- <node concept=\"liA8E\" id=\"32pQaarbI1U\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"3ju5:~IFile.getPath()\" resolve=\"getPath\" />\n- </node>\n- </node>\n- </node>\n<node concept=\"3clFbF\" id=\"29etMtbjRne\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"29etMtbjVBa\" role=\"3clFbG\">\n<node concept=\"37vLTw\" id=\"27OZ2T4lUU4\" role=\"2Oq$k0\">\n</node>\n</node>\n</node>\n- <node concept=\"abc8K\" id=\"32pQaarbIxp\" role=\"3cqZAp\">\n- <node concept=\"Xl_RD\" id=\"32pQaarbIJM\" role=\"abp_N\">\n- <property role=\"Xl_RC\" value=\"does exist now? \" />\n- </node>\n- <node concept=\"2OqwBi\" id=\"32pQaarbK5s\" role=\"abp_N\">\n- <node concept=\"37vLTw\" id=\"32pQaarbJci\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"27OZ2T4lRsK\" resolve=\"outputFolder\" />\n- </node>\n- <node concept=\"liA8E\" id=\"32pQaarbKLY\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"3ju5:~IFile.exists()\" resolve=\"exists\" />\n- </node>\n- </node>\n- </node>\n</node>\n<node concept=\"3fqX7Q\" id=\"5Ns9HDw2oDn\" role=\"3clFbw\">\n<node concept=\"37vLTw\" id=\"5Ns9HDw2pPV\" role=\"3fr31v\">\n</node>\n</node>\n</node>\n- <node concept=\"abc8K\" id=\"32pQaardrwn\" role=\"3cqZAp\">\n- <node concept=\"Xl_RD\" id=\"32pQaardtWy\" role=\"abp_N\">\n- <property role=\"Xl_RC\" value=\"Creating model \" />\n- </node>\n- <node concept=\"37vLTw\" id=\"32pQaardFu2\" role=\"abp_N\">\n- <ref role=\"3cqZAo\" node=\"3BReYNsHt6m\" resolve=\"sModelName\" />\n- </node>\n- </node>\n<node concept=\"3cpWs8\" id=\"3BReYNsIpSg\" role=\"3cqZAp\">\n<node concept=\"3cpWsn\" id=\"3BReYNsIpSh\" role=\"3cpWs9\">\n<property role=\"TrG5h\" value=\"imposedModelID\" />\n<node concept=\"3cqZAl\" id=\"4_k_9wJ_0eg\" role=\"3clF45\" />\n<node concept=\"3Tm1VV\" id=\"4_k_9wJ_0eh\" role=\"1B3o_S\" />\n<node concept=\"3clFbS\" id=\"4_k_9wJ_0ei\" role=\"3clF47\">\n- <node concept=\"abc8K\" id=\"32pQaar46jM\" role=\"3cqZAp\">\n- <node concept=\"Xl_RD\" id=\"32pQaar46ZX\" role=\"abp_N\">\n- <property role=\"Xl_RC\" value=\"Model Synchronizer, syncModelToMps \" />\n- </node>\n- <node concept=\"2OqwBi\" id=\"32pQaar49h7\" role=\"abp_N\">\n- <node concept=\"37vLTw\" id=\"32pQaar48nT\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"4_k_9wJ_0dg\" resolve=\"model\" />\n- </node>\n- <node concept=\"liA8E\" id=\"32pQaar4b8f\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"mhbf:~SModel.getModelName()\" resolve=\"getModelName\" />\n- </node>\n- </node>\n- </node>\n<node concept=\"3clFbF\" id=\"4_k_9wJ_0ej\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"4_k_9wJ_0ek\" role=\"3clFbG\">\n<node concept=\"liA8E\" id=\"4_k_9wJ_0el\" role=\"2OqNvi\">\n<ref role=\"3cqZAo\" node=\"4_k_9wJ_0ee\" resolve=\"withInitialRemoval\" />\n</node>\n</node>\n- <node concept=\"abc8K\" id=\"32pQaar4bUa\" role=\"3cqZAp\">\n- <node concept=\"Xl_RD\" id=\"32pQaar4cA4\" role=\"abp_N\">\n- <property role=\"Xl_RC\" value=\"about to prefetch\" />\n- </node>\n- </node>\n<node concept=\"3clFbF\" id=\"bErqUx3Lhc\" role=\"3cqZAp\">\n<node concept=\"1rXfSq\" id=\"bErqUx3Lha\" role=\"3clFbG\">\n<ref role=\"37wK5l\" node=\"bErqUx3kqW\" resolve=\"prefetchModelContent\" />\n</node>\n</node>\n</node>\n- <node concept=\"abc8K\" id=\"32pQaar4e$R\" role=\"3cqZAp\">\n- <node concept=\"Xl_RD\" id=\"32pQaar4fgN\" role=\"abp_N\">\n- <property role=\"Xl_RC\" value=\"prefetch completed\" />\n- </node>\n- </node>\n<node concept=\"3clFbF\" id=\"4_k_9wJ_0f1\" role=\"3cqZAp\">\n<node concept=\"1rXfSq\" id=\"4_k_9wJ_0f2\" role=\"3clFbG\">\n<ref role=\"37wK5l\" node=\"4_k_9wJ_0uZ\" resolve=\"syncChildrenToMPS\" />\n</node>\n</node>\n</node>\n- <node concept=\"3clFbH\" id=\"32pQaar4gfc\" role=\"3cqZAp\" />\n<node concept=\"3SKdUt\" id=\"4_k_9wJ_0Ok\" role=\"3cqZAp\">\n<node concept=\"1PaTwC\" id=\"4_k_9wJ_0Ol\" role=\"1aUNEU\">\n<node concept=\"3oM_SD\" id=\"4_k_9wJ_0Om\" role=\"1PaTwD\">\n</node>\n</node>\n</node>\n- <node concept=\"3clFbJ\" id=\"32pQaar847A\" role=\"3cqZAp\">\n- <node concept=\"3clFbS\" id=\"32pQaar847C\" role=\"3clFbx\">\n- <node concept=\"1X3_iC\" id=\"1MKNcGA0458\" role=\"lGtFl\">\n- <property role=\"3V$3am\" value=\"statement\" />\n- <property role=\"3V$3ak\" value=\"f3061a53-9226-4cc5-a443-f952ceaf5816/1068580123136/1068581517665\" />\n- <node concept=\"YS8fn\" id=\"32pQaar8VpA\" role=\"8Wnug\">\n- <node concept=\"2ShNRf\" id=\"32pQaar8VpB\" role=\"YScLw\">\n- <node concept=\"1pGfFk\" id=\"32pQaar8VpC\" role=\"2ShVmc\">\n- <ref role=\"37wK5l\" to=\"wyt6:~RuntimeException.<init>(java.lang.String)\" resolve=\"RuntimeException\" />\n- <node concept=\"3cpWs3\" id=\"32pQaar9ctX\" role=\"37wK5m\">\n- <node concept=\"37vLTw\" id=\"32pQaar9f2h\" role=\"3uHU7w\">\n- <ref role=\"3cqZAo\" node=\"4_k_9wJ_0NV\" resolve=\"nodeId\" />\n- </node>\n- <node concept=\"3cpWs3\" id=\"32pQaar99vW\" role=\"3uHU7B\">\n- <node concept=\"3cpWs3\" id=\"32pQaar94lX\" role=\"3uHU7B\">\n- <node concept=\"3cpWs3\" id=\"32pQaar93cl\" role=\"3uHU7B\">\n- <node concept=\"3cpWs3\" id=\"32pQaar8VpD\" role=\"3uHU7B\">\n- <node concept=\"Xl_RD\" id=\"32pQaar8VpF\" role=\"3uHU7B\">\n- <property role=\"Xl_RC\" value=\"Concept producer returned an interface concept and not a concept: \" />\n- </node>\n- <node concept=\"2OqwBi\" id=\"32pQaar8Z26\" role=\"3uHU7w\">\n- <node concept=\"1eOMI4\" id=\"32pQaar8XWZ\" role=\"2Oq$k0\">\n- <node concept=\"10QFUN\" id=\"32pQaar8XWW\" role=\"1eOMHV\">\n- <node concept=\"3uibUv\" id=\"32pQaar8YAg\" role=\"10QFUM\">\n- <ref role=\"3uigEE\" to=\"c17a:~SInterfaceConcept\" resolve=\"SInterfaceConcept\" />\n- </node>\n- <node concept=\"37vLTw\" id=\"32pQaar8XX1\" role=\"10QFUP\">\n- <ref role=\"3cqZAo\" node=\"32pQaar80at\" resolve=\"rawConcept\" />\n- </node>\n- </node>\n- </node>\n- <node concept=\"liA8E\" id=\"32pQaar8ZtK\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"c17a:~SAbstractConcept.getQualifiedName()\" resolve=\"getQualifiedName\" />\n- </node>\n- </node>\n- </node>\n- <node concept=\"Xl_RD\" id=\"32pQaar93We\" role=\"3uHU7w\">\n- <property role=\"Xl_RC\" value=\" in model \" />\n- </node>\n- </node>\n- <node concept=\"2OqwBi\" id=\"32pQaar97HF\" role=\"3uHU7w\">\n- <node concept=\"37vLTw\" id=\"32pQaar95Ev\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"4_k_9wJ_0dg\" resolve=\"model\" />\n- </node>\n- <node concept=\"liA8E\" id=\"32pQaar99bC\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"mhbf:~SModel.getName()\" resolve=\"getName\" />\n- </node>\n- </node>\n- </node>\n- <node concept=\"Xl_RD\" id=\"32pQaar9bwg\" role=\"3uHU7w\">\n- <property role=\"Xl_RC\" value=\" Node ID: \" />\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"3SKdUt\" id=\"1MKNcGA06jE\" role=\"3cqZAp\">\n- <node concept=\"1PaTwC\" id=\"1MKNcGA06jF\" role=\"1aUNEU\">\n- <node concept=\"3oM_SD\" id=\"1MKNcGA06jG\" role=\"1PaTwD\">\n- <property role=\"3oM_SC\" value=\"For\" />\n- </node>\n- <node concept=\"3oM_SD\" id=\"1MKNcGA06mn\" role=\"1PaTwD\">\n- <property role=\"3oM_SC\" value=\"the\" />\n- </node>\n- <node concept=\"3oM_SD\" id=\"1MKNcGA06mq\" role=\"1PaTwD\">\n- <property role=\"3oM_SC\" value=\"time\" />\n- </node>\n- <node concept=\"3oM_SD\" id=\"1MKNcGA06mu\" role=\"1PaTwD\">\n- <property role=\"3oM_SC\" value=\"being\" />\n- </node>\n- <node concept=\"3oM_SD\" id=\"1MKNcGA06mz\" role=\"1PaTwD\">\n- <property role=\"3oM_SC\" value=\"we\" />\n- </node>\n- <node concept=\"3oM_SD\" id=\"1MKNcGA06mD\" role=\"1PaTwD\">\n- <property role=\"3oM_SC\" value=\"do\" />\n- </node>\n- <node concept=\"3oM_SD\" id=\"1MKNcGA06oX\" role=\"1PaTwD\">\n- <property role=\"3oM_SC\" value=\"not\" />\n- </node>\n- <node concept=\"3oM_SD\" id=\"1MKNcGA06p5\" role=\"1PaTwD\">\n- <property role=\"3oM_SC\" value=\"instantiate\" />\n- </node>\n- <node concept=\"3oM_SD\" id=\"1MKNcGA06rq\" role=\"1PaTwD\">\n- <property role=\"3oM_SC\" value=\"the\" />\n- </node>\n- <node concept=\"3oM_SD\" id=\"1MKNcGA06r$\" role=\"1PaTwD\">\n- <property role=\"3oM_SC\" value=\"node\" />\n- </node>\n- </node>\n- </node>\n- <node concept=\"3SKdUt\" id=\"1MKNcGA09xm\" role=\"3cqZAp\">\n- <node concept=\"1PaTwC\" id=\"1MKNcGA09xn\" role=\"1aUNEU\">\n- <node concept=\"3oM_SD\" id=\"1MKNcGA09xo\" role=\"1PaTwD\">\n- <property role=\"3oM_SC\" value=\"Eventually\" />\n- </node>\n- <node concept=\"3oM_SD\" id=\"1MKNcGA09$f\" role=\"1PaTwD\">\n- <property role=\"3oM_SC\" value=\"this\" />\n- </node>\n- <node concept=\"3oM_SD\" id=\"1MKNcGA09$i\" role=\"1PaTwD\">\n- <property role=\"3oM_SC\" value=\"should\" />\n- </node>\n- <node concept=\"3oM_SD\" id=\"1MKNcGA09$m\" role=\"1PaTwD\">\n- <property role=\"3oM_SC\" value=\"be\" />\n- </node>\n- <node concept=\"3oM_SD\" id=\"1MKNcGA09$r\" role=\"1PaTwD\">\n- <property role=\"3oM_SC\" value=\"fixed\" />\n- </node>\n- <node concept=\"3oM_SD\" id=\"1MKNcGA09$x\" role=\"1PaTwD\">\n- <property role=\"3oM_SC\" value=\"as\" />\n- </node>\n- <node concept=\"3oM_SD\" id=\"1MKNcGA09$C\" role=\"1PaTwD\">\n- <property role=\"3oM_SC\" value=\"part\" />\n- </node>\n- <node concept=\"3oM_SD\" id=\"1MKNcGA09$K\" role=\"1PaTwD\">\n- <property role=\"3oM_SC\" value=\"of\" />\n- </node>\n- <node concept=\"3oM_SD\" id=\"1MKNcGA09Bg\" role=\"1PaTwD\">\n- <property role=\"3oM_SC\" value=\"https://github.com/modelix/modelix/issues/149\" />\n- </node>\n- </node>\n- </node>\n<node concept=\"3cpWs8\" id=\"1MKNcGA2kUm\" role=\"3cqZAp\">\n<node concept=\"3cpWsn\" id=\"1MKNcGA2kUn\" role=\"3cpWs9\">\n<property role=\"TrG5h\" value=\"c\" />\n<node concept=\"3uibUv\" id=\"1MKNcGA2kUo\" role=\"1tU5fm\">\n<ref role=\"3uigEE\" to=\"c17a:~SConcept\" resolve=\"SConcept\" />\n</node>\n- <node concept=\"2YIFZM\" id=\"1MKNcGA2nx2\" role=\"33vP2m\">\n+ </node>\n+ </node>\n+ <node concept=\"3clFbJ\" id=\"32pQaar847A\" role=\"3cqZAp\">\n+ <node concept=\"3clFbS\" id=\"32pQaar847C\" role=\"3clFbx\">\n+ <node concept=\"3clFbF\" id=\"5mIc0gCq4oP\" role=\"3cqZAp\">\n+ <node concept=\"37vLTI\" id=\"5mIc0gCq4oR\" role=\"3clFbG\">\n+ <node concept=\"2YIFZM\" id=\"1MKNcGA2nx2\" role=\"37vLTx\">\n<ref role=\"37wK5l\" to=\"pjrh:~MetaAdapterByDeclaration.asInstanceConcept(org.jetbrains.mps.openapi.language.SAbstractConcept)\" resolve=\"asInstanceConcept\" />\n<ref role=\"1Pybhd\" to=\"pjrh:~MetaAdapterByDeclaration\" resolve=\"MetaAdapterByDeclaration\" />\n<node concept=\"1eOMI4\" id=\"1MKNcGA2oGH\" role=\"37wK5m\">\n</node>\n</node>\n</node>\n- </node>\n- </node>\n- <node concept=\"3clFbF\" id=\"1MKNcGA2s5o\" role=\"3cqZAp\">\n- <node concept=\"37vLTI\" id=\"1MKNcGA2s5p\" role=\"3clFbG\">\n- <node concept=\"37vLTw\" id=\"1MKNcGA2s5q\" role=\"37vLTJ\">\n- <ref role=\"3cqZAo\" node=\"4_k_9wJ_0MN\" resolve=\"node\" />\n- </node>\n- <node concept=\"2ShNRf\" id=\"1MKNcGA2s5r\" role=\"37vLTx\">\n- <node concept=\"1pGfFk\" id=\"1MKNcGA2s5s\" role=\"2ShVmc\">\n- <ref role=\"37wK5l\" to=\"w1kc:~SNode.<init>(org.jetbrains.mps.openapi.language.SConcept,org.jetbrains.mps.openapi.model.SNodeId)\" resolve=\"SNode\" />\n- <node concept=\"37vLTw\" id=\"1MKNcGA2s5t\" role=\"37wK5m\">\n+ <node concept=\"37vLTw\" id=\"5mIc0gCq4oV\" role=\"37vLTJ\">\n<ref role=\"3cqZAo\" node=\"1MKNcGA2kUn\" resolve=\"c\" />\n</node>\n- <node concept=\"37vLTw\" id=\"1MKNcGA2s5u\" role=\"37wK5m\">\n- <ref role=\"3cqZAo\" node=\"4_k_9wJ_0NV\" resolve=\"nodeId\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"3clFbF\" id=\"1MKNcGA2s5v\" role=\"3cqZAp\">\n- <node concept=\"1rXfSq\" id=\"1MKNcGA2s5w\" role=\"3clFbG\">\n- <ref role=\"37wK5l\" node=\"4_k_9wJ_0L5\" resolve=\"put\" />\n- <node concept=\"37vLTw\" id=\"1MKNcGA2s5x\" role=\"37wK5m\">\n- <ref role=\"3cqZAo\" node=\"4_k_9wJ_0ME\" resolve=\"id\" />\n- </node>\n- <node concept=\"37vLTw\" id=\"1MKNcGA2s5y\" role=\"37wK5m\">\n- <ref role=\"3cqZAo\" node=\"4_k_9wJ_0MN\" resolve=\"node\" />\n- </node>\n</node>\n</node>\n</node>\n</node>\n</node>\n<node concept=\"3clFbS\" id=\"32pQaar8aKc\" role=\"3eOfB_\">\n- <node concept=\"3cpWs8\" id=\"4_k_9wJ_0PI\" role=\"3cqZAp\">\n- <node concept=\"3cpWsn\" id=\"4_k_9wJ_0PJ\" role=\"3cpWs9\">\n- <property role=\"TrG5h\" value=\"c\" />\n- <node concept=\"3uibUv\" id=\"4_k_9wJ_0PK\" role=\"1tU5fm\">\n- <ref role=\"3uigEE\" to=\"c17a:~SConcept\" resolve=\"SConcept\" />\n- </node>\n- <node concept=\"10QFUN\" id=\"4_k_9wJ_0PL\" role=\"33vP2m\">\n+ <node concept=\"3clFbF\" id=\"5mIc0gCq6_P\" role=\"3cqZAp\">\n+ <node concept=\"37vLTI\" id=\"5mIc0gCq6_R\" role=\"3clFbG\">\n+ <node concept=\"10QFUN\" id=\"4_k_9wJ_0PL\" role=\"37vLTx\">\n<node concept=\"37vLTw\" id=\"32pQaar8fA3\" role=\"10QFUP\">\n<ref role=\"3cqZAo\" node=\"32pQaar80at\" resolve=\"rawConcept\" />\n</node>\n<ref role=\"3uigEE\" to=\"c17a:~SConcept\" resolve=\"SConcept\" />\n</node>\n</node>\n+ <node concept=\"37vLTw\" id=\"5mIc0gCq7V3\" role=\"37vLTJ\">\n+ <ref role=\"3cqZAo\" node=\"1MKNcGA2kUn\" resolve=\"c\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"9aQIb\" id=\"32pQaar8dlb\" role=\"9aQIa\">\n+ <node concept=\"3clFbS\" id=\"32pQaar8dlc\" role=\"9aQI4\">\n+ <node concept=\"YS8fn\" id=\"32pQaar8gj5\" role=\"3cqZAp\">\n+ <node concept=\"2ShNRf\" id=\"32pQaar8gRx\" role=\"YScLw\">\n+ <node concept=\"1pGfFk\" id=\"32pQaar8RGU\" role=\"2ShVmc\">\n+ <ref role=\"37wK5l\" to=\"wyt6:~RuntimeException.<init>(java.lang.String)\" resolve=\"RuntimeException\" />\n+ <node concept=\"3cpWs3\" id=\"32pQaar8U3u\" role=\"37wK5m\">\n+ <node concept=\"37vLTw\" id=\"32pQaar8Vgn\" role=\"3uHU7w\">\n+ <ref role=\"3cqZAo\" node=\"32pQaar80at\" resolve=\"rawConcept\" />\n+ </node>\n+ <node concept=\"Xl_RD\" id=\"32pQaar8SOa\" role=\"3uHU7B\">\n+ <property role=\"Xl_RC\" value=\"Concept producer returned something unexpected: \" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n</node>\n</node>\n<node concept=\"3clFbF\" id=\"4_k_9wJ_0PQ\" role=\"3cqZAp\">\n<node concept=\"2ShNRf\" id=\"4_k_9wJ_0PT\" role=\"37vLTx\">\n<node concept=\"1pGfFk\" id=\"4_k_9wJ_0PU\" role=\"2ShVmc\">\n<ref role=\"37wK5l\" to=\"w1kc:~SNode.<init>(org.jetbrains.mps.openapi.language.SConcept,org.jetbrains.mps.openapi.model.SNodeId)\" resolve=\"SNode\" />\n- <node concept=\"37vLTw\" id=\"4_k_9wJ_0PV\" role=\"37wK5m\">\n- <ref role=\"3cqZAo\" node=\"4_k_9wJ_0PJ\" resolve=\"c\" />\n+ <node concept=\"37vLTw\" id=\"5mIc0gCq8AR\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"1MKNcGA2kUn\" resolve=\"c\" />\n</node>\n<node concept=\"37vLTw\" id=\"4_k_9wJ_0PW\" role=\"37wK5m\">\n<ref role=\"3cqZAo\" node=\"4_k_9wJ_0NV\" resolve=\"nodeId\" />\n</node>\n</node>\n</node>\n- <node concept=\"9aQIb\" id=\"32pQaar8dlb\" role=\"9aQIa\">\n- <node concept=\"3clFbS\" id=\"32pQaar8dlc\" role=\"9aQI4\">\n- <node concept=\"YS8fn\" id=\"32pQaar8gj5\" role=\"3cqZAp\">\n- <node concept=\"2ShNRf\" id=\"32pQaar8gRx\" role=\"YScLw\">\n- <node concept=\"1pGfFk\" id=\"32pQaar8RGU\" role=\"2ShVmc\">\n- <ref role=\"37wK5l\" to=\"wyt6:~RuntimeException.<init>(java.lang.String)\" resolve=\"RuntimeException\" />\n- <node concept=\"3cpWs3\" id=\"32pQaar8U3u\" role=\"37wK5m\">\n- <node concept=\"37vLTw\" id=\"32pQaar8Vgn\" role=\"3uHU7w\">\n- <ref role=\"3cqZAo\" node=\"32pQaar80at\" resolve=\"rawConcept\" />\n- </node>\n- <node concept=\"Xl_RD\" id=\"32pQaar8SOa\" role=\"3uHU7B\">\n- <property role=\"Xl_RC\" value=\"Concept producer returned something unexpected: \" />\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n</node>\n<node concept=\"3clFbC\" id=\"4_k_9wJ_0Q1\" role=\"3clFbw\">\n<node concept=\"10Nm6u\" id=\"4_k_9wJ_0Q2\" role=\"3uHU7w\" />\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | cleaning code in MPSPlugin |
426,504 | 13.01.2022 12:05:42 | -3,600 | a98109ee4236ed521cc559a8b88522e3dcdd21b3 | removing unnecessary async call | [
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"diff": "</node>\n<node concept=\"3clFbJ\" id=\"18La5_pa_Tn\" role=\"3cqZAp\">\n<node concept=\"3clFbS\" id=\"18La5_pa_Tp\" role=\"3clFbx\">\n- <node concept=\"3cpWs8\" id=\"1MKNcGA4HIX\" role=\"3cqZAp\">\n- <node concept=\"3cpWsn\" id=\"1MKNcGA4HIY\" role=\"3cpWs9\">\n- <property role=\"TrG5h\" value=\"res\" />\n- <property role=\"3TUv4t\" value=\"true\" />\n- <node concept=\"3uibUv\" id=\"1MKNcGA4HIZ\" role=\"1tU5fm\">\n- <ref role=\"3uigEE\" to=\"yzht:~AsyncPromise\" resolve=\"AsyncPromise\" />\n- <node concept=\"3uibUv\" id=\"1MKNcGA4HJ0\" role=\"11_B2D\">\n- <ref role=\"3uigEE\" to=\"wyt6:~Object\" resolve=\"Object\" />\n- </node>\n- </node>\n- <node concept=\"2ShNRf\" id=\"1MKNcGA4HJ1\" role=\"33vP2m\">\n- <node concept=\"1pGfFk\" id=\"1MKNcGA4HJ2\" role=\"2ShVmc\">\n- <ref role=\"37wK5l\" to=\"yzht:~AsyncPromise.<init>()\" resolve=\"AsyncPromise\" />\n- <node concept=\"3uibUv\" id=\"1MKNcGA4HJ3\" role=\"1pMfVU\">\n- <ref role=\"3uigEE\" to=\"wyt6:~Object\" resolve=\"Object\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"3clFbF\" id=\"1MKNcGA4K2F\" role=\"3cqZAp\">\n- <node concept=\"2YIFZM\" id=\"1MKNcGA4Kbc\" role=\"3clFbG\">\n- <ref role=\"37wK5l\" to=\"3a50:~ThreadUtils.runInUIThreadNoWait(java.lang.Runnable)\" resolve=\"runInUIThreadNoWait\" />\n- <ref role=\"1Pybhd\" to=\"3a50:~ThreadUtils\" resolve=\"ThreadUtils\" />\n- <node concept=\"2ShNRf\" id=\"1MKNcGA4Kqq\" role=\"37wK5m\">\n- <node concept=\"YeOm9\" id=\"1MKNcGA5m9Z\" role=\"2ShVmc\">\n- <node concept=\"1Y3b0j\" id=\"1MKNcGA5ma2\" role=\"YeSDq\">\n- <property role=\"2bfB8j\" value=\"true\" />\n- <ref role=\"1Y3XeK\" to=\"wyt6:~Runnable\" resolve=\"Runnable\" />\n- <ref role=\"37wK5l\" to=\"wyt6:~Object.<init>()\" resolve=\"Object\" />\n- <node concept=\"3Tm1VV\" id=\"1MKNcGA5ma3\" role=\"1B3o_S\" />\n- <node concept=\"3clFb_\" id=\"1MKNcGA5ma8\" role=\"jymVt\">\n- <property role=\"TrG5h\" value=\"run\" />\n- <node concept=\"3Tm1VV\" id=\"1MKNcGA5ma9\" role=\"1B3o_S\" />\n- <node concept=\"3cqZAl\" id=\"1MKNcGA5mab\" role=\"3clF45\" />\n- <node concept=\"3clFbS\" id=\"1MKNcGA5mac\" role=\"3clF47\">\n<node concept=\"3cpWs8\" id=\"1MKNcGA0ogc\" role=\"3cqZAp\">\n<node concept=\"3cpWsn\" id=\"1MKNcGA0ogd\" role=\"3cpWs9\">\n<property role=\"TrG5h\" value=\"modelsDirVirtual\" />\n</node>\n</node>\n</node>\n- <node concept=\"1X3_iC\" id=\"5mIc0gCo51K\" role=\"lGtFl\">\n- <property role=\"3V$3am\" value=\"statement\" />\n- <property role=\"3V$3ak\" value=\"f3061a53-9226-4cc5-a443-f952ceaf5816/1068580123136/1068581517665\" />\n- <node concept=\"3clFbF\" id=\"1MKNcGA0$oA\" role=\"8Wnug\">\n- <node concept=\"2OqwBi\" id=\"1MKNcGA0$Ki\" role=\"3clFbG\">\n- <node concept=\"37vLTw\" id=\"1MKNcGA0$o$\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"1MKNcGA0ogd\" resolve=\"modelsDirVirtual\" />\n- </node>\n- <node concept=\"liA8E\" id=\"1MKNcGA0$Sj\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"3ju5:~IFile.deleteIfExists()\" resolve=\"deleteIfExists\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"1X3_iC\" id=\"5mIc0gCo51M\" role=\"lGtFl\">\n- <property role=\"3V$3am\" value=\"statement\" />\n- <property role=\"3V$3ak\" value=\"f3061a53-9226-4cc5-a443-f952ceaf5816/1068580123136/1068581517665\" />\n- <node concept=\"3clFbJ\" id=\"32pQaarcVYL\" role=\"8Wnug\">\n- <node concept=\"3clFbS\" id=\"32pQaarcVYN\" role=\"3clFbx\">\n- <node concept=\"2Gpval\" id=\"32pQaarcYv0\" role=\"3cqZAp\">\n- <node concept=\"2GrKxI\" id=\"32pQaarcYv5\" role=\"2Gsz3X\">\n- <property role=\"TrG5h\" value=\"file\" />\n- </node>\n- <node concept=\"2OqwBi\" id=\"32pQaarcZg1\" role=\"2GsD0m\">\n- <node concept=\"37vLTw\" id=\"32pQaarcYV0\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"18La5_p9Rvi\" resolve=\"modelsDir\" />\n- </node>\n- <node concept=\"liA8E\" id=\"32pQaarcZiM\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"guwi:~File.listFiles()\" resolve=\"listFiles\" />\n- </node>\n- </node>\n- <node concept=\"3clFbS\" id=\"32pQaarcYvf\" role=\"2LFqv$\">\n- <node concept=\"3clFbF\" id=\"32pQaardgSx\" role=\"3cqZAp\">\n- <node concept=\"1rXfSq\" id=\"32pQaardgSw\" role=\"3clFbG\">\n- <ref role=\"37wK5l\" node=\"32pQaard8uf\" resolve=\"ensureDeletion\" />\n- <node concept=\"2GrUjf\" id=\"32pQaardhNG\" role=\"37wK5m\">\n- <ref role=\"2Gs0qQ\" node=\"32pQaarcYv5\" resolve=\"file\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"2OqwBi\" id=\"32pQaarcWPY\" role=\"3clFbw\">\n- <node concept=\"37vLTw\" id=\"32pQaarcWtD\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"18La5_p9Rvi\" resolve=\"modelsDir\" />\n- </node>\n- <node concept=\"liA8E\" id=\"32pQaarcWU4\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"guwi:~File.exists()\" resolve=\"exists\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"1X3_iC\" id=\"5mIc0gCo51N\" role=\"lGtFl\">\n- <property role=\"3V$3am\" value=\"statement\" />\n- <property role=\"3V$3ak\" value=\"f3061a53-9226-4cc5-a443-f952ceaf5816/1068580123136/1068581517665\" />\n- <node concept=\"3clFbJ\" id=\"18La5_paujq\" role=\"8Wnug\">\n- <node concept=\"3clFbS\" id=\"18La5_paujs\" role=\"3clFbx\">\n- <node concept=\"3clFbF\" id=\"18La5_pa$bZ\" role=\"3cqZAp\">\n- <node concept=\"2OqwBi\" id=\"18La5_pa$wS\" role=\"3clFbG\">\n- <node concept=\"37vLTw\" id=\"18La5_pa$bX\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"18La5_p9Rvi\" resolve=\"modelsDir\" />\n- </node>\n- <node concept=\"liA8E\" id=\"18La5_pa$Pw\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"guwi:~File.mkdirs()\" resolve=\"mkdirs\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"3fqX7Q\" id=\"18La5_payEX\" role=\"3clFbw\">\n- <node concept=\"2OqwBi\" id=\"18La5_payEZ\" role=\"3fr31v\">\n- <node concept=\"37vLTw\" id=\"18La5_payF0\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"18La5_p9Rvi\" resolve=\"modelsDir\" />\n- </node>\n- <node concept=\"liA8E\" id=\"18La5_payF1\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"guwi:~File.exists()\" resolve=\"exists\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"3cpWs8\" id=\"18La5_p9Rvh\" role=\"3cqZAp\">\n- <node concept=\"3cpWsn\" id=\"18La5_p9Rvi\" role=\"3cpWs9\">\n- <property role=\"TrG5h\" value=\"modelsDir\" />\n- <node concept=\"3uibUv\" id=\"18La5_p9Rvj\" role=\"1tU5fm\">\n- <ref role=\"3uigEE\" to=\"guwi:~File\" resolve=\"File\" />\n- </node>\n- <node concept=\"2ShNRf\" id=\"18La5_papZ6\" role=\"33vP2m\">\n- <node concept=\"1pGfFk\" id=\"18La5_paro7\" role=\"2ShVmc\">\n- <ref role=\"37wK5l\" to=\"guwi:~File.<init>(java.io.File,java.lang.String)\" resolve=\"File\" />\n- <node concept=\"2ShNRf\" id=\"18La5_p9T7U\" role=\"37wK5m\">\n- <node concept=\"1pGfFk\" id=\"18La5_papzc\" role=\"2ShVmc\">\n- <ref role=\"37wK5l\" to=\"guwi:~File.<init>(java.lang.String)\" resolve=\"File\" />\n- <node concept=\"2OqwBi\" id=\"18La5_p9Nni\" role=\"37wK5m\">\n- <node concept=\"37vLTw\" id=\"18La5_p9M44\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"18La5_p9Iuw\" resolve=\"solutionDir\" />\n- </node>\n- <node concept=\"liA8E\" id=\"18La5_p9OUn\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"3ju5:~IFile.getPath()\" resolve=\"getPath\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"Xl_RD\" id=\"18La5_parMB\" role=\"37wK5m\">\n- <property role=\"Xl_RC\" value=\"models\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"abc8K\" id=\"32pQaarbLcG\" role=\"3cqZAp\">\n- <node concept=\"Xl_RD\" id=\"32pQaarbLtb\" role=\"abp_N\">\n- <property role=\"Xl_RC\" value=\"the models dir should exist now. Does it exists? \" />\n- </node>\n- <node concept=\"2OqwBi\" id=\"32pQaarcDG4\" role=\"abp_N\">\n- <node concept=\"37vLTw\" id=\"32pQaarcDcw\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"18La5_p9Rvi\" resolve=\"modelsDir\" />\n- </node>\n- <node concept=\"liA8E\" id=\"32pQaarcDIM\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"guwi:~File.exists()\" resolve=\"exists\" />\n- </node>\n- </node>\n- <node concept=\"Xl_RD\" id=\"32pQaarcE3m\" role=\"abp_N\">\n- <property role=\"Xl_RC\" value=\" at \" />\n- </node>\n- <node concept=\"2OqwBi\" id=\"32pQaarcEL4\" role=\"abp_N\">\n- <node concept=\"37vLTw\" id=\"32pQaarcEvw\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"18La5_p9Rvi\" resolve=\"modelsDir\" />\n- </node>\n- <node concept=\"liA8E\" id=\"32pQaarcEO5\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"guwi:~File.getAbsolutePath()\" resolve=\"getAbsolutePath\" />\n- </node>\n- </node>\n- <node concept=\"Xl_RD\" id=\"32pQaardnpM\" role=\"abp_N\">\n- <property role=\"Xl_RC\" value=\". Number of children: \" />\n- </node>\n- <node concept=\"2OqwBi\" id=\"32pQaardomM\" role=\"abp_N\">\n- <node concept=\"2OqwBi\" id=\"32pQaardodU\" role=\"2Oq$k0\">\n- <node concept=\"37vLTw\" id=\"32pQaardnRn\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"18La5_p9Rvi\" resolve=\"modelsDir\" />\n- </node>\n- <node concept=\"liA8E\" id=\"32pQaardohm\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"guwi:~File.listFiles()\" resolve=\"listFiles\" />\n- </node>\n- </node>\n- <node concept=\"1Rwk04\" id=\"32pQaardoXK\" role=\"2OqNvi\" />\n- </node>\n- </node>\n- <node concept=\"3clFbF\" id=\"1MKNcGA5sv4\" role=\"3cqZAp\">\n- <node concept=\"2OqwBi\" id=\"1MKNcGA5tFv\" role=\"3clFbG\">\n- <node concept=\"37vLTw\" id=\"1MKNcGA5sv2\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"1MKNcGA4HIY\" resolve=\"res\" />\n- </node>\n- <node concept=\"liA8E\" id=\"1MKNcGA5uEv\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"yzht:~AsyncPromise.setResult(java.lang.Object)\" resolve=\"setResult\" />\n- <node concept=\"10Nm6u\" id=\"1MKNcGA5vp1\" role=\"37wK5m\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"2AHcQZ\" id=\"1MKNcGA5mae\" role=\"2AJF6D\">\n- <ref role=\"2AI5Lk\" to=\"wyt6:~Override\" resolve=\"Override\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"3clFbF\" id=\"1MKNcGA5pEp\" role=\"3cqZAp\">\n- <node concept=\"2OqwBi\" id=\"1MKNcGA5qCL\" role=\"3clFbG\">\n- <node concept=\"37vLTw\" id=\"1MKNcGA5pEn\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"1MKNcGA4HIY\" resolve=\"res\" />\n- </node>\n- <node concept=\"liA8E\" id=\"1MKNcGA5r_O\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"yzht:~AsyncPromise.get()\" resolve=\"get\" />\n- </node>\n- </node>\n- </node>\n</node>\n<node concept=\"37vLTw\" id=\"18La5_paDbS\" role=\"3clFbw\">\n<ref role=\"3cqZAo\" node=\"5Ns9HDw2a95\" resolve=\"inCheckoutMode\" />\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | removing unnecessary async call |
426,496 | 14.01.2022 09:45:50 | -3,600 | e6351c4f6738ce6ff59f70644847caa7d5a829a2 | More memory for the model server
It now runs the model client for generating the history page.
It was running out of memory sometimes. | [
{
"change_type": "MODIFY",
"old_path": "kubernetes/common/model-deployment.yaml",
"new_path": "kubernetes/common/model-deployment.yaml",
"diff": "@@ -40,10 +40,10 @@ spec:\nreadOnly: true\nresources:\nrequests:\n- memory: \"400Mi\"\n+ memory: \"800Mi\"\ncpu: \"0.1\"\nlimits:\n- memory: \"600Mi\"\n+ memory: \"800Mi\"\ncpu: \"1.0\"\nreadinessProbe:\nhttpGet:\n"
},
{
"change_type": "MODIFY",
"old_path": "model-server/run-model-server.sh",
"new_path": "model-server/run-model-server.sh",
"diff": "#!/bin/sh\n-java -XX:MaxRAMPercentage=85 -Djdbc.url=$jdbc_url -cp \"model-server/build/libs/*\" org.modelix.model.server.Main\n+java -XX:MaxRAMPercentage=75 -Djdbc.url=$jdbc_url -cp \"model-server/build/libs/*\" org.modelix.model.server.Main\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | More memory for the model server
It now runs the model client for generating the history page.
It was running out of memory sometimes. |
426,496 | 14.01.2022 11:48:24 | -3,600 | 0ecd68f060c2e4177e4f39e08773873083ec5a68 | Next attempt to fix the model server publication | [
{
"change_type": "MODIFY",
"old_path": "model-server/build.gradle",
"new_path": "model-server/build.gradle",
"diff": "@@ -64,28 +64,6 @@ jar {\n}\n}\n-task fatJar(type: Jar) {\n- manifest {\n- attributes 'Main-Class': 'org.modelix.model.server.Main'\n- }\n- archiveBaseName = 'model-server-fatJar'\n- archiveVersion = 'latest'\n- from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }\n- with jar\n-}\n-\n-shadowJar {\n- archiveBaseName.set('model-server-fatJar')\n- archiveClassifier.set('fatJar')\n- archiveVersion.set('latest')\n-}\n-\n-def fatJarFile = file(\"$buildDir/libs/model-server-fatJar-latest.jar\")\n-def fatJarArtifact = artifacts.add('archives', fatJarFile) {\n- type 'jar'\n- builtBy 'shadowJar'\n-}\n-\ntask cucumber() {\ndependsOn shadowJar, compileTestJava\ndoLast {\n@@ -135,12 +113,10 @@ publishing {\nfrom components.java\n}\n- modelServerFatJar(MavenPublication) {\n+ modelServerFatJar(MavenPublication) { publication ->\ngroupId project.group\n- artifactId 'model-server-fatjar'\nversion project.version\n-\n- artifact fatJarArtifact\n+ project.shadow.component(publication)\n}\n}\n}\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Next attempt to fix the model server publication |
426,496 | 14.01.2022 12:03:35 | -3,600 | 7ebd38eb2b7e8f60aca76d25150510a529a13c0c | Updated the path to the fatJar file | [
{
"change_type": "MODIFY",
"old_path": "manual-tests/module_based_usecases.md",
"new_path": "manual-tests/module_based_usecases.md",
"diff": "@@ -17,13 +17,13 @@ These tests are used to verify that these five use cases work as expected:\n* Start a model-server using in-memory storage. From the root of the project run:\n```\n-java -jar model-server/build/libs/model-server-fatJar-latest.jar -inmemory -port 8899\n+java -jar model-server/build/libs/model-server-latest-all.jar -inmemory -port 8899\n```\nIf the instructions specify to load a dump use this command:\n```\n-java -jar model-server/build/libs/model-server-fatJar-latest.jar -inmemory -dumpin <DUMP NAME> -port 8899\n+java -jar model-server/build/libs/model-server-latest-all.jar -inmemory -dumpin <DUMP NAME> -port 8899\n```\n"
},
{
"change_type": "MODIFY",
"old_path": "manual-tests/project_based_usecases.md",
"new_path": "manual-tests/project_based_usecases.md",
"diff": "@@ -17,13 +17,13 @@ These tests are used to verify that these five use cases work as expected:\n* Start a model-server using in-memory storage. From the root of the project run:\n```\n-java -jar model-server/build/libs/model-server-fatJar-latest.jar -inmemory -port 8899\n+java -jar model-server/build/libs/model-server-latest-all.jar -inmemory -port 8899\n```\nIf the instructions specify to load a dump use this command:\n```\n-java -jar model-server/build/libs/model-server-fatJar-latest.jar -inmemory -dumpin <DUMP NAME> -port 8899\n+java -jar model-server/build/libs/model-server-latest-all.jar -inmemory -dumpin <DUMP NAME> -port 8899\n```\n@@ -113,7 +113,7 @@ In that version open the project PBUC-2. I should see an existing solution.\nI start the modelix server with dump model-server-dump-MBUC-1 by running this command from the root of the project:\n```\n-java -jar model-server/build/libs/model-server-fatJar-latest.jar -inmemory -dumpin manual-tests/dump_with_a_project1 -port 8899\n+java -jar model-server/build/libs/model-server-latest-all.jar -inmemory -dumpin manual-tests/dump_with_a_project1 -port 8899\n```\n### Test execution\n"
},
{
"change_type": "MODIFY",
"old_path": "model-client/src/jvmTest/kotlin/org/modelix/model/ModelServerManager.kt",
"new_path": "model-client/src/jvmTest/kotlin/org/modelix/model/ModelServerManager.kt",
"diff": "@@ -75,7 +75,7 @@ class ModelServerManager {\n.map { e: Map.Entry<String, String> -> \" -set \" + e.key + \" \" + e.value }\n.collect(Collectors.joining())\nval commandLine = (\n- \"${System.getProperty(\"java.home\")}/bin/java -jar ../model-server/build/libs/model-server-fatJar-latest.jar -inmemory\" +\n+ \"${System.getProperty(\"java.home\")}/bin/java -jar ../model-server/build/libs/model-server-latest-all.jar -inmemory\" +\nargsToSetValues\n)\nprintln(\"commandLine \" + commandLine)\n"
},
{
"change_type": "MODIFY",
"old_path": "model-server/build.gradle",
"new_path": "model-server/build.gradle",
"diff": "@@ -86,6 +86,10 @@ application {\nmainClassName = \"org.modelix.model.server.Main\"\n}\n+shadowJar {\n+ archiveVersion.set('latest')\n+}\n+\npublishing {\nrepositories {\nmaven {\n"
},
{
"change_type": "MODIFY",
"old_path": "model-server/src/test/java/org/modelix/model/server/functionaltests/Stepdefs.java",
"new_path": "model-server/src/test/java/org/modelix/model/server/functionaltests/Stepdefs.java",
"diff": "@@ -107,7 +107,7 @@ public class Stepdefs {\n.map(e -> \" -set \" + e.getKey() + \" \" + e.getValue())\n.collect(Collectors.joining());\nString commandLine =\n- \"java -jar build/libs/model-server-fatJar-latest.jar -inmemory\"\n+ \"java -jar build/libs/model-server-latest-all.jar -inmemory\"\n+ argsToSetValues;\np = Runtime.getRuntime().exec(commandLine);\nBufferedReader stdInput = new BufferedReader(new InputStreamReader(p.getInputStream()));\n"
},
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.integrationtests/models/org.modelix.integrationtests.mps",
"new_path": "mps/org.modelix.integrationtests/models/org.modelix.integrationtests.mps",
"diff": "<ref role=\"3cqZAo\" node=\"5yNJPA6tJXu\" resolve=\"modelServerBuildLibsDir\" />\n</node>\n<node concept=\"Xl_RD\" id=\"5yNJPA6tLdv\" role=\"37wK5m\">\n- <property role=\"Xl_RC\" value=\"model-server-fatJar-latest.jar\" />\n+ <property role=\"Xl_RC\" value=\"model-server-latest-all.jar\" />\n</node>\n</node>\n</node>\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Updated the path to the fatJar file |
426,496 | 14.01.2022 12:42:11 | -3,600 | ecc7cb8743dc9621f05ddb4ada133359b67e7222 | Removed the non fat model-server publication
It's not used anyway and this also fixes the publishing issue. | [
{
"change_type": "MODIFY",
"old_path": "model-server/build.gradle",
"new_path": "model-server/build.gradle",
"diff": "@@ -129,12 +129,12 @@ publishing {\n}*/\n}\npublications {\n- modelServer(MavenPublication) {\n+/* modelServer(MavenPublication) {\ngroupId project.group\nversion project.version\nfrom components.java\n- }\n+ }*/\nmodelServerFatJar(MavenPublication) {\ngroupId project.group\nartifactId 'model-server-fatjar'\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Removed the non fat model-server publication
It's not used anyway and this also fixes the publishing issue. |
426,496 | 17.01.2022 20:27:27 | -3,600 | 45fb3702ecf41857f88cfe427ba6da9239aa9458 | On the history page there was a ") next to the revert button
This was accidentally left there after converting the code to kotlin. | [
{
"change_type": "MODIFY",
"old_path": "model-server/src/main/kotlin/org/modelix/model/server/HistoryHandler.kt",
"new_path": "model-server/src/main/kotlin/org/modelix/model/server/HistoryHandler.kt",
"diff": "@@ -278,7 +278,7 @@ class HistoryHandler(private val client: IModelClient) : AbstractHandler() {\nout.append(\"\"\"</td>\n<td>\n<form action='revert' method='POST'>\n- <input type='hidden' name='from' value='${escapeURL(latestVersion.hash)}'/>\")\n+ <input type='hidden' name='from' value='${escapeURL(latestVersion.hash)}'/>\n<input type='hidden' name='to' value='${escapeURL(version.hash)}'/>\n<input type='submit' value='Revert To'/>\n</form>\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | On the history page there was a ") next to the revert button
This was accidentally left there after converting the code to kotlin. |
426,504 | 19.01.2022 09:07:20 | -3,600 | 5d9b5fcf1d96893750aae30a2aa1f5ea7b384224 | clean gradle-plugin-test/build.gradle | [
{
"change_type": "MODIFY",
"old_path": "gradle-plugin-test/build.gradle",
"new_path": "gradle-plugin-test/build.gradle",
"diff": "buildscript {\nrepositories {\n+ mavenCentral()\nmaven { url 'https://projects.itemis.de/nexus/content/repositories/mbeddr' }\nmavenLocal()\n}\ndependencies {\n- classpath group: 'org.modelix', name: 'gradle-plugin', version: '0.0.30'\n+ classpath group: 'org.modelix', name: 'gradle-plugin', version: '2020.3.5-202112171217-SNAPSHOT'\n}\n}\n@@ -17,14 +18,47 @@ repositories {\napply plugin: 'modelix-gradle-plugin'\n-compileJava {\n- sourceCompatibility = '11'\n- targetCompatibility = '11'\n-}\n+\n+def artifactsDir = project.file(\"artifacts\")\n+def mpsDir = project.hasProperty('mpsPath') ? new File(project.property('mpsPath')) : new File(artifactsDir, 'mps')\n+def mpsExtensionsDir = new File(\"./artifacts/de.itemis.mps.extensions\")\n+def mbeddrDir = new File(\"./artifacts/com.mbeddr.platform\")\n+def modelixDir = new File(\"./modelix/plugins\")\n+def iets3Dir = new File(\"./artifacts/org.iets3.opensource\")\n+\n+def pluginsDirFromExtensions = [\n+ \"de.60.mps.libs\",\n+ \"de.q60.shadowmodels\",\n+ \"de.q60.shadowmodels.examples\",\n+ \"org.modelix.model.api\",\n+ \"mps-apache-commons\"]\nmodelixModel {\n- serverUrl = \"http://localhost:28101/\"\n- treeId = \"default\"\n- debug = false\n- timeout = 120\n+ serverUrl = \"https://mymodelserver.com\"\n+ repositoryId = \"repo3\"\n+ timeout = 1800\n+\n+ // MPS Extensions\n+ addLibraryDir(new File(\"${mpsExtensionsDir.getAbsolutePath()}/mps-apache-commons\"))\n+ addLibraryDir(new File(\"${mpsExtensionsDir.getAbsolutePath()}/de.60.mps.libs\"))\n+ addLibraryDir(new File(\"${mpsExtensionsDir.getAbsolutePath()}/de.q60.shadowmodels\"))\n+ addLibraryDir(new File(\"${mpsExtensionsDir.getAbsolutePath()}/org.modelix.model.api\"))\n+ addPlugin(\"${mpsExtensionsDir.getAbsolutePath()}/mps-apache-commons\", \"org.apache.commons\")\n+ addPlugin(\"${mpsExtensionsDir.getAbsolutePath()}/de.60.mps.libs\", \"de.q60.mps.libs\")\n+ addPlugin(\"${mpsExtensionsDir.getAbsolutePath()}/de.q60.shadowmodels\", \"de.q60.shadowmodels\")\n+ addPlugin(\"${mpsExtensionsDir.getAbsolutePath()}/org.modelix.model.api\", \"org.modelix.model.api\")\n+\n+ // Mbeddr platform\n+ addPluginDir(mbeddrDir, [\"org.modelix.model.api\"])\n+\n+ // Iets3\n+ addPluginDir(iets3Dir)\n+\n+ // Modelix\n+ addLibraryDir(new File(modelixDir, \"org.modelix.common\"))\n+ addLibraryDir(new File(modelixDir, \"org.modelix.model\"))\n+ addPluginDir(new File(modelixDir, \"org.modelix.common\"))\n+ addPluginDir(new File(modelixDir, \"org.modelix.model\"))\n+\n+ // Add languages specific for the project\n}\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | clean gradle-plugin-test/build.gradle |
426,504 | 19.01.2022 09:26:07 | -3,600 | 864476c135eb722de2d7cf42f67b390b971c437f | correct path to model server fatjar in ModelServerManager | [
{
"change_type": "MODIFY",
"old_path": "model-client/src/jvmTest/kotlin/org/modelix/model/ModelServerManager.kt",
"new_path": "model-client/src/jvmTest/kotlin/org/modelix/model/ModelServerManager.kt",
"diff": "@@ -2,6 +2,7 @@ package org.modelix.model\nimport com.google.common.base.Charsets\nimport java.io.BufferedReader\n+import java.io.File\nimport java.io.IOException\nimport java.io.InputStreamReader\nimport java.net.ConnectException\n@@ -74,11 +75,15 @@ class ModelServerManager {\nval argsToSetValues = presetValues.entries.stream()\n.map { e: Map.Entry<String, String> -> \" -set \" + e.key + \" \" + e.value }\n.collect(Collectors.joining())\n+ val modelServerJar = File(\"../model-server/build/libs/model-server-latest-fatJar.jar\")\n+ if (!modelServerJar.exists()) {\n+ throw RuntimeException(\"Cannot start Model Server as the JAR was not found at ${modelServerJar.absolutePath}\")\n+ }\nval commandLine = (\n- \"${System.getProperty(\"java.home\")}/bin/java -jar ../model-server/build/libs/model-server-fatJar-latest.jar -inmemory\" +\n+ \"${System.getProperty(\"java.home\")}/bin/java -jar ${modelServerJar.path} -inmemory\" +\nargsToSetValues\n)\n- println(\"commandLine \" + commandLine)\n+ println(\"commandLine: $commandLine\")\np = Runtime.getRuntime().exec(commandLine)\nval stdInput = BufferedReader(InputStreamReader(p!!.inputStream))\nval stdError = BufferedReader(InputStreamReader(p!!.errorStream))\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | correct path to model server fatjar in ModelServerManager |
426,504 | 19.01.2022 09:37:58 | -3,600 | e6f41b8213c1cc2bc5bae373804c4921d1aee837 | correct path to model server fatjar in integration and functional tests | [
{
"change_type": "MODIFY",
"old_path": "model-server/src/test/java/org/modelix/model/server/functionaltests/Stepdefs.java",
"new_path": "model-server/src/test/java/org/modelix/model/server/functionaltests/Stepdefs.java",
"diff": "@@ -28,6 +28,7 @@ import io.cucumber.java.en.When;\nimport io.cucumber.messages.internal.com.google.gson.JsonElement;\nimport io.cucumber.messages.internal.com.google.gson.JsonParser;\nimport java.io.BufferedReader;\n+import java.io.File;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.net.ConnectException;\n@@ -106,8 +107,12 @@ public class Stepdefs {\npresetValues.entrySet().stream()\n.map(e -> \" -set \" + e.getKey() + \" \" + e.getValue())\n.collect(Collectors.joining());\n+ File modelServerJar = new File(\"build/libs/model-server-latest-fatJar.jar\");\n+ if (!modelServerJar.exists()) {\n+ throw new RuntimeException(\"Model server jar not found at \" + modelServerJar.getAbsolutePath());\n+ }\nString commandLine =\n- \"java -jar build/libs/model-server-fatJar-latest.jar -inmemory\"\n+ \"java -jar \" + modelServerJar.getAbsolutePath() + \" -inmemory\"\n+ argsToSetValues;\np = Runtime.getRuntime().exec(commandLine);\nBufferedReader stdInput = new BufferedReader(new InputStreamReader(p.getInputStream()));\n"
},
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.integrationtests/models/org.modelix.integrationtests.mps",
"new_path": "mps/org.modelix.integrationtests/models/org.modelix.integrationtests.mps",
"diff": "<ref role=\"3cqZAo\" node=\"5yNJPA6tJXu\" resolve=\"modelServerBuildLibsDir\" />\n</node>\n<node concept=\"Xl_RD\" id=\"5yNJPA6tLdv\" role=\"37wK5m\">\n- <property role=\"Xl_RC\" value=\"model-server-fatJar-latest.jar\" />\n+ <property role=\"Xl_RC\" value=\"model-server-latest-fatJar.jar\" />\n</node>\n</node>\n</node>\n</node>\n<node concept=\"17R0WA\" id=\"4vX$i39b2dT\" role=\"3clFbw\">\n<node concept=\"10M0yZ\" id=\"4vX$i39bi4V\" role=\"3uHU7w\">\n- <ref role=\"1PxDUh\" to=\"csg2:4_k_9wJ_0cZ\" resolve=\"_ModelSynchronizer\" />\n+ <ref role=\"1PxDUh\" to=\"csg2:4_k_9wJ_0cZ\" resolve=\"ModelSynchronizer\" />\n<ref role=\"3cqZAo\" to=\"csg2:4_k_9wJ_0d6\" resolve=\"MPS_NODE_ID_PROPERTY_NAME\" />\n</node>\n<node concept=\"2GrUjf\" id=\"4vX$i39aY3Y\" role=\"3uHU7B\">\n<ref role=\"2Gs0qQ\" node=\"7jRNnvCa0e$\" resolve=\"key\" />\n</node>\n<node concept=\"10M0yZ\" id=\"7C8dhLie1m4\" role=\"3uHU7w\">\n- <ref role=\"1PxDUh\" to=\"csg2:4_k_9wJ_0cZ\" resolve=\"_ModelSynchronizer\" />\n+ <ref role=\"1PxDUh\" to=\"csg2:4_k_9wJ_0cZ\" resolve=\"ModelSynchronizer\" />\n<ref role=\"3cqZAo\" to=\"csg2:4_k_9wJ_0d6\" resolve=\"MPS_NODE_ID_PROPERTY_NAME\" />\n</node>\n</node>\n</node>\n</node>\n<node concept=\"10M0yZ\" id=\"7C8dhLie1m5\" role=\"37wK5m\">\n- <ref role=\"1PxDUh\" to=\"csg2:4_k_9wJ_0cZ\" resolve=\"_ModelSynchronizer\" />\n+ <ref role=\"1PxDUh\" to=\"csg2:4_k_9wJ_0cZ\" resolve=\"ModelSynchronizer\" />\n<ref role=\"3cqZAo\" to=\"csg2:4_k_9wJ_0d6\" resolve=\"MPS_NODE_ID_PROPERTY_NAME\" />\n</node>\n</node>\n<node concept=\"3cpWsn\" id=\"7jRNnvCez9i\" role=\"3cpWs9\">\n<property role=\"TrG5h\" value=\"transientModuleBinding\" />\n<node concept=\"3uibUv\" id=\"6hBdEE_4QwX\" role=\"1tU5fm\">\n- <ref role=\"3uigEE\" to=\"csg2:7ZZZU$lp6Bz\" resolve=\"_TransientModuleBinding\" />\n+ <ref role=\"3uigEE\" to=\"csg2:7ZZZU$lp6Bz\" resolve=\"TransientModuleBinding\" />\n</node>\n<node concept=\"2YIFZM\" id=\"7ZZZU$lgqF7\" role=\"33vP2m\">\n<ref role=\"1Pybhc\" to=\"csg2:i0AVAFXWm5\" resolve=\"ModelCloudImportUtils\" />\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | correct path to model server fatjar in integration and functional tests |
426,504 | 19.01.2022 11:28:09 | -3,600 | 2ea8edb67798a3688b287813ca217077cc975e88 | using VirtualFileManager refresh method | [
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.common/models/org.modelix.common.mps",
"new_path": "mps/org.modelix.common/models/org.modelix.common.mps",
"diff": "<reference id=\"1144433194310\" name=\"classConcept\" index=\"1Pybhc\" />\n</concept>\n<concept id=\"1070534058343\" name=\"jetbrains.mps.baseLanguage.structure.NullLiteral\" flags=\"nn\" index=\"10Nm6u\" />\n+ <concept id=\"1070534644030\" name=\"jetbrains.mps.baseLanguage.structure.BooleanType\" flags=\"in\" index=\"10P_77\" />\n<concept id=\"1068390468198\" name=\"jetbrains.mps.baseLanguage.structure.ClassConcept\" flags=\"ig\" index=\"312cEu\" />\n<concept id=\"1068431474542\" name=\"jetbrains.mps.baseLanguage.structure.VariableDeclaration\" flags=\"ng\" index=\"33uBYm\">\n<child id=\"1068431790190\" name=\"initializer\" index=\"33vP2m\" />\n<node concept=\"17QB3L\" id=\"5wsTsVezpQE\" role=\"3clF45\" />\n<node concept=\"3Tm1VV\" id=\"5wsTsVezpAO\" role=\"1B3o_S\" />\n</node>\n+ <node concept=\"2tJIrI\" id=\"7dRdZSjKoDI\" role=\"jymVt\" />\n+ <node concept=\"2YIFZL\" id=\"7dRdZSjKnO4\" role=\"jymVt\">\n+ <property role=\"TrG5h\" value=\"getOrElseBoolean\" />\n+ <node concept=\"3clFbS\" id=\"7dRdZSjKnO5\" role=\"3clF47\">\n+ <node concept=\"3cpWs8\" id=\"7dRdZSjKnO6\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"7dRdZSjKnO7\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"value\" />\n+ <node concept=\"17QB3L\" id=\"7dRdZSjKnO8\" role=\"1tU5fm\" />\n+ <node concept=\"1rXfSq\" id=\"7dRdZSjKnO9\" role=\"33vP2m\">\n+ <ref role=\"37wK5l\" node=\"3xX$Vyo0aHz\" resolve=\"get\" />\n+ <node concept=\"37vLTw\" id=\"7dRdZSjKnOa\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"7dRdZSjKnOi\" resolve=\"name\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbF\" id=\"7dRdZSjKnOb\" role=\"3cqZAp\">\n+ <node concept=\"3K4zz7\" id=\"7dRdZSjKnOc\" role=\"3clFbG\">\n+ <node concept=\"2YIFZM\" id=\"7dRdZSjKoBr\" role=\"3K4E3e\">\n+ <ref role=\"37wK5l\" to=\"wyt6:~Boolean.parseBoolean(java.lang.String)\" resolve=\"parseBoolean\" />\n+ <ref role=\"1Pybhc\" to=\"wyt6:~Boolean\" resolve=\"Boolean\" />\n+ <node concept=\"37vLTw\" id=\"7dRdZSjKoCS\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"7dRdZSjKnO7\" resolve=\"value\" />\n+ </node>\n+ </node>\n+ <node concept=\"37vLTw\" id=\"7dRdZSjKnOe\" role=\"3K4GZi\">\n+ <ref role=\"3cqZAo\" node=\"7dRdZSjKnOk\" resolve=\"defaultValue\" />\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"7dRdZSjKnOf\" role=\"3K4Cdx\">\n+ <node concept=\"37vLTw\" id=\"7dRdZSjKnOg\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"7dRdZSjKnO7\" resolve=\"value\" />\n+ </node>\n+ <node concept=\"17RvpY\" id=\"7dRdZSjKnOh\" role=\"2OqNvi\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"37vLTG\" id=\"7dRdZSjKnOi\" role=\"3clF46\">\n+ <property role=\"TrG5h\" value=\"name\" />\n+ <node concept=\"17QB3L\" id=\"7dRdZSjKnOj\" role=\"1tU5fm\" />\n+ </node>\n+ <node concept=\"37vLTG\" id=\"7dRdZSjKnOk\" role=\"3clF46\">\n+ <property role=\"TrG5h\" value=\"defaultValue\" />\n+ <node concept=\"10P_77\" id=\"7dRdZSjKnUt\" role=\"1tU5fm\" />\n+ </node>\n+ <node concept=\"10P_77\" id=\"7dRdZSjKovk\" role=\"3clF45\" />\n+ <node concept=\"3Tm1VV\" id=\"7dRdZSjKnOn\" role=\"1B3o_S\" />\n+ </node>\n<node concept=\"3Tm1VV\" id=\"3xX$Vyo038O\" role=\"1B3o_S\" />\n</node>\n</model>\n"
},
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"diff": "</node>\n<node concept=\"3clFbJ\" id=\"18La5_pa_Tn\" role=\"3cqZAp\">\n<node concept=\"3clFbS\" id=\"18La5_pa_Tp\" role=\"3clFbx\">\n+ <node concept=\"3clFbF\" id=\"7dRdZSjIxPp\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"7dRdZSjIy09\" role=\"3clFbG\">\n+ <node concept=\"2YIFZM\" id=\"7dRdZSjIxR_\" role=\"2Oq$k0\">\n+ <ref role=\"37wK5l\" to=\"jlff:~VirtualFileManager.getInstance()\" resolve=\"getInstance\" />\n+ <ref role=\"1Pybhd\" to=\"jlff:~VirtualFileManager\" resolve=\"VirtualFileManager\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"7dRdZSjIybK\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"jlff:~VirtualFileManager.syncRefresh()\" resolve=\"syncRefresh\" />\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"3cpWs8\" id=\"1MKNcGA0ogc\" role=\"3cqZAp\">\n<node concept=\"3cpWsn\" id=\"1MKNcGA0ogd\" role=\"3cpWs9\">\n<property role=\"TrG5h\" value=\"modelsDirVirtual\" />\n<ref role=\"3uigEE\" to=\"guwi:~IOException\" resolve=\"IOException\" />\n</node>\n<node concept=\"3clFbS\" id=\"3BReYNsIHhT\" role=\"3clF47\">\n- <node concept=\"3J1_TO\" id=\"5XpzmgllHIt\" role=\"3cqZAp\">\n- <node concept=\"3clFbS\" id=\"5XpzmgllHIu\" role=\"1zxBo7\">\n+ <node concept=\"3cpWs8\" id=\"5mIc0gCrILZ\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"5mIc0gCrIM0\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"res\" />\n+ <node concept=\"3uibUv\" id=\"5mIc0gCrIM1\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"yzht:~AsyncPromise\" resolve=\"AsyncPromise\" />\n+ <node concept=\"3uibUv\" id=\"5mIc0gCrNya\" role=\"11_B2D\">\n+ <ref role=\"3uigEE\" to=\"wyt6:~Boolean\" resolve=\"Boolean\" />\n+ </node>\n+ </node>\n+ <node concept=\"2ShNRf\" id=\"5mIc0gCrIM3\" role=\"33vP2m\">\n+ <node concept=\"1pGfFk\" id=\"5mIc0gCrIM4\" role=\"2ShVmc\">\n+ <ref role=\"37wK5l\" to=\"yzht:~AsyncPromise.<init>()\" resolve=\"AsyncPromise\" />\n+ <node concept=\"3uibUv\" id=\"5mIc0gCrNas\" role=\"1pMfVU\">\n+ <ref role=\"3uigEE\" to=\"wyt6:~Boolean\" resolve=\"Boolean\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbF\" id=\"5mIc0gCrIM6\" role=\"3cqZAp\">\n+ <node concept=\"2YIFZM\" id=\"5mIc0gCrIM7\" role=\"3clFbG\">\n+ <ref role=\"37wK5l\" to=\"3a50:~ThreadUtils.runInUIThreadNoWait(java.lang.Runnable)\" resolve=\"runInUIThreadNoWait\" />\n+ <ref role=\"1Pybhd\" to=\"3a50:~ThreadUtils\" resolve=\"ThreadUtils\" />\n+ <node concept=\"1bVj0M\" id=\"5mIc0gCrIM8\" role=\"37wK5m\">\n+ <node concept=\"3clFbS\" id=\"5mIc0gCrIM9\" role=\"1bW5cS\">\n+ <node concept=\"3J1_TO\" id=\"5mIc0gCrIMa\" role=\"3cqZAp\">\n+ <node concept=\"3uVAMA\" id=\"5mIc0gCrIMb\" role=\"1zxBo5\">\n+ <node concept=\"3clFbS\" id=\"5mIc0gCrIMc\" role=\"1zc67A\">\n+ <node concept=\"3clFbF\" id=\"5mIc0gCrKII\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"5mIc0gCrKY$\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"5mIc0gCrKIG\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"5mIc0gCrIMm\" resolve=\"e\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"5mIc0gCrLwo\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"wyt6:~Throwable.printStackTrace()\" resolve=\"printStackTrace\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbF\" id=\"5mIc0gCrIMd\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"5mIc0gCrIMe\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"5mIc0gCrIMf\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"5mIc0gCrIM0\" resolve=\"res\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"5mIc0gCrIMg\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"yzht:~AsyncPromise.setResult(java.lang.Object)\" resolve=\"setResult\" />\n+ <node concept=\"3clFbT\" id=\"5mIc0gCrM6I\" role=\"37wK5m\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"XOnhg\" id=\"5mIc0gCrIMm\" role=\"1zc67B\">\n+ <property role=\"TrG5h\" value=\"e\" />\n+ <node concept=\"nSUau\" id=\"5mIc0gCrIMn\" role=\"1tU5fm\">\n+ <node concept=\"3uibUv\" id=\"5mIc0gCrPmJ\" role=\"nSUat\">\n+ <ref role=\"3uigEE\" to=\"dush:~ModelSaveException\" resolve=\"ModelSaveException\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbS\" id=\"5mIc0gCrIMp\" role=\"1zxBo7\">\n<node concept=\"3clFbF\" id=\"3BReYNsIHhU\" role=\"3cqZAp\">\n<node concept=\"2YIFZM\" id=\"3BReYNsILH2\" role=\"3clFbG\">\n<ref role=\"1Pybhd\" to=\"5fzo:~ModelPersistence\" resolve=\"ModelPersistence\" />\n</node>\n</node>\n</node>\n+ <node concept=\"3clFbF\" id=\"5mIc0gCrOf4\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"5mIc0gCrOf5\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"5mIc0gCrOf6\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"5mIc0gCrIM0\" resolve=\"res\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"5mIc0gCrOf7\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"yzht:~AsyncPromise.setResult(java.lang.Object)\" resolve=\"setResult\" />\n+ <node concept=\"3clFbT\" id=\"5mIc0gCrOf8\" role=\"37wK5m\">\n+ <property role=\"3clFbU\" value=\"true\" />\n+ </node>\n+ </node>\n</node>\n- <node concept=\"3uVAMA\" id=\"5XpzmgllHIw\" role=\"1zxBo5\">\n- <node concept=\"3clFbS\" id=\"5XpzmgllHIx\" role=\"1zc67A\">\n- <node concept=\"YS8fn\" id=\"5XpzmgllIo0\" role=\"3cqZAp\">\n- <node concept=\"2ShNRf\" id=\"5XpzmgllIx4\" role=\"YScLw\">\n- <node concept=\"1pGfFk\" id=\"5Xpzmglml0p\" role=\"2ShVmc\">\n- <ref role=\"37wK5l\" to=\"wyt6:~RuntimeException.<init>(java.lang.Throwable)\" resolve=\"RuntimeException\" />\n- <node concept=\"37vLTw\" id=\"5XpzmglmlqF\" role=\"37wK5m\">\n- <ref role=\"3cqZAo\" node=\"5XpzmgllHIy\" resolve=\"e\" />\n</node>\n</node>\n</node>\n</node>\n</node>\n- <node concept=\"XOnhg\" id=\"5XpzmgllHIy\" role=\"1zc67B\">\n- <property role=\"TrG5h\" value=\"e\" />\n- <node concept=\"nSUau\" id=\"5XpzmgllHIz\" role=\"1tU5fm\">\n- <node concept=\"3uibUv\" id=\"5XpzmgllHIv\" role=\"nSUat\">\n- <ref role=\"3uigEE\" to=\"dush:~ModelSaveException\" resolve=\"ModelSaveException\" />\n+ </node>\n+ </node>\n+ <node concept=\"3clFbJ\" id=\"5mIc0gCrRO9\" role=\"3cqZAp\">\n+ <node concept=\"3clFbS\" id=\"5mIc0gCrROb\" role=\"3clFbx\">\n+ <node concept=\"YS8fn\" id=\"5mIc0gCrVsq\" role=\"3cqZAp\">\n+ <node concept=\"2ShNRf\" id=\"5mIc0gCrVD$\" role=\"YScLw\">\n+ <node concept=\"1pGfFk\" id=\"5mIc0gCrXR1\" role=\"2ShVmc\">\n+ <ref role=\"37wK5l\" to=\"wyt6:~RuntimeException.<init>(java.lang.String)\" resolve=\"RuntimeException\" />\n+ <node concept=\"Xl_RD\" id=\"5mIc0gCrYfu\" role=\"37wK5m\">\n+ <property role=\"Xl_RC\" value=\"Unable to save model\" />\n+ </node>\n</node>\n</node>\n</node>\n</node>\n+ <node concept=\"3fqX7Q\" id=\"5mIc0gCrUPn\" role=\"3clFbw\">\n+ <node concept=\"2OqwBi\" id=\"5mIc0gCrUPp\" role=\"3fr31v\">\n+ <node concept=\"37vLTw\" id=\"5mIc0gCrUPq\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"5mIc0gCrIM0\" resolve=\"res\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"5mIc0gCrUPr\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"yzht:~AsyncPromise.get()\" resolve=\"get\" />\n+ </node>\n+ </node>\n+ </node>\n</node>\n</node>\n<node concept=\"3Tm1VV\" id=\"3BReYNsIHi1\" role=\"1B3o_S\" />\n</node>\n</node>\n<node concept=\"2tJIrI\" id=\"3BReYNsIEn8\" role=\"jymVt\" />\n- <node concept=\"2tJIrI\" id=\"729BXr3QwZh\" role=\"jymVt\" />\n<node concept=\"3clFb_\" id=\"5Ns9HDw2j$S\" role=\"jymVt\">\n<property role=\"TrG5h\" value=\"createModel\" />\n<node concept=\"3clFbS\" id=\"5Ns9HDw2j$Y\" role=\"3clF47\">\n<property role=\"3oM_SC\" value=\"asynchronously,\" />\n</node>\n<node concept=\"3oM_SD\" id=\"5mIc0gCqU2K\" role=\"1PaTwD\">\n- <property role=\"3oM_SC\" value=\"similary\" />\n+ <property role=\"3oM_SC\" value=\"similarly\" />\n</node>\n<node concept=\"3oM_SD\" id=\"5mIc0gCqU2T\" role=\"1PaTwD\">\n<property role=\"3oM_SC\" value=\"to\" />\n</node>\n</node>\n</node>\n+ <node concept=\"3clFbF\" id=\"7dRdZSjI_LM\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"7dRdZSjI_LN\" role=\"3clFbG\">\n+ <node concept=\"2YIFZM\" id=\"7dRdZSjI_LO\" role=\"2Oq$k0\">\n+ <ref role=\"37wK5l\" to=\"jlff:~VirtualFileManager.getInstance()\" resolve=\"getInstance\" />\n+ <ref role=\"1Pybhd\" to=\"jlff:~VirtualFileManager\" resolve=\"VirtualFileManager\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"7dRdZSjI_LP\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"jlff:~VirtualFileManager.syncRefresh()\" resolve=\"syncRefresh\" />\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"3cpWs8\" id=\"6V$9xNdU9DP\" role=\"3cqZAp\">\n<node concept=\"3cpWsn\" id=\"6V$9xNdU9DQ\" role=\"3cpWs9\">\n<property role=\"TrG5h\" value=\"res\" />\n"
},
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.plugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.plugin.mps",
"diff": "</node>\n</node>\n</node>\n+ <node concept=\"3cpWs8\" id=\"7dRdZSjKm1M\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"7dRdZSjKm1P\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"debug\" />\n+ <node concept=\"10P_77\" id=\"7dRdZSjKm1K\" role=\"1tU5fm\" />\n+ <node concept=\"2YIFZM\" id=\"7dRdZSjKpaW\" role=\"33vP2m\">\n+ <ref role=\"37wK5l\" to=\"ia5i:7dRdZSjKnO4\" resolve=\"getOrElseBoolean\" />\n+ <ref role=\"1Pybhc\" to=\"ia5i:3xX$Vyo038N\" resolve=\"PropertyOrEnv\" />\n+ <node concept=\"10M0yZ\" id=\"7dRdZSjKpaX\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"7dRdZSjKk3O\" resolve=\"DEBUG\" />\n+ <ref role=\"1PxDUh\" node=\"4D52TXxApUP\" resolve=\"ModelixExportConfiguration\" />\n+ </node>\n+ <node concept=\"3clFbT\" id=\"7dRdZSjKp_5\" role=\"37wK5m\" />\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"3cpWs8\" id=\"d9jdlYVi9E\" role=\"3cqZAp\">\n<node concept=\"3cpWsn\" id=\"d9jdlYVi9F\" role=\"3cpWs9\">\n<property role=\"TrG5h\" value=\"modelServerConnection\" />\n</node>\n</node>\n</node>\n+ <node concept=\"Wx3nA\" id=\"7dRdZSjKk3O\" role=\"jymVt\">\n+ <property role=\"TrG5h\" value=\"DEBUG\" />\n+ <property role=\"3TUv4t\" value=\"true\" />\n+ <node concept=\"3Tm1VV\" id=\"7dRdZSjKk3P\" role=\"1B3o_S\" />\n+ <node concept=\"17QB3L\" id=\"7dRdZSjKk3Q\" role=\"1tU5fm\" />\n+ <node concept=\"3cpWs3\" id=\"7dRdZSjKk3R\" role=\"33vP2m\">\n+ <node concept=\"Xl_RD\" id=\"7dRdZSjKk3S\" role=\"3uHU7w\">\n+ <property role=\"Xl_RC\" value=\"debug\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"7dRdZSjKk3V\" role=\"3uHU7B\">\n+ <ref role=\"3cqZAo\" node=\"4D52TXxABGO\" resolve=\"PREFIX\" />\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"2tJIrI\" id=\"4D52TXxAMEl\" role=\"jymVt\" />\n<node concept=\"3clFbW\" id=\"4D52TXxANhN\" role=\"jymVt\">\n<node concept=\"3cqZAl\" id=\"4D52TXxANhQ\" role=\"3clF45\" />\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | using VirtualFileManager refresh method |
426,504 | 19.01.2022 11:28:31 | -3,600 | 044fb8696131a8cb6f048d1dfcaa0643f6488836 | pass the debug flag to the MPS plugin during export | [
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/EnvironmentLoader.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/EnvironmentLoader.java",
"diff": "@@ -39,7 +39,8 @@ public class EnvironmentLoader {\nADDITIONAL_PLUGINS(\"additionalPlugins\"),\nADDITIONAL_PLUGIN_DIRS(\"additionalPluginDirs\"),\nMPS_EXTENSIONS_PATH(\"mpsExtensionsPath\"),\n- MODELIX_PATH(\"modelixPath\");\n+ MODELIX_PATH(\"modelixPath\"),\n+ DEBUG(\"debug\");\nprivate String code;\n"
},
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"diff": "@@ -130,7 +130,10 @@ public class ModelPlugin implements Plugin<Project> {\nif (settings.getModelixArtifactsPath() != null) {\njavaExec.args(Key.MODELIX_PATH.getCode(), settings.getModelixArtifactsPath());\n}\n- if (settings.isDebug()) javaExec.setDebug(true);\n+ if (settings.isDebug()) {\n+ javaExec.args(Key.DEBUG.getCode(), Boolean.toString(settings.isDebug()));\n+ javaExec.setDebug(true);\n+ }\njavaExec.getTimeout().set(Duration.ofSeconds(settings.getTimeout()));\njavaExec.setIgnoreExitValue(true);\njavaExec.setMain(ExportMain.class.getName());\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | pass the debug flag to the MPS plugin during export |
426,504 | 19.01.2022 12:14:20 | -3,600 | 53c40408e2a30b671a5e966eeb94bb81e4582c43 | pring args and JVM args for ExportMain program | [
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"diff": "@@ -137,6 +137,9 @@ public class ModelPlugin implements Plugin<Project> {\njavaExec.getTimeout().set(Duration.ofSeconds(settings.getTimeout()));\njavaExec.setIgnoreExitValue(true);\njavaExec.setMain(ExportMain.class.getName());\n+ System.out.println(\" JVM Args : \" + javaExec.getJvmArgs());\n+ System.out.println(\" all JVM Args : \" + javaExec.getAllJvmArgs());\n+ System.out.println(\" Args : \" + javaExec.getArgs());\njavaExec.doLast(task -> {\nSystem.out.println(\"After execution of export main\");\nExecResult execResult = javaExec.getExecutionResult().get();\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | pring args and JVM args for ExportMain program |
426,504 | 19.01.2022 12:16:02 | -3,600 | fb9db2ce759420718d3d64665a66c3fe7660ad87 | remove abuse of debug flag | [
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"diff": "@@ -131,7 +131,6 @@ public class ModelPlugin implements Plugin<Project> {\njavaExec.args(Key.MODELIX_PATH.getCode(), settings.getModelixArtifactsPath());\n}\nif (settings.isDebug()) {\n- javaExec.args(Key.DEBUG.getCode(), Boolean.toString(settings.isDebug()));\njavaExec.setDebug(true);\n}\njavaExec.getTimeout().set(Duration.ofSeconds(settings.getTimeout()));\n"
},
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.plugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.plugin.mps",
"diff": "</node>\n</node>\n</node>\n- <node concept=\"Wx3nA\" id=\"7dRdZSjKk3O\" role=\"jymVt\">\n- <property role=\"TrG5h\" value=\"DEBUG\" />\n- <property role=\"3TUv4t\" value=\"true\" />\n- <node concept=\"3Tm1VV\" id=\"7dRdZSjKk3P\" role=\"1B3o_S\" />\n- <node concept=\"17QB3L\" id=\"7dRdZSjKk3Q\" role=\"1tU5fm\" />\n- <node concept=\"3cpWs3\" id=\"7dRdZSjKk3R\" role=\"33vP2m\">\n- <node concept=\"Xl_RD\" id=\"7dRdZSjKk3S\" role=\"3uHU7w\">\n- <property role=\"Xl_RC\" value=\"debug\" />\n- </node>\n- <node concept=\"37vLTw\" id=\"7dRdZSjKk3V\" role=\"3uHU7B\">\n- <ref role=\"3cqZAo\" node=\"4D52TXxABGO\" resolve=\"PREFIX\" />\n- </node>\n- </node>\n- </node>\n<node concept=\"2tJIrI\" id=\"4D52TXxAMEl\" role=\"jymVt\" />\n<node concept=\"3clFbW\" id=\"4D52TXxANhN\" role=\"jymVt\">\n<node concept=\"3cqZAl\" id=\"4D52TXxANhQ\" role=\"3clF45\" />\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | remove abuse of debug flag |
426,504 | 19.01.2022 13:38:58 | -3,600 | 49414c1b2656b60bc61ab83c17570201ff816cf8 | removing broken reference to debug enum value | [
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.plugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.plugin.mps",
"diff": "</node>\n</node>\n</node>\n- <node concept=\"3cpWs8\" id=\"7dRdZSjKm1M\" role=\"3cqZAp\">\n- <node concept=\"3cpWsn\" id=\"7dRdZSjKm1P\" role=\"3cpWs9\">\n- <property role=\"TrG5h\" value=\"debug\" />\n- <node concept=\"10P_77\" id=\"7dRdZSjKm1K\" role=\"1tU5fm\" />\n- <node concept=\"2YIFZM\" id=\"7dRdZSjKpaW\" role=\"33vP2m\">\n- <ref role=\"37wK5l\" to=\"ia5i:7dRdZSjKnO4\" resolve=\"getOrElseBoolean\" />\n- <ref role=\"1Pybhc\" to=\"ia5i:3xX$Vyo038N\" resolve=\"PropertyOrEnv\" />\n- <node concept=\"10M0yZ\" id=\"7dRdZSjKpaX\" role=\"37wK5m\">\n- <ref role=\"3cqZAo\" node=\"7dRdZSjKk3O\" resolve=\"DEBUG\" />\n- <ref role=\"1PxDUh\" node=\"4D52TXxApUP\" resolve=\"ModelixExportConfiguration\" />\n- </node>\n- <node concept=\"3clFbT\" id=\"7dRdZSjKp_5\" role=\"37wK5m\" />\n- </node>\n- </node>\n- </node>\n<node concept=\"3cpWs8\" id=\"d9jdlYVi9E\" role=\"3cqZAp\">\n<node concept=\"3cpWsn\" id=\"d9jdlYVi9F\" role=\"3cpWs9\">\n<property role=\"TrG5h\" value=\"modelServerConnection\" />\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | removing broken reference to debug enum value |
426,504 | 20.01.2022 09:19:54 | -3,600 | f387736e7d15fa11f93c17632959107145424b81 | open project as part of DownloadModel task | [
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/EnvironmentLoader.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/EnvironmentLoader.java",
"diff": "@@ -11,7 +11,6 @@ import jetbrains.mps.tool.environment.Environment;\nimport jetbrains.mps.tool.environment.EnvironmentConfig;\nimport jetbrains.mps.tool.environment.IdeaEnvironment;\nimport jetbrains.mps.util.PathManager;\n-import jetbrains.mps.tool.common.PluginData;\nimport org.w3c.dom.Document;\nimport org.w3c.dom.Element;\n@@ -21,7 +20,6 @@ import java.io.File;\nimport java.io.IOException;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n-import java.util.Arrays;\nimport java.util.HashSet;\nimport java.util.Set;\n@@ -40,7 +38,7 @@ public class EnvironmentLoader {\nADDITIONAL_PLUGIN_DIRS(\"additionalPluginDirs\"),\nMPS_EXTENSIONS_PATH(\"mpsExtensionsPath\"),\nMODELIX_PATH(\"modelixPath\"),\n- DEBUG(\"debug\");\n+ PROJECT(\"project\");\nprivate String code;\n@@ -257,8 +255,13 @@ public class EnvironmentLoader {\nenvironment = new IdeaEnvironment(config);\nRuntimeFlags.setTestMode(TestMode.NONE);\ntry {\n+ File projectFile = Key.PROJECT.readPropertyAsFile();\n((IdeaEnvironment) environment).init();\n+ if (projectFile == null) {\nourProject = environment.createEmptyProject();\n+ } else {\n+ ourProject = environment.openProject(projectFile);\n+ }\n} catch (Throwable e) {\nthrow new RuntimeException(\"Issue with initializing environment and creating empty project\", e);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"diff": "@@ -2,6 +2,7 @@ package org.modelix.gradle.model;\nimport org.gradle.api.Plugin;\nimport org.gradle.api.Project;\n+import org.gradle.api.Task;\nimport org.gradle.api.artifacts.Configuration;\nimport org.gradle.api.file.RelativePath;\nimport org.gradle.api.tasks.Copy;\n@@ -25,13 +26,13 @@ public class ModelPlugin implements Plugin<Project> {\npublic void apply(Project project_) {\nModelixModelSettings settings = project_.getExtensions().create(\"modelixModel\", ModelixModelSettings.class);\nproject_.afterEvaluate((Project project) -> {\n- System.out.println(\"===========================\");\n- System.out.println(\"Modelix model plugin loaded\");\n- System.out.println(\"===========================\");\n- System.out.println(\" settings loaded from modelixModel.\");\n- System.out.println(\" mps path : \" + settings.getMpsPath());\n- System.out.println(\" mps extensions path : \" + settings.getMpsExtensionsArtifactsPath());\n- System.out.println(\" modelix path : \" + settings.getModelixArtifactsPath());\n+// System.out.println(\"===========================\");\n+// System.out.println(\"Modelix model plugin loaded\");\n+// System.out.println(\"===========================\");\n+// System.out.println(\" settings loaded from modelixModel.\");\n+// System.out.println(\" mps path : \" + settings.getMpsPath());\n+// System.out.println(\" mps extensions path : \" + settings.getMpsExtensionsArtifactsPath());\n+// System.out.println(\" modelix path : \" + settings.getModelixArtifactsPath());\nsettings.validate();\nManifest manifest = readManifest();\n@@ -85,25 +86,12 @@ public class ModelPlugin implements Plugin<Project> {\n});\n}\n- project.getTasks().create(\"downloadModel\", JavaExec.class, javaExec -> {\n+ Task downloadModel = project.getTasks().create(\"downloadModel\", JavaExec.class, javaExec -> {\nfinal boolean usingExistingMPS = settings.usingExistingMps();\nFile mpsLocation = settings.getMpsLocation();\nFile mpsExtensionsLocation = settings.getMpsExtensionsLocation();\nFile modelixLocation = settings.getModelixLocation();\n- System.out.println(\"=========================================\");\n- System.out.println(\"Modelix model plugin: Download model task\");\n- System.out.println(\"=========================================\");\n- System.out.println(\" using existing MPS : \" + usingExistingMPS);\n- System.out.println(\" mps location : \" + mpsLocation);\n- System.out.println(\" mps extensions location : \" + mpsExtensionsLocation);\n- System.out.println(\" modelix location : \" + modelixLocation);\n- System.out.println(\" server URL : \" + settings.getServerUrl());\n- System.out.println(\" repository ID : \" + settings.getRepositoryId());\n- System.out.println(\" branch name : \" + settings.getBranchName());\n- System.out.println(\" additional libraries : \" + settings.getAdditionalLibrariesAsString());\n- System.out.println(\" additional library dirs : \" + settings.getAdditionalLibraryDirsAsString());\n- System.out.println(\" additional plugins : \" + settings.getAdditionalPluginsAsString());\n- System.out.println(\" additional plugin dirs : \" + settings.getAdditionalPluginDirsAsString());\n+\nif (usingExistingMPS) {\n// no dependencies\n} else {\n@@ -124,6 +112,9 @@ public class ModelPlugin implements Plugin<Project> {\nKey.ADDITIONAL_PLUGINS.getCode(), settings.getAdditionalPluginsAsString(),\nKey.ADDITIONAL_PLUGIN_DIRS.getCode(), settings.getAdditionalPluginDirsAsString()\n);\n+ if (settings.getProjectFile() != null) {\n+ javaExec.args(Key.PROJECT.getCode(), settings.getProjectFile().getAbsolutePath());\n+ }\nif (settings.getMpsExtensionsArtifactsPath() != null) {\njavaExec.args(Key.MPS_EXTENSIONS_PATH.getCode(), settings.getMpsExtensionsArtifactsPath());\n}\n@@ -136,10 +127,25 @@ public class ModelPlugin implements Plugin<Project> {\njavaExec.getTimeout().set(Duration.ofSeconds(settings.getTimeout()));\njavaExec.setIgnoreExitValue(true);\njavaExec.setMain(ExportMain.class.getName());\n+ javaExec.doLast(task -> {\n+ System.out.println(\"=========================================\");\n+ System.out.println(\"Modelix model plugin: Download model task\");\n+ System.out.println(\"=========================================\");\n+ System.out.println(\" using existing MPS : \" + usingExistingMPS);\n+ System.out.println(\" mps location : \" + mpsLocation);\n+ System.out.println(\" mps extensions location : \" + mpsExtensionsLocation);\n+ System.out.println(\" modelix location : \" + modelixLocation);\n+ System.out.println(\" server URL : \" + settings.getServerUrl());\n+ System.out.println(\" repository ID : \" + settings.getRepositoryId());\n+ System.out.println(\" branch name : \" + settings.getBranchName());\n+ System.out.println(\" additional libraries : \" + settings.getAdditionalLibrariesAsString());\n+ System.out.println(\" additional library dirs : \" + settings.getAdditionalLibraryDirsAsString());\n+ System.out.println(\" additional plugins : \" + settings.getAdditionalPluginsAsString());\n+ System.out.println(\" additional plugin dirs : \" + settings.getAdditionalPluginDirsAsString());\n+ System.out.println(\" project path : \" + settings.getProjectFile().getAbsolutePath());\nSystem.out.println(\" JVM Args : \" + javaExec.getJvmArgs());\nSystem.out.println(\" all JVM Args : \" + javaExec.getAllJvmArgs());\nSystem.out.println(\" Args : \" + javaExec.getArgs());\n- javaExec.doLast(task -> {\nSystem.out.println(\"After execution of export main\");\nExecResult execResult = javaExec.getExecutionResult().get();\nint exitValue = execResult.getExitValue();\n@@ -161,6 +167,27 @@ public class ModelPlugin implements Plugin<Project> {\n}\n});\n});\n+ downloadModel.doFirst(task -> {\n+ final boolean usingExistingMPS = settings.usingExistingMps();\n+ File mpsLocation = settings.getMpsLocation();\n+ File mpsExtensionsLocation = settings.getMpsExtensionsLocation();\n+ File modelixLocation = settings.getModelixLocation();\n+ System.out.println(\"=========================================\");\n+ System.out.println(\"Modelix model plugin: Download model task\");\n+ System.out.println(\"=========================================\");\n+ System.out.println(\" using existing MPS : \" + usingExistingMPS);\n+ System.out.println(\" mps location : \" + mpsLocation);\n+ System.out.println(\" mps extensions location : \" + mpsExtensionsLocation);\n+ System.out.println(\" modelix location : \" + modelixLocation);\n+ System.out.println(\" server URL : \" + settings.getServerUrl());\n+ System.out.println(\" repository ID : \" + settings.getRepositoryId());\n+ System.out.println(\" branch name : \" + settings.getBranchName());\n+ System.out.println(\" additional libraries : \" + settings.getAdditionalLibrariesAsString());\n+ System.out.println(\" additional library dirs : \" + settings.getAdditionalLibraryDirsAsString());\n+ System.out.println(\" additional plugins : \" + settings.getAdditionalPluginsAsString());\n+ System.out.println(\" additional plugin dirs : \" + settings.getAdditionalPluginDirsAsString());\n+ System.out.println(\" project path : \" + settings.getProjectFile().getAbsolutePath());\n+ });\n});\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelixModelSettings.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelixModelSettings.java",
"diff": "@@ -66,6 +66,7 @@ public class ModelixModelSettings {\nprivate String serverUrl = \"http://localhost:28101/\";\nprivate String repositoryId = \"default\";\nprivate String branchName = \"master\";\n+ private String projectPath = null;\nprivate boolean debug = false;\nprivate int timeoutSeconds = 120;\n@@ -116,11 +117,21 @@ public class ModelixModelSettings {\nreturn this.mpsPath;\n}\n+ public File getProjectFile() {\n+ if (this.projectPath == null) {\n+ return null;\n+ }\n+ return new File(this.projectPath);\n+ }\n+\npublic void setMpsPath(String mpsPath) {\n- System.out.println(\"setting MPS Path\");\nthis.mpsPath = mpsPath;\n}\n+ public void setProjectPath(String projectPath) {\n+ this.projectPath = projectPath;\n+ }\n+\npublic String getMpsExtensionsArtifactsPath() {\nreturn this.mpsExtensionsArtifactsPath;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"diff": "</node>\n<node concept=\"9aQIb\" id=\"5mIc0gCniGb\" role=\"9aQIa\">\n<node concept=\"3clFbS\" id=\"5mIc0gCniGc\" role=\"9aQI4\">\n+ <node concept=\"3clFbJ\" id=\"1UvRDkP6Raf\" role=\"3cqZAp\">\n+ <node concept=\"3clFbS\" id=\"1UvRDkP6Rah\" role=\"3clFbx\">\n<node concept=\"3clFbF\" id=\"32pQaardmhE\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"32pQaardmms\" role=\"3clFbG\">\n<node concept=\"37vLTw\" id=\"32pQaardmhC\" role=\"2Oq$k0\">\n</node>\n</node>\n</node>\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"1UvRDkP6T6x\" role=\"3clFbw\">\n+ <node concept=\"37vLTw\" id=\"1UvRDkP6S5C\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"32pQaardcm5\" resolve=\"virtualFile\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"1UvRDkP6TUH\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"3ju5:~IFile.exists()\" resolve=\"exists\" />\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"3cpWs8\" id=\"5mIc0gCnkHc\" role=\"3cqZAp\">\n<node concept=\"3cpWsn\" id=\"5mIc0gCnkHd\" role=\"3cpWs9\">\n<property role=\"TrG5h\" value=\"physicalFile\" />\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | open project as part of DownloadModel task |
426,504 | 20.01.2022 11:03:09 | -3,600 | e97ccf67f5a5e23a40eb105e5b23b29e132e341c | remove unnecessary info from plugin test build file | [
{
"change_type": "MODIFY",
"old_path": "gradle-plugin-test/build.gradle",
"new_path": "gradle-plugin-test/build.gradle",
"diff": "@@ -6,7 +6,7 @@ buildscript {\n}\ndependencies {\n- classpath group: 'org.modelix', name: 'gradle-plugin', version: '2020.3.5-202112171217-SNAPSHOT'\n+ classpath group: 'org.modelix', name: 'gradle-plugin', version: '2020.3.5-202201200839-SNAPSHOT'\n}\n}\n@@ -34,31 +34,31 @@ def pluginsDirFromExtensions = [\n\"mps-apache-commons\"]\nmodelixModel {\n- serverUrl = \"https://mymodelserver.com\"\n- repositoryId = \"repo3\"\n- timeout = 1800\n+ serverUrl = \"https://myserver.com/\"\n+ repositoryId = \"repo4\"\n+ timeout = 25000\n- // MPS Extensions\n- addLibraryDir(new File(\"${mpsExtensionsDir.getAbsolutePath()}/mps-apache-commons\"))\n- addLibraryDir(new File(\"${mpsExtensionsDir.getAbsolutePath()}/de.60.mps.libs\"))\n- addLibraryDir(new File(\"${mpsExtensionsDir.getAbsolutePath()}/de.q60.shadowmodels\"))\n- addLibraryDir(new File(\"${mpsExtensionsDir.getAbsolutePath()}/org.modelix.model.api\"))\n- addPlugin(\"${mpsExtensionsDir.getAbsolutePath()}/mps-apache-commons\", \"org.apache.commons\")\n- addPlugin(\"${mpsExtensionsDir.getAbsolutePath()}/de.60.mps.libs\", \"de.q60.mps.libs\")\n- addPlugin(\"${mpsExtensionsDir.getAbsolutePath()}/de.q60.shadowmodels\", \"de.q60.shadowmodels\")\n- addPlugin(\"${mpsExtensionsDir.getAbsolutePath()}/org.modelix.model.api\", \"org.modelix.model.api\")\n-\n- // Mbeddr platform\n- addPluginDir(mbeddrDir, [\"org.modelix.model.api\"])\n-\n- // Iets3\n- addPluginDir(iets3Dir)\n-\n- // Modelix\n- addLibraryDir(new File(modelixDir, \"org.modelix.common\"))\n- addLibraryDir(new File(modelixDir, \"org.modelix.model\"))\n- addPluginDir(new File(modelixDir, \"org.modelix.common\"))\n- addPluginDir(new File(modelixDir, \"org.modelix.model\"))\n+// // MPS Extensions\n+// addLibraryDir(new File(\"${mpsExtensionsDir.getAbsolutePath()}/mps-apache-commons\"))\n+// addLibraryDir(new File(\"${mpsExtensionsDir.getAbsolutePath()}/de.60.mps.libs\"))\n+// addLibraryDir(new File(\"${mpsExtensionsDir.getAbsolutePath()}/de.q60.shadowmodels\"))\n+// addLibraryDir(new File(\"${mpsExtensionsDir.getAbsolutePath()}/org.modelix.model.api\"))\n+// addPlugin(\"${mpsExtensionsDir.getAbsolutePath()}/mps-apache-commons\", \"org.apache.commons\")\n+// addPlugin(\"${mpsExtensionsDir.getAbsolutePath()}/de.60.mps.libs\", \"de.q60.mps.libs\")\n+// addPlugin(\"${mpsExtensionsDir.getAbsolutePath()}/de.q60.shadowmodels\", \"de.q60.shadowmodels\")\n+// addPlugin(\"${mpsExtensionsDir.getAbsolutePath()}/org.modelix.model.api\", \"org.modelix.model.api\")\n+//\n+// // Mbeddr platform\n+// addPluginDir(mbeddrDir, [\"org.modelix.model.api\"])\n+//\n+// // Iets3\n+// addPluginDir(iets3Dir)\n+//\n+// // Modelix\n+// addLibraryDir(new File(modelixDir, \"org.modelix.common\"))\n+// addLibraryDir(new File(modelixDir, \"org.modelix.model\"))\n+// addPluginDir(new File(modelixDir, \"org.modelix.common\"))\n+// addPluginDir(new File(modelixDir, \"org.modelix.model\"))\n// Add languages specific for the project\n}\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | remove unnecessary info from plugin test build file |
426,504 | 20.01.2022 11:05:20 | -3,600 | 38d8bce52697416ec2a23c6e23ee6c64ccb3a1be | revise logs in ModelPlugin | [
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"diff": "@@ -26,13 +26,6 @@ public class ModelPlugin implements Plugin<Project> {\npublic void apply(Project project_) {\nModelixModelSettings settings = project_.getExtensions().create(\"modelixModel\", ModelixModelSettings.class);\nproject_.afterEvaluate((Project project) -> {\n-// System.out.println(\"===========================\");\n-// System.out.println(\"Modelix model plugin loaded\");\n-// System.out.println(\"===========================\");\n-// System.out.println(\" settings loaded from modelixModel.\");\n-// System.out.println(\" mps path : \" + settings.getMpsPath());\n-// System.out.println(\" mps extensions path : \" + settings.getMpsExtensionsArtifactsPath());\n-// System.out.println(\" modelix path : \" + settings.getModelixArtifactsPath());\nsettings.validate();\nManifest manifest = readManifest();\n@@ -128,21 +121,6 @@ public class ModelPlugin implements Plugin<Project> {\njavaExec.setIgnoreExitValue(true);\njavaExec.setMain(ExportMain.class.getName());\njavaExec.doLast(task -> {\n- System.out.println(\"=========================================\");\n- System.out.println(\"Modelix model plugin: Download model task\");\n- System.out.println(\"=========================================\");\n- System.out.println(\" using existing MPS : \" + usingExistingMPS);\n- System.out.println(\" mps location : \" + mpsLocation);\n- System.out.println(\" mps extensions location : \" + mpsExtensionsLocation);\n- System.out.println(\" modelix location : \" + modelixLocation);\n- System.out.println(\" server URL : \" + settings.getServerUrl());\n- System.out.println(\" repository ID : \" + settings.getRepositoryId());\n- System.out.println(\" branch name : \" + settings.getBranchName());\n- System.out.println(\" additional libraries : \" + settings.getAdditionalLibrariesAsString());\n- System.out.println(\" additional library dirs : \" + settings.getAdditionalLibraryDirsAsString());\n- System.out.println(\" additional plugins : \" + settings.getAdditionalPluginsAsString());\n- System.out.println(\" additional plugin dirs : \" + settings.getAdditionalPluginDirsAsString());\n- System.out.println(\" project path : \" + settings.getProjectFile().getAbsolutePath());\nSystem.out.println(\" JVM Args : \" + javaExec.getJvmArgs());\nSystem.out.println(\" all JVM Args : \" + javaExec.getAllJvmArgs());\nSystem.out.println(\" Args : \" + javaExec.getArgs());\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | revise logs in ModelPlugin |
426,504 | 20.01.2022 14:20:17 | -3,600 | e24ced867149254ee9a9a370af82dffd792ac6b4 | checking the ModuleId is not used already | [
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"diff": "</node>\n</node>\n</node>\n+ <node concept=\"2tJIrI\" id=\"1UvRDkPhjXB\" role=\"jymVt\" />\n+ <node concept=\"3clFb_\" id=\"1UvRDkPhnA$\" role=\"jymVt\">\n+ <property role=\"TrG5h\" value=\"isModuleIdUsed\" />\n+ <node concept=\"3clFbS\" id=\"1UvRDkPhnAB\" role=\"3clF47\">\n+ <node concept=\"3cpWs8\" id=\"3hWKIsYB7iQ\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"3hWKIsYB7iT\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"result\" />\n+ <node concept=\"10P_77\" id=\"3hWKIsYB7iO\" role=\"1tU5fm\" />\n+ </node>\n+ </node>\n+ <node concept=\"1QHqEK\" id=\"3hWKIsYB634\" role=\"3cqZAp\">\n+ <node concept=\"1QHqEC\" id=\"3hWKIsYB636\" role=\"1QHqEI\">\n+ <node concept=\"3clFbS\" id=\"3hWKIsYB638\" role=\"1bW5cS\">\n+ <node concept=\"3clFbF\" id=\"3hWKIsYB7Aa\" role=\"3cqZAp\">\n+ <node concept=\"37vLTI\" id=\"3hWKIsYB84w\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"3hWKIsYB7A9\" role=\"37vLTJ\">\n+ <ref role=\"3cqZAo\" node=\"3hWKIsYB7iT\" resolve=\"result\" />\n+ </node>\n+ <node concept=\"3y3z36\" id=\"3hWKIsYB85k\" role=\"37vLTx\">\n+ <node concept=\"10Nm6u\" id=\"3hWKIsYB85l\" role=\"3uHU7w\" />\n+ <node concept=\"2OqwBi\" id=\"3hWKIsYB85m\" role=\"3uHU7B\">\n+ <node concept=\"2OqwBi\" id=\"3hWKIsYB85n\" role=\"2Oq$k0\">\n+ <node concept=\"Xjq3P\" id=\"3hWKIsYB85o\" role=\"2Oq$k0\" />\n+ <node concept=\"2OwXpG\" id=\"3hWKIsYB85p\" role=\"2OqNvi\">\n+ <ref role=\"2Oxat5\" node=\"26ispG7Y1wQ\" resolve=\"mpsRepository\" />\n+ </node>\n+ </node>\n+ <node concept=\"liA8E\" id=\"3hWKIsYB85q\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"lui2:~SRepository.getModule(org.jetbrains.mps.openapi.module.SModuleId)\" resolve=\"getModule\" />\n+ <node concept=\"37vLTw\" id=\"3hWKIsYB85r\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"1UvRDkPhowJ\" resolve=\"moduleId\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"37vLTw\" id=\"3hWKIsYB6Yb\" role=\"ukAjM\">\n+ <ref role=\"3cqZAo\" node=\"26ispG7Y1wQ\" resolve=\"mpsRepository\" />\n+ </node>\n+ </node>\n+ <node concept=\"3cpWs6\" id=\"3hWKIsYB8qG\" role=\"3cqZAp\">\n+ <node concept=\"37vLTw\" id=\"3hWKIsYBa1x\" role=\"3cqZAk\">\n+ <ref role=\"3cqZAo\" node=\"3hWKIsYB7iT\" resolve=\"result\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3Tm1VV\" id=\"1UvRDkPhleq\" role=\"1B3o_S\" />\n+ <node concept=\"10P_77\" id=\"1UvRDkPhn_Y\" role=\"3clF45\" />\n+ <node concept=\"37vLTG\" id=\"1UvRDkPhowJ\" role=\"3clF46\">\n+ <property role=\"TrG5h\" value=\"moduleId\" />\n+ <node concept=\"3uibUv\" id=\"1UvRDkPhowI\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"lui2:~SModuleId\" resolve=\"SModuleId\" />\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"2tJIrI\" id=\"26ispG7Y1yh\" role=\"jymVt\" />\n<node concept=\"3clFb_\" id=\"26ispG7YsJH\" role=\"jymVt\">\n<property role=\"TrG5h\" value=\"createModule\" />\n</node>\n</node>\n</node>\n+ <node concept=\"3cpWs8\" id=\"1UvRDkPdMea\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"1UvRDkPdMed\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"moduleIdStr\" />\n+ <node concept=\"17QB3L\" id=\"1UvRDkPdMe8\" role=\"1tU5fm\" />\n+ <node concept=\"2OqwBi\" id=\"1UvRDkPdMxy\" role=\"33vP2m\">\n+ <node concept=\"liA8E\" id=\"1UvRDkPdMxz\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"qvpu:~PArea.executeRead(kotlin.jvm.functions.Function0)\" resolve=\"executeRead\" />\n+ <node concept=\"1bVj0M\" id=\"1UvRDkPdMx$\" role=\"37wK5m\">\n+ <node concept=\"3clFbS\" id=\"1UvRDkPdMx_\" role=\"1bW5cS\">\n+ <node concept=\"3clFbF\" id=\"1UvRDkPdMxA\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"1UvRDkPdMxB\" role=\"3clFbG\">\n+ <node concept=\"2ShNRf\" id=\"1UvRDkPdMxC\" role=\"2Oq$k0\">\n+ <node concept=\"1pGfFk\" id=\"1UvRDkPdMxD\" role=\"2ShVmc\">\n+ <ref role=\"37wK5l\" to=\"jks5:~PNodeAdapter.<init>(long,org.modelix.model.api.IBranch)\" resolve=\"PNodeAdapter\" />\n+ <node concept=\"37vLTw\" id=\"1UvRDkPdMxE\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"7ZZZU$lnh9j\" resolve=\"moduleNodeId\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"1UvRDkPdMxF\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"7ZZZU$lt0Ue\" resolve=\"branch\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"liA8E\" id=\"1UvRDkPdMxG\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"jks5:~PNodeAdapter.getPropertyValue(java.lang.String)\" resolve=\"getPropertyValue\" />\n+ <node concept=\"2OqwBi\" id=\"1UvRDkPdMxH\" role=\"37wK5m\">\n+ <node concept=\"355D3s\" id=\"1UvRDkPdMxI\" role=\"2Oq$k0\">\n+ <ref role=\"355D3t\" to=\"jh6v:qmkA5fOskf\" resolve=\"Module\" />\n+ <ref role=\"355D3u\" to=\"jh6v:3Ezg1fME0bw\" resolve=\"id\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"1UvRDkPdMxJ\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"c17a:~SProperty.getName()\" resolve=\"getName\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"2ShNRf\" id=\"1UvRDkPdMxK\" role=\"2Oq$k0\">\n+ <node concept=\"1pGfFk\" id=\"1UvRDkPdMxL\" role=\"2ShVmc\">\n+ <ref role=\"37wK5l\" to=\"qvpu:~PArea.<init>(org.modelix.model.api.IBranch)\" resolve=\"PArea\" />\n+ <node concept=\"37vLTw\" id=\"1UvRDkPdMxM\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"7ZZZU$lt0Ue\" resolve=\"branch\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"3clFbJ\" id=\"7ZZZU$lskuV\" role=\"3cqZAp\">\n<node concept=\"3clFbS\" id=\"7ZZZU$lskuW\" role=\"3clFbx\">\n<node concept=\"3clFbF\" id=\"7ZZZU$lskuX\" role=\"3cqZAp\">\n<node concept=\"17RlXB\" id=\"7ZZZU$lskv6\" role=\"2OqNvi\" />\n</node>\n</node>\n- <node concept=\"3cpWs8\" id=\"7ZZZU$lskvb\" role=\"3cqZAp\">\n- <node concept=\"3cpWsn\" id=\"7ZZZU$lskvc\" role=\"3cpWs9\">\n+ <node concept=\"3cpWs8\" id=\"1UvRDkPhgcm\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"1UvRDkPhgcp\" role=\"3cpWs9\">\n<property role=\"TrG5h\" value=\"moduleId\" />\n- <node concept=\"3uibUv\" id=\"7ZZZU$lskvd\" role=\"1tU5fm\">\n+ <node concept=\"3uibUv\" id=\"1UvRDkPhgcq\" role=\"1tU5fm\">\n<ref role=\"3uigEE\" to=\"z1c3:~ModuleId\" resolve=\"ModuleId\" />\n</node>\n- <node concept=\"2YIFZM\" id=\"7ZZZU$lskve\" role=\"33vP2m\">\n+ <node concept=\"2YIFZM\" id=\"1UvRDkPhgcx\" role=\"33vP2m\">\n<ref role=\"1Pybhd\" to=\"z1c3:~ModuleId\" resolve=\"ModuleId\" />\n<ref role=\"37wK5l\" to=\"z1c3:~ModuleId.foreign(java.lang.String)\" resolve=\"foreign\" />\n- <node concept=\"3cpWs3\" id=\"7ZZZU$ltbrQ\" role=\"37wK5m\">\n- <node concept=\"2YIFZM\" id=\"7ZZZU$ltbrR\" role=\"3uHU7w\">\n- <ref role=\"37wK5l\" to=\"wyt6:~Long.toHexString(long)\" resolve=\"toHexString\" />\n+ <node concept=\"3cpWs3\" id=\"1UvRDkPhgcy\" role=\"37wK5m\">\n+ <node concept=\"2YIFZM\" id=\"1UvRDkPhgcz\" role=\"3uHU7w\">\n<ref role=\"1Pybhd\" to=\"wyt6:~Long\" resolve=\"Long\" />\n- <node concept=\"37vLTw\" id=\"7ZZZU$ltbSG\" role=\"37wK5m\">\n+ <ref role=\"37wK5l\" to=\"wyt6:~Long.toHexString(long)\" resolve=\"toHexString\" />\n+ <node concept=\"37vLTw\" id=\"1UvRDkPhgc$\" role=\"37wK5m\">\n<ref role=\"3cqZAo\" node=\"7ZZZU$lnh9j\" resolve=\"moduleNodeId\" />\n</node>\n</node>\n- <node concept=\"3cpWs3\" id=\"7ZZZU$ltbrT\" role=\"3uHU7B\">\n- <node concept=\"2OqwBi\" id=\"7ZZZU$ltbrW\" role=\"3uHU7B\">\n- <node concept=\"1rXfSq\" id=\"7ZZZU$ltdiD\" role=\"2Oq$k0\">\n+ <node concept=\"3cpWs3\" id=\"1UvRDkPhgc_\" role=\"3uHU7B\">\n+ <node concept=\"2OqwBi\" id=\"1UvRDkPhgcA\" role=\"3uHU7B\">\n+ <node concept=\"1rXfSq\" id=\"1UvRDkPhgcB\" role=\"2Oq$k0\">\n<ref role=\"37wK5l\" node=\"7ZZZU$lrGZt\" resolve=\"getCloudRepository\" />\n</node>\n- <node concept=\"liA8E\" id=\"7ZZZU$ltdTB\" role=\"2OqNvi\">\n+ <node concept=\"liA8E\" id=\"1UvRDkPhgcC\" role=\"2OqNvi\">\n<ref role=\"37wK5l\" node=\"6hBdEE_qGhg\" resolve=\"completeId\" />\n</node>\n</node>\n- <node concept=\"Xl_RD\" id=\"7ZZZU$ltbs1\" role=\"3uHU7w\">\n+ <node concept=\"Xl_RD\" id=\"1UvRDkPhgcD\" role=\"3uHU7w\">\n<property role=\"Xl_RC\" value=\"-\" />\n</node>\n</node>\n</node>\n</node>\n</node>\n+ <node concept=\"3clFbH\" id=\"1UvRDkPhgaM\" role=\"3cqZAp\" />\n+ <node concept=\"3clFbJ\" id=\"1UvRDkPhdUX\" role=\"3cqZAp\">\n+ <node concept=\"3clFbS\" id=\"1UvRDkPhdUZ\" role=\"3clFbx\">\n+ <node concept=\"3cpWs8\" id=\"1UvRDkPhiMV\" role=\"3cqZAp\">\n+ <node concept=\"3cpWsn\" id=\"1UvRDkPhiMW\" role=\"3cpWs9\">\n+ <property role=\"TrG5h\" value=\"temptativeModuleId\" />\n+ <node concept=\"3uibUv\" id=\"1UvRDkPhiMX\" role=\"1tU5fm\">\n+ <ref role=\"3uigEE\" to=\"z1c3:~ModuleId\" resolve=\"ModuleId\" />\n+ </node>\n+ <node concept=\"2YIFZM\" id=\"1UvRDkPhiOg\" role=\"33vP2m\">\n+ <ref role=\"1Pybhd\" to=\"z1c3:~ModuleId\" resolve=\"ModuleId\" />\n+ <ref role=\"37wK5l\" to=\"z1c3:~ModuleId.fromString(java.lang.String)\" resolve=\"fromString\" />\n+ <node concept=\"37vLTw\" id=\"1UvRDkPhiOh\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"1UvRDkPdMed\" resolve=\"moduleIdStr\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3SKdUt\" id=\"1UvRDkPhr1D\" role=\"3cqZAp\">\n+ <node concept=\"1PaTwC\" id=\"1UvRDkPhr1E\" role=\"1aUNEU\">\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhr1F\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"This\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhr4h\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"could\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhr4k\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"happen\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhr4o\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"because\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhr4t\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"someone\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhr4H\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"clone\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhr4O\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"a\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhr4W\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"module\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhr55\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"to\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhr5f\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"Modelix\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhr5y\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"and\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhr5I\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"then\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhr6Q\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"try\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhr74\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"to\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhr7j\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"bind\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhr7z\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"it.\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3SKdUt\" id=\"1UvRDkPhrqR\" role=\"3cqZAp\">\n+ <node concept=\"1PaTwC\" id=\"1UvRDkPhrqS\" role=\"1aUNEU\">\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhrqT\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"In\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhrtL\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"this\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhrtO\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"case\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhrtS\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"we\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhrtX\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"want\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhrun\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"to\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhruu\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"give\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhruK\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"a\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhrv3\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"warning\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhrvd\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"to\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhrvo\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"the\" />\n+ </node>\n+ <node concept=\"3oM_SD\" id=\"1UvRDkPhrxN\" role=\"1PaTwD\">\n+ <property role=\"3oM_SC\" value=\"user\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3clFbJ\" id=\"1UvRDkPhqEL\" role=\"3cqZAp\">\n+ <node concept=\"3clFbS\" id=\"1UvRDkPhqEN\" role=\"3clFbx\">\n+ <node concept=\"3clFbF\" id=\"1UvRDkPhN1Y\" role=\"3cqZAp\">\n+ <node concept=\"2YIFZM\" id=\"1UvRDkPhN3o\" role=\"3clFbG\">\n+ <ref role=\"37wK5l\" node=\"1UvRDkPhMap\" resolve=\"notifyWarning\" />\n+ <ref role=\"1Pybhd\" node=\"7lOG3NPrKOz\" resolve=\"ModelixNotifications\" />\n+ <node concept=\"Xl_RD\" id=\"1UvRDkPhNmH\" role=\"37wK5m\">\n+ <property role=\"Xl_RC\" value=\"Module ID already used\" />\n+ </node>\n+ <node concept=\"3cpWs3\" id=\"1UvRDkPhPYs\" role=\"37wK5m\">\n+ <node concept=\"Xl_RD\" id=\"1UvRDkPhQax\" role=\"3uHU7w\">\n+ <property role=\"Xl_RC\" value=\" instead\" />\n+ </node>\n+ <node concept=\"3cpWs3\" id=\"1UvRDkPhPe9\" role=\"3uHU7B\">\n+ <node concept=\"3cpWs3\" id=\"1UvRDkPhOCg\" role=\"3uHU7B\">\n+ <node concept=\"3cpWs3\" id=\"1UvRDkPhNUg\" role=\"3uHU7B\">\n+ <node concept=\"Xl_RD\" id=\"1UvRDkPhN_z\" role=\"3uHU7B\">\n+ <property role=\"Xl_RC\" value=\"We cannot load the module with the ID \" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"1UvRDkPhOj5\" role=\"3uHU7w\">\n+ <ref role=\"3cqZAo\" node=\"1UvRDkPhiMW\" resolve=\"temptativeModuleId\" />\n+ </node>\n+ </node>\n+ <node concept=\"Xl_RD\" id=\"1UvRDkPhOOl\" role=\"3uHU7w\">\n+ <property role=\"Xl_RC\" value=\" as the module id seems to be already used. We will load it with module id \" />\n+ </node>\n+ </node>\n+ <node concept=\"37vLTw\" id=\"1UvRDkPhPCP\" role=\"3uHU7w\">\n+ <ref role=\"3cqZAo\" node=\"1UvRDkPhgcp\" resolve=\"moduleId\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"2OqwBi\" id=\"1UvRDkPhjGt\" role=\"3clFbw\">\n+ <node concept=\"2YIFZM\" id=\"1UvRDkPhj_D\" role=\"2Oq$k0\">\n+ <ref role=\"1Pybhd\" node=\"26ispG7Y1u2\" resolve=\"CloudTransientModules\" />\n+ <ref role=\"37wK5l\" node=\"49CIzaqqD1y\" resolve=\"getInstance\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"1UvRDkPhpXa\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" node=\"1UvRDkPhnA$\" resolve=\"isModuleIdUsed\" />\n+ <node concept=\"37vLTw\" id=\"1UvRDkPhqmj\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"1UvRDkPhiMW\" resolve=\"temptativeModuleId\" />\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"9aQIb\" id=\"1UvRDkPhqIx\" role=\"9aQIa\">\n+ <node concept=\"3clFbS\" id=\"1UvRDkPhqIy\" role=\"9aQI4\">\n+ <node concept=\"3clFbF\" id=\"1UvRDkPhs29\" role=\"3cqZAp\">\n+ <node concept=\"37vLTI\" id=\"1UvRDkPhsDj\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"1UvRDkPht1Z\" role=\"37vLTx\">\n+ <ref role=\"3cqZAo\" node=\"1UvRDkPhiMW\" resolve=\"temptativeModuleId\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"1UvRDkPhs28\" role=\"37vLTJ\">\n+ <ref role=\"3cqZAo\" node=\"1UvRDkPhgcp\" resolve=\"moduleId\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3y3z36\" id=\"1UvRDkPhfmu\" role=\"3clFbw\">\n+ <node concept=\"10Nm6u\" id=\"1UvRDkPhfUu\" role=\"3uHU7w\" />\n+ <node concept=\"37vLTw\" id=\"1UvRDkPheDv\" role=\"3uHU7B\">\n+ <ref role=\"3cqZAo\" node=\"1UvRDkPdMed\" resolve=\"moduleIdStr\" />\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"3clFbF\" id=\"7ZZZU$lskvh\" role=\"3cqZAp\">\n<node concept=\"37vLTI\" id=\"7ZZZU$lskvi\" role=\"3clFbG\">\n<node concept=\"37vLTw\" id=\"7ZZZU$lthhY\" role=\"37vLTJ\">\n<node concept=\"37vLTw\" id=\"7ZZZU$lskvn\" role=\"37wK5m\">\n<ref role=\"3cqZAo\" node=\"7ZZZU$lsP9a\" resolve=\"moduleName\" />\n</node>\n- <node concept=\"37vLTw\" id=\"7ZZZU$lskvo\" role=\"37wK5m\">\n- <ref role=\"3cqZAo\" node=\"7ZZZU$lskvc\" resolve=\"moduleId\" />\n+ <node concept=\"37vLTw\" id=\"1UvRDkPhtQX\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"1UvRDkPhgcp\" resolve=\"moduleId\" />\n</node>\n</node>\n</node>\n<property role=\"Xl_RC\" value=\"modelix\" />\n</node>\n</node>\n+ <node concept=\"2YIFZL\" id=\"1UvRDkPhMap\" role=\"jymVt\">\n+ <property role=\"TrG5h\" value=\"notifyWarning\" />\n+ <node concept=\"3clFbS\" id=\"1UvRDkPhMaq\" role=\"3clF47\">\n+ <node concept=\"3clFbF\" id=\"1UvRDkPhMar\" role=\"3cqZAp\">\n+ <node concept=\"2YIFZM\" id=\"1UvRDkPhMas\" role=\"3clFbG\">\n+ <ref role=\"1Pybhd\" to=\"fnpx:~Notifications$Bus\" resolve=\"Notifications.Bus\" />\n+ <ref role=\"37wK5l\" to=\"fnpx:~Notifications$Bus.notify(com.intellij.notification.Notification)\" resolve=\"notify\" />\n+ <node concept=\"2ShNRf\" id=\"1UvRDkPhMat\" role=\"37wK5m\">\n+ <node concept=\"1pGfFk\" id=\"1UvRDkPhMau\" role=\"2ShVmc\">\n+ <ref role=\"37wK5l\" to=\"fnpx:~Notification.<init>(java.lang.String,java.lang.String,java.lang.String,com.intellij.notification.NotificationType)\" resolve=\"Notification\" />\n+ <node concept=\"37vLTw\" id=\"1UvRDkPhMaK\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"7lOG3NPs_Yi\" resolve=\"GROUP_ID\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"1UvRDkPhMav\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"1UvRDkPhMaz\" resolve=\"title\" />\n+ </node>\n+ <node concept=\"37vLTw\" id=\"1UvRDkPhMaw\" role=\"37wK5m\">\n+ <ref role=\"3cqZAo\" node=\"1UvRDkPhMa_\" resolve=\"message\" />\n+ </node>\n+ <node concept=\"Rm8GO\" id=\"1UvRDkPhMlx\" role=\"37wK5m\">\n+ <ref role=\"Rm8GQ\" to=\"fnpx:~NotificationType.WARNING\" resolve=\"WARNING\" />\n+ <ref role=\"1Px2BO\" to=\"fnpx:~NotificationType\" resolve=\"NotificationType\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3cqZAl\" id=\"1UvRDkPhMay\" role=\"3clF45\" />\n+ <node concept=\"37vLTG\" id=\"1UvRDkPhMaz\" role=\"3clF46\">\n+ <property role=\"TrG5h\" value=\"title\" />\n+ <node concept=\"17QB3L\" id=\"1UvRDkPhMa$\" role=\"1tU5fm\" />\n+ </node>\n+ <node concept=\"37vLTG\" id=\"1UvRDkPhMa_\" role=\"3clF46\">\n+ <property role=\"TrG5h\" value=\"message\" />\n+ <node concept=\"17QB3L\" id=\"1UvRDkPhMaA\" role=\"1tU5fm\" />\n+ </node>\n+ <node concept=\"3Tm1VV\" id=\"1UvRDkPhMaB\" role=\"1B3o_S\" />\n+ </node>\n+ <node concept=\"2tJIrI\" id=\"1UvRDkPhM95\" role=\"jymVt\" />\n<node concept=\"2YIFZL\" id=\"7lOG3NPsfuK\" role=\"jymVt\">\n<property role=\"TrG5h\" value=\"notifyError\" />\n<node concept=\"3clFbS\" id=\"7lOG3NPsfuM\" role=\"3clF47\">\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | checking the ModuleId is not used already |
426,496 | 21.01.2022 14:13:29 | -3,600 | e02d49db29f570e3de2dac9d1921af96154e734a | New workspace-manager project
Is responsible for managing workspace configurations and proxying
access to imported git repositories. | [
{
"change_type": "MODIFY",
"old_path": ".idea/gradle.xml",
"new_path": ".idea/gradle.xml",
"diff": "<option value=\"$PROJECT_DIR$/ui-client\" />\n<option value=\"$PROJECT_DIR$/ui-proxy\" />\n<option value=\"$PROJECT_DIR$/ui-server\" />\n+ <option value=\"$PROJECT_DIR$/workspace-manager\" />\n</set>\n</option>\n</GradleProjectSettings>\n"
},
{
"change_type": "DELETE",
"old_path": "graphql-server/README.md",
"new_path": null,
"diff": "-# GraphQL Kotlin Ktor\n-\n-[Ktor](http://ktor.io/) is an asynchronous framework for creating microservices, web applications, and more.\n-\n-### Running locally\n-Build the application by running the following from examples root directory:\n-\n-```bash\n-# build example\n-./gradlew ktor-server:build\n-```\n-\n-> NOTE: in order to ensure you use the right version of Gradle we highly recommend that you use the provided wrapper scripts\n-\n-Start the server by running `Application.kt` directly from your IDE. (Make sure that your Kotlin Compiler jvm target is 1.8 or greater.)\n-Alternatively, you can start the server using Gradle.\n-\n-```bash\n-cd /path/to/graphql-kotlin/examples\n-./gradlew ktor-server:run\n-```\n-\n-Once the app has started you can explore the example schema by opening Playground endpoint at http://localhost:8080/playground\n-\n-#### Example query\n-\n-You can use the following example query to view several of the related models:\n-\n-```graphql\n-query {\n- searchCourses(params: { ids: [1,2,3] }) {\n- id\n- name\n- books {\n- title\n- }\n- university {\n- id\n- name\n- }\n- }\n-\n- searchUniversities(params: { ids: [1]}) {\n- id\n- name\n- }\n-}\n-```\n-\n-You can also query the `longThatNeverComes` field from several of the types. This will throw and exception,\n-allow you to see how the `ExecutionStrategy` handles throw exceptions in different levels of the query.\n"
},
{
"change_type": "MODIFY",
"old_path": "settings.gradle",
"new_path": "settings.gradle",
"diff": "@@ -10,3 +10,4 @@ include 'instances-manager'\ninclude 'gradle-plugin'\ninclude 'manual-tests'\ninclude 'graphql-server'\n+include 'workspace-manager'\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "workspace-manager/build.gradle.kts",
"diff": "+description = \"Allows multiple clients to work on the same set of modules from different sources\"\n+\n+val ktorVersion = \"1.6.5\"\n+val kotlinCoroutinesVersion = \"1.5.2\"\n+val kotlinVersion = \"1.5.31\"\n+val logbackVersion = \"1.2.1\"\n+\n+plugins {\n+ kotlin(\"jvm\") version \"1.5.31\"\n+ id(\"application\")\n+}\n+\n+application {\n+ mainClass.set(\"io.ktor.server.netty.EngineMain\")\n+}\n+\n+dependencies {\n+ implementation(\"io.ktor\", \"ktor-server-core\", ktorVersion)\n+ implementation(\"io.ktor\", \"ktor-server-netty\", ktorVersion)\n+ implementation(\"ch.qos.logback\", \"logback-classic\", logbackVersion)\n+ implementation(\"org.jetbrains.kotlinx\", \"kotlinx-coroutines-jdk8\", kotlinCoroutinesVersion)\n+ implementation(project(\":model-client\"))\n+}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/Application.kt",
"diff": "+/*\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package org.modelix.workspace.manager\n+\n+fun main(args: Array<String>): Unit = io.ktor.server.netty.EngineMain.main(args)\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManager.kt",
"diff": "+/*\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.modelix.workspace.manager\n+\n+class WorkspaceManager {\n+\n+}\n\\ No newline at end of file\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManagerModule.kt",
"diff": "+/*\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * https://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package org.modelix.workspace.manager\n+\n+import io.ktor.application.Application\n+import io.ktor.application.call\n+import io.ktor.application.install\n+import io.ktor.features.*\n+import io.ktor.http.*\n+import io.ktor.http.content.*\n+import io.ktor.response.*\n+import io.ktor.routing.Routing\n+import io.ktor.routing.get\n+import io.ktor.routing.post\n+import io.ktor.routing.routing\n+\n+fun Application.workspaceManagerModule() {\n+ install(Routing)\n+\n+ routing {\n+ defaultResource(\"html/index.html\")\n+\n+ post(\"new\") {\n+ this.call.respondText(\"{id:12345}\", ContentType.Application.Json, HttpStatusCode.Created)\n+ }\n+ }\n+\n+ install(CORS) {\n+ anyHost()\n+ header(HttpHeaders.ContentType)\n+ method(HttpMethod.Options)\n+ method(HttpMethod.Get)\n+ method(HttpMethod.Put)\n+ method(HttpMethod.Post)\n+ }\n+}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "workspace-manager/src/main/resources/application.conf",
"diff": "+ktor {\n+ deployment {\n+ port = 28103\n+ }\n+ application {\n+ modules = [\n+ org.modelix.workspace.manager.WorkspaceManagerModuleKt.workspaceManagerModule\n+ ]\n+ }\n+}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "workspace-manager/src/main/resources/html/index.html",
"diff": "+<!DOCTYPE html>\n+<html lang=\"en\">\n+<head>\n+ <meta charset=\"UTF-8\">\n+ <title>Workspace Manager</title>\n+</head>\n+<body>\n+ <h1>Add New Workspace</h1>\n+ <form action=\"new\" method=\"post\">\n+ <input type=\"submit\" value=\"Create New Workspace\"/>\n+ </form>\n+</body>\n+</html>\n\\ No newline at end of file\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "workspace-manager/src/main/resources/logback.xml",
"diff": "+<configuration>\n+ <appender name=\"STDOUT\" class=\"ch.qos.logback.core.ConsoleAppender\">\n+ <encoder>\n+ <pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>\n+ </encoder>\n+ </appender>\n+ <root level=\"trace\">\n+ <appender-ref ref=\"STDOUT\"/>\n+ </root>\n+ <logger name=\"org.eclipse.jetty\" level=\"INFO\"/>\n+ <logger name=\"io.netty\" level=\"INFO\"/>\n+ <logger name=\"graphql\" level=\"INFO\"/>\n+ <logger name=\"notprivacysafe.graphql\" level=\"INFO\"/>\n+</configuration>\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | New workspace-manager project
Is responsible for managing workspace configurations and proxying
access to imported git repositories. |
426,496 | 21.01.2022 14:14:02 | -3,600 | dc2f3a2e92edd9f9ed0ebb43a2a2db5b3939da06 | Workspace ID is generated by the model server | [
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManager.kt",
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManager.kt",
"diff": "*/\npackage org.modelix.workspace.manager\n+import org.modelix.model.client.RestWebModelClient\n+import org.modelix.model.lazy.ObjectStoreCache\n+import org.modelix.model.persistent.SerializationUtil\n+\nclass WorkspaceManager {\n+ private val modelClient: RestWebModelClient = RestWebModelClient(\"http://localhost:31963/model/\")\n+\n+ fun newWorkspaceId(): String {\n+ return SerializationUtil.longToHex(modelClient.idGenerator.generate())\n+ }\n}\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManagerModule.kt",
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManagerModule.kt",
"diff": "@@ -27,13 +27,17 @@ import io.ktor.routing.post\nimport io.ktor.routing.routing\nfun Application.workspaceManagerModule() {\n+\n+ val manager = WorkspaceManager()\n+\ninstall(Routing)\nrouting {\ndefaultResource(\"html/index.html\")\npost(\"new\") {\n- this.call.respondText(\"{id:12345}\", ContentType.Application.Json, HttpStatusCode.Created)\n+ val id = manager.newWorkspaceId()\n+ this.call.respondText(\"{id:$id}\", ContentType.Application.Json, HttpStatusCode.Created)\n}\n}\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Workspace ID is generated by the model server |
426,496 | 21.01.2022 14:59:39 | -3,600 | ff5cf0bb9ae26daa5323ba332dbdd8f97c7c0255 | YAML and JSON serializers for the workspace descriptor | [
{
"change_type": "MODIFY",
"old_path": "workspace-manager/build.gradle.kts",
"new_path": "workspace-manager/build.gradle.kts",
"diff": "@@ -7,6 +7,7 @@ val logbackVersion = \"1.2.1\"\nplugins {\nkotlin(\"jvm\") version \"1.5.31\"\n+ kotlin(\"plugin.serialization\") version \"1.5.31\"\nid(\"application\")\n}\n@@ -19,5 +20,7 @@ dependencies {\nimplementation(\"io.ktor\", \"ktor-server-netty\", ktorVersion)\nimplementation(\"ch.qos.logback\", \"logback-classic\", logbackVersion)\nimplementation(\"org.jetbrains.kotlinx\", \"kotlinx-coroutines-jdk8\", kotlinCoroutinesVersion)\n+ implementation(\"org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2\")\n+ implementation(\"com.charleskorn.kaml:kaml:0.40.0\")\nimplementation(project(\":model-client\"))\n}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/Workspace.kt",
"diff": "+/*\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.modelix.workspace.manager\n+\n+import kotlinx.serialization.Serializable\n+\n+@Serializable\n+data class Workspace(val id: String,\n+ val mpsVersion: String?,\n+ val modelRepositories: List<ModelRepository>?)\n+\n+@Serializable\n+data class ModelRepository(val id: String,\n+ val bindings: List<Binding>?)\n+\n+@Serializable\n+data class Binding(val project: String?,\n+ val module: String?)\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManager.kt",
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManager.kt",
"diff": "package org.modelix.workspace.manager\nimport org.modelix.model.client.RestWebModelClient\n-import org.modelix.model.lazy.ObjectStoreCache\nimport org.modelix.model.persistent.SerializationUtil\nclass WorkspaceManager {\nprivate val modelClient: RestWebModelClient = RestWebModelClient(\"http://localhost:31963/model/\")\n- fun newWorkspaceId(): String {\n- return SerializationUtil.longToHex(modelClient.idGenerator.generate())\n+ fun newWorkspace(): Workspace {\n+ return Workspace(\n+ id = SerializationUtil.longToHex(modelClient.idGenerator.generate()),\n+ mpsVersion = \"2020.3.5\",\n+ modelRepositories = listOf(ModelRepository(id = \"default\", bindings = null))\n+ )\n}\n}\n+\n"
},
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManagerModule.kt",
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManagerModule.kt",
"diff": "package org.modelix.workspace.manager\n+import com.charleskorn.kaml.Yaml\nimport io.ktor.application.Application\nimport io.ktor.application.call\nimport io.ktor.application.install\nimport io.ktor.features.*\nimport io.ktor.http.*\nimport io.ktor.http.content.*\n+import io.ktor.request.*\nimport io.ktor.response.*\nimport io.ktor.routing.Routing\n-import io.ktor.routing.get\nimport io.ktor.routing.post\nimport io.ktor.routing.routing\n+import kotlinx.serialization.encodeToString\n+import kotlinx.serialization.json.Json\nfun Application.workspaceManagerModule() {\n@@ -36,8 +39,12 @@ fun Application.workspaceManagerModule() {\ndefaultResource(\"html/index.html\")\npost(\"new\") {\n- val id = manager.newWorkspaceId()\n- this.call.respondText(\"{id:$id}\", ContentType.Application.Json, HttpStatusCode.Created)\n+ val workspace = manager.newWorkspace()\n+ val resultText = when(this.call.receiveParameters()[\"format\"]) {\n+ \"yaml\" -> Yaml.default.encodeToString(workspace)\n+ else -> Json.encodeToString(workspace)\n+ }\n+ this.call.respondText(resultText, ContentType.Application.Json, HttpStatusCode.Created)\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/resources/html/index.html",
"new_path": "workspace-manager/src/main/resources/html/index.html",
"diff": "<body>\n<h1>Add New Workspace</h1>\n<form action=\"new\" method=\"post\">\n+ <div>Result Format:\n+ <select name=\"format\">\n+ <option value=\"json\">JSON</option>\n+ <option value=\"yaml\">YAML</option>\n+ </select>\n+ </div>\n<input type=\"submit\" value=\"Create New Workspace\"/>\n</form>\n</body>\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | YAML and JSON serializers for the workspace descriptor |
426,496 | 22.01.2022 11:10:19 | -3,600 | 9744106268ed28ed3d7401f291d7d68b3926b9a7 | Workspace definition can be edited | [
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManager.kt",
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManager.kt",
"diff": "*/\npackage org.modelix.workspace.manager\n+import kotlinx.serialization.decodeFromString\n+import kotlinx.serialization.encodeToString\n+import kotlinx.serialization.json.Json\nimport org.modelix.model.client.RestWebModelClient\nimport org.modelix.model.persistent.SerializationUtil\n@@ -21,11 +24,25 @@ class WorkspaceManager {\nprivate val modelClient: RestWebModelClient = RestWebModelClient(\"http://localhost:31963/model/\")\nfun newWorkspace(): Workspace {\n- return Workspace(\n+ val workspace = Workspace(\nid = SerializationUtil.longToHex(modelClient.idGenerator.generate()),\nmpsVersion = \"2020.3.5\",\nmodelRepositories = listOf(ModelRepository(id = \"default\", bindings = null))\n)\n+ modelClient.put(key(workspace.id), Json.encodeToString(workspace))\n+ return workspace\n+ }\n+\n+ private fun key(workspaceId: String) = \"workspace-$workspaceId\"\n+\n+ fun getWorkspace(id: String): Workspace? {\n+ val jsonText = modelClient.get(key(id)) ?: return null\n+ return Json.decodeFromString<Workspace>(jsonText)\n+ }\n+\n+ fun update(workspace: Workspace) {\n+ val id = workspace.id\n+ modelClient.put(key(id), Json.encodeToString(workspace))\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManagerModule.kt",
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManagerModule.kt",
"diff": "@@ -23,11 +23,9 @@ import io.ktor.http.*\nimport io.ktor.http.content.*\nimport io.ktor.request.*\nimport io.ktor.response.*\n-import io.ktor.routing.Routing\n-import io.ktor.routing.post\n-import io.ktor.routing.routing\n+import io.ktor.routing.*\n+import kotlinx.serialization.decodeFromString\nimport kotlinx.serialization.encodeToString\n-import kotlinx.serialization.json.Json\nfun Application.workspaceManagerModule() {\n@@ -40,11 +38,49 @@ fun Application.workspaceManagerModule() {\npost(\"new\") {\nval workspace = manager.newWorkspace()\n- val resultText = when(this.call.receiveParameters()[\"format\"]) {\n- \"yaml\" -> Yaml.default.encodeToString(workspace)\n- else -> Json.encodeToString(workspace)\n+ call.respondRedirect(\"edit/${workspace.id}\")\n}\n- this.call.respondText(resultText, ContentType.Application.Json, HttpStatusCode.Created)\n+\n+ post(\"update\") {\n+ val yamlText = call.receiveParameters()[\"content\"]\n+ if (yamlText == null) {\n+ call.respond(HttpStatusCode.BadRequest, \"Content missing\")\n+ return@post\n+ }\n+ val workspace: Workspace\n+ try {\n+ workspace = Yaml.default.decodeFromString<Workspace>(yamlText)\n+ } catch (e: Exception) {\n+ call.respond(HttpStatusCode.BadRequest, e.message ?: \"Parse error\")\n+ return@post\n+ }\n+ manager.update(workspace)\n+ call.respondRedirect(\"edit/${workspace.id}\")\n+ }\n+\n+ get(\"edit/{workspaceId}\") {\n+ val id = call.parameters[\"workspaceId\"]\n+ if (id == null) {\n+ call.respond(HttpStatusCode.BadRequest, \"Workspace ID is missing\")\n+ return@get\n+ }\n+ val workspace = manager.getWorkspace(id)\n+ if (workspace == null) {\n+ call.respond(HttpStatusCode.NotFound, \"Workspace $id not found\")\n+ return@get\n+ }\n+ val yaml = Yaml.default.encodeToString(workspace)\n+ val htmlTemplate = Application::class.java.classLoader.getResource(\"html/edit.html\")?.readText()\n+ if (htmlTemplate == null) {\n+ call.respond(HttpStatusCode.InternalServerError, \"HTML template not found\")\n+ return@get\n+ }\n+ val html = htmlTemplate.replace(\"{{content}}\", yaml)\n+ this.call.respondText(html, ContentType.Text.Html, HttpStatusCode.OK)\n+ }\n+\n+ static {\n+ resources(\"html\")\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/resources/application.conf",
"new_path": "workspace-manager/src/main/resources/application.conf",
"diff": "ktor {\ndeployment {\n- port = 28103\n+ port = 28104\n}\napplication {\nmodules = [\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "workspace-manager/src/main/resources/html/ace.html",
"diff": "+<!DOCTYPE html>\n+<html lang=\"en\">\n+<head>\n+ <title>ACE in Action</title>\n+ <style type=\"text/css\" media=\"screen\">\n+ #editor {\n+ position: absolute;\n+ top: 0;\n+ right: 0;\n+ bottom: 0;\n+ left: 0;\n+ }\n+ </style>\n+</head>\n+<body>\n+\n+<div id=\"editor\">{{editor-content}}</div>\n+\n+<script src=\"ace/ace.js\" type=\"text/javascript\" charset=\"utf-8\"></script>\n+<script>\n+ let editor = ace.edit(\"editor\");\n+ editor.setTheme(\"ace/theme/clouds\");\n+ editor.session.setMode(\"ace/mode/yaml\");\n+</script>\n+</body>\n+</html>\n\\ No newline at end of file\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "workspace-manager/src/main/resources/html/edit.html",
"diff": "+<!DOCTYPE html>\n+<html lang=\"en\">\n+<head>\n+ <meta charset=\"UTF-8\">\n+ <title>Edit Workspace</title>\n+</head>\n+<body>\n+ <form action=\"../update\" method=\"post\">\n+ <input type=\"submit\" value=\"Update\" />\n+ <br/>\n+ <textarea name=\"content\" style=\"width: 800px; height: 500px\">{{content}}</textarea>\n+ </form>\n+</body>\n+</html>\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/resources/html/index.html",
"new_path": "workspace-manager/src/main/resources/html/index.html",
"diff": "<form action=\"new\" method=\"post\">\n<div>Result Format:\n<select name=\"format\">\n- <option value=\"json\">JSON</option>\n<option value=\"yaml\">YAML</option>\n+ <option value=\"json\">JSON</option>\n</select>\n</div>\n<input type=\"submit\" value=\"Create New Workspace\"/>\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Workspace definition can be edited |
426,496 | 23.01.2022 20:29:13 | -3,600 | 99b66825e4724e1c85955c38a45ea49a25fd0914 | MPS modules from git repositories can be downloaded | [
{
"change_type": "MODIFY",
"old_path": "workspace-manager/build.gradle.kts",
"new_path": "workspace-manager/build.gradle.kts",
"diff": "@@ -22,5 +22,6 @@ dependencies {\nimplementation(\"org.jetbrains.kotlinx\", \"kotlinx-coroutines-jdk8\", kotlinCoroutinesVersion)\nimplementation(\"org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2\")\nimplementation(\"com.charleskorn.kaml:kaml:0.40.0\")\n+ implementation(\"org.eclipse.jgit:org.eclipse.jgit:5.8.0.202006091008-r\")\nimplementation(project(\":model-client\"))\n}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/GitRepositoryManager.kt",
"diff": "+/*\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.modelix.workspace.manager\n+\n+import org.eclipse.jgit.api.Git\n+import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider\n+import org.modelix.model.persistent.HashUtil\n+import java.io.*\n+import java.lang.IllegalArgumentException\n+import java.nio.file.Files\n+import java.util.zip.ZipEntry\n+import java.util.zip.ZipOutputStream\n+import kotlin.io.path.Path\n+import kotlin.io.path.isDirectory\n+\n+class GitRepositoryManager(val url: String, val credentials: Credentials?, val branch: String?, val workspaceDirectory: File) {\n+ private val repoDirectory = File(workspaceDirectory, \"git-\" + HashUtil.sha256(\"$url $branch\").replace(\"*\", \"\"))\n+\n+ fun cloneRepo() {\n+ if (repoDirectory.exists()) return\n+\n+ val cmd = Git.cloneRepository()\n+ if (credentials != null) {\n+ cmd.setCredentialsProvider(UsernamePasswordCredentialsProvider(credentials.user, credentials.password))\n+ }\n+ cmd.setURI(url)\n+ if (branch != null) {\n+ cmd.setBranch(branch)\n+ }\n+ val directory = repoDirectory\n+ directory.mkdirs()\n+ cmd.setDirectory(directory)\n+ cmd.call()\n+ }\n+\n+ fun zip(roots: List<File>, outputStream: OutputStream) {\n+ if (outputStream is ZipOutputStream) throw IllegalArgumentException()\n+ ZipOutputStream(outputStream).use { output ->\n+ zip(roots, output)\n+ }\n+ }\n+\n+ fun zip(subfolders: List<String>?, output: ZipOutputStream) {\n+ cloneRepo()\n+ val roots: List<File> = if (subfolders == null || subfolders.isEmpty()) {\n+ listOf(repoDirectory)\n+ } else {\n+ subfolders.map { File(repoDirectory, it) }\n+ }\n+ val gitDir = File(repoDirectory, \".git\").toPath()\n+ roots.forEach { root ->\n+ Files.walk(root.toPath()).filter { !it.isDirectory() && !it.startsWith(gitDir) }.forEach { inputFile ->\n+ FileInputStream(inputFile.toFile()).use { input ->\n+ BufferedInputStream(input).use { origin ->\n+ println(\"adding file $inputFile\")\n+ val entry = ZipEntry(workspaceDirectory.toPath().relativize(inputFile).toString())\n+ output.putNextEntry(entry)\n+ origin.copyTo(output, 1024)\n+ }\n+ }\n+ }\n+ }\n+ }\n+}\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/Workspace.kt",
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/Workspace.kt",
"diff": "@@ -17,13 +17,23 @@ import kotlinx.serialization.Serializable\n@Serializable\ndata class Workspace(val id: String,\n- val mpsVersion: String?,\n- val modelRepositories: List<ModelRepository>?)\n+ val mpsVersion: String? = null,\n+ val modelRepositories: List<ModelRepository> = listOf(),\n+ val gitRepositories: List<GitRepository> = listOf())\n@Serializable\ndata class ModelRepository(val id: String,\n- val bindings: List<Binding>?)\n+ val bindings: List<Binding> = listOf())\n@Serializable\n-data class Binding(val project: String?,\n- val module: String?)\n\\ No newline at end of file\n+data class Binding(val project: String? = null,\n+ val module: String? = null)\n+\n+@Serializable\n+data class GitRepository(val url: String,\n+ val name: String? = null,\n+ val branch: String = \"master\",\n+ val paths: List<String> = listOf(),\n+ val credentialsRef: String? = null)\n+\n+data class Credentials(val user: String, val password: String)\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManager.kt",
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManager.kt",
"diff": "@@ -18,31 +18,61 @@ import kotlinx.serialization.encodeToString\nimport kotlinx.serialization.json.Json\nimport org.modelix.model.client.RestWebModelClient\nimport org.modelix.model.persistent.SerializationUtil\n+import java.io.File\n+import java.io.OutputStream\n+import java.util.zip.ZipOutputStream\nclass WorkspaceManager {\n-\nprivate val modelClient: RestWebModelClient = RestWebModelClient(\"http://localhost:31963/model/\")\n+ private val activeWorkspaces: MutableMap<String, Workspace> = HashMap()\n+ private val directory: File = File(\"modelix-workspaces\").absoluteFile\n+\n+ init {\n+ println(\"workspaces directory: $directory\")\n+ }\n+ @Synchronized\nfun newWorkspace(): Workspace {\nval workspace = Workspace(\nid = SerializationUtil.longToHex(modelClient.idGenerator.generate()),\nmpsVersion = \"2020.3.5\",\n- modelRepositories = listOf(ModelRepository(id = \"default\", bindings = null))\n+ modelRepositories = listOf(ModelRepository(id = \"default\"))\n)\nmodelClient.put(key(workspace.id), Json.encodeToString(workspace))\n+ activeWorkspaces[workspace.id] = workspace\nreturn workspace\n}\nprivate fun key(workspaceId: String) = \"workspace-$workspaceId\"\n+ @Synchronized\nfun getWorkspace(id: String): Workspace? {\n- val jsonText = modelClient.get(key(id)) ?: return null\n- return Json.decodeFromString<Workspace>(jsonText)\n+ var workspace = activeWorkspaces[id]\n+ if (workspace != null) return workspace\n+ val json = modelClient.get(key(id))\n+ if (json == null) return null\n+ workspace = Json.decodeFromString<Workspace>(json)\n+ activeWorkspaces[workspace.id] = workspace\n+ return workspace\n}\n+ @Synchronized\nfun update(workspace: Workspace) {\nval id = workspace.id\nmodelClient.put(key(id), Json.encodeToString(workspace))\n+ activeWorkspaces[workspace.id] = workspace\n+ }\n+\n+ fun getWorkspaceDirectory(workspace: Workspace) = File(directory, workspace.id)\n+\n+ fun downloadModules(workspaceId: String, stream: OutputStream) {\n+ val workspace = getWorkspace(workspaceId)!!\n+ ZipOutputStream(stream).use { zipStream ->\n+ workspace.gitRepositories.forEach { repo ->\n+ val repoManager = GitRepositoryManager(repo.url, null, repo.branch, getWorkspaceDirectory(workspace))\n+ repoManager.zip(repo.paths, zipStream)\n+ }\n+ }\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManagerModule.kt",
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManagerModule.kt",
"diff": "@@ -79,6 +79,12 @@ fun Application.workspaceManagerModule() {\nthis.call.respondText(html, ContentType.Text.Html, HttpStatusCode.OK)\n}\n+ get(\"download-modules/{workspaceId}\") {\n+ call.respondOutputStream(ContentType.Application.Zip, HttpStatusCode.OK) {\n+ manager.downloadModules(call.parameters[\"workspaceId\"]!!, this)\n+ }\n+ }\n+\nstatic {\nresources(\"html\")\n}\n"
},
{
"change_type": "DELETE",
"old_path": "workspace-manager/src/main/resources/html/ace.html",
"new_path": null,
"diff": "-<!DOCTYPE html>\n-<html lang=\"en\">\n-<head>\n- <title>ACE in Action</title>\n- <style type=\"text/css\" media=\"screen\">\n- #editor {\n- position: absolute;\n- top: 0;\n- right: 0;\n- bottom: 0;\n- left: 0;\n- }\n- </style>\n-</head>\n-<body>\n-\n-<div id=\"editor\">{{editor-content}}</div>\n-\n-<script src=\"ace/ace.js\" type=\"text/javascript\" charset=\"utf-8\"></script>\n-<script>\n- let editor = ace.edit(\"editor\");\n- editor.setTheme(\"ace/theme/clouds\");\n- editor.session.setMode(\"ace/mode/yaml\");\n-</script>\n-</body>\n-</html>\n\\ No newline at end of file\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | MPS modules from git repositories can be downloaded |
426,496 | 24.01.2022 10:32:09 | -3,600 | 603a4f4363ea101e3456bfe15c33bf9555b41db6 | Commit hash can be specified for dependencies from git repositories | [
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/GitRepositoryManager.kt",
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/GitRepositoryManager.kt",
"diff": "@@ -21,27 +21,37 @@ import java.lang.IllegalArgumentException\nimport java.nio.file.Files\nimport java.util.zip.ZipEntry\nimport java.util.zip.ZipOutputStream\n-import kotlin.io.path.Path\nimport kotlin.io.path.isDirectory\n-class GitRepositoryManager(val url: String, val credentials: Credentials?, val branch: String?, val workspaceDirectory: File) {\n- private val repoDirectory = File(workspaceDirectory, \"git-\" + HashUtil.sha256(\"$url $branch\").replace(\"*\", \"\"))\n+class GitRepositoryManager(val config: GitRepository, val credentials: Credentials?, val workspaceDirectory: File) {\n+ private val repoDirectory = File(workspaceDirectory, \"git-\" + HashUtil.sha256(\"${config.url} ${config.branch}\").replace(\"*\", \"\"))\n- fun cloneRepo() {\n- if (repoDirectory.exists()) return\n+ fun updateRepo() {\n+ val existed = repoDirectory.exists()\n+ val git = openRepo()\n+ if (existed) {\n+ git.checkout().setName(config.commitHash ?: config.branch).call()\n+ if (config.commitHash == null) {\n+ git.pull().call()\n+ }\n+ }\n+ }\n+\n+ private fun openRepo() = if (repoDirectory.exists()) Git.open(repoDirectory) else cloneRepo()\n+ private fun cloneRepo(): Git {\nval cmd = Git.cloneRepository()\nif (credentials != null) {\ncmd.setCredentialsProvider(UsernamePasswordCredentialsProvider(credentials.user, credentials.password))\n}\n- cmd.setURI(url)\n- if (branch != null) {\n- cmd.setBranch(branch)\n+ cmd.setURI(config.url)\n+ if (config.branch != null) {\n+ cmd.setBranch(config.branch)\n}\nval directory = repoDirectory\ndirectory.mkdirs()\ncmd.setDirectory(directory)\n- cmd.call()\n+ return cmd.call()\n}\nfun zip(roots: List<File>, outputStream: OutputStream) {\n@@ -52,7 +62,7 @@ class GitRepositoryManager(val url: String, val credentials: Credentials?, val b\n}\nfun zip(subfolders: List<String>?, output: ZipOutputStream) {\n- cloneRepo()\n+ updateRepo()\nval roots: List<File> = if (subfolders == null || subfolders.isEmpty()) {\nlistOf(repoDirectory)\n} else {\n@@ -63,7 +73,6 @@ class GitRepositoryManager(val url: String, val credentials: Credentials?, val b\nFiles.walk(root.toPath()).filter { !it.isDirectory() && !it.startsWith(gitDir) }.forEach { inputFile ->\nFileInputStream(inputFile.toFile()).use { input ->\nBufferedInputStream(input).use { origin ->\n- println(\"adding file $inputFile\")\nval entry = ZipEntry(workspaceDirectory.toPath().relativize(inputFile).toString())\noutput.putNextEntry(entry)\norigin.copyTo(output, 1024)\n"
},
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/Workspace.kt",
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/Workspace.kt",
"diff": "@@ -33,6 +33,7 @@ data class Binding(val project: String? = null,\ndata class GitRepository(val url: String,\nval name: String? = null,\nval branch: String = \"master\",\n+ val commitHash: String? = null,\nval paths: List<String> = listOf(),\nval credentialsRef: String? = null)\n"
},
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManager.kt",
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManager.kt",
"diff": "@@ -69,7 +69,7 @@ class WorkspaceManager {\nval workspace = getWorkspace(workspaceId)!!\nZipOutputStream(stream).use { zipStream ->\nworkspace.gitRepositories.forEach { repo ->\n- val repoManager = GitRepositoryManager(repo.url, null, repo.branch, getWorkspaceDirectory(workspace))\n+ val repoManager = GitRepositoryManager(repo, null, getWorkspaceDirectory(workspace))\nrepoManager.zip(repo.paths, zipStream)\n}\n}\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Commit hash can be specified for dependencies from git repositories |
426,496 | 24.01.2022 14:55:57 | -3,600 | 62dffafe7e3470c1af58354149786ca0bbe7da38 | Don't clone git repositories into an existing git repository (during development) | [
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManager.kt",
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManager.kt",
"diff": "@@ -25,7 +25,14 @@ import java.util.zip.ZipOutputStream\nclass WorkspaceManager {\nprivate val modelClient: RestWebModelClient = RestWebModelClient(\"http://localhost:31963/model/\")\nprivate val activeWorkspaces: MutableMap<String, Workspace> = HashMap()\n- private val directory: File = File(\"modelix-workspaces\").absoluteFile\n+ private val directory: File = run {\n+ // The workspace will contain git repositories. Avoid cloning them into an existing repository.\n+ val ancestors = mutableListOf(File(\".\").absoluteFile)\n+ while (ancestors.last().parentFile != null) ancestors += ancestors.last().parentFile\n+ val parentRepoDir = ancestors.lastOrNull { File(it, \".git\").exists() }\n+ val workspacesDir = if (parentRepoDir != null) File(parentRepoDir.parent, \"modelix-workspaces\") else File(\"modelix-workspaces\")\n+ workspacesDir.absoluteFile\n+ }\ninit {\nprintln(\"workspaces directory: $directory\")\n@@ -65,6 +72,7 @@ class WorkspaceManager {\nfun getWorkspaceDirectory(workspace: Workspace) = File(directory, workspace.id)\n+ @Synchronized\nfun downloadModules(workspaceId: String, stream: OutputStream) {\nval workspace = getWorkspace(workspaceId)!!\nZipOutputStream(stream).use { zipStream ->\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Don't clone git repositories into an existing git repository (during development) |
426,496 | 25.01.2022 14:59:16 | -3,600 | 450622c26ca8393f2109e2d536d06860c5c823f0 | Maven dependencies can be downloaded | [
{
"change_type": "MODIFY",
"old_path": "workspace-manager/build.gradle.kts",
"new_path": "workspace-manager/build.gradle.kts",
"diff": "@@ -23,5 +23,7 @@ dependencies {\nimplementation(\"org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2\")\nimplementation(\"com.charleskorn.kaml:kaml:0.40.0\")\nimplementation(\"org.eclipse.jgit:org.eclipse.jgit:5.8.0.202006091008-r\")\n+ implementation(\"org.apache.maven.shared:maven-invoker:3.1.0\")\n+ implementation(\"org.zeroturnaround:zt-zip:1.14\")\nimplementation(project(\":model-client\"))\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/GitRepositoryManager.kt",
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/GitRepositoryManager.kt",
"diff": "@@ -19,6 +19,7 @@ import org.modelix.model.persistent.HashUtil\nimport java.io.*\nimport java.lang.IllegalArgumentException\nimport java.nio.file.Files\n+import java.nio.file.Path\nimport java.util.zip.ZipEntry\nimport java.util.zip.ZipOutputStream\nimport kotlin.io.path.isDirectory\n@@ -70,15 +71,7 @@ class GitRepositoryManager(val config: GitRepository, val credentials: Credentia\n}\nval gitDir = File(repoDirectory, \".git\").toPath()\nroots.forEach { root ->\n- Files.walk(root.toPath()).filter { !it.isDirectory() && !it.startsWith(gitDir) }.forEach { inputFile ->\n- FileInputStream(inputFile.toFile()).use { input ->\n- BufferedInputStream(input).use { origin ->\n- val entry = ZipEntry(workspaceDirectory.toPath().relativize(inputFile).toString())\n- output.putNextEntry(entry)\n- origin.copyTo(output, 1024)\n- }\n- }\n- }\n+ output.copyFiles(root, {!it.startsWith(gitDir)}, { workspaceDirectory.toPath().relativize(it) })\n}\n}\n}\n\\ No newline at end of file\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/MavenDownloader.kt",
"diff": "+/*\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.modelix.workspace.manager\n+\n+import org.apache.maven.shared.invoker.DefaultInvocationRequest\n+import org.apache.maven.shared.invoker.DefaultInvoker\n+import java.io.File\n+import java.util.*\n+\n+class MavenDownloader(val workspace: Workspace, val workspaceDir: File) {\n+\n+ fun downloadFromMaven(coordinates: String): File {\n+ val request = DefaultInvocationRequest()\n+ request.goals = listOf(\"dependency:get\")\n+ val outputDir = File(workspaceDir, \"maven-\" + coordinates.replace(Regex(\"[^a-zA-Z0-9.]\"), \"_\"))\n+ outputDir.mkdirs()\n+ val properties = Properties()\n+ properties[\"remoteRepositories\"] = workspace.mavenRepositories.joinToString(\",\") { it.url }\n+ properties[\"dest\"] = outputDir.absolutePath\n+ properties[\"artifact\"] = addPackagingIfMissing(coordinates)\n+ request.properties = properties\n+\n+ invokeMaven(request)\n+ return outputDir\n+ }\n+\n+ private fun invokeMaven(request: DefaultInvocationRequest) {\n+ val invoker = DefaultInvoker()\n+ invoker.mavenHome = File(\"/usr/local/Cellar/maven/3.6.3_1/\")\n+ invoker.execute(request)\n+ }\n+\n+ private fun addPackagingIfMissing(coordinates: String): String {\n+ return if (coordinates.split(\":\").size == 3) coordinates + \":zip\" else coordinates\n+ }\n+}\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/Workspace.kt",
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/Workspace.kt",
"diff": "@@ -19,7 +19,9 @@ import kotlinx.serialization.Serializable\ndata class Workspace(val id: String,\nval mpsVersion: String? = null,\nval modelRepositories: List<ModelRepository> = listOf(),\n- val gitRepositories: List<GitRepository> = listOf())\n+ val gitRepositories: List<GitRepository> = listOf(),\n+ val mavenRepositories: List<MavenRepository> = listOf(),\n+ val mavenDependencies: List<String> = listOf())\n@Serializable\ndata class ModelRepository(val id: String,\n@@ -37,4 +39,8 @@ data class GitRepository(val url: String,\nval paths: List<String> = listOf(),\nval credentialsRef: String? = null)\n+@Serializable\ndata class Credentials(val user: String, val password: String)\n+\n+@Serializable\n+data class MavenRepository(val url: String)\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManager.kt",
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManager.kt",
"diff": "@@ -16,11 +16,16 @@ package org.modelix.workspace.manager\nimport kotlinx.serialization.decodeFromString\nimport kotlinx.serialization.encodeToString\nimport kotlinx.serialization.json.Json\n+import org.apache.maven.shared.invoker.DefaultInvocationRequest\n+import org.apache.maven.shared.invoker.DefaultInvoker\n+import org.apache.maven.shared.invoker.InvocationRequest\nimport org.modelix.model.client.RestWebModelClient\nimport org.modelix.model.persistent.SerializationUtil\nimport java.io.File\nimport java.io.OutputStream\n+import java.util.*\nimport java.util.zip.ZipOutputStream\n+import kotlin.collections.HashMap\nclass WorkspaceManager {\nprivate val modelClient: RestWebModelClient = RestWebModelClient(\"http://localhost:31963/model/\")\n@@ -76,11 +81,17 @@ class WorkspaceManager {\nfun downloadModules(workspaceId: String, stream: OutputStream) {\nval workspace = getWorkspace(workspaceId)!!\nZipOutputStream(stream).use { zipStream ->\n+ workspace.mavenDependencies.forEach { coordinates ->\n+ val downloadFolder = MavenDownloader(workspace, getWorkspaceDirectory(workspace)).downloadFromMaven(coordinates)\n+ zipStream.copyFiles(downloadFolder, mapPath = {getWorkspaceDirectory(workspace).toPath().relativize(it)})\n+ }\n+\nworkspace.gitRepositories.forEach { repo ->\nval repoManager = GitRepositoryManager(repo, null, getWorkspaceDirectory(workspace))\nrepoManager.zip(repo.paths, zipStream)\n}\n}\n}\n+\n}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/ZipUtils.kt",
"diff": "+/*\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.modelix.workspace.manager\n+\n+import org.zeroturnaround.zip.ZipUtil\n+import java.io.BufferedInputStream\n+import java.io.File\n+import java.io.FileInputStream\n+import java.io.InputStream\n+import java.nio.file.Files\n+import java.nio.file.Path\n+import java.nio.file.Paths\n+import java.util.zip.ZipEntry\n+import java.util.zip.ZipInputStream\n+import java.util.zip.ZipOutputStream\n+import kotlin.io.path.Path\n+import kotlin.io.path.extension\n+import kotlin.io.path.isDirectory\n+\n+fun ZipOutputStream.copyFiles(inputDir: File,\n+ filter: (Path) -> Boolean = { true },\n+ mapPath: (Path) -> Path = { inputDir.toPath().relativize(it) },\n+ extractZipFiles: Boolean = true) {\n+ Files.walk(inputDir.toPath()).filter { !it.isDirectory() && filter(it) }.forEach { inputFile ->\n+ if (extractZipFiles && inputFile.extension.lowercase() == \"zip\") {\n+ copyZipContent(inputFile.toFile(), mapPath(inputFile))\n+ } else {\n+ FileInputStream(inputFile.toFile()).use { input ->\n+ copyFile(input, mapPath(inputFile))\n+ }\n+ }\n+\n+ }\n+}\n+\n+private fun ZipOutputStream.copyFile(input: InputStream, outputPath: Path) {\n+ BufferedInputStream(input).use { origin ->\n+ val entry = ZipEntry(outputPath.toString())\n+ putNextEntry(entry)\n+ origin.copyTo(this, 1024)\n+ }\n+}\n+\n+fun ZipOutputStream.copyZipContent(input: File, outputDir: Path) {\n+ ZipUtil.iterate(input) {stream, entry ->\n+ if (entry.isDirectory) return@iterate\n+ copyFile(stream, outputDir.resolve(entry.name))\n+ }\n+}\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Maven dependencies can be downloaded |
426,496 | 25.01.2022 15:22:19 | -3,600 | 9d2d8ca78af464baddd432acbfdd730abbd06c4f | Skip git subfolders that don't exist. Otherwise, the download fails. | [
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/GitRepositoryManager.kt",
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/GitRepositoryManager.kt",
"diff": "@@ -70,8 +70,13 @@ class GitRepositoryManager(val config: GitRepository, val credentials: Credentia\nsubfolders.map { File(repoDirectory, it) }\n}\nval gitDir = File(repoDirectory, \".git\").toPath()\n- roots.forEach { root ->\n- output.copyFiles(root, {!it.startsWith(gitDir)}, { workspaceDirectory.toPath().relativize(it) })\n+ roots.filter { it.exists() }.forEach { root ->\n+ output.copyFiles(\n+ inputDir = root,\n+ filter = { !it.startsWith(gitDir) },\n+ mapPath = { workspaceDirectory.toPath().relativize(it) },\n+ extractZipFiles = false\n+ )\n}\n}\n}\n\\ No newline at end of file\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Skip git subfolders that don't exist. Otherwise, the download fails. |
426,496 | 25.01.2022 15:41:42 | -3,600 | d70c906112f08017e3fc12de1197750446134a89 | Download link for the imported maven and git files | [
{
"change_type": "MODIFY",
"old_path": "workspace-manager/build.gradle.kts",
"new_path": "workspace-manager/build.gradle.kts",
"diff": "@@ -25,5 +25,6 @@ dependencies {\nimplementation(\"org.eclipse.jgit:org.eclipse.jgit:5.8.0.202006091008-r\")\nimplementation(\"org.apache.maven.shared:maven-invoker:3.1.0\")\nimplementation(\"org.zeroturnaround:zt-zip:1.14\")\n+ implementation(\"org.apache.commons:commons-text:1.9\")\nimplementation(project(\":model-client\"))\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManagerModule.kt",
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManagerModule.kt",
"diff": "@@ -26,6 +26,7 @@ import io.ktor.response.*\nimport io.ktor.routing.*\nimport kotlinx.serialization.decodeFromString\nimport kotlinx.serialization.encodeToString\n+import org.apache.commons.text.StringEscapeUtils\nfun Application.workspaceManagerModule() {\n@@ -75,7 +76,9 @@ fun Application.workspaceManagerModule() {\ncall.respond(HttpStatusCode.InternalServerError, \"HTML template not found\")\nreturn@get\n}\n- val html = htmlTemplate.replace(\"{{content}}\", yaml)\n+ val html = htmlTemplate\n+ .replace(\"{{content}}\", StringEscapeUtils.escapeHtml4(yaml))\n+ .replace(\"{{workspaceId}}\", id)\nthis.call.respondText(html, ContentType.Text.Html, HttpStatusCode.OK)\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/resources/html/edit.html",
"new_path": "workspace-manager/src/main/resources/html/edit.html",
"diff": "<br/>\n<textarea name=\"content\" style=\"width: 800px; height: 500px\">{{content}}</textarea>\n</form>\n+\n+ <div><a href=\"../download-modules/{{workspaceId}}\">Download Modules</a></div>\n</body>\n</html>\n\\ No newline at end of file\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Download link for the imported maven and git files |
426,496 | 25.01.2022 17:15:13 | -3,600 | 4d32dd8ac95f6fc5d0345e8e5ca689d7d734b565 | When a workspace definition is saved, store the latest commit hash
This guarantees that all clients work on the same version. | [
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/GitRepositoryManager.kt",
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/GitRepositoryManager.kt",
"diff": "@@ -27,7 +27,7 @@ import kotlin.io.path.isDirectory\nclass GitRepositoryManager(val config: GitRepository, val credentials: Credentials?, val workspaceDirectory: File) {\nprivate val repoDirectory = File(workspaceDirectory, \"git-\" + HashUtil.sha256(\"${config.url} ${config.branch}\").replace(\"*\", \"\"))\n- fun updateRepo() {\n+ fun updateRepo(): String {\nval existed = repoDirectory.exists()\nval git = openRepo()\nif (existed) {\n@@ -36,6 +36,7 @@ class GitRepositoryManager(val config: GitRepository, val credentials: Credentia\ngit.pull().call()\n}\n}\n+ return git.repository.exactRef(\"HEAD\").objectId.name\n}\nprivate fun openRepo() = if (repoDirectory.exists()) Git.open(repoDirectory) else cloneRepo()\n"
},
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/Workspace.kt",
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/Workspace.kt",
"diff": "@@ -35,7 +35,7 @@ data class Binding(val project: String? = null,\ndata class GitRepository(val url: String,\nval name: String? = null,\nval branch: String = \"master\",\n- val commitHash: String? = null,\n+ var commitHash: String? = null,\nval paths: List<String> = listOf(),\nval credentialsRef: String? = null)\n"
},
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManager.kt",
"new_path": "workspace-manager/src/main/kotlin/org/modelix/workspace/manager/WorkspaceManager.kt",
"diff": "@@ -16,14 +16,10 @@ package org.modelix.workspace.manager\nimport kotlinx.serialization.decodeFromString\nimport kotlinx.serialization.encodeToString\nimport kotlinx.serialization.json.Json\n-import org.apache.maven.shared.invoker.DefaultInvocationRequest\n-import org.apache.maven.shared.invoker.DefaultInvoker\n-import org.apache.maven.shared.invoker.InvocationRequest\nimport org.modelix.model.client.RestWebModelClient\nimport org.modelix.model.persistent.SerializationUtil\nimport java.io.File\nimport java.io.OutputStream\n-import java.util.*\nimport java.util.zip.ZipOutputStream\nimport kotlin.collections.HashMap\n@@ -70,11 +66,24 @@ class WorkspaceManager {\n@Synchronized\nfun update(workspace: Workspace) {\n+ loadCommitHashes(workspace)\nval id = workspace.id\nmodelClient.put(key(id), Json.encodeToString(workspace))\nactiveWorkspaces[workspace.id] = workspace\n}\n+ @Synchronized\n+ private fun loadCommitHashes(workspace: Workspace) {\n+ workspace.gitRepositories.forEach { repo ->\n+ if (repo.commitHash.isNullOrEmpty()) {\n+ // This ensures that all clients work on the same version.\n+ // Updating to a new version can be done by setting the commitHash back to null\n+ // to re-trigger this code.\n+ repo.commitHash = GitRepositoryManager(repo, null, getWorkspaceDirectory(workspace)).updateRepo()\n+ }\n+ }\n+ }\n+\nfun getWorkspaceDirectory(workspace: Workspace) = File(directory, workspace.id)\n@Synchronized\n"
},
{
"change_type": "MODIFY",
"old_path": "workspace-manager/src/main/resources/html/edit.html",
"new_path": "workspace-manager/src/main/resources/html/edit.html",
"diff": "</head>\n<body>\n<form action=\"../update\" method=\"post\">\n- <input type=\"submit\" value=\"Update\" />\n+ <input type=\"submit\" value=\"Save\" />\n<br/>\n<textarea name=\"content\" style=\"width: 800px; height: 500px\">{{content}}</textarea>\n</form>\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | When a workspace definition is saved, store the latest commit hash
This guarantees that all clients work on the same version. |
426,504 | 26.01.2022 09:36:19 | -3,600 | 4e645fb71be2a7e73f6993299dca7e78ed9475c5 | attach solutions exported to project repo, when a project is present | [
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"diff": "</node>\n</node>\n</node>\n+ <node concept=\"2tJIrI\" id=\"7WFnR6mbvcL\" role=\"jymVt\" />\n<node concept=\"3clFbW\" id=\"5Ns9HDw1b9V\" role=\"jymVt\">\n<node concept=\"37vLTG\" id=\"5Ns9HDw1b9W\" role=\"3clF46\">\n<property role=\"TrG5h\" value=\"treeInRepository\" />\n</node>\n</node>\n</node>\n+ <node concept=\"3clFbJ\" id=\"7WFnR6mbR9N\" role=\"3cqZAp\">\n+ <node concept=\"3clFbS\" id=\"7WFnR6mbR9P\" role=\"3clFbx\">\n+ <node concept=\"3clFbF\" id=\"7WFnR6mc7w4\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"7WFnR6mc845\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"7WFnR6mc7w2\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"29etMtbjRnF\" resolve=\"solution\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"7WFnR6mc8_T\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"z1c3:~AbstractModule.attach(org.jetbrains.mps.openapi.module.SRepository)\" resolve=\"attach\" />\n+ <node concept=\"2OqwBi\" id=\"7WFnR6mc8Dn\" role=\"37wK5m\">\n+ <node concept=\"37vLTw\" id=\"7WFnR6mc8Do\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"Aop38Igauc\" resolve=\"mpsProject\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"7WFnR6mc8Dp\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"z1c3:~Project.getRepository()\" resolve=\"getRepository\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"3y3z36\" id=\"7WFnR6mbXPD\" role=\"3clFbw\">\n+ <node concept=\"10Nm6u\" id=\"7WFnR6mbZXg\" role=\"3uHU7w\" />\n+ <node concept=\"37vLTw\" id=\"7WFnR6mbUHB\" role=\"3uHU7B\">\n+ <ref role=\"3cqZAo\" node=\"Aop38Igauc\" resolve=\"mpsProject\" />\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"3cpWs8\" id=\"5cWpYFRBTcP\" role=\"3cqZAp\">\n<node concept=\"3cpWsn\" id=\"5cWpYFRBTcS\" role=\"3cpWs9\">\n<property role=\"TrG5h\" value=\"i\" />\n"
},
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.plugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.plugin.mps",
"diff": "</node>\n<node concept=\"liA8E\" id=\"OmBhSVK3WA\" role=\"2OqNvi\">\n<ref role=\"37wK5l\" to=\"guwi:~PrintStream.println(java.lang.String)\" resolve=\"println\" />\n- <node concept=\"Xl_RD\" id=\"OmBhSVK3WB\" role=\"37wK5m\">\n- <property role=\"Xl_RC\" value=\"Modelix Application Plugin - Got the project\" />\n+ <node concept=\"3cpWs3\" id=\"7WFnR6mbEFu\" role=\"37wK5m\">\n+ <node concept=\"37vLTw\" id=\"7WFnR6mbGi3\" role=\"3uHU7w\">\n+ <ref role=\"3cqZAo\" node=\"2pMrK1So3E7\" resolve=\"mpsProject\" />\n+ </node>\n+ <node concept=\"Xl_RD\" id=\"OmBhSVK3WB\" role=\"3uHU7B\">\n+ <property role=\"Xl_RC\" value=\"Modelix Application Plugin - Got the project: \" />\n+ </node>\n</node>\n</node>\n</node>\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | attach solutions exported to project repo, when a project is present |
426,504 | 26.01.2022 09:41:05 | -3,600 | 1a1e442cc70ba0cc3c016d1f87a638e743ed8b35 | removing useless traversal of model roots | [
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"diff": "</node>\n</node>\n</node>\n- <node concept=\"3cpWs8\" id=\"5cWpYFRBTcP\" role=\"3cqZAp\">\n- <node concept=\"3cpWsn\" id=\"5cWpYFRBTcS\" role=\"3cpWs9\">\n- <property role=\"TrG5h\" value=\"i\" />\n- <node concept=\"10Oyi0\" id=\"5cWpYFRBTcN\" role=\"1tU5fm\" />\n- <node concept=\"3cmrfG\" id=\"5cWpYFRBVZR\" role=\"33vP2m\">\n- <property role=\"3cmrfH\" value=\"0\" />\n- </node>\n- </node>\n- </node>\n- <node concept=\"2Gpval\" id=\"5cWpYFRBGwK\" role=\"3cqZAp\">\n- <node concept=\"2GrKxI\" id=\"5cWpYFRBGwM\" role=\"2Gsz3X\">\n- <property role=\"TrG5h\" value=\"mr\" />\n- </node>\n- <node concept=\"3clFbS\" id=\"5cWpYFRBGwQ\" role=\"2LFqv$\">\n- <node concept=\"3clFbF\" id=\"5cWpYFRBXSA\" role=\"3cqZAp\">\n- <node concept=\"3uNrnE\" id=\"5cWpYFRBYYt\" role=\"3clFbG\">\n- <node concept=\"37vLTw\" id=\"5cWpYFRBYYv\" role=\"2$L3a6\">\n- <ref role=\"3cqZAo\" node=\"5cWpYFRBTcS\" resolve=\"i\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"2OqwBi\" id=\"5cWpYFRBNba\" role=\"2GsD0m\">\n- <node concept=\"37vLTw\" id=\"5cWpYFRBNbb\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"29etMtbjRnF\" resolve=\"solution\" />\n- </node>\n- <node concept=\"liA8E\" id=\"5cWpYFRBNbc\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"z1c3:~AbstractModule.getModelRoots()\" resolve=\"getModelRoots\" />\n- </node>\n- </node>\n- </node>\n- <node concept=\"3clFbH\" id=\"5cWpYFRAs_C\" role=\"3cqZAp\" />\n<node concept=\"3clFbJ\" id=\"Aop38IgRPh\" role=\"3cqZAp\">\n<node concept=\"3clFbS\" id=\"Aop38IgRPj\" role=\"3clFbx\">\n<node concept=\"3clFbF\" id=\"Aop38IgfUo\" role=\"3cqZAp\">\n</node>\n</node>\n</node>\n- <node concept=\"3clFbF\" id=\"5cWpYFRDanU\" role=\"3cqZAp\">\n- <node concept=\"37vLTI\" id=\"5cWpYFRDanW\" role=\"3clFbG\">\n- <node concept=\"3cmrfG\" id=\"5cWpYFRD6m0\" role=\"37vLTx\">\n- <property role=\"3cmrfH\" value=\"0\" />\n- </node>\n- <node concept=\"37vLTw\" id=\"5cWpYFRDjah\" role=\"37vLTJ\">\n- <ref role=\"3cqZAo\" node=\"5cWpYFRBTcS\" resolve=\"i\" />\n- </node>\n- </node>\n- </node>\n- <node concept=\"2Gpval\" id=\"5cWpYFRD6m1\" role=\"3cqZAp\">\n- <node concept=\"2GrKxI\" id=\"5cWpYFRD6m2\" role=\"2Gsz3X\">\n- <property role=\"TrG5h\" value=\"mr\" />\n- </node>\n- <node concept=\"3clFbS\" id=\"5cWpYFRD6m3\" role=\"2LFqv$\">\n- <node concept=\"3clFbF\" id=\"5cWpYFRD6m4\" role=\"3cqZAp\">\n- <node concept=\"3uNrnE\" id=\"5cWpYFRD6m5\" role=\"3clFbG\">\n- <node concept=\"37vLTw\" id=\"5cWpYFRD6m6\" role=\"2$L3a6\">\n- <ref role=\"3cqZAo\" node=\"5cWpYFRBTcS\" resolve=\"i\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"2OqwBi\" id=\"5cWpYFRD6m7\" role=\"2GsD0m\">\n- <node concept=\"37vLTw\" id=\"5cWpYFRD6m8\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"29etMtbjRnF\" resolve=\"solution\" />\n- </node>\n- <node concept=\"liA8E\" id=\"5cWpYFRD6m9\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"z1c3:~AbstractModule.getModelRoots()\" resolve=\"getModelRoots\" />\n- </node>\n- </node>\n- </node>\n- <node concept=\"3clFbH\" id=\"5cWpYFRGCi2\" role=\"3cqZAp\" />\n<node concept=\"3clFbJ\" id=\"Aop38IfhBo\" role=\"3cqZAp\">\n<node concept=\"3clFbS\" id=\"Aop38IfhBq\" role=\"3clFbx\">\n<node concept=\"YS8fn\" id=\"Aop38IftJ3\" role=\"3cqZAp\">\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | removing useless traversal of model roots |
426,504 | 26.01.2022 11:47:10 | -3,600 | d91aea026dce2e5833e2146894611177656cd76f | removing unnecessary call to repository attach | [
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.mps",
"diff": "</node>\n</node>\n</node>\n- <node concept=\"3clFbJ\" id=\"7WFnR6mbR9N\" role=\"3cqZAp\">\n- <node concept=\"3clFbS\" id=\"7WFnR6mbR9P\" role=\"3clFbx\">\n- <node concept=\"3clFbF\" id=\"7WFnR6mc7w4\" role=\"3cqZAp\">\n- <node concept=\"2OqwBi\" id=\"7WFnR6mc845\" role=\"3clFbG\">\n- <node concept=\"37vLTw\" id=\"7WFnR6mc7w2\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"29etMtbjRnF\" resolve=\"solution\" />\n- </node>\n- <node concept=\"liA8E\" id=\"7WFnR6mc8_T\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"z1c3:~AbstractModule.attach(org.jetbrains.mps.openapi.module.SRepository)\" resolve=\"attach\" />\n- <node concept=\"2OqwBi\" id=\"7WFnR6mc8Dn\" role=\"37wK5m\">\n- <node concept=\"37vLTw\" id=\"7WFnR6mc8Do\" role=\"2Oq$k0\">\n- <ref role=\"3cqZAo\" node=\"Aop38Igauc\" resolve=\"mpsProject\" />\n- </node>\n- <node concept=\"liA8E\" id=\"7WFnR6mc8Dp\" role=\"2OqNvi\">\n- <ref role=\"37wK5l\" to=\"z1c3:~Project.getRepository()\" resolve=\"getRepository\" />\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- </node>\n- <node concept=\"3y3z36\" id=\"7WFnR6mbXPD\" role=\"3clFbw\">\n- <node concept=\"10Nm6u\" id=\"7WFnR6mbZXg\" role=\"3uHU7w\" />\n- <node concept=\"37vLTw\" id=\"7WFnR6mbUHB\" role=\"3uHU7B\">\n- <ref role=\"3cqZAo\" node=\"Aop38Igauc\" resolve=\"mpsProject\" />\n- </node>\n- </node>\n- </node>\n<node concept=\"3clFbJ\" id=\"Aop38IgRPh\" role=\"3cqZAp\">\n<node concept=\"3clFbS\" id=\"Aop38IgRPj\" role=\"3clFbx\">\n<node concept=\"3clFbF\" id=\"Aop38IgfUo\" role=\"3cqZAp\">\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | removing unnecessary call to repository attach |
426,504 | 27.01.2022 10:10:57 | -3,600 | 1d7d8a844ba100f7fdf3493ef1df20e588f9b2e9 | adding configuration for running make before export | [
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/EnvironmentLoader.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/EnvironmentLoader.java",
"diff": "@@ -38,6 +38,7 @@ public class EnvironmentLoader {\nADDITIONAL_PLUGIN_DIRS(\"additionalPluginDirs\"),\nMPS_EXTENSIONS_PATH(\"mpsExtensionsPath\"),\nMODELIX_PATH(\"modelixPath\"),\n+ MAKE(\"make\"),\nPROJECT(\"project\");\nprivate String code;\n"
},
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelPlugin.java",
"diff": "@@ -114,6 +114,9 @@ public class ModelPlugin implements Plugin<Project> {\nif (settings.getModelixArtifactsPath() != null) {\njavaExec.args(Key.MODELIX_PATH.getCode(), settings.getModelixArtifactsPath());\n}\n+ if (settings.isMakeProjectSet()) {\n+ javaExec.args(Key.MAKE.getCode(), \"project\");\n+ }\nif (settings.isDebug()) {\njavaExec.setDebug(true);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelixModelSettings.java",
"new_path": "gradle-plugin/src/main/java/org/modelix/gradle/model/ModelixModelSettings.java",
"diff": "@@ -69,6 +69,7 @@ public class ModelixModelSettings {\nprivate String projectPath = null;\nprivate boolean debug = false;\nprivate int timeoutSeconds = 120;\n+ private boolean makeProject = false;\nList<String> additionalLibraries = new LinkedList<String>();\nList<String> additionalLibraryDirs = new LinkedList<String>();\n@@ -117,6 +118,14 @@ public class ModelixModelSettings {\nreturn this.mpsPath;\n}\n+ public boolean isMakeProjectSet() {\n+ return this.makeProject;\n+ }\n+\n+ public void setMakeProject(boolean newValue) {\n+ this.makeProject = newValue;\n+ }\n+\npublic File getProjectFile() {\nif (this.projectPath == null) {\nreturn null;\n"
},
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.plugin.mps",
"new_path": "mps/org.modelix.model.mpsplugin/models/org.modelix.model.mpsplugin.plugin.mps",
"diff": "</node>\n<node concept=\"3clFbJ\" id=\"25JjLrsC2qT\" role=\"3cqZAp\">\n<node concept=\"3clFbS\" id=\"25JjLrsC2qV\" role=\"3clFbx\">\n+ <node concept=\"3clFbF\" id=\"25JjLrsEpl0\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"25JjLrsEpl1\" role=\"3clFbG\">\n+ <node concept=\"10M0yZ\" id=\"25JjLrsEpl2\" role=\"2Oq$k0\">\n+ <ref role=\"1PxDUh\" to=\"wyt6:~System\" resolve=\"System\" />\n+ <ref role=\"3cqZAo\" to=\"wyt6:~System.out\" resolve=\"out\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"25JjLrsEpl3\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"guwi:~PrintStream.println(java.lang.String)\" resolve=\"println\" />\n+ <node concept=\"Xl_RD\" id=\"25JjLrsEpl6\" role=\"37wK5m\">\n+ <property role=\"Xl_RC\" value=\"Modelix Application Plugin - No need to run make\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"3clFbF\" id=\"25JjLrsCI2y\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"25JjLrsCJhX\" role=\"3clFbG\">\n<node concept=\"37vLTw\" id=\"25JjLrsCI2u\" role=\"2Oq$k0\">\n</node>\n<node concept=\"9aQIb\" id=\"25JjLrsCL0N\" role=\"9aQIa\">\n<node concept=\"3clFbS\" id=\"25JjLrsCL0O\" role=\"9aQI4\">\n+ <node concept=\"3clFbF\" id=\"25JjLrsEvan\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"25JjLrsEvao\" role=\"3clFbG\">\n+ <node concept=\"10M0yZ\" id=\"25JjLrsEvap\" role=\"2Oq$k0\">\n+ <ref role=\"1PxDUh\" to=\"wyt6:~System\" resolve=\"System\" />\n+ <ref role=\"3cqZAo\" to=\"wyt6:~System.out\" resolve=\"out\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"25JjLrsEvaq\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"guwi:~PrintStream.println(java.lang.String)\" resolve=\"println\" />\n+ <node concept=\"Xl_RD\" id=\"25JjLrsEvar\" role=\"37wK5m\">\n+ <property role=\"Xl_RC\" value=\"Modelix Application Plugin - Running make before export\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n<node concept=\"3clFbF\" id=\"25JjLrsCNCX\" role=\"3cqZAp\">\n<node concept=\"2OqwBi\" id=\"25JjLrsCPF_\" role=\"3clFbG\">\n<node concept=\"2ShNRf\" id=\"25JjLrsCNCR\" role=\"2Oq$k0\">\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | adding configuration for running make before export |
426,496 | 27.01.2022 11:36:53 | -3,600 | ce60e80e92ff66df88cb5ec30230defd5fa3d6c7 | Avoid deadlocks by lock ordering of MPS model access and Modelix model access | [
{
"change_type": "MODIFY",
"old_path": "mps-version.properties",
"new_path": "mps-version.properties",
"diff": "mpsMajorVersion=2020.3\nmpsMinorVersion=5\nmpsVersion=2020.3.5\n-mpsExtensionsVersion=2020.3.2170.aedc789\n+mpsExtensionsVersion=2020.3.2194.9dc1a5d\n"
},
{
"change_type": "MODIFY",
"old_path": "mps/org.modelix.ui.common/models/org.modelix.ui.common.mps",
"new_path": "mps/org.modelix.ui.common/models/org.modelix.ui.common.mps",
"diff": "</node>\n</node>\n<node concept=\"2tJIrI\" id=\"28I3pJBZVjU\" role=\"jymVt\" />\n+ <node concept=\"3clFb_\" id=\"6eCobXxN3fG\" role=\"jymVt\">\n+ <property role=\"TrG5h\" value=\"getLockOrderingPriority\" />\n+ <node concept=\"3Tm1VV\" id=\"6eCobXxN3fH\" role=\"1B3o_S\" />\n+ <node concept=\"3cpWsb\" id=\"6eCobXxN3fJ\" role=\"3clF45\" />\n+ <node concept=\"3clFbS\" id=\"6eCobXxN3fK\" role=\"3clF47\">\n+ <node concept=\"3clFbF\" id=\"6eCobXxNcw_\" role=\"3cqZAp\">\n+ <node concept=\"2OqwBi\" id=\"6eCobXxNdaD\" role=\"3clFbG\">\n+ <node concept=\"37vLTw\" id=\"6eCobXxNcwy\" role=\"2Oq$k0\">\n+ <ref role=\"3cqZAo\" node=\"5mRomlpwuYC\" resolve=\"wrappedArea\" />\n+ </node>\n+ <node concept=\"liA8E\" id=\"6eCobXxNdFs\" role=\"2OqNvi\">\n+ <ref role=\"37wK5l\" to=\"qvpu:~IArea.getLockOrderingPriority()\" resolve=\"getLockOrderingPriority\" />\n+ </node>\n+ </node>\n+ </node>\n+ </node>\n+ <node concept=\"2AHcQZ\" id=\"6eCobXxN3fL\" role=\"2AJF6D\">\n+ <ref role=\"2AI5Lk\" to=\"wyt6:~Override\" resolve=\"Override\" />\n+ </node>\n+ </node>\n+ <node concept=\"2tJIrI\" id=\"6eCobXxNe6R\" role=\"jymVt\" />\n<node concept=\"3clFb_\" id=\"2YQpkXLoCo4\" role=\"jymVt\">\n<property role=\"TrG5h\" value=\"resolveConcept\" />\n<node concept=\"3Tm1VV\" id=\"2YQpkXLoCo5\" role=\"1B3o_S\" />\n"
}
]
| Kotlin | Apache License 2.0 | modelix/modelix | Avoid deadlocks by lock ordering of MPS model access and Modelix model access |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.