mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-05 21:17:52 +00:00
wip
This commit is contained in:
parent
48ae51e8c3
commit
fce894d4e1
@ -44,7 +44,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.baraye.a.CucaDiagram;
|
||||
import net.sourceforge.plantuml.baraye.CucaDiagram;
|
||||
import net.sourceforge.plantuml.core.Diagram;
|
||||
import net.sourceforge.plantuml.core.ImageData;
|
||||
import net.sourceforge.plantuml.html.CucaDiagramHtmlMaker;
|
||||
|
@ -42,9 +42,9 @@ import java.util.Objects;
|
||||
|
||||
import net.sourceforge.plantuml.Direction;
|
||||
import net.sourceforge.plantuml.UmlDiagramType;
|
||||
import net.sourceforge.plantuml.baraye.a.CucaDiagram;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.CucaDiagram;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.core.DiagramDescription;
|
||||
import net.sourceforge.plantuml.core.UmlSource;
|
||||
import net.sourceforge.plantuml.cucadiagram.Code;
|
||||
|
@ -38,7 +38,7 @@ package net.sourceforge.plantuml.activitydiagram;
|
||||
import java.util.Objects;
|
||||
|
||||
import net.sourceforge.plantuml.Direction;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.cucadiagram.LeafType;
|
||||
|
||||
public class ConditionalContext {
|
||||
|
@ -37,7 +37,7 @@ package net.sourceforge.plantuml.activitydiagram.command;
|
||||
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.activitydiagram.ActivityDiagram;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
|
@ -37,7 +37,7 @@ package net.sourceforge.plantuml.activitydiagram.command;
|
||||
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.activitydiagram.ActivityDiagram;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
|
@ -39,7 +39,7 @@ import net.sourceforge.plantuml.Direction;
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.activitydiagram.ActivityDiagram;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.classdiagram.command.CommandLinkClass;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
|
@ -37,13 +37,13 @@ package net.sourceforge.plantuml.activitydiagram.command;
|
||||
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.activitydiagram.ActivityDiagram;
|
||||
import net.sourceforge.plantuml.baraye.EntityUtils;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
import net.sourceforge.plantuml.command.regex.RegexConcat;
|
||||
import net.sourceforge.plantuml.command.regex.RegexLeaf;
|
||||
import net.sourceforge.plantuml.command.regex.RegexResult;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityUtils;
|
||||
|
||||
public class CommandInnerConcurrent extends SingleLineCommand2<ActivityDiagram> {
|
||||
|
||||
|
@ -42,8 +42,8 @@ import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UrlBuilder;
|
||||
import net.sourceforge.plantuml.UrlMode;
|
||||
import net.sourceforge.plantuml.activitydiagram.ActivityDiagram;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.classdiagram.command.CommandLinkClass;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
|
@ -45,7 +45,7 @@ import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UrlBuilder;
|
||||
import net.sourceforge.plantuml.UrlMode;
|
||||
import net.sourceforge.plantuml.activitydiagram.ActivityDiagram;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.classdiagram.command.CommandLinkClass;
|
||||
import net.sourceforge.plantuml.command.BlocLines;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
|
@ -38,8 +38,8 @@ package net.sourceforge.plantuml.activitydiagram.command;
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.activitydiagram.ActivityDiagram;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IGroup;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
|
@ -33,7 +33,7 @@
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.baraye.a;
|
||||
package net.sourceforge.plantuml.baraye;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
@ -64,7 +64,6 @@ import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityGender;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityPortion;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityPosition;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityUtils;
|
||||
import net.sourceforge.plantuml.cucadiagram.GroupHierarchy;
|
||||
import net.sourceforge.plantuml.cucadiagram.GroupType;
|
||||
import net.sourceforge.plantuml.cucadiagram.HideOrShow2;
|
||||
@ -235,6 +234,10 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy,
|
||||
return buildFullyQualified(id);
|
||||
}
|
||||
|
||||
final public Ident buildLeafIdentSpecial2(String id) {
|
||||
return buildFullyQualified(id);
|
||||
}
|
||||
|
||||
private Ident buildLeafIdentSpecialUnused(String id) {
|
||||
// if (namespaceSeparator != null) {
|
||||
// if (id.contains(namespaceSeparator)) {
|
@ -33,7 +33,7 @@
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.baraye.a;
|
||||
package net.sourceforge.plantuml.baraye;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
@ -34,7 +34,7 @@
|
||||
* Contribution: Miguel Esteves
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.baraye.a;
|
||||
package net.sourceforge.plantuml.baraye;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@ -62,7 +62,6 @@ import net.sourceforge.plantuml.cucadiagram.CucaNote;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.cucadiagram.DisplayPositioned;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityPosition;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityUtils;
|
||||
import net.sourceforge.plantuml.cucadiagram.GroupRoot;
|
||||
import net.sourceforge.plantuml.cucadiagram.GroupType;
|
||||
import net.sourceforge.plantuml.cucadiagram.Ident;
|
@ -33,12 +33,10 @@
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.cucadiagram;
|
||||
package net.sourceforge.plantuml.baraye;
|
||||
|
||||
import net.sourceforge.plantuml.baraye.Quark;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.b.EntityImp;
|
||||
import net.sourceforge.plantuml.cucadiagram.GroupRoot;
|
||||
import net.sourceforge.plantuml.cucadiagram.Link;
|
||||
|
||||
public abstract class EntityUtils {
|
||||
|
||||
@ -69,22 +67,6 @@ public abstract class EntityUtils {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isPureInnerLink12(EntityImp group, Link link) {
|
||||
if (group.isGroup() == false)
|
||||
throw new IllegalArgumentException();
|
||||
|
||||
final EntityImp e1 = (EntityImp) link.getZEntity1();
|
||||
final EntityImp e2 = (EntityImp) link.getZEntity2();
|
||||
final Quark group1 = e1.getQuark().getParent();
|
||||
final Quark group2 = e2.getQuark().getParent();
|
||||
if (group.getQuark().containsLarge(group1) && group.getQuark().containsLarge(group2))
|
||||
return true;
|
||||
// if (isParent(group1, group) && isParent(group2, group))
|
||||
// return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isPureInnerLink12(IGroup group, Link link) {
|
||||
if (group.isGroup() == false)
|
||||
throw new IllegalArgumentException();
|
@ -33,7 +33,7 @@
|
||||
* Contribution: Miguel Esteves
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.baraye.b;
|
||||
package net.sourceforge.plantuml.baraye;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
@ -33,7 +33,7 @@
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.baraye.b;
|
||||
package net.sourceforge.plantuml.baraye;
|
||||
|
||||
import java.util.Collection;
|
||||
|
@ -33,7 +33,7 @@
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.baraye.a;
|
||||
package net.sourceforge.plantuml.baraye;
|
||||
|
||||
import java.util.Collection;
|
||||
|
@ -35,9 +35,10 @@
|
||||
*/
|
||||
package net.sourceforge.plantuml.baraye;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -45,7 +46,7 @@ public class Plasma {
|
||||
|
||||
private String separator;
|
||||
private final Quark root;
|
||||
private final Map<List<String>, Quark> quarks = new HashMap<>();
|
||||
private final Map<List<String>, Quark> quarks = new LinkedHashMap<>();
|
||||
|
||||
public Plasma(String separator) {
|
||||
final List<String> empty = Collections.emptyList();
|
||||
@ -62,6 +63,8 @@ public class Plasma {
|
||||
}
|
||||
|
||||
public final void setSeparator(String separator) {
|
||||
if (separator == null)
|
||||
separator = "\u0000";
|
||||
this.separator = separator;
|
||||
}
|
||||
|
||||
@ -76,7 +79,7 @@ public class Plasma {
|
||||
}
|
||||
if (idx > 0) {
|
||||
result.add(full.substring(0, idx));
|
||||
ensurePresent(result);
|
||||
ensurePresent(new ArrayList<>(result));
|
||||
}
|
||||
|
||||
full = full.substring(idx + separator.length());
|
||||
@ -86,7 +89,13 @@ public class Plasma {
|
||||
Quark ensurePresent(List<String> result) {
|
||||
Quark quark = quarks.get(result);
|
||||
if (quark == null) {
|
||||
quark = new Quark(this, result);
|
||||
if (result.size() == 0)
|
||||
quark = new Quark(this, null, result);
|
||||
else {
|
||||
final Quark parent = ensurePresent(result.subList(0, result.size() - 1));
|
||||
quark = new Quark(this, parent, result);
|
||||
}
|
||||
System.err.println("PUTTING " + quark);
|
||||
quarks.put(result, quark);
|
||||
}
|
||||
return quark;
|
||||
@ -94,7 +103,54 @@ public class Plasma {
|
||||
}
|
||||
|
||||
public Collection<Quark> quarks() {
|
||||
return Collections.unmodifiableCollection(quarks.values());
|
||||
return Collections.unmodifiableCollection(new ArrayList<>(quarks.values()));
|
||||
}
|
||||
|
||||
// public boolean exists(String name) {
|
||||
// for (Quark quark : quarks.values())
|
||||
// if (quark.getName().equals(name))
|
||||
// return true;
|
||||
// return false;
|
||||
// }
|
||||
|
||||
public Quark getIfExists(String name) {
|
||||
for (Quark quark : quarks.values())
|
||||
if (quark.getName().equals(name))
|
||||
return quark;
|
||||
return null;
|
||||
}
|
||||
|
||||
public Quark getIfExists(List<String> signature) {
|
||||
return quarks.get(signature);
|
||||
}
|
||||
|
||||
public int countChildren(Quark parent) {
|
||||
int count = 0;
|
||||
for (Quark quark : new ArrayList<>(quarks.values()))
|
||||
if (quark.getParent() == parent)
|
||||
count++;
|
||||
return count;
|
||||
}
|
||||
|
||||
public List<Quark> getChildren(Quark parent) {
|
||||
final List<Quark> result = new ArrayList<>();
|
||||
for (Quark quark : new ArrayList<>(quarks.values()))
|
||||
if (quark.getParent() == parent)
|
||||
result.add(quark);
|
||||
return Collections.unmodifiableList(result);
|
||||
}
|
||||
|
||||
public void moveAllTo(Quark src, Quark dest) {
|
||||
for (Quark quark : new ArrayList<>(quarks.values())) {
|
||||
if (quark == dest)
|
||||
continue;
|
||||
if (src.containsLarge(quark)) {
|
||||
quarks.remove(quark.getSignature());
|
||||
quark.internalMove(src, dest);
|
||||
quarks.put(quark.getSignature(), quark);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -39,26 +39,40 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.cucadiagram.Code;
|
||||
import net.sourceforge.plantuml.cucadiagram.Ident;
|
||||
|
||||
public class Quark implements Code {
|
||||
public class Quark extends Ident implements Code {
|
||||
|
||||
private final Plasma plasma;
|
||||
private final List<String> parts;
|
||||
private /* final */ Quark parent;
|
||||
// private final List<String> parts;
|
||||
private Object data;
|
||||
|
||||
Quark(Plasma plasma, List<String> parts) {
|
||||
Quark(Plasma plasma, Quark parent, List<String> parts) {
|
||||
super(new ArrayList<String>(parts));
|
||||
this.plasma = plasma;
|
||||
this.parts = new ArrayList<String>(parts);
|
||||
this.parent = parent;
|
||||
if (parent == null) {
|
||||
if (parts.size() != 0)
|
||||
throw new IllegalStateException();
|
||||
} else {
|
||||
if (parent.parts.equals(parts.subList(0, parts.size() - 1)) == false)
|
||||
throw new IllegalStateException();
|
||||
|
||||
}
|
||||
// this.parts = new ArrayList<String>(parts);
|
||||
}
|
||||
|
||||
public Quark getParent() {
|
||||
if (parts.size() == 0)
|
||||
return null;
|
||||
return plasma.ensurePresent(parts.subList(0, parts.size() - 1));
|
||||
return parent;
|
||||
// if (parts.size() == 0)
|
||||
// return null;
|
||||
// return plasma.ensurePresent(parts.subList(0, parts.size() - 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
// return parts.toString() + "(parent=" + parent + ")";
|
||||
return parts.toString();
|
||||
}
|
||||
|
||||
@ -119,6 +133,10 @@ public class Quark implements Code {
|
||||
return parts.size() == 0;
|
||||
}
|
||||
|
||||
public int getDepth() {
|
||||
return parts.size();
|
||||
}
|
||||
|
||||
// public int size() {
|
||||
// return parts.size();
|
||||
// }
|
||||
@ -136,8 +154,41 @@ public class Quark implements Code {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Code eventuallyRemoveStartingAndEndingDoubleQuote(String format) {
|
||||
throw new UnsupportedOperationException();
|
||||
public Ident eventuallyRemoveStartingAndEndingDoubleQuote(String format) {
|
||||
return this;
|
||||
// throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public Quark childIfExists(String name) {
|
||||
final List<String> sig = new ArrayList<>(getSignature());
|
||||
sig.add(name);
|
||||
return plasma.getIfExists(sig);
|
||||
}
|
||||
|
||||
public Quark child(String name) {
|
||||
return plasma.parse(this, name);
|
||||
}
|
||||
|
||||
public int countChildren() {
|
||||
return plasma.countChildren(this);
|
||||
}
|
||||
|
||||
public List<Quark> getChildren() {
|
||||
return plasma.getChildren(this);
|
||||
}
|
||||
|
||||
public void moveTo(Quark dest) {
|
||||
plasma.moveAllTo(this, dest);
|
||||
}
|
||||
|
||||
public void internalMove(Quark src, Quark dest) {
|
||||
if (src.getDepth() + 1 != dest.getDepth())
|
||||
throw new UnsupportedOperationException("to be finished");
|
||||
final String name = getName();
|
||||
parts.clear();
|
||||
parts.addAll(dest.getSignature());
|
||||
parts.add(name);
|
||||
this.parent = dest;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,126 +0,0 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PlantUML distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
* USA.
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
* Contribution: Miguel Esteves
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.baraye.a;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import net.sourceforge.plantuml.Hideable;
|
||||
import net.sourceforge.plantuml.LineConfigurable;
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.Removeable;
|
||||
import net.sourceforge.plantuml.SpecificBackcolorable;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.command.Position;
|
||||
import net.sourceforge.plantuml.cucadiagram.Bodier;
|
||||
import net.sourceforge.plantuml.cucadiagram.Code;
|
||||
import net.sourceforge.plantuml.cucadiagram.CucaNote;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityPosition;
|
||||
import net.sourceforge.plantuml.cucadiagram.Ident;
|
||||
import net.sourceforge.plantuml.cucadiagram.LeafType;
|
||||
import net.sourceforge.plantuml.cucadiagram.Stereostyles;
|
||||
import net.sourceforge.plantuml.cucadiagram.Stereotag;
|
||||
import net.sourceforge.plantuml.cucadiagram.Stereotype;
|
||||
import net.sourceforge.plantuml.graphic.USymbol;
|
||||
import net.sourceforge.plantuml.graphic.color.Colors;
|
||||
|
||||
public interface IEntity extends SpecificBackcolorable, Hideable, Removeable, LineConfigurable {
|
||||
|
||||
public Code getCode();
|
||||
|
||||
public String getCodeGetName();
|
||||
|
||||
public Ident getIdent();
|
||||
|
||||
public USymbol getUSymbol();
|
||||
|
||||
public void setUSymbol(USymbol symbol);
|
||||
|
||||
public LeafType getLeafType();
|
||||
|
||||
public Display getDisplay();
|
||||
|
||||
public IGroup getParentContainer();
|
||||
|
||||
public void setDisplay(Display display);
|
||||
|
||||
public String getUid();
|
||||
|
||||
public Url getUrl99();
|
||||
|
||||
public Stereotype getStereotype();
|
||||
|
||||
public void setStereotype(Stereotype stereotype);
|
||||
|
||||
public Bodier getBodier();
|
||||
|
||||
public void addUrl(Url url);
|
||||
|
||||
public boolean isGroup();
|
||||
|
||||
public boolean hasUrl();
|
||||
|
||||
public int getRawLayout();
|
||||
|
||||
public void putTip(String member, Display display);
|
||||
|
||||
public Map<String, Display> getTips();
|
||||
|
||||
public void addStereotag(Stereotag tag);
|
||||
|
||||
public Set<Stereotag> stereotags();
|
||||
|
||||
public boolean isAloneAndUnlinked();
|
||||
|
||||
public void setThisIsTogether();
|
||||
|
||||
public String getCodeLine();
|
||||
|
||||
public void setCodeLine(LineLocation codeLine);
|
||||
|
||||
public void setStereostyle(String stereo);
|
||||
|
||||
public Stereostyles getStereostyles();
|
||||
|
||||
public void addNote(Display note, Position position, Colors colors);
|
||||
|
||||
public EntityPosition getEntityPosition();
|
||||
|
||||
public List<CucaNote> getNotes(Position position);
|
||||
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PlantUML distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
* USA.
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.baraye.a;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.cucadiagram.Code;
|
||||
import net.sourceforge.plantuml.cucadiagram.DisplayPositioned;
|
||||
import net.sourceforge.plantuml.cucadiagram.GroupType;
|
||||
import net.sourceforge.plantuml.cucadiagram.LeafType;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
import net.sourceforge.plantuml.svek.IEntityImage;
|
||||
import net.sourceforge.plantuml.svek.PackageStyle;
|
||||
import net.sourceforge.plantuml.svek.SingleStrategy;
|
||||
|
||||
public interface IGroup extends IEntity {
|
||||
|
||||
public boolean containsLeafRecurse(ILeaf entity);
|
||||
|
||||
public Collection<ILeaf> getLeafsDirect();
|
||||
|
||||
public Collection<IGroup> getChildren();
|
||||
|
||||
public void moveEntitiesTo(IGroup dest);
|
||||
|
||||
public int size();
|
||||
|
||||
public GroupType getGroupType();
|
||||
|
||||
public Code getNamespace();
|
||||
|
||||
public PackageStyle getPackageStyle();
|
||||
|
||||
public void overrideImage(IEntityImage img, LeafType state);
|
||||
|
||||
public SingleStrategy getSingleStrategy();
|
||||
|
||||
public FontConfiguration getFontConfigurationForTitle(ISkinParam skinParam);
|
||||
|
||||
public char getConcurrentSeparator();
|
||||
|
||||
public void setConcurrentSeparator(char separator);
|
||||
|
||||
public void setLegend(DisplayPositioned legend);
|
||||
|
||||
public DisplayPositioned getLegend();
|
||||
|
||||
}
|
@ -1,940 +0,0 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PlantUML distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
* USA.
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.baraye.b;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import net.sourceforge.plantuml.BackSlash;
|
||||
import net.sourceforge.plantuml.FileFormat;
|
||||
import net.sourceforge.plantuml.FileFormatOption;
|
||||
import net.sourceforge.plantuml.UmlDiagram;
|
||||
import net.sourceforge.plantuml.UmlDiagramType;
|
||||
import net.sourceforge.plantuml.api.ImageDataSimple;
|
||||
import net.sourceforge.plantuml.baraye.a.EntityFactory;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.core.ImageData;
|
||||
import net.sourceforge.plantuml.core.UmlSource;
|
||||
import net.sourceforge.plantuml.cucadiagram.Code;
|
||||
import net.sourceforge.plantuml.cucadiagram.CodeImpl;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityGender;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityPortion;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityPosition;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityUtils;
|
||||
import net.sourceforge.plantuml.cucadiagram.GroupHierarchy;
|
||||
import net.sourceforge.plantuml.cucadiagram.GroupType;
|
||||
import net.sourceforge.plantuml.cucadiagram.HideOrShow2;
|
||||
import net.sourceforge.plantuml.cucadiagram.ICucaDiagram;
|
||||
import net.sourceforge.plantuml.cucadiagram.Ident;
|
||||
import net.sourceforge.plantuml.cucadiagram.LeafType;
|
||||
import net.sourceforge.plantuml.cucadiagram.Link;
|
||||
import net.sourceforge.plantuml.cucadiagram.LinkConstraint;
|
||||
import net.sourceforge.plantuml.cucadiagram.NamespaceStrategy;
|
||||
import net.sourceforge.plantuml.cucadiagram.PortionShower;
|
||||
import net.sourceforge.plantuml.cucadiagram.dot.CucaDiagramTxtMaker;
|
||||
import net.sourceforge.plantuml.cucadiagram.entity.IEntityFactory;
|
||||
import net.sourceforge.plantuml.elk.CucaDiagramFileMakerElk;
|
||||
import net.sourceforge.plantuml.graphic.USymbol;
|
||||
import net.sourceforge.plantuml.graphml.CucaDiagramGraphmlMaker;
|
||||
import net.sourceforge.plantuml.sdot.CucaDiagramFileMakerSmetana;
|
||||
import net.sourceforge.plantuml.security.SecurityUtils;
|
||||
import net.sourceforge.plantuml.skin.VisibilityModifier;
|
||||
import net.sourceforge.plantuml.style.ClockwiseTopRightBottomLeft;
|
||||
import net.sourceforge.plantuml.svek.CucaDiagramFileMaker;
|
||||
import net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek;
|
||||
import net.sourceforge.plantuml.xmi.CucaDiagramXmiMaker;
|
||||
|
||||
public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, PortionShower, ICucaDiagram {
|
||||
|
||||
static private final boolean G1972 = false;
|
||||
|
||||
// private String namespaceSeparator = ".";
|
||||
// private String namespaceSeparator1 = GO1972 ? "::" : ".";
|
||||
private String namespaceSeparator = null;
|
||||
private boolean namespaceSeparatorHasBeenSet = false;
|
||||
|
||||
public final boolean V1972() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public final boolean mergeIntricated() {
|
||||
if (getNamespaceSeparator() == null) {
|
||||
return false;
|
||||
}
|
||||
return this.V1972() && this.getUmlDiagramType() == UmlDiagramType.CLASS;
|
||||
}
|
||||
|
||||
private final List<HideOrShow2> hides2 = new ArrayList<>();
|
||||
private final List<HideOrShow2> removed = new ArrayList<>();
|
||||
protected final ZEntityFactory entityFactory = new ZEntityFactory(hides2, removed, this);
|
||||
// protected final EntityFactory entityFactory = new EntityFactory(hides2, removed, this);
|
||||
// protected final EntityFactory entityFactory = null;
|
||||
// private IGroup currentGroup = entityFactory.getRootGroup();
|
||||
private List<Ident> stacks2 = new ArrayList<>();
|
||||
private List<IGroup> stacks = new ArrayList<>();
|
||||
|
||||
private boolean visibilityModifierPresent;
|
||||
|
||||
public abstract IEntity getOrCreateLeaf(Ident ident, Code code, LeafType type, USymbol symbol);
|
||||
|
||||
public Ident cleanIdent(Ident ident) {
|
||||
return ident;
|
||||
}
|
||||
|
||||
public CucaDiagram(UmlSource source, UmlDiagramType type, Map<String, String> orig) {
|
||||
super(source, type, orig);
|
||||
this.stacks2.add(Ident.empty());
|
||||
}
|
||||
|
||||
private Ident getLastID() {
|
||||
if (stacks2.size() == 0) {
|
||||
// Thread.dumpStack();
|
||||
return Ident.empty();
|
||||
// throw new IllegalArgumentException();
|
||||
}
|
||||
return this.stacks2.get(stacks2.size() - 1);
|
||||
}
|
||||
|
||||
final public void setNamespaceSeparator(String namespaceSeparator) {
|
||||
this.namespaceSeparatorHasBeenSet = true;
|
||||
this.namespaceSeparator = namespaceSeparator;
|
||||
}
|
||||
|
||||
final public String getNamespaceSeparator() {
|
||||
if (namespaceSeparatorHasBeenSet == false)
|
||||
return V1972() ? "::" : ".";
|
||||
|
||||
return namespaceSeparator;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasUrl() {
|
||||
// for (IEntity entity : getGroups(true))
|
||||
// if (entity.hasUrl())
|
||||
// return true;
|
||||
//
|
||||
// for (IEntity entity : entityFactory.leafs())
|
||||
// if (entity.hasUrl())
|
||||
// return true;
|
||||
//
|
||||
// for (Link link : getLinks())
|
||||
// if (link.hasUrl())
|
||||
// return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
final public void setLastEntity(ILeaf foo) {
|
||||
this.lastEntity = foo;
|
||||
}
|
||||
|
||||
final protected ILeaf getOrCreateLeafDefault(Ident idNewLong, Code code, LeafType type, USymbol symbol) {
|
||||
Objects.requireNonNull(idNewLong);
|
||||
Objects.requireNonNull(type);
|
||||
throw new UnsupportedOperationException();
|
||||
// ILeaf result;
|
||||
// if (this.V1972())
|
||||
// result = entityFactory.getLeafStrict(idNewLong);
|
||||
// else
|
||||
// result = entityFactory.getLeaf(code);
|
||||
//
|
||||
// if (result == null) {
|
||||
// result = createLeafInternal(idNewLong, code, Display.getWithNewlines(code), type, symbol);
|
||||
// result.setUSymbol(symbol);
|
||||
// }
|
||||
//
|
||||
// if (result.getLeafType() == LeafType.CLASS && type == LeafType.OBJECT)
|
||||
// if (result.muteToType(type, symbol) == false)
|
||||
// return null;
|
||||
//
|
||||
// this.lastEntity = result;
|
||||
// return result;
|
||||
}
|
||||
|
||||
public ILeaf createLeaf(Ident idNewLong, Code code, Display display, LeafType type, USymbol symbol) {
|
||||
Objects.requireNonNull(idNewLong);
|
||||
throw new UnsupportedOperationException();
|
||||
// if (entityFactory.getLeafStrict(idNewLong) != null) {
|
||||
// return null;
|
||||
// }
|
||||
// return createLeafInternal(idNewLong, code, display, type, symbol);
|
||||
}
|
||||
|
||||
final protected ILeaf createLeafInternal(Ident newIdent, Code code, Display display, LeafType type,
|
||||
USymbol symbol) {
|
||||
Objects.requireNonNull(newIdent);
|
||||
throw new UnsupportedOperationException();
|
||||
// if (Display.isNull(display))
|
||||
// display = Display.getWithNewlines(code).withCreoleMode(CreoleMode.SIMPLE_LINE);
|
||||
//
|
||||
// final ILeaf leaf = entityFactory.createLeaf(newIdent, code, display, type, getCurrentGroup(), getHides(),
|
||||
// getNamespaceSeparator());
|
||||
// entityFactory.addLeaf(leaf);
|
||||
// this.lastEntity = leaf;
|
||||
// leaf.setUSymbol(symbol);
|
||||
// return leaf;
|
||||
}
|
||||
|
||||
final public Ident buildLeafIdent(String id) {
|
||||
return getLastID().add(id, getNamespaceSeparator());
|
||||
}
|
||||
|
||||
final public Ident buildLeafIdentSpecial(String id) {
|
||||
return buildFullyQualified(id);
|
||||
}
|
||||
|
||||
private Ident buildLeafIdentSpecialUnused(String id) {
|
||||
// if (namespaceSeparator != null) {
|
||||
// if (id.contains(namespaceSeparator)) {
|
||||
return Ident.empty().add(id, ".");
|
||||
// }
|
||||
// }
|
||||
// return getLastID().add(id, namespaceSeparator);
|
||||
}
|
||||
|
||||
final public Ident buildFullyQualified(String id) {
|
||||
throw new UnsupportedOperationException();
|
||||
// return entityFactory.buildFullyQualified(getLastID(), Ident.empty().add(id, getNamespaceSeparator()));
|
||||
}
|
||||
|
||||
final public Code buildCode(String s) {
|
||||
if (this.V1972())
|
||||
throw new UnsupportedOperationException();
|
||||
return CodeImpl.of(s);
|
||||
}
|
||||
|
||||
public boolean leafExist(Code code) {
|
||||
throw new UnsupportedOperationException();
|
||||
// if (this.V1972())
|
||||
// throw new UnsupportedOperationException();
|
||||
// return entityFactory.getLeaf(code) != null;
|
||||
}
|
||||
|
||||
public boolean leafExistSmart(Ident ident) {
|
||||
throw new UnsupportedOperationException();
|
||||
// return entityFactory.getLeafSmart(ident) != null;
|
||||
}
|
||||
|
||||
public boolean leafExistStrict(Ident ident) {
|
||||
throw new UnsupportedOperationException();
|
||||
// return entityFactory.getLeafStrict(ident) != null;
|
||||
}
|
||||
|
||||
final public Collection<IGroup> getChildrenGroups(IGroup parent) {
|
||||
if (this.V1972())
|
||||
return getChildrenGroupsIdent1972(parent);
|
||||
final Collection<IGroup> result = new ArrayList<>();
|
||||
for (IGroup gg : getGroups(false))
|
||||
if (gg.getParentContainer() == parent)
|
||||
result.add(gg);
|
||||
|
||||
return Collections.unmodifiableCollection(result);
|
||||
}
|
||||
|
||||
private Collection<IGroup> getChildrenGroupsIdent1972(IGroup parent) {
|
||||
throw new UnsupportedOperationException();
|
||||
// final Collection<IGroup> result = new ArrayList<>();
|
||||
// for (IGroup gg : entityFactory.groups2())
|
||||
// if (gg.getIdent().parent().equals(parent.getIdent()))
|
||||
// result.add(gg);
|
||||
//
|
||||
// return Collections.unmodifiableCollection(result);
|
||||
}
|
||||
|
||||
final public void gotoGroup(Ident ident, Code code, Display display, GroupType type, IGroup parent,
|
||||
NamespaceStrategy strategy) {
|
||||
if (this.V1972()) {
|
||||
gotoGroupInternalWithNamespace(ident, code, display, code, type, parent);
|
||||
return;
|
||||
|
||||
}
|
||||
if (strategy == NamespaceStrategy.MULTIPLE) {
|
||||
if (getNamespaceSeparator() != null)
|
||||
code = getFullyQualifiedCode1972(code);
|
||||
|
||||
gotoGroupInternalWithNamespace(ident, code, display, code, type, parent);
|
||||
} else if (strategy == NamespaceStrategy.SINGLE) {
|
||||
final Ident newIdLong = buildLeafIdentSpecial(ident.toString(this.getNamespaceSeparator()));
|
||||
gotoGroupExternal(newIdLong, code, display, null, type, parent);
|
||||
stacks2.add(newIdLong);
|
||||
} else {
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
}
|
||||
|
||||
protected final String getNamespace1972(Code fullyCode, String separator) {
|
||||
throw new UnsupportedOperationException();
|
||||
// String name = fullyCode.getName();
|
||||
// Objects.requireNonNull(separator);
|
||||
// do {
|
||||
// final int x = name.lastIndexOf(separator);
|
||||
// if (x == -1)
|
||||
// return null;
|
||||
//
|
||||
// name = name.substring(0, x);
|
||||
// } while (entityFactory.getLeaf(buildCode(name)) != null);
|
||||
// return name;
|
||||
}
|
||||
|
||||
private void gotoGroupInternalWithNamespace(Ident idNewLong, Code code, Display display, Code namespaceNew,
|
||||
GroupType type, IGroup parent) {
|
||||
throw new UnsupportedOperationException();
|
||||
// this.stacks.add(currentGroup);
|
||||
// this.stacks2.add(idNewLong);
|
||||
//
|
||||
// if (this.V1972()) {
|
||||
// gotoGroupInternal(idNewLong, code, display, namespaceNew, type, parent);
|
||||
// return;
|
||||
// }
|
||||
// if (getNamespaceSeparator() == null) {
|
||||
// gotoGroupInternal(idNewLong, code, display, namespaceNew, type, parent);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// final String namespaceCurrent = getNamespace1972(code, getNamespaceSeparator());
|
||||
// if (namespaceCurrent == null) {
|
||||
// gotoGroupInternal(idNewLong, code, display, namespaceNew, type, parent);
|
||||
// return;
|
||||
// }
|
||||
// final IGroup realParent = entityFactory.getGroup(buildCode(namespaceCurrent));
|
||||
// if (realParent == null) {
|
||||
// gotoGroupInternal(idNewLong, code, display, namespaceNew, type, parent);
|
||||
// return;
|
||||
// }
|
||||
// display = Display.create(idNewLong.getLast());
|
||||
// IGroup result = entityFactory.createGroup(idNewLong, code, display, namespaceNew, type, realParent, getHides(),
|
||||
// getNamespaceSeparator());
|
||||
//
|
||||
// entityFactory.addGroup(result);
|
||||
// currentGroup = result;
|
||||
|
||||
}
|
||||
|
||||
public void endGroup() {
|
||||
throw new UnsupportedOperationException();
|
||||
// if (stacks2.size() > 0) {
|
||||
// // Thread.dumpStack();
|
||||
// stacks2.remove(stacks2.size() - 1);
|
||||
// }
|
||||
// if (EntityUtils.groupRoot(currentGroup)) {
|
||||
// Log.error("No parent group");
|
||||
// return;
|
||||
// }
|
||||
// if (stacks.size() > 0)
|
||||
// currentGroup = stacks.remove(stacks.size() - 1);
|
||||
// else
|
||||
// currentGroup = currentGroup.getParentContainer();
|
||||
}
|
||||
|
||||
private void gotoGroupInternal(Ident idNewLong, final Code code, Display display, final Code namespace,
|
||||
GroupType type, IGroup parent) {
|
||||
throw new UnsupportedOperationException();
|
||||
// if (this.V1972()) {
|
||||
// gotoGroupInternal1972(idNewLong, code, display, namespace, type, parent);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// IGroup result = entityFactory.getGroup(code);
|
||||
// if (result != null) {
|
||||
// currentGroup = result;
|
||||
// return;
|
||||
// }
|
||||
// if (entityFactory.getLeafStrict(idNewLong) != null) {
|
||||
// result = entityFactory.muteToGroup(code.getName(), namespace, type, parent);
|
||||
// result.setDisplay(display);
|
||||
// } else {
|
||||
// result = entityFactory.createGroup(idNewLong, code, display, namespace, type, parent, getHides(),
|
||||
// getNamespaceSeparator());
|
||||
// }
|
||||
// entityFactory.addGroup(result);
|
||||
// currentGroup = result;
|
||||
}
|
||||
|
||||
private void gotoGroupInternal1972(Ident idNewLong, final Code code, Display display, final Code namespace,
|
||||
GroupType type, IGroup parent) {
|
||||
throw new UnsupportedOperationException();
|
||||
// IGroup result = entityFactory.getGroupStrict(idNewLong);
|
||||
// if (result != null) {
|
||||
// currentGroup = result;
|
||||
// return;
|
||||
// }
|
||||
// final boolean mutation;
|
||||
// if (getNamespaceSeparator() == null)
|
||||
// mutation = entityFactory.getLeafVerySmart(idNewLong) != null;
|
||||
// else
|
||||
// mutation = entityFactory.getLeafStrict(idNewLong) != null;
|
||||
// if (mutation) {
|
||||
// result = entityFactory.muteToGroup1972(idNewLong, namespace, type, parent);
|
||||
// result.setDisplay(display);
|
||||
// } else {
|
||||
// result = entityFactory.createGroup(idNewLong, code, display, namespace, type, parent, getHides(),
|
||||
// getNamespaceSeparator());
|
||||
// }
|
||||
// entityFactory.addGroup(result);
|
||||
// currentGroup = result;
|
||||
// stacks2.set(stacks2.size() - 1, result.getIdent());
|
||||
}
|
||||
|
||||
final protected void gotoGroupExternal(Ident newIdLong, final Code code, Display display, final Code namespace,
|
||||
GroupType type, IGroup parent) {
|
||||
throw new UnsupportedOperationException();
|
||||
// IGroup result = entityFactory.getGroup(code);
|
||||
// if (result != null) {
|
||||
// currentGroup = result;
|
||||
// return;
|
||||
// }
|
||||
// if (entityFactory.getLeaf(code) != null) {
|
||||
// result = entityFactory.muteToGroup(code.getName(), namespace, type, parent);
|
||||
// result.setDisplay(display);
|
||||
// } else {
|
||||
// result = entityFactory.createGroup(newIdLong, code, display, namespace, type, parent, getHides(),
|
||||
// getNamespaceSeparator());
|
||||
// }
|
||||
// entityFactory.addGroup(result);
|
||||
// // entityFactory.thisIsNotArealGroup(newIdLong);
|
||||
// currentGroup = result;
|
||||
}
|
||||
|
||||
public final void gotoThisGroup(IGroup group) {
|
||||
throw new UnsupportedOperationException();
|
||||
// currentGroup = group;
|
||||
}
|
||||
|
||||
final protected Code getFullyQualifiedCode1972(Code code) {
|
||||
throw new UnsupportedOperationException();
|
||||
// final String separator = Objects.requireNonNull(getNamespaceSeparator());
|
||||
// final String full = code.getName();
|
||||
// if (full.startsWith(separator))
|
||||
// return buildCode(full.substring(separator.length()));
|
||||
//
|
||||
// if (full.contains(separator))
|
||||
// return buildCode(full);
|
||||
//
|
||||
// if (EntityUtils.groupRoot(currentGroup))
|
||||
// return buildCode(full);
|
||||
//
|
||||
// final Code namespace = currentGroup.getNamespace();
|
||||
// if (namespace == null)
|
||||
// return buildCode(full);
|
||||
//
|
||||
// return buildCode(namespace.getName() + separator + full);
|
||||
}
|
||||
|
||||
public final IGroup getCurrentGroup() {
|
||||
throw new UnsupportedOperationException();
|
||||
// return currentGroup;
|
||||
}
|
||||
|
||||
public final IGroup getGroup(Code code) {
|
||||
throw new UnsupportedOperationException();
|
||||
// final IGroup p = entityFactory.getGroup(code);
|
||||
// return Objects.requireNonNull(p);
|
||||
}
|
||||
|
||||
public final IGroup getGroupStrict(Ident ident) {
|
||||
throw new UnsupportedOperationException();
|
||||
// if (!this.V1972())
|
||||
// throw new UnsupportedOperationException();
|
||||
// final IGroup p = entityFactory.getGroupStrict(ident);
|
||||
// return Objects.requireNonNull(p);
|
||||
}
|
||||
|
||||
public final IGroup getGroupVerySmart(Ident ident) {
|
||||
throw new UnsupportedOperationException();
|
||||
// if (!this.V1972())
|
||||
// throw new UnsupportedOperationException();
|
||||
// final IGroup p = entityFactory.getGroupVerySmart(ident);
|
||||
// return Objects.requireNonNull(p);
|
||||
}
|
||||
|
||||
public final boolean isGroup(Code code) {
|
||||
throw new UnsupportedOperationException();
|
||||
// if (this.V1972())
|
||||
// return isGroupStrict((Ident) code);
|
||||
// return leafExist(code) == false && entityFactory.getGroup(code) != null;
|
||||
}
|
||||
|
||||
public final boolean isGroupStrict(Ident ident) {
|
||||
throw new UnsupportedOperationException();
|
||||
// if (!this.V1972())
|
||||
// throw new UnsupportedOperationException();
|
||||
// return leafExistStrict(ident) == false && entityFactory.getGroupStrict(ident) != null;
|
||||
}
|
||||
|
||||
public final boolean isGroupVerySmart(Ident ident) {
|
||||
throw new UnsupportedOperationException();
|
||||
// if (!this.V1972())
|
||||
// throw new UnsupportedOperationException();
|
||||
// return leafExistSmart(ident) == false && entityFactory.getGroupVerySmart(ident) != null;
|
||||
}
|
||||
|
||||
public final Collection<IGroup> getGroups(boolean withRootGroup) {
|
||||
throw new UnsupportedOperationException();
|
||||
// if (withRootGroup == false)
|
||||
// return entityFactory.groups();
|
||||
//
|
||||
// final Collection<IGroup> result = new ArrayList<>();
|
||||
// result.add(getRootGroup());
|
||||
// result.addAll(entityFactory.groups());
|
||||
// return Collections.unmodifiableCollection(result);
|
||||
}
|
||||
|
||||
public IGroup getRootGroup() {
|
||||
throw new UnsupportedOperationException();
|
||||
// return entityFactory.getRootGroup();
|
||||
}
|
||||
|
||||
public final Collection<ILeaf> getLeafsvalues() {
|
||||
throw new UnsupportedOperationException();
|
||||
// return entityFactory.leafs2();
|
||||
}
|
||||
|
||||
public final int getLeafssize() {
|
||||
return getLeafsvalues().size();
|
||||
}
|
||||
|
||||
public final ILeaf getLeaf(Code code) {
|
||||
throw new UnsupportedOperationException();
|
||||
// return entityFactory.getLeaf(code);
|
||||
}
|
||||
|
||||
public final ILeaf getLeafStrict(Ident ident) {
|
||||
throw new UnsupportedOperationException();
|
||||
// return entityFactory.getLeafStrict(ident);
|
||||
}
|
||||
|
||||
public final ILeaf getLeafSmart(Ident ident) {
|
||||
throw new UnsupportedOperationException();
|
||||
// return entityFactory.getLeafSmart(ident);
|
||||
}
|
||||
|
||||
public /* final */ ILeaf getLeafVerySmart(Ident ident) {
|
||||
throw new UnsupportedOperationException();
|
||||
// return entityFactory.getLeafVerySmart(ident);
|
||||
}
|
||||
|
||||
final public void addLink(Link link) {
|
||||
entityFactory.addLink(link);
|
||||
}
|
||||
|
||||
final protected void removeLink(Link link) {
|
||||
entityFactory.removeLink(link);
|
||||
}
|
||||
|
||||
final public List<Link> getLinks() {
|
||||
return entityFactory.getLinks();
|
||||
}
|
||||
|
||||
abstract protected List<String> getDotStrings();
|
||||
|
||||
final public String[] getDotStringSkek() {
|
||||
final List<String> result = new ArrayList<>();
|
||||
for (String s : getDotStrings())
|
||||
if (s.startsWith("nodesep") || s.startsWith("ranksep") || s.startsWith("layout"))
|
||||
result.add(s);
|
||||
|
||||
String aspect = getPragma().getValue("aspect");
|
||||
if (aspect != null) {
|
||||
aspect = aspect.replace(',', '.');
|
||||
result.add("aspect=" + aspect + ";");
|
||||
}
|
||||
final String ratio = getPragma().getValue("ratio");
|
||||
if (ratio != null)
|
||||
result.add("ratio=" + ratio + ";");
|
||||
|
||||
return result.toArray(new String[result.size()]);
|
||||
}
|
||||
|
||||
private void createFilesGraphml(OutputStream suggestedFile) throws IOException {
|
||||
final CucaDiagramGraphmlMaker maker = new CucaDiagramGraphmlMaker(this);
|
||||
maker.createFiles(suggestedFile);
|
||||
}
|
||||
|
||||
private void createFilesXmi(OutputStream suggestedFile, FileFormat fileFormat) throws IOException {
|
||||
final CucaDiagramXmiMaker maker = new CucaDiagramXmiMaker(this, fileFormat);
|
||||
maker.createFiles(suggestedFile);
|
||||
}
|
||||
|
||||
private void createFilesScxml(OutputStream suggestedFile) throws IOException {
|
||||
// final StateDiagramScxmlMaker maker = new StateDiagramScxmlMaker((StateDiagram) this);
|
||||
// maker.createFiles(suggestedFile);
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ImageData exportDiagramInternal(OutputStream os, int index, FileFormatOption fileFormatOption)
|
||||
throws IOException {
|
||||
final FileFormat fileFormat = fileFormatOption.getFileFormat();
|
||||
|
||||
if (fileFormat == FileFormat.ATXT || fileFormat == FileFormat.UTXT) {
|
||||
try {
|
||||
createFilesTxt(os, index, fileFormat);
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace(SecurityUtils.createPrintStream(os));
|
||||
}
|
||||
return ImageDataSimple.ok();
|
||||
}
|
||||
|
||||
if (fileFormat == FileFormat.GRAPHML) {
|
||||
createFilesGraphml(os);
|
||||
return ImageDataSimple.ok();
|
||||
}
|
||||
|
||||
if (fileFormat.name().startsWith("XMI")) {
|
||||
createFilesXmi(os, fileFormat);
|
||||
return ImageDataSimple.ok();
|
||||
}
|
||||
|
||||
if (fileFormat == FileFormat.SCXML) {
|
||||
createFilesScxml(os);
|
||||
return ImageDataSimple.ok();
|
||||
}
|
||||
|
||||
if (getUmlDiagramType() == UmlDiagramType.COMPOSITE) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
final CucaDiagramFileMaker maker;
|
||||
if (this.isUseElk())
|
||||
maker = new CucaDiagramFileMakerElk(this, fileFormatOption.getDefaultStringBounder(getSkinParam()));
|
||||
else if (this.isUseSmetana())
|
||||
maker = new CucaDiagramFileMakerSmetana(this, fileFormatOption.getDefaultStringBounder(getSkinParam()));
|
||||
else
|
||||
maker = new CucaDiagramFileMakerSvek(this);
|
||||
|
||||
final ImageData result = maker.createFile(os, getDotStrings(), fileFormatOption);
|
||||
|
||||
if (result == null)
|
||||
return ImageDataSimple.error();
|
||||
|
||||
this.warningOrError = result.getWarningOrError();
|
||||
return result;
|
||||
}
|
||||
|
||||
private String warningOrError;
|
||||
|
||||
@Override
|
||||
public String getWarningOrError() {
|
||||
final String generalWarningOrError = super.getWarningOrError();
|
||||
if (warningOrError == null)
|
||||
return generalWarningOrError;
|
||||
|
||||
if (generalWarningOrError == null)
|
||||
return warningOrError;
|
||||
|
||||
return generalWarningOrError + BackSlash.NEWLINE + warningOrError;
|
||||
}
|
||||
|
||||
private void createFilesTxt(OutputStream os, int index, FileFormat fileFormat) throws IOException {
|
||||
final CucaDiagramTxtMaker maker = new CucaDiagramTxtMaker(this, fileFormat);
|
||||
maker.createFiles(os, index);
|
||||
}
|
||||
|
||||
public boolean isAutarkic(IGroup g) {
|
||||
if (g.getGroupType() == GroupType.PACKAGE)
|
||||
return false;
|
||||
|
||||
if (g.getGroupType() == GroupType.INNER_ACTIVITY)
|
||||
return true;
|
||||
|
||||
if (g.getGroupType() == GroupType.CONCURRENT_ACTIVITY)
|
||||
return true;
|
||||
|
||||
if (g.getGroupType() == GroupType.CONCURRENT_STATE)
|
||||
return true;
|
||||
|
||||
if (getChildrenGroups(g).size() > 0)
|
||||
return false;
|
||||
|
||||
for (Link link : getLinks())
|
||||
if (EntityUtils.isPureInnerLink3(g, link) == false)
|
||||
return false;
|
||||
|
||||
for (ILeaf leaf : g.getLeafsDirect())
|
||||
if (leaf.getEntityPosition() != EntityPosition.NORMAL)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static boolean isNumber(String s) {
|
||||
return s.matches("[+-]?(\\.?\\d+|\\d+\\.\\d*)");
|
||||
}
|
||||
|
||||
public void resetPragmaLabel() {
|
||||
getPragma().undefine("labeldistance");
|
||||
getPragma().undefine("labelangle");
|
||||
}
|
||||
|
||||
public String getLabeldistance() {
|
||||
if (getPragma().isDefine("labeldistance")) {
|
||||
final String s = getPragma().getValue("labeldistance");
|
||||
if (isNumber(s))
|
||||
return s;
|
||||
|
||||
}
|
||||
if (getPragma().isDefine("defaultlabeldistance")) {
|
||||
final String s = getPragma().getValue("defaultlabeldistance");
|
||||
if (isNumber(s))
|
||||
return s;
|
||||
|
||||
}
|
||||
// Default in dot 1.0
|
||||
return "1.7";
|
||||
}
|
||||
|
||||
public String getLabelangle() {
|
||||
if (getPragma().isDefine("labelangle")) {
|
||||
final String s = getPragma().getValue("labelangle");
|
||||
if (isNumber(s))
|
||||
return s;
|
||||
|
||||
}
|
||||
if (getPragma().isDefine("defaultlabelangle")) {
|
||||
final String s = getPragma().getValue("defaultlabelangle");
|
||||
if (isNumber(s))
|
||||
return s;
|
||||
|
||||
}
|
||||
// Default in dot -25
|
||||
return "25";
|
||||
}
|
||||
|
||||
final public boolean isEmpty(IGroup gToTest) {
|
||||
for (IEntity gg : getGroups(false)) {
|
||||
if (gg == gToTest)
|
||||
continue;
|
||||
|
||||
if (gg.getParentContainer() == gToTest)
|
||||
return false;
|
||||
|
||||
}
|
||||
return gToTest.size() == 0;
|
||||
}
|
||||
|
||||
public final boolean isVisibilityModifierPresent() {
|
||||
return visibilityModifierPresent;
|
||||
}
|
||||
|
||||
public final void setVisibilityModifierPresent(boolean visibilityModifierPresent) {
|
||||
this.visibilityModifierPresent = visibilityModifierPresent;
|
||||
}
|
||||
|
||||
public final boolean showPortion(EntityPortion portion, IEntity entity) {
|
||||
if (getSkinParam().strictUmlStyle() && portion == EntityPortion.CIRCLED_CHARACTER)
|
||||
return false;
|
||||
|
||||
boolean result = true;
|
||||
for (HideOrShow cmd : hideOrShows)
|
||||
if (cmd.portion == portion && cmd.gender.contains(entity))
|
||||
result = cmd.show;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public final void hideOrShow(EntityGender gender, EntityPortion portions, boolean show) {
|
||||
for (EntityPortion portion : portions.asSet())
|
||||
this.hideOrShows.add(new HideOrShow(gender, portion, show));
|
||||
|
||||
}
|
||||
|
||||
public void hideOrShow(Set<VisibilityModifier> visibilities, boolean show) {
|
||||
if (show)
|
||||
hides.removeAll(visibilities);
|
||||
else
|
||||
hides.addAll(visibilities);
|
||||
}
|
||||
|
||||
public void hideOrShow2(String what, boolean show) {
|
||||
this.hides2.add(new HideOrShow2(what, show));
|
||||
}
|
||||
|
||||
public void removeOrRestore(String what, boolean show) {
|
||||
this.removed.add(new HideOrShow2(what, show));
|
||||
}
|
||||
|
||||
private final List<HideOrShow> hideOrShows = new ArrayList<>();
|
||||
private final Set<VisibilityModifier> hides = new HashSet<>();
|
||||
|
||||
static class HideOrShow {
|
||||
private final EntityGender gender;
|
||||
private final EntityPortion portion;
|
||||
private final boolean show;
|
||||
|
||||
public HideOrShow(EntityGender gender, EntityPortion portion, boolean show) {
|
||||
this.gender = gender;
|
||||
this.portion = portion;
|
||||
this.show = show;
|
||||
}
|
||||
}
|
||||
|
||||
public final Set<VisibilityModifier> getHides() {
|
||||
return Collections.unmodifiableSet(hides);
|
||||
}
|
||||
|
||||
final public boolean isStandalone(IEntity ent) {
|
||||
for (final Link link : getLinks())
|
||||
if (link.getEntity1() == ent || link.getEntity2() == ent)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
final public boolean isStandaloneForArgo(IEntity ent) {
|
||||
for (final Link link : getLinks()) {
|
||||
if (link.isHidden() || link.isInvis())
|
||||
continue;
|
||||
if (link.getEntity1() == ent || link.getEntity2() == ent)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
final public Link getLastLink() {
|
||||
final List<Link> links = getLinks();
|
||||
for (int i = links.size() - 1; i >= 0; i--) {
|
||||
final Link link = links.get(i);
|
||||
if (link.getEntity1().getLeafType() != LeafType.NOTE && link.getEntity2().getLeafType() != LeafType.NOTE)
|
||||
return link;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
final public List<Link> getTwoLastLinks() {
|
||||
final List<Link> result = new ArrayList<>();
|
||||
final List<Link> links = getLinks();
|
||||
for (int i = links.size() - 1; i >= 0; i--) {
|
||||
final Link link = links.get(i);
|
||||
if (link.getEntity1().getLeafType() != LeafType.NOTE && link.getEntity2().getLeafType() != LeafType.NOTE) {
|
||||
result.add(link);
|
||||
if (result.size() == 2)
|
||||
return Collections.unmodifiableList(result);
|
||||
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private ILeaf lastEntity = null;
|
||||
|
||||
final public ILeaf getLastEntity() {
|
||||
return lastEntity;
|
||||
}
|
||||
|
||||
final public IEntityFactory getIEntityFactory() {
|
||||
return entityFactory;
|
||||
}
|
||||
|
||||
final public EntityFactory getEntityFactory() {
|
||||
throw new UnsupportedOperationException();
|
||||
// return entityFactory;
|
||||
}
|
||||
|
||||
public void applySingleStrategy() {
|
||||
// final MagmaList magmaList = new MagmaList();
|
||||
//
|
||||
// for (IGroup g : getGroups(true)) {
|
||||
// final List<ILeaf> standalones = new ArrayList<>();
|
||||
//
|
||||
// for (ILeaf ent : g.getLeafsDirect())
|
||||
// if (isStandalone(ent))
|
||||
// standalones.add(ent);
|
||||
//
|
||||
// if (standalones.size() < 3)
|
||||
// continue;
|
||||
//
|
||||
// final Magma magma = new Magma(this, standalones);
|
||||
// magma.putInSquare();
|
||||
// magmaList.add(magma);
|
||||
// }
|
||||
//
|
||||
// for (IGroup g : getGroups(true)) {
|
||||
// final MagmaList magmas = magmaList.getMagmas(g);
|
||||
// if (magmas.size() < 3)
|
||||
// continue;
|
||||
//
|
||||
// magmas.putInSquare();
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
public boolean isHideEmptyDescriptionForState() {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void incRawLayout() {
|
||||
entityFactory.incRawLayout();
|
||||
}
|
||||
|
||||
public CommandExecutionResult constraintOnLinks(Link link1, Link link2, Display display) {
|
||||
final LinkConstraint linkConstraint = new LinkConstraint(link1, link2, display);
|
||||
link1.setLinkConstraint(linkConstraint);
|
||||
link2.setLinkConstraint(linkConstraint);
|
||||
return CommandExecutionResult.ok();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClockwiseTopRightBottomLeft getDefaultMargins() {
|
||||
// Strange numbers here for backwards compatibility
|
||||
return ClockwiseTopRightBottomLeft.topRightBottomLeft(0, 5, 5, 0);
|
||||
}
|
||||
|
||||
private final AtomicInteger cpt = new AtomicInteger(1);
|
||||
|
||||
public int getUniqueSequence() {
|
||||
return cpt.addAndGet(1);
|
||||
}
|
||||
|
||||
public String getUniqueSequence(String prefix) {
|
||||
return prefix + getUniqueSequence();
|
||||
}
|
||||
|
||||
}
|
@ -1,896 +0,0 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PlantUML distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
* USA.
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
* Contribution: Hisashi Miyashita
|
||||
* Contribution: Miguel Esteves
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.baraye.b;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import net.sourceforge.plantuml.Direction;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.Guillemet;
|
||||
import net.sourceforge.plantuml.Hideable;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineConfigurable;
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.Removeable;
|
||||
import net.sourceforge.plantuml.SpecificBackcolorable;
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.baraye.Quark;
|
||||
import net.sourceforge.plantuml.command.Position;
|
||||
import net.sourceforge.plantuml.cucadiagram.Bodier;
|
||||
import net.sourceforge.plantuml.cucadiagram.Code;
|
||||
import net.sourceforge.plantuml.cucadiagram.CucaNote;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.cucadiagram.DisplayPositioned;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityPosition;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityUtils;
|
||||
import net.sourceforge.plantuml.cucadiagram.GroupType;
|
||||
import net.sourceforge.plantuml.cucadiagram.ICucaDiagram;
|
||||
import net.sourceforge.plantuml.cucadiagram.Ident;
|
||||
import net.sourceforge.plantuml.cucadiagram.LeafType;
|
||||
import net.sourceforge.plantuml.cucadiagram.Link;
|
||||
import net.sourceforge.plantuml.cucadiagram.Stereostyles;
|
||||
import net.sourceforge.plantuml.cucadiagram.Stereotag;
|
||||
import net.sourceforge.plantuml.cucadiagram.Stereotype;
|
||||
import net.sourceforge.plantuml.cucadiagram.dot.Neighborhood;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.graphic.TextBlockEmpty;
|
||||
import net.sourceforge.plantuml.graphic.USymbol;
|
||||
import net.sourceforge.plantuml.graphic.USymbols;
|
||||
import net.sourceforge.plantuml.graphic.color.ColorType;
|
||||
import net.sourceforge.plantuml.graphic.color.Colors;
|
||||
import net.sourceforge.plantuml.skin.VisibilityModifier;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.svek.IEntityImage;
|
||||
import net.sourceforge.plantuml.svek.Kal;
|
||||
import net.sourceforge.plantuml.svek.Margins;
|
||||
import net.sourceforge.plantuml.svek.PackageStyle;
|
||||
import net.sourceforge.plantuml.svek.SingleStrategy;
|
||||
import net.sourceforge.plantuml.svek.image.EntityImageStateCommon;
|
||||
import net.sourceforge.plantuml.ugraphic.UFont;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
|
||||
final public class EntityImp
|
||||
implements SpecificBackcolorable, Hideable, Removeable, LineConfigurable, ILeaf, IGroup {
|
||||
|
||||
private final ZEntityFactory entityFactory;
|
||||
|
||||
private Quark quark;
|
||||
|
||||
private Url url;
|
||||
|
||||
private final Bodier bodier;
|
||||
private final String uid;
|
||||
private Display display = Display.empty();
|
||||
private DisplayPositioned legend = null;
|
||||
|
||||
private LeafType leafType;
|
||||
private Stereotype stereotype;
|
||||
private Stereostyles stereostyles = Stereostyles.NONE;
|
||||
private String generic;
|
||||
|
||||
private GroupType groupType;
|
||||
|
||||
// Other
|
||||
private Margins margins = Margins.NONE;
|
||||
private final Collection<String> portShortNames = new HashSet<>();
|
||||
private int xposition;
|
||||
private IEntityImage svekImage;
|
||||
|
||||
private USymbol symbol;
|
||||
private final int rawLayout;
|
||||
private char concurrentSeparator;
|
||||
private LineLocation codeLine;
|
||||
|
||||
private Set<Stereotag> tags = new LinkedHashSet<>();
|
||||
private final List<CucaNote> notesTop = new ArrayList<>();
|
||||
private final List<CucaNote> notesBottom = new ArrayList<>();
|
||||
|
||||
// @Override
|
||||
public void addNote(Display note, Position position, Colors colors) {
|
||||
if (position == Position.TOP)
|
||||
notesTop.add(CucaNote.build(note, position, colors));
|
||||
else if (position == Position.BOTTOM)
|
||||
notesBottom.add(CucaNote.build(note, position, colors));
|
||||
}
|
||||
|
||||
// @Override
|
||||
public List<CucaNote> getNotes(Position position) {
|
||||
if (position == Position.TOP)
|
||||
return Collections.unmodifiableList(notesTop);
|
||||
if (position == Position.BOTTOM)
|
||||
return Collections.unmodifiableList(notesBottom);
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
public void addStereotag(Stereotag tag) {
|
||||
this.tags.add(tag);
|
||||
}
|
||||
|
||||
public Set<Stereotag> stereotags() {
|
||||
return Collections.unmodifiableSet(tags);
|
||||
}
|
||||
|
||||
// Back to Entity
|
||||
private EntityImp(Quark quark, ZEntityFactory entityFactory, Bodier bodier, int rawLayout) {
|
||||
this.quark = Objects.requireNonNull(quark);
|
||||
this.uid = StringUtils.getUid("cl", entityFactory.getDiagram().getUniqueSequence());
|
||||
this.entityFactory = entityFactory;
|
||||
this.bodier = bodier;
|
||||
this.rawLayout = rawLayout;
|
||||
}
|
||||
|
||||
EntityImp(Quark quark, ZEntityFactory entityFactory, Bodier bodier, LeafType leafType, int rawLayout) {
|
||||
this(Objects.requireNonNull(quark), entityFactory, bodier, rawLayout);
|
||||
// System.err.println("ID for leaf=" + code + " " + ident);
|
||||
// ident.checkSameAs(code, namespaceSeparator);
|
||||
this.leafType = leafType;
|
||||
}
|
||||
|
||||
EntityImp(Quark quark, ZEntityFactory entityFactory, Bodier bodier, GroupType groupType, int rawLayout) {
|
||||
this(Objects.requireNonNull(quark), entityFactory, bodier, rawLayout);
|
||||
// System.err.println("ID for group=" + code + " " + ident);
|
||||
this.groupType = groupType;
|
||||
}
|
||||
|
||||
public LeafType getLeafType() {
|
||||
return leafType;
|
||||
}
|
||||
|
||||
public boolean muteToType(LeafType newType, USymbol newSymbol) {
|
||||
checkNotGroup();
|
||||
Objects.requireNonNull(newType);
|
||||
if (leafType != LeafType.STILL_UNKNOWN) {
|
||||
if (newType == this.leafType)
|
||||
return true;
|
||||
|
||||
if (leafType != LeafType.ANNOTATION && leafType != LeafType.ABSTRACT_CLASS && leafType != LeafType.CLASS
|
||||
&& leafType != LeafType.ENUM && leafType != LeafType.INTERFACE) {
|
||||
return false;
|
||||
// throw new IllegalArgumentException("type=" + leafType);
|
||||
}
|
||||
if (newType != LeafType.ANNOTATION && newType != LeafType.ABSTRACT_CLASS && newType != LeafType.CLASS
|
||||
&& newType != LeafType.ENUM && newType != LeafType.INTERFACE && newType != LeafType.OBJECT) {
|
||||
return false;
|
||||
// throw new IllegalArgumentException("newtype=" + newType);
|
||||
}
|
||||
}
|
||||
if (leafType == LeafType.CLASS && newType == LeafType.OBJECT)
|
||||
bodier.muteClassToObject();
|
||||
|
||||
this.leafType = newType;
|
||||
this.symbol = newSymbol;
|
||||
return true;
|
||||
}
|
||||
|
||||
public Quark getQuark() {
|
||||
return quark;
|
||||
}
|
||||
|
||||
public String getCodeGetName() {
|
||||
return getQuark().getName();
|
||||
}
|
||||
|
||||
public Display getDisplay() {
|
||||
// if (intricated)
|
||||
// return entityFactory.getIntricatedDisplay(ident);
|
||||
return display;
|
||||
}
|
||||
|
||||
public void setDisplay(Display display) {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public Stereotype getStereotype() {
|
||||
return stereotype;
|
||||
}
|
||||
|
||||
public final void setStereotype(Stereotype stereotype) {
|
||||
this.stereotype = stereotype;
|
||||
}
|
||||
|
||||
// public final IGroup getParentContainer() {
|
||||
// return entityFactory.getParentContainer(ident, parentContainer);
|
||||
// // Objects.requireNonNull(parentContainer);
|
||||
// // return parentContainer;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return quark.toString() + " " + display + "(" + leafType + ")[" + groupType + "] " + getUid();
|
||||
}
|
||||
|
||||
public final Url getUrl99() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public boolean hasUrl() {
|
||||
if (Display.isNull(display) == false && display.hasUrl())
|
||||
return true;
|
||||
|
||||
if (bodier.hasUrl())
|
||||
return true;
|
||||
|
||||
return url != null;
|
||||
}
|
||||
|
||||
public final void addUrl(Url url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public final Margins getMargins() {
|
||||
checkNotGroup();
|
||||
return margins;
|
||||
}
|
||||
|
||||
public final void ensureMargins(Margins newMargins) {
|
||||
// checkNotGroup();
|
||||
this.margins = this.margins.merge(newMargins);
|
||||
}
|
||||
|
||||
public int getXposition() {
|
||||
checkNotGroup();
|
||||
return xposition;
|
||||
}
|
||||
|
||||
public void setXposition(int pos) {
|
||||
checkNotGroup();
|
||||
xposition = pos;
|
||||
}
|
||||
|
||||
public final IEntityImage getSvekImage() {
|
||||
checkNotGroup();
|
||||
return svekImage;
|
||||
}
|
||||
|
||||
public final void setSvekImage(IEntityImage svekImage) {
|
||||
checkNotGroup();
|
||||
this.svekImage = svekImage;
|
||||
}
|
||||
|
||||
public final void setGeneric(String generic) {
|
||||
checkNotGroup();
|
||||
this.generic = generic;
|
||||
}
|
||||
|
||||
public final String getGeneric() {
|
||||
checkNotGroup();
|
||||
return generic;
|
||||
}
|
||||
|
||||
public Bodier getBodier() {
|
||||
return bodier;
|
||||
}
|
||||
|
||||
public EntityPosition getEntityPosition() {
|
||||
// if (leafType == LeafType.PORT)
|
||||
// return EntityPosition.PORT;
|
||||
|
||||
if (leafType == LeafType.PORTIN)
|
||||
return EntityPosition.PORTIN;
|
||||
|
||||
if (leafType == LeafType.PORTOUT)
|
||||
return EntityPosition.PORTOUT;
|
||||
|
||||
if (leafType != LeafType.STATE)
|
||||
return EntityPosition.NORMAL;
|
||||
|
||||
if (quark.isRoot())
|
||||
return EntityPosition.NORMAL;
|
||||
|
||||
final Stereotype stereotype = getStereotype();
|
||||
if (stereotype == null)
|
||||
return EntityPosition.NORMAL;
|
||||
|
||||
return EntityPosition.fromStereotype(stereotype.getLabel(Guillemet.DOUBLE_COMPARATOR));
|
||||
|
||||
}
|
||||
|
||||
// ----------
|
||||
|
||||
private void checkGroup() {
|
||||
if (isGroup() == false)
|
||||
throw new UnsupportedOperationException();
|
||||
|
||||
}
|
||||
|
||||
private void checkNotGroup() {
|
||||
if (isGroup())
|
||||
throw new UnsupportedOperationException();
|
||||
|
||||
}
|
||||
|
||||
// public boolean containsLeafRecurse(ILeaf leaf) {
|
||||
// if (Objects.requireNonNull(leaf).isGroup())
|
||||
// throw new IllegalArgumentException();
|
||||
//
|
||||
// checkGroup();
|
||||
// if (leaf.getParentContainer() == this)
|
||||
// return true;
|
||||
//
|
||||
// for (IGroup child : getChildren())
|
||||
// if (child.containsLeafRecurse(leaf))
|
||||
// return true;
|
||||
//
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// public Collection<ILeaf> getLeafsDirect() {
|
||||
// checkGroup();
|
||||
// final List<ILeaf> result = new ArrayList<>();
|
||||
// for (ILeaf ent : entityFactory.leafs()) {
|
||||
// if (ent.isGroup())
|
||||
// throw new IllegalStateException();
|
||||
//
|
||||
// if (ent.getParentContainer() == this)
|
||||
// result.add(ent);
|
||||
//
|
||||
// }
|
||||
// return Collections.unmodifiableCollection(result);
|
||||
// }
|
||||
|
||||
// public Collection<IGroup> getChildren() {
|
||||
// checkGroup();
|
||||
// final Collection<IGroup> result = new ArrayList<>();
|
||||
// for (IGroup g : entityFactory.groups())
|
||||
// if (g != this && g.getParentContainer() == this)
|
||||
// result.add(g);
|
||||
//
|
||||
// return Collections.unmodifiableCollection(result);
|
||||
// }
|
||||
|
||||
// public void moveEntitiesTo(IGroup dest) {
|
||||
// if (entityFactory.namespaceSeparator.V1972()) {
|
||||
// moveEntitiesTo1972(dest);
|
||||
// return;
|
||||
// }
|
||||
// checkGroup();
|
||||
// if (dest.isGroup() == false)
|
||||
// throw new UnsupportedOperationException();
|
||||
//
|
||||
// for (ILeaf ent : getLeafsDirect())
|
||||
// ((ZEntityImpl) ent).parentContainer = dest;
|
||||
//
|
||||
// for (IGroup g : dest.getChildren())
|
||||
// // ((EntityImpl) g).parentContainer = dest;
|
||||
// throw new IllegalStateException();
|
||||
//
|
||||
// for (IGroup g : getChildren()) {
|
||||
// if (g == dest)
|
||||
// continue;
|
||||
//
|
||||
// ((ZEntityImpl) g).parentContainer = dest;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
// private void moveEntitiesTo1972(IGroup dest) {
|
||||
// checkGroup();
|
||||
// if (dest.isGroup() == false)
|
||||
// throw new UnsupportedOperationException();
|
||||
//
|
||||
// // System.err.println("moveEntitiesTo1972::before1::groups2=" +
|
||||
// // entityFactory.groups2());
|
||||
// final Ident firstIdent = getIdent();
|
||||
// final Ident destIdent = dest.getIdent();
|
||||
// // System.err.println("moveEntitiesTo1972::this=" + firstIdent);
|
||||
// // System.err.println("moveEntitiesTo1972::dest=" + destIdent);
|
||||
// if (destIdent.startsWith(firstIdent) == false)
|
||||
// throw new UnsupportedOperationException();
|
||||
//
|
||||
// // System.err.println("moveEntitiesTo1972::before2::groups2=" +
|
||||
// // entityFactory.groups2());
|
||||
// for (ILeaf ent : new ArrayList<>(entityFactory.leafs2())) {
|
||||
// Ident ident = ent.getIdent();
|
||||
// if (ident.equals(firstIdent) == false && ident.startsWith(firstIdent)
|
||||
// && ident.startsWith(destIdent) == false) {
|
||||
// // System.err.print("moving leaf ident1=" + ident);
|
||||
// entityFactory.leafs2.remove(ident);
|
||||
// ident = ident.move(firstIdent, destIdent);
|
||||
// // System.err.println(" to ident2=" + ident);
|
||||
// ((ZEntityImpl) ent).ident = ident;
|
||||
// ((ZEntityImpl) ent).code = ident;
|
||||
// entityFactory.leafs2.put(ident, ent);
|
||||
// }
|
||||
// }
|
||||
// // System.err.println("moveEntitiesTo1972::before3::groups2=" +
|
||||
// // entityFactory.groups2());
|
||||
// for (IGroup ent : new ArrayList<>(entityFactory.groups2())) {
|
||||
// Ident ident = ent.getIdent();
|
||||
// // System.err.println("found=" + ident + " " + ident.startsWith(firstIdent) + "
|
||||
// // "
|
||||
// // + ident.startsWith(destIdent));
|
||||
// if (ident.equals(firstIdent) == false && ident.startsWith(firstIdent)
|
||||
// && ident.startsWith(destIdent) == false) {
|
||||
// // System.err.print("moving gr ident1=" + ident);
|
||||
// entityFactory.groups2.remove(ident);
|
||||
// ident = ident.move(firstIdent, destIdent);
|
||||
// // System.err.println(" to ident2=" + ident);
|
||||
// ((ZEntityImpl) ent).ident = ident;
|
||||
// ((ZEntityImpl) ent).code = ident;
|
||||
// entityFactory.groups2.put(ident, ent);
|
||||
// // System.err.println("-->groups2=" + entityFactory.groups2());
|
||||
// }
|
||||
// }
|
||||
// // System.err.println("moveEntitiesTo1972::after::groups2=" +
|
||||
// // entityFactory.groups2());
|
||||
// // for (IGroup g : dest.getChildren()) {
|
||||
// // // ((EntityImpl) g).parentContainer = dest;
|
||||
// // throw new IllegalStateException();
|
||||
// // }
|
||||
// //
|
||||
// // for (IGroup g : getChildren()) {
|
||||
// // if (g == dest) {
|
||||
// // continue;
|
||||
// // }
|
||||
// // ((EntityImpl) g).parentContainer = dest;
|
||||
// // }
|
||||
//
|
||||
// }
|
||||
|
||||
// public int size() {
|
||||
// checkGroup();
|
||||
// return getLeafsDirect().size();
|
||||
// }
|
||||
|
||||
public GroupType getGroupType() {
|
||||
checkGroup();
|
||||
return groupType;
|
||||
}
|
||||
|
||||
// public Code getNamespace() {
|
||||
// checkGroup();
|
||||
// return namespace;
|
||||
// }
|
||||
|
||||
public PackageStyle getPackageStyle() {
|
||||
checkGroup();
|
||||
if (stereotype == null)
|
||||
return null;
|
||||
|
||||
return stereotype.getPackageStyle();
|
||||
}
|
||||
|
||||
public boolean isGroup() {
|
||||
if (groupType != null && leafType != null)
|
||||
throw new IllegalStateException();
|
||||
|
||||
assert groupType == null || leafType == null;
|
||||
if (groupType != null)
|
||||
return true;
|
||||
|
||||
if (leafType != null)
|
||||
return false;
|
||||
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
// ---- other
|
||||
|
||||
public void overrideImage(IEntityImage img, LeafType leafType) {
|
||||
checkGroup();
|
||||
this.svekImage = img;
|
||||
this.url = null;
|
||||
|
||||
for (final Link link : new ArrayList<>(entityFactory.getLinks()))
|
||||
if (EntityUtils.isPureInnerLink12(this, link))
|
||||
entityFactory.removeLink(link);
|
||||
|
||||
// if (entityFactory.namespaceSeparator.V1972()) {
|
||||
// entityFactory.removeGroup(getIdent());
|
||||
// for (ILeaf ent : new ArrayList<>(entityFactory.leafs()))
|
||||
// if (this != ent && getIdent().equals(ent.getIdent().parent()))
|
||||
// entityFactory.removeLeaf(ent.getIdent());
|
||||
//
|
||||
// } else {
|
||||
// entityFactory.removeGroup(getCodeGetName());
|
||||
// for (ILeaf ent : new ArrayList<>(entityFactory.leafs()))
|
||||
// if (this != ent && this == ent.getParentContainer())
|
||||
// entityFactory.removeLeaf(ent.getCodeGetName());
|
||||
// }
|
||||
//
|
||||
// entityFactory.addLeaf(this);
|
||||
// this.groupType = null;
|
||||
// this.leafType = leafType;
|
||||
throw new UnsupportedOperationException("to be finished");
|
||||
}
|
||||
|
||||
// void muteToGroup(Code namespaceNew, GroupType groupType, IGroup parentContainer) {
|
||||
// checkNotGroup();
|
||||
// if (parentContainer.isGroup() == false)
|
||||
// throw new IllegalArgumentException();
|
||||
//
|
||||
// this.namespace = namespaceNew;
|
||||
// this.groupType = groupType;
|
||||
// this.leafType = null;
|
||||
// this.parentContainer = parentContainer;
|
||||
// }
|
||||
|
||||
public USymbol getUSymbol() {
|
||||
if (getLeafType() == LeafType.CIRCLE)
|
||||
return USymbols.INTERFACE;
|
||||
|
||||
// if (symbol != null && stereotype != null && stereotype.getSprite() != null) {
|
||||
// return symbol.withStereoAlignment(HorizontalAlignment.RIGHT);
|
||||
// }
|
||||
return symbol;
|
||||
}
|
||||
|
||||
public void setUSymbol(USymbol symbol) {
|
||||
this.symbol = symbol;
|
||||
}
|
||||
|
||||
public SingleStrategy getSingleStrategy() {
|
||||
return SingleStrategy.SQUARE;
|
||||
}
|
||||
|
||||
public boolean isHidden() {
|
||||
return false;
|
||||
// if (parentContainer != null && parentContainer.isHidden())
|
||||
// return true;
|
||||
//
|
||||
// return isHiddenInternal();
|
||||
}
|
||||
|
||||
// private boolean isHiddenInternal() {
|
||||
// if (isGroup()) {
|
||||
// if (entityFactory.isHidden(this))
|
||||
// return true;
|
||||
//
|
||||
// if (getLeafsDirect().size() == 0)
|
||||
// return false;
|
||||
//
|
||||
// for (ILeaf leaf : getLeafsDirect())
|
||||
// if (((ZEntityImpl) leaf).isHiddenInternal() == false)
|
||||
// return false;
|
||||
//
|
||||
// for (IGroup g : getChildren())
|
||||
// if (((ZEntityImpl) g).isHiddenInternal() == false)
|
||||
// return false;
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// return entityFactory.isHidden(this);
|
||||
// }
|
||||
|
||||
public boolean isRemoved() {
|
||||
return false;
|
||||
// if (parentContainer != null && parentContainer.isRemoved())
|
||||
// return true;
|
||||
//
|
||||
// return isRemovedInternal();
|
||||
}
|
||||
|
||||
// private boolean isRemovedInternal() {
|
||||
// if (isGroup()) {
|
||||
// if (entityFactory.isRemoved(this))
|
||||
// return true;
|
||||
//
|
||||
// if (getLeafsDirect().size() == 0 && getChildren().size() == 0)
|
||||
// return false;
|
||||
//
|
||||
// for (ILeaf leaf : getLeafsDirect())
|
||||
// if (((ZEntityImpl) leaf).isRemovedInternal() == false)
|
||||
// return false;
|
||||
//
|
||||
// for (IGroup g : getChildren())
|
||||
// if (((ZEntityImpl) g).isRemovedInternal() == false)
|
||||
// return false;
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// return entityFactory.isRemoved(this);
|
||||
// }
|
||||
|
||||
public boolean isAloneAndUnlinked() {
|
||||
return false;
|
||||
// if (isGroup())
|
||||
// return false;
|
||||
//
|
||||
// for (Link link : entityFactory.getLinks())
|
||||
// if (link.contains(this)) {
|
||||
// final ILeaf other = (ILeaf) link.getOther(this);
|
||||
// final boolean removed = entityFactory.isRemovedIgnoreUnlinked(other);
|
||||
// if (removed == false && link.getType().isInvisible() == false)
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// return true;
|
||||
}
|
||||
|
||||
private FontParam getTitleFontParam() {
|
||||
return getGroupType() == GroupType.STATE ? FontParam.STATE : FontParam.PACKAGE;
|
||||
}
|
||||
|
||||
public FontConfiguration getFontConfigurationForTitle(final ISkinParam skinParam) {
|
||||
final FontParam fontParam = getTitleFontParam();
|
||||
final HColor fontHtmlColor = skinParam.getFontHtmlColor(getStereotype(), fontParam, FontParam.PACKAGE);
|
||||
final UFont font = skinParam.getFont(getStereotype(), true, fontParam, FontParam.PACKAGE);
|
||||
final FontConfiguration fontConfiguration = FontConfiguration.create(font, fontHtmlColor,
|
||||
skinParam.getHyperlinkColor(), skinParam.useUnderlineForHyperlink(), skinParam.getTabSize());
|
||||
return fontConfiguration;
|
||||
}
|
||||
|
||||
public final int getRawLayout() {
|
||||
return rawLayout;
|
||||
}
|
||||
|
||||
public char getConcurrentSeparator() {
|
||||
return concurrentSeparator;
|
||||
}
|
||||
|
||||
public void setConcurrentSeparator(char separator) {
|
||||
this.concurrentSeparator = separator;
|
||||
}
|
||||
|
||||
private Neighborhood neighborhood;
|
||||
|
||||
public void setNeighborhood(Neighborhood neighborhood) {
|
||||
this.neighborhood = neighborhood;
|
||||
}
|
||||
|
||||
public Neighborhood getNeighborhood() {
|
||||
return neighborhood;
|
||||
}
|
||||
|
||||
private final Map<String, Display> tips = new LinkedHashMap<String, Display>();
|
||||
|
||||
public void putTip(String member, Display display) {
|
||||
tips.put(member, display);
|
||||
}
|
||||
|
||||
public Map<String, Display> getTips() {
|
||||
return Collections.unmodifiableMap(tips);
|
||||
}
|
||||
|
||||
private Colors colors = Colors.empty();
|
||||
|
||||
public Colors getColors() {
|
||||
return colors;
|
||||
}
|
||||
|
||||
public void setColors(Colors colors) {
|
||||
this.colors = colors;
|
||||
}
|
||||
|
||||
public void setSpecificColorTOBEREMOVED(ColorType type, HColor color) {
|
||||
if (color != null)
|
||||
this.colors = colors.add(type, color);
|
||||
|
||||
}
|
||||
|
||||
public Collection<String> getPortShortNames() {
|
||||
checkNotGroup();
|
||||
return Collections.unmodifiableCollection(portShortNames);
|
||||
}
|
||||
|
||||
public void addPortShortName(String portShortName) {
|
||||
portShortNames.add(portShortName);
|
||||
}
|
||||
|
||||
private VisibilityModifier visibility;
|
||||
|
||||
public void setVisibilityModifier(VisibilityModifier visibility) {
|
||||
this.visibility = visibility;
|
||||
|
||||
}
|
||||
|
||||
public VisibilityModifier getVisibilityModifier() {
|
||||
return visibility;
|
||||
}
|
||||
|
||||
public void setLegend(DisplayPositioned legend) {
|
||||
checkGroup();
|
||||
this.legend = legend;
|
||||
}
|
||||
|
||||
public DisplayPositioned getLegend() {
|
||||
return legend;
|
||||
}
|
||||
|
||||
// private boolean intricated;
|
||||
//
|
||||
// public void setIntricated(boolean intricated) {
|
||||
// this.intricated = intricated;
|
||||
// }
|
||||
|
||||
// private IGroup originalGroup;
|
||||
//
|
||||
// public void setOriginalGroup(IGroup originalGroup) {
|
||||
// this.originalGroup = originalGroup;
|
||||
// this.legend = originalGroup.getLegend();
|
||||
// }
|
||||
|
||||
public IGroup getOriginalGroup() {
|
||||
throw new UnsupportedOperationException();
|
||||
// return originalGroup;
|
||||
}
|
||||
|
||||
private boolean together;
|
||||
|
||||
public void setThisIsTogether() {
|
||||
this.together = true;
|
||||
}
|
||||
|
||||
public String getCodeLine() {
|
||||
if (this.codeLine == null)
|
||||
return null;
|
||||
|
||||
return "" + this.codeLine.getPosition();
|
||||
}
|
||||
|
||||
public void setCodeLine(LineLocation codeLine) {
|
||||
this.codeLine = codeLine;
|
||||
}
|
||||
|
||||
// @Override
|
||||
public void setStereostyle(String stereo) {
|
||||
this.stereostyles = Stereostyles.build(stereo);
|
||||
}
|
||||
|
||||
// @Override
|
||||
public Stereostyles getStereostyles() {
|
||||
return stereostyles;
|
||||
}
|
||||
|
||||
private final Map<Direction, List<Kal>> kals = new EnumMap<>(Direction.class);
|
||||
|
||||
public void addKal(Kal kal) {
|
||||
final Direction position = kal.getPosition();
|
||||
List<Kal> list = kals.get(position);
|
||||
if (list == null) {
|
||||
list = new ArrayList<>();
|
||||
kals.put(position, list);
|
||||
}
|
||||
list.add(kal);
|
||||
}
|
||||
|
||||
public List<Kal> getKals(Direction position) {
|
||||
final List<Kal> result = kals.get(position);
|
||||
if (result == null)
|
||||
return Collections.emptyList();
|
||||
return Collections.unmodifiableList(result);
|
||||
}
|
||||
|
||||
public ICucaDiagram getDiagram() {
|
||||
return entityFactory.getDiagram();
|
||||
}
|
||||
|
||||
private boolean isStatic;
|
||||
|
||||
// @Override
|
||||
public void setStatic(boolean isStatic) {
|
||||
this.isStatic = isStatic;
|
||||
}
|
||||
|
||||
// @Override
|
||||
public boolean isStatic() {
|
||||
return isStatic;
|
||||
}
|
||||
|
||||
// For group
|
||||
|
||||
public TextBlock getStateHeader(ISkinParam skinParam) {
|
||||
checkGroup();
|
||||
final Style style = EntityImageStateCommon.getStyleStateHeader(this, skinParam);
|
||||
final List<CharSequence> details = getBodier().getRawBody();
|
||||
|
||||
if (details.size() == 0)
|
||||
return new TextBlockEmpty();
|
||||
|
||||
if (style == null)
|
||||
throw new IllegalArgumentException();
|
||||
final FontConfiguration fontConfiguration = FontConfiguration.create(skinParam, style);
|
||||
|
||||
Display display = null;
|
||||
for (CharSequence s : details)
|
||||
if (display == null)
|
||||
display = Display.getWithNewlines(s.toString());
|
||||
else
|
||||
display = display.addAll(Display.getWithNewlines(s.toString()));
|
||||
|
||||
return display.create(fontConfiguration, HorizontalAlignment.LEFT, skinParam);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Code getCode() {
|
||||
return quark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Ident getIdent() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGroup getParentContainer() {
|
||||
return (IGroup) quark.getParent().getData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContainer(IGroup container) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean containsLeafRecurse(ILeaf entity) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<ILeaf> getLeafsDirect() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<IGroup> getChildren() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void moveEntitiesTo(IGroup dest) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int size() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Code getNamespace() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
}
|
@ -1,83 +0,0 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PlantUML distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
* USA.
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.baraye.b;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import net.sourceforge.plantuml.cucadiagram.LeafType;
|
||||
import net.sourceforge.plantuml.cucadiagram.dot.Neighborhood;
|
||||
import net.sourceforge.plantuml.graphic.USymbol;
|
||||
import net.sourceforge.plantuml.skin.VisibilityModifier;
|
||||
import net.sourceforge.plantuml.svek.IEntityImage;
|
||||
import net.sourceforge.plantuml.svek.Margins;
|
||||
|
||||
public interface ILeaf extends IEntity {
|
||||
|
||||
public void setContainer(IGroup container);
|
||||
|
||||
public Margins getMargins();
|
||||
|
||||
public int getXposition();
|
||||
|
||||
public void setXposition(int pos);
|
||||
|
||||
public IEntityImage getSvekImage();
|
||||
|
||||
public String getGeneric();
|
||||
|
||||
public boolean muteToType(LeafType newType, USymbol newSymbol);
|
||||
|
||||
public void setGeneric(String generic);
|
||||
|
||||
public void setSvekImage(IEntityImage svekImage);
|
||||
|
||||
public void setNeighborhood(Neighborhood neighborhood);
|
||||
|
||||
public Neighborhood getNeighborhood();
|
||||
|
||||
public Collection<String> getPortShortNames();
|
||||
|
||||
public void addPortShortName(String portShortName);
|
||||
|
||||
public void setVisibilityModifier(VisibilityModifier visibility);
|
||||
|
||||
public VisibilityModifier getVisibilityModifier();
|
||||
|
||||
public void setStatic(boolean isStatic);
|
||||
|
||||
public boolean isStatic();
|
||||
|
||||
}
|
@ -1,501 +0,0 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PlantUML distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
* USA.
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.baraye.b;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.baraye.Plasma;
|
||||
import net.sourceforge.plantuml.baraye.Quark;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.cucadiagram.Bodier;
|
||||
import net.sourceforge.plantuml.cucadiagram.BodierJSon;
|
||||
import net.sourceforge.plantuml.cucadiagram.BodierMap;
|
||||
import net.sourceforge.plantuml.cucadiagram.BodyFactory;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.cucadiagram.GroupType;
|
||||
import net.sourceforge.plantuml.cucadiagram.HideOrShow2;
|
||||
import net.sourceforge.plantuml.cucadiagram.ICucaDiagram;
|
||||
import net.sourceforge.plantuml.cucadiagram.Ident;
|
||||
import net.sourceforge.plantuml.cucadiagram.LeafType;
|
||||
import net.sourceforge.plantuml.cucadiagram.Link;
|
||||
import net.sourceforge.plantuml.cucadiagram.Stereotype;
|
||||
import net.sourceforge.plantuml.cucadiagram.entity.IEntityFactory;
|
||||
import net.sourceforge.plantuml.skin.VisibilityModifier;
|
||||
|
||||
public final class ZEntityFactory implements IEntityFactory {
|
||||
|
||||
private final List<Link> links = new ArrayList<>();
|
||||
|
||||
private int rawLayout;
|
||||
|
||||
private final Plasma plasma;
|
||||
|
||||
private final List<HideOrShow2> hides2;
|
||||
private final List<HideOrShow2> removed;
|
||||
/* private */ final public ICucaDiagram namespaceSeparator;
|
||||
// private final boolean mergeIntricated;
|
||||
// private Map<IGroup, ILeaf> emptyGroupsAsNode = new HashMap<IGroup, ILeaf>();
|
||||
|
||||
public ILeaf getLeafForEmptyGroup(IGroup g) {
|
||||
// return emptyGroupsAsNode.get(g);
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public ILeaf createLeafForEmptyGroup(IGroup g, ISkinParam skinParam) {
|
||||
throw new UnsupportedOperationException();
|
||||
// final ILeaf folder = this.createLeaf(g.getIdent(), g.getCode(), g.getDisplay(), LeafType.EMPTY_PACKAGE,
|
||||
// g.getParentContainer(), null, this.namespaceSeparator.getNamespaceSeparator());
|
||||
// ((ZEntityImpl) folder).setOriginalGroup(g);
|
||||
// final USymbol symbol = g.getUSymbol();
|
||||
// folder.setUSymbol(symbol);
|
||||
// folder.setStereotype(g.getStereotype());
|
||||
// folder.setColors(g.getColors());
|
||||
// if (g.getUrl99() != null)
|
||||
// folder.addUrl(g.getUrl99());
|
||||
// for (Stereotag tag : g.stereotags())
|
||||
// folder.addStereotag(tag);
|
||||
//
|
||||
// emptyGroupsAsNode.put(g, folder);
|
||||
// return folder;
|
||||
}
|
||||
//
|
||||
// public Display getIntricatedDisplay(Ident ident) {
|
||||
// final Set<Ident> known = new HashSet<>(groups2.keySet());
|
||||
// known.removeAll(hiddenBecauseOfIntrication);
|
||||
// String sep = namespaceSeparator.getNamespaceSeparator();
|
||||
// if (sep == null)
|
||||
// sep = ".";
|
||||
//
|
||||
// for (int check = ident.size() - 1; check > 0; check--)
|
||||
// if (known.contains(ident.getPrefix(check)))
|
||||
// // if (hiddenBecauseOfIntrication.contains(ident.getPrefix(check)) == false)
|
||||
// return Display.getWithNewlines(ident.getSuffix(check).toString(sep))
|
||||
// .withCreoleMode(CreoleMode.SIMPLE_LINE);
|
||||
//
|
||||
// return Display.getWithNewlines(ident.toString(sep)).withCreoleMode(CreoleMode.SIMPLE_LINE);
|
||||
// }
|
||||
//
|
||||
// private final Collection<Ident> hiddenBecauseOfIntrication = new ArrayList<>();
|
||||
//
|
||||
public IGroup isIntricated(IGroup parent) {
|
||||
// final int leafs = parent.getLeafsDirect().size();
|
||||
// final Collection<IGroup> children = parent.getChildren();
|
||||
// if (leafs == 0 && children.size() == 1) {
|
||||
// final IGroup g = children.iterator().next();
|
||||
// if (g.getLeafsDirect().size() == 0 && g.getChildren().size() == 0 && g.getGroupType() == GroupType.PACKAGE)
|
||||
// return null;
|
||||
//
|
||||
// for (Link link : this.getLinks())
|
||||
// if (link.contains(parent))
|
||||
// return null;
|
||||
//
|
||||
// ((ZEntityImpl) g).setIntricated(true);
|
||||
// hiddenBecauseOfIntrication.add(parent.getIdent());
|
||||
// return g;
|
||||
// }
|
||||
// return null;
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public ZEntityFactory(List<HideOrShow2> hides2, List<HideOrShow2> removed, ICucaDiagram namespaceSeparator) {
|
||||
this.hides2 = hides2;
|
||||
this.removed = removed;
|
||||
this.namespaceSeparator = namespaceSeparator;
|
||||
// this.plasma = new Plasma(namespaceSeparator.getNamespaceSeparator());
|
||||
this.plasma = new Plasma(".");
|
||||
}
|
||||
|
||||
public boolean isHidden(EntityImp leaf) {
|
||||
return false;
|
||||
// final IEntity other = isNoteWithSingleLinkAttachedTo(leaf);
|
||||
// if (other instanceof ILeaf)
|
||||
// return isHidden((ILeaf) other);
|
||||
//
|
||||
// boolean hidden = false;
|
||||
// for (HideOrShow2 hide : hides2)
|
||||
// hidden = hide.apply(hidden, leaf);
|
||||
//
|
||||
// return hidden;
|
||||
}
|
||||
|
||||
public boolean isRemoved(Stereotype stereotype) {
|
||||
boolean result = false;
|
||||
for (HideOrShow2 hide : removed)
|
||||
result = hide.apply(result, stereotype);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public boolean isRemoved(EntityImp leaf) {
|
||||
return false;
|
||||
// final IEntity other = isNoteWithSingleLinkAttachedTo(leaf);
|
||||
// if (other instanceof ILeaf)
|
||||
// return isRemoved((ILeaf) other);
|
||||
//
|
||||
// boolean result = false;
|
||||
// for (HideOrShow2 hide : removed)
|
||||
// result = hide.apply(result, leaf);
|
||||
//
|
||||
// return result;
|
||||
}
|
||||
|
||||
// private IEntity isNoteWithSingleLinkAttachedTo(ILeaf leaf) {
|
||||
// if (leaf.getLeafType() != LeafType.NOTE)
|
||||
// return null;
|
||||
// IEntity result = null;
|
||||
// for (Link link : this.getLinks()) {
|
||||
// if (link.getType().isInvisible())
|
||||
// continue;
|
||||
// if (link.contains(leaf)) {
|
||||
// if (result != null)
|
||||
// return result;
|
||||
// result = link.getOther(leaf);
|
||||
// }
|
||||
// }
|
||||
// return result;
|
||||
//
|
||||
// }
|
||||
|
||||
// public boolean isRemovedIgnoreUnlinked(ILeaf leaf) {
|
||||
// boolean result = false;
|
||||
// for (HideOrShow2 hide : removed)
|
||||
// if (hide.isAboutUnlinked() == false)
|
||||
// result = hide.apply(result, leaf);
|
||||
//
|
||||
// return result;
|
||||
// }
|
||||
|
||||
public EntityImp createLeaf(Quark quark, Display display, LeafType entityType, Set<VisibilityModifier> hides,
|
||||
String namespaceSeparator) {
|
||||
final Bodier bodier;
|
||||
if (Objects.requireNonNull(entityType) == LeafType.MAP)
|
||||
bodier = new BodierMap();
|
||||
else if (Objects.requireNonNull(entityType) == LeafType.JSON)
|
||||
bodier = new BodierJSon();
|
||||
else
|
||||
bodier = BodyFactory.createLeaf(entityType, hides);
|
||||
|
||||
final EntityImp result = new EntityImp(quark, this, bodier, entityType, rawLayout);
|
||||
// bodier.setLeaf(result);
|
||||
result.setDisplay(display);
|
||||
return result;
|
||||
}
|
||||
|
||||
public EntityImp createGroup(Quark quark, Display display, GroupType groupType, Set<VisibilityModifier> hides,
|
||||
String namespaceSeparator) {
|
||||
Objects.requireNonNull(groupType);
|
||||
if (quark.getData() != null)
|
||||
return (EntityImp) quark.getData();
|
||||
// for (Entry<Ident, IGroup> ent : groups2.entrySet())
|
||||
// if (ent.getKey().equals(ident))
|
||||
// return ent.getValue();
|
||||
|
||||
final Bodier bodier = BodyFactory.createGroup(hides);
|
||||
final EntityImp result = new EntityImp(quark, this, bodier, groupType, rawLayout);
|
||||
if (Display.isNull(display) == false)
|
||||
result.setDisplay(display);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public void addLeaf(ILeaf entity) {
|
||||
// if (namespaceSeparator.V1972() == false)
|
||||
// leafsByCode.put(entity.getCodeGetName(), entity);
|
||||
// leafs2.put(entity.getIdent(), entity);
|
||||
// if (namespaceSeparator.V1972())
|
||||
// ensureParentIsCreated(entity.getIdent());
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
//
|
||||
// public void addGroup(IGroup group) {
|
||||
// if (namespaceSeparator.V1972() == false)
|
||||
// groupsByCode.put(group.getCodeGetName(), group);
|
||||
// groups2.put(group.getIdent(), group);
|
||||
// if (namespaceSeparator.V1972())
|
||||
// ensureParentIsCreated(group.getIdent());
|
||||
// }
|
||||
//
|
||||
// private void ensureParentIsCreated(Ident ident) {
|
||||
// if (groups2.get(ident.parent()) != null)
|
||||
// return;
|
||||
// getParentContainer(ident, null);
|
||||
// }
|
||||
|
||||
// void removeGroup(String name) {
|
||||
// if (namespaceSeparator.V1972())
|
||||
// throw new UnsupportedOperationException();
|
||||
// final IEntity removed = Objects.requireNonNull(groupsByCode.remove(name));
|
||||
// final IEntity removed2 = groups2.remove(removed.getIdent());
|
||||
// if (removed != removed2) {
|
||||
// bigError();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// void removeGroup(Ident ident) {
|
||||
// Objects.requireNonNull(groups2.remove(Objects.requireNonNull(ident)));
|
||||
// }
|
||||
//
|
||||
public static void bigError() {
|
||||
// Thread.dumpStack();
|
||||
// System.exit(0);
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
// void removeLeaf(String name) {
|
||||
// if (namespaceSeparator.V1972())
|
||||
// throw new UnsupportedOperationException();
|
||||
// final IEntity removed = Objects.requireNonNull(leafsByCode.remove(Objects.requireNonNull(name)));
|
||||
// final IEntity removed2 = leafs2.remove(removed.getIdent());
|
||||
// if (removed != removed2) {
|
||||
// bigError();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// void removeLeaf(Ident ident) {
|
||||
// final IEntity removed = leafs2.remove(Objects.requireNonNull(ident));
|
||||
// if (removed == null) {
|
||||
// System.err.println("leafs2=" + leafs2.keySet());
|
||||
// throw new IllegalArgumentException(ident.toString());
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private void removeLeaf1972(ILeaf leaf) {
|
||||
// final boolean removed = leafs2.values().remove(leaf);
|
||||
// if (removed == false) {
|
||||
// System.err.println("leafs2=" + leafs2.keySet());
|
||||
// throw new IllegalArgumentException(leaf.toString());
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public IGroup muteToGroup(String name, Code namespace, GroupType type, IGroup parent) {
|
||||
// if (namespaceSeparator.V1972())
|
||||
// throw new UnsupportedOperationException();
|
||||
// final ILeaf leaf = leafsByCode.get(name);
|
||||
// ((ZEntityImpl) leaf).muteToGroup(namespace, type, parent);
|
||||
// final IGroup result = (IGroup) leaf;
|
||||
// removeLeaf(name);
|
||||
// return result;
|
||||
// }
|
||||
|
||||
// public IGroup muteToGroup1972(Ident ident, Code namespace, GroupType type, IGroup parent) {
|
||||
// if (!namespaceSeparator.V1972())
|
||||
// throw new UnsupportedOperationException();
|
||||
// final ILeaf leaf;
|
||||
// if (namespaceSeparator.getNamespaceSeparator() == null)
|
||||
// leaf = getLeafVerySmart(ident);
|
||||
// else
|
||||
// leaf = leafs2.get(ident);
|
||||
// ((ZEntityImpl) leaf).muteToGroup(namespace, type, parent);
|
||||
// final IGroup result = (IGroup) leaf;
|
||||
// removeLeaf1972(leaf);
|
||||
// return result;
|
||||
// }
|
||||
|
||||
public IGroup getRootGroup() {
|
||||
throw new UnsupportedOperationException();
|
||||
// return rootGroup;
|
||||
}
|
||||
|
||||
public final ILeaf getLeafStrict(Ident ident) {
|
||||
throw new UnsupportedOperationException();
|
||||
// return leafs2.get(ident);
|
||||
}
|
||||
//
|
||||
// public final ILeaf getLeafSmart(Ident ident) {
|
||||
// if (!namespaceSeparator.V1972())
|
||||
// throw new UnsupportedOperationException();
|
||||
// final ILeaf result = leafs2.get(ident);
|
||||
// if (result == null && ident.size() == 1)
|
||||
// for (Entry<Ident, ILeaf> ent : leafs2.entrySet())
|
||||
// if (ent.getKey().getLast().equals(ident.getLast()))
|
||||
// return ent.getValue();
|
||||
//
|
||||
// return result;
|
||||
// }
|
||||
//
|
||||
// public final ILeaf getLeafVerySmart(Ident ident) {
|
||||
// if (!namespaceSeparator.V1972())
|
||||
// throw new UnsupportedOperationException();
|
||||
// final ILeaf result = leafs2.get(ident);
|
||||
// if (result == null)
|
||||
// for (Entry<Ident, ILeaf> ent : leafs2.entrySet())
|
||||
// if (ent.getKey().getLast().equals(ident.getLast()))
|
||||
// return ent.getValue();
|
||||
//
|
||||
// return result;
|
||||
// }
|
||||
//
|
||||
// public Ident buildFullyQualified(Ident currentPath, Ident id) {
|
||||
// if (currentPath.equals(id) == false)
|
||||
// if (leafs2.containsKey(id) || groups2.containsKey(id))
|
||||
// return id;
|
||||
//
|
||||
// if (id.size() > 1)
|
||||
// return id;
|
||||
//
|
||||
// return currentPath.add(id);
|
||||
// }
|
||||
//
|
||||
// public final IGroup getGroupStrict(Ident ident) {
|
||||
// if (namespaceSeparator.getNamespaceSeparator() == null)
|
||||
// return getGroupVerySmart(ident);
|
||||
//
|
||||
// final IGroup result = groups2.get(ident);
|
||||
// return result;
|
||||
// }
|
||||
//
|
||||
// public final IGroup getGroupVerySmart(Ident ident) {
|
||||
// final IGroup result = groups2.get(ident);
|
||||
// if (result == null)
|
||||
// for (Entry<Ident, IGroup> ent : groups2.entrySet())
|
||||
// if (ent.getKey().getLast().equals(ident.getLast()))
|
||||
// return ent.getValue();
|
||||
//
|
||||
// return result;
|
||||
// }
|
||||
//
|
||||
// public final ILeaf getLeaf(Code code) {
|
||||
// if (namespaceSeparator.V1972())
|
||||
// throw new UnsupportedOperationException();
|
||||
// final ILeaf result = leafsByCode.get(code.getName());
|
||||
// if (result != null && result != leafs2.get(result.getIdent()))
|
||||
// bigError();
|
||||
//
|
||||
// return result;
|
||||
// }
|
||||
//
|
||||
// public final IGroup getGroup(Code code) {
|
||||
// if (namespaceSeparator.V1972())
|
||||
// throw new UnsupportedOperationException();
|
||||
// final IGroup result = groupsByCode.get(code.getName());
|
||||
// if (result != null && result != groups2.get(result.getIdent()))
|
||||
// bigError();
|
||||
//
|
||||
// return result;
|
||||
// }
|
||||
|
||||
public final Collection<ILeaf> leafs() {
|
||||
// if (namespaceSeparator.V1972())
|
||||
// return leafs2();
|
||||
// final Collection<ILeaf> result = Collections.unmodifiableCollection(leafsByCode.values());
|
||||
// if (new ArrayList<>(result).equals(new ArrayList<>(leafs2())) == false)
|
||||
// bigError();
|
||||
//
|
||||
// return result;
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public final Collection<IGroup> groups() {
|
||||
// if (namespaceSeparator.V1972())
|
||||
// return groups2();
|
||||
// final Collection<IGroup> result = Collections.unmodifiableCollection(groupsByCode.values());
|
||||
// if (new ArrayList<>(result).equals(new ArrayList<>(groups2())) == false)
|
||||
// bigError();
|
||||
//
|
||||
// return result;
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
//
|
||||
// public final Collection<IGroup> groups2() {
|
||||
// final Collection<IGroup> result = Collections.unmodifiableCollection(groups2.values());
|
||||
// return Collections.unmodifiableCollection(result);
|
||||
// }
|
||||
//
|
||||
// public final Collection<ILeaf> leafs2() {
|
||||
// final Collection<ILeaf> result = Collections.unmodifiableCollection(leafs2.values());
|
||||
// return Collections.unmodifiableCollection(result);
|
||||
// }
|
||||
|
||||
public void incRawLayout() {
|
||||
rawLayout++;
|
||||
}
|
||||
|
||||
public final List<Link> getLinks() {
|
||||
return Collections.unmodifiableList(links);
|
||||
}
|
||||
|
||||
public void addLink(Link link) {
|
||||
if (link.isSingle() && containsSimilarLink(link))
|
||||
return;
|
||||
|
||||
links.add(link);
|
||||
}
|
||||
|
||||
private boolean containsSimilarLink(Link other) {
|
||||
for (Link link : links)
|
||||
if (other.sameConnections(link))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void removeLink(Link link) {
|
||||
final boolean ok = links.remove(link);
|
||||
if (ok == false)
|
||||
throw new IllegalArgumentException();
|
||||
|
||||
}
|
||||
|
||||
// public IGroup getParentContainer(Ident ident, IGroup parentContainer) {
|
||||
// if (namespaceSeparator.V1972()) {
|
||||
// final Ident parent = ident.parent();
|
||||
// if (parent.isRoot())
|
||||
// return this.rootGroup;
|
||||
//
|
||||
// IGroup result = getGroupStrict(parent);
|
||||
// if (result != null)
|
||||
// return result;
|
||||
//
|
||||
// final Display display = Display.getWithNewlines(parent.getName());
|
||||
// result = createGroup(parent, parent, display, null, GroupType.PACKAGE, null,
|
||||
// Collections.<VisibilityModifier>emptySet(), namespaceSeparator.getNamespaceSeparator());
|
||||
// addGroup(result);
|
||||
// return result;
|
||||
// }
|
||||
// return Objects.requireNonNull(parentContainer);
|
||||
// }
|
||||
|
||||
public ICucaDiagram getDiagram() {
|
||||
return namespaceSeparator;
|
||||
}
|
||||
|
||||
}
|
@ -42,7 +42,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sourceforge.plantuml.UmlDiagramType;
|
||||
import net.sourceforge.plantuml.baraye.a.CucaDiagram;
|
||||
import net.sourceforge.plantuml.baraye.CucaDiagram;
|
||||
import net.sourceforge.plantuml.core.DiagramDescription;
|
||||
import net.sourceforge.plantuml.core.UmlSource;
|
||||
|
||||
|
@ -42,14 +42,14 @@ import java.util.Objects;
|
||||
|
||||
import net.sourceforge.plantuml.FileFormatOption;
|
||||
import net.sourceforge.plantuml.UmlDiagramType;
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.EntityUtils;
|
||||
import net.sourceforge.plantuml.baraye.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.core.ImageData;
|
||||
import net.sourceforge.plantuml.core.UmlSource;
|
||||
import net.sourceforge.plantuml.creole.CreoleMode;
|
||||
import net.sourceforge.plantuml.cucadiagram.Code;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityUtils;
|
||||
import net.sourceforge.plantuml.cucadiagram.GroupType;
|
||||
import net.sourceforge.plantuml.cucadiagram.Ident;
|
||||
import net.sourceforge.plantuml.cucadiagram.LeafType;
|
||||
|
@ -36,7 +36,7 @@
|
||||
package net.sourceforge.plantuml.classdiagram.command;
|
||||
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.classdiagram.ClassDiagram;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
|
@ -41,7 +41,7 @@ import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UrlBuilder;
|
||||
import net.sourceforge.plantuml.UrlMode;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.classdiagram.ClassDiagram;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
|
@ -41,8 +41,8 @@ import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UrlBuilder;
|
||||
import net.sourceforge.plantuml.UrlMode;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.classdiagram.ClassDiagram;
|
||||
import net.sourceforge.plantuml.command.BlocLines;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
|
@ -42,7 +42,7 @@ import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UrlBuilder;
|
||||
import net.sourceforge.plantuml.UrlMode;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.classdiagram.ClassDiagram;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
|
@ -36,7 +36,7 @@
|
||||
package net.sourceforge.plantuml.classdiagram.command;
|
||||
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.baraye.a.CucaDiagram;
|
||||
import net.sourceforge.plantuml.baraye.CucaDiagram;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
|
@ -38,7 +38,8 @@ package net.sourceforge.plantuml.classdiagram.command;
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.UmlDiagram;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.EntityUtils;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
@ -50,7 +51,6 @@ import net.sourceforge.plantuml.cucadiagram.Code;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityGender;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityGenderUtils;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityPortion;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityUtils;
|
||||
import net.sourceforge.plantuml.cucadiagram.Ident;
|
||||
import net.sourceforge.plantuml.cucadiagram.LeafType;
|
||||
import net.sourceforge.plantuml.descdiagram.DescriptionDiagram;
|
||||
|
@ -36,7 +36,7 @@
|
||||
package net.sourceforge.plantuml.classdiagram.command;
|
||||
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.baraye.a.CucaDiagram;
|
||||
import net.sourceforge.plantuml.baraye.CucaDiagram;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
|
@ -43,7 +43,7 @@ import net.sourceforge.plantuml.UmlDiagramType;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UrlBuilder;
|
||||
import net.sourceforge.plantuml.UrlMode;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
import net.sourceforge.plantuml.command.regex.RegexConcat;
|
||||
@ -168,8 +168,8 @@ final public class CommandLinkClass extends SingleLineCommand2<AbstractClassOrOb
|
||||
if (ent2String == null)
|
||||
return executeArgSpecial2(diagram, arg);
|
||||
|
||||
Ident ident1 = diagram.buildLeafIdentSpecial(ent1String);
|
||||
Ident ident2 = diagram.buildLeafIdentSpecial(ent2String);
|
||||
Ident ident1 = diagram.buildLeafIdentSpecial2(ent1String);
|
||||
Ident ident2 = diagram.buildLeafIdentSpecial2(ent2String);
|
||||
Ident ident1pure = Ident.empty().add(ent1String, diagram.getNamespaceSeparator());
|
||||
Ident ident2pure = Ident.empty().add(ent2String, diagram.getNamespaceSeparator());
|
||||
Code code1 = diagram.V1972() ? ident1 : diagram.buildCode(ent1String);
|
||||
|
@ -43,7 +43,7 @@ import net.sourceforge.plantuml.UmlDiagramType;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UrlBuilder;
|
||||
import net.sourceforge.plantuml.UrlMode;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
import net.sourceforge.plantuml.command.regex.RegexConcat;
|
||||
|
@ -38,7 +38,7 @@ package net.sourceforge.plantuml.classdiagram.command;
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.UmlDiagramType;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
import net.sourceforge.plantuml.command.regex.Matcher2;
|
||||
|
@ -36,7 +36,7 @@
|
||||
package net.sourceforge.plantuml.classdiagram.command;
|
||||
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.baraye.a.CucaDiagram;
|
||||
import net.sourceforge.plantuml.baraye.CucaDiagram;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
|
@ -36,7 +36,7 @@
|
||||
package net.sourceforge.plantuml.classdiagram.command;
|
||||
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.baraye.a.CucaDiagram;
|
||||
import net.sourceforge.plantuml.baraye.CucaDiagram;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
|
@ -37,7 +37,7 @@ package net.sourceforge.plantuml.classdiagram.command;
|
||||
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.classdiagram.ClassDiagram;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
|
@ -39,7 +39,7 @@ import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UrlBuilder;
|
||||
import net.sourceforge.plantuml.UrlMode;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
|
@ -36,13 +36,13 @@
|
||||
package net.sourceforge.plantuml.command;
|
||||
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.EntityUtils;
|
||||
import net.sourceforge.plantuml.baraye.IGroup;
|
||||
import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
import net.sourceforge.plantuml.command.regex.RegexConcat;
|
||||
import net.sourceforge.plantuml.command.regex.RegexLeaf;
|
||||
import net.sourceforge.plantuml.command.regex.RegexResult;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityUtils;
|
||||
|
||||
public class CommandEndPackage extends SingleLineCommand2<AbstractEntityDiagram> {
|
||||
|
||||
|
@ -39,8 +39,8 @@ import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UrlBuilder;
|
||||
import net.sourceforge.plantuml.UrlMode;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IGroup;
|
||||
import net.sourceforge.plantuml.classdiagram.ClassDiagram;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
import net.sourceforge.plantuml.command.regex.RegexConcat;
|
||||
|
@ -39,8 +39,8 @@ import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UrlBuilder;
|
||||
import net.sourceforge.plantuml.UrlMode;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IGroup;
|
||||
import net.sourceforge.plantuml.classdiagram.ClassDiagram;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
import net.sourceforge.plantuml.command.regex.RegexConcat;
|
||||
|
@ -39,8 +39,8 @@ import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UrlBuilder;
|
||||
import net.sourceforge.plantuml.UrlMode;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IGroup;
|
||||
import net.sourceforge.plantuml.classdiagram.ClassDiagram;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
import net.sourceforge.plantuml.command.regex.RegexConcat;
|
||||
|
@ -40,8 +40,8 @@ import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UrlBuilder;
|
||||
import net.sourceforge.plantuml.UrlMode;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IGroup;
|
||||
import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
|
||||
import net.sourceforge.plantuml.classdiagram.command.CommandCreateClassMultilines;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
|
@ -37,8 +37,8 @@ package net.sourceforge.plantuml.command;
|
||||
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IGroup;
|
||||
import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
import net.sourceforge.plantuml.command.regex.RegexConcat;
|
||||
|
@ -38,7 +38,7 @@ package net.sourceforge.plantuml.command.note;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.baraye.a.CucaDiagram;
|
||||
import net.sourceforge.plantuml.baraye.CucaDiagram;
|
||||
import net.sourceforge.plantuml.command.BlocLines;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
|
@ -36,7 +36,7 @@
|
||||
package net.sourceforge.plantuml.command.note;
|
||||
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
|
||||
import net.sourceforge.plantuml.classdiagram.command.CommandCreateClassMultilines;
|
||||
import net.sourceforge.plantuml.command.BlocLines;
|
||||
|
@ -41,7 +41,7 @@ import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UrlBuilder;
|
||||
import net.sourceforge.plantuml.UrlMode;
|
||||
import net.sourceforge.plantuml.activitydiagram.ActivityDiagram;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.command.BlocLines;
|
||||
import net.sourceforge.plantuml.command.Command;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
|
@ -41,7 +41,7 @@ import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UrlBuilder;
|
||||
import net.sourceforge.plantuml.UrlMode;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
|
||||
import net.sourceforge.plantuml.classdiagram.command.CommandCreateClassMultilines;
|
||||
import net.sourceforge.plantuml.command.BlocLines;
|
||||
|
@ -40,7 +40,7 @@ import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UrlBuilder;
|
||||
import net.sourceforge.plantuml.UrlMode;
|
||||
import net.sourceforge.plantuml.baraye.a.CucaDiagram;
|
||||
import net.sourceforge.plantuml.baraye.CucaDiagram;
|
||||
import net.sourceforge.plantuml.command.BlocLines;
|
||||
import net.sourceforge.plantuml.command.Command;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
|
@ -39,7 +39,7 @@ import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UrlBuilder;
|
||||
import net.sourceforge.plantuml.UrlMode;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
|
||||
import net.sourceforge.plantuml.command.BlocLines;
|
||||
import net.sourceforge.plantuml.command.Command;
|
||||
|
@ -39,7 +39,7 @@ import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
import net.sourceforge.plantuml.UmlDiagramType;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
|
||||
import net.sourceforge.plantuml.core.UmlSource;
|
||||
import net.sourceforge.plantuml.cucadiagram.Code;
|
||||
|
@ -36,7 +36,7 @@
|
||||
package net.sourceforge.plantuml.compositediagram.command;
|
||||
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
|
@ -36,7 +36,7 @@
|
||||
package net.sourceforge.plantuml.compositediagram.command;
|
||||
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.IGroup;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
|
@ -36,7 +36,7 @@
|
||||
package net.sourceforge.plantuml.compositediagram.command;
|
||||
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
|
@ -35,7 +35,7 @@
|
||||
package net.sourceforge.plantuml.compositediagram.command;
|
||||
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
|
@ -38,7 +38,7 @@ package net.sourceforge.plantuml.cucadiagram;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
|
@ -39,7 +39,7 @@ import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.json.JsonValue;
|
||||
|
@ -44,7 +44,7 @@ import java.util.Set;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.UrlBuilder;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.creole.Parser;
|
||||
import net.sourceforge.plantuml.creole.legacy.CreoleParser;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
|
@ -46,7 +46,7 @@ import java.util.regex.Pattern;
|
||||
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineBreakStrategy;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
|
@ -41,7 +41,7 @@ import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
|
@ -46,7 +46,7 @@ import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.awt.geom.XRectangle2D;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.creole.CreoleMode;
|
||||
import net.sourceforge.plantuml.creole.Parser;
|
||||
import net.sourceforge.plantuml.creole.legacy.CreoleParser;
|
||||
|
@ -36,11 +36,13 @@
|
||||
package net.sourceforge.plantuml.cucadiagram;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.Guillemet;
|
||||
import net.sourceforge.plantuml.EmbeddedDiagram;
|
||||
import net.sourceforge.plantuml.ISkinSimple;
|
||||
import net.sourceforge.plantuml.LineBreakStrategy;
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
@ -82,8 +84,14 @@ public class BodyEnhanced2 extends BodyEnhancedAbstract {
|
||||
char separator = 0;
|
||||
TextBlock title = null;
|
||||
Display display = Display.empty();
|
||||
for (CharSequence s : rawBody)
|
||||
if (isBlockSeparator(s.toString())) {
|
||||
final Iterator<CharSequence> it = rawBody.iterator();
|
||||
while (it.hasNext()) {
|
||||
final CharSequence s = it.next();
|
||||
final String type = EmbeddedDiagram.getEmbeddedType(StringUtils.trinNoTrace(s));
|
||||
if (type != null) {
|
||||
display = display.add(s);
|
||||
display = addOneSingleLineManageEmbedded2(it, display);
|
||||
} else if (isBlockSeparator(s.toString())) {
|
||||
blocks.add(decorate(getTextBlock(display), separator, title, stringBounder));
|
||||
separator = s.charAt(0);
|
||||
title = getTitle(s.toString(), skinParam);
|
||||
@ -93,6 +101,7 @@ public class BodyEnhanced2 extends BodyEnhancedAbstract {
|
||||
// s = Guillemet.GUILLEMET.manageGuillemet(s.toString());
|
||||
display = display.add(s);
|
||||
}
|
||||
}
|
||||
|
||||
blocks.add(decorate(getTextBlock(display), separator, title, stringBounder));
|
||||
|
||||
@ -108,6 +117,23 @@ public class BodyEnhanced2 extends BodyEnhancedAbstract {
|
||||
return area;
|
||||
}
|
||||
|
||||
private static Display addOneSingleLineManageEmbedded2(Iterator<CharSequence> it, Display display) {
|
||||
int nested = 1;
|
||||
while (it.hasNext()) {
|
||||
final CharSequence s = it.next();
|
||||
display = display.add(s);
|
||||
if (EmbeddedDiagram.getEmbeddedType(StringUtils.trinNoTrace(s)) != null)
|
||||
// if (s.getTrimmed().getString().startsWith(EmbeddedDiagram.EMBEDDED_START))
|
||||
nested++;
|
||||
else if (StringUtils.trinNoTrace(s).equals(EmbeddedDiagram.EMBEDDED_END)) {
|
||||
nested--;
|
||||
if (nested == 0)
|
||||
return display;
|
||||
}
|
||||
}
|
||||
return display;
|
||||
}
|
||||
|
||||
private TextBlock getTextBlock(Display display) {
|
||||
final TextBlock result = display.create9(titleConfig, align, skinParam, lineBreakStrategy);
|
||||
return result;
|
||||
|
@ -41,7 +41,7 @@ import java.util.Set;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.ISkinSimple;
|
||||
import net.sourceforge.plantuml.LineBreakStrategy;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
|
@ -38,7 +38,7 @@ package net.sourceforge.plantuml.cucadiagram;
|
||||
import java.util.Objects;
|
||||
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.baraye.a.EntityFactory;
|
||||
import net.sourceforge.plantuml.baraye.EntityFactory;
|
||||
|
||||
public class CodeImpl implements Code {
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
*/
|
||||
package net.sourceforge.plantuml.cucadiagram;
|
||||
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
|
||||
public interface EntityGender {
|
||||
public boolean contains(IEntity test);
|
||||
|
@ -36,8 +36,9 @@
|
||||
package net.sourceforge.plantuml.cucadiagram;
|
||||
|
||||
import net.sourceforge.plantuml.Guillemet;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.EntityUtils;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IGroup;
|
||||
|
||||
public class EntityGenderUtils {
|
||||
|
||||
|
@ -37,7 +37,7 @@ package net.sourceforge.plantuml.cucadiagram;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.IGroup;
|
||||
|
||||
public interface GroupHierarchy {
|
||||
|
||||
|
@ -38,8 +38,8 @@ package net.sourceforge.plantuml.cucadiagram;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.log.Logme;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
|
||||
|
@ -45,9 +45,9 @@ import java.util.Set;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.baraye.a.EntityFactory;
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.EntityFactory;
|
||||
import net.sourceforge.plantuml.baraye.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.command.Position;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
import net.sourceforge.plantuml.graphic.USymbol;
|
||||
|
@ -35,7 +35,7 @@
|
||||
*/
|
||||
package net.sourceforge.plantuml.cucadiagram;
|
||||
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
|
||||
public class HideOrShow2 {
|
||||
|
||||
|
@ -43,9 +43,9 @@ import net.sourceforge.plantuml.FileFormatOption;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.Pragma;
|
||||
import net.sourceforge.plantuml.UmlDiagramType;
|
||||
import net.sourceforge.plantuml.baraye.a.EntityFactory;
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.EntityFactory;
|
||||
import net.sourceforge.plantuml.baraye.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.core.UmlSource;
|
||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||
import net.sourceforge.plantuml.ugraphic.ImageBuilder;
|
||||
|
@ -40,14 +40,14 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.baraye.a.CucaDiagram;
|
||||
import net.sourceforge.plantuml.baraye.a.EntityFactory;
|
||||
import net.sourceforge.plantuml.baraye.CucaDiagram;
|
||||
import net.sourceforge.plantuml.baraye.EntityFactory;
|
||||
|
||||
public class Ident implements Code {
|
||||
|
||||
private final List<String> parts;
|
||||
final protected List<String> parts;
|
||||
|
||||
private Ident(List<String> parts) {
|
||||
public /*private*/ Ident(List<String> parts) {
|
||||
this.parts = parts;
|
||||
}
|
||||
|
||||
|
@ -46,10 +46,10 @@ import net.sourceforge.plantuml.SpecificBackcolorable;
|
||||
import net.sourceforge.plantuml.UmlDiagramType;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.awt.geom.XDimension2D;
|
||||
import net.sourceforge.plantuml.baraye.a.EntityImp;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.EntityImp;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.cucadiagram.entity.IEntityFactory;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
||||
|
@ -37,9 +37,9 @@ package net.sourceforge.plantuml.cucadiagram;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.baraye.a.CucaDiagram;
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.CucaDiagram;
|
||||
import net.sourceforge.plantuml.baraye.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
|
||||
public class Magma {
|
||||
|
||||
|
@ -38,7 +38,7 @@ package net.sourceforge.plantuml.cucadiagram;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.IGroup;
|
||||
|
||||
public class MagmaList {
|
||||
|
||||
|
@ -49,7 +49,7 @@ import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.awt.geom.XDimension2D;
|
||||
import net.sourceforge.plantuml.awt.geom.XRectangle2D;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.creole.CreoleMode;
|
||||
import net.sourceforge.plantuml.graphic.AbstractTextBlock;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
|
@ -35,7 +35,7 @@
|
||||
*/
|
||||
package net.sourceforge.plantuml.cucadiagram;
|
||||
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
|
||||
public interface PortionShower {
|
||||
|
||||
|
@ -40,7 +40,7 @@ import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.IGroup;
|
||||
import net.sourceforge.plantuml.cucadiagram.ICucaDiagram;
|
||||
import net.sourceforge.plantuml.cucadiagram.LeafType;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
|
@ -41,7 +41,7 @@ import java.util.Collection;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.IGroup;
|
||||
import net.sourceforge.plantuml.cucadiagram.GroupRoot;
|
||||
import net.sourceforge.plantuml.cucadiagram.GroupType;
|
||||
import net.sourceforge.plantuml.cucadiagram.ICucaDiagram;
|
||||
|
@ -50,7 +50,7 @@ import net.sourceforge.plantuml.BackSlash;
|
||||
import net.sourceforge.plantuml.FileFormat;
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.awt.geom.XPoint2D;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityPortion;
|
||||
import net.sourceforge.plantuml.cucadiagram.ICucaDiagram;
|
||||
|
@ -46,10 +46,10 @@ import java.util.Objects;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.Pragma;
|
||||
import net.sourceforge.plantuml.UmlDiagramType;
|
||||
import net.sourceforge.plantuml.baraye.a.EntityFactory;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.EntityFactory;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityPortion;
|
||||
import net.sourceforge.plantuml.cucadiagram.GroupHierarchy;
|
||||
import net.sourceforge.plantuml.cucadiagram.Link;
|
||||
|
@ -43,7 +43,7 @@ import java.util.Set;
|
||||
import net.sourceforge.plantuml.awt.geom.XDimension2D;
|
||||
import net.sourceforge.plantuml.awt.geom.XPoint2D;
|
||||
import net.sourceforge.plantuml.awt.geom.XRectangle2D;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.cucadiagram.Link;
|
||||
import net.sourceforge.plantuml.svek.Bibliotekon;
|
||||
import net.sourceforge.plantuml.svek.SvekLine;
|
||||
|
@ -37,7 +37,7 @@ package net.sourceforge.plantuml.cucadiagram.entity;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.cucadiagram.Stereotype;
|
||||
|
||||
public interface IEntityFactory {
|
||||
|
@ -40,8 +40,8 @@ import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UrlBuilder;
|
||||
import net.sourceforge.plantuml.UrlMode;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IGroup;
|
||||
import net.sourceforge.plantuml.classdiagram.command.GenericRegexProducer;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
|
@ -40,7 +40,7 @@ import java.util.Objects;
|
||||
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.UmlDiagramType;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
|
||||
import net.sourceforge.plantuml.core.UmlSource;
|
||||
import net.sourceforge.plantuml.cucadiagram.Code;
|
||||
|
@ -43,7 +43,7 @@ import net.sourceforge.plantuml.LineParam;
|
||||
import net.sourceforge.plantuml.SkinParamUtils;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.awt.geom.XDimension2D;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.cucadiagram.Stereotype;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
|
@ -43,7 +43,7 @@ import net.sourceforge.plantuml.LineParam;
|
||||
import net.sourceforge.plantuml.SkinParamUtils;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.awt.geom.XDimension2D;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.cucadiagram.Stereotype;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
|
@ -43,7 +43,7 @@ import net.sourceforge.plantuml.LineParam;
|
||||
import net.sourceforge.plantuml.SkinParamUtils;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.awt.geom.XDimension2D;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.cucadiagram.Stereotype;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
|
@ -43,7 +43,7 @@ import net.sourceforge.plantuml.LineParam;
|
||||
import net.sourceforge.plantuml.SkinParamUtils;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.awt.geom.XDimension2D;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.creole.Stencil;
|
||||
import net.sourceforge.plantuml.cucadiagram.BodyFactory;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
|
@ -38,7 +38,7 @@ package net.sourceforge.plantuml.descdiagram.command;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
|
@ -38,7 +38,7 @@ package net.sourceforge.plantuml.descdiagram.command;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.UrlBuilder;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
|
||||
import net.sourceforge.plantuml.command.BlocLines;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
|
@ -42,8 +42,9 @@ import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UrlBuilder;
|
||||
import net.sourceforge.plantuml.UrlMode;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.EntityUtils;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
|
||||
import net.sourceforge.plantuml.classdiagram.command.CommandCreateClassMultilines;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
@ -56,7 +57,6 @@ import net.sourceforge.plantuml.command.regex.RegexOr;
|
||||
import net.sourceforge.plantuml.command.regex.RegexResult;
|
||||
import net.sourceforge.plantuml.cucadiagram.Code;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityUtils;
|
||||
import net.sourceforge.plantuml.cucadiagram.Ident;
|
||||
import net.sourceforge.plantuml.cucadiagram.LeafType;
|
||||
import net.sourceforge.plantuml.cucadiagram.Stereotag;
|
||||
|
@ -42,7 +42,7 @@ import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UrlBuilder;
|
||||
import net.sourceforge.plantuml.UrlMode;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
|
||||
import net.sourceforge.plantuml.command.BlocLines;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
|
@ -41,8 +41,8 @@ import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UrlBuilder;
|
||||
import net.sourceforge.plantuml.UrlMode;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
|
||||
import net.sourceforge.plantuml.classdiagram.ClassDiagram;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
|
@ -38,8 +38,8 @@ package net.sourceforge.plantuml.descdiagram.command;
|
||||
import net.sourceforge.plantuml.Direction;
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
@ -244,10 +244,12 @@ public class CommandLinkElement extends SingleLineCommand2<DescriptionDiagram> {
|
||||
throws NoSuchColorException {
|
||||
final String ent1String = arg.get("ENT1", 0);
|
||||
final String ent2String = arg.get("ENT2", 0);
|
||||
final Ident ident1 = diagram.buildFullyQualified(ent1String);
|
||||
final Ident ident2 = diagram.buildFullyQualified(ent2String);
|
||||
Ident ident1pure = Ident.empty().add(ent1String, diagram.getNamespaceSeparator());
|
||||
Ident ident2pure = Ident.empty().add(ent2String, diagram.getNamespaceSeparator());
|
||||
final String ent1 = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(ent1String);
|
||||
final String ent2 = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(ent2String);
|
||||
final Ident ident1 = diagram.buildLeafIdentSpecial(ent1);
|
||||
final Ident ident2 = diagram.buildLeafIdentSpecial(ent2);
|
||||
Ident ident1pure = Ident.empty().add(ent1, diagram.getNamespaceSeparator());
|
||||
Ident ident2pure = Ident.empty().add(ent2, diagram.getNamespaceSeparator());
|
||||
final Code code1 = diagram.V1972() ? ident1 : diagram.buildCode(ent1String);
|
||||
final Code code2 = diagram.V1972() ? ident2 : diagram.buildCode(ent2String);
|
||||
|
||||
@ -309,13 +311,13 @@ public class CommandLinkElement extends SingleLineCommand2<DescriptionDiagram> {
|
||||
final Ident ident3 = diagram.buildFullyQualified(tmp3);
|
||||
final Code code3 = diagram.V1972() ? ident3 : diagram.buildCode(tmp3);
|
||||
if (codeChar == '(') {
|
||||
return getOrCreateLeaf1972(diagram, ident3, code3, LeafType.USECASE, USymbols.USECASE, pure);
|
||||
return getOrCreateLeaf1972(diagram, ident, code3, LeafType.USECASE, USymbols.USECASE, pure);
|
||||
} else if (codeChar == ':') {
|
||||
return getOrCreateLeaf1972(diagram, ident3, code3, LeafType.DESCRIPTION,
|
||||
return getOrCreateLeaf1972(diagram, ident, code3, LeafType.DESCRIPTION,
|
||||
diagram.getSkinParam().actorStyle().toUSymbol(), pure);
|
||||
} else if (codeChar == '[') {
|
||||
final USymbol sym = diagram.getSkinParam().componentStyle().toUSymbol();
|
||||
return getOrCreateLeaf1972(diagram, ident3, code3, LeafType.DESCRIPTION, sym, pure);
|
||||
return getOrCreateLeaf1972(diagram, ident, code3, LeafType.DESCRIPTION, sym, pure);
|
||||
}
|
||||
|
||||
return getOrCreateLeaf1972(diagram, ident, code, null, null, pure);
|
||||
|
@ -40,8 +40,8 @@ import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UrlBuilder;
|
||||
import net.sourceforge.plantuml.UrlMode;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IGroup;
|
||||
import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
|
||||
import net.sourceforge.plantuml.classdiagram.command.CommandCreateClassMultilines;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
|
@ -55,10 +55,10 @@ import net.sourceforge.plantuml.UmlDiagramType;
|
||||
import net.sourceforge.plantuml.api.ImageDataSimple;
|
||||
import net.sourceforge.plantuml.awt.geom.XDimension2D;
|
||||
import net.sourceforge.plantuml.awt.geom.XPoint2D;
|
||||
import net.sourceforge.plantuml.baraye.a.EntityFactory;
|
||||
import net.sourceforge.plantuml.baraye.a.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.a.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.a.ILeaf;
|
||||
import net.sourceforge.plantuml.baraye.EntityFactory;
|
||||
import net.sourceforge.plantuml.baraye.IEntity;
|
||||
import net.sourceforge.plantuml.baraye.IGroup;
|
||||
import net.sourceforge.plantuml.baraye.ILeaf;
|
||||
import net.sourceforge.plantuml.core.ImageData;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.cucadiagram.GroupType;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user