1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-12-22 02:49:06 +00:00
Arnaud Roques 2023-05-31 20:51:54 +02:00
parent aedaeec598
commit c95bbfe585
7 changed files with 18 additions and 17 deletions

View File

@ -1,4 +1,4 @@
# Warning, "version" should be the same in gradle.properties and Version.java
# Any idea anyone how to magically synchronize those :-) ?
version = 1.2023.9beta1
version = 1.2023.9beta2
org.gradle.workers.max = 3

View File

@ -69,9 +69,9 @@ public class DescriptionDiagram extends AbstractEntityDiagram {
for (Entity leaf : getEntityFactory().leafs()) {
final LeafType type = leaf.getLeafType();
final USymbol usymbol = leaf.getUSymbol();
if (type == LeafType.USECASE || usymbol == getSkinParam().actorStyle().toUSymbol()) {
if (type == LeafType.USECASE || usymbol == getSkinParam().actorStyle().toUSymbol())
return true;
}
}
return false;
}
@ -81,11 +81,9 @@ public class DescriptionDiagram extends AbstractEntityDiagram {
super.makeDiagramReady();
final LeafType defaultType = LeafType.DESCRIPTION;
final USymbol defaultSymbol = isUsecase() ? getSkinParam().actorStyle().toUSymbol() : USymbols.INTERFACE;
for (Entity leaf : getEntityFactory().leafs()) {
if (leaf.getLeafType() == LeafType.STILL_UNKNOWN) {
for (Entity leaf : getEntityFactory().leafs())
if (leaf.getLeafType() == LeafType.STILL_UNKNOWN)
leaf.muteToType(defaultType, defaultSymbol);
}
}
}
@Override

View File

@ -421,8 +421,7 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker {
}
if (diagram.isEmpty(g) && g.getGroupType() == GroupType.PACKAGE) {
g.muteToType(LeafType.EMPTY_PACKAGE);
System.err.println("STILL IN PROGRESS");
// printEntityNew(folder);
manageSingleNode(cluster, g);
} else {
// We create the "cluster" in ELK for this group
@ -467,14 +466,14 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker {
}
private void manageSingleNode(final ElkNode root, Entity leaf) {
private void manageSingleNode(ElkNode parent, Entity leaf) {
final IEntityImage image = printEntityInternal(leaf);
// Expected dimension of the node
final XDimension2D dimension = image.calculateDimension(stringBounder);
// Here, we try to tell ELK to use this dimension as node dimension
final ElkNode node = ElkGraphUtil.createNode(root);
final ElkNode node = ElkGraphUtil.createNode(parent);
node.setDimensions(dimension.getWidth(), dimension.getHeight());
// There is no real "label" here

View File

@ -81,9 +81,9 @@ public class UFont {
private static Font buildFont(String fontFamily, int fontStyle, int fontSize) {
if (fontFamily.contains(","))
for (String name : fontFamily.split(",")) {
name = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(name).trim();
name = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(name.trim()).trim();
if (doesFamilyExists(name))
return new Font(fontFamily, fontStyle, fontSize);
return new Font(name, fontStyle, fontSize);
}
@ -169,10 +169,10 @@ public class UFont {
return font.getPSName();
}
if (context == UFontContext.SVG) {
if (family.equalsIgnoreCase("sansserif"))
return "sans-serif";
String result = family.replace('\"', '\'');
result = result.replaceAll("(?i)sansserif", "sans-serif");
return family;
return result;
}
return family;
}

View File

@ -307,6 +307,7 @@ public class CucaDiagramFileMakerSmetana implements CucaDiagramFileMaker {
if (diagram.isEmpty(g) && g.getGroupType() == GroupType.PACKAGE) {
g.muteToType(LeafType.EMPTY_PACKAGE);
printEntity(g);
} else {
printSingleGroup(g);
}

View File

@ -183,6 +183,9 @@ public class StyleParser {
result.append(' ');
result.append(current.getData());
ins.jump();
} else if (current.getType() == StyleTokenType.COMMA) {
result.append(current.getData());
ins.jump();
} else if (current.getType() == StyleTokenType.COLON) {
result.append(current.getData());
ins.jump();

View File

@ -46,7 +46,7 @@ public class Version {
// Warning, "version" should be the same in gradle.properties and Version.java
// Any idea anyone how to magically synchronize those :-) ?
private static final String version = "1.2023.9beta1";
private static final String version = "1.2023.9beta2";
public static String versionString() {
return version;