Commit 3862eede authored by René Schöne's avatar René Schöne
Browse files

1.0.4

- relations with or without rank (configurable)
parent 2fad6b43
Pipeline #13961 passed with stages
in 2 minutes and 32 seconds
......@@ -62,5 +62,6 @@ StyleInformation ::= <NameMethod:StyleMethod> <BackgroundColorMethod:StyleMethod
PrintConfig ::= Header*
<Scale:double>
<Version>
<RelationWithRank:boolean>
<OrderChildren:boolean> ;
Header ::= <Value> ;
......@@ -137,6 +137,7 @@ aspect GenerationToYaml {
MappingElement result = super.toYaml(fromRelation);
// attributes
result.put("innerNodeName", innerNodeName());
result.put("innerNotNull", innerNotNull());
result.put("outerNodeName", outerNodeName());
return result;
}
......@@ -169,6 +170,7 @@ aspect GenerationToYaml {
// attributes
result.put("bothVisible", bothVisible());
result.put("innerNodeName", innerNodeName());
result.put("innerNotNull", innerNotNull());
return result;
}
......@@ -194,6 +196,7 @@ aspect GenerationToYaml {
// attributes
result.put("bothVisible", bothVisible());
result.put("innerNodeName", innerNodeName());
result.put("innerNotNull", innerNotNull());
result.put("outerNodeName", outerNodeName());
result.put("label", label());
return result;
......
......@@ -14,6 +14,10 @@ aspect Navigation {
// --- printConfig ---
inh PrintConfig BuildConfig.printConfig();
inh PrintConfig DumpNode.printConfig();
inh PrintConfig DumpNormalRelation.printConfig();
inh PrintConfig InnerRelationDumpNode.printConfig();
inh PrintConfig DumpReferenceToken.printConfig();
eq DumpAst.getChild().printConfig() = getPrintConfig();
// --- containingDumpNode ---
......@@ -81,6 +85,11 @@ aspect Navigation {
return result;
}
// --- innerNotNull ---
syn boolean DumpNormalRelation.innerNotNull() = !printConfig().getRelationWithRank() && getDumpNode() != null && getDumpNode().getObject() != null;
syn boolean DumpReferenceToken.innerNotNull() = !printConfig().getRelationWithRank() && getValue() != null && getValue().getObject() != null;
syn boolean InnerRelationDumpNode.innerNotNull() = !printConfig().getRelationWithRank() && getDumpNode() != null && getDumpNode().getObject() != null;
// === Method naviagtion ===
coll java.util.List<SingleChildMethod> ClassAnalysisResult.singleChildMethods() [new java.util.ArrayList<>()] root ClassAnalysisResult;
SingleChildMethod contributes this to ClassAnalysisResult.singleChildMethods();
......
......@@ -80,6 +80,15 @@ public class DumpBuilder {
return this;
}
/**
* Let all relations (and reference attributes) influence layouting of nodes (disabled by default).
* @return this
*/
public DumpBuilder enableRelationWithRank() {
printConfig.setRelationWithRank(true);
return this;
}
// --- Types ---
/**
......
......@@ -40,13 +40,13 @@ object "{{{labelAndTextColor}}}" as {{{name}}} {{{stereotypeList}}} {{#backgroun
{{#isList}}
{{#InnerRelationDumpNode}}
{{#bothVisible}}
{{{outerNodeName}}} .{{#computed}}[#{{{computedColor}}}]{{/computed}}.> {{{innerNodeName}}} : {{{label}}}
{{{outerNodeName}}} .[#black{{#computed}},#{{{computedColor}}}{{/computed}}{{#innerNotNull}},norank{{/innerNotNull}}].> {{{innerNodeName}}} : {{{label}}}
{{/bothVisible}}
{{/InnerRelationDumpNode}}
{{/isList}}
{{^isList}}
{{^isDumpValueToken}}
{{{outerNodeName}}} .{{#computed}}[#{{{computedColor}}}]{{/computed}}.> {{{innerNodeName}}} : {{{label}}}
{{{outerNodeName}}} .[#black{{#computed}},#{{{computedColor}}}{{/computed}}{{#innerNotNull}},norank{{/innerNotNull}}].> {{{innerNodeName}}} : {{{label}}}
{{/isDumpValueToken}}
{{/isList}}
{{/invisible}}
......@@ -69,13 +69,13 @@ object "{{{labelAndTextColor}}}" as {{{name}}} {{{stereotypeList}}} {{#backgroun
{{#isList}}
{{#InnerRelationDumpNode}}
{{#bothVisible}}
{{{outerNodeName}}} {{#bidirectional}}<{{/bidirectional}}--> {{{innerNodeName}}} : {{{label}}}
{{{outerNodeName}}} {{#bidirectional}}<{{/bidirectional}}-{{#innerNotNull}}[norank]{{/innerNotNull}}-> {{{innerNodeName}}} : {{{label}}}
{{/bothVisible}}
{{/InnerRelationDumpNode}}
{{/isList}}
{{^isList}}
{{#bothVisible}}
{{{outerNodeName}}} {{#bidirectional}}<{{/bidirectional}}--> {{{innerNodeName}}} : {{{label}}}
{{{outerNodeName}}} {{#bidirectional}}<{{/bidirectional}}-{{#innerNotNull}}[norank]{{/innerNotNull}}-> {{{innerNodeName}}} : {{{label}}}
{{/bothVisible}}
{{/isList}}
{{/DumpRelations}}
......
#Mon Jun 13 18:33:49 CEST 2022
version=1.0.3
#Tue Jun 21 14:31:38 CEST 2022
version=1.0.4
......@@ -5,3 +5,4 @@ out/
*.class
/featureTest.png
/featureTest.yml
/featureTest.puml
......@@ -46,13 +46,16 @@ public class FeatureTestMain {
.read(root)
// .customPreamble("hide empty members")
.skinParam(SkinParamBooleanSetting.Shadowing, false)
// .enableRelationWithRank()
.includeAttributes("referenceAttr"
, "collectBs"
)
.includeNonterminalAttributes("Calculated")
.includeNonterminalAttributes("AlsoCalculatedListNewSyntax")
.dumpAsYaml(pathToYaml, true)
.dumpAsPNG(pathToPng);
.dumpAsPNG(pathToPng)
.dumpAsSource(Paths.get("featureTest.puml"))
;
}
private void m() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment