Skip to content
Snippets Groups Projects
Commit 6de66d8c authored by René Schöne's avatar René Schöne
Browse files

working on better visualization

- allow passing null to Dumper.read()
parent 9d2eaf94
No related branches found
No related tags found
1 merge request!9working on better visualization
Pipeline #12832 failed
This commit is part of merge request !9. Comments created here will be created in the context of that merge request.
DumpAst ::= DumpNode* <PackageName> BuildConfig PrintConfig ; DumpAst ::= DumpNode* <PackageName> BuildConfig PrintConfig ;
rel DumpAst.RootNode -> DumpNode ; rel DumpAst.RootNode? -> DumpNode ;
DumpNode ::= DumpChildNode* DumpToken* DumpRelation* DumpNode ::= DumpChildNode* DumpToken* DumpRelation*
<Name> <Label> <BackgroundColor> <TextColor> <Object:Object> <Invisible:boolean> <Computed:boolean> <ManualStereotypes> <Name> <Label> <BackgroundColor> <TextColor> <Object:Object> <Invisible:boolean> <Computed:boolean> <ManualStereotypes>
......
...@@ -15,7 +15,7 @@ aspect GenerationBackend { ...@@ -15,7 +15,7 @@ aspect GenerationBackend {
} }
public TransformationOptions asRoot() { public TransformationOptions asRoot() {
return fromSource(Source.ROOT, false); return fromSource(Source.ROOT, false).allowNullObjectsOnce();
} }
public TransformationOptions asNormal(boolean shouldBeInvisible) { public TransformationOptions asNormal(boolean shouldBeInvisible) {
......
...@@ -379,7 +379,17 @@ public class DumpBuilder { ...@@ -379,7 +379,17 @@ public class DumpBuilder {
protected DumpAst build() { protected DumpAst build() {
if (result == null) { if (result == null) {
result = new DumpAst(); result = new DumpAst();
result.setPackageName(this.packageName == null ? this.target.getClass().getPackage().getName() : this.packageName); final String packageNameToUse;
if (this.packageName != null) {
packageNameToUse = this.packageName;
} else {
if (this.target == null) {
packageNameToUse = null;
} else {
packageNameToUse = this.target.getClass().getPackage().getName();
}
}
result.setPackageName(packageNameToUse);
result.setBuildConfig(this.buildConfig); result.setBuildConfig(this.buildConfig);
result.setPrintConfig(this.printConfig); result.setPrintConfig(this.printConfig);
try { try {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment