Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from plantuml:master #91

Merged
merged 86 commits into from
Feb 21, 2024
Merged
Changes from 1 commit
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
35505fd
chore(deps): bump actions/setup-java from 3 to 4
dependabot[bot] Nov 30, 2023
7b1f67a
test: Use XMLUnit to compare XMI
DaumAlexande Dec 4, 2023
de5d791
docs: improve `@deprecated` description
The-Lum Dec 4, 2023
6c593c4
Merge pull request #1619 from The-Lum/ImproveDoc
arnaudroques Dec 4, 2023
db6567c
Merge pull request #1618 from DaumAlexande/use_xmlunit
arnaudroques Dec 4, 2023
3a4c614
Merge pull request #1617 from plantuml/dependabot/github_actions/acti…
arnaudroques Dec 4, 2023
cb5b881
chore(deps): bump actions/labeler from 4 to 5
dependabot[bot] Dec 5, 2023
1cb61d5
fix: allow different type inside array for `GetJsonKey` builtin fct
The-Lum Dec 8, 2023
3f836a4
fix: allow (`int` corresponding of) unicode value for `Chr` builtin fct
The-Lum Dec 8, 2023
5c72456
test refactor: simplify test using `TimTestUtils`
The-Lum Dec 8, 2023
c20153a
Merge pull request #1624 from The-Lum/PatchBranch
arnaudroques Dec 8, 2023
c20b3d9
feat: work on chronology
arnaudroques Dec 11, 2023
428381c
Merge branch 'tmp2'
arnaudroques Dec 11, 2023
a061b11
chore: formatting issue
arnaudroques Dec 11, 2023
a87f844
fix: missing label in activity diagrams
arnaudroques Dec 11, 2023
5128891
chore: version 1.2023.13
arnaudroques Dec 11, 2023
cc80d86
chore: prepare next development cycle
arnaudroques Dec 12, 2023
371bafa
chore(deps): bump actions/upload-artifact from 3 to 4
dependabot[bot] Dec 15, 2023
b65aaff
fix: improve local style for activity diagrams
arnaudroques Dec 18, 2023
26189b1
fix: improve local style management for activity diagrams
arnaudroques Dec 19, 2023
533c27c
feat: adding edgy tools in stdlib
arnaudroques Jan 3, 2024
d07cda5
feat: adding action and process keywords
arnaudroques Jan 6, 2024
6c73caa
fix: minor issues about multiples stereotype and improve new shapes a…
arnaudroques Jan 8, 2024
48dc07d
fix: note placement in listfiles
arnaudroques Jan 9, 2024
9502ed8
add: Language Descriptor Improvement (adding `action` and `process`)
The-Lum Jan 16, 2024
24d7e94
Merge pull request #1643 from The-Lum/PatchBranch
arnaudroques Jan 16, 2024
bf2312a
feat: edgy standard library improvement
arnaudroques Jan 16, 2024
4217882
chore(deps): bump actions/cache from 3 to 4
dependabot[bot] Jan 18, 2024
4026878
perf: stop recompiling pattern at runtime
arnaudroques Jan 18, 2024
f805d98
docs: add `readme.md` on `chronology`
The-Lum Jan 24, 2024
6d158d1
docs: add `package-info.java` on `chronology`
The-Lum Jan 24, 2024
dbb5354
fix: clear cache when StringBounder has changed
arnaudroques Jan 27, 2024
e9139c8
fix: Restore missing file `HelpTest.java` on an accurate folder.
The-Lum Jan 27, 2024
de6316c
Merge pull request #1655 from The-Lum/PatchBranch
arnaudroques Jan 27, 2024
5fae97f
fix: Gantt Layout issue when Print between is used with Printscale we…
arnaudroques Feb 1, 2024
7a20001
Merge branch 'master' of https://github.com/plantuml/plantuml
arnaudroques Feb 1, 2024
dbbdf12
chore: version 1.2024.0
arnaudroques Feb 1, 2024
dbaf8ac
feat: add some %random function
arnaudroques Feb 1, 2024
9e18d34
Update and rename Random.java to RandomFunction.java
The-Lum Feb 1, 2024
376ee9d
Update `TContext.java` with `RandomFunction`
The-Lum Feb 1, 2024
c10ac17
fix: import the file `RandomFunction`
The-Lum Feb 1, 2024
23c86ba
Improve `Chronology diagram` management
The-Lum Feb 1, 2024
80acb87
Merge pull request #1668 from The-Lum/Random
arnaudroques Feb 1, 2024
ad383d2
Merge pull request #1669 from The-Lum/PatchBranch
arnaudroques Feb 2, 2024
3bd3edb
feat: `Random` function: add test and private declaration
The-Lum Feb 3, 2024
c447e44
Merge pull request #1673 from The-Lum/Random
arnaudroques Feb 4, 2024
1690ca3
chore(deps): bump org.assertj:assertj-core from 3.24.2 to 3.25.3
dependabot[bot] Feb 5, 2024
81e1c96
feat: add eip in standard library
arnaudroques Feb 6, 2024
306f8b2
feat: improve standard library
arnaudroques Feb 7, 2024
1c0c7d8
Add files via upload
theavege Feb 8, 2024
6d035c3
Merge pull request #1677 from theavege/add/sunlust
arnaudroques Feb 8, 2024
68fdb66
chore: version 1.2024.1
arnaudroques Feb 8, 2024
0ba45e0
Update puml-theme-sunlust.puml
theavege Feb 9, 2024
d443d23
Merge branch 'plantuml:master' into add/sunlust
theavege Feb 9, 2024
d65951f
feat: Update C4-PlantUML to v2.9.0
arnaudroques Feb 11, 2024
0975502
fix: update graphviz version check pattern
chenrui333 Feb 11, 2024
a65935c
Merge pull request #1684 from chenrui333/update-graphviz-version-dete…
arnaudroques Feb 11, 2024
36b1fe5
Merge pull request #1681 from theavege/add/sunlust
arnaudroques Feb 11, 2024
e11d974
refactor: place `net.sourceforge.plantuml.test` on `test.utils`
The-Lum Feb 12, 2024
29f90e5
Merge pull request #1620 from plantuml/dependabot/github_actions/acti…
arnaudroques Feb 13, 2024
75b00f0
Merge pull request #1626 from plantuml/dependabot/github_actions/acti…
arnaudroques Feb 13, 2024
e70f23b
refactor: Change `HelpTest` to `CommandHelpThemeTest` on a more accur…
The-Lum Feb 13, 2024
956e23c
Merge pull request #1644 from plantuml/dependabot/github_actions/acti…
arnaudroques Feb 13, 2024
7be4804
fix: emergency change to be compatible with `actions/labeler` v5
The-Lum Feb 13, 2024
af3c49c
docs: fix links _(due to emoji)_
The-Lum Feb 13, 2024
cfd3ad2
Merge pull request #1687 from The-Lum/ImproveDoc
arnaudroques Feb 13, 2024
4e5bf03
Merge branch 'master' into PatchBranch
arnaudroques Feb 13, 2024
17d317e
Merge pull request #1686 from The-Lum/PatchBranch
arnaudroques Feb 13, 2024
76d1daf
Merge pull request #1674 from plantuml/dependabot/gradle/org.assertj-…
arnaudroques Feb 13, 2024
ababa00
chore(deps): bump org.junit.jupiter:junit-jupiter from 5.10.1 to 5.10.2
dependabot[bot] Feb 13, 2024
ab60639
Merge pull request #1675 from plantuml/dependabot/gradle/org.junit.ju…
arnaudroques Feb 13, 2024
ab09e2e
feat: add `%get_all_theme` builtin function
The-Lum Feb 14, 2024
53bcc02
fix: typo on `GetAllThemeTest` filename
The-Lum Feb 14, 2024
ac8e785
Merge pull request #1689 from The-Lum/Random
arnaudroques Feb 14, 2024
cfa16d0
chore: version 1.2024.2
arnaudroques Feb 14, 2024
ad4a1bd
feat: adding undocumented support for gzip URL
arnaudroques Feb 15, 2024
c6f150f
chore: version 1.2024.3
arnaudroques Feb 15, 2024
4ce77d3
fix: suppress `@[start|end]uml` on `sunlust` theme
The-Lum Feb 16, 2024
99698d9
Merge pull request #1691 from The-Lum/PatchBranch
arnaudroques Feb 16, 2024
04f7187
refactor: remove dead code
arnaudroques Feb 16, 2024
ee43dd0
chore: fix some tests on Windows
arnaudroques Feb 16, 2024
8fe9fae
tests: add not working example about stdlib
The-Lum Feb 16, 2024
415886e
docs: add "PlantUML package and PlantUML on the GNU/Linux distributio…
The-Lum Feb 17, 2024
5fe5caf
Merge pull request #1692 from The-Lum/PatchBranch
arnaudroques Feb 20, 2024
2a96112
chore: improve error message when missing stdlib
arnaudroques Feb 20, 2024
c6f9684
Merge pull request #1693 from The-Lum/docs
arnaudroques Feb 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: work on chronology
arnaudroques committed Dec 11, 2023
commit c20b3d9642eb56600c6c22b09021b545b05f6174
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -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.13beta3
version = 1.2023.13beta4
org.gradle.workers.max = 3
3 changes: 2 additions & 1 deletion src/com/plantuml/api/cheerpj/v1/DirectDraw.java
Original file line number Diff line number Diff line change
@@ -53,6 +53,7 @@
import net.sourceforge.plantuml.BlockUmlBuilder;
import net.sourceforge.plantuml.ErrorUml;
import net.sourceforge.plantuml.FileFormat;
import net.sourceforge.plantuml.FileFormatOption;
import net.sourceforge.plantuml.core.Diagram;
import net.sourceforge.plantuml.error.PSystemError;
import net.sourceforge.plantuml.klimt.color.ColorMapper;
@@ -122,7 +123,7 @@ public static Object draw(String mode, String text) {
ug.apply(back).apply(back.bg()).draw(URectangle.build(frameWidth, frameHeight));
WasmLog.log("...drawing...");

system.exportDiagramGraphic(ug);
system.exportDiagramGraphic(ug, new FileFormatOption(FileFormat.PNG));

WasmLog.log("done!");

5 changes: 3 additions & 2 deletions src/com/plantuml/api/cheerpj/v1/Raw.java
Original file line number Diff line number Diff line change
@@ -55,6 +55,7 @@
import net.sourceforge.plantuml.EmptyImageBuilder;
import net.sourceforge.plantuml.ErrorUml;
import net.sourceforge.plantuml.FileFormat;
import net.sourceforge.plantuml.FileFormatOption;
import net.sourceforge.plantuml.api.ImageDataSimple;
import net.sourceforge.plantuml.core.Diagram;
import net.sourceforge.plantuml.core.ImageData;
@@ -124,7 +125,7 @@ public static Object convertToBlob(String mode, String text, String pathOut) {
ug.resetMax();
WasmLog.log("...drawing...");

system.exportDiagramGraphic(ug);
system.exportDiagramGraphic(ug, new FileFormatOption(FileFormat.PNG));

final int width = (int) (2 + ug.getMaxX());
final int height = (int) (2 + ug.getMaxY());
@@ -208,7 +209,7 @@ public static Object convert(String mode, String text) {
ug.resetMax();
WasmLog.log("...drawing...");

system.exportDiagramGraphic(ug);
system.exportDiagramGraphic(ug, new FileFormatOption(FileFormat.PNG));

final int width = (int) (2 + ug.getMaxX());
final int height = (int) (2 + ug.getMaxY());
4 changes: 2 additions & 2 deletions src/net/atmp/CucaDiagram.java
Original file line number Diff line number Diff line change
@@ -376,13 +376,13 @@ private void createFilesTxt(OutputStream os, int index, FileFormat fileFormat) t
// ::done

@Override
final public void exportDiagramGraphic(UGraphic ug) {
final public void exportDiagramGraphic(UGraphic ug, FileFormatOption fileFormatOption) {
final CucaDiagramFileMaker maker = new CucaDiagramFileMakerSmetana(this, ug.getStringBounder());
maker.createOneGraphic(ug);
}

@Override
final protected TextBlock getTextBlock() {
final protected TextBlock getTextMainBlock(FileFormatOption fileFormatOption) {
throw new UnsupportedOperationException();
}

18 changes: 9 additions & 9 deletions src/net/sourceforge/plantuml/AbstractPSystem.java
Original file line number Diff line number Diff line change
@@ -114,14 +114,14 @@ private String getVersion() {
}

final public String getMetadata() {
if (source == null)
if (source == null)
return getVersion();

final String rawString = source.getRawString("\n");
final String plainString = source.getPlainString("\n");
if (rawString != null && rawString.equals(plainString))
if (rawString != null && rawString.equals(plainString))
return rawString + BackSlash.NEWLINE + getVersion();

return rawString + BackSlash.NEWLINE + plainString + BackSlash.NEWLINE + getVersion();
}

@@ -130,9 +130,9 @@ final public UmlSource getSource() {
}

final public long seed() {
if (source == null)
if (source == null)
return 42;

return getSource().seed();
}

@@ -159,9 +159,9 @@ public void setSplitPagesVertical(int splitPagesVertical) {
}

public DisplayPositionned getTitle() {
if (source == null)
if (source == null)
return DisplayPositioned.single(Display.empty(), HorizontalAlignment.CENTER, VerticalAlignment.TOP);

return DisplayPositioned.single(source.getTitle(), HorizontalAlignment.CENTER, VerticalAlignment.TOP);
}

@@ -247,7 +247,7 @@ public Display getTitleDisplay() {
}

@Override
public void exportDiagramGraphic(UGraphic ug) {
public void exportDiagramGraphic(UGraphic ug, FileFormatOption fileFormatOption) {
final UFont font = UFont.monospaced(14);
final FontConfiguration fc = FontConfiguration.blackBlueTrue(font);
final UText text = UText.build("Not implemented yet for " + getClass().getName(), fc);
2 changes: 2 additions & 0 deletions src/net/sourceforge/plantuml/Option.java
Original file line number Diff line number Diff line change
@@ -440,9 +440,11 @@ else if (nb.matches("\\d+"))

} else if (s.equalsIgnoreCase("-preproc")) {
preprocessorOutput = OptionPreprocOutputMode.NORMAL;
setFileFormatOption(new FileFormatOption(FileFormat.PREPROC));

} else if (s.equalsIgnoreCase("-cypher")) {
preprocessorOutput = OptionPreprocOutputMode.CYPHER;
setFileFormatOption(new FileFormatOption(FileFormat.PREPROC));

} else if (s.equalsIgnoreCase("-checkmetadata")) {
checkMetadata = true;
8 changes: 6 additions & 2 deletions src/net/sourceforge/plantuml/PSystemBuilder.java
Original file line number Diff line number Diff line change
@@ -48,6 +48,7 @@
import net.sourceforge.plantuml.api.PSystemFactory;
import net.sourceforge.plantuml.board.BoardDiagramFactory;
import net.sourceforge.plantuml.bpm.BpmDiagramFactory;
import net.sourceforge.plantuml.chronology.ChronologyDiagramFactory;
import net.sourceforge.plantuml.classdiagram.ClassDiagramFactory;
import net.sourceforge.plantuml.core.Diagram;
import net.sourceforge.plantuml.core.DiagramType;
@@ -223,7 +224,8 @@ final public Diagram createPSystem(List<StringLocated> source, List<StringLocate
// factories.add(new PSystemSudokuFactory());
// ::done

// ::comment when __CORE__ or __MIT__ or __EPL__ or __BSD__ or __ASL__ or __LGPL__
// ::comment when __CORE__ or __MIT__ or __EPL__ or __BSD__ or __ASL__ or
// __LGPL__
factories.add(new PSystemJcckitFactory());
factories.add(new PSystemSudokuFactory());
// ::done
@@ -247,11 +249,13 @@ final public Diagram createPSystem(List<StringLocated> source, List<StringLocate
// ::done

factories.add(new PSystemCharlieFactory());
// ::comment when __CORE__ or __MIT__ or __EPL__ or __BSD__ or __ASL__ or __LGPL__
// ::comment when __CORE__ or __MIT__ or __EPL__ or __BSD__ or __ASL__ or
// __LGPL__
factories.add(new PSystemXearthFactory());
// ::done

factories.add(new GanttDiagramFactory());
factories.add(new ChronologyDiagramFactory());
factories.add(new FlowDiagramFactory());

// ::comment when __CORE__
7 changes: 3 additions & 4 deletions src/net/sourceforge/plantuml/PlainDiagram.java
Original file line number Diff line number Diff line change
@@ -66,14 +66,13 @@ protected ImageData exportDiagramNow(OutputStream os, int index, FileFormatOptio
}

@Override
public void exportDiagramGraphic(UGraphic ug) {
final FileFormatOption option = new FileFormatOption(FileFormat.PNG);
public void exportDiagramGraphic(UGraphic ug, FileFormatOption fileFormatOption) {
try {
final UDrawable rootDrawable = getRootDrawable(option);
final UDrawable rootDrawable = getRootDrawable(fileFormatOption);
rootDrawable.drawU(ug);
} catch (IOException e) {
e.printStackTrace();
super.exportDiagramGraphic(ug);
super.exportDiagramGraphic(ug, fileFormatOption);
}
}

12 changes: 11 additions & 1 deletion src/net/sourceforge/plantuml/SourceStringReader.java
Original file line number Diff line number Diff line change
@@ -54,6 +54,7 @@
import net.sourceforge.plantuml.klimt.shape.TextBlock;
import net.sourceforge.plantuml.preproc.Defines;
import net.sourceforge.plantuml.security.SFile;
import net.sourceforge.plantuml.text.StringLocated;
import net.sourceforge.plantuml.utils.Log;

public class SourceStringReader {
@@ -157,6 +158,14 @@ public DiagramDescription outputImage(OutputStream os, int numImage, FileFormatO
noValidStartFound(os, fileFormatOption);
return null;
}
if (fileFormatOption.getFileFormat() == FileFormat.PREPROC) {
final BlockUml first = blocks.get(0);
for (StringLocated s : first.getData()) {
os.write(s.getString().getBytes(UTF_8));
os.write("\n".getBytes(UTF_8));
}
return new DiagramDescription("PREPROC");
}
for (BlockUml b : blocks) {
final Diagram system = b.getDiagram();
final int nbInSystem = system.getNbImages();
@@ -231,7 +240,8 @@ public String getCMapData(int numImage, FileFormatOption fileFormatOption) throw
}

public ImageData noValidStartFound(OutputStream os, FileFormatOption fileFormatOption) throws IOException {
final TextBlock error = GraphicStrings.createForError(Arrays.asList("No valid @start/@end found, please check the version"),
final TextBlock error = GraphicStrings.createForError(
Arrays.asList("No valid @start/@end found, please check the version"),
fileFormatOption.isUseRedForError());

return plainImageBuilder(error, fileFormatOption).write(os);
6 changes: 3 additions & 3 deletions src/net/sourceforge/plantuml/TitledDiagram.java
Original file line number Diff line number Diff line change
@@ -253,11 +253,11 @@ protected ColorMapper muteColorMapper(ColorMapper init) {

}

protected abstract TextBlock getTextBlock();
protected abstract TextBlock getTextMainBlock(FileFormatOption fileFormatOption);

@Override
public void exportDiagramGraphic(UGraphic ug) {
final TextBlock textBlock = getTextBlock();
public void exportDiagramGraphic(UGraphic ug, FileFormatOption fileFormatOption) {
final TextBlock textBlock = getTextMainBlock(fileFormatOption);
textBlock.drawU(ug);
}

Original file line number Diff line number Diff line change
@@ -61,6 +61,7 @@
import net.sourceforge.plantuml.regex.RegexPartialMatch;
import net.sourceforge.plantuml.regex.RegexResult;
import net.sourceforge.plantuml.stereo.Stereotype;
import net.sourceforge.plantuml.stereo.StereotypePattern;
import net.sourceforge.plantuml.url.Url;
import net.sourceforge.plantuml.url.UrlBuilder;
import net.sourceforge.plantuml.url.UrlMode;
@@ -81,9 +82,7 @@ private static IRegex getRegexConcat() {
new RegexLeaf("CODE", "([%pLN][%pLN_.]*)"), //
new RegexLeaf("BAR", "(?:==+)[%s]*([%pLN_.]+)[%s]*(?:==+)"), //
new RegexLeaf("QUOTED", "[%g]([^%g]+)[%g](?:[%s]+as[%s]+([%pLN_.]+))?"))), //
RegexLeaf.spaceZeroOrMore(), //
new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), //
RegexLeaf.spaceZeroOrMore(), //
StereotypePattern.optional("STEREOTYPE"), //
ColorParser.exp2(), //
RegexLeaf.spaceZeroOrMore(), //
UrlBuilder.OPTIONAL, //
@@ -105,9 +104,7 @@ private static IRegex getRegexConcat() {
new RegexLeaf("BAR2", "(?:==+)[%s]*([%pLN_.]+)[%s]*(?:==+)"), //
new RegexLeaf("QUOTED2", "[%g]([^%g]+)[%g](?:[%s]+as[%s]+([%pLN][%pLN_.]*))?"), //
new RegexLeaf("QUOTED_INVISIBLE2", "(\\w.*?)")), //
RegexLeaf.spaceZeroOrMore(), //
new RegexLeaf("STEREOTYPE2", "(\\<\\<.*\\>\\>)?"), //
RegexLeaf.spaceZeroOrMore(), //
StereotypePattern.optional("STEREOTYPE2"), //
new RegexOptional( //
new RegexConcat( //
new RegexLeaf("in"), //
Original file line number Diff line number Diff line change
@@ -64,6 +64,7 @@
import net.sourceforge.plantuml.regex.RegexOr;
import net.sourceforge.plantuml.regex.RegexResult;
import net.sourceforge.plantuml.stereo.Stereotype;
import net.sourceforge.plantuml.stereo.StereotypePattern;
import net.sourceforge.plantuml.text.BackSlash;
import net.sourceforge.plantuml.text.StringLocated;
import net.sourceforge.plantuml.url.Url;
@@ -91,9 +92,7 @@ static IRegex getRegexConcat() {
new RegexLeaf("CODE", "([%pLN][%pLN_.]*)"), //
new RegexLeaf("BAR", "(?:==+)[%s]*([%pLN_.]+)[%s]*(?:==+)"), //
new RegexLeaf("QUOTED", "[%g]([^%g]+)[%g](?:[%s]+as[%s]+([%pLN_.]+))?"))), //
RegexLeaf.spaceZeroOrMore(), //
new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), //
RegexLeaf.spaceZeroOrMore(), //
StereotypePattern.optional("STEREOTYPE"), //
new RegexLeaf("BACKCOLOR", "(#\\w+)?"), //
RegexLeaf.spaceZeroOrMore(), //
UrlBuilder.OPTIONAL, //
Original file line number Diff line number Diff line change
@@ -52,6 +52,7 @@
import net.sourceforge.plantuml.regex.RegexOr;
import net.sourceforge.plantuml.regex.RegexResult;
import net.sourceforge.plantuml.stereo.Stereotype;
import net.sourceforge.plantuml.stereo.StereotypePattern;
import net.sourceforge.plantuml.utils.LineLocation;

public class CommandPartition extends SingleLineCommand2<ActivityDiagram> {
@@ -69,9 +70,7 @@ private static IRegex getRegexConcat() {
new RegexOr(//
color().getRegex(), //
new RegexLeaf("LEGACYCOLORIGNORED", "(#[0-9a-fA-F]{6}|#?\\w+)?")), //
RegexLeaf.spaceZeroOrMore(), //
new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), //
RegexLeaf.spaceZeroOrMore(), //
StereotypePattern.optional("STEREOTYPE"), //
new RegexLeaf("\\{?"), //
RegexLeaf.end());
}
@@ -89,12 +88,10 @@ protected CommandExecutionResult executeArg(ActivityDiagram diagram, LineLocatio
final Entity p = diagram.getCurrentGroup();

final Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet());
if (colors.isEmpty() == false) {
if (colors.isEmpty() == false)
p.setColors(colors);
}
if (arg.get("STEREOTYPE", 0) != null) {
p.setStereotype(Stereotype.build(arg.get("STEREOTYPE", 0)));
}

p.setStereotype(Stereotype.build(arg.get("STEREOTYPE", 0)));

return CommandExecutionResult.ok();
}
Original file line number Diff line number Diff line change
@@ -40,7 +40,6 @@
import java.util.Map;
import java.util.Objects;

import net.sourceforge.plantuml.FileFormat;
import net.sourceforge.plantuml.FileFormatOption;
import net.sourceforge.plantuml.UmlDiagram;
import net.sourceforge.plantuml.activitydiagram3.ftile.BoxStyle;
@@ -208,8 +207,7 @@ protected ImageData exportDiagramInternal(OutputStream os, int index, FileFormat
}

@Override
protected TextBlock getTextBlock() {
final FileFormatOption fileFormatOption = new FileFormatOption(FileFormat.PNG);
protected TextBlock getTextMainBlock(FileFormatOption fileFormatOption) {
final StringBounder stringBounder = fileFormatOption.getDefaultStringBounder(getSkinParam());
return getTextBlock(stringBounder);
}
@@ -318,10 +316,10 @@ public CommandExecutionResult endSwitch() {
return CommandExecutionResult.error("Cannot find switch");
}

public void startIf(Display test, Display whenThen, HColor color, Url url) {
public void startIf(Display test, Display whenThen, HColor color, Url url, Stereotype stereotype) {
manageSwimlaneStrategy();
final InstructionIf instructionIf = new InstructionIf(swinlanes.getCurrentSwimlane(), current(), test,
LinkRendering.none().withDisplay(whenThen), nextLinkRenderer(), color, getSkinParam(), url);
LinkRendering.none().withDisplay(whenThen), nextLinkRenderer(), color, getSkinParam(), url, stereotype);
current().add(instructionIf);
setNextLinkRendererInternal(LinkRendering.none());
setCurrent(instructionIf);
@@ -392,7 +390,8 @@ public CommandExecutionResult backward(Display label, BoxStyle boxStyle, LinkRen
manageSwimlaneStrategy();
if (current() instanceof InstructionRepeat) {
final InstructionRepeat instructionRepeat = (InstructionRepeat) current();
instructionRepeat.setBackward(label, swinlanes.getCurrentSwimlane(), boxStyle, incoming1, incoming2, stereotype);
instructionRepeat.setBackward(label, swinlanes.getCurrentSwimlane(), boxStyle, incoming1, incoming2,
stereotype);
return CommandExecutionResult.ok();
}
if (current() instanceof InstructionWhile) {
5 changes: 3 additions & 2 deletions src/net/sourceforge/plantuml/activitydiagram3/Branch.java
Original file line number Diff line number Diff line change
@@ -57,6 +57,7 @@
import net.sourceforge.plantuml.klimt.shape.TextBlockUtils;
import net.sourceforge.plantuml.sequencediagram.NotePosition;
import net.sourceforge.plantuml.sequencediagram.NoteType;
import net.sourceforge.plantuml.stereo.Stereotype;
import net.sourceforge.plantuml.style.ISkinParam;
import net.sourceforge.plantuml.style.PName;
import net.sourceforge.plantuml.style.SName;
@@ -95,12 +96,12 @@ public boolean containsBreak() {
}

public Branch(StyleBuilder styleBuilder, Swimlane swimlane, LinkRendering labelPositive, Display labelTest,
HColor color, LinkRendering inlabel) {
HColor color, LinkRendering inlabel, Stereotype stereotype) {
this.inlabel = Objects.requireNonNull(inlabel);
this.labelTest = Objects.requireNonNull(labelTest);
this.labelPositive = Objects.requireNonNull(labelPositive);

final Style style = getDefaultStyleDefinitionDiamond().getMergedStyle(styleBuilder);
final Style style = getDefaultStyleDefinitionDiamond().withTOBECHANGED(stereotype).getMergedStyle(styleBuilder);
this.color = color == null
? style.value(PName.BackGroundColor).asColor(styleBuilder.getSkinParam().getIHtmlColorSet())
: color;
Loading