Skip to content

Commit 3f94699

Browse files
authored
Merge pull request #1 from coolya/release
Release
2 parents b7d6c7a + 2f4a64e commit 3f94699

File tree

15 files changed

+1099
-8
lines changed

15 files changed

+1099
-8
lines changed

.gitlab-ci.yml

+11
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,16 @@ cache:
1717

1818
build:
1919
stage: build
20+
artifacts:
21+
expire_in: 1 week
22+
paths:
23+
- artifacts/de.itemis.mps.generator.editors
2024
script:
2125
- ./gradlew build
26+
27+
release:
28+
stage: deploy
29+
script:
30+
- ./gradlew githubRelease
31+
only:
32+
- master

.mps/modules.xml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<projectModules>
55
<modulePath path="$PROJECT_DIR$/languages/de.itemis.mps.generator.editors/de.itemis.mps.generator.editors.mpl" folder="" />
66
<modulePath path="$PROJECT_DIR$/solutions/de.itemis.mps.generartor.editors.build/de.itemis.mps.generartor.editors.build.msd" folder="_build" />
7+
<modulePath path="$PROJECT_DIR$/solutions/de.itemis.mps.generator.editors.plugin/de.itemis.mps.generator.editors.plugin.msd" folder="" />
78
<modulePath path="$PROJECT_DIR$/solutions/de.itemis.mps.generators.editors.build.meta/de.itemis.mps.generators.editors.build.meta.msd" folder="_build" />
89
</projectModules>
910
</component>

.mps/vcs.xml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project version="4">
3+
<component name="VcsDirectoryMappings">
4+
<mapping directory="$PROJECT_DIR$" vcs="Git" />
5+
</component>
6+
</project>

README.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# MPS Generator Editors
2+
3+
[![build status](https://gitlab.com/coolya/mps-generator-editors/badges/master/pipeline.svg)](https://gitlab.com/coolya/mps-generator-editors/commits/master)
4+
5+
This projects aims to provide a set of editors for the MPS generator language that allow easier readability of the code
6+
by showing certain aspects that are usually hidden in the inspects in the main editor.
7+
8+
9+
![comparison](docs/generator_comparison.jpg)
10+
11+
## State
12+
Currently this is more less a quick hack to see if it technically works. The editor experience is pretty bad at the
13+
moment. Especially when writing new generators while using the normal intentions to create the required macros. I would
14+
currently consider this more or less a read only view on the generator. You can change existing values but if you hit
15+
`return` or `backspace` at the wrong location the editor will behave extremely strange.
16+
17+
## Installation
18+
Head over to the release page and pick the latest release. If you are already using the the mps-extensions or a recent
19+
version of the mbeddr platform then download the zip file without `with-dependencies` otherwise download the one with
20+
the `with-dependencies` suffix.
21+
22+
To make the plugin available, extract the zip file to a location of your choice and the point a global library in MPS to
23+
it. `File -> Settings -> Build, Execution, Deployment -> Global Libraries`.
24+
25+
![global lib](docs/global_lib.png)
26+
27+
## How To
28+
Using this plugin is simple: click on the `View` menu and the select `Simplified Generator Editors`.

RELEASE_NOTES.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### New in 0.1
2+
* Initial release
3+

build.gradle

+22-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ buildscript {
2222

2323
plugins {
2424
id "nebula.dependency-lock" version "4.9.5"
25+
id "co.riiid.gradle" version "0.4.2"
2526
}
2627

2728
apply plugin: 'base'
@@ -32,6 +33,8 @@ ext.dependencyRepositories = [
3233
'https://projects.itemis.de/nexus/content/repositories/mbeddr_snapshots'
3334
]
3435

36+
def version = "0.1"
37+
3538
repositories {
3639
for (repoUrl in project.dependencyRepositories) {
3740
maven {
@@ -70,7 +73,7 @@ dependencies {
7073
}
7174

7275
ext.buildScriptClasspath = project.configurations.ant_lib.fileCollection({ true })
73-
ext.defaultScriptArgs = ["-Dversion=$version"]
76+
ext.defaultScriptArgs = ["-Dversion=$version", "-Dartifacts.root=${ext.artifactsDir.getAbsolutePath()}", "-Dbuild.dir=${rootProject.projectDir.absolutePath}"]
7477

7578

7679
task resolveMps(type: Copy) {
@@ -118,4 +121,21 @@ task build_languages(type: BuildLanguages, dependsOn: allScripts) {
118121
script scriptFile('build-all.xml')
119122
}
120123

121-
build.dependsOn build_languages
124+
def releaseArtifacts = new File(artifactsDir, "de.itemis.mps.generator.editors")
125+
.listFiles()
126+
.findAll {it.name.endsWith("zip")}
127+
.each {it.absolutePath}
128+
129+
github {
130+
owner = 'coolya'
131+
repo = 'mps-generator-editors'
132+
token = System.getenv().GITHUB_TOKEN != null ? System.getenv().GITHUB_TOKEN : "empty"
133+
tagName = "v-$version"
134+
targetCommitish = System.getenv().CI_COMMIT_SHA != null ? System.getenv().CI_COMMIT_SHA : "master"
135+
name = "MPS Generator Editors $version"
136+
body = ReleaseNotes.getReleaseNotes(file("RELEASE_NOTES.md"))
137+
assets = releaseArtifacts
138+
}
139+
140+
build.dependsOn build_languages
141+
//githubRelease.dependsOn build
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
class ReleaseNotes {
2+
static String getReleaseNotes(File file) {
3+
4+
Closure isHeader = {it.startsWith("##")}
5+
6+
List<String> content = file
7+
.readLines()
8+
.each { it.trim().replaceFirst("\\*", "")}
9+
.findAll {!it.empty}
10+
11+
12+
for (int i = 0; i < content.size(); i++) {
13+
String it = content.get(i)
14+
if (isHeader(it)) {
15+
def rest = content.subList(i + 1, content.size)
16+
def notes = rest.takeWhile {!isHeader(it)}
17+
notes.add(0, it)
18+
return notes.join("\r\n")
19+
}
20+
}
21+
return ""
22+
}
23+
}

docs/generator_comparison.jpg

400 KB
Loading

docs/global_lib.png

68.4 KB
Loading

languages/de.itemis.mps.generator.editors/de.itemis.mps.generator.editors.mpl

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<dependency reexport="false">f3061a53-9226-4cc5-a443-f952ceaf5816(jetbrains.mps.baseLanguage)</dependency>
1313
</dependencies>
1414
<languageVersions>
15+
<language slang="l:a0ab8c10-c118-4755-ba27-3853435cf524:de.itemis.mps.tooltips" version="0" />
1516
<language slang="l:b8bb702e-43ed-4090-a902-d180d3e5f292:de.slisson.mps.conditionalEditor" version="0" />
1617
<language slang="l:f3061a53-9226-4cc5-a443-f952ceaf5816:jetbrains.mps.baseLanguage" version="5" />
1718
<language slang="l:443f4c36-fcf5-4eb6-9500-8d06ed259e3e:jetbrains.mps.baseLanguage.classifiers" version="0" />

0 commit comments

Comments
 (0)