mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-05 21:17:52 +00:00
fix: work in progress
https://github.com/plantuml/plantuml/issues/1405 https://github.com/plantuml/plantuml/issues/1423
This commit is contained in:
parent
3b3ab396b9
commit
488029b9b0
@ -491,10 +491,10 @@ public class Link extends WithLinkType implements Hideable, Removeable {
|
||||
this.port1 = port1;
|
||||
this.port2 = port2;
|
||||
if (port1 != null)
|
||||
((Entity) cl1).addPortShortName(port1);
|
||||
cl1.addPortShortName(port1);
|
||||
|
||||
if (port2 != null)
|
||||
((Entity) cl2).addPortShortName(port2);
|
||||
cl2.addPortShortName(port2);
|
||||
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,7 @@ public final class CommandFactoryNote implements SingleMultiFactoryCommand<Abstr
|
||||
private CommandExecutionResult executeInternal(AbstractEntityDiagram diagram, RegexResult arg, BlocLines display)
|
||||
throws NoSuchColorException {
|
||||
final String idShort = arg.get("CODE", 0);
|
||||
final Quark<Entity> quark = diagram.quarkInContext(true, diagram.cleanId(idShort));
|
||||
final Quark<Entity> quark = diagram.quarkInContext(false, diagram.cleanId(idShort));
|
||||
|
||||
if (quark.getData() != null)
|
||||
return CommandExecutionResult.error("Note already created: " + quark.getName());
|
||||
|
@ -80,9 +80,9 @@ public class Colors {
|
||||
}
|
||||
|
||||
public Colors(String data, HColorSet set, ColorType mainType) throws NoSuchColorException {
|
||||
data = StringUtils.goLowerCase(data);
|
||||
data = StringUtils.goLowerCase(data).replaceAll("#", "");
|
||||
|
||||
for (final StringTokenizer st = new StringTokenizer(data, "#;"); st.hasMoreTokens();) {
|
||||
for (final StringTokenizer st = new StringTokenizer(data, ";"); st.hasMoreTokens();) {
|
||||
final String s = st.nextToken();
|
||||
final int x = s.indexOf(':');
|
||||
if (x == -1) {
|
||||
|
@ -50,6 +50,8 @@ import net.sourceforge.plantuml.regex.MyPattern;
|
||||
|
||||
public class HColorSet {
|
||||
|
||||
private static final String COLOR_GRADIENT_SEPARATOR = "[-\\\\|/]";
|
||||
|
||||
private final static HColorSet singleton = new HColorSet();
|
||||
|
||||
private final Map<String, String> htmlNames = new HashMap<String, String>();
|
||||
@ -293,7 +295,7 @@ public class HColorSet {
|
||||
|
||||
private Gradient gradientFromString(String s) {
|
||||
// ::comment when __HAXE__
|
||||
final Matcher2 m = MyPattern.cmpile("[-\\\\|/]").matcher(s);
|
||||
final Matcher2 m = MyPattern.cmpile(COLOR_GRADIENT_SEPARATOR).matcher(s);
|
||||
if (m.find()) {
|
||||
final char sep = m.group(0).charAt(0);
|
||||
final int idx = s.indexOf(sep);
|
||||
|
@ -88,7 +88,8 @@ public abstract class MyPattern {
|
||||
|
||||
private static String transform(String p) {
|
||||
// Replace ReadLineReader.java
|
||||
p = p.replace("%pLN", "\\p{L}0-9"); // Unicode Letter, digit
|
||||
// p = p.replace("%pLN", "\\p{L}0-9"); // Unicode Letter, digit
|
||||
p = p.replace("%pLN", "\\p{L}\\p{N}"); // Unicode Letter, digit
|
||||
p = p.replace("%s", "\\s\u00A0"); // space
|
||||
p = p.replace("%q", "'\u2018\u2019"); // quote
|
||||
p = p.replace("%g", "\"\u201c\u201d"); // double quote
|
||||
|
@ -513,9 +513,10 @@ public class SvekLine implements Moveable, Hideable, GuideLine {
|
||||
|
||||
if (extremityFactory != null) {
|
||||
final List<XPoint2D> points = pointListIterator.next();
|
||||
if (points.size() == 0)
|
||||
throw new IllegalStateException();
|
||||
// return extremityFactory.createUDrawable(center, angle, null);
|
||||
if (points.size() == 0)
|
||||
return null;
|
||||
// throw new IllegalStateException();
|
||||
// return extremityFactory.createUDrawable(center, angle, null);
|
||||
|
||||
final XPoint2D p0 = points.get(0);
|
||||
final XPoint2D p1 = points.get(1);
|
||||
|
@ -242,7 +242,7 @@ public class EntityImageObject extends AbstractEntityImage implements Stencil, W
|
||||
}
|
||||
|
||||
public ShapeType getShapeType() {
|
||||
if (((Entity) getEntity()).getPortShortNames().size() > 0)
|
||||
if (getEntity().getPortShortNames().size() > 0)
|
||||
return ShapeType.RECTANGLE_HTML_FOR_PORTS;
|
||||
|
||||
return ShapeType.RECTANGLE;
|
||||
|
@ -82,7 +82,7 @@ public class Version {
|
||||
}
|
||||
|
||||
public static int beta() {
|
||||
final int beta = 3;
|
||||
final int beta = 4;
|
||||
return beta;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user