Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
motion-grammar-example
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
JastAdd
motion-grammar-example
Commits
8a1b3004
Commit
8a1b3004
authored
3 years ago
by
Johannes Mey
Browse files
Options
Downloads
Patches
Plain Diff
update uml printing
parent
e127e9f9
No related branches found
No related tags found
No related merge requests found
Pipeline
#12842
passed
3 years ago
Stage: build
Stage: test
Stage: ragdoc
Stage: publish
Stage: deploy
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
build.gradle
+5
-5
5 additions, 5 deletions
build.gradle
gradle.properties
+1
-1
1 addition, 1 deletion
gradle.properties
src/main/java/de/tudresden/inf/st/mg/common/MotionGrammarParser.java
+6
-3
6 additions, 3 deletions
...va/de/tudresden/inf/st/mg/common/MotionGrammarParser.java
with
12 additions
and
9 deletions
build.gradle
+
5
−
5
View file @
8a1b3004
...
...
@@ -6,14 +6,13 @@ plugins {
}
group
'de.tudresden.inf.st'
version
'0.3'
ext
{
mainClassName
=
'de.tudresden.inf.st.mg.Main'
}
// set the main class name for `gradle run`
application
.
mainClass
Name
=
"${mainClassName}"
application
.
mainClass
=
"${mainClassName}"
java
.
toolchain
.
languageVersion
=
JavaLanguageVersion
.
of
(
11
)
...
...
@@ -35,7 +34,7 @@ idea.module.generatedSourceDirs += genSrc
sourceSets
.
main
.
java
.
srcDir
genSrc
dependencies
{
implementation
group:
'de.tudresden.inf.st'
,
name:
'dumpAst
WithPlantuml
'
,
version:
"${relast2uml_version}"
implementation
group:
'de.tudresden.inf.st'
,
name:
'dumpAst'
,
version:
"${relast2uml_version}"
grammar2uml
group:
'de.tudresden.inf.st'
,
name:
'grammar2uml'
,
version:
"${grammar2uml_version}"
testImplementation
group:
'org.assertj'
,
name:
'assertj-core'
,
version:
"${assertj_version}"
testImplementation
group:
'org.junit.jupiter'
,
name:
'junit-jupiter-api'
,
version:
"${jupyter_version}"
...
...
@@ -74,7 +73,7 @@ test {
jar
{
manifest
{
attributes
"
Main-Class
"
:
"${mainClassName}"
attributes
'
Main-Class
'
:
"${mainClassName}"
}
from
{
...
...
@@ -153,6 +152,7 @@ jastadd {
}
// Workflow configuration for phases
clean
.
dependsOn
cleanGen
generateAst
.
dependsOn
relastToJastAdd
generateAst
.
dependsOn
generateGrammarDiagrams
This diff is collapsed.
Click to expand it.
gradle.properties
+
1
−
1
View file @
8a1b3004
relast2uml_version
=
0.3.
6
-5
4
relast2uml_version
=
0.3.
7
-5
9
jupyter_version
=
5.8.2
assertj_version
=
3.22.0
grammar2uml_version
=
0.2.1
...
...
This diff is collapsed.
Click to expand it.
src/main/java/de/tudresden/inf/st/mg/common/MotionGrammarParser.java
+
6
−
3
View file @
8a1b3004
package
de.tudresden.inf.st.mg.common
;
import
de.tudresden.inf.st.jastadd.dumpAst.ast.Dumper
;
import
de.tudresden.inf.st.jastadd.dumpAst.ast.SkinParamBooleanSetting
;
import
de.tudresden.inf.st.mg.jastadd.model.ASTNode
;
import
de.tudresden.inf.st.mg.jastadd.model.T
;
import
de.tudresden.inf.st.mg.jastadd.model.Token
;
...
...
@@ -50,9 +51,11 @@ public abstract class MotionGrammarParser {
}
// TODO remove this once the issue in relast2uml has been resolved
if
(
rootContainer_
.
getChild
(
0
)
!=
null
)
{
Dumper
.
read
(
rootContainer_
.
getChild
(
0
)).
setBackgroundColorMethod
(
n
->
n
==
null
?
"white"
:
(
n
==
highlightNode
?
(
n
instanceof
Token
?
H_T
:
H_N
)
:
(
n
instanceof
Token
?
N_T
:
N_N
)))
.
setNameMethod
(
o
->
o
==
null
?
"null"
:
o
.
getClass
().
getSimpleName
())
.
customPreamble
(
"\nskinparam object {\nBackgroundColor<<null>> white\nBorderColor<<null>> white\nStereotypeFontColor<<null>> white\n}\n"
)
Dumper
.
read
(
rootContainer_
.
getChild
(
0
))
.
setBackgroundColorMethod
(
n
->
(
n
==
highlightNode
?
(
n
instanceof
Token
?
H_T
:
H_N
)
:
(
n
instanceof
Token
?
N_T
:
N_N
)))
.
setNameMethod
(
o
->
o
.
getClass
().
getSimpleName
())
.
skinParam
(
SkinParamBooleanSetting
.
Shadowing
,
false
)
// .dumpAsSource(astDiagramDir_.resolve("AST-" + String.format("%03d", timeStep_) + "-" + step + ".puml"))
.
dumpAsPNG
(
astDiagramDir_
.
resolve
(
"AST-"
+
String
.
format
(
"%03d"
,
timeStep_
)
+
"-"
+
step
+
".png"
));
}
timeStep_
++;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment