From 486b020a847901e74cccc0485c355e83654bcb08 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Nov 2023 02:04:54 +0000 Subject: [PATCH 01/95] chore(deps): bump actions/github-script from 6 to 7 Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 7. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/github-script dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/add-triage-label.yml | 2 +- .github/workflows/close-and-put-in-backlog.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/add-triage-label.yml b/.github/workflows/add-triage-label.yml index 56da33e00..c98272529 100644 --- a/.github/workflows/add-triage-label.yml +++ b/.github/workflows/add-triage-label.yml @@ -12,7 +12,7 @@ jobs: permissions: issues: write steps: - - uses: actions/github-script@v6 + - uses: actions/github-script@v7 with: script: | github.rest.issues.addLabels({ diff --git a/.github/workflows/close-and-put-in-backlog.yml b/.github/workflows/close-and-put-in-backlog.yml index 26afa923d..91ad3c50d 100644 --- a/.github/workflows/close-and-put-in-backlog.yml +++ b/.github/workflows/close-and-put-in-backlog.yml @@ -7,7 +7,7 @@ jobs: if: github.event.label.name == 'p:backlog' runs-on: ubuntu-latest steps: - - uses: actions/github-script@v6 + - uses: actions/github-script@v7 with: script: | const welcomeMessage = ` From 6e85bcaac94ec364f33cd2a2f62ffe1d20d218e5 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Thu, 16 Nov 2023 11:08:55 +0000 Subject: [PATCH 02/95] docs: add `package-info.java` and `readme.md` For external code: - acearth, - zxing, - jcckit, - ditaa. --- .../com/ctreber/acearth/package-info.java | 16 ++++++++++++++++ src/ext/plantuml/com/ctreber/acearth/readme.md | 12 ++++++++++++ .../plantuml/com/google/zxing/package-info.java | 16 ++++++++++++++++ src/ext/plantuml/com/google/zxing/readme.md | 15 +++++++++++++++ src/h/package-info.java | 4 ++-- src/jcckit/package-info.java | 16 ++++++++++++++++ src/jcckit/readme.md | 15 +++++++++++++++ .../ascii2image/core/package-info.java | 16 ++++++++++++++++ .../stathissideris/ascii2image/core/readme.md | 15 +++++++++++++++ src/smetana/core/package-info.java | 4 ++-- 10 files changed, 125 insertions(+), 4 deletions(-) create mode 100644 src/ext/plantuml/com/ctreber/acearth/package-info.java create mode 100644 src/ext/plantuml/com/ctreber/acearth/readme.md create mode 100644 src/ext/plantuml/com/google/zxing/package-info.java create mode 100644 src/ext/plantuml/com/google/zxing/readme.md create mode 100644 src/jcckit/package-info.java create mode 100644 src/jcckit/readme.md create mode 100644 src/org/stathissideris/ascii2image/core/package-info.java create mode 100644 src/org/stathissideris/ascii2image/core/readme.md diff --git a/src/ext/plantuml/com/ctreber/acearth/package-info.java b/src/ext/plantuml/com/ctreber/acearth/package-info.java new file mode 100644 index 000000000..8e69ae42d --- /dev/null +++ b/src/ext/plantuml/com/ctreber/acearth/package-info.java @@ -0,0 +1,16 @@ +/* + * ⚠ Disclaimer 🚩 + * This file was not part of the original package. + * It was included only on the PlantUML package + * to provide source citation and documentation. + * + */ +/** + * Internal copy of AC.earth - XEarth + * for Java (code of Christian Treber). + * + * @see ext.plantuml.com.ctreber.acearth.ACearth + * @see net.sourceforge.plantuml.acearth + * + */ +package ext.plantuml.com.ctreber.acearth; diff --git a/src/ext/plantuml/com/ctreber/acearth/readme.md b/src/ext/plantuml/com/ctreber/acearth/readme.md new file mode 100644 index 000000000..2fc76d570 --- /dev/null +++ b/src/ext/plantuml/com/ctreber/acearth/readme.md @@ -0,0 +1,12 @@ +> [!WARNING] +> **Disclaimer**: +> This file was not part of the original package. +> It was included only on the PlantUML package to provide source citation and documentation. + +# Directory Documentation for `acearth` + +## Description +Internal copy of `AC.earth` - `XEarth` for Java _(code of Christian Treber)_. + +## See more information on +- [readme of `plantuml/acearth`](../../../../../net/sourceforge/plantuml/acearth/readme.md) diff --git a/src/ext/plantuml/com/google/zxing/package-info.java b/src/ext/plantuml/com/google/zxing/package-info.java new file mode 100644 index 000000000..a2d28d364 --- /dev/null +++ b/src/ext/plantuml/com/google/zxing/package-info.java @@ -0,0 +1,16 @@ +/* + * ⚠ Disclaimer 🚩 + * This file was not part of the original package. + * It was included only on the PlantUML package + * to provide source citation and documentation. + * + */ +/** + * Internal copy of + * + * ZXing (code of Google). + * + * @see net.sourceforge.plantuml.flashcode + * + */ +package ext.plantuml.com.google.zxing; diff --git a/src/ext/plantuml/com/google/zxing/readme.md b/src/ext/plantuml/com/google/zxing/readme.md new file mode 100644 index 000000000..fb27815b3 --- /dev/null +++ b/src/ext/plantuml/com/google/zxing/readme.md @@ -0,0 +1,15 @@ +> [!WARNING] +> **Disclaimer**: +> This file was not part of the original package. +> It was included only on the PlantUML package to provide source citation and documentation. + +# Directory Documentation for `zxing` + +## Description +Internal copy of `ZXing` _(code of Google)_. + +## Credit +- :octocat: [zxing/zxing](https://github.com/zxing/zxing) + +## See more information on +- [readme of `plantuml/flashcode`](../../../../../net/sourceforge/plantuml/flashcode/readme.md) diff --git a/src/h/package-info.java b/src/h/package-info.java index dff6c2a46..154188af6 100644 --- a/src/h/package-info.java +++ b/src/h/package-info.java @@ -12,9 +12,9 @@ * *

* - * @see gen + * @see "gen" * @see gen.annotation - * @see gen.lib + * @see "gen.lib" * @see gen.plugin.dot_layout * @see smetana.core * @see net.sourceforge.plantuml.sdot diff --git a/src/jcckit/package-info.java b/src/jcckit/package-info.java new file mode 100644 index 000000000..6bc88456f --- /dev/null +++ b/src/jcckit/package-info.java @@ -0,0 +1,16 @@ +/* + * ⚠ Disclaimer 🚩 + * This file was not part of the original package. + * It was included only on the PlantUML package + * to provide source citation and documentation. + * + */ +/** + * Internal copy of + * + * JCCKit (code of Franz-Josef Elmer). + * + * @see net.sourceforge.plantuml.jcckit + * + */ +package jcckit; diff --git a/src/jcckit/readme.md b/src/jcckit/readme.md new file mode 100644 index 000000000..19b4239f5 --- /dev/null +++ b/src/jcckit/readme.md @@ -0,0 +1,15 @@ +> [!WARNING] +> **Disclaimer**: +> This file was not part of the original package. +> It was included only on the PlantUML package to provide source citation and documentation. + +# Directory Documentation for `jcckit` + +## Description +Internal copy of `JCCKit` _(code of Franz-Josef Elmer)_. + +## Credit +- [JCCKit _(on Sourceforge)_](https://jcckit.sourceforge.net) + +## See more information on +- [readme of `plantuml/jcckit`](../net/sourceforge/plantuml/jcckit/readme.md) diff --git a/src/org/stathissideris/ascii2image/core/package-info.java b/src/org/stathissideris/ascii2image/core/package-info.java new file mode 100644 index 000000000..d39d0688a --- /dev/null +++ b/src/org/stathissideris/ascii2image/core/package-info.java @@ -0,0 +1,16 @@ +/* + * ⚠ Disclaimer 🚩 + * This file was not part of the original package. + * It was included only on the PlantUML package + * to provide source citation and documentation. + * + */ +/** + * Internal copy of + * + * ditaa (code of Stathis Sideris). + * + * @see net.sourceforge.plantuml.ditaa + * + */ +package org.stathissideris.ascii2image.core; diff --git a/src/org/stathissideris/ascii2image/core/readme.md b/src/org/stathissideris/ascii2image/core/readme.md new file mode 100644 index 000000000..f79ec3ec5 --- /dev/null +++ b/src/org/stathissideris/ascii2image/core/readme.md @@ -0,0 +1,15 @@ +> [!WARNING] +> **Disclaimer**: +> This file was not part of the original package. +> It was included only on the PlantUML package to provide source citation and documentation. + +# Directory Documentation for `core` + +## Description +Internal copy of `ditaa` _(code of Stathis Sideris)_. + +## Credit +- :octocat: [stathissideris/ditaa](https://github.com/stathissideris/ditaa) + +## See more information on +- [readme of `plantuml/ditaa`](../../../../net/sourceforge/plantuml/ditaa/readme.md) diff --git a/src/smetana/core/package-info.java b/src/smetana/core/package-info.java index 05aa05a4f..0d7268531 100644 --- a/src/smetana/core/package-info.java +++ b/src/smetana/core/package-info.java @@ -5,9 +5,9 @@ * in plantuml. * * @see h - * @see gen + * @see "gen" * @see gen.annotation - * @see gen.lib + * @see "gen.lib" * @see gen.plugin.dot_layout * @see net.sourceforge.plantuml.sdot * From f91a19413baec5a3bf718a4fd7410ade13e0e13d Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Thu, 16 Nov 2023 18:01:11 +0100 Subject: [PATCH 03/95] feat: add osa2 icon library --- stdlib/home.repx | 3 ++- stdlib/osa2-abx.repx | Bin 0 -> 4246 bytes stdlib/osa2-dex.repx | Bin 0 -> 27554 bytes 3 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 stdlib/osa2-abx.repx create mode 100644 stdlib/osa2-dex.repx diff --git a/stdlib/home.repx b/stdlib/home.repx index 94f621da5..5a3cd00a5 100644 --- a/stdlib/home.repx +++ b/stdlib/home.repx @@ -14,4 +14,5 @@ logos material office osa -tupadr3 +osa2 +tupadr3 \ No newline at end of file diff --git a/stdlib/osa2-abx.repx b/stdlib/osa2-abx.repx new file mode 100644 index 0000000000000000000000000000000000000000..03f27ade4d33bebd2528399425acbd5ca1de8b63 GIT binary patch literal 4246 zcmZvfXE+-S7ltD!uT5<=I#8Qftr00zR5e}=YR0D2rdDFK2-Q~YRiSFtD6Lgg)Lv4dUL`fdaOR62(3j7`6B zn_+-q7#okxIXt{-B78w(@eicH$41lO5;&}gF1OlK<)eV)OMHKEHP zePfkbuRG&*WtIs2mBQW|Y?zHoc)kOhH(0rx5#?jt*kg^GZlfed3@WJL3&;MNdAugb zzfbfD+wy^ZI=k!3)8^M#4ZZoC2sO5$-$CXQOG1BheCN*M{#v?v*D~wIgNJ;o!=eDvEE1wR_#aqq`z{_Op{yh`55W9Gpylr%gCeU$SjjGUFhACR&hjc`+XFb&r zEoG8Z?ppb_H}H*#W?}rox0oK!$7G+}j^rNh)cU1yrM|D(h^bLJeNH$2(rdf$MUb@D zYC*!K3+@a$@}iKxs-rHh6q13e36Pd&1QbODkYBrc=Wn-$QYN)GBfKH(fea57Jt^2W zGvz42D;vC~8y~)KY8S$_EAbquQ~+exIs`yWi*GPL2Ul8&6p7icLZ)@H>}1WUYBfM`X?bJ!CJ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7=Ne{(I+XL-zIWGt1GSWv z){;QW6>cOA9ABYbpQnp_Lii3sbgp?UmGLu$U1_TH03@HjM?^op_T1rP&kqx8t(S;y zpNhdbUr{}yFrkcjyM>qf)hQA3;O2pB+HKu1?s>q2H$8CRa3H^m_9Wf)e%sT?8YpQ! zXg6);I;Ax`)~xMkYHVg6y$E+a6={GDnw^Y|8SkcxiF&q3#OlJdOSeHd$>u&kcjIi=S*gm!$ejjq$PBL{-QC)lDZ%D z_GaG7?zpese4(E?rXsNTa)12c2>21^nbyN#hg;pH4o&<9J;XgupA(&Pn4zu;LLijh z6-SxrzRexza}ch%DW#t8p_&_e?e>$_tHQ(c;i_gqn{E9MamV2|fp1ah^DaG5bx+CN zbBTsRJI|pr=a`13<*}tCrGI2}grzIUMR7YFM)mRo4gV{}rwyQ6E(qP&Q@0>PoZiRD zsT^PXqI2rDAQ(9o5g-yjI4uNG#U!;M5M3kIzbJ=8j7Jqh_YI)V>d^C28pv@!HYlEU S8knb?N=$FiftGZf0R981FIFP} literal 0 HcmV?d00001 diff --git a/stdlib/osa2-dex.repx b/stdlib/osa2-dex.repx new file mode 100644 index 0000000000000000000000000000000000000000..096fffbe1ccbe15b029a2be2f9bafa931ebf0c02 GIT binary patch literal 27554 zcmV(jK=!{||4&lEHU`?O+Yq3qwdG2E?T8}SH~=8>g$VHf-jkpzOUQqOw4#_mD_b6{+4!B2Wd=bLt>KYHqhgg6_S2k?PmXZSD6s|9e08xBd9+ z?q_N~FhlBG0vM7G)dE=2F1drzJ-ZWkhdR4cqHK2;V(IupAM0QAzv=#wshX5qQBF~m zohu2FW2HdLDF~!fBH)yWU5Kh2xU&cPKjU`hs4C%h_8cN_caOCQ+^PL27S)HM`~Tlk ztpF<6Jtuq=DY-ox3Lizv?w+@g1%RZiO=JN@$=)Qff~?7AC`#QMl}eh)j-+=_P6}^t zlhvC~@tzLnJ)L*{d!7FObe|&u0{h;`P7|p($@9g@Yh@~gzy+t+2B#QOY~p+Ekldbk z&OTe(=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@E`7D3=EKgyz}aq~u5bDj$gb&;lklp$9Bpcl6FI zpuGq4YKRQASQ}XG&4-fpK$vN^aTHs832PyOf^0`-yWC!!V-GuDO4di{9n3ZB{(Ln= z$Xoa`c?b=gCY`|CemQ!Mu^Pgtcv(l^afwY@1gX(}Hxtyac>_U61oca~dky-iCpir+ zP24X zN1cL#Pze}oL(@C4voQ+6VV!d!O124sU3fb2No}awU6f^S7%hfk^D%3ZQ4b0sqU)e8 zu0EZI$=_LFjy>N>yH-(yQ5l@Y%qJzwTqw`JVIx8*{(=bm$_iX<)Wydq>v^d(;qp9P z>hVH|S}3mU9+MU*)S<$Ya*V2q*ewC>kr!REUe1v*L{$;MPJ#!Vte1y)Wr$$#UOR@n JH)y=r$N-~nW#j+= literal 0 HcmV?d00001 From 546174d17faa966901bf67f32d31c1a2320944cc Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Thu, 16 Nov 2023 18:23:58 +0100 Subject: [PATCH 04/95] fix: better support for package with ELK layout https://forum.plantuml.net/13709/eclipse-layout-kernel?show=18389#a18389 --- gradle.properties | 2 +- .../plantuml/elk/CucaDiagramFileMakerElk.java | 30 ++-- .../plantuml/stats/FormatCounter.java | 5 +- .../plantuml/svek/GeneralImageBuilder.java | 2 +- .../plantuml/syntax/SyntaxChecker.java | 150 ++++++++++++++++++ .../sourceforge/plantuml/version/Version.java | 2 +- 6 files changed, 171 insertions(+), 20 deletions(-) create mode 100644 src/net/sourceforge/plantuml/syntax/SyntaxChecker.java diff --git a/gradle.properties b/gradle.properties index 39994fd2b..b1f62183a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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.13beta1 +version = 1.2023.13beta2 org.gradle.workers.max = 3 \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/elk/CucaDiagramFileMakerElk.java b/src/net/sourceforge/plantuml/elk/CucaDiagramFileMakerElk.java index 0f94cb8fe..015879156 100644 --- a/src/net/sourceforge/plantuml/elk/CucaDiagramFileMakerElk.java +++ b/src/net/sourceforge/plantuml/elk/CucaDiagramFileMakerElk.java @@ -127,6 +127,7 @@ import net.sourceforge.plantuml.style.StyleSignatureBasic; import net.sourceforge.plantuml.svek.Bibliotekon; import net.sourceforge.plantuml.svek.Cluster; import net.sourceforge.plantuml.svek.ClusterDecoration; +import net.sourceforge.plantuml.svek.ClusterHeader; import net.sourceforge.plantuml.svek.CucaDiagramFileMaker; import net.sourceforge.plantuml.svek.DotStringFactory; import net.sourceforge.plantuml.svek.GeneralImageBuilder; @@ -298,12 +299,12 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker { // final double roundCorner = group.getUSymbol() == null ? 0 // : group.getUSymbol().getSkinParameter().getRoundCorner(skinParam, group.getStereotype()); - final TextBlock ztitle = getTitleBlock(group); - final TextBlock zstereo = TextBlockUtils.empty(0, 0); - final RectangleArea rectangleArea = new RectangleArea(0, 0, elkNode.getWidth(), elkNode.getHeight()); - final ClusterDecoration decoration = new ClusterDecoration(packageStyle, group.getUSymbol(), ztitle, - zstereo, rectangleArea, stroke); + final ClusterHeader clusterHeader = new ClusterHeader(group, diagram.getSkinParam(), diagram, + stringBounder); + + final ClusterDecoration decoration = new ClusterDecoration(packageStyle, group.getUSymbol(), + clusterHeader.getTitle(), clusterHeader.getStereo(), rectangleArea, stroke); final HColor borderColor = HColors.BLACK; decoration.drawU(ug.apply(UTranslate.point(corner)), backColor, borderColor, shadowing, roundCorner, @@ -314,16 +315,6 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker { // ug.apply(HColorUtils.BLACK).apply(UStroke.withThickness(1.5)).apply(new UTranslate(corner)).draw(rect); } - private TextBlock getTitleBlock(Entity g) { - final Display label = g.getDisplay(); - if (label == null) - return TextBlockUtils.empty(0, 0); - - final ISkinParam skinParam = diagram.getSkinParam(); - final FontConfiguration fontConfiguration = g.getFontConfigurationForTitle(skinParam); - return label.create(fontConfiguration, HorizontalAlignment.CENTER, skinParam); - } - private HColor getBackColor(UmlDiagramType umlDiagramType) { return null; } @@ -429,7 +420,14 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker { // We create the "cluster" in ELK for this group final ElkNode elkCluster = ElkGraphUtil.createNode(cluster); elkCluster.setProperty(CoreOptions.DIRECTION, Direction.DOWN); - elkCluster.setProperty(CoreOptions.PADDING, new ElkPadding(40, 15, 15, 15)); + + final ClusterHeader clusterHeader = new ClusterHeader(g, diagram.getSkinParam(), diagram, + stringBounder); + + final int titleAndAttributeHeight = clusterHeader.getTitleAndAttributeHeight(); + + final double topPadding = Math.max(25, titleAndAttributeHeight) + 15; + elkCluster.setProperty(CoreOptions.PADDING, new ElkPadding(topPadding, 15, 15, 15)); // Not sure this is usefull to put a label on a "cluster" final ElkLabel label = ElkGraphUtil.createLabel(elkCluster); diff --git a/src/net/sourceforge/plantuml/stats/FormatCounter.java b/src/net/sourceforge/plantuml/stats/FormatCounter.java index 0f376d811..fe621aed7 100644 --- a/src/net/sourceforge/plantuml/stats/FormatCounter.java +++ b/src/net/sourceforge/plantuml/stats/FormatCounter.java @@ -97,7 +97,10 @@ public class FormatCounter { final String name = removeDotSaved(key); final NumberAnalyzed value = NumberAnalyzed.load(name, prefs); if (value != null) { - final FileFormat format = FileFormat.valueOf(name.substring(prefix.length())); + final String subname = name.substring(prefix.length()); + if (subname.equals("ANIMATED_GIF")) + continue; + final FileFormat format = FileFormat.valueOf(subname); data.put(format, value); } } catch (Exception e) { diff --git a/src/net/sourceforge/plantuml/svek/GeneralImageBuilder.java b/src/net/sourceforge/plantuml/svek/GeneralImageBuilder.java index 2b76371b5..dc08ee433 100644 --- a/src/net/sourceforge/plantuml/svek/GeneralImageBuilder.java +++ b/src/net/sourceforge/plantuml/svek/GeneralImageBuilder.java @@ -617,7 +617,7 @@ public final class GeneralImageBuilder { if (g.getGroupType() == GroupType.CONCURRENT_STATE) return; - final ClusterHeader clusterHeader = new ClusterHeader((Entity) g, dotData.getSkinParam(), dotData, + final ClusterHeader clusterHeader = new ClusterHeader(g, dotData.getSkinParam(), dotData, stringBounder); dotStringFactory.openCluster(g, clusterHeader); this.printEntities(dotStringFactory, g.leafs()); diff --git a/src/net/sourceforge/plantuml/syntax/SyntaxChecker.java b/src/net/sourceforge/plantuml/syntax/SyntaxChecker.java new file mode 100644 index 000000000..399a3b3b3 --- /dev/null +++ b/src/net/sourceforge/plantuml/syntax/SyntaxChecker.java @@ -0,0 +1,150 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.syntax; + +import java.util.Collections; +import java.util.List; + +import net.sourceforge.plantuml.BlockUml; +import net.sourceforge.plantuml.ErrorUml; +import net.sourceforge.plantuml.OptionFlags; +import net.sourceforge.plantuml.SourceStringReader; +import net.sourceforge.plantuml.UmlDiagram; +import net.sourceforge.plantuml.core.Diagram; +import net.sourceforge.plantuml.error.PSystemError; +import net.sourceforge.plantuml.preproc.Defines; +import net.sourceforge.plantuml.text.BackSlash; +import net.sourceforge.plantuml.utils.LineLocation; +import net.sourceforge.plantuml.utils.LineLocationImpl; + +public class SyntaxChecker { + // ::remove folder when __HAXE__ + // ::remove file when __CORE__ + + public static SyntaxResult checkSyntax(List source) { + final StringBuilder sb = new StringBuilder(); + for (String s : source) { + sb.append(s); + sb.append(BackSlash.NEWLINE); + } + return checkSyntax(sb.toString()); + } + + public static SyntaxResult checkSyntax(String source) { + OptionFlags.getInstance().setQuiet(true); + final SyntaxResult result = new SyntaxResult(); + + if (source.startsWith("@startuml\n") == false) { + result.setError(true); + result.setLineLocation(new LineLocationImpl("", null).oneLineRead()); + result.addErrorText("No @startuml/@enduml found"); + return result; + } + if (source.endsWith("@enduml\n") == false && source.endsWith("@enduml") == false) { + result.setError(true); + result.setLineLocation(lastLineNumber(source)); + result.addErrorText("No @enduml found"); + return result; + } + final SourceStringReader sourceStringReader = new SourceStringReader(Defines.createEmpty(), source, + Collections.emptyList()); + + final List blocks = sourceStringReader.getBlocks(); + if (blocks.size() == 0) { + result.setError(true); + result.setLineLocation(lastLineNumber(source)); + result.addErrorText("No @enduml found"); + return result; + } + final Diagram system = blocks.get(0).getDiagram(); + result.setCmapData(system.hasUrl()); + if (system instanceof UmlDiagram) { + result.setUmlDiagramType(((UmlDiagram) system).getUmlDiagramType()); + result.setDescription(system.getDescription().getDescription()); + } else if (system instanceof PSystemError) { + result.setError(true); + final PSystemError sys = (PSystemError) system; + result.setLineLocation(sys.getLineLocation()); + result.setSystemError(sys); + for (ErrorUml er : sys.getErrorsUml()) + result.addErrorText(er.getError()); + } else { + result.setDescription(system.getDescription().getDescription()); + } + return result; + } + + public static SyntaxResult checkSyntaxFair(String source) { + final SyntaxResult result = new SyntaxResult(); + final SourceStringReader sourceStringReader = new SourceStringReader(Defines.createEmpty(), source, + Collections.emptyList()); + + final List blocks = sourceStringReader.getBlocks(); + if (blocks.size() == 0) { + result.setError(true); + result.setLineLocation(lastLineNumber(source)); + result.addErrorText("No @enduml found"); + return result; + } + + final Diagram system = blocks.get(0).getDiagram(); + result.setCmapData(system.hasUrl()); + if (system instanceof UmlDiagram) { + result.setUmlDiagramType(((UmlDiagram) system).getUmlDiagramType()); + result.setDescription(system.getDescription().getDescription()); + } else if (system instanceof PSystemError) { + result.setError(true); + final PSystemError sys = (PSystemError) system; + result.setLineLocation(sys.getLineLocation()); + for (ErrorUml er : sys.getErrorsUml()) { + result.addErrorText(er.getError()); + } + result.setSystemError(sys); + } else { + result.setDescription(system.getDescription().getDescription()); + } + return result; + } + + private static LineLocation lastLineNumber(String source) { + LineLocationImpl result = new LineLocationImpl("", null).oneLineRead(); + for (int i = 0; i < source.length(); i++) + if (source.charAt(i) == '\n') + result = result.oneLineRead(); + + return result; + } +} diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index f4b8d4cd1..a8d2af927 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -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.13beta1"; + private static final String version = "1.2023.13beta2"; public static String versionString() { return version; From 78a32d2743247d8990944ccb9141fcadbe4ab107 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Fri, 17 Nov 2023 10:31:18 +0000 Subject: [PATCH 05/95] docs: add `package-info.java` and `readme.md` --- src/ext/plantuml/com/ctreber/readme.md | 12 ++++++++++++ .../sourceforge/plantuml/ditaa/package-info.java | 2 ++ .../plantuml/flowdiagram/package-info.java | 7 +++++++ .../sourceforge/plantuml/flowdiagram/readme.md | 11 +++++++++++ .../plantuml/klimt/color/package-info.java | 12 ++++++++++++ .../sourceforge/plantuml/klimt/color/readme.md | 16 ++++++++++++++++ .../plantuml/klimt/creole/package-info.java | 7 +++++++ .../sourceforge/plantuml/klimt/creole/readme.md | 10 ++++++++++ src/org/stathissideris/ascii2image/readme.md | 15 +++++++++++++++ 9 files changed, 92 insertions(+) create mode 100644 src/ext/plantuml/com/ctreber/readme.md create mode 100644 src/net/sourceforge/plantuml/flowdiagram/package-info.java create mode 100644 src/net/sourceforge/plantuml/flowdiagram/readme.md create mode 100644 src/net/sourceforge/plantuml/klimt/color/package-info.java create mode 100644 src/net/sourceforge/plantuml/klimt/color/readme.md create mode 100644 src/net/sourceforge/plantuml/klimt/creole/package-info.java create mode 100644 src/net/sourceforge/plantuml/klimt/creole/readme.md create mode 100644 src/org/stathissideris/ascii2image/readme.md diff --git a/src/ext/plantuml/com/ctreber/readme.md b/src/ext/plantuml/com/ctreber/readme.md new file mode 100644 index 000000000..4438e1e93 --- /dev/null +++ b/src/ext/plantuml/com/ctreber/readme.md @@ -0,0 +1,12 @@ +> [!WARNING] +> **Disclaimer**: +> This file was not part of the original package. +> It was included only on the PlantUML package to provide source citation and documentation. + +# Directory Documentation for `ctreber` + +## Description +Internal copy of `AC.earth` - `XEarth` for Java _(code of Christian Treber)_. + +## See more information on +- [readme of `plantuml/acearth`](../../../../net/sourceforge/plantuml/acearth/readme.md) diff --git a/src/net/sourceforge/plantuml/ditaa/package-info.java b/src/net/sourceforge/plantuml/ditaa/package-info.java index c2cbdbd4c..f0a3a50f5 100644 --- a/src/net/sourceforge/plantuml/ditaa/package-info.java +++ b/src/net/sourceforge/plantuml/ditaa/package-info.java @@ -3,7 +3,9 @@ * * Ditaa Diagram. * + * @see org.stathissideris.ascii2image.core * @see org.stathissideris.ascii2image.graphics + * @see org.stathissideris.ascii2image.text * */ package net.sourceforge.plantuml.ditaa; diff --git a/src/net/sourceforge/plantuml/flowdiagram/package-info.java b/src/net/sourceforge/plantuml/flowdiagram/package-info.java new file mode 100644 index 000000000..c146b9255 --- /dev/null +++ b/src/net/sourceforge/plantuml/flowdiagram/package-info.java @@ -0,0 +1,7 @@ +/** + * Provides classes used to manage + * + * Flow Diagram. + * + */ +package net.sourceforge.plantuml.flowdiagram; diff --git a/src/net/sourceforge/plantuml/flowdiagram/readme.md b/src/net/sourceforge/plantuml/flowdiagram/readme.md new file mode 100644 index 000000000..720bea988 --- /dev/null +++ b/src/net/sourceforge/plantuml/flowdiagram/readme.md @@ -0,0 +1,11 @@ +# Directory Documentation for `flowdiagram` + +## Description +This package provides classes used to manage [PlantUML Flow Diagram](http://alphadoc.plantuml.com/doc/markdown/en/flow-diagram). + +## Link +- [Flow Diagram _(on Alpha-doc)_](http://alphadoc.plantuml.com/doc/markdown/en/flow-diagram) + +## Reference +- [GH-501](https://github.com/plantuml/plantuml/issues/501#issuecomment-805783661) +- [QA-13557](https://forum.plantuml.net/13557/support-for-the-different-%40start-commands) diff --git a/src/net/sourceforge/plantuml/klimt/color/package-info.java b/src/net/sourceforge/plantuml/klimt/color/package-info.java new file mode 100644 index 000000000..1568496a9 --- /dev/null +++ b/src/net/sourceforge/plantuml/klimt/color/package-info.java @@ -0,0 +1,12 @@ +/** + * Provides classes used to manage + * + * Color. + * + * @see net.sourceforge.plantuml.help.CommandHelpColor + * @see net.sourceforge.plantuml.eggs.PSystemColorsFactory + * @see net.sourceforge.plantuml.klimt.creole.command.CommandCreoleColorAndSizeChange + * @see net.sourceforge.plantuml.klimt.creole.command.CommandCreoleColorChange + * + */ +package net.sourceforge.plantuml.klimt.color; diff --git a/src/net/sourceforge/plantuml/klimt/color/readme.md b/src/net/sourceforge/plantuml/klimt/color/readme.md new file mode 100644 index 000000000..6d7808afb --- /dev/null +++ b/src/net/sourceforge/plantuml/klimt/color/readme.md @@ -0,0 +1,16 @@ +# Directory Documentation for `color` + +## Description +This package provides classes used to manage [PlantUML Color](https://plantuml.com/color). + +## Link +- [PlantUML Color](https://plantuml.com/color) + +## Reference + +## Credit or Inspiration +- [HSLuv, a developer friendly perceptual color space](https://www.kuon.ch/post/2020-03-08-hsluv/) by _Nicolas Goy_. +- [HSLuv color space](https://www.hsluv.org) by [_Alexei Boronine_](https://www.boronine.com) +- :octocat: [hsluv/hsluv-java](https://github.com/hsluv/hsluv-java) +- [Calculating Color Contrast](https://24ways.org/2010/calculating-color-contrast) by _Brian Suda_. +- [`HSLColor.java` _(on Web Archive)_](https://web.archive.org/web/20220328231936/http://www.camick.com/java/source/HSLColor.java) diff --git a/src/net/sourceforge/plantuml/klimt/creole/package-info.java b/src/net/sourceforge/plantuml/klimt/creole/package-info.java new file mode 100644 index 000000000..99f501c28 --- /dev/null +++ b/src/net/sourceforge/plantuml/klimt/creole/package-info.java @@ -0,0 +1,7 @@ +/** + * Provides classes used to manage + * + * Creole (markup language). + * + */ +package net.sourceforge.plantuml.klimt.creole; diff --git a/src/net/sourceforge/plantuml/klimt/creole/readme.md b/src/net/sourceforge/plantuml/klimt/creole/readme.md new file mode 100644 index 000000000..d1dd36370 --- /dev/null +++ b/src/net/sourceforge/plantuml/klimt/creole/readme.md @@ -0,0 +1,10 @@ +# Directory Documentation for `creole` + +## Description +This package provides classes used to manage [PlantUML Creole](https://plantuml.com/creole) markup language. + +## Link +- [PlantUML Creole](https://plantuml.com/creole) + +## Reference +- [Creole (markup) _(on Wikipedia)_](https://en.wikipedia.org/wiki/Creole_(markup)) diff --git a/src/org/stathissideris/ascii2image/readme.md b/src/org/stathissideris/ascii2image/readme.md new file mode 100644 index 000000000..2428d1f19 --- /dev/null +++ b/src/org/stathissideris/ascii2image/readme.md @@ -0,0 +1,15 @@ +> [!WARNING] +> **Disclaimer**: +> This file was not part of the original package. +> It was included only on the PlantUML package to provide source citation and documentation. + +# Directory Documentation for `ascii2image` + +## Description +Internal copy of `ditaa` _(code of Stathis Sideris)_. + +## Credit +- :octocat: [stathissideris/ditaa](https://github.com/stathissideris/ditaa) + +## See more information on +- [readme of `plantuml/ditaa`](../../../net/sourceforge/plantuml/ditaa/readme.md) From f35856e6b9d5ad5a08b2a87424a22b3169017362 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Sun, 19 Nov 2023 11:15:28 +0100 Subject: [PATCH 06/95] chore: better End Of Line management --- .gitattributes | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..7d6f27a14 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.java text=auto From d61ebc40a08c0aafaa7e46397b39afbf2fb3457d Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Sun, 19 Nov 2023 11:22:11 +0100 Subject: [PATCH 07/95] refactor: rename ext packages to zext to improve javadoc display --- .../plantuml/acearth/PSystemXearth.java | 6 +- .../acearth/PSystemXearthFactory.java | 2 +- .../command/CommandActivity3.java | 4 +- .../flashcode/FlashCodeUtilsZxing.java | 12 ++-- .../plantuml/skin/ActorAwesome.java | 16 +++--- .../plantuml/skin/ActorHollow.java | 18 +++--- .../plantuml/skin/ActorStickMan.java | 18 +++--- .../plantuml/com/ctreber/acearth/ACearth.java | 56 +++++++++---------- .../com/ctreber/acearth/Configuration.java | 14 ++--- .../ctreber/acearth/ConfigurationACearth.java | 16 +++--- .../plantuml/com/ctreber/acearth/MapData.java | 2 +- .../com/ctreber/acearth/MapDataReader.java | 6 +- .../ctreber/acearth/gui/CanvasACearth.java | 4 +- .../com/ctreber/acearth/gui/PixelCanvas.java | 4 +- .../com/ctreber/acearth/package-info.java | 2 +- .../com/ctreber/acearth/plugins/Plugin.java | 8 +-- .../acearth/plugins/markers/Marker.java | 16 +++--- .../plugins/markers/PluginMarkers.java | 4 +- .../acearth/projection/Projection.java | 10 ++-- .../acearth/projection/ProjectionCyl.java | 6 +- .../acearth/projection/ProjectionMerc.java | 6 +- .../acearth/projection/ProjectionOrtho.java | 6 +- .../acearth/renderer/RenderTarget.java | 2 +- .../ctreber/acearth/renderer/Renderer.java | 4 +- .../acearth/renderer/RowTypeRenderer.java | 2 +- .../renderer/RowTypeRendererScanBit.java | 6 +- .../renderer/RowTypeRendererScanDot.java | 6 +- .../acearth/scanbit/BitGeneratorMap.java | 16 +++--- .../scanbit/BitGeneratorMapDefault.java | 10 ++-- .../acearth/scanbit/BitGeneratorMapOrtho.java | 10 ++-- .../com/ctreber/acearth/scanbit/ScanBit.java | 2 +- .../acearth/scanbit/ScanBitGenerator.java | 2 +- .../com/ctreber/acearth/scanbit/ScanBuf.java | 6 +- .../acearth/scandot/DotGeneratorLines.java | 10 ++-- .../acearth/scandot/DotGeneratorStars.java | 2 +- .../com/ctreber/acearth/scandot/ScanDot.java | 4 +- .../acearth/scandot/ScanDotGenerator.java | 2 +- .../com/ctreber/acearth/shader/Shader.java | 10 ++-- .../ctreber/acearth/shader/ShaderDefault.java | 2 +- .../ctreber/acearth/shader/ShaderFlat.java | 2 +- .../ctreber/acearth/shader/ShaderOrtho.java | 2 +- .../com/ctreber/acearth/util/Coordinate.java | 2 +- .../ctreber/acearth/util/EdgeCrossing.java | 2 +- .../com/ctreber/acearth/util/Point2D.java | 2 +- .../com/ctreber/acearth/util/Point3D.java | 2 +- .../com/ctreber/acearth/util/Polygon.java | 2 +- .../ctreber/acearth/util/StringParser.java | 2 +- .../acearth/util/SunPositionCalculator.java | 2 +- .../com/ctreber/acearth/util/Toolkit.java | 2 +- .../com/ctreber/aclib/gui/MOBoolean.java | 2 +- .../ctreber/aclib/gui/MOChangeListener.java | 2 +- .../com/ctreber/aclib/gui/MODouble.java | 2 +- .../com/ctreber/aclib/gui/MOEnum.java | 2 +- .../com/ctreber/aclib/gui/MOInteger.java | 2 +- .../com/ctreber/aclib/gui/MOString.java | 2 +- .../ctreber/aclib/gui/MonitoredObject.java | 2 +- .../com/ctreber/aclib/sort/CTSort.java | 2 +- .../ctreber/aclib/sort/DefaultComparator.java | 2 +- .../com/ctreber/aclib/sort/QuickSort.java | 2 +- .../com/google/zxing/BarcodeFormat.java | 2 +- .../com/google/zxing/ChecksumException.java | 2 +- .../com/google/zxing/DecodeHintType.java | 2 +- .../com/google/zxing/EncodeHintType.java | 2 +- .../com/google/zxing/FormatException.java | 2 +- .../com/google/zxing/NotFoundException.java | 2 +- .../com/google/zxing/ReaderException.java | 2 +- .../com/google/zxing/ResultPoint.java | 2 +- .../plantuml/com/google/zxing/Writer.java | 4 +- .../com/google/zxing/WriterException.java | 2 +- .../client/j2se/MatrixToImageWriter.java | 4 +- .../com/google/zxing/common/BitArray.java | 2 +- .../com/google/zxing/common/BitMatrix.java | 2 +- .../com/google/zxing/common/BitSource.java | 2 +- .../google/zxing/common/CharacterSetECI.java | 2 +- .../google/zxing/common/DecoderResult.java | 4 +- .../google/zxing/common/DetectorResult.java | 4 +- .../plantuml/com/google/zxing/common/ECI.java | 2 +- .../com/google/zxing/common/StringUtils.java | 4 +- .../zxing/common/reedsolomon/GF256.java | 2 +- .../zxing/common/reedsolomon/GF256Poly.java | 2 +- .../reedsolomon/ReedSolomonEncoder.java | 2 +- .../reedsolomon/ReedSolomonException.java | 2 +- .../datamatrix/decoder/BitMatrixParser.java | 6 +- .../zxing/datamatrix/decoder/DataBlock.java | 2 +- .../zxing/datamatrix/decoder/Version.java | 4 +- .../com/google/zxing/package-info.java | 2 +- .../com/google/zxing/qrcode/QRCodeWriter.java | 20 +++---- .../zxing/qrcode/decoder/BitMatrixParser.java | 6 +- .../zxing/qrcode/decoder/DataBlock.java | 2 +- .../google/zxing/qrcode/decoder/DataMask.java | 4 +- .../qrcode/decoder/ErrorCorrectionLevel.java | 2 +- .../qrcode/decoder/FormatInformation.java | 2 +- .../com/google/zxing/qrcode/decoder/Mode.java | 2 +- .../google/zxing/qrcode/decoder/Version.java | 6 +- .../zxing/qrcode/encoder/BlockPair.java | 2 +- .../zxing/qrcode/encoder/ByteMatrix.java | 2 +- .../google/zxing/qrcode/encoder/Encoder.java | 22 ++++---- .../google/zxing/qrcode/encoder/MaskUtil.java | 2 +- .../zxing/qrcode/encoder/MatrixUtil.java | 8 +-- .../google/zxing/qrcode/encoder/QRCode.java | 6 +- 100 files changed, 264 insertions(+), 264 deletions(-) rename src/{ext => zext}/plantuml/com/ctreber/acearth/ACearth.java (85%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/Configuration.java (85%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/ConfigurationACearth.java (92%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/MapData.java (99%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/MapDataReader.java (95%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/gui/CanvasACearth.java (80%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/gui/PixelCanvas.java (92%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/package-info.java (90%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/plugins/Plugin.java (78%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/plugins/markers/Marker.java (90%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/plugins/markers/PluginMarkers.java (92%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/projection/Projection.java (96%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/projection/ProjectionCyl.java (90%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/projection/ProjectionMerc.java (90%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/projection/ProjectionOrtho.java (88%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/renderer/RenderTarget.java (88%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/renderer/Renderer.java (95%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/renderer/RowTypeRenderer.java (92%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/renderer/RowTypeRendererScanBit.java (92%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/renderer/RowTypeRendererScanDot.java (89%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMap.java (88%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMapDefault.java (95%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMapOrtho.java (94%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/scanbit/ScanBit.java (95%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/scanbit/ScanBitGenerator.java (92%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/scanbit/ScanBuf.java (96%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/scandot/DotGeneratorLines.java (86%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/scandot/DotGeneratorStars.java (96%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/scandot/ScanDot.java (90%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/scandot/ScanDotGenerator.java (89%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/shader/Shader.java (92%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/shader/ShaderDefault.java (97%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/shader/ShaderFlat.java (91%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/shader/ShaderOrtho.java (96%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/util/Coordinate.java (98%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/util/EdgeCrossing.java (95%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/util/Point2D.java (90%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/util/Point3D.java (93%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/util/Polygon.java (93%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/util/StringParser.java (98%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/util/SunPositionCalculator.java (99%) rename src/{ext => zext}/plantuml/com/ctreber/acearth/util/Toolkit.java (98%) rename src/{ext => zext}/plantuml/com/ctreber/aclib/gui/MOBoolean.java (93%) rename src/{ext => zext}/plantuml/com/ctreber/aclib/gui/MOChangeListener.java (86%) rename src/{ext => zext}/plantuml/com/ctreber/aclib/gui/MODouble.java (96%) rename src/{ext => zext}/plantuml/com/ctreber/aclib/gui/MOEnum.java (96%) rename src/{ext => zext}/plantuml/com/ctreber/aclib/gui/MOInteger.java (96%) rename src/{ext => zext}/plantuml/com/ctreber/aclib/gui/MOString.java (91%) rename src/{ext => zext}/plantuml/com/ctreber/aclib/gui/MonitoredObject.java (95%) rename src/{ext => zext}/plantuml/com/ctreber/aclib/sort/CTSort.java (91%) rename src/{ext => zext}/plantuml/com/ctreber/aclib/sort/DefaultComparator.java (90%) rename src/{ext => zext}/plantuml/com/ctreber/aclib/sort/QuickSort.java (97%) rename src/{ext => zext}/plantuml/com/google/zxing/BarcodeFormat.java (98%) rename src/{ext => zext}/plantuml/com/google/zxing/ChecksumException.java (96%) rename src/{ext => zext}/plantuml/com/google/zxing/DecodeHintType.java (98%) rename src/{ext => zext}/plantuml/com/google/zxing/EncodeHintType.java (96%) rename src/{ext => zext}/plantuml/com/google/zxing/FormatException.java (96%) rename src/{ext => zext}/plantuml/com/google/zxing/NotFoundException.java (96%) rename src/{ext => zext}/plantuml/com/google/zxing/ReaderException.java (98%) rename src/{ext => zext}/plantuml/com/google/zxing/ResultPoint.java (98%) rename src/{ext => zext}/plantuml/com/google/zxing/Writer.java (94%) mode change 100755 => 100644 rename src/{ext => zext}/plantuml/com/google/zxing/WriterException.java (95%) rename src/{ext => zext}/plantuml/com/google/zxing/client/j2se/MatrixToImageWriter.java (95%) rename src/{ext => zext}/plantuml/com/google/zxing/common/BitArray.java (99%) rename src/{ext => zext}/plantuml/com/google/zxing/common/BitMatrix.java (99%) rename src/{ext => zext}/plantuml/com/google/zxing/common/BitSource.java (98%) rename src/{ext => zext}/plantuml/com/google/zxing/common/CharacterSetECI.java (98%) rename src/{ext => zext}/plantuml/com/google/zxing/common/DecoderResult.java (92%) rename src/{ext => zext}/plantuml/com/google/zxing/common/DetectorResult.java (92%) rename src/{ext => zext}/plantuml/com/google/zxing/common/ECI.java (96%) rename src/{ext => zext}/plantuml/com/google/zxing/common/StringUtils.java (98%) rename src/{ext => zext}/plantuml/com/google/zxing/common/reedsolomon/GF256.java (98%) rename src/{ext => zext}/plantuml/com/google/zxing/common/reedsolomon/GF256Poly.java (99%) rename src/{ext => zext}/plantuml/com/google/zxing/common/reedsolomon/ReedSolomonEncoder.java (97%) rename src/{ext => zext}/plantuml/com/google/zxing/common/reedsolomon/ReedSolomonException.java (93%) rename src/{ext => zext}/plantuml/com/google/zxing/datamatrix/decoder/BitMatrixParser.java (98%) rename src/{ext => zext}/plantuml/com/google/zxing/datamatrix/decoder/DataBlock.java (98%) rename src/{ext => zext}/plantuml/com/google/zxing/datamatrix/decoder/Version.java (98%) rename src/{ext => zext}/plantuml/com/google/zxing/package-info.java (90%) rename src/{ext => zext}/plantuml/com/google/zxing/qrcode/QRCodeWriter.java (85%) rename src/{ext => zext}/plantuml/com/google/zxing/qrcode/decoder/BitMatrixParser.java (97%) rename src/{ext => zext}/plantuml/com/google/zxing/qrcode/decoder/DataBlock.java (98%) rename src/{ext => zext}/plantuml/com/google/zxing/qrcode/decoder/DataMask.java (97%) rename src/{ext => zext}/plantuml/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java (97%) rename src/{ext => zext}/plantuml/com/google/zxing/qrcode/decoder/FormatInformation.java (99%) rename src/{ext => zext}/plantuml/com/google/zxing/qrcode/decoder/Mode.java (98%) rename src/{ext => zext}/plantuml/com/google/zxing/qrcode/decoder/Version.java (99%) rename src/{ext => zext}/plantuml/com/google/zxing/qrcode/encoder/BlockPair.java (94%) rename src/{ext => zext}/plantuml/com/google/zxing/qrcode/encoder/ByteMatrix.java (97%) rename src/{ext => zext}/plantuml/com/google/zxing/qrcode/encoder/Encoder.java (96%) rename src/{ext => zext}/plantuml/com/google/zxing/qrcode/encoder/MaskUtil.java (99%) rename src/{ext => zext}/plantuml/com/google/zxing/qrcode/encoder/MatrixUtil.java (98%) rename src/{ext => zext}/plantuml/com/google/zxing/qrcode/encoder/QRCode.java (97%) diff --git a/src/net/sourceforge/plantuml/acearth/PSystemXearth.java b/src/net/sourceforge/plantuml/acearth/PSystemXearth.java index a809b3719..15df082ce 100644 --- a/src/net/sourceforge/plantuml/acearth/PSystemXearth.java +++ b/src/net/sourceforge/plantuml/acearth/PSystemXearth.java @@ -47,9 +47,9 @@ import java.util.Locale; import java.util.Map; import java.util.TimeZone; -import ext.plantuml.com.ctreber.acearth.ACearth; -import ext.plantuml.com.ctreber.acearth.ConfigurationACearth; -import ext.plantuml.com.ctreber.acearth.plugins.markers.Marker; +import zext.plantuml.com.ctreber.acearth.ACearth; +import zext.plantuml.com.ctreber.acearth.ConfigurationACearth; +import zext.plantuml.com.ctreber.acearth.plugins.markers.Marker; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.api.ImageDataSimple; diff --git a/src/net/sourceforge/plantuml/acearth/PSystemXearthFactory.java b/src/net/sourceforge/plantuml/acearth/PSystemXearthFactory.java index aa19bba56..d7a8e9ad9 100644 --- a/src/net/sourceforge/plantuml/acearth/PSystemXearthFactory.java +++ b/src/net/sourceforge/plantuml/acearth/PSystemXearthFactory.java @@ -40,7 +40,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import ext.plantuml.com.ctreber.acearth.plugins.markers.Marker; +import zext.plantuml.com.ctreber.acearth.plugins.markers.Marker; import net.sourceforge.plantuml.command.PSystemBasicFactory; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.log.Logme; diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivity3.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivity3.java index 183d130ed..a78abd2eb 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivity3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivity3.java @@ -61,7 +61,7 @@ public class CommandActivity3 extends SingleLineCommand2 { public static final String endingGroup() { return "(" // - + ";(?:[%s]*(\\<\\<\\w+\\>\\>))?" // + + ";[%s]*(\\<\\<\\w+\\>\\>(?:[%s]*\\<\\<\\w+\\>\\>)*)?" // + "|" // + Matcher.quoteReplacement("\\\\") // that is simply \ character + "|" // @@ -77,7 +77,7 @@ public class CommandActivity3 extends SingleLineCommand2 { private static final String endingGroupShort() { return "(" // - + ";(?:[%s]*(\\<\\<\\w+\\>\\>))?" // + + ";[%s]*(\\<\\<\\w+\\>\\>(?:[%s]*\\<\\<\\w+\\>\\>)*)?" // + "|" // + Matcher.quoteReplacement("\\\\") // that is simply \ character + "|" // diff --git a/src/net/sourceforge/plantuml/flashcode/FlashCodeUtilsZxing.java b/src/net/sourceforge/plantuml/flashcode/FlashCodeUtilsZxing.java index f2058b5d2..902e27b8a 100644 --- a/src/net/sourceforge/plantuml/flashcode/FlashCodeUtilsZxing.java +++ b/src/net/sourceforge/plantuml/flashcode/FlashCodeUtilsZxing.java @@ -41,12 +41,12 @@ import java.util.Hashtable; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; -import ext.plantuml.com.google.zxing.BarcodeFormat; -import ext.plantuml.com.google.zxing.EncodeHintType; -import ext.plantuml.com.google.zxing.client.j2se.MatrixToImageWriter; -import ext.plantuml.com.google.zxing.common.BitMatrix; -import ext.plantuml.com.google.zxing.qrcode.QRCodeWriter; -import ext.plantuml.com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; +import zext.plantuml.com.google.zxing.BarcodeFormat; +import zext.plantuml.com.google.zxing.EncodeHintType; +import zext.plantuml.com.google.zxing.client.j2se.MatrixToImageWriter; +import zext.plantuml.com.google.zxing.common.BitMatrix; +import zext.plantuml.com.google.zxing.qrcode.QRCodeWriter; +import zext.plantuml.com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; import net.sourceforge.plantuml.utils.Log; public class FlashCodeUtilsZxing implements FlashCodeUtils { diff --git a/src/net/sourceforge/plantuml/skin/ActorAwesome.java b/src/net/sourceforge/plantuml/skin/ActorAwesome.java index 50869e283..d2926998c 100644 --- a/src/net/sourceforge/plantuml/skin/ActorAwesome.java +++ b/src/net/sourceforge/plantuml/skin/ActorAwesome.java @@ -55,10 +55,10 @@ public class ActorAwesome extends AbstractTextBlock implements TextBlock { private final double radius = 8; private final double bodyHeight = 28; - private final Fashion symbolContext; + private final Fashion fashion; - public ActorAwesome(Fashion symbolContext) { - this.symbolContext = symbolContext.withStroke(UStroke.withThickness(1.5)); + public ActorAwesome(Fashion fashion) { + this.fashion = fashion; } public void drawU(UGraphic ug) { @@ -81,18 +81,18 @@ public class ActorAwesome extends AbstractTextBlock implements TextBlock { path.cubicTo(-bodyWidth / 2 + shoulder + collar, collar, -collar, collar, 0, collar); path.closePath(); - if (symbolContext.getDeltaShadow() != 0) { - head.setDeltaShadow(symbolContext.getDeltaShadow()); - path.setDeltaShadow(symbolContext.getDeltaShadow()); + if (fashion.getDeltaShadow() != 0) { + head.setDeltaShadow(fashion.getDeltaShadow()); + path.setDeltaShadow(fashion.getDeltaShadow()); } - ug = symbolContext.apply(ug); + ug = fashion.apply(ug); ug.apply(new UTranslate(centerX - head.getWidth() / 2, thickness())).draw(head); ug.apply(new UTranslate(centerX, head.getHeight() + thickness())).draw(path); } private double thickness() { - return symbolContext.getStroke().getThickness(); + return fashion.getStroke().getThickness(); } public double getPreferredWidth() { diff --git a/src/net/sourceforge/plantuml/skin/ActorHollow.java b/src/net/sourceforge/plantuml/skin/ActorHollow.java index 91fc51ffc..0e8e79293 100644 --- a/src/net/sourceforge/plantuml/skin/ActorHollow.java +++ b/src/net/sourceforge/plantuml/skin/ActorHollow.java @@ -57,10 +57,10 @@ public class ActorHollow extends AbstractTextBlock implements TextBlock { private final double bodyThickness = 6; private final double legThickness = 6; - private final Fashion symbolContext; + private final Fashion fashion; - public ActorHollow(Fashion symbolContext) { - this.symbolContext = symbolContext; + public ActorHollow(Fashion fashion) { + this.fashion = fashion; } public void drawU(UGraphic ug) { @@ -87,17 +87,17 @@ public class ActorHollow extends AbstractTextBlock implements TextBlock { path.lineTo(-bodyWidth / 2, 0); path.closePath(); - if (symbolContext.getDeltaShadow() != 0) { - head.setDeltaShadow(symbolContext.getDeltaShadow()); - path.setDeltaShadow(symbolContext.getDeltaShadow()); + if (fashion.getDeltaShadow() != 0) { + head.setDeltaShadow(fashion.getDeltaShadow()); + path.setDeltaShadow(fashion.getDeltaShadow()); } - ug = symbolContext.apply(ug); + ug = fashion.apply(ug); ug.apply(new UTranslate(centerX - head.getWidth() / 2, thickness())).draw(head); ug.apply(new UTranslate(centerX, head.getHeight() + thickness() + neckHeight)).draw(path); } private double thickness() { - return symbolContext.getStroke().getThickness(); + return fashion.getStroke().getThickness(); } public double getPreferredWidth() { @@ -105,7 +105,7 @@ public class ActorHollow extends AbstractTextBlock implements TextBlock { } public double getPreferredHeight() { - return headDiam + neckHeight + bodyHeight + thickness() * 2 + symbolContext.getDeltaShadow(); + return headDiam + neckHeight + bodyHeight + thickness() * 2 + fashion.getDeltaShadow(); } public XDimension2D calculateDimension(StringBounder stringBounder) { diff --git a/src/net/sourceforge/plantuml/skin/ActorStickMan.java b/src/net/sourceforge/plantuml/skin/ActorStickMan.java index b92cb27eb..03e24ffdd 100644 --- a/src/net/sourceforge/plantuml/skin/ActorStickMan.java +++ b/src/net/sourceforge/plantuml/skin/ActorStickMan.java @@ -57,11 +57,11 @@ public class ActorStickMan extends AbstractTextBlock implements TextBlock { private final double legsY = 15; private final double headDiam = 16; - private final Fashion symbolContext; + private final Fashion fashion; private final boolean actorBusiness; - ActorStickMan(Fashion symbolContext, boolean actorBusiness) { - this.symbolContext = symbolContext; + ActorStickMan(Fashion fashion, boolean actorBusiness) { + this.fashion = fashion; this.actorBusiness = actorBusiness; } @@ -81,12 +81,12 @@ public class ActorStickMan extends AbstractTextBlock implements TextBlock { path.lineTo(-legsX, bodyLenght + legsY); path.moveTo(0, bodyLenght); path.lineTo(legsX, bodyLenght + legsY); - if (symbolContext.getDeltaShadow() != 0) { - head.setDeltaShadow(symbolContext.getDeltaShadow()); - path.setDeltaShadow(symbolContext.getDeltaShadow()); + if (fashion.getDeltaShadow() != 0) { + head.setDeltaShadow(fashion.getDeltaShadow()); + path.setDeltaShadow(fashion.getDeltaShadow()); } - ug = symbolContext.apply(ug); + ug = fashion.apply(ug); ug.apply(new UTranslate(startX, thickness())).draw(head); if (actorBusiness) { specialBusiness(ug.apply(new UTranslate(startX + headDiam / 2, thickness() + headDiam / 2))); @@ -109,7 +109,7 @@ public class ActorStickMan extends AbstractTextBlock implements TextBlock { } private double thickness() { - return symbolContext.getStroke().getThickness(); + return fashion.getStroke().getThickness(); } public double getPreferredWidth() { @@ -117,7 +117,7 @@ public class ActorStickMan extends AbstractTextBlock implements TextBlock { } public double getPreferredHeight() { - return headDiam + bodyLenght + legsY + 2 * thickness() + symbolContext.getDeltaShadow() + 1; + return headDiam + bodyLenght + legsY + 2 * thickness() + fashion.getDeltaShadow() + 1; } public XDimension2D calculateDimension(StringBounder stringBounder) { diff --git a/src/ext/plantuml/com/ctreber/acearth/ACearth.java b/src/zext/plantuml/com/ctreber/acearth/ACearth.java similarity index 85% rename from src/ext/plantuml/com/ctreber/acearth/ACearth.java rename to src/zext/plantuml/com/ctreber/acearth/ACearth.java index 7f04fc86d..532fb3fec 100644 --- a/src/ext/plantuml/com/ctreber/acearth/ACearth.java +++ b/src/zext/plantuml/com/ctreber/acearth/ACearth.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.acearth; +package zext.plantuml.com.ctreber.acearth; import java.io.IOException; import java.io.OutputStream; @@ -7,33 +7,33 @@ import java.util.Iterator; import java.util.List; import java.util.Random; -import ext.plantuml.com.ctreber.acearth.gui.CanvasACearth; -import ext.plantuml.com.ctreber.acearth.plugins.Plugin; -import ext.plantuml.com.ctreber.acearth.plugins.markers.Marker; -import ext.plantuml.com.ctreber.acearth.plugins.markers.PluginMarkers; -import ext.plantuml.com.ctreber.acearth.projection.Projection; -import ext.plantuml.com.ctreber.acearth.projection.ProjectionCyl; -import ext.plantuml.com.ctreber.acearth.projection.ProjectionMerc; -import ext.plantuml.com.ctreber.acearth.projection.ProjectionOrtho; -import ext.plantuml.com.ctreber.acearth.renderer.Renderer; -import ext.plantuml.com.ctreber.acearth.renderer.RowTypeRendererScanBit; -import ext.plantuml.com.ctreber.acearth.renderer.RowTypeRendererScanDot; -import ext.plantuml.com.ctreber.acearth.scanbit.BitGeneratorMap; -import ext.plantuml.com.ctreber.acearth.scanbit.BitGeneratorMapDefault; -import ext.plantuml.com.ctreber.acearth.scanbit.BitGeneratorMapOrtho; -import ext.plantuml.com.ctreber.acearth.scandot.DotGeneratorLines; -import ext.plantuml.com.ctreber.acearth.scandot.DotGeneratorStars; -import ext.plantuml.com.ctreber.acearth.scandot.ScanDot; -import ext.plantuml.com.ctreber.acearth.scandot.ScanDotGenerator; -import ext.plantuml.com.ctreber.acearth.shader.Shader; -import ext.plantuml.com.ctreber.acearth.shader.ShaderDefault; -import ext.plantuml.com.ctreber.acearth.shader.ShaderFlat; -import ext.plantuml.com.ctreber.acearth.shader.ShaderOrtho; -import ext.plantuml.com.ctreber.acearth.util.Coordinate; -import ext.plantuml.com.ctreber.acearth.util.SunPositionCalculator; -import ext.plantuml.com.ctreber.acearth.util.Toolkit; -import ext.plantuml.com.ctreber.aclib.sort.CTSort; -import ext.plantuml.com.ctreber.aclib.sort.QuickSort; +import zext.plantuml.com.ctreber.acearth.gui.CanvasACearth; +import zext.plantuml.com.ctreber.acearth.plugins.Plugin; +import zext.plantuml.com.ctreber.acearth.plugins.markers.Marker; +import zext.plantuml.com.ctreber.acearth.plugins.markers.PluginMarkers; +import zext.plantuml.com.ctreber.acearth.projection.Projection; +import zext.plantuml.com.ctreber.acearth.projection.ProjectionCyl; +import zext.plantuml.com.ctreber.acearth.projection.ProjectionMerc; +import zext.plantuml.com.ctreber.acearth.projection.ProjectionOrtho; +import zext.plantuml.com.ctreber.acearth.renderer.Renderer; +import zext.plantuml.com.ctreber.acearth.renderer.RowTypeRendererScanBit; +import zext.plantuml.com.ctreber.acearth.renderer.RowTypeRendererScanDot; +import zext.plantuml.com.ctreber.acearth.scanbit.BitGeneratorMap; +import zext.plantuml.com.ctreber.acearth.scanbit.BitGeneratorMapDefault; +import zext.plantuml.com.ctreber.acearth.scanbit.BitGeneratorMapOrtho; +import zext.plantuml.com.ctreber.acearth.scandot.DotGeneratorLines; +import zext.plantuml.com.ctreber.acearth.scandot.DotGeneratorStars; +import zext.plantuml.com.ctreber.acearth.scandot.ScanDot; +import zext.plantuml.com.ctreber.acearth.scandot.ScanDotGenerator; +import zext.plantuml.com.ctreber.acearth.shader.Shader; +import zext.plantuml.com.ctreber.acearth.shader.ShaderDefault; +import zext.plantuml.com.ctreber.acearth.shader.ShaderFlat; +import zext.plantuml.com.ctreber.acearth.shader.ShaderOrtho; +import zext.plantuml.com.ctreber.acearth.util.Coordinate; +import zext.plantuml.com.ctreber.acearth.util.SunPositionCalculator; +import zext.plantuml.com.ctreber.acearth.util.Toolkit; +import zext.plantuml.com.ctreber.aclib.sort.CTSort; +import zext.plantuml.com.ctreber.aclib.sort.QuickSort; /** *

AC.earth - XEarth for Java

diff --git a/src/ext/plantuml/com/ctreber/acearth/Configuration.java b/src/zext/plantuml/com/ctreber/acearth/Configuration.java similarity index 85% rename from src/ext/plantuml/com/ctreber/acearth/Configuration.java rename to src/zext/plantuml/com/ctreber/acearth/Configuration.java index 7c84ea5ef..01bc6b508 100644 --- a/src/ext/plantuml/com/ctreber/acearth/Configuration.java +++ b/src/zext/plantuml/com/ctreber/acearth/Configuration.java @@ -1,14 +1,14 @@ -package ext.plantuml.com.ctreber.acearth; +package zext.plantuml.com.ctreber.acearth; import java.util.HashMap; import java.util.Map; -import ext.plantuml.com.ctreber.aclib.gui.MOBoolean; -import ext.plantuml.com.ctreber.aclib.gui.MODouble; -import ext.plantuml.com.ctreber.aclib.gui.MOEnum; -import ext.plantuml.com.ctreber.aclib.gui.MOInteger; -import ext.plantuml.com.ctreber.aclib.gui.MOString; -import ext.plantuml.com.ctreber.aclib.gui.MonitoredObject; +import zext.plantuml.com.ctreber.aclib.gui.MOBoolean; +import zext.plantuml.com.ctreber.aclib.gui.MODouble; +import zext.plantuml.com.ctreber.aclib.gui.MOEnum; +import zext.plantuml.com.ctreber.aclib.gui.MOInteger; +import zext.plantuml.com.ctreber.aclib.gui.MOString; +import zext.plantuml.com.ctreber.aclib.gui.MonitoredObject; /** *

diff --git a/src/ext/plantuml/com/ctreber/acearth/ConfigurationACearth.java b/src/zext/plantuml/com/ctreber/acearth/ConfigurationACearth.java similarity index 92% rename from src/ext/plantuml/com/ctreber/acearth/ConfigurationACearth.java rename to src/zext/plantuml/com/ctreber/acearth/ConfigurationACearth.java index ae6529c4b..8bc3170f8 100644 --- a/src/ext/plantuml/com/ctreber/acearth/ConfigurationACearth.java +++ b/src/zext/plantuml/com/ctreber/acearth/ConfigurationACearth.java @@ -1,12 +1,12 @@ -package ext.plantuml.com.ctreber.acearth; +package zext.plantuml.com.ctreber.acearth; -import ext.plantuml.com.ctreber.acearth.util.Coordinate; -import ext.plantuml.com.ctreber.aclib.gui.MOBoolean; -import ext.plantuml.com.ctreber.aclib.gui.MODouble; -import ext.plantuml.com.ctreber.aclib.gui.MOEnum; -import ext.plantuml.com.ctreber.aclib.gui.MOInteger; -import ext.plantuml.com.ctreber.aclib.gui.MOString; -import ext.plantuml.com.ctreber.aclib.gui.MonitoredObject; +import zext.plantuml.com.ctreber.acearth.util.Coordinate; +import zext.plantuml.com.ctreber.aclib.gui.MOBoolean; +import zext.plantuml.com.ctreber.aclib.gui.MODouble; +import zext.plantuml.com.ctreber.aclib.gui.MOEnum; +import zext.plantuml.com.ctreber.aclib.gui.MOInteger; +import zext.plantuml.com.ctreber.aclib.gui.MOString; +import zext.plantuml.com.ctreber.aclib.gui.MonitoredObject; /** *

diff --git a/src/ext/plantuml/com/ctreber/acearth/MapData.java b/src/zext/plantuml/com/ctreber/acearth/MapData.java similarity index 99% rename from src/ext/plantuml/com/ctreber/acearth/MapData.java rename to src/zext/plantuml/com/ctreber/acearth/MapData.java index d73641c1f..f20437f9e 100644 --- a/src/ext/plantuml/com/ctreber/acearth/MapData.java +++ b/src/zext/plantuml/com/ctreber/acearth/MapData.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.acearth; +package zext.plantuml.com.ctreber.acearth; import java.util.ArrayList; import java.util.List; diff --git a/src/ext/plantuml/com/ctreber/acearth/MapDataReader.java b/src/zext/plantuml/com/ctreber/acearth/MapDataReader.java similarity index 95% rename from src/ext/plantuml/com/ctreber/acearth/MapDataReader.java rename to src/zext/plantuml/com/ctreber/acearth/MapDataReader.java index 3f70e6afe..f17780e5d 100644 --- a/src/ext/plantuml/com/ctreber/acearth/MapDataReader.java +++ b/src/zext/plantuml/com/ctreber/acearth/MapDataReader.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.acearth; +package zext.plantuml.com.ctreber.acearth; import java.io.IOException; import java.util.ArrayList; @@ -6,8 +6,8 @@ import java.util.Iterator; import java.util.List; import java.util.StringTokenizer; -import ext.plantuml.com.ctreber.acearth.util.Point3D; -import ext.plantuml.com.ctreber.acearth.util.Polygon; +import zext.plantuml.com.ctreber.acearth.util.Point3D; +import zext.plantuml.com.ctreber.acearth.util.Polygon; /** * The map data file is a big array of short (16-bit) ints, as follows: - it is diff --git a/src/ext/plantuml/com/ctreber/acearth/gui/CanvasACearth.java b/src/zext/plantuml/com/ctreber/acearth/gui/CanvasACearth.java similarity index 80% rename from src/ext/plantuml/com/ctreber/acearth/gui/CanvasACearth.java rename to src/zext/plantuml/com/ctreber/acearth/gui/CanvasACearth.java index f751a7030..37db1cdc3 100644 --- a/src/ext/plantuml/com/ctreber/acearth/gui/CanvasACearth.java +++ b/src/zext/plantuml/com/ctreber/acearth/gui/CanvasACearth.java @@ -1,6 +1,6 @@ -package ext.plantuml.com.ctreber.acearth.gui; +package zext.plantuml.com.ctreber.acearth.gui; -import ext.plantuml.com.ctreber.acearth.ACearth; +import zext.plantuml.com.ctreber.acearth.ACearth; /** *

diff --git a/src/ext/plantuml/com/ctreber/acearth/gui/PixelCanvas.java b/src/zext/plantuml/com/ctreber/acearth/gui/PixelCanvas.java similarity index 92% rename from src/ext/plantuml/com/ctreber/acearth/gui/PixelCanvas.java rename to src/zext/plantuml/com/ctreber/acearth/gui/PixelCanvas.java index ab4b3deaa..4b7f68969 100644 --- a/src/ext/plantuml/com/ctreber/acearth/gui/PixelCanvas.java +++ b/src/zext/plantuml/com/ctreber/acearth/gui/PixelCanvas.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.acearth.gui; +package zext.plantuml.com.ctreber.acearth.gui; import java.awt.Color; import java.awt.Graphics2D; @@ -6,7 +6,7 @@ import java.awt.image.BufferedImage; import java.io.IOException; import java.io.OutputStream; -import ext.plantuml.com.ctreber.acearth.renderer.RenderTarget; +import zext.plantuml.com.ctreber.acearth.renderer.RenderTarget; import net.sourceforge.plantuml.security.SImageIO; /** diff --git a/src/ext/plantuml/com/ctreber/acearth/package-info.java b/src/zext/plantuml/com/ctreber/acearth/package-info.java similarity index 90% rename from src/ext/plantuml/com/ctreber/acearth/package-info.java rename to src/zext/plantuml/com/ctreber/acearth/package-info.java index 8e69ae42d..b0da411ce 100644 --- a/src/ext/plantuml/com/ctreber/acearth/package-info.java +++ b/src/zext/plantuml/com/ctreber/acearth/package-info.java @@ -13,4 +13,4 @@ * @see net.sourceforge.plantuml.acearth * */ -package ext.plantuml.com.ctreber.acearth; +package zext.plantuml.com.ctreber.acearth; diff --git a/src/ext/plantuml/com/ctreber/acearth/plugins/Plugin.java b/src/zext/plantuml/com/ctreber/acearth/plugins/Plugin.java similarity index 78% rename from src/ext/plantuml/com/ctreber/acearth/plugins/Plugin.java rename to src/zext/plantuml/com/ctreber/acearth/plugins/Plugin.java index 85de4bb01..f15f31bb1 100644 --- a/src/ext/plantuml/com/ctreber/acearth/plugins/Plugin.java +++ b/src/zext/plantuml/com/ctreber/acearth/plugins/Plugin.java @@ -1,11 +1,11 @@ -package ext.plantuml.com.ctreber.acearth.plugins; +package zext.plantuml.com.ctreber.acearth.plugins; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import ext.plantuml.com.ctreber.acearth.ACearth; -import ext.plantuml.com.ctreber.acearth.gui.PixelCanvas; -import ext.plantuml.com.ctreber.acearth.projection.Projection; +import zext.plantuml.com.ctreber.acearth.ACearth; +import zext.plantuml.com.ctreber.acearth.gui.PixelCanvas; +import zext.plantuml.com.ctreber.acearth.projection.Projection; /** *

diff --git a/src/ext/plantuml/com/ctreber/acearth/plugins/markers/Marker.java b/src/zext/plantuml/com/ctreber/acearth/plugins/markers/Marker.java similarity index 90% rename from src/ext/plantuml/com/ctreber/acearth/plugins/markers/Marker.java rename to src/zext/plantuml/com/ctreber/acearth/plugins/markers/Marker.java index ccd8b1589..bae5c8a14 100644 --- a/src/ext/plantuml/com/ctreber/acearth/plugins/markers/Marker.java +++ b/src/zext/plantuml/com/ctreber/acearth/plugins/markers/Marker.java @@ -1,17 +1,17 @@ -package ext.plantuml.com.ctreber.acearth.plugins.markers; +package zext.plantuml.com.ctreber.acearth.plugins.markers; import java.awt.Color; import java.awt.Font; import java.awt.Graphics2D; import java.util.List; -import ext.plantuml.com.ctreber.acearth.gui.PixelCanvas; -import ext.plantuml.com.ctreber.acearth.projection.Projection; -import ext.plantuml.com.ctreber.acearth.projection.ProjectionOrtho; -import ext.plantuml.com.ctreber.acearth.util.Coordinate; -import ext.plantuml.com.ctreber.acearth.util.Point2D; -import ext.plantuml.com.ctreber.acearth.util.Point3D; -import ext.plantuml.com.ctreber.acearth.util.StringParser; +import zext.plantuml.com.ctreber.acearth.gui.PixelCanvas; +import zext.plantuml.com.ctreber.acearth.projection.Projection; +import zext.plantuml.com.ctreber.acearth.projection.ProjectionOrtho; +import zext.plantuml.com.ctreber.acearth.util.Coordinate; +import zext.plantuml.com.ctreber.acearth.util.Point2D; +import zext.plantuml.com.ctreber.acearth.util.Point3D; +import zext.plantuml.com.ctreber.acearth.util.StringParser; /** *

diff --git a/src/ext/plantuml/com/ctreber/acearth/plugins/markers/PluginMarkers.java b/src/zext/plantuml/com/ctreber/acearth/plugins/markers/PluginMarkers.java similarity index 92% rename from src/ext/plantuml/com/ctreber/acearth/plugins/markers/PluginMarkers.java rename to src/zext/plantuml/com/ctreber/acearth/plugins/markers/PluginMarkers.java index b5e08db2a..c4f3c5cbb 100644 --- a/src/ext/plantuml/com/ctreber/acearth/plugins/markers/PluginMarkers.java +++ b/src/zext/plantuml/com/ctreber/acearth/plugins/markers/PluginMarkers.java @@ -1,9 +1,9 @@ -package ext.plantuml.com.ctreber.acearth.plugins.markers; +package zext.plantuml.com.ctreber.acearth.plugins.markers; import java.util.Iterator; import java.util.List; -import ext.plantuml.com.ctreber.acearth.plugins.Plugin; +import zext.plantuml.com.ctreber.acearth.plugins.Plugin; /** *

diff --git a/src/ext/plantuml/com/ctreber/acearth/projection/Projection.java b/src/zext/plantuml/com/ctreber/acearth/projection/Projection.java similarity index 96% rename from src/ext/plantuml/com/ctreber/acearth/projection/Projection.java rename to src/zext/plantuml/com/ctreber/acearth/projection/Projection.java index cdb6a2316..2da4743ff 100644 --- a/src/ext/plantuml/com/ctreber/acearth/projection/Projection.java +++ b/src/zext/plantuml/com/ctreber/acearth/projection/Projection.java @@ -1,9 +1,9 @@ -package ext.plantuml.com.ctreber.acearth.projection; +package zext.plantuml.com.ctreber.acearth.projection; -import ext.plantuml.com.ctreber.acearth.util.Coordinate; -import ext.plantuml.com.ctreber.acearth.util.Point2D; -import ext.plantuml.com.ctreber.acearth.util.Point3D; -import ext.plantuml.com.ctreber.acearth.util.Toolkit; +import zext.plantuml.com.ctreber.acearth.util.Coordinate; +import zext.plantuml.com.ctreber.acearth.util.Point2D; +import zext.plantuml.com.ctreber.acearth.util.Point3D; +import zext.plantuml.com.ctreber.acearth.util.Toolkit; /** *

A projection for a globe on a flat surface (must be subclassed). diff --git a/src/ext/plantuml/com/ctreber/acearth/projection/ProjectionCyl.java b/src/zext/plantuml/com/ctreber/acearth/projection/ProjectionCyl.java similarity index 90% rename from src/ext/plantuml/com/ctreber/acearth/projection/ProjectionCyl.java rename to src/zext/plantuml/com/ctreber/acearth/projection/ProjectionCyl.java index e25071c9f..5822b52a1 100644 --- a/src/ext/plantuml/com/ctreber/acearth/projection/ProjectionCyl.java +++ b/src/zext/plantuml/com/ctreber/acearth/projection/ProjectionCyl.java @@ -1,7 +1,7 @@ -package ext.plantuml.com.ctreber.acearth.projection; +package zext.plantuml.com.ctreber.acearth.projection; -import ext.plantuml.com.ctreber.acearth.util.Coordinate; -import ext.plantuml.com.ctreber.acearth.util.Point3D; +import zext.plantuml.com.ctreber.acearth.util.Coordinate; +import zext.plantuml.com.ctreber.acearth.util.Point3D; /** *

Cylindrical projection. Show Earth flatly spread out on rectangle. diff --git a/src/ext/plantuml/com/ctreber/acearth/projection/ProjectionMerc.java b/src/zext/plantuml/com/ctreber/acearth/projection/ProjectionMerc.java similarity index 90% rename from src/ext/plantuml/com/ctreber/acearth/projection/ProjectionMerc.java rename to src/zext/plantuml/com/ctreber/acearth/projection/ProjectionMerc.java index 775e35ace..f28bd43e8 100644 --- a/src/ext/plantuml/com/ctreber/acearth/projection/ProjectionMerc.java +++ b/src/zext/plantuml/com/ctreber/acearth/projection/ProjectionMerc.java @@ -1,7 +1,7 @@ -package ext.plantuml.com.ctreber.acearth.projection; +package zext.plantuml.com.ctreber.acearth.projection; -import ext.plantuml.com.ctreber.acearth.util.Coordinate; -import ext.plantuml.com.ctreber.acearth.util.Point3D; +import zext.plantuml.com.ctreber.acearth.util.Coordinate; +import zext.plantuml.com.ctreber.acearth.util.Point3D; /** diff --git a/src/ext/plantuml/com/ctreber/acearth/projection/ProjectionOrtho.java b/src/zext/plantuml/com/ctreber/acearth/projection/ProjectionOrtho.java similarity index 88% rename from src/ext/plantuml/com/ctreber/acearth/projection/ProjectionOrtho.java rename to src/zext/plantuml/com/ctreber/acearth/projection/ProjectionOrtho.java index 6ff24a612..2b5013436 100644 --- a/src/ext/plantuml/com/ctreber/acearth/projection/ProjectionOrtho.java +++ b/src/zext/plantuml/com/ctreber/acearth/projection/ProjectionOrtho.java @@ -1,7 +1,7 @@ -package ext.plantuml.com.ctreber.acearth.projection; +package zext.plantuml.com.ctreber.acearth.projection; -import ext.plantuml.com.ctreber.acearth.util.Coordinate; -import ext.plantuml.com.ctreber.acearth.util.Point3D; +import zext.plantuml.com.ctreber.acearth.util.Coordinate; +import zext.plantuml.com.ctreber.acearth.util.Point3D; /** diff --git a/src/ext/plantuml/com/ctreber/acearth/renderer/RenderTarget.java b/src/zext/plantuml/com/ctreber/acearth/renderer/RenderTarget.java similarity index 88% rename from src/ext/plantuml/com/ctreber/acearth/renderer/RenderTarget.java rename to src/zext/plantuml/com/ctreber/acearth/renderer/RenderTarget.java index e155cf32e..57c6fd5b1 100644 --- a/src/ext/plantuml/com/ctreber/acearth/renderer/RenderTarget.java +++ b/src/zext/plantuml/com/ctreber/acearth/renderer/RenderTarget.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.acearth.renderer; +package zext.plantuml.com.ctreber.acearth.renderer; import java.awt.Color; diff --git a/src/ext/plantuml/com/ctreber/acearth/renderer/Renderer.java b/src/zext/plantuml/com/ctreber/acearth/renderer/Renderer.java similarity index 95% rename from src/ext/plantuml/com/ctreber/acearth/renderer/Renderer.java rename to src/zext/plantuml/com/ctreber/acearth/renderer/Renderer.java index ae9f389c4..a7d9e62fb 100644 --- a/src/ext/plantuml/com/ctreber/acearth/renderer/Renderer.java +++ b/src/zext/plantuml/com/ctreber/acearth/renderer/Renderer.java @@ -1,11 +1,11 @@ -package ext.plantuml.com.ctreber.acearth.renderer; +package zext.plantuml.com.ctreber.acearth.renderer; import java.awt.Color; import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import ext.plantuml.com.ctreber.acearth.shader.Shader; +import zext.plantuml.com.ctreber.acearth.shader.Shader; /** *

diff --git a/src/ext/plantuml/com/ctreber/acearth/renderer/RowTypeRenderer.java b/src/zext/plantuml/com/ctreber/acearth/renderer/RowTypeRenderer.java similarity index 92% rename from src/ext/plantuml/com/ctreber/acearth/renderer/RowTypeRenderer.java rename to src/zext/plantuml/com/ctreber/acearth/renderer/RowTypeRenderer.java index 7ec815894..d290d37c4 100644 --- a/src/ext/plantuml/com/ctreber/acearth/renderer/RowTypeRenderer.java +++ b/src/zext/plantuml/com/ctreber/acearth/renderer/RowTypeRenderer.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.acearth.renderer; +package zext.plantuml.com.ctreber.acearth.renderer; /** *

Renders a row of pixel types.

diff --git a/src/ext/plantuml/com/ctreber/acearth/renderer/RowTypeRendererScanBit.java b/src/zext/plantuml/com/ctreber/acearth/renderer/RowTypeRendererScanBit.java similarity index 92% rename from src/ext/plantuml/com/ctreber/acearth/renderer/RowTypeRendererScanBit.java rename to src/zext/plantuml/com/ctreber/acearth/renderer/RowTypeRendererScanBit.java index 312ce543e..15ec2af81 100644 --- a/src/ext/plantuml/com/ctreber/acearth/renderer/RowTypeRendererScanBit.java +++ b/src/zext/plantuml/com/ctreber/acearth/renderer/RowTypeRendererScanBit.java @@ -1,7 +1,7 @@ -package ext.plantuml.com.ctreber.acearth.renderer; +package zext.plantuml.com.ctreber.acearth.renderer; -import ext.plantuml.com.ctreber.acearth.scanbit.BitGeneratorMap; -import ext.plantuml.com.ctreber.acearth.scanbit.ScanBit; +import zext.plantuml.com.ctreber.acearth.scanbit.BitGeneratorMap; +import zext.plantuml.com.ctreber.acearth.scanbit.ScanBit; /** *

Renders a row of ScanBits to pixel types.

diff --git a/src/ext/plantuml/com/ctreber/acearth/renderer/RowTypeRendererScanDot.java b/src/zext/plantuml/com/ctreber/acearth/renderer/RowTypeRendererScanDot.java similarity index 89% rename from src/ext/plantuml/com/ctreber/acearth/renderer/RowTypeRendererScanDot.java rename to src/zext/plantuml/com/ctreber/acearth/renderer/RowTypeRendererScanDot.java index 3223094df..ee8faf78d 100644 --- a/src/ext/plantuml/com/ctreber/acearth/renderer/RowTypeRendererScanDot.java +++ b/src/zext/plantuml/com/ctreber/acearth/renderer/RowTypeRendererScanDot.java @@ -1,7 +1,7 @@ -package ext.plantuml.com.ctreber.acearth.renderer; +package zext.plantuml.com.ctreber.acearth.renderer; -import ext.plantuml.com.ctreber.acearth.scanbit.BitGeneratorMap; -import ext.plantuml.com.ctreber.acearth.scandot.ScanDot; +import zext.plantuml.com.ctreber.acearth.scanbit.BitGeneratorMap; +import zext.plantuml.com.ctreber.acearth.scandot.ScanDot; /** *

Renders a row of ScanDots to pixel types.

diff --git a/src/ext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMap.java b/src/zext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMap.java similarity index 88% rename from src/ext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMap.java rename to src/zext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMap.java index f907a70b4..c2e36b152 100644 --- a/src/ext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMap.java +++ b/src/zext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMap.java @@ -1,16 +1,16 @@ -package ext.plantuml.com.ctreber.acearth.scanbit; +package zext.plantuml.com.ctreber.acearth.scanbit; import java.util.ArrayList; import java.util.Comparator; import java.util.List; -import ext.plantuml.com.ctreber.acearth.projection.Projection; -import ext.plantuml.com.ctreber.acearth.util.EdgeCrossing; -import ext.plantuml.com.ctreber.acearth.util.Point2D; -import ext.plantuml.com.ctreber.acearth.util.Point3D; -import ext.plantuml.com.ctreber.acearth.util.Polygon; -import ext.plantuml.com.ctreber.aclib.sort.CTSort; -import ext.plantuml.com.ctreber.aclib.sort.QuickSort; +import zext.plantuml.com.ctreber.acearth.projection.Projection; +import zext.plantuml.com.ctreber.acearth.util.EdgeCrossing; +import zext.plantuml.com.ctreber.acearth.util.Point2D; +import zext.plantuml.com.ctreber.acearth.util.Point3D; +import zext.plantuml.com.ctreber.acearth.util.Polygon; +import zext.plantuml.com.ctreber.aclib.sort.CTSort; +import zext.plantuml.com.ctreber.aclib.sort.QuickSort; /** *

diff --git a/src/ext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMapDefault.java b/src/zext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMapDefault.java similarity index 95% rename from src/ext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMapDefault.java rename to src/zext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMapDefault.java index 7a3e8619b..780644110 100644 --- a/src/ext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMapDefault.java +++ b/src/zext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMapDefault.java @@ -1,11 +1,11 @@ -package ext.plantuml.com.ctreber.acearth.scanbit; +package zext.plantuml.com.ctreber.acearth.scanbit; import java.util.Comparator; -import ext.plantuml.com.ctreber.acearth.projection.Projection; -import ext.plantuml.com.ctreber.acearth.util.EdgeCrossing; -import ext.plantuml.com.ctreber.acearth.util.Point2D; -import ext.plantuml.com.ctreber.acearth.util.Point3D; +import zext.plantuml.com.ctreber.acearth.projection.Projection; +import zext.plantuml.com.ctreber.acearth.util.EdgeCrossing; +import zext.plantuml.com.ctreber.acearth.util.Point2D; +import zext.plantuml.com.ctreber.acearth.util.Point3D; /** *

Map scanner for mercator and cylindrical projections. diff --git a/src/ext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMapOrtho.java b/src/zext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMapOrtho.java similarity index 94% rename from src/ext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMapOrtho.java rename to src/zext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMapOrtho.java index 980b4e5b6..59cc35c33 100644 --- a/src/ext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMapOrtho.java +++ b/src/zext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMapOrtho.java @@ -1,11 +1,11 @@ -package ext.plantuml.com.ctreber.acearth.scanbit; +package zext.plantuml.com.ctreber.acearth.scanbit; import java.util.Comparator; -import ext.plantuml.com.ctreber.acearth.projection.Projection; -import ext.plantuml.com.ctreber.acearth.util.EdgeCrossing; -import ext.plantuml.com.ctreber.acearth.util.Point2D; -import ext.plantuml.com.ctreber.acearth.util.Point3D; +import zext.plantuml.com.ctreber.acearth.projection.Projection; +import zext.plantuml.com.ctreber.acearth.util.EdgeCrossing; +import zext.plantuml.com.ctreber.acearth.util.Point2D; +import zext.plantuml.com.ctreber.acearth.util.Point3D; /** *

Map scanner for orthographic projection. diff --git a/src/ext/plantuml/com/ctreber/acearth/scanbit/ScanBit.java b/src/zext/plantuml/com/ctreber/acearth/scanbit/ScanBit.java similarity index 95% rename from src/ext/plantuml/com/ctreber/acearth/scanbit/ScanBit.java rename to src/zext/plantuml/com/ctreber/acearth/scanbit/ScanBit.java index d5f7624d5..13367fe0f 100644 --- a/src/ext/plantuml/com/ctreber/acearth/scanbit/ScanBit.java +++ b/src/zext/plantuml/com/ctreber/acearth/scanbit/ScanBit.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.acearth.scanbit; +package zext.plantuml.com.ctreber.acearth.scanbit; /** *

Instruction to paint points xFrom to xTo on line y. diff --git a/src/ext/plantuml/com/ctreber/acearth/scanbit/ScanBitGenerator.java b/src/zext/plantuml/com/ctreber/acearth/scanbit/ScanBitGenerator.java similarity index 92% rename from src/ext/plantuml/com/ctreber/acearth/scanbit/ScanBitGenerator.java rename to src/zext/plantuml/com/ctreber/acearth/scanbit/ScanBitGenerator.java index c3e0febe3..531c3673d 100644 --- a/src/ext/plantuml/com/ctreber/acearth/scanbit/ScanBitGenerator.java +++ b/src/zext/plantuml/com/ctreber/acearth/scanbit/ScanBitGenerator.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.acearth.scanbit; +package zext.plantuml.com.ctreber.acearth.scanbit; /** *

A ScanBitGenerator produces ScanBits.

diff --git a/src/ext/plantuml/com/ctreber/acearth/scanbit/ScanBuf.java b/src/zext/plantuml/com/ctreber/acearth/scanbit/ScanBuf.java similarity index 96% rename from src/ext/plantuml/com/ctreber/acearth/scanbit/ScanBuf.java rename to src/zext/plantuml/com/ctreber/acearth/scanbit/ScanBuf.java index 62c3ed347..88e9098c5 100644 --- a/src/ext/plantuml/com/ctreber/acearth/scanbit/ScanBuf.java +++ b/src/zext/plantuml/com/ctreber/acearth/scanbit/ScanBuf.java @@ -1,10 +1,10 @@ -package ext.plantuml.com.ctreber.acearth.scanbit; +package zext.plantuml.com.ctreber.acearth.scanbit; import java.util.ArrayList; import java.util.List; -import ext.plantuml.com.ctreber.aclib.sort.CTSort; -import ext.plantuml.com.ctreber.aclib.sort.QuickSort; +import zext.plantuml.com.ctreber.aclib.sort.CTSort; +import zext.plantuml.com.ctreber.aclib.sort.QuickSort; /** *

For each line, the scanbuffer (= a raster divice) records the points hit diff --git a/src/ext/plantuml/com/ctreber/acearth/scandot/DotGeneratorLines.java b/src/zext/plantuml/com/ctreber/acearth/scandot/DotGeneratorLines.java similarity index 86% rename from src/ext/plantuml/com/ctreber/acearth/scandot/DotGeneratorLines.java rename to src/zext/plantuml/com/ctreber/acearth/scandot/DotGeneratorLines.java index 5392a4ef9..7a382a3be 100644 --- a/src/ext/plantuml/com/ctreber/acearth/scandot/DotGeneratorLines.java +++ b/src/zext/plantuml/com/ctreber/acearth/scandot/DotGeneratorLines.java @@ -1,9 +1,9 @@ -package ext.plantuml.com.ctreber.acearth.scandot; +package zext.plantuml.com.ctreber.acearth.scandot; -import ext.plantuml.com.ctreber.acearth.projection.Projection; -import ext.plantuml.com.ctreber.acearth.util.Coordinate; -import ext.plantuml.com.ctreber.acearth.util.Point2D; -import ext.plantuml.com.ctreber.acearth.util.Point3D; +import zext.plantuml.com.ctreber.acearth.projection.Projection; +import zext.plantuml.com.ctreber.acearth.util.Coordinate; +import zext.plantuml.com.ctreber.acearth.util.Point2D; +import zext.plantuml.com.ctreber.acearth.util.Point3D; /** *

Generate latitude and longitude grid as dots. diff --git a/src/ext/plantuml/com/ctreber/acearth/scandot/DotGeneratorStars.java b/src/zext/plantuml/com/ctreber/acearth/scandot/DotGeneratorStars.java similarity index 96% rename from src/ext/plantuml/com/ctreber/acearth/scandot/DotGeneratorStars.java rename to src/zext/plantuml/com/ctreber/acearth/scandot/DotGeneratorStars.java index e598a27a2..789563753 100644 --- a/src/ext/plantuml/com/ctreber/acearth/scandot/DotGeneratorStars.java +++ b/src/zext/plantuml/com/ctreber/acearth/scandot/DotGeneratorStars.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.acearth.scandot; +package zext.plantuml.com.ctreber.acearth.scandot; import java.util.Random; diff --git a/src/ext/plantuml/com/ctreber/acearth/scandot/ScanDot.java b/src/zext/plantuml/com/ctreber/acearth/scandot/ScanDot.java similarity index 90% rename from src/ext/plantuml/com/ctreber/acearth/scandot/ScanDot.java rename to src/zext/plantuml/com/ctreber/acearth/scandot/ScanDot.java index ac0823a7f..c222ee475 100644 --- a/src/ext/plantuml/com/ctreber/acearth/scandot/ScanDot.java +++ b/src/zext/plantuml/com/ctreber/acearth/scandot/ScanDot.java @@ -1,6 +1,6 @@ -package ext.plantuml.com.ctreber.acearth.scandot; +package zext.plantuml.com.ctreber.acearth.scandot; -import ext.plantuml.com.ctreber.acearth.util.Point2D; +import zext.plantuml.com.ctreber.acearth.util.Point2D; /** *

A single scandot (opposed to a Polygon). diff --git a/src/ext/plantuml/com/ctreber/acearth/scandot/ScanDotGenerator.java b/src/zext/plantuml/com/ctreber/acearth/scandot/ScanDotGenerator.java similarity index 89% rename from src/ext/plantuml/com/ctreber/acearth/scandot/ScanDotGenerator.java rename to src/zext/plantuml/com/ctreber/acearth/scandot/ScanDotGenerator.java index 0013cf42c..3d7d7fe6f 100644 --- a/src/ext/plantuml/com/ctreber/acearth/scandot/ScanDotGenerator.java +++ b/src/zext/plantuml/com/ctreber/acearth/scandot/ScanDotGenerator.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.acearth.scandot; +package zext.plantuml.com.ctreber.acearth.scandot; import java.util.ArrayList; import java.util.List; diff --git a/src/ext/plantuml/com/ctreber/acearth/shader/Shader.java b/src/zext/plantuml/com/ctreber/acearth/shader/Shader.java similarity index 92% rename from src/ext/plantuml/com/ctreber/acearth/shader/Shader.java rename to src/zext/plantuml/com/ctreber/acearth/shader/Shader.java index e3ba21578..dcca30fe6 100644 --- a/src/ext/plantuml/com/ctreber/acearth/shader/Shader.java +++ b/src/zext/plantuml/com/ctreber/acearth/shader/Shader.java @@ -1,11 +1,11 @@ -package ext.plantuml.com.ctreber.acearth.shader; +package zext.plantuml.com.ctreber.acearth.shader; import java.awt.Color; -import ext.plantuml.com.ctreber.acearth.projection.Projection; -import ext.plantuml.com.ctreber.acearth.scanbit.BitGeneratorMap; -import ext.plantuml.com.ctreber.acearth.util.Coordinate; -import ext.plantuml.com.ctreber.acearth.util.Point3D; +import zext.plantuml.com.ctreber.acearth.projection.Projection; +import zext.plantuml.com.ctreber.acearth.scanbit.BitGeneratorMap; +import zext.plantuml.com.ctreber.acearth.util.Coordinate; +import zext.plantuml.com.ctreber.acearth.util.Point3D; /** *

A shader computes Colors for a row of pixel types, depending diff --git a/src/ext/plantuml/com/ctreber/acearth/shader/ShaderDefault.java b/src/zext/plantuml/com/ctreber/acearth/shader/ShaderDefault.java similarity index 97% rename from src/ext/plantuml/com/ctreber/acearth/shader/ShaderDefault.java rename to src/zext/plantuml/com/ctreber/acearth/shader/ShaderDefault.java index ffb01e469..2dc3a151b 100644 --- a/src/ext/plantuml/com/ctreber/acearth/shader/ShaderDefault.java +++ b/src/zext/plantuml/com/ctreber/acearth/shader/ShaderDefault.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.acearth.shader; +package zext.plantuml.com.ctreber.acearth.shader; import java.awt.Color; diff --git a/src/ext/plantuml/com/ctreber/acearth/shader/ShaderFlat.java b/src/zext/plantuml/com/ctreber/acearth/shader/ShaderFlat.java similarity index 91% rename from src/ext/plantuml/com/ctreber/acearth/shader/ShaderFlat.java rename to src/zext/plantuml/com/ctreber/acearth/shader/ShaderFlat.java index a5b983ade..ca7d1c53d 100644 --- a/src/ext/plantuml/com/ctreber/acearth/shader/ShaderFlat.java +++ b/src/zext/plantuml/com/ctreber/acearth/shader/ShaderFlat.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.acearth.shader; +package zext.plantuml.com.ctreber.acearth.shader; import java.awt.Color; diff --git a/src/ext/plantuml/com/ctreber/acearth/shader/ShaderOrtho.java b/src/zext/plantuml/com/ctreber/acearth/shader/ShaderOrtho.java similarity index 96% rename from src/ext/plantuml/com/ctreber/acearth/shader/ShaderOrtho.java rename to src/zext/plantuml/com/ctreber/acearth/shader/ShaderOrtho.java index 33c646b58..7313ae615 100644 --- a/src/ext/plantuml/com/ctreber/acearth/shader/ShaderOrtho.java +++ b/src/zext/plantuml/com/ctreber/acearth/shader/ShaderOrtho.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.acearth.shader; +package zext.plantuml.com.ctreber.acearth.shader; import java.awt.Color; diff --git a/src/ext/plantuml/com/ctreber/acearth/util/Coordinate.java b/src/zext/plantuml/com/ctreber/acearth/util/Coordinate.java similarity index 98% rename from src/ext/plantuml/com/ctreber/acearth/util/Coordinate.java rename to src/zext/plantuml/com/ctreber/acearth/util/Coordinate.java index 76d16ae6a..91665e47e 100644 --- a/src/ext/plantuml/com/ctreber/acearth/util/Coordinate.java +++ b/src/zext/plantuml/com/ctreber/acearth/util/Coordinate.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.acearth.util; +package zext.plantuml.com.ctreber.acearth.util; import java.io.IOException; import java.io.Writer; diff --git a/src/ext/plantuml/com/ctreber/acearth/util/EdgeCrossing.java b/src/zext/plantuml/com/ctreber/acearth/util/EdgeCrossing.java similarity index 95% rename from src/ext/plantuml/com/ctreber/acearth/util/EdgeCrossing.java rename to src/zext/plantuml/com/ctreber/acearth/util/EdgeCrossing.java index adc3e2342..d4b03f3fc 100644 --- a/src/ext/plantuml/com/ctreber/acearth/util/EdgeCrossing.java +++ b/src/zext/plantuml/com/ctreber/acearth/util/EdgeCrossing.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.acearth.util; +package zext.plantuml.com.ctreber.acearth.util; /** *

Holds information about a line crossing "the edge of Earth". diff --git a/src/ext/plantuml/com/ctreber/acearth/util/Point2D.java b/src/zext/plantuml/com/ctreber/acearth/util/Point2D.java similarity index 90% rename from src/ext/plantuml/com/ctreber/acearth/util/Point2D.java rename to src/zext/plantuml/com/ctreber/acearth/util/Point2D.java index 596f2b425..b71ea8c3b 100644 --- a/src/ext/plantuml/com/ctreber/acearth/util/Point2D.java +++ b/src/zext/plantuml/com/ctreber/acearth/util/Point2D.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.acearth.util; +package zext.plantuml.com.ctreber.acearth.util; /** *

A point in a 2 axis space. diff --git a/src/ext/plantuml/com/ctreber/acearth/util/Point3D.java b/src/zext/plantuml/com/ctreber/acearth/util/Point3D.java similarity index 93% rename from src/ext/plantuml/com/ctreber/acearth/util/Point3D.java rename to src/zext/plantuml/com/ctreber/acearth/util/Point3D.java index 8f0a06561..355d7bc05 100644 --- a/src/ext/plantuml/com/ctreber/acearth/util/Point3D.java +++ b/src/zext/plantuml/com/ctreber/acearth/util/Point3D.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.acearth.util; +package zext.plantuml.com.ctreber.acearth.util; /** *

A point in a 2 axis space. diff --git a/src/ext/plantuml/com/ctreber/acearth/util/Polygon.java b/src/zext/plantuml/com/ctreber/acearth/util/Polygon.java similarity index 93% rename from src/ext/plantuml/com/ctreber/acearth/util/Polygon.java rename to src/zext/plantuml/com/ctreber/acearth/util/Polygon.java index 9ea5f7141..5c43c3938 100644 --- a/src/ext/plantuml/com/ctreber/acearth/util/Polygon.java +++ b/src/zext/plantuml/com/ctreber/acearth/util/Polygon.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.acearth.util; +package zext.plantuml.com.ctreber.acearth.util; /** diff --git a/src/ext/plantuml/com/ctreber/acearth/util/StringParser.java b/src/zext/plantuml/com/ctreber/acearth/util/StringParser.java similarity index 98% rename from src/ext/plantuml/com/ctreber/acearth/util/StringParser.java rename to src/zext/plantuml/com/ctreber/acearth/util/StringParser.java index 3ba3b1cd8..7f268573c 100644 --- a/src/ext/plantuml/com/ctreber/acearth/util/StringParser.java +++ b/src/zext/plantuml/com/ctreber/acearth/util/StringParser.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.acearth.util; +package zext.plantuml.com.ctreber.acearth.util; import java.util.ArrayList; import java.util.List; diff --git a/src/ext/plantuml/com/ctreber/acearth/util/SunPositionCalculator.java b/src/zext/plantuml/com/ctreber/acearth/util/SunPositionCalculator.java similarity index 99% rename from src/ext/plantuml/com/ctreber/acearth/util/SunPositionCalculator.java rename to src/zext/plantuml/com/ctreber/acearth/util/SunPositionCalculator.java index 736a2c3f7..6cb9624ca 100644 --- a/src/ext/plantuml/com/ctreber/acearth/util/SunPositionCalculator.java +++ b/src/zext/plantuml/com/ctreber/acearth/util/SunPositionCalculator.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.acearth.util; +package zext.plantuml.com.ctreber.acearth.util; import java.util.Calendar; import java.util.Date; diff --git a/src/ext/plantuml/com/ctreber/acearth/util/Toolkit.java b/src/zext/plantuml/com/ctreber/acearth/util/Toolkit.java similarity index 98% rename from src/ext/plantuml/com/ctreber/acearth/util/Toolkit.java rename to src/zext/plantuml/com/ctreber/acearth/util/Toolkit.java index de5850a6d..21cb17adf 100644 --- a/src/ext/plantuml/com/ctreber/acearth/util/Toolkit.java +++ b/src/zext/plantuml/com/ctreber/acearth/util/Toolkit.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.acearth.util; +package zext.plantuml.com.ctreber.acearth.util; import java.util.HashSet; import java.util.StringTokenizer; diff --git a/src/ext/plantuml/com/ctreber/aclib/gui/MOBoolean.java b/src/zext/plantuml/com/ctreber/aclib/gui/MOBoolean.java similarity index 93% rename from src/ext/plantuml/com/ctreber/aclib/gui/MOBoolean.java rename to src/zext/plantuml/com/ctreber/aclib/gui/MOBoolean.java index 791eaeeab..e1eefd443 100644 --- a/src/ext/plantuml/com/ctreber/aclib/gui/MOBoolean.java +++ b/src/zext/plantuml/com/ctreber/aclib/gui/MOBoolean.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.aclib.gui; +package zext.plantuml.com.ctreber.aclib.gui; /** *

diff --git a/src/ext/plantuml/com/ctreber/aclib/gui/MOChangeListener.java b/src/zext/plantuml/com/ctreber/aclib/gui/MOChangeListener.java similarity index 86% rename from src/ext/plantuml/com/ctreber/aclib/gui/MOChangeListener.java rename to src/zext/plantuml/com/ctreber/aclib/gui/MOChangeListener.java index 29416373d..4b8388f25 100644 --- a/src/ext/plantuml/com/ctreber/aclib/gui/MOChangeListener.java +++ b/src/zext/plantuml/com/ctreber/aclib/gui/MOChangeListener.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.aclib.gui; +package zext.plantuml.com.ctreber.aclib.gui; /** *

Implemented by classes interetested in MonitoredObject values changes.

diff --git a/src/ext/plantuml/com/ctreber/aclib/gui/MODouble.java b/src/zext/plantuml/com/ctreber/aclib/gui/MODouble.java similarity index 96% rename from src/ext/plantuml/com/ctreber/aclib/gui/MODouble.java rename to src/zext/plantuml/com/ctreber/aclib/gui/MODouble.java index 722a5db95..c77bc966f 100644 --- a/src/ext/plantuml/com/ctreber/aclib/gui/MODouble.java +++ b/src/zext/plantuml/com/ctreber/aclib/gui/MODouble.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.aclib.gui; +package zext.plantuml.com.ctreber.aclib.gui; /** *

diff --git a/src/ext/plantuml/com/ctreber/aclib/gui/MOEnum.java b/src/zext/plantuml/com/ctreber/aclib/gui/MOEnum.java similarity index 96% rename from src/ext/plantuml/com/ctreber/aclib/gui/MOEnum.java rename to src/zext/plantuml/com/ctreber/aclib/gui/MOEnum.java index f2b3cbf68..98848119e 100644 --- a/src/ext/plantuml/com/ctreber/aclib/gui/MOEnum.java +++ b/src/zext/plantuml/com/ctreber/aclib/gui/MOEnum.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.aclib.gui; +package zext.plantuml.com.ctreber.aclib.gui; import java.util.HashSet; diff --git a/src/ext/plantuml/com/ctreber/aclib/gui/MOInteger.java b/src/zext/plantuml/com/ctreber/aclib/gui/MOInteger.java similarity index 96% rename from src/ext/plantuml/com/ctreber/aclib/gui/MOInteger.java rename to src/zext/plantuml/com/ctreber/aclib/gui/MOInteger.java index 081661562..290dd0783 100644 --- a/src/ext/plantuml/com/ctreber/aclib/gui/MOInteger.java +++ b/src/zext/plantuml/com/ctreber/aclib/gui/MOInteger.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.aclib.gui; +package zext.plantuml.com.ctreber.aclib.gui; /** *

diff --git a/src/ext/plantuml/com/ctreber/aclib/gui/MOString.java b/src/zext/plantuml/com/ctreber/aclib/gui/MOString.java similarity index 91% rename from src/ext/plantuml/com/ctreber/aclib/gui/MOString.java rename to src/zext/plantuml/com/ctreber/aclib/gui/MOString.java index 3f06fedb0..7a1537c83 100644 --- a/src/ext/plantuml/com/ctreber/aclib/gui/MOString.java +++ b/src/zext/plantuml/com/ctreber/aclib/gui/MOString.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.aclib.gui; +package zext.plantuml.com.ctreber.aclib.gui; diff --git a/src/ext/plantuml/com/ctreber/aclib/gui/MonitoredObject.java b/src/zext/plantuml/com/ctreber/aclib/gui/MonitoredObject.java similarity index 95% rename from src/ext/plantuml/com/ctreber/aclib/gui/MonitoredObject.java rename to src/zext/plantuml/com/ctreber/aclib/gui/MonitoredObject.java index 8bb482492..cfd2b57f4 100644 --- a/src/ext/plantuml/com/ctreber/aclib/gui/MonitoredObject.java +++ b/src/zext/plantuml/com/ctreber/aclib/gui/MonitoredObject.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.aclib.gui; +package zext.plantuml.com.ctreber.aclib.gui; import java.util.ArrayList; import java.util.Iterator; diff --git a/src/ext/plantuml/com/ctreber/aclib/sort/CTSort.java b/src/zext/plantuml/com/ctreber/aclib/sort/CTSort.java similarity index 91% rename from src/ext/plantuml/com/ctreber/aclib/sort/CTSort.java rename to src/zext/plantuml/com/ctreber/aclib/sort/CTSort.java index 9783f237e..afa16ab2c 100644 --- a/src/ext/plantuml/com/ctreber/aclib/sort/CTSort.java +++ b/src/zext/plantuml/com/ctreber/aclib/sort/CTSort.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.aclib.sort; +package zext.plantuml.com.ctreber.aclib.sort; import java.util.Comparator; diff --git a/src/ext/plantuml/com/ctreber/aclib/sort/DefaultComparator.java b/src/zext/plantuml/com/ctreber/aclib/sort/DefaultComparator.java similarity index 90% rename from src/ext/plantuml/com/ctreber/aclib/sort/DefaultComparator.java rename to src/zext/plantuml/com/ctreber/aclib/sort/DefaultComparator.java index b183e4122..ef22c7c31 100644 --- a/src/ext/plantuml/com/ctreber/aclib/sort/DefaultComparator.java +++ b/src/zext/plantuml/com/ctreber/aclib/sort/DefaultComparator.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.aclib.sort; +package zext.plantuml.com.ctreber.aclib.sort; import java.util.Comparator; diff --git a/src/ext/plantuml/com/ctreber/aclib/sort/QuickSort.java b/src/zext/plantuml/com/ctreber/aclib/sort/QuickSort.java similarity index 97% rename from src/ext/plantuml/com/ctreber/aclib/sort/QuickSort.java rename to src/zext/plantuml/com/ctreber/aclib/sort/QuickSort.java index a0922dbbe..d0f6cd165 100644 --- a/src/ext/plantuml/com/ctreber/aclib/sort/QuickSort.java +++ b/src/zext/plantuml/com/ctreber/aclib/sort/QuickSort.java @@ -1,4 +1,4 @@ -package ext.plantuml.com.ctreber.aclib.sort; +package zext.plantuml.com.ctreber.aclib.sort; import java.util.Comparator; diff --git a/src/ext/plantuml/com/google/zxing/BarcodeFormat.java b/src/zext/plantuml/com/google/zxing/BarcodeFormat.java similarity index 98% rename from src/ext/plantuml/com/google/zxing/BarcodeFormat.java rename to src/zext/plantuml/com/google/zxing/BarcodeFormat.java index da912f28f..37c444dc2 100644 --- a/src/ext/plantuml/com/google/zxing/BarcodeFormat.java +++ b/src/zext/plantuml/com/google/zxing/BarcodeFormat.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing; +package zext.plantuml.com.google.zxing; import java.util.Hashtable; diff --git a/src/ext/plantuml/com/google/zxing/ChecksumException.java b/src/zext/plantuml/com/google/zxing/ChecksumException.java similarity index 96% rename from src/ext/plantuml/com/google/zxing/ChecksumException.java rename to src/zext/plantuml/com/google/zxing/ChecksumException.java index fa2a89030..11a232a37 100644 --- a/src/ext/plantuml/com/google/zxing/ChecksumException.java +++ b/src/zext/plantuml/com/google/zxing/ChecksumException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing; +package zext.plantuml.com.google.zxing; /** * Thrown when a barcode was successfully detected and decoded, but diff --git a/src/ext/plantuml/com/google/zxing/DecodeHintType.java b/src/zext/plantuml/com/google/zxing/DecodeHintType.java similarity index 98% rename from src/ext/plantuml/com/google/zxing/DecodeHintType.java rename to src/zext/plantuml/com/google/zxing/DecodeHintType.java index 39d20f30c..6e0e687d4 100644 --- a/src/ext/plantuml/com/google/zxing/DecodeHintType.java +++ b/src/zext/plantuml/com/google/zxing/DecodeHintType.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing; +package zext.plantuml.com.google.zxing; /** * Encapsulates a type of hint that a caller may pass to a barcode reader to help it diff --git a/src/ext/plantuml/com/google/zxing/EncodeHintType.java b/src/zext/plantuml/com/google/zxing/EncodeHintType.java similarity index 96% rename from src/ext/plantuml/com/google/zxing/EncodeHintType.java rename to src/zext/plantuml/com/google/zxing/EncodeHintType.java index 8fc30c190..ed7228f0b 100644 --- a/src/ext/plantuml/com/google/zxing/EncodeHintType.java +++ b/src/zext/plantuml/com/google/zxing/EncodeHintType.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing; +package zext.plantuml.com.google.zxing; /** * These are a set of hints that you may pass to Writers to specify their behavior. diff --git a/src/ext/plantuml/com/google/zxing/FormatException.java b/src/zext/plantuml/com/google/zxing/FormatException.java similarity index 96% rename from src/ext/plantuml/com/google/zxing/FormatException.java rename to src/zext/plantuml/com/google/zxing/FormatException.java index b8282a6e1..461d09ee2 100644 --- a/src/ext/plantuml/com/google/zxing/FormatException.java +++ b/src/zext/plantuml/com/google/zxing/FormatException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing; +package zext.plantuml.com.google.zxing; /** * Thrown when a barcode was successfully detected, but some aspect of diff --git a/src/ext/plantuml/com/google/zxing/NotFoundException.java b/src/zext/plantuml/com/google/zxing/NotFoundException.java similarity index 96% rename from src/ext/plantuml/com/google/zxing/NotFoundException.java rename to src/zext/plantuml/com/google/zxing/NotFoundException.java index 7d7624216..f45c7f71a 100644 --- a/src/ext/plantuml/com/google/zxing/NotFoundException.java +++ b/src/zext/plantuml/com/google/zxing/NotFoundException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing; +package zext.plantuml.com.google.zxing; /** * Thrown when a barcode was not found in the image. It might have been diff --git a/src/ext/plantuml/com/google/zxing/ReaderException.java b/src/zext/plantuml/com/google/zxing/ReaderException.java similarity index 98% rename from src/ext/plantuml/com/google/zxing/ReaderException.java rename to src/zext/plantuml/com/google/zxing/ReaderException.java index 515d71776..8cd652ce1 100644 --- a/src/ext/plantuml/com/google/zxing/ReaderException.java +++ b/src/zext/plantuml/com/google/zxing/ReaderException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing; +package zext.plantuml.com.google.zxing; /** * The general exception class throw when something goes wrong during decoding of a barcode. diff --git a/src/ext/plantuml/com/google/zxing/ResultPoint.java b/src/zext/plantuml/com/google/zxing/ResultPoint.java similarity index 98% rename from src/ext/plantuml/com/google/zxing/ResultPoint.java rename to src/zext/plantuml/com/google/zxing/ResultPoint.java index 30a7eac9c..e71240e01 100644 --- a/src/ext/plantuml/com/google/zxing/ResultPoint.java +++ b/src/zext/plantuml/com/google/zxing/ResultPoint.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing; +package zext.plantuml.com.google.zxing; /** *

Encapsulates a point of interest in an image containing a barcode. Typically, this diff --git a/src/ext/plantuml/com/google/zxing/Writer.java b/src/zext/plantuml/com/google/zxing/Writer.java old mode 100755 new mode 100644 similarity index 94% rename from src/ext/plantuml/com/google/zxing/Writer.java rename to src/zext/plantuml/com/google/zxing/Writer.java index 90162a575..ae35c9629 --- a/src/ext/plantuml/com/google/zxing/Writer.java +++ b/src/zext/plantuml/com/google/zxing/Writer.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing; +package zext.plantuml.com.google.zxing; import java.util.Hashtable; -import ext.plantuml.com.google.zxing.common.BitMatrix; +import zext.plantuml.com.google.zxing.common.BitMatrix; /** * The base class for all objects which encode/generate a barcode image. diff --git a/src/ext/plantuml/com/google/zxing/WriterException.java b/src/zext/plantuml/com/google/zxing/WriterException.java similarity index 95% rename from src/ext/plantuml/com/google/zxing/WriterException.java rename to src/zext/plantuml/com/google/zxing/WriterException.java index e605dd6af..fce6ac922 100644 --- a/src/ext/plantuml/com/google/zxing/WriterException.java +++ b/src/zext/plantuml/com/google/zxing/WriterException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing; +package zext.plantuml.com.google.zxing; /** * A base class which covers the range of exceptions which may occur when encoding a barcode using diff --git a/src/ext/plantuml/com/google/zxing/client/j2se/MatrixToImageWriter.java b/src/zext/plantuml/com/google/zxing/client/j2se/MatrixToImageWriter.java similarity index 95% rename from src/ext/plantuml/com/google/zxing/client/j2se/MatrixToImageWriter.java rename to src/zext/plantuml/com/google/zxing/client/j2se/MatrixToImageWriter.java index b6668edad..0778a040a 100644 --- a/src/ext/plantuml/com/google/zxing/client/j2se/MatrixToImageWriter.java +++ b/src/zext/plantuml/com/google/zxing/client/j2se/MatrixToImageWriter.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.client.j2se; +package zext.plantuml.com.google.zxing.client.j2se; import java.awt.image.BufferedImage; -import ext.plantuml.com.google.zxing.common.BitMatrix; +import zext.plantuml.com.google.zxing.common.BitMatrix; /** * Writes a {@link BitMatrix} to {@link BufferedImage}, diff --git a/src/ext/plantuml/com/google/zxing/common/BitArray.java b/src/zext/plantuml/com/google/zxing/common/BitArray.java similarity index 99% rename from src/ext/plantuml/com/google/zxing/common/BitArray.java rename to src/zext/plantuml/com/google/zxing/common/BitArray.java index 4145f54c8..b8d795063 100644 --- a/src/ext/plantuml/com/google/zxing/common/BitArray.java +++ b/src/zext/plantuml/com/google/zxing/common/BitArray.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.common; +package zext.plantuml.com.google.zxing.common; /** *

A simple, fast array of bits, represented compactly by an array of ints internally.

diff --git a/src/ext/plantuml/com/google/zxing/common/BitMatrix.java b/src/zext/plantuml/com/google/zxing/common/BitMatrix.java similarity index 99% rename from src/ext/plantuml/com/google/zxing/common/BitMatrix.java rename to src/zext/plantuml/com/google/zxing/common/BitMatrix.java index 22712cb53..212d22f24 100644 --- a/src/ext/plantuml/com/google/zxing/common/BitMatrix.java +++ b/src/zext/plantuml/com/google/zxing/common/BitMatrix.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.common; +package zext.plantuml.com.google.zxing.common; /** *

Represents a 2D matrix of bits. In function arguments below, and throughout the common diff --git a/src/ext/plantuml/com/google/zxing/common/BitSource.java b/src/zext/plantuml/com/google/zxing/common/BitSource.java similarity index 98% rename from src/ext/plantuml/com/google/zxing/common/BitSource.java rename to src/zext/plantuml/com/google/zxing/common/BitSource.java index 50e39af77..c15f78afa 100644 --- a/src/ext/plantuml/com/google/zxing/common/BitSource.java +++ b/src/zext/plantuml/com/google/zxing/common/BitSource.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.common; +package zext.plantuml.com.google.zxing.common; /** *

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the diff --git a/src/ext/plantuml/com/google/zxing/common/CharacterSetECI.java b/src/zext/plantuml/com/google/zxing/common/CharacterSetECI.java similarity index 98% rename from src/ext/plantuml/com/google/zxing/common/CharacterSetECI.java rename to src/zext/plantuml/com/google/zxing/common/CharacterSetECI.java index f8520734d..1b01e8ff0 100644 --- a/src/ext/plantuml/com/google/zxing/common/CharacterSetECI.java +++ b/src/zext/plantuml/com/google/zxing/common/CharacterSetECI.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.common; +package zext.plantuml.com.google.zxing.common; import java.util.Hashtable; diff --git a/src/ext/plantuml/com/google/zxing/common/DecoderResult.java b/src/zext/plantuml/com/google/zxing/common/DecoderResult.java similarity index 92% rename from src/ext/plantuml/com/google/zxing/common/DecoderResult.java rename to src/zext/plantuml/com/google/zxing/common/DecoderResult.java index 97884c86b..864509b9a 100644 --- a/src/ext/plantuml/com/google/zxing/common/DecoderResult.java +++ b/src/zext/plantuml/com/google/zxing/common/DecoderResult.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.common; +package zext.plantuml.com.google.zxing.common; import java.util.Vector; -import ext.plantuml.com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; +import zext.plantuml.com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; /** *

Encapsulates the result of decoding a matrix of bits. This typically diff --git a/src/ext/plantuml/com/google/zxing/common/DetectorResult.java b/src/zext/plantuml/com/google/zxing/common/DetectorResult.java similarity index 92% rename from src/ext/plantuml/com/google/zxing/common/DetectorResult.java rename to src/zext/plantuml/com/google/zxing/common/DetectorResult.java index d62d4b6dc..38ac8016f 100644 --- a/src/ext/plantuml/com/google/zxing/common/DetectorResult.java +++ b/src/zext/plantuml/com/google/zxing/common/DetectorResult.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.common; +package zext.plantuml.com.google.zxing.common; -import ext.plantuml.com.google.zxing.ResultPoint; +import zext.plantuml.com.google.zxing.ResultPoint; /** *

Encapsulates the result of detecting a barcode in an image. This includes the raw diff --git a/src/ext/plantuml/com/google/zxing/common/ECI.java b/src/zext/plantuml/com/google/zxing/common/ECI.java similarity index 96% rename from src/ext/plantuml/com/google/zxing/common/ECI.java rename to src/zext/plantuml/com/google/zxing/common/ECI.java index 5414732e1..8046cd179 100644 --- a/src/ext/plantuml/com/google/zxing/common/ECI.java +++ b/src/zext/plantuml/com/google/zxing/common/ECI.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.common; +package zext.plantuml.com.google.zxing.common; /** * Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" diff --git a/src/ext/plantuml/com/google/zxing/common/StringUtils.java b/src/zext/plantuml/com/google/zxing/common/StringUtils.java similarity index 98% rename from src/ext/plantuml/com/google/zxing/common/StringUtils.java rename to src/zext/plantuml/com/google/zxing/common/StringUtils.java index fbb516f61..d3d501ece 100644 --- a/src/ext/plantuml/com/google/zxing/common/StringUtils.java +++ b/src/zext/plantuml/com/google/zxing/common/StringUtils.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.common; +package zext.plantuml.com.google.zxing.common; import java.util.Hashtable; -import ext.plantuml.com.google.zxing.DecodeHintType; +import zext.plantuml.com.google.zxing.DecodeHintType; /** * Common string-related functions. diff --git a/src/ext/plantuml/com/google/zxing/common/reedsolomon/GF256.java b/src/zext/plantuml/com/google/zxing/common/reedsolomon/GF256.java similarity index 98% rename from src/ext/plantuml/com/google/zxing/common/reedsolomon/GF256.java rename to src/zext/plantuml/com/google/zxing/common/reedsolomon/GF256.java index 3a726ace1..2c3973b88 100644 --- a/src/ext/plantuml/com/google/zxing/common/reedsolomon/GF256.java +++ b/src/zext/plantuml/com/google/zxing/common/reedsolomon/GF256.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.common.reedsolomon; +package zext.plantuml.com.google.zxing.common.reedsolomon; /** *

This class contains utility methods for performing mathematical operations over diff --git a/src/ext/plantuml/com/google/zxing/common/reedsolomon/GF256Poly.java b/src/zext/plantuml/com/google/zxing/common/reedsolomon/GF256Poly.java similarity index 99% rename from src/ext/plantuml/com/google/zxing/common/reedsolomon/GF256Poly.java rename to src/zext/plantuml/com/google/zxing/common/reedsolomon/GF256Poly.java index 29992842f..f4be25bd8 100644 --- a/src/ext/plantuml/com/google/zxing/common/reedsolomon/GF256Poly.java +++ b/src/zext/plantuml/com/google/zxing/common/reedsolomon/GF256Poly.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.common.reedsolomon; +package zext.plantuml.com.google.zxing.common.reedsolomon; /** *

Represents a polynomial whose coefficients are elements of GF(256). diff --git a/src/ext/plantuml/com/google/zxing/common/reedsolomon/ReedSolomonEncoder.java b/src/zext/plantuml/com/google/zxing/common/reedsolomon/ReedSolomonEncoder.java similarity index 97% rename from src/ext/plantuml/com/google/zxing/common/reedsolomon/ReedSolomonEncoder.java rename to src/zext/plantuml/com/google/zxing/common/reedsolomon/ReedSolomonEncoder.java index bdc62c87e..f08a12ed1 100644 --- a/src/ext/plantuml/com/google/zxing/common/reedsolomon/ReedSolomonEncoder.java +++ b/src/zext/plantuml/com/google/zxing/common/reedsolomon/ReedSolomonEncoder.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.common.reedsolomon; +package zext.plantuml.com.google.zxing.common.reedsolomon; import java.util.Vector; diff --git a/src/ext/plantuml/com/google/zxing/common/reedsolomon/ReedSolomonException.java b/src/zext/plantuml/com/google/zxing/common/reedsolomon/ReedSolomonException.java similarity index 93% rename from src/ext/plantuml/com/google/zxing/common/reedsolomon/ReedSolomonException.java rename to src/zext/plantuml/com/google/zxing/common/reedsolomon/ReedSolomonException.java index 65301ef3f..de9eb5d55 100644 --- a/src/ext/plantuml/com/google/zxing/common/reedsolomon/ReedSolomonException.java +++ b/src/zext/plantuml/com/google/zxing/common/reedsolomon/ReedSolomonException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.common.reedsolomon; +package zext.plantuml.com.google.zxing.common.reedsolomon; /** *

Thrown when an exception occurs during Reed-Solomon decoding, such as when diff --git a/src/ext/plantuml/com/google/zxing/datamatrix/decoder/BitMatrixParser.java b/src/zext/plantuml/com/google/zxing/datamatrix/decoder/BitMatrixParser.java similarity index 98% rename from src/ext/plantuml/com/google/zxing/datamatrix/decoder/BitMatrixParser.java rename to src/zext/plantuml/com/google/zxing/datamatrix/decoder/BitMatrixParser.java index 545e6332a..1d3e82147 100644 --- a/src/ext/plantuml/com/google/zxing/datamatrix/decoder/BitMatrixParser.java +++ b/src/zext/plantuml/com/google/zxing/datamatrix/decoder/BitMatrixParser.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.datamatrix.decoder; +package zext.plantuml.com.google.zxing.datamatrix.decoder; -import ext.plantuml.com.google.zxing.FormatException; -import ext.plantuml.com.google.zxing.common.BitMatrix; +import zext.plantuml.com.google.zxing.FormatException; +import zext.plantuml.com.google.zxing.common.BitMatrix; /** * @author bbrown@google.com (Brian Brown) diff --git a/src/ext/plantuml/com/google/zxing/datamatrix/decoder/DataBlock.java b/src/zext/plantuml/com/google/zxing/datamatrix/decoder/DataBlock.java similarity index 98% rename from src/ext/plantuml/com/google/zxing/datamatrix/decoder/DataBlock.java rename to src/zext/plantuml/com/google/zxing/datamatrix/decoder/DataBlock.java index 21a8d203f..5555b0f6c 100644 --- a/src/ext/plantuml/com/google/zxing/datamatrix/decoder/DataBlock.java +++ b/src/zext/plantuml/com/google/zxing/datamatrix/decoder/DataBlock.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.datamatrix.decoder; +package zext.plantuml.com.google.zxing.datamatrix.decoder; /** *

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into diff --git a/src/ext/plantuml/com/google/zxing/datamatrix/decoder/Version.java b/src/zext/plantuml/com/google/zxing/datamatrix/decoder/Version.java similarity index 98% rename from src/ext/plantuml/com/google/zxing/datamatrix/decoder/Version.java rename to src/zext/plantuml/com/google/zxing/datamatrix/decoder/Version.java index 94c9f1783..a2c2c6f45 100644 --- a/src/ext/plantuml/com/google/zxing/datamatrix/decoder/Version.java +++ b/src/zext/plantuml/com/google/zxing/datamatrix/decoder/Version.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.datamatrix.decoder; +package zext.plantuml.com.google.zxing.datamatrix.decoder; -import ext.plantuml.com.google.zxing.FormatException; +import zext.plantuml.com.google.zxing.FormatException; /** * The Version object encapsulates attributes about a particular diff --git a/src/ext/plantuml/com/google/zxing/package-info.java b/src/zext/plantuml/com/google/zxing/package-info.java similarity index 90% rename from src/ext/plantuml/com/google/zxing/package-info.java rename to src/zext/plantuml/com/google/zxing/package-info.java index a2d28d364..bd1914a8b 100644 --- a/src/ext/plantuml/com/google/zxing/package-info.java +++ b/src/zext/plantuml/com/google/zxing/package-info.java @@ -13,4 +13,4 @@ * @see net.sourceforge.plantuml.flashcode * */ -package ext.plantuml.com.google.zxing; +package zext.plantuml.com.google.zxing; diff --git a/src/ext/plantuml/com/google/zxing/qrcode/QRCodeWriter.java b/src/zext/plantuml/com/google/zxing/qrcode/QRCodeWriter.java similarity index 85% rename from src/ext/plantuml/com/google/zxing/qrcode/QRCodeWriter.java rename to src/zext/plantuml/com/google/zxing/qrcode/QRCodeWriter.java index be6e8e1f3..53b7f010c 100644 --- a/src/ext/plantuml/com/google/zxing/qrcode/QRCodeWriter.java +++ b/src/zext/plantuml/com/google/zxing/qrcode/QRCodeWriter.java @@ -14,19 +14,19 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.qrcode; +package zext.plantuml.com.google.zxing.qrcode; import java.util.Hashtable; -import ext.plantuml.com.google.zxing.BarcodeFormat; -import ext.plantuml.com.google.zxing.EncodeHintType; -import ext.plantuml.com.google.zxing.Writer; -import ext.plantuml.com.google.zxing.WriterException; -import ext.plantuml.com.google.zxing.common.BitMatrix; -import ext.plantuml.com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; -import ext.plantuml.com.google.zxing.qrcode.encoder.ByteMatrix; -import ext.plantuml.com.google.zxing.qrcode.encoder.Encoder; -import ext.plantuml.com.google.zxing.qrcode.encoder.QRCode; +import zext.plantuml.com.google.zxing.BarcodeFormat; +import zext.plantuml.com.google.zxing.EncodeHintType; +import zext.plantuml.com.google.zxing.Writer; +import zext.plantuml.com.google.zxing.WriterException; +import zext.plantuml.com.google.zxing.common.BitMatrix; +import zext.plantuml.com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; +import zext.plantuml.com.google.zxing.qrcode.encoder.ByteMatrix; +import zext.plantuml.com.google.zxing.qrcode.encoder.Encoder; +import zext.plantuml.com.google.zxing.qrcode.encoder.QRCode; /** * This object renders a QR Code as a BitMatrix 2D array of greyscale values. diff --git a/src/ext/plantuml/com/google/zxing/qrcode/decoder/BitMatrixParser.java b/src/zext/plantuml/com/google/zxing/qrcode/decoder/BitMatrixParser.java similarity index 97% rename from src/ext/plantuml/com/google/zxing/qrcode/decoder/BitMatrixParser.java rename to src/zext/plantuml/com/google/zxing/qrcode/decoder/BitMatrixParser.java index 3fe58c24d..3426a5ca1 100644 --- a/src/ext/plantuml/com/google/zxing/qrcode/decoder/BitMatrixParser.java +++ b/src/zext/plantuml/com/google/zxing/qrcode/decoder/BitMatrixParser.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.qrcode.decoder; +package zext.plantuml.com.google.zxing.qrcode.decoder; -import ext.plantuml.com.google.zxing.FormatException; -import ext.plantuml.com.google.zxing.common.BitMatrix; +import zext.plantuml.com.google.zxing.FormatException; +import zext.plantuml.com.google.zxing.common.BitMatrix; /** * @author Sean Owen diff --git a/src/ext/plantuml/com/google/zxing/qrcode/decoder/DataBlock.java b/src/zext/plantuml/com/google/zxing/qrcode/decoder/DataBlock.java similarity index 98% rename from src/ext/plantuml/com/google/zxing/qrcode/decoder/DataBlock.java rename to src/zext/plantuml/com/google/zxing/qrcode/decoder/DataBlock.java index b6f673cd0..00c932f6d 100644 --- a/src/ext/plantuml/com/google/zxing/qrcode/decoder/DataBlock.java +++ b/src/zext/plantuml/com/google/zxing/qrcode/decoder/DataBlock.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.qrcode.decoder; +package zext.plantuml.com.google.zxing.qrcode.decoder; /** *

Encapsulates a block of data within a QR Code. QR Codes may split their data into diff --git a/src/ext/plantuml/com/google/zxing/qrcode/decoder/DataMask.java b/src/zext/plantuml/com/google/zxing/qrcode/decoder/DataMask.java similarity index 97% rename from src/ext/plantuml/com/google/zxing/qrcode/decoder/DataMask.java rename to src/zext/plantuml/com/google/zxing/qrcode/decoder/DataMask.java index 85e96e72c..475cd4326 100644 --- a/src/ext/plantuml/com/google/zxing/qrcode/decoder/DataMask.java +++ b/src/zext/plantuml/com/google/zxing/qrcode/decoder/DataMask.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.qrcode.decoder; +package zext.plantuml.com.google.zxing.qrcode.decoder; -import ext.plantuml.com.google.zxing.common.BitMatrix; +import zext.plantuml.com.google.zxing.common.BitMatrix; /** *

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations diff --git a/src/ext/plantuml/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java b/src/zext/plantuml/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java similarity index 97% rename from src/ext/plantuml/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java rename to src/zext/plantuml/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java index 61760cc09..6eef3588e 100644 --- a/src/ext/plantuml/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java +++ b/src/zext/plantuml/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.qrcode.decoder; +package zext.plantuml.com.google.zxing.qrcode.decoder; /** *

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels diff --git a/src/ext/plantuml/com/google/zxing/qrcode/decoder/FormatInformation.java b/src/zext/plantuml/com/google/zxing/qrcode/decoder/FormatInformation.java similarity index 99% rename from src/ext/plantuml/com/google/zxing/qrcode/decoder/FormatInformation.java rename to src/zext/plantuml/com/google/zxing/qrcode/decoder/FormatInformation.java index 6ae6bb9bb..48f54308e 100644 --- a/src/ext/plantuml/com/google/zxing/qrcode/decoder/FormatInformation.java +++ b/src/zext/plantuml/com/google/zxing/qrcode/decoder/FormatInformation.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.qrcode.decoder; +package zext.plantuml.com.google.zxing.qrcode.decoder; /** *

Encapsulates a QR Code's format information, including the data mask used and diff --git a/src/ext/plantuml/com/google/zxing/qrcode/decoder/Mode.java b/src/zext/plantuml/com/google/zxing/qrcode/decoder/Mode.java similarity index 98% rename from src/ext/plantuml/com/google/zxing/qrcode/decoder/Mode.java rename to src/zext/plantuml/com/google/zxing/qrcode/decoder/Mode.java index 882a5c6ff..504e5da2f 100644 --- a/src/ext/plantuml/com/google/zxing/qrcode/decoder/Mode.java +++ b/src/zext/plantuml/com/google/zxing/qrcode/decoder/Mode.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.qrcode.decoder; +package zext.plantuml.com.google.zxing.qrcode.decoder; /** *

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which diff --git a/src/ext/plantuml/com/google/zxing/qrcode/decoder/Version.java b/src/zext/plantuml/com/google/zxing/qrcode/decoder/Version.java similarity index 99% rename from src/ext/plantuml/com/google/zxing/qrcode/decoder/Version.java rename to src/zext/plantuml/com/google/zxing/qrcode/decoder/Version.java index 93b073281..906233518 100644 --- a/src/ext/plantuml/com/google/zxing/qrcode/decoder/Version.java +++ b/src/zext/plantuml/com/google/zxing/qrcode/decoder/Version.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.qrcode.decoder; +package zext.plantuml.com.google.zxing.qrcode.decoder; -import ext.plantuml.com.google.zxing.FormatException; -import ext.plantuml.com.google.zxing.common.BitMatrix; +import zext.plantuml.com.google.zxing.FormatException; +import zext.plantuml.com.google.zxing.common.BitMatrix; /** * See ISO 18004:2006 Annex D diff --git a/src/ext/plantuml/com/google/zxing/qrcode/encoder/BlockPair.java b/src/zext/plantuml/com/google/zxing/qrcode/encoder/BlockPair.java similarity index 94% rename from src/ext/plantuml/com/google/zxing/qrcode/encoder/BlockPair.java rename to src/zext/plantuml/com/google/zxing/qrcode/encoder/BlockPair.java index b0e031213..1acf3a9b9 100644 --- a/src/ext/plantuml/com/google/zxing/qrcode/encoder/BlockPair.java +++ b/src/zext/plantuml/com/google/zxing/qrcode/encoder/BlockPair.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.qrcode.encoder; +package zext.plantuml.com.google.zxing.qrcode.encoder; final class BlockPair { diff --git a/src/ext/plantuml/com/google/zxing/qrcode/encoder/ByteMatrix.java b/src/zext/plantuml/com/google/zxing/qrcode/encoder/ByteMatrix.java similarity index 97% rename from src/ext/plantuml/com/google/zxing/qrcode/encoder/ByteMatrix.java rename to src/zext/plantuml/com/google/zxing/qrcode/encoder/ByteMatrix.java index e8c7e444e..e99b7e88b 100644 --- a/src/ext/plantuml/com/google/zxing/qrcode/encoder/ByteMatrix.java +++ b/src/zext/plantuml/com/google/zxing/qrcode/encoder/ByteMatrix.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.qrcode.encoder; +package zext.plantuml.com.google.zxing.qrcode.encoder; /** * A class which wraps a 2D array of bytes. The default usage is signed. If you want to use it as a diff --git a/src/ext/plantuml/com/google/zxing/qrcode/encoder/Encoder.java b/src/zext/plantuml/com/google/zxing/qrcode/encoder/Encoder.java similarity index 96% rename from src/ext/plantuml/com/google/zxing/qrcode/encoder/Encoder.java rename to src/zext/plantuml/com/google/zxing/qrcode/encoder/Encoder.java index 04ea0b667..c1fc1eb2b 100644 --- a/src/ext/plantuml/com/google/zxing/qrcode/encoder/Encoder.java +++ b/src/zext/plantuml/com/google/zxing/qrcode/encoder/Encoder.java @@ -14,22 +14,22 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.qrcode.encoder; +package zext.plantuml.com.google.zxing.qrcode.encoder; import java.io.UnsupportedEncodingException; import java.util.Hashtable; import java.util.Vector; -import ext.plantuml.com.google.zxing.EncodeHintType; -import ext.plantuml.com.google.zxing.WriterException; -import ext.plantuml.com.google.zxing.common.BitArray; -import ext.plantuml.com.google.zxing.common.CharacterSetECI; -import ext.plantuml.com.google.zxing.common.ECI; -import ext.plantuml.com.google.zxing.common.reedsolomon.GF256; -import ext.plantuml.com.google.zxing.common.reedsolomon.ReedSolomonEncoder; -import ext.plantuml.com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; -import ext.plantuml.com.google.zxing.qrcode.decoder.Mode; -import ext.plantuml.com.google.zxing.qrcode.decoder.Version; +import zext.plantuml.com.google.zxing.EncodeHintType; +import zext.plantuml.com.google.zxing.WriterException; +import zext.plantuml.com.google.zxing.common.BitArray; +import zext.plantuml.com.google.zxing.common.CharacterSetECI; +import zext.plantuml.com.google.zxing.common.ECI; +import zext.plantuml.com.google.zxing.common.reedsolomon.GF256; +import zext.plantuml.com.google.zxing.common.reedsolomon.ReedSolomonEncoder; +import zext.plantuml.com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; +import zext.plantuml.com.google.zxing.qrcode.decoder.Mode; +import zext.plantuml.com.google.zxing.qrcode.decoder.Version; /** * @author satorux@google.com (Satoru Takabayashi) - creator diff --git a/src/ext/plantuml/com/google/zxing/qrcode/encoder/MaskUtil.java b/src/zext/plantuml/com/google/zxing/qrcode/encoder/MaskUtil.java similarity index 99% rename from src/ext/plantuml/com/google/zxing/qrcode/encoder/MaskUtil.java rename to src/zext/plantuml/com/google/zxing/qrcode/encoder/MaskUtil.java index 4ccd48b6f..cb3c5bb36 100644 --- a/src/ext/plantuml/com/google/zxing/qrcode/encoder/MaskUtil.java +++ b/src/zext/plantuml/com/google/zxing/qrcode/encoder/MaskUtil.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.qrcode.encoder; +package zext.plantuml.com.google.zxing.qrcode.encoder; /** * @author satorux@google.com (Satoru Takabayashi) - creator diff --git a/src/ext/plantuml/com/google/zxing/qrcode/encoder/MatrixUtil.java b/src/zext/plantuml/com/google/zxing/qrcode/encoder/MatrixUtil.java similarity index 98% rename from src/ext/plantuml/com/google/zxing/qrcode/encoder/MatrixUtil.java rename to src/zext/plantuml/com/google/zxing/qrcode/encoder/MatrixUtil.java index bbf1c2245..d755bddf5 100644 --- a/src/ext/plantuml/com/google/zxing/qrcode/encoder/MatrixUtil.java +++ b/src/zext/plantuml/com/google/zxing/qrcode/encoder/MatrixUtil.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.qrcode.encoder; +package zext.plantuml.com.google.zxing.qrcode.encoder; -import ext.plantuml.com.google.zxing.WriterException; -import ext.plantuml.com.google.zxing.common.BitArray; -import ext.plantuml.com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; +import zext.plantuml.com.google.zxing.WriterException; +import zext.plantuml.com.google.zxing.common.BitArray; +import zext.plantuml.com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; /** * @author satorux@google.com (Satoru Takabayashi) - creator diff --git a/src/ext/plantuml/com/google/zxing/qrcode/encoder/QRCode.java b/src/zext/plantuml/com/google/zxing/qrcode/encoder/QRCode.java similarity index 97% rename from src/ext/plantuml/com/google/zxing/qrcode/encoder/QRCode.java rename to src/zext/plantuml/com/google/zxing/qrcode/encoder/QRCode.java index dae3e1dc4..cc9baa239 100644 --- a/src/ext/plantuml/com/google/zxing/qrcode/encoder/QRCode.java +++ b/src/zext/plantuml/com/google/zxing/qrcode/encoder/QRCode.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package ext.plantuml.com.google.zxing.qrcode.encoder; +package zext.plantuml.com.google.zxing.qrcode.encoder; -import ext.plantuml.com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; -import ext.plantuml.com.google.zxing.qrcode.decoder.Mode; +import zext.plantuml.com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; +import zext.plantuml.com.google.zxing.qrcode.decoder.Mode; /** * @author satorux@google.com (Satoru Takabayashi) - creator From b74f9634fbaa040352e319e9bf0a3a11e95ef3b7 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Sun, 19 Nov 2023 11:34:16 +0100 Subject: [PATCH 08/95] chore: restore lost readme.md files --- src/zext/plantuml/com/ctreber/acearth/readme.md | 12 ++++++++++++ src/zext/plantuml/com/google/zxing/readme.md | 15 +++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 src/zext/plantuml/com/ctreber/acearth/readme.md create mode 100644 src/zext/plantuml/com/google/zxing/readme.md diff --git a/src/zext/plantuml/com/ctreber/acearth/readme.md b/src/zext/plantuml/com/ctreber/acearth/readme.md new file mode 100644 index 000000000..2fc76d570 --- /dev/null +++ b/src/zext/plantuml/com/ctreber/acearth/readme.md @@ -0,0 +1,12 @@ +> [!WARNING] +> **Disclaimer**: +> This file was not part of the original package. +> It was included only on the PlantUML package to provide source citation and documentation. + +# Directory Documentation for `acearth` + +## Description +Internal copy of `AC.earth` - `XEarth` for Java _(code of Christian Treber)_. + +## See more information on +- [readme of `plantuml/acearth`](../../../../../net/sourceforge/plantuml/acearth/readme.md) diff --git a/src/zext/plantuml/com/google/zxing/readme.md b/src/zext/plantuml/com/google/zxing/readme.md new file mode 100644 index 000000000..fb27815b3 --- /dev/null +++ b/src/zext/plantuml/com/google/zxing/readme.md @@ -0,0 +1,15 @@ +> [!WARNING] +> **Disclaimer**: +> This file was not part of the original package. +> It was included only on the PlantUML package to provide source citation and documentation. + +# Directory Documentation for `zxing` + +## Description +Internal copy of `ZXing` _(code of Google)_. + +## Credit +- :octocat: [zxing/zxing](https://github.com/zxing/zxing) + +## See more information on +- [readme of `plantuml/flashcode`](../../../../../net/sourceforge/plantuml/flashcode/readme.md) From aea7e540aceba0a9d244923ab54efceccb1ac1f3 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Sun, 19 Nov 2023 11:48:47 +0100 Subject: [PATCH 09/95] chore: delete last ext files --- src/ext/plantuml/com/ctreber/acearth/readme.md | 12 ------------ src/ext/plantuml/com/google/zxing/readme.md | 15 --------------- 2 files changed, 27 deletions(-) delete mode 100644 src/ext/plantuml/com/ctreber/acearth/readme.md delete mode 100644 src/ext/plantuml/com/google/zxing/readme.md diff --git a/src/ext/plantuml/com/ctreber/acearth/readme.md b/src/ext/plantuml/com/ctreber/acearth/readme.md deleted file mode 100644 index 2fc76d570..000000000 --- a/src/ext/plantuml/com/ctreber/acearth/readme.md +++ /dev/null @@ -1,12 +0,0 @@ -> [!WARNING] -> **Disclaimer**: -> This file was not part of the original package. -> It was included only on the PlantUML package to provide source citation and documentation. - -# Directory Documentation for `acearth` - -## Description -Internal copy of `AC.earth` - `XEarth` for Java _(code of Christian Treber)_. - -## See more information on -- [readme of `plantuml/acearth`](../../../../../net/sourceforge/plantuml/acearth/readme.md) diff --git a/src/ext/plantuml/com/google/zxing/readme.md b/src/ext/plantuml/com/google/zxing/readme.md deleted file mode 100644 index fb27815b3..000000000 --- a/src/ext/plantuml/com/google/zxing/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -> [!WARNING] -> **Disclaimer**: -> This file was not part of the original package. -> It was included only on the PlantUML package to provide source citation and documentation. - -# Directory Documentation for `zxing` - -## Description -Internal copy of `ZXing` _(code of Google)_. - -## Credit -- :octocat: [zxing/zxing](https://github.com/zxing/zxing) - -## See more information on -- [readme of `plantuml/flashcode`](../../../../../net/sourceforge/plantuml/flashcode/readme.md) From d5e42c9d7ee11515b6e77c27b982cf0e79c884ee Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Sun, 19 Nov 2023 14:38:44 +0000 Subject: [PATCH 10/95] fix: change `readme.md` to `zext` dir --- src/{ext => zext}/plantuml/com/ctreber/readme.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/{ext => zext}/plantuml/com/ctreber/readme.md (100%) diff --git a/src/ext/plantuml/com/ctreber/readme.md b/src/zext/plantuml/com/ctreber/readme.md similarity index 100% rename from src/ext/plantuml/com/ctreber/readme.md rename to src/zext/plantuml/com/ctreber/readme.md From 54117a5e8ba0fe9d322a16201b9fbb4138afdfa3 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Sun, 19 Nov 2023 15:10:09 +0000 Subject: [PATCH 11/95] fix: fix some links to `zext` instead of `ext`. --- src/net/sourceforge/plantuml/acearth/package-info.java | 2 +- src/net/sourceforge/plantuml/acearth/readme.md | 4 ++-- src/net/sourceforge/plantuml/flashcode/package-info.java | 2 +- src/net/sourceforge/plantuml/flashcode/readme.md | 2 +- src/zext/plantuml/com/ctreber/acearth/package-info.java | 2 +- src/zext/plantuml/com/ctreber/acearth/scanbit/ScanBit.java | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/net/sourceforge/plantuml/acearth/package-info.java b/src/net/sourceforge/plantuml/acearth/package-info.java index ff8536d87..26683cf61 100644 --- a/src/net/sourceforge/plantuml/acearth/package-info.java +++ b/src/net/sourceforge/plantuml/acearth/package-info.java @@ -3,6 +3,6 @@ * * XEarth Image. * - * @see ext.plantuml.com.ctreber.acearth + * @see zext.plantuml.com.ctreber.acearth */ package net.sourceforge.plantuml.acearth; diff --git a/src/net/sourceforge/plantuml/acearth/readme.md b/src/net/sourceforge/plantuml/acearth/readme.md index a369bb7a5..e5d8f1c1a 100644 --- a/src/net/sourceforge/plantuml/acearth/readme.md +++ b/src/net/sourceforge/plantuml/acearth/readme.md @@ -3,7 +3,7 @@ ## Description This package provides classes used to generate [XEarth Image](https://plantuml.com/xearth). -The Java port of `XEarth` used in `PlantUML` is the [`AC.earth` of Christian Treber](../../../../ext/plantuml/com/ctreber/acearth/). +The Java port of `XEarth` used in `PlantUML` is the [`AC.earth` of Christian Treber](../../../../zext/plantuml/com/ctreber/acearth/). ## Link - [XEarth Image _(on `PlantUML`)_](https://plantuml.com/xearth) @@ -13,7 +13,7 @@ The Java port of `XEarth` used in `PlantUML` is the [`AC.earth` of Christian Tre - [`xearth` for Windows of Greg Hewgill](https://hewgill.com/xearth/) ## Credit -- [`AC.earth` of Christian Treber](../../../../ext/plantuml/com/ctreber/acearth/) +- [`AC.earth` of Christian Treber](../../../../zext/plantuml/com/ctreber/acearth/) - [AC Earth _(on Web Archive)_](https://web.archive.org/web/20180428011447/http://www.acproductions.de/acearth) ## Misc. diff --git a/src/net/sourceforge/plantuml/flashcode/package-info.java b/src/net/sourceforge/plantuml/flashcode/package-info.java index e016dc1c9..1d995313b 100644 --- a/src/net/sourceforge/plantuml/flashcode/package-info.java +++ b/src/net/sourceforge/plantuml/flashcode/package-info.java @@ -2,7 +2,7 @@ * Provides classes used to manage * Flashcode especially QR Code (on PlantUML). * - * @see ext.plantuml.com.google.zxing + * @see zext.plantuml.com.google.zxing * @see net.sourceforge.plantuml.klimt.creole.atom.AtomImg#createQrcode */ package net.sourceforge.plantuml.flashcode; diff --git a/src/net/sourceforge/plantuml/flashcode/readme.md b/src/net/sourceforge/plantuml/flashcode/readme.md index 5d49c3123..eac30f0ae 100644 --- a/src/net/sourceforge/plantuml/flashcode/readme.md +++ b/src/net/sourceforge/plantuml/flashcode/readme.md @@ -8,7 +8,7 @@ This package provides classes used to manage Flashcode especially QR Code (on Pl - [QR code _(on Wikipedia)_](https://en.wikipedia.org/wiki/QR_code) ## Credit -- [`com.google.zxing`](../../../../ext/plantuml/com/google/zxing/) _(included in PlantUML)_ +- [`com.google.zxing`](../../../../zext/plantuml/com/google/zxing/) _(included in PlantUML)_ - :octocat: [zxing/zxing](https://github.com/zxing/zxing) ## Misc. diff --git a/src/zext/plantuml/com/ctreber/acearth/package-info.java b/src/zext/plantuml/com/ctreber/acearth/package-info.java index b0da411ce..89c59c62e 100644 --- a/src/zext/plantuml/com/ctreber/acearth/package-info.java +++ b/src/zext/plantuml/com/ctreber/acearth/package-info.java @@ -9,7 +9,7 @@ * Internal copy of AC.earth - XEarth * for Java (code of Christian Treber). * - * @see ext.plantuml.com.ctreber.acearth.ACearth + * @see zext.plantuml.com.ctreber.acearth.ACearth * @see net.sourceforge.plantuml.acearth * */ diff --git a/src/zext/plantuml/com/ctreber/acearth/scanbit/ScanBit.java b/src/zext/plantuml/com/ctreber/acearth/scanbit/ScanBit.java index 13367fe0f..e101629ec 100644 --- a/src/zext/plantuml/com/ctreber/acearth/scanbit/ScanBit.java +++ b/src/zext/plantuml/com/ctreber/acearth/scanbit/ScanBit.java @@ -53,7 +53,7 @@ public class ScanBit implements Comparable /** *

See values for - * @see ext.plantuml.com.ctreber.acearth.util.Polygon + * @see zext.plantuml.com.ctreber.acearth.util.Polygon */ public int getType() { From 37714ac1e20cd232200151193996895d4a11c328 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Sun, 19 Nov 2023 15:37:20 +0000 Subject: [PATCH 12/95] docs: add `package-info.java` and `readme.md` (for `klimt/sprite`) --- .../plantuml/klimt/sprite/package-info.java | 10 ++++++++++ .../sourceforge/plantuml/klimt/sprite/readme.md | 14 ++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 src/net/sourceforge/plantuml/klimt/sprite/package-info.java create mode 100644 src/net/sourceforge/plantuml/klimt/sprite/readme.md diff --git a/src/net/sourceforge/plantuml/klimt/sprite/package-info.java b/src/net/sourceforge/plantuml/klimt/sprite/package-info.java new file mode 100644 index 000000000..53dd54d25 --- /dev/null +++ b/src/net/sourceforge/plantuml/klimt/sprite/package-info.java @@ -0,0 +1,10 @@ +/** + * Provides classes used to manage + * + * Sprite. + * + * @see net.sourceforge.plantuml.klimt.sprite.CommandListSprite + * @see net.sourceforge.plantuml.klimt.sprite.CommandStdlib + * + */ +package net.sourceforge.plantuml.klimt.sprite; diff --git a/src/net/sourceforge/plantuml/klimt/sprite/readme.md b/src/net/sourceforge/plantuml/klimt/sprite/readme.md new file mode 100644 index 000000000..314f10af7 --- /dev/null +++ b/src/net/sourceforge/plantuml/klimt/sprite/readme.md @@ -0,0 +1,14 @@ +# Directory Documentation for `sprite` + +## Description +This package provides classes used to manage [PlantUML Sprite](https://plantuml.com/sprite). + +## Link +- [PlantUML Sprite](https://plantuml.com/sprite) + +## Reference + +## See also +- [PlantUML Standard Library](https://plantuml.com/stdlib) +- [`stdlib`](../../../../../../stdlib/) +- :octocat: [plantuml/plantuml-stdlib](https://github.com/plantuml/plantuml-stdlib) From 8b5a1521e713c1637385251849dda47cd9dea2b0 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Thu, 23 Nov 2023 17:50:00 +0100 Subject: [PATCH 13/95] fix: several Gantt improvement https://forum.plantuml.net/18397/gantt-how-handle-resource-starts-terminates-specific-date https://forum.plantuml.net/17571/is-it-possible-to-set-gantt-tasks-to-be-incomplete-by-default?show=17571#q17571 https://forum.plantuml.net/18128/gantt-diagram-vertical-separator-styling?show=18128#q18128 --- gradle.properties | 2 +- skin/plantuml.skin | 5 + src/net/sourceforge/plantuml/OptionPrint.java | 130 ++++++++--------- .../plantuml/project/ConstantPlan.java | 6 + .../plantuml/project/GanttDiagram.java | 48 +++++- .../plantuml/project/GanttDiagramFactory.java | 2 + .../plantuml/project/LoadPlanable.java | 2 + .../plantuml/project/OpenClose.java | 25 ++++ .../plantuml/project/PlanUtils.java | 18 +++ .../project/TimeHeaderParameters.java | 13 +- .../project/command/CommandPrintBetween.java | 2 +- .../command/CommandTaskCompleteDefault.java | 84 +++++++++++ .../plantuml/project/core/Resource.java | 13 ++ .../plantuml/project/core/Task.java | 2 + .../plantuml/project/core/TaskGroup.java | 20 +++ .../plantuml/project/core/TaskImpl.java | 45 +++++- .../plantuml/project/core/TaskSeparator.java | 19 +++ .../plantuml/project/draw/ResourceDraw.java | 91 +----------- .../project/draw/ResourceDrawBasicImpl.java | 132 +++++++++++++++++ .../project/draw/ResourceDrawVersion2.java | 138 ++++++++++++++++++ .../project/draw/TaskDrawRegular.java | 6 +- .../plantuml/project/draw/TimeHeader.java | 66 ++++----- .../project/draw/TimeHeaderCalendar.java | 14 +- .../project/draw/TimeHeaderDaily.java | 30 ++-- .../project/draw/TimeHeaderMonthly.java | 41 +++--- .../project/draw/TimeHeaderQuarterly.java | 41 +++--- .../project/draw/TimeHeaderSimple.java | 55 +++---- .../project/draw/TimeHeaderWeekly.java | 36 ++--- .../project/draw/TimeHeaderYearly.java | 25 ++-- .../plantuml/project/lang/ComplementDate.java | 48 ++++-- .../project/lang/SentenceHappensDate.java | 2 +- .../project/lang/SentencePausesDate.java | 2 +- .../lang/SentenceTaskEndsAbsolute.java | 2 +- .../lang/SentenceTaskStartsAbsolute.java | 4 +- .../lang/SentenceTaskStartsOnlyRelative.java | 58 ++++++++ .../plantuml/project/lang/SubjectProject.java | 2 +- .../project/lang/SubjectResource.java | 39 ++++- .../project/lang/SubjectSeparator.java | 4 +- .../plantuml/project/lang/SubjectTask.java | 10 +- .../plantuml/project/lang/SubjectToday.java | 2 +- .../plantuml/project/lang/Verbs.java | 16 ++ .../solver/ImpossibleSolvingException.java | 44 ++++++ .../plantuml/project/solver/SolverImpl.java | 11 +- src/net/sourceforge/plantuml/style/SName.java | 3 +- .../sourceforge/plantuml/version/Version.java | 2 +- 45 files changed, 984 insertions(+), 376 deletions(-) create mode 100644 src/net/sourceforge/plantuml/project/command/CommandTaskCompleteDefault.java create mode 100644 src/net/sourceforge/plantuml/project/draw/ResourceDrawBasicImpl.java create mode 100644 src/net/sourceforge/plantuml/project/draw/ResourceDrawVersion2.java create mode 100644 src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsOnlyRelative.java create mode 100644 src/net/sourceforge/plantuml/project/solver/ImpossibleSolvingException.java diff --git a/gradle.properties b/gradle.properties index b1f62183a..2318ed74a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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.13beta2 +version = 1.2023.13beta3 org.gradle.workers.max = 3 \ No newline at end of file diff --git a/skin/plantuml.skin b/skin/plantuml.skin index 9f7920474..ecba3aa67 100644 --- a/skin/plantuml.skin +++ b/skin/plantuml.skin @@ -367,6 +367,11 @@ ganttDiagram { Margin 5 Padding 5 } + verticalSeparator { + LineThickness 2 + LineStyle 2-2 + LineColor black + } timeline { BackgroundColor transparent LineColor #C0C0C0 diff --git a/src/net/sourceforge/plantuml/OptionPrint.java b/src/net/sourceforge/plantuml/OptionPrint.java index df6938de7..984b8db51 100644 --- a/src/net/sourceforge/plantuml/OptionPrint.java +++ b/src/net/sourceforge/plantuml/OptionPrint.java @@ -85,83 +85,77 @@ public class OptionPrint { System.out.println("\t?\tone and only one character but '" + SFile.separator + "'"); System.out.println("\t**\tmeans any characters (used to recurse through directories)"); System.out.println(); - System.out.println("where options include:"); - System.out.println(" -darkmode\t\tTo use dark mode for diagrams"); - System.out.println(" -gui\t\tTo run the graphical user interface"); - System.out.println(" -tpng\t\tTo generate images using PNG format (default)"); - System.out.println(" -tsvg\t\tTo generate images using SVG format"); - System.out.println(" -teps\t\tTo generate images using EPS format"); - System.out.println(" -tpdf\t\tTo generate images using PDF format"); - System.out.println(" -tvdx\t\tTo generate images using VDX format"); - System.out.println(" -txmi\t\tTo generate XMI file for class diagram"); - System.out.println(" -tscxml\t\tTo generate SCXML file for state diagram"); - System.out.println(" -thtml\t\tTo generate HTML file for class diagram"); - System.out.println(" -ttxt\t\tTo generate images with ASCII art"); - System.out.println(" -tutxt\t\tTo generate images with ASCII art using Unicode characters"); - System.out.println(" -tlatex\t\tTo generate images using LaTeX/Tikz format"); - System.out.println(" -tlatex:nopreamble\tTo generate images using LaTeX/Tikz format without preamble"); - System.out.println(" -o[utput] \"dir\"\tTo generate images in the specified directory"); - System.out.println(" -DVAR1=value\tTo set a preprocessing variable as if '!define VAR1 value' were used"); - System.out.println(" -Sparam1=value\tTo set a skin parameter as if 'skinparam param1 value' were used"); - System.out.println(" -Ppragma1=value\tTo set pragma as if '!pragma pragma1 value' were used"); - // System.out.println(" -config \"file\"\tTo read the provided config file - // before each diagram"); final char separator = SFile.separatorChar; - System.out.println(" -I" + separator + "path" + separator + "to" + separator - + "file\tTo include file as if '!include file' were used"); - System.out.println( - " -I" + separator + "path" + separator + "to" + separator + "*.puml\tTo include files with pattern"); - System.out.println(" -theme xxx\t\tTo use a specific theme"); - System.out.println(" -charset xxx\tTo use a specific charset (default is " + charset + ")"); - System.out.println(" -e[x]clude pattern\tTo exclude files that match the provided pattern"); - System.out.println(" -metadata\t\tTo retrieve PlantUML sources from PNG images"); - System.out.println(" -nometadata\t\tTo NOT export metadata in PNG/SVG generated files"); + System.out.println("where options include:"); + System.out.println(" -author[s]\t\tTo print information about PlantUML authors"); System.out.println(" -checkmetadata\t\tSkip PNG files that don't need to be regenerated"); - System.out.println(" -version\t\tTo display information about PlantUML and Java versions"); - System.out.println(" -v[erbose]\t\tTo have log information"); - System.out.println(" -quiet\t\tTo NOT print error message into the console"); - System.out.println(" -debugsvek\t\tTo generate intermediate svek files"); - System.out.println(" -h[elp]\t\tTo display this help message"); - System.out.println(" -testdot\t\tTo test the installation of graphviz"); - System.out.println(" -graphvizdot \"exe\"\tTo specify dot executable"); - System.out.println(" -p[ipe]\t\tTo use stdin for PlantUML source and stdout for PNG/SVG/EPS generation"); - System.out.println( - " -encodesprite 4|8|16[z] \"file\"\tTo encode a sprite at gray level (z for compression) from an image"); - System.out.println(" -computeurl|-encodeurl\tTo compute the encoded URL of a PlantUML source file"); - System.out.println(" -decodeurl\t\tTo retrieve the PlantUML source from an encoded URL"); - System.out.println(" -syntax\t\tTo report any syntax error from standard input without generating images"); - System.out.println(" -language\t\tTo print the list of PlantUML keywords"); - // System.out.println(" -nosuggestengine\tTo disable the suggest engine when - // errors in diagrams"); System.out.println(" -checkonly\t\tTo check the syntax of files without generating images"); + System.out.println(" -charset xxx\tTo use a specific charset (default is " + charset + ")"); + System.out.println(" -computeurl|-encodeurl\tTo compute the encoded URL of a PlantUML source file"); + // System.out.println(" -config \"file\"\tTo read the provided config file + System.out.println(" -cypher\t\tTo cypher texts of diagrams so that you can share them"); + System.out.println(" -DVAR1=value\tTo set a preprocessing variable as if '!define VAR1 value' were used"); + System.out.println(" -darkmode\t\tTo use dark mode for diagrams"); + System.out.println(" -debugsvek\t\tTo generate intermediate svek files"); + System.out.println(" -decodeurl\t\tTo retrieve the PlantUML source from an encoded URL"); + System.out.println(" -disablestats\tTo disable statistics computation (default)"); + System.out.println(" -duration\t\tTo print the duration of complete diagrams processing"); + System.out.println(" -e[x]clude pattern\tTo exclude files that match the provided pattern"); + System.out.println(" -enablestats\tTo enable statistics computation"); + System.out.println(" -encodesprite 4|8|16[z] \"file\"\tTo encode a sprite at gray level (z for compression) from an image"); + System.out.println(" -extractstdlib\tTo extract PlantUML Standard Library into stdlib folder"); System.out.println(" -failfast\t\tTo stop processing as soon as a syntax error in diagram occurs"); System.out.println(" -failfast2\t\tTo do a first syntax check before processing files, to fail even faster"); - System.out.println(" -noerror\t\tTo skip images when error in diagrams"); - System.out.println(" -duration\t\tTo print the duration of complete diagrams processing"); + System.out.println(" -filedir xxx\tTo behave as if the PlantUML source is in this dir (only affects '-pipe' and PicoWeb 'POST /render')"); + System.out.println(" -filename \"example.puml\"\tTo override %filename% variable"); + System.out.println(" -graphvizdot \"exe\"\tTo specify dot executable"); + System.out.println(" -gui\t\tTo run the graphical user interface"); + System.out.println(" -h[elp]\t\tTo display this help message"); + System.out.println(" -htmlstats\t\tTo output general statistics in file plantuml-stats.html"); + System.out.println(" -I" + separator + "path" + separator + "to" + separator + "file\tTo include file as if '!include file' were used"); + System.out.println(" -I" + separator + "path" + separator + "to" + separator + "*.puml\tTo include files with pattern"); + System.out.println(" -language\t\tTo print the list of PlantUML keywords"); + System.out.println(" -loopstats\t\tTo continuously print statistics about usage"); + System.out.println(" -metadata\t\tTo retrieve PlantUML sources from PNG images"); System.out.println(" -nbthread N\t\tTo use (N) threads for processing"); System.out.println(" -nbthread auto\tTo use " + Option.defaultNbThreads() + " threads for processing"); - System.out - .println(" -timeout N\t\tProcessing timeout in (N) seconds. Defaults to 15 minutes (900 seconds)."); - System.out.println(" -author[s]\t\tTo print information about PlantUML authors"); + System.out.println(" -noerror\t\tTo skip images when error in diagrams"); + System.out.println(" -nometadata\t\tTo NOT export metadata in PNG/SVG generated files"); + System.out.println(" -o[utput] \"dir\"\tTo generate images in the specified directory"); System.out.println(" -overwrite\t\tTo allow to overwrite read only files"); - System.out.println(" -printfonts\t\tTo print fonts available on your system"); - System.out.println(" -enablestats\tTo enable statistics computation"); - System.out.println(" -disablestats\tTo disable statistics computation (default)"); - System.out.println(" -htmlstats\t\tTo output general statistics in file plantuml-stats.html"); - System.out.println(" -xmlstats\t\tTo output general statistics in file plantuml-stats.xml"); - System.out.println(" -realtimestats\tTo generate statistics on the fly rather than at the end"); - System.out.println(" -loopstats\t\tTo continuously print statistics about usage"); - System.out.println(" -splash\t\tTo display a splash screen with some progress bar"); - System.out.println(" -progress\t\tTo display a textual progress bar in console"); - System.out.println(" -pipeimageindex N\tTo generate the Nth image with pipe option"); - System.out.println(" -stdlib\t\tTo print standard library info"); - System.out.println(" -extractstdlib\tTo extract PlantUML Standard Library into stdlib folder"); - System.out.println( - " -filedir xxx\tTo behave as if the PlantUML source is in this dir (only affects '-pipe' and PicoWeb 'POST /render')"); - System.out.println(" -filename \"example.puml\"\tTo override %filename% variable"); - System.out.println(" -preproc\t\tTo output preprocessor text of diagrams"); - System.out.println(" -cypher\t\tTo cypher texts of diagrams so that you can share them"); + System.out.println(" -Ppragma1=value\tTo set pragma as if '!pragma pragma1 value' were used"); + System.out.println(" -p[ipe]\t\tTo use stdin for PlantUML source and stdout for PNG/SVG/EPS generation"); System.out.println(" -picoweb\t\tTo start internal HTTP Server. See https://plantuml.com/picoweb"); + System.out.println(" -pipeimageindex N\tTo generate the Nth image with pipe option"); + System.out.println(" -preproc\t\tTo output preprocessor text of diagrams"); + System.out.println(" -printfonts\t\tTo print fonts available on your system"); + System.out.println(" -progress\t\tTo display a textual progress bar in console"); + System.out.println(" -quiet\t\tTo NOT print error message into the console"); + System.out.println(" -realtimestats\tTo generate statistics on the fly rather than at the end"); + System.out.println(" -Sparam1=value\tTo set a skin parameter as if 'skinparam param1 value' were used"); + System.out.println(" -splash\t\tTo display a splash screen with some progress bar"); + System.out.println(" -stdlib\t\tTo print standard library info"); + System.out.println(" -syntax\t\tTo report any syntax error from standard input without generating images"); + System.out.println(" -testdot\t\tTo test the installation of graphviz"); + System.out.println(" -theme xxx\t\tTo use a specific theme"); + System.out.println(" -timeout N\t\tProcessing timeout in (N) seconds. Defaults to 15 minutes (900 seconds)."); + System.out.println(" -teps\t\tTo generate images using EPS format"); + System.out.println(" -testdot\t\tTo test the installation of graphviz"); + System.out.println(" -theme xxx\t\tTo use a specific theme"); + System.out.println(" -thtml\t\tTo generate HTML file for class diagram"); + System.out.println(" -tlatex:nopreamble\tTo generate images using LaTeX/Tikz format without preamble"); + System.out.println(" -tlatex\t\tTo generate images using LaTeX/Tikz format"); + System.out.println(" -tpdf\t\tTo generate images using PDF format"); + System.out.println(" -tpng\t\tTo generate images using PNG format (default)"); + System.out.println(" -tscxml\t\tTo generate SCXML file for state diagram"); + System.out.println(" -tsvg\t\tTo generate images using SVG format"); + System.out.println(" -ttxt\t\tTo generate images with ASCII art"); + System.out.println(" -tutxt\t\tTo generate images with ASCII art using Unicode characters"); + System.out.println(" -tvdx\t\tTo generate images using VDX format"); + System.out.println(" -txmi\t\tTo generate XMI file for class diagram"); + System.out.println(" -v[erbose]\t\tTo have log information"); + System.out.println(" -version\t\tTo display information about PlantUML and Java versions"); + System.out.println(" -xmlstats\t\tTo output general statistics in file plantuml-stats.xml"); System.out.println(); System.out.println("If needed, you can setup the environment variable GRAPHVIZ_DOT."); exit(0); diff --git a/src/net/sourceforge/plantuml/project/ConstantPlan.java b/src/net/sourceforge/plantuml/project/ConstantPlan.java index 67ebf79eb..0d0b74b3c 100644 --- a/src/net/sourceforge/plantuml/project/ConstantPlan.java +++ b/src/net/sourceforge/plantuml/project/ConstantPlan.java @@ -53,8 +53,14 @@ public class ConstantPlan implements LoadPlanable { return new ConstantPlan(load); } + @Override public int getLoadAt(Day instant) { return loadPerInstant; } + + @Override + public Day getLastDayIfAny() { + return null; + } } diff --git a/src/net/sourceforge/plantuml/project/GanttDiagram.java b/src/net/sourceforge/plantuml/project/GanttDiagram.java index fdc8a18c0..b3207c3df 100644 --- a/src/net/sourceforge/plantuml/project/GanttDiagram.java +++ b/src/net/sourceforge/plantuml/project/GanttDiagram.java @@ -86,6 +86,7 @@ import net.sourceforge.plantuml.project.core.TaskInstant; import net.sourceforge.plantuml.project.core.TaskSeparator; import net.sourceforge.plantuml.project.draw.FingerPrint; import net.sourceforge.plantuml.project.draw.ResourceDraw; +import net.sourceforge.plantuml.project.draw.ResourceDrawVersion2; import net.sourceforge.plantuml.project.draw.TaskDraw; import net.sourceforge.plantuml.project.draw.TaskDrawDiamond; import net.sourceforge.plantuml.project.draw.TaskDrawGroup; @@ -99,6 +100,7 @@ import net.sourceforge.plantuml.project.draw.TimeHeaderSimple; import net.sourceforge.plantuml.project.draw.TimeHeaderWeekly; import net.sourceforge.plantuml.project.draw.TimeHeaderYearly; import net.sourceforge.plantuml.project.lang.CenterBorderColor; +import net.sourceforge.plantuml.project.solver.ImpossibleSolvingException; import net.sourceforge.plantuml.project.time.Day; import net.sourceforge.plantuml.project.time.DayOfWeek; import net.sourceforge.plantuml.project.time.WeekNumberStrategy; @@ -149,6 +151,8 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit private final RealOrigin origin = RealUtils.createOrigin(); + private int defaultCompletion = 100; + public CommandExecutionResult changeLanguage(String lang) { this.locale = new Locale(lang); return CommandExecutionResult.ok(); @@ -202,6 +206,16 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit return false; } + @Override + public String checkFinalError() { + try { + initMinMax(); + } catch (ImpossibleSolvingException ex) { + return ex.getMessage(); + } + return null; + } + @Override protected TextBlock getTextBlock() { final FileFormatOption fileFormatOption = new FileFormatOption(FileFormat.PNG); @@ -312,7 +326,8 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit private TimeHeaderParameters thParam() { return new TimeHeaderParameters(colorDays(), getFactorScale(), min, max, getIHtmlColorSet(), getTimelineStyle(), - getClosedStyle(), locale, openClose, colorDaysOfWeek, verticalSeparatorBefore); + getClosedStyle(), locale, openClose, colorDaysOfWeek, verticalSeparatorBefore, + getVerticalSeparatorStyle()); } private Map colorDays() { @@ -330,6 +345,11 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit .getMergedStyle(getCurrentStyleBuilder()); } + private Style getVerticalSeparatorStyle() { + return StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, SName.verticalSeparator) + .getMergedStyle(getCurrentStyleBuilder()); + } + private double getTotalHeight(TimeHeader timeHeader) { if (showFootbox) return totalHeightWithoutFooter + timeHeader.getTimeFooterHeight(); @@ -457,14 +477,19 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit yy = headerHeight; } else if (this.hideResourceFoobox == false) for (Resource res : resources.values()) { - final ResourceDraw draw = new ResourceDraw(this, res, timeScale, yy, min, max); + final ResourceDraw draw = buildResourceDraw(this, res, timeScale, yy, min, max); res.setTaskDraw(draw); - yy += draw.getHeight(); + yy += draw.getHeight(stringBounder); } this.totalHeightWithoutFooter = yy; } + private ResourceDraw buildResourceDraw(GanttDiagram gantt, Resource res, TimeScale timeScale, double y, Day min, + Day max) { + return new ResourceDrawVersion2(gantt, res, timeScale, y, min, max); + } + private Collection getConstraints(Task task) { final List result = new ArrayList<>(); for (GanttConstraint constraint : constraints) { @@ -603,7 +628,7 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit final OpenClose except = this.openCloseForTask.get(codeOrShortName); result = new TaskImpl(getSkinParam().getCurrentStyleBuilder(), code, openClose.mutateMe(except), - openClose.getStartingDay()); + openClose.getStartingDay(), defaultCompletion); if (currentGroup != null) currentGroup.addTask(result); @@ -866,4 +891,19 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit verticalSeparatorBefore.add(day); } + public void setTaskDefaultCompletion(int defaultCompletion) { + this.defaultCompletion = defaultCompletion; + } + + public List getAllTasksForResource(Resource res) { + final List result = new ArrayList(); + for (Task task : tasks.values()) + if (task.isAssignedTo(res)) { + final TaskDrawRegular draw = (TaskDrawRegular) draws.get(task); + result.add(draw); + } + + return Collections.unmodifiableList(result); + } + } diff --git a/src/net/sourceforge/plantuml/project/GanttDiagramFactory.java b/src/net/sourceforge/plantuml/project/GanttDiagramFactory.java index 392990439..eb7d662d3 100644 --- a/src/net/sourceforge/plantuml/project/GanttDiagramFactory.java +++ b/src/net/sourceforge/plantuml/project/GanttDiagramFactory.java @@ -59,6 +59,7 @@ import net.sourceforge.plantuml.project.command.CommandNoteBottom; import net.sourceforge.plantuml.project.command.CommandPrintBetween; import net.sourceforge.plantuml.project.command.CommandPrintScale; import net.sourceforge.plantuml.project.command.CommandSeparator; +import net.sourceforge.plantuml.project.command.CommandTaskCompleteDefault; import net.sourceforge.plantuml.project.command.CommandWeekNumberStrategy; import net.sourceforge.plantuml.project.command.NaturalCommand; import net.sourceforge.plantuml.project.lang.SentenceAnd; @@ -115,6 +116,7 @@ public class GanttDiagramFactory extends PSystemCommandFactory { cmds.add(new CommandLabelOnColumn()); cmds.add(new CommandHideResourceName()); cmds.add(new CommandHideResourceFootbox()); + cmds.add(new CommandTaskCompleteDefault()); } private void addLanguageCommands(List cmd) { diff --git a/src/net/sourceforge/plantuml/project/LoadPlanable.java b/src/net/sourceforge/plantuml/project/LoadPlanable.java index d8e71f71d..76ad4c539 100644 --- a/src/net/sourceforge/plantuml/project/LoadPlanable.java +++ b/src/net/sourceforge/plantuml/project/LoadPlanable.java @@ -40,4 +40,6 @@ import net.sourceforge.plantuml.project.time.Day; public interface LoadPlanable { public int getLoadAt(Day instant); + + public Day getLastDayIfAny(); } diff --git a/src/net/sourceforge/plantuml/project/OpenClose.java b/src/net/sourceforge/plantuml/project/OpenClose.java index 1e8afbf65..7d0256c6d 100644 --- a/src/net/sourceforge/plantuml/project/OpenClose.java +++ b/src/net/sourceforge/plantuml/project/OpenClose.java @@ -49,6 +49,8 @@ public class OpenClose implements Histogram, LoadPlanable { private final Map weekdayStatus = new EnumMap<>(DayOfWeek.class); private final Map dayStatus = new HashMap<>(); private Day startingDay; + private Day offBefore; + private Day offAfter; public int daysInWeek() { int result = 7; @@ -89,6 +91,11 @@ public class OpenClose implements Histogram, LoadPlanable { } private DayStatus getLocalStatus(Day day) { + if (offBefore != null && day.compareTo(offBefore) < 0) + return DayStatus.CLOSE; + if (offAfter != null && day.compareTo(offAfter) > 0) + return DayStatus.CLOSE; + final DayStatus status1 = dayStatus.get(day); if (status1 != null) return status1; @@ -174,6 +181,14 @@ public class OpenClose implements Histogram, LoadPlanable { return getLoatAtInternal(day); } + public void setOffBeforeDate(Day day) { + this.offBefore = day; + } + + public void setOffAfterDate(Day day) { + this.offAfter = day; + } + private int getLoatAtInternal(Day day) { if (isClosed(day)) return 0; @@ -193,8 +208,18 @@ public class OpenClose implements Histogram, LoadPlanable { return 100; return OpenClose.this.getLoadAt(instant); } + + @Override + public Day getLastDayIfAny() { + return offAfter; + } }; return this; } + @Override + public Day getLastDayIfAny() { + return offAfter; + } + } diff --git a/src/net/sourceforge/plantuml/project/PlanUtils.java b/src/net/sourceforge/plantuml/project/PlanUtils.java index b80f591b8..d75adfd5e 100644 --- a/src/net/sourceforge/plantuml/project/PlanUtils.java +++ b/src/net/sourceforge/plantuml/project/PlanUtils.java @@ -48,6 +48,10 @@ public class PlanUtils { public int getLoadAt(Day instant) { return Math.min(p1.getLoadAt(instant), p2.getLoadAt(instant)); } + + public Day getLastDayIfAny() { + return lastOf(p1.getLastDayIfAny(), p2.getLastDayIfAny()); + } }; } @@ -56,7 +60,21 @@ public class PlanUtils { public int getLoadAt(Day instant) { return p1.getLoadAt(instant) * p2.getLoadAt(instant) / 100; } + + public Day getLastDayIfAny() { + return lastOf(p1.getLastDayIfAny(), p2.getLastDayIfAny()); + } }; } + private static Day lastOf(Day day1, Day day2) { + if (day1 == null) + return day2; + if (day2 == null) + return day1; + if (day1.compareTo(day2) > 0) + return day1; + return day2; + } + } diff --git a/src/net/sourceforge/plantuml/project/TimeHeaderParameters.java b/src/net/sourceforge/plantuml/project/TimeHeaderParameters.java index 95bcdd4f4..d19da40ce 100644 --- a/src/net/sourceforge/plantuml/project/TimeHeaderParameters.java +++ b/src/net/sourceforge/plantuml/project/TimeHeaderParameters.java @@ -39,10 +39,13 @@ import java.util.Locale; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.klimt.UStroke; import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.HColorSet; +import net.sourceforge.plantuml.klimt.drawing.UGraphic; import net.sourceforge.plantuml.project.time.Day; import net.sourceforge.plantuml.project.time.DayOfWeek; +import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.Style; public class TimeHeaderParameters { @@ -54,6 +57,7 @@ public class TimeHeaderParameters { private final HColorSet colorSet; private final Style timelineStyle; private final Style closedStyle; + private final Style verticalSeparatorStyle; private final Locale locale; private final OpenClose openClose; private final Map colorDaysOfWeek; @@ -61,7 +65,7 @@ public class TimeHeaderParameters { public TimeHeaderParameters(Map colorDays, double scale, Day min, Day max, HColorSet colorSet, Style timelineStyle, Style closedStyle, Locale locale, OpenClose openClose, - Map colorDaysOfWeek, Set verticalSeparatorBefore) { + Map colorDaysOfWeek, Set verticalSeparatorBefore, Style verticalSeparatorStyle) { this.colorDays = colorDays; this.scale = scale; this.min = min; @@ -73,6 +77,7 @@ public class TimeHeaderParameters { this.openClose = openClose; this.colorDaysOfWeek = colorDaysOfWeek; this.verticalSeparatorBefore = verticalSeparatorBefore; + this.verticalSeparatorStyle = verticalSeparatorStyle; } public HColor getColor(Day wink) { @@ -123,4 +128,10 @@ public class TimeHeaderParameters { return verticalSeparatorBefore; } + public final UGraphic forVerticalSeparator(UGraphic ug) { + final HColor color = verticalSeparatorStyle.value(PName.LineColor).asColor(getColorSet()); + final UStroke stroke = verticalSeparatorStyle.getStroke(); + return ug.apply(color).apply(stroke); + } + } diff --git a/src/net/sourceforge/plantuml/project/command/CommandPrintBetween.java b/src/net/sourceforge/plantuml/project/command/CommandPrintBetween.java index cc0412fb2..f13460e09 100644 --- a/src/net/sourceforge/plantuml/project/command/CommandPrintBetween.java +++ b/src/net/sourceforge/plantuml/project/command/CommandPrintBetween.java @@ -48,7 +48,7 @@ import net.sourceforge.plantuml.utils.LineLocation; public class CommandPrintBetween extends SingleLineCommand2 { - private static final ComplementDate pattern = new ComplementDate(); + private static final ComplementDate pattern = ComplementDate.any(); public CommandPrintBetween() { super(getRegexConcat()); diff --git a/src/net/sourceforge/plantuml/project/command/CommandTaskCompleteDefault.java b/src/net/sourceforge/plantuml/project/command/CommandTaskCompleteDefault.java new file mode 100644 index 000000000..aeec499cd --- /dev/null +++ b/src/net/sourceforge/plantuml/project/command/CommandTaskCompleteDefault.java @@ -0,0 +1,84 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.project.command; + +import net.sourceforge.plantuml.command.CommandExecutionResult; +import net.sourceforge.plantuml.command.SingleLineCommand2; +import net.sourceforge.plantuml.klimt.color.NoSuchColorException; +import net.sourceforge.plantuml.project.GanttDiagram; +import net.sourceforge.plantuml.regex.IRegex; +import net.sourceforge.plantuml.regex.RegexConcat; +import net.sourceforge.plantuml.regex.RegexLeaf; +import net.sourceforge.plantuml.regex.RegexOr; +import net.sourceforge.plantuml.regex.RegexResult; +import net.sourceforge.plantuml.utils.LineLocation; + +public class CommandTaskCompleteDefault extends SingleLineCommand2 { + + public CommandTaskCompleteDefault() { + super(getRegexConcat()); + } + + static IRegex getRegexConcat() { + return RegexConcat.build(CommandTaskCompleteDefault.class.getName(), RegexLeaf.start(), // + new RegexLeaf("task"), // + RegexLeaf.spaceOneOrMore(), // + new RegexOr(// + new RegexLeaf("default[%s]+completion"), // + new RegexLeaf("completion[%s]+default")), // + RegexLeaf.spaceOneOrMore(), // + new RegexLeaf("to"), // + RegexLeaf.spaceOneOrMore(), // + new RegexLeaf("VALUE", "(\\d+)"), // + new RegexLeaf(".*"), // + RegexLeaf.spaceZeroOrMore(), // + RegexLeaf.end()); + } + + @Override + protected CommandExecutionResult executeArg(GanttDiagram diagram, LineLocation location, RegexResult arg) + throws NoSuchColorException { + + final int value = Integer.parseInt(arg.get("VALUE", 0)); + if (value > 100) + return CommandExecutionResult.error("Completetion must between 0 and 100"); + + diagram.setTaskDefaultCompletion(value); + + return CommandExecutionResult.ok(); + } + +} diff --git a/src/net/sourceforge/plantuml/project/core/Resource.java b/src/net/sourceforge/plantuml/project/core/Resource.java index 687b479a2..594209158 100644 --- a/src/net/sourceforge/plantuml/project/core/Resource.java +++ b/src/net/sourceforge/plantuml/project/core/Resource.java @@ -94,4 +94,17 @@ public class Resource { public void addCloseDay(DayOfWeek day) { openClose.close(day); } + + public void setOffBeforeDate(Day day) { + openClose.setOffBeforeDate(day); + } + + public void setOffAfterDate(Day day) { + openClose.setOffAfterDate(day); + } + + public Day getLastDayIfAny() { + return openClose.getLastDayIfAny(); + } + } diff --git a/src/net/sourceforge/plantuml/project/core/Task.java b/src/net/sourceforge/plantuml/project/core/Task.java index 653cff0d2..178b6283e 100644 --- a/src/net/sourceforge/plantuml/project/core/Task.java +++ b/src/net/sourceforge/plantuml/project/core/Task.java @@ -79,4 +79,6 @@ public interface Task extends Moment { public StyleBuilder getStyleBuilder(); + public boolean isAssignedTo(Resource res); + } diff --git a/src/net/sourceforge/plantuml/project/core/TaskGroup.java b/src/net/sourceforge/plantuml/project/core/TaskGroup.java index 804e08bf1..b8d1e8c49 100644 --- a/src/net/sourceforge/plantuml/project/core/TaskGroup.java +++ b/src/net/sourceforge/plantuml/project/core/TaskGroup.java @@ -56,6 +56,7 @@ public class TaskGroup extends AbstractTask implements Task { this.parent = parent; } + @Override public Day getStart() { Day min = null; for (Task child : children) @@ -68,6 +69,7 @@ public class TaskGroup extends AbstractTask implements Task { throw new UnsupportedOperationException(); } + @Override public Day getEnd() { Day max = null; for (Task child : children) @@ -80,54 +82,67 @@ public class TaskGroup extends AbstractTask implements Task { throw new UnsupportedOperationException(); } + @Override public void setStart(Day start) { throw new UnsupportedOperationException(); } + @Override public void setEnd(Day end) { throw new UnsupportedOperationException(); } + @Override public void setColors(CenterBorderColor... colors) { throw new UnsupportedOperationException(); } + @Override public void addResource(Resource resource, int percentage) { throw new UnsupportedOperationException(); } + @Override public Load getLoad() { throw new UnsupportedOperationException(); } + @Override public void setLoad(Load load) { throw new UnsupportedOperationException(); } + @Override public void setDiamond(boolean diamond) { throw new UnsupportedOperationException(); } + @Override public boolean isDiamond() { throw new UnsupportedOperationException(); } + @Override public void setCompletion(int completion) { throw new UnsupportedOperationException(); } + @Override public void setUrl(Url url) { throw new UnsupportedOperationException(); } + @Override public void addPause(Day pause) { throw new UnsupportedOperationException(); } + @Override public void addPause(DayOfWeek pause) { throw new UnsupportedOperationException(); } + @Override public void setNote(Display note) { } @@ -139,4 +154,9 @@ public class TaskGroup extends AbstractTask implements Task { return parent; } + @Override + public boolean isAssignedTo(Resource res) { + return false; + } + } diff --git a/src/net/sourceforge/plantuml/project/core/TaskImpl.java b/src/net/sourceforge/plantuml/project/core/TaskImpl.java index 491a3dbc1..a3db7f866 100644 --- a/src/net/sourceforge/plantuml/project/core/TaskImpl.java +++ b/src/net/sourceforge/plantuml/project/core/TaskImpl.java @@ -66,7 +66,7 @@ public class TaskImpl extends AbstractTask implements Task, LoadPlanable { private final LoadPlanable defaultPlan; private boolean diamond; - private int completion = 100; + private int completion; private Display note; private Url url; @@ -76,8 +76,9 @@ public class TaskImpl extends AbstractTask implements Task, LoadPlanable { this.url = url; } - public TaskImpl(StyleBuilder styleBuilder, TaskCode code, LoadPlanable plan, Day startingDay) { + public TaskImpl(StyleBuilder styleBuilder, TaskCode code, LoadPlanable plan, Day startingDay, int completion) { super(styleBuilder, code); + this.completion = completion; this.defaultPlan = plan; this.solver = new SolverImpl(this); if (startingDay == null) @@ -88,6 +89,7 @@ public class TaskImpl extends AbstractTask implements Task, LoadPlanable { setLoad(Load.inWinks(1)); } + @Override public int getLoadAt(Day instant) { if (isPaused(instant)) return 0; @@ -131,10 +133,12 @@ public class TaskImpl extends AbstractTask implements Task, LoadPlanable { return 0; } + @Override public void addPause(Day pause) { this.pausedDay.add(pause); } + @Override public void addPause(DayOfWeek pause) { this.pausedDayOfWeek.add(pause); } @@ -156,9 +160,29 @@ public class TaskImpl extends AbstractTask implements Task, LoadPlanable { } return result; } + + @Override + public Day getLastDayIfAny() { + return TaskImpl.this.getLastDayIfAny(); + } }; } + @Override + public Day getLastDayIfAny() { + Day result = null; + + for (Resource res : resources.keySet()) { + if (res.getLastDayIfAny() == null) + return null; + + if (result == null || result.compareTo(res.getLastDayIfAny()) < 0) + result = res.getLastDayIfAny(); + } + + return result; + } + public String getPrettyDisplay() { if (resources.size() > 0) { final StringBuilder result = new StringBuilder(getCode().getSimpleDisplay()); @@ -190,6 +214,7 @@ public class TaskImpl extends AbstractTask implements Task, LoadPlanable { return "" + getStart() + " ---> " + getEnd() + " [" + getLoad() + "]"; } + @Override public Day getStart() { Day result = (Day) solver.getData(TaskAttribute.START); if (diamond == false) @@ -199,42 +224,52 @@ public class TaskImpl extends AbstractTask implements Task, LoadPlanable { return result; } + @Override public Day getEnd() { return (Day) solver.getData(TaskAttribute.END); } + @Override public Load getLoad() { return (Load) solver.getData(TaskAttribute.LOAD); } + @Override public void setLoad(Load load) { solver.setData(TaskAttribute.LOAD, load); } + @Override public void setStart(Day start) { solver.setData(TaskAttribute.START, start); } + @Override public void setEnd(Day end) { solver.setData(TaskAttribute.END, end); } + @Override public void setColors(CenterBorderColor... colors) { this.colors = colors; } + @Override public void addResource(Resource resource, int percentage) { this.resources.put(resource, percentage); } + @Override public void setDiamond(boolean diamond) { this.diamond = diamond; } + @Override public boolean isDiamond() { return this.diamond; } + @Override public void setCompletion(int completion) { this.completion = completion; } @@ -274,6 +309,7 @@ public class TaskImpl extends AbstractTask implements Task, LoadPlanable { } + @Override public void setNote(Display note) { this.note = note; } @@ -286,4 +322,9 @@ public class TaskImpl extends AbstractTask implements Task, LoadPlanable { return defaultPlan; } + @Override + public boolean isAssignedTo(Resource res) { + return resources.containsKey(res); + } + } diff --git a/src/net/sourceforge/plantuml/project/core/TaskSeparator.java b/src/net/sourceforge/plantuml/project/core/TaskSeparator.java index fcf21d64a..68b30a326 100644 --- a/src/net/sourceforge/plantuml/project/core/TaskSeparator.java +++ b/src/net/sourceforge/plantuml/project/core/TaskSeparator.java @@ -52,22 +52,27 @@ public class TaskSeparator extends AbstractTask implements Task { this.comment = comment; } + @Override public Day getStart() { throw new UnsupportedOperationException(); } + @Override public Day getEnd() { throw new UnsupportedOperationException(); } + @Override public void setStart(Day start) { throw new UnsupportedOperationException(); } + @Override public void setEnd(Day end) { throw new UnsupportedOperationException(); } + @Override public void setColors(CenterBorderColor... colors) { throw new UnsupportedOperationException(); } @@ -76,10 +81,12 @@ public class TaskSeparator extends AbstractTask implements Task { return comment; } + @Override public void addResource(Resource resource, int percentage) { throw new UnsupportedOperationException(); } + @Override public Load getLoad() { throw new UnsupportedOperationException(); } @@ -88,31 +95,43 @@ public class TaskSeparator extends AbstractTask implements Task { throw new UnsupportedOperationException(); } + @Override public void setDiamond(boolean diamond) { throw new UnsupportedOperationException(); } + @Override public boolean isDiamond() { throw new UnsupportedOperationException(); } + @Override public void setCompletion(int completion) { throw new UnsupportedOperationException(); } + @Override public void setUrl(Url url) { throw new UnsupportedOperationException(); } + @Override public void addPause(Day pause) { throw new UnsupportedOperationException(); } + @Override public void addPause(DayOfWeek pause) { throw new UnsupportedOperationException(); } + @Override public void setNote(Display note) { } + @Override + public boolean isAssignedTo(Resource res) { + return false; + } + } diff --git a/src/net/sourceforge/plantuml/project/draw/ResourceDraw.java b/src/net/sourceforge/plantuml/project/draw/ResourceDraw.java index fb4f72f99..0215bceae 100644 --- a/src/net/sourceforge/plantuml/project/draw/ResourceDraw.java +++ b/src/net/sourceforge/plantuml/project/draw/ResourceDraw.java @@ -35,96 +35,13 @@ */ package net.sourceforge.plantuml.project.draw; -import net.sourceforge.plantuml.klimt.UTranslate; -import net.sourceforge.plantuml.klimt.color.HColor; -import net.sourceforge.plantuml.klimt.color.HColors; -import net.sourceforge.plantuml.klimt.creole.Display; -import net.sourceforge.plantuml.klimt.drawing.UGraphic; -import net.sourceforge.plantuml.klimt.font.FontConfiguration; -import net.sourceforge.plantuml.klimt.font.UFont; -import net.sourceforge.plantuml.klimt.geom.HorizontalAlignment; -import net.sourceforge.plantuml.klimt.shape.TextBlock; +import net.sourceforge.plantuml.klimt.font.StringBounder; import net.sourceforge.plantuml.klimt.shape.UDrawable; -import net.sourceforge.plantuml.klimt.shape.ULine; -import net.sourceforge.plantuml.klimt.sprite.SpriteContainerEmpty; -import net.sourceforge.plantuml.project.GanttDiagram; -import net.sourceforge.plantuml.project.core.Resource; -import net.sourceforge.plantuml.project.time.Day; -import net.sourceforge.plantuml.project.timescale.TimeScale; -public class ResourceDraw implements UDrawable { +public interface ResourceDraw extends UDrawable { - private final Resource res; - private final TimeScale timeScale; - private final double y; - private final Day min; - private final Day max; - private final GanttDiagram gantt; + public double getHeight(StringBounder stringBounder); - public ResourceDraw(GanttDiagram gantt, Resource res, TimeScale timeScale, double y, Day min, Day max) { - this.res = res; - this.timeScale = timeScale; - this.y = y; - this.min = min; - this.max = max; - this.gantt = gantt; - } - - public void drawU(UGraphic ug) { - final TextBlock title = Display.getWithNewlines(res.getName()).create(getFontConfiguration(13), - HorizontalAlignment.LEFT, new SpriteContainerEmpty()); - title.drawU(ug); - final ULine line = ULine.hline(timeScale.getEndingPosition(max) - timeScale.getStartingPosition(min)); - ug.apply(HColors.BLACK).apply(UTranslate.dy(title.calculateDimension(ug.getStringBounder()).getHeight())) - .draw(line); - - double startingPosition = -1; - int totalLoad = 0; - int totalLimit = 0; - for (Day i = min; i.compareTo(max) <= 0; i = i.increment()) { - final boolean isBreaking = timeScale.isBreaking(i); - totalLoad += gantt.getLoadForResource(res, i); - totalLimit += 100; - if (isBreaking) { - if (totalLoad > 0) { - final boolean over = totalLoad > totalLimit; - final FontConfiguration fontConfiguration = getFontConfiguration(9, - over ? HColors.RED : HColors.BLACK); - final TextBlock value = Display.getWithNewlines("" + totalLoad).create(fontConfiguration, - HorizontalAlignment.LEFT, new SpriteContainerEmpty()); - if (startingPosition == -1) - startingPosition = timeScale.getStartingPosition(i); - final double endingPosition = timeScale.getEndingPosition(i); - final double start = (startingPosition + endingPosition) / 2 - - value.calculateDimension(ug.getStringBounder()).getWidth() / 2; - value.drawU(ug.apply(new UTranslate(start, 16))); - } - startingPosition = -1; - totalLoad = 0; - totalLimit = 0; - } else { - if (startingPosition == -1) - startingPosition = timeScale.getStartingPosition(i); - } - } - - } - - private FontConfiguration getFontConfiguration(int size) { - return getFontConfiguration(size, HColors.BLACK); - } - - private FontConfiguration getFontConfiguration(int size, HColor color) { - final UFont font = UFont.serif(size); - return FontConfiguration.create(font, color, color, null); - } - - public double getHeight() { - return 16 * 2; - } - - public final double getY() { - return y; - } + public double getY(); } diff --git a/src/net/sourceforge/plantuml/project/draw/ResourceDrawBasicImpl.java b/src/net/sourceforge/plantuml/project/draw/ResourceDrawBasicImpl.java new file mode 100644 index 000000000..7be2906d0 --- /dev/null +++ b/src/net/sourceforge/plantuml/project/draw/ResourceDrawBasicImpl.java @@ -0,0 +1,132 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.project.draw; + +import net.sourceforge.plantuml.klimt.UTranslate; +import net.sourceforge.plantuml.klimt.color.HColor; +import net.sourceforge.plantuml.klimt.color.HColors; +import net.sourceforge.plantuml.klimt.creole.Display; +import net.sourceforge.plantuml.klimt.drawing.UGraphic; +import net.sourceforge.plantuml.klimt.font.FontConfiguration; +import net.sourceforge.plantuml.klimt.font.StringBounder; +import net.sourceforge.plantuml.klimt.font.UFont; +import net.sourceforge.plantuml.klimt.geom.HorizontalAlignment; +import net.sourceforge.plantuml.klimt.shape.TextBlock; +import net.sourceforge.plantuml.klimt.shape.ULine; +import net.sourceforge.plantuml.klimt.sprite.SpriteContainerEmpty; +import net.sourceforge.plantuml.project.GanttDiagram; +import net.sourceforge.plantuml.project.core.Resource; +import net.sourceforge.plantuml.project.time.Day; +import net.sourceforge.plantuml.project.timescale.TimeScale; + +public class ResourceDrawBasicImpl implements ResourceDraw { + + private final Resource res; + private final TimeScale timeScale; + private final double y; + private final Day min; + private final Day max; + private final GanttDiagram gantt; + + public ResourceDrawBasicImpl(GanttDiagram gantt, Resource res, TimeScale timeScale, double y, Day min, Day max) { + this.res = res; + this.timeScale = timeScale; + this.y = y; + this.min = min; + this.max = max; + this.gantt = gantt; + } + + public void drawU(UGraphic ug) { + final TextBlock title = Display.getWithNewlines(res.getName()).create(getFontConfiguration(13), + HorizontalAlignment.LEFT, new SpriteContainerEmpty()); + title.drawU(ug); + final ULine line = ULine.hline(timeScale.getEndingPosition(max) - timeScale.getStartingPosition(min)); + ug.apply(HColors.BLACK).apply(UTranslate.dy(title.calculateDimension(ug.getStringBounder()).getHeight())) + .draw(line); + + double startingPosition = -1; + int totalLoad = 0; + int totalLimit = 0; + for (Day i = min; i.compareTo(max) <= 0; i = i.increment()) { + final boolean isBreaking = timeScale.isBreaking(i); + totalLoad += gantt.getLoadForResource(res, i); + totalLimit += 100; + if (isBreaking) { + if (totalLoad > 0) { + final boolean over = totalLoad > totalLimit; + final FontConfiguration fontConfiguration = getFontConfiguration(9, + over ? HColors.RED : HColors.BLACK); + final TextBlock value = Display.getWithNewlines("" + totalLoad).create(fontConfiguration, + HorizontalAlignment.LEFT, new SpriteContainerEmpty()); + if (startingPosition == -1) + startingPosition = timeScale.getStartingPosition(i); + final double endingPosition = timeScale.getEndingPosition(i); + final double start = (startingPosition + endingPosition) / 2 + - value.calculateDimension(ug.getStringBounder()).getWidth() / 2; + value.drawU(ug.apply(new UTranslate(start, 16))); + } + startingPosition = -1; + totalLoad = 0; + totalLimit = 0; + } else { + if (startingPosition == -1) + startingPosition = timeScale.getStartingPosition(i); + } + } + + } + + private FontConfiguration getFontConfiguration(int size) { + return getFontConfiguration(size, HColors.BLACK); + } + + private FontConfiguration getFontConfiguration(int size, HColor color) { + final UFont font = UFont.serif(size); + return FontConfiguration.create(font, color, color, null); + } + + @Override + public double getHeight(StringBounder stringBounder) { + return 16 * 2; + } + + @Override + public final double getY() { + return y; + } + +} diff --git a/src/net/sourceforge/plantuml/project/draw/ResourceDrawVersion2.java b/src/net/sourceforge/plantuml/project/draw/ResourceDrawVersion2.java new file mode 100644 index 000000000..522fe9e91 --- /dev/null +++ b/src/net/sourceforge/plantuml/project/draw/ResourceDrawVersion2.java @@ -0,0 +1,138 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.project.draw; + +import net.sourceforge.plantuml.klimt.UShape; +import net.sourceforge.plantuml.klimt.UTranslate; +import net.sourceforge.plantuml.klimt.color.HColor; +import net.sourceforge.plantuml.klimt.color.HColors; +import net.sourceforge.plantuml.klimt.creole.Display; +import net.sourceforge.plantuml.klimt.drawing.UGraphic; +import net.sourceforge.plantuml.klimt.font.FontConfiguration; +import net.sourceforge.plantuml.klimt.font.StringBounder; +import net.sourceforge.plantuml.klimt.font.UFont; +import net.sourceforge.plantuml.klimt.geom.HorizontalAlignment; +import net.sourceforge.plantuml.klimt.shape.TextBlock; +import net.sourceforge.plantuml.klimt.shape.ULine; +import net.sourceforge.plantuml.klimt.shape.URectangle; +import net.sourceforge.plantuml.klimt.sprite.SpriteContainerEmpty; +import net.sourceforge.plantuml.project.GanttDiagram; +import net.sourceforge.plantuml.project.LabelPosition; +import net.sourceforge.plantuml.project.LabelStrategy; +import net.sourceforge.plantuml.project.core.Resource; +import net.sourceforge.plantuml.project.time.Day; +import net.sourceforge.plantuml.project.timescale.TimeScale; + +public class ResourceDrawVersion2 implements ResourceDraw { + + private final Resource res; + private final TimeScale timeScale; + private final double y; + private final Day min; + private final Day max; + private final GanttDiagram gantt; + + public ResourceDrawVersion2(GanttDiagram gantt, Resource res, TimeScale timeScale, double y, Day min, Day max) { + this.res = res; + this.timeScale = timeScale; + this.y = y; + this.min = min; + this.max = max; + this.gantt = gantt; + } + + public void drawU(UGraphic ug) { + final StringBounder stringBounder = ug.getStringBounder(); + + double ypos = 16; + final double tmpHeight = getHeight(stringBounder) - ypos; + for (Day wink = gantt.getStartingDate(); wink.compareTo(gantt.getEndingDate()) <= 0; wink = wink.increment()) { + final double start = timeScale.getStartingPosition(wink); + final double end = timeScale.getEndingPosition(wink); + final UShape rect = URectangle.build(end - start, tmpHeight); + if (res.isClosedAt(wink)) + ug.apply(HColors.LIGHT_GRAY.bg()).apply(new UTranslate(start, ypos)).draw(rect); + + } + + final TextBlock title = Display.getWithNewlines(res.getName()).create(getFontConfiguration(13), + HorizontalAlignment.LEFT, new SpriteContainerEmpty()); + title.drawU(ug); + final ULine line = ULine.hline(timeScale.getEndingPosition(max) - timeScale.getStartingPosition(min)); + ug.apply(HColors.BLACK).apply(UTranslate.dy(title.calculateDimension(ug.getStringBounder()).getHeight())) + .draw(line); + + final LabelStrategy labelStrategy = new LabelStrategy(LabelPosition.LEGACY, HorizontalAlignment.LEFT); + + for (TaskDrawRegular draw : gantt.getAllTasksForResource(res)) { + draw.drawShape(ug.apply(UTranslate.dy(ypos + getTopMarginBetweenTask()))); + draw.drawTitle(ug.apply(UTranslate.dy(ypos + getTopMarginBetweenTask())), labelStrategy, 10, 100); + ypos += draw.getShapeHeight(stringBounder) + getMarginBetweenTask(); + } + } + + @Override + public double getHeight(StringBounder stringBounder) { + double ypos = 16; + for (TaskDrawRegular draw : gantt.getAllTasksForResource(res)) + ypos += draw.getShapeHeight(stringBounder) + getMarginBetweenTask(); + + return ypos + 8; + } + + private double getTopMarginBetweenTask() { + return 2; + } + + private double getMarginBetweenTask() { + return 4; + } + + private FontConfiguration getFontConfiguration(int size) { + return getFontConfiguration(size, HColors.BLACK); + } + + private FontConfiguration getFontConfiguration(int size, HColor color) { + final UFont font = UFont.serif(size); + return FontConfiguration.create(font, color, color, null); + } + + @Override + public final double getY() { + return y; + } + +} diff --git a/src/net/sourceforge/plantuml/project/draw/TaskDrawRegular.java b/src/net/sourceforge/plantuml/project/draw/TaskDrawRegular.java index ebe606c9a..cf3cb4cab 100644 --- a/src/net/sourceforge/plantuml/project/draw/TaskDrawRegular.java +++ b/src/net/sourceforge/plantuml/project/draw/TaskDrawRegular.java @@ -101,7 +101,7 @@ public class TaskDrawRegular extends AbstractTaskDraw { } @Override - protected double getShapeHeight(StringBounder stringBounder) { + public double getShapeHeight(StringBounder stringBounder) { final Style style = getStyle(); final ClockwiseTopRightBottomLeft padding = style.getPadding(); return padding.getTop() + getTitle().calculateDimension(stringBounder).getHeight() + padding.getBottom(); @@ -170,7 +170,6 @@ public class TaskDrawRegular extends AbstractTaskDraw { final double startPos = timeScale.getStartingPosition(start); drawNote(ug.apply((new UTranslate(startPos, getYNotePosition(ug.getStringBounder()))))); - ug = applyColors(ug); drawShape(ug); } @@ -256,7 +255,8 @@ public class TaskDrawRegular extends AbstractTaskDraw { return endPos; } - private void drawShape(UGraphic ug) { + public void drawShape(UGraphic ug) { + ug = applyColors(ug); final Style style = getStyleSignature().getMergedStyle(getStyleBuilder()); final ClockwiseTopRightBottomLeft margin = style.getMargin(); diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeader.java b/src/net/sourceforge/plantuml/project/draw/TimeHeader.java index ab995c7e4..b50138d03 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeader.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeader.java @@ -35,12 +35,8 @@ */ package net.sourceforge.plantuml.project.draw; -import java.util.Objects; - -import net.sourceforge.plantuml.klimt.UStroke; import net.sourceforge.plantuml.klimt.UTranslate; import net.sourceforge.plantuml.klimt.color.HColor; -import net.sourceforge.plantuml.klimt.color.HColorSet; import net.sourceforge.plantuml.klimt.color.HColors; import net.sourceforge.plantuml.klimt.creole.Display; import net.sourceforge.plantuml.klimt.drawing.UGraphic; @@ -51,13 +47,13 @@ import net.sourceforge.plantuml.klimt.shape.TextBlock; import net.sourceforge.plantuml.klimt.shape.ULine; import net.sourceforge.plantuml.klimt.shape.URectangle; import net.sourceforge.plantuml.klimt.sprite.SpriteContainerEmpty; +import net.sourceforge.plantuml.project.TimeHeaderParameters; import net.sourceforge.plantuml.project.time.Day; import net.sourceforge.plantuml.project.timescale.TimeScale; import net.sourceforge.plantuml.style.PName; -import net.sourceforge.plantuml.style.Style; public abstract class TimeHeader { - // ::remove folder when __HAXE__ + // ::remove folder when __HAXE__ protected final double Y_POS_ROW16() { return 16; @@ -68,38 +64,40 @@ public abstract class TimeHeader { } private final TimeScale timeScale; - private final Style closedStyle; - private final Style timelineStyle; - private final HColorSet colorSet; + protected final TimeHeaderParameters thParam; - protected final Day min; - protected final Day max; - - public TimeHeader(Style timelineStyle, Style closedStyle, Day min, Day max, TimeScale timeScale, - HColorSet colorSet) { + public TimeHeader(TimeHeaderParameters thParam, TimeScale timeScale) { + this.thParam = thParam; this.timeScale = timeScale; - this.min = min; - this.max = max; - this.closedStyle = Objects.requireNonNull(closedStyle); - this.timelineStyle = Objects.requireNonNull(timelineStyle); - this.colorSet = colorSet; + } + + protected final boolean isBold2(Day wink) { + return thParam.getVerticalSeparatorBefore().contains(wink); + } + + protected final Day getMin() { + return thParam.getMin(); + } + + protected final Day getMax() { + return thParam.getMax(); } protected final HColor closedBackgroundColor() { - return closedStyle.value(PName.BackGroundColor).asColor(colorSet); + return thParam.getClosedStyle().value(PName.BackGroundColor).asColor(thParam.getColorSet()); } protected final HColor closedFontColor() { - return closedStyle.value(PName.FontColor).asColor(colorSet); + return thParam.getClosedStyle().value(PName.FontColor).asColor(thParam.getColorSet()); } protected final HColor openFontColor() { - return timelineStyle.value(PName.FontColor).asColor(colorSet); + return thParam.getTimelineStyle().value(PName.FontColor).asColor(thParam.getColorSet()); } - protected final HColor getBarColor() { - return timelineStyle.value(PName.LineColor).asColor(colorSet); + protected final HColor getLineColor() { + return thParam.getTimelineStyle().value(PName.LineColor).asColor(thParam.getColorSet()); } public abstract double getTimeHeaderHeight(); @@ -113,18 +111,14 @@ public abstract class TimeHeader { public abstract double getFullHeaderHeight(); protected final void drawHline(UGraphic ug, double y) { - final double xmin = getTimeScale().getStartingPosition(min); - final double xmax = getTimeScale().getEndingPosition(max); + final double xmin = getTimeScale().getStartingPosition(thParam.getMin()); + final double xmax = getTimeScale().getEndingPosition(thParam.getMax()); final ULine hline = ULine.hline(xmax - xmin); - ug.apply(getBarColor()).apply(UTranslate.dy(y)).draw(hline); + ug.apply(getLineColor()).apply(UTranslate.dy(y)).draw(hline); } - protected final void drawVbar(UGraphic ug, double x, double y1, double y2, boolean bold) { + protected final void drawVline(UGraphic ug, double x, double y1, double y2) { final ULine vbar = ULine.vline(y2 - y1); - if (bold) - ug = goBold(ug); - else - ug = ug.apply(getBarColor()); ug.apply(new UTranslate(x, y1)).draw(vbar); } @@ -175,8 +169,12 @@ public abstract class TimeHeader { ug.draw(URectangle.build(x2 - x1, height)); } - protected final UGraphic goBold(UGraphic ug) { - return ug.apply(HColors.BLACK).apply(UStroke.withThickness(2)); + protected void printVerticalSeparators(UGraphic ug, double totalHeightWithoutFooter) { + ug = thParam.forVerticalSeparator(ug); + for (Day wink = getMin(); wink.compareTo(getMax()) <= 0; wink = wink.increment()) + if (isBold2(wink)) + drawVline(ug, getTimeScale().getStartingPosition(wink), getFullHeaderHeight(), + totalHeightWithoutFooter); } } diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeaderCalendar.java b/src/net/sourceforge/plantuml/project/draw/TimeHeaderCalendar.java index 3d8274958..ff606e347 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeaderCalendar.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeaderCalendar.java @@ -45,16 +45,8 @@ import net.sourceforge.plantuml.project.timescale.TimeScale; public abstract class TimeHeaderCalendar extends TimeHeader { - private final TimeHeaderParameters thParam; - public TimeHeaderCalendar(TimeHeaderParameters thParam, TimeScale timeScale) { - super(thParam.getTimelineStyle(), thParam.getClosedStyle(), thParam.getMin(), thParam.getMax(), timeScale, - thParam.getColorSet()); - this.thParam = thParam; - } - - protected final boolean isBold(Day wink) { - return thParam.getVerticalSeparatorBefore().contains(wink); + super(thParam, timeScale); } protected final Locale locale() { @@ -64,7 +56,7 @@ public abstract class TimeHeaderCalendar extends TimeHeader { protected final int getLoadAt(Day instant) { return thParam.getLoadPlanable().getLoadAt(instant); } - + // Duplicate in TimeHeaderSimple class Pending { final double x1; @@ -87,7 +79,7 @@ public abstract class TimeHeaderCalendar extends TimeHeader { final double height = totalHeightWithoutFooter - getFullHeaderHeight(); Pending pending = null; - for (Day wink = min; wink.compareTo(max) <= 0; wink = wink.increment()) { + for (Day wink = getMin(); wink.compareTo(getMax()) <= 0; wink = wink.increment()) { final double x1 = getTimeScale().getStartingPosition(wink); final double x2 = getTimeScale().getEndingPosition(wink); HColor back = thParam.getColor(wink); diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeaderDaily.java b/src/net/sourceforge/plantuml/project/draw/TimeHeaderDaily.java index 8fd5bf794..55f04437c 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeaderDaily.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeaderDaily.java @@ -70,7 +70,7 @@ public class TimeHeaderDaily extends TimeHeaderCalendar { drawTextsDayOfWeek(ug.apply(UTranslate.dy(Y_POS_ROW16()))); drawTextDayOfMonth(ug.apply(UTranslate.dy(Y_POS_ROW28()))); drawMonths(ug); - printSmallVbars(ug, totalHeightWithoutFooter); + printVerticalSeparators(ug, totalHeightWithoutFooter); printNamedDays(ug); @@ -78,12 +78,20 @@ public class TimeHeaderDaily extends TimeHeaderCalendar { drawHline(ug, totalHeightWithoutFooter); } - private void printSmallVbars(final UGraphic ug, double totalHeightWithoutFooter) { - for (Day wink = min; wink.compareTo(max) <= 0; wink = wink.increment()) - drawVbar(ug, getTimeScale().getStartingPosition(wink), getFullHeaderHeight(), totalHeightWithoutFooter, - isBold(wink)); + @Override + protected void printVerticalSeparators(final UGraphic ug, double totalHeightWithoutFooter) { + final UGraphic ugVerticalSeparator = thParam.forVerticalSeparator(ug); + final UGraphic ugLineColor = ug.apply(getLineColor()); + for (Day wink = getMin(); wink.compareTo(getMax()) <= 0; wink = wink.increment()) + if (isBold2(wink)) + drawVline(ugVerticalSeparator, getTimeScale().getStartingPosition(wink), getFullHeaderHeight(), + totalHeightWithoutFooter); + else + drawVline(ugLineColor, getTimeScale().getStartingPosition(wink), getFullHeaderHeight(), + totalHeightWithoutFooter); - drawVbar(ug, getTimeScale().getEndingPosition(max), getFullHeaderHeight(), totalHeightWithoutFooter, false); + drawVline(ugLineColor, getTimeScale().getEndingPosition(getMax()), getFullHeaderHeight(), + totalHeightWithoutFooter); } @Override @@ -94,7 +102,7 @@ public class TimeHeaderDaily extends TimeHeaderCalendar { } private void drawTextsDayOfWeek(UGraphic ug) { - for (Day wink = min; wink.compareTo(max) <= 0; wink = wink.increment()) { + for (Day wink = getMin(); wink.compareTo(getMax()) <= 0; wink = wink.increment()) { final double x1 = getTimeScale().getStartingPosition(wink); final double x2 = getTimeScale().getEndingPosition(wink); final HColor textColor = getTextBackColor(wink); @@ -103,7 +111,7 @@ public class TimeHeaderDaily extends TimeHeaderCalendar { } private void drawTextDayOfMonth(UGraphic ug) { - for (Day wink = min; wink.compareTo(max) <= 0; wink = wink.increment()) { + for (Day wink = getMin(); wink.compareTo(getMax()) <= 0; wink = wink.increment()) { final double x1 = getTimeScale().getStartingPosition(wink); final double x2 = getTimeScale().getEndingPosition(wink); final HColor textColor = getTextBackColor(wink); @@ -121,7 +129,7 @@ public class TimeHeaderDaily extends TimeHeaderCalendar { private void drawMonths(final UGraphic ug) { MonthYear last = null; double lastChangeMonth = -1; - for (Day wink = min; wink.compareTo(max) <= 0; wink = wink.increment()) { + for (Day wink = getMin(); wink.compareTo(getMax()) <= 0; wink = wink.increment()) { final double x1 = getTimeScale().getStartingPosition(wink); if (wink.monthYear().equals(last) == false) { if (last != null) @@ -131,7 +139,7 @@ public class TimeHeaderDaily extends TimeHeaderCalendar { last = wink.monthYear(); } } - final double x1 = getTimeScale().getStartingPosition(max.increment()); + final double x1 = getTimeScale().getStartingPosition(getMax().increment()); if (x1 > lastChangeMonth) printMonth(ug, last, lastChangeMonth, x1); @@ -147,7 +155,7 @@ public class TimeHeaderDaily extends TimeHeaderCalendar { private void printNamedDays(final UGraphic ug) { if (nameDays.size() > 0) { String last = null; - for (Day wink = min; wink.compareTo(max.increment()) <= 0; wink = wink.increment()) { + for (Day wink = getMin(); wink.compareTo(getMax().increment()) <= 0; wink = wink.increment()) { final String name = nameDays.get(wink); if (name != null && name.equals(last) == false) { final double x1 = getTimeScale().getStartingPosition(wink); diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeaderMonthly.java b/src/net/sourceforge/plantuml/project/draw/TimeHeaderMonthly.java index d8d6e2d67..fc6c99771 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeaderMonthly.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeaderMonthly.java @@ -62,19 +62,12 @@ public class TimeHeaderMonthly extends TimeHeaderCalendar { drawTextsBackground(ug, totalHeightWithoutFooter); drawYears(ug); drawMonths(ug.apply(UTranslate.dy(16))); - printSmallVbars(ug, totalHeightWithoutFooter); + printVerticalSeparators(ug, totalHeightWithoutFooter); drawHline(ug, 0); drawHline(ug, 16); drawHline(ug, getFullHeaderHeight()); } - private void printSmallVbars(final UGraphic ug, double totalHeightWithoutFooter) { - for (Day wink = min; wink.compareTo(max) <= 0; wink = wink.increment()) - if (isBold(wink)) - drawVbar(ug, getTimeScale().getStartingPosition(wink), getFullHeaderHeight(), totalHeightWithoutFooter, - isBold(wink)); - } - @Override public void drawTimeFooter(UGraphic ug) { ug = ug.apply(UTranslate.dy(3)); @@ -88,43 +81,43 @@ public class TimeHeaderMonthly extends TimeHeaderCalendar { private void drawYears(final UGraphic ug) { MonthYear last = null; double lastChange = -1; - for (Day wink = min; wink.compareTo(max) < 0; wink = wink.increment()) { + for (Day wink = getMin(); wink.compareTo(getMax()) < 0; wink = wink.increment()) { final double x1 = getTimeScale().getStartingPosition(wink); if (last == null || wink.monthYear().year() != last.year()) { - drawVbar(ug, x1, 0, 15, false); - if (last != null) { + drawVline(ug.apply(getLineColor()), x1, 0, 15); + if (last != null) printYear(ug, last, lastChange, x1); - } + lastChange = x1; last = wink.monthYear(); } } - final double x1 = getTimeScale().getStartingPosition(max.increment()); - if (x1 > lastChange) { + final double x1 = getTimeScale().getStartingPosition(getMax().increment()); + if (x1 > lastChange) printYear(ug, last, lastChange, x1); - } - drawVbar(ug, getTimeScale().getEndingPosition(max), 0, 15, false); + + drawVline(ug.apply(getLineColor()), getTimeScale().getEndingPosition(getMax()), (double) 0, (double) 15); } private void drawMonths(UGraphic ug) { MonthYear last = null; double lastChange = -1; - for (Day wink = min; wink.compareTo(max) < 0; wink = wink.increment()) { + for (Day wink = getMin(); wink.compareTo(getMax()) < 0; wink = wink.increment()) { final double x1 = getTimeScale().getStartingPosition(wink); if (wink.monthYear().equals(last) == false) { - drawVbar(ug, x1, 0, 12, false); - if (last != null) { + drawVline(ug.apply(getLineColor()), x1, (double) 0, (double) 12); + if (last != null) printMonth(ug, last, lastChange, x1); - } + lastChange = x1; last = wink.monthYear(); } } - final double x1 = getTimeScale().getStartingPosition(max.increment()); - if (x1 > lastChange) { + final double x1 = getTimeScale().getStartingPosition(getMax().increment()); + if (x1 > lastChange) printMonth(ug, last, lastChange, x1); - } - drawVbar(ug, getTimeScale().getEndingPosition(max), 0, 12, false); + + drawVline(ug.apply(getLineColor()), getTimeScale().getEndingPosition(getMax()), (double) 0, (double) 12); } private void printYear(UGraphic ug, MonthYear monthYear, double start, double end) { diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeaderQuarterly.java b/src/net/sourceforge/plantuml/project/draw/TimeHeaderQuarterly.java index dcf03c017..b19cdad98 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeaderQuarterly.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeaderQuarterly.java @@ -62,19 +62,12 @@ public class TimeHeaderQuarterly extends TimeHeaderCalendar { drawTextsBackground(ug, totalHeightWithoutFooter); drawYears(ug); drawQuarters(ug.apply(UTranslate.dy(16))); - printSmallVbars(ug, totalHeightWithoutFooter); + printVerticalSeparators(ug, totalHeightWithoutFooter); drawHline(ug, 0); drawHline(ug, 16); drawHline(ug, getFullHeaderHeight()); } - private void printSmallVbars(final UGraphic ug, double totalHeightWithoutFooter) { - for (Day wink = min; wink.compareTo(max) <= 0; wink = wink.increment()) - if (isBold(wink)) - drawVbar(ug, getTimeScale().getStartingPosition(wink), getFullHeaderHeight(), totalHeightWithoutFooter, - isBold(wink)); - } - @Override public void drawTimeFooter(UGraphic ug) { ug = ug.apply(UTranslate.dy(3)); @@ -88,43 +81,43 @@ public class TimeHeaderQuarterly extends TimeHeaderCalendar { private void drawYears(final UGraphic ug) { MonthYear last = null; double lastChange = -1; - for (Day wink = min; wink.compareTo(max) < 0; wink = wink.increment()) { + for (Day wink = getMin(); wink.compareTo(getMax()) < 0; wink = wink.increment()) { final double x1 = getTimeScale().getStartingPosition(wink); if (last == null || wink.monthYear().year() != last.year()) { - drawVbar(ug, x1, 0, 15, false); - if (last != null) { + drawVline(ug.apply(getLineColor()), x1, (double) 0, (double) 15); + if (last != null) printYear(ug, last, lastChange, x1); - } + lastChange = x1; last = wink.monthYear(); } } - final double x1 = getTimeScale().getStartingPosition(max.increment()); - if (x1 > lastChange) { + final double x1 = getTimeScale().getStartingPosition(getMax().increment()); + if (x1 > lastChange) printYear(ug, last, lastChange, x1); - } - drawVbar(ug, getTimeScale().getEndingPosition(max), 0, 15, false); + + drawVline(ug.apply(getLineColor()), getTimeScale().getEndingPosition(getMax()), (double) 0, (double) 15); } private void drawQuarters(UGraphic ug) { String last = null; double lastChange = -1; - for (Day wink = min; wink.compareTo(max) < 0; wink = wink.increment()) { + for (Day wink = getMin(); wink.compareTo(getMax()) < 0; wink = wink.increment()) { final double x1 = getTimeScale().getStartingPosition(wink); if (quarter(wink).equals(last) == false) { - drawVbar(ug, x1, 0, 12, false); - if (last != null) { + drawVline(ug.apply(getLineColor()), x1, (double) 0, (double) 12); + if (last != null) printQuarter(ug, last, lastChange, x1); - } + lastChange = x1; last = quarter(wink); } } - final double x1 = getTimeScale().getStartingPosition(max.increment()); - if (x1 > lastChange) { + final double x1 = getTimeScale().getStartingPosition(getMax().increment()); + if (x1 > lastChange) printQuarter(ug, last, lastChange, x1); - } - drawVbar(ug, getTimeScale().getEndingPosition(max), 0, 12, false); + + drawVline(ug.apply(getLineColor()), getTimeScale().getEndingPosition(getMax()), (double) 0, (double) 12); } private String quarter(Day day) { diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeaderSimple.java b/src/net/sourceforge/plantuml/project/draw/TimeHeaderSimple.java index a4a68f26f..7d23798ea 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeaderSimple.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeaderSimple.java @@ -35,8 +35,6 @@ */ package net.sourceforge.plantuml.project.draw; -import java.util.Set; - import net.sourceforge.plantuml.klimt.UTranslate; import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.creole.Display; @@ -53,9 +51,7 @@ import net.sourceforge.plantuml.project.timescale.TimeScaleWink; public class TimeHeaderSimple extends TimeHeader { - private final TimeHeaderParameters colorDays; private final PrintScale printScale; - private final Set verticalSeparators; @Override public double getFullHeaderHeight() { @@ -75,37 +71,21 @@ public class TimeHeaderSimple extends TimeHeader { } public TimeHeaderSimple(TimeHeaderParameters thParam, PrintScale printScale) { - super(thParam.getTimelineStyle(), thParam.getClosedStyle(), thParam.getMin(), thParam.getMax(), - new TimeScaleWink(thParam.getScale(), printScale), thParam.getColorSet()); - this.colorDays = thParam; + super(thParam, new TimeScaleWink(thParam.getScale(), printScale)); this.printScale = printScale; - this.verticalSeparators = thParam.getVerticalSeparatorBefore(); - } - - private boolean isBold(Day wink) { - return verticalSeparators.contains(wink); - } - - private void drawSeparatorsDay(UGraphic ug, TimeScale timeScale, double totalHeightWithoutFooter) { - final ULine vbar = ULine.vline(totalHeightWithoutFooter - getFullHeaderHeight() + 2); - ug = goBold(ug).apply(UTranslate.dy(getFullHeaderHeight() - 1)); - for (Day i = min; i.compareTo(max.increment()) <= 0; i = i.increment(printScale)) - if (isBold(i)) { - final double x1 = timeScale.getStartingPosition(i); - ug.apply(UTranslate.dx(x1)).draw(vbar); - } } private void drawSmallVlinesDay(UGraphic ug, TimeScale timeScale, double totalHeightWithoutFooter) { + ug = ug.apply(getLineColor()); final ULine vbar = ULine.vline(totalHeightWithoutFooter); - for (Day i = min; i.compareTo(max.increment()) <= 0; i = i.increment(printScale)) { + for (Day i = getMin(); i.compareTo(getMax().increment()) <= 0; i = i.increment(printScale)) { final double x1 = timeScale.getStartingPosition(i); - ug.apply(getBarColor()).apply(UTranslate.dx(x1)).draw(vbar); + ug.apply(UTranslate.dx(x1)).draw(vbar); } } private void drawSimpleDayCounter(UGraphic ug, TimeScale timeScale) { - for (Day i = min; i.compareTo(max.increment()) <= 0; i = i.increment(printScale)) { + for (Day i = getMin(); i.compareTo(getMax().increment()) <= 0; i = i.increment(printScale)) { final int value; if (printScale == PrintScale.WEEKLY) value = i.getAbsoluteDayNum() / 7 + 1; @@ -122,33 +102,34 @@ public class TimeHeaderSimple extends TimeHeader { x2 = timeScale.getEndingPosition(i); final double width = num.calculateDimension(ug.getStringBounder()).getWidth(); final double delta = (x2 - x1) - width; - if (i.compareTo(max.increment()) < 0) + if (i.compareTo(getMax().increment()) < 0) num.drawU(ug.apply(UTranslate.dx(x1 + delta / 2))); } } @Override - public void drawTimeHeader(final UGraphic ug, double totalHeightWithoutFooter) { + public void drawTimeHeader(UGraphic ug, double totalHeightWithoutFooter) { drawTextsBackground(ug.apply(UTranslate.dy(-3)), totalHeightWithoutFooter + 6); - final double xmin = getTimeScale().getStartingPosition(min); - final double xmax = getTimeScale().getEndingPosition(max); + final double xmin = getTimeScale().getStartingPosition(getMin()); + final double xmax = getTimeScale().getEndingPosition(getMax()); drawSmallVlinesDay(ug, getTimeScale(), totalHeightWithoutFooter + 2); - drawSeparatorsDay(ug, getTimeScale(), totalHeightWithoutFooter); + printVerticalSeparators(ug, totalHeightWithoutFooter); drawSimpleDayCounter(ug, getTimeScale()); - ug.apply(getBarColor()).draw(ULine.hline(xmax - xmin)); - ug.apply(getBarColor()).apply(UTranslate.dy(getFullHeaderHeight() - 3)).draw(ULine.hline(xmax - xmin)); + ug = ug.apply(getLineColor()); + ug.draw(ULine.hline(xmax - xmin)); + ug.apply(UTranslate.dy(getFullHeaderHeight() - 3)).draw(ULine.hline(xmax - xmin)); } @Override public void drawTimeFooter(UGraphic ug) { - final double xmin = getTimeScale().getStartingPosition(min); - final double xmax = getTimeScale().getEndingPosition(max); + final double xmin = getTimeScale().getStartingPosition(getMin()); + final double xmax = getTimeScale().getEndingPosition(getMax()); ug = ug.apply(UTranslate.dy(3)); drawSmallVlinesDay(ug, getTimeScale(), getTimeFooterHeight() - 3); drawSimpleDayCounter(ug, getTimeScale()); - ug.apply(getBarColor()).draw(ULine.hline(xmax - xmin)); + ug.apply(getLineColor()).draw(ULine.hline(xmax - xmin)); } // Duplicate in TimeHeaderDaily @@ -173,10 +154,10 @@ public class TimeHeaderSimple extends TimeHeader { final double height = totalHeightWithoutFooter - getFullHeaderHeight(); Pending pending = null; - for (Day wink = min; wink.compareTo(max) <= 0; wink = wink.increment()) { + for (Day wink = getMin(); wink.compareTo(getMax()) <= 0; wink = wink.increment()) { final double x1 = getTimeScale().getStartingPosition(wink); final double x2 = getTimeScale().getEndingPosition(wink); - HColor back = colorDays.getColor(wink); + HColor back = thParam.getColor(wink); // // Day of week should be stronger than period of time (back color). // final HColor backDoW = colorDaysOfWeek.get(wink.getDayOfWeek()); // if (backDoW != null) { diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeaderWeekly.java b/src/net/sourceforge/plantuml/project/draw/TimeHeaderWeekly.java index aa8374632..53688b08c 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeaderWeekly.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeaderWeekly.java @@ -82,47 +82,43 @@ public class TimeHeaderWeekly extends TimeHeaderCalendar { private void drawCalendar(final UGraphic ug, double totalHeightWithoutFooter) { printDaysOfMonth(ug); - printSmallVbars(ug, totalHeightWithoutFooter); + printVerticalSeparators(ug, totalHeightWithoutFooter); printMonths(ug); } private void printMonths(final UGraphic ug) { MonthYear last = null; double lastChangeMonth = -1; - for (Day wink = min; wink.compareTo(max) < 0; wink = wink.increment()) { + for (Day wink = getMin(); wink.compareTo(getMax()) < 0; wink = wink.increment()) { final double x1 = getTimeScale().getStartingPosition(wink); if (wink.monthYear().equals(last) == false) { - drawVbar(ug, x1, 0, Y_POS_ROW16(), false); - if (last != null) { + drawVline(ug.apply(getLineColor()), x1, (double) 0, Y_POS_ROW16()); + if (last != null) printMonth(ug, last, lastChangeMonth, x1); - } + lastChangeMonth = x1; last = wink.monthYear(); } } - drawVbar(ug, getTimeScale().getEndingPosition(max), 0, Y_POS_ROW16(), false); - final double x1 = getTimeScale().getStartingPosition(max.increment()); - if (x1 > lastChangeMonth) { + drawVline(ug.apply(getLineColor()), getTimeScale().getEndingPosition(getMax()), (double) 0, Y_POS_ROW16()); + final double x1 = getTimeScale().getStartingPosition(getMax().increment()); + if (x1 > lastChangeMonth) printMonth(ug, last, lastChangeMonth, x1); - } + } - private void printSmallVbars(final UGraphic ug, double totalHeightWithoutFooter) { - for (Day wink = min; wink.compareTo(max) <= 0; wink = wink.increment()) + @Override + protected void printVerticalSeparators(final UGraphic ug, double totalHeightWithoutFooter) { + for (Day wink = getMin(); wink.compareTo(getMax()) <= 0; wink = wink.increment()) if (wink.getDayOfWeek() == weekNumberStrategy.getFirstDayOfWeek()) - drawVbar(ug, getTimeScale().getStartingPosition(wink), Y_POS_ROW16(), totalHeightWithoutFooter, false); - - drawVbar(ug, getTimeScale().getEndingPosition(max), Y_POS_ROW16(), totalHeightWithoutFooter, false); - - for (Day wink = min; wink.compareTo(max) <= 0; wink = wink.increment()) - if (isBold(wink)) - drawVbar(ug, getTimeScale().getStartingPosition(wink), getFullHeaderHeight(), totalHeightWithoutFooter, - isBold(wink)); + drawVline(ug.apply(getLineColor()), getTimeScale().getStartingPosition(wink), Y_POS_ROW16(), totalHeightWithoutFooter); + drawVline(ug.apply(getLineColor()), getTimeScale().getEndingPosition(getMax()), Y_POS_ROW16(), totalHeightWithoutFooter); + super.printVerticalSeparators(ug, totalHeightWithoutFooter); } private void printDaysOfMonth(final UGraphic ug) { - for (Day wink = min; wink.compareTo(max) < 0; wink = wink.increment()) { + for (Day wink = getMin(); wink.compareTo(getMax()) < 0; wink = wink.increment()) { if (wink.getDayOfWeek() == weekNumberStrategy.getFirstDayOfWeek()) { final String num; if (withCalendarDate) diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeaderYearly.java b/src/net/sourceforge/plantuml/project/draw/TimeHeaderYearly.java index 9d537fd41..04b25e86c 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeaderYearly.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeaderYearly.java @@ -61,18 +61,11 @@ public class TimeHeaderYearly extends TimeHeaderCalendar { public void drawTimeHeader(final UGraphic ug, double totalHeightWithoutFooter) { drawTextsBackground(ug, totalHeightWithoutFooter); drawYears(ug); - printSmallVbars(ug, totalHeightWithoutFooter); + printVerticalSeparators(ug, totalHeightWithoutFooter); drawHline(ug, 0); drawHline(ug, getFullHeaderHeight()); } - private void printSmallVbars(final UGraphic ug, double totalHeightWithoutFooter) { - for (Day wink = min; wink.compareTo(max) <= 0; wink = wink.increment()) - if (isBold(wink)) - drawVbar(ug, getTimeScale().getStartingPosition(wink), getFullHeaderHeight(), totalHeightWithoutFooter, - isBold(wink)); - } - @Override public void drawTimeFooter(UGraphic ug) { ug = ug.apply(UTranslate.dy(3)); @@ -84,22 +77,22 @@ public class TimeHeaderYearly extends TimeHeaderCalendar { private void drawYears(final UGraphic ug) { MonthYear last = null; double lastChange = -1; - for (Day wink = min; wink.compareTo(max) < 0; wink = wink.increment()) { + for (Day wink = getMin(); wink.compareTo(getMax()) < 0; wink = wink.increment()) { final double x1 = getTimeScale().getStartingPosition(wink); if (last == null || wink.monthYear().year() != last.year()) { - drawVbar(ug, x1, 0, 19, false); - if (last != null) { + drawVline(ug.apply(getLineColor()), x1, (double) 0, (double) 19); + if (last != null) printYear(ug, last, lastChange, x1); - } + lastChange = x1; last = wink.monthYear(); } } - final double x1 = getTimeScale().getStartingPosition(max.increment()); - if (x1 > lastChange) { + final double x1 = getTimeScale().getStartingPosition(getMax().increment()); + if (x1 > lastChange) printYear(ug, last, lastChange, x1); - } - drawVbar(ug, getTimeScale().getEndingPosition(max), 0, 19, false); + + drawVline(ug.apply(getLineColor()), getTimeScale().getEndingPosition(getMax()), (double) 0, (double) 19); } private void printYear(UGraphic ug, MonthYear monthYear, double start, double end) { diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementDate.java b/src/net/sourceforge/plantuml/project/lang/ComplementDate.java index ae52dfdb0..701f15dfc 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementDate.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementDate.java @@ -47,7 +47,35 @@ import net.sourceforge.plantuml.regex.RegexResult; public class ComplementDate implements Something { + private final Type type; + + static enum Type { + ANY, ONLY_RELATIVE, ONLY_ABSOLUTE; + } + + private ComplementDate(Type type) { + this.type = type; + } + + public static ComplementDate any() { + return new ComplementDate(Type.ANY); + } + + public static ComplementDate onlyRelative() { + return new ComplementDate(Type.ONLY_RELATIVE); + } + + public static ComplementDate onlyAbsolute() { + return new ComplementDate(Type.ONLY_ABSOLUTE); + } + public IRegex toRegex(String suffix) { + switch (type) { + case ONLY_ABSOLUTE: + return new RegexOr(toRegexA(suffix), toRegexB(suffix), toRegexC(suffix)); + case ONLY_RELATIVE: + return new RegexOr(toRegexD(suffix), toRegexE(suffix)); + } return new RegexOr(toRegexA(suffix), toRegexB(suffix), toRegexC(suffix), toRegexD(suffix), toRegexE(suffix)); } @@ -98,21 +126,21 @@ public class ComplementDate implements Something { } public Failable getMe(GanttDiagram system, RegexResult arg, String suffix) { - if (arg.get("ADAY" + suffix, 0) != null) { + if (arg.get("ADAY" + suffix, 0) != null) return Failable.ok(resultA(arg, suffix)); - } - if (arg.get("BDAY" + suffix, 0) != null) { + + if (arg.get("BDAY" + suffix, 0) != null) return Failable.ok(resultB(arg, suffix)); - } - if (arg.get("CDAY" + suffix, 0) != null) { + + if (arg.get("CDAY" + suffix, 0) != null) return Failable.ok(resultC(arg, suffix)); - } - if (arg.get("DCOUNT" + suffix, 0) != null) { + + if (arg.get("DCOUNT" + suffix, 0) != null) return Failable.ok(resultD(system, arg, suffix)); - } - if (arg.get("ECOUNT" + suffix, 0) != null) { + + if (arg.get("ECOUNT" + suffix, 0) != null) return Failable.ok(resultE(system, arg, suffix)); - } + throw new IllegalStateException(); } diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceHappensDate.java b/src/net/sourceforge/plantuml/project/lang/SentenceHappensDate.java index 2d1b81ead..456935ae1 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceHappensDate.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceHappensDate.java @@ -44,7 +44,7 @@ import net.sourceforge.plantuml.project.time.Day; public class SentenceHappensDate extends SentenceSimple { public SentenceHappensDate() { - super(SubjectTask.ME, Verbs.happens, new ComplementDate()); + super(SubjectTask.ME, Verbs.happens, ComplementDate.any()); } @Override diff --git a/src/net/sourceforge/plantuml/project/lang/SentencePausesDate.java b/src/net/sourceforge/plantuml/project/lang/SentencePausesDate.java index bc311db46..97ceea3a1 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentencePausesDate.java +++ b/src/net/sourceforge/plantuml/project/lang/SentencePausesDate.java @@ -43,7 +43,7 @@ import net.sourceforge.plantuml.project.time.Day; public class SentencePausesDate extends SentenceSimple { public SentencePausesDate() { - super(SubjectTask.ME, Verbs.pauses, new ComplementDate()); + super(SubjectTask.ME, Verbs.pauses, ComplementDate.any()); } @Override diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceTaskEndsAbsolute.java b/src/net/sourceforge/plantuml/project/lang/SentenceTaskEndsAbsolute.java index 484f7a41b..a01539449 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceTaskEndsAbsolute.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceTaskEndsAbsolute.java @@ -43,7 +43,7 @@ import net.sourceforge.plantuml.project.time.Day; public class SentenceTaskEndsAbsolute extends SentenceSimple { public SentenceTaskEndsAbsolute() { - super(SubjectTask.ME, Verbs.ends2, new ComplementDate()); + super(SubjectTask.ME, Verbs.ends2, ComplementDate.any()); } @Override diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsAbsolute.java b/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsAbsolute.java index e535412e0..492259ec7 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsAbsolute.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsAbsolute.java @@ -43,7 +43,7 @@ import net.sourceforge.plantuml.project.time.Day; public class SentenceTaskStartsAbsolute extends SentenceSimple { public SentenceTaskStartsAbsolute() { - super(SubjectTask.ME, Verbs.starts3, new ComplementDate()); + super(SubjectTask.ME, Verbs.starts3, ComplementDate.any()); } @Override @@ -52,7 +52,7 @@ public class SentenceTaskStartsAbsolute extends SentenceSimple { final Day start = (Day) complement; final Day startingDate = project.getStartingDate(); if (startingDate.getAbsoluteDayNum() == 0) - project.setProjectStartingDate(start); + return CommandExecutionResult.error("No starting date for the project"); task.setStart(start); return CommandExecutionResult.ok(); diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsOnlyRelative.java b/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsOnlyRelative.java new file mode 100644 index 000000000..bf9d07fae --- /dev/null +++ b/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsOnlyRelative.java @@ -0,0 +1,58 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.project.lang; + +import net.sourceforge.plantuml.command.CommandExecutionResult; +import net.sourceforge.plantuml.project.GanttDiagram; +import net.sourceforge.plantuml.project.core.Task; +import net.sourceforge.plantuml.project.time.Day; + +public class SentenceTaskStartsOnlyRelative extends SentenceSimple { + + public SentenceTaskStartsOnlyRelative() { + super(SubjectTask.ME, Verbs.starts3, ComplementDate.onlyRelative()); + } + + @Override + public CommandExecutionResult execute(GanttDiagram project, Object subject, Object complement) { + final Task task = (Task) subject; + final Day start = (Day) complement; + + task.setStart(start); + return CommandExecutionResult.ok(); + } + +} diff --git a/src/net/sourceforge/plantuml/project/lang/SubjectProject.java b/src/net/sourceforge/plantuml/project/lang/SubjectProject.java index 7b7a29c4d..50a42619f 100644 --- a/src/net/sourceforge/plantuml/project/lang/SubjectProject.java +++ b/src/net/sourceforge/plantuml/project/lang/SubjectProject.java @@ -68,7 +68,7 @@ public class SubjectProject implements Subject { class Starts extends SentenceSimple { public Starts() { - super(SubjectProject.this, Verbs.starts, new ComplementDate()); + super(SubjectProject.this, Verbs.starts, ComplementDate.onlyAbsolute()); } @Override diff --git a/src/net/sourceforge/plantuml/project/lang/SubjectResource.java b/src/net/sourceforge/plantuml/project/lang/SubjectResource.java index 95b813ce9..89e14f57b 100644 --- a/src/net/sourceforge/plantuml/project/lang/SubjectResource.java +++ b/src/net/sourceforge/plantuml/project/lang/SubjectResource.java @@ -63,7 +63,8 @@ public class SubjectResource implements Subject { } public Collection getSentences() { - return Arrays.asList(new IsOffDate(), new IsOffDates(), new IsOffDayOfWeek(), new IsOnDate(), new IsOnDates()); + return Arrays.asList(new IsOffDate(), new IsOffDates(), new IsOffDayOfWeek(), new IsOnDate(), new IsOnDates(), + new IsOffBeforeDate(), new IsOffAfterDate()); } public IRegex toRegex() { @@ -72,10 +73,42 @@ public class SubjectResource implements Subject { ); } + public class IsOffBeforeDate extends SentenceSimple { + + public IsOffBeforeDate() { + super(SubjectResource.this, Verbs.isOffBefore, ComplementDate.any()); + } + + @Override + public CommandExecutionResult execute(GanttDiagram project, Object subject, Object complement) { + final Resource resource = (Resource) subject; + final Day when = (Day) complement; + resource.setOffBeforeDate(when); + return CommandExecutionResult.ok(); + } + + } + + public class IsOffAfterDate extends SentenceSimple { + + public IsOffAfterDate() { + super(SubjectResource.this, Verbs.isOffAfter, ComplementDate.any()); + } + + @Override + public CommandExecutionResult execute(GanttDiagram project, Object subject, Object complement) { + final Resource resource = (Resource) subject; + final Day when = (Day) complement; + resource.setOffAfterDate(when); + return CommandExecutionResult.ok(); + } + + } + public class IsOffDate extends SentenceSimple { public IsOffDate() { - super(SubjectResource.this, Verbs.isOff, new ComplementDate()); + super(SubjectResource.this, Verbs.isOff, ComplementDate.any()); } @Override @@ -123,7 +156,7 @@ public class SubjectResource implements Subject { public class IsOnDate extends SentenceSimple { public IsOnDate() { - super(SubjectResource.this, Verbs.isOn, new ComplementDate()); + super(SubjectResource.this, Verbs.isOn, ComplementDate.any()); } @Override diff --git a/src/net/sourceforge/plantuml/project/lang/SubjectSeparator.java b/src/net/sourceforge/plantuml/project/lang/SubjectSeparator.java index 85344a55f..261e640d4 100644 --- a/src/net/sourceforge/plantuml/project/lang/SubjectSeparator.java +++ b/src/net/sourceforge/plantuml/project/lang/SubjectSeparator.java @@ -69,7 +69,7 @@ public class SubjectSeparator implements Subject { class JustBefore extends SentenceSimple { public JustBefore() { - super(SubjectSeparator.this, Verbs.justBefore, new ComplementDate()); + super(SubjectSeparator.this, Verbs.justBefore, ComplementDate.any()); } @Override @@ -85,7 +85,7 @@ public class SubjectSeparator implements Subject { class JustAfter extends SentenceSimple { public JustAfter() { - super(SubjectSeparator.this, Verbs.justAfter, new ComplementDate()); + super(SubjectSeparator.this, Verbs.justAfter, ComplementDate.any()); } @Override diff --git a/src/net/sourceforge/plantuml/project/lang/SubjectTask.java b/src/net/sourceforge/plantuml/project/lang/SubjectTask.java index b9386bb85..50cc79164 100644 --- a/src/net/sourceforge/plantuml/project/lang/SubjectTask.java +++ b/src/net/sourceforge/plantuml/project/lang/SubjectTask.java @@ -81,11 +81,11 @@ public class SubjectTask implements Subject { public Collection getSentences() { return Arrays.asList(new SentenceLasts(), new SentenceTaskStarts(), new SentenceTaskStartsWithColor(), - new SentenceTaskStartsAbsolute(), new SentenceHappens(), new SentenceHappensDate(), new SentenceEnds(), - new SentenceTaskEndsAbsolute(), new SentenceIsColored(), new SentenceIsColoredForCompletion(), - new SentenceIsDeleted(), new SentenceIsForTask(), new SentenceLinksTo(), new SentenceOccurs(), - new SentenceDisplayOnSameRowAs(), new SentencePausesDate(), new SentencePausesDates(), - new SentencePausesDayOfWeek()); + new SentenceTaskStartsOnlyRelative(), new SentenceTaskStartsAbsolute(), new SentenceHappens(), + new SentenceHappensDate(), new SentenceEnds(), new SentenceTaskEndsAbsolute(), new SentenceIsColored(), + new SentenceIsColoredForCompletion(), new SentenceIsDeleted(), new SentenceIsForTask(), + new SentenceLinksTo(), new SentenceOccurs(), new SentenceDisplayOnSameRowAs(), new SentencePausesDate(), + new SentencePausesDates(), new SentencePausesDayOfWeek()); } public IRegex toRegex() { diff --git a/src/net/sourceforge/plantuml/project/lang/SubjectToday.java b/src/net/sourceforge/plantuml/project/lang/SubjectToday.java index 05c58e6eb..3ee19a018 100644 --- a/src/net/sourceforge/plantuml/project/lang/SubjectToday.java +++ b/src/net/sourceforge/plantuml/project/lang/SubjectToday.java @@ -90,7 +90,7 @@ public class SubjectToday implements Subject { class IsDate extends SentenceSimple { public IsDate() { - super(SubjectToday.this, Verbs.is, new ComplementDate()); + super(SubjectToday.this, Verbs.is, ComplementDate.any()); } @Override diff --git a/src/net/sourceforge/plantuml/project/lang/Verbs.java b/src/net/sourceforge/plantuml/project/lang/Verbs.java index f80c3a88e..58f92eafb 100644 --- a/src/net/sourceforge/plantuml/project/lang/Verbs.java +++ b/src/net/sourceforge/plantuml/project/lang/Verbs.java @@ -70,17 +70,33 @@ public class Verbs { new RegexLeaf("off"), // RegexLeaf.spaceOneOrMore(), // new RegexOr(// + new RegexLeaf("from"), // new RegexLeaf("on"), // new RegexLeaf("for"), // new RegexLeaf("the"), // new RegexLeaf("at") // )); + public static IRegex isOffBefore = new RegexConcat(new RegexLeaf("is"), // + RegexLeaf.spaceOneOrMore(), // + new RegexLeaf("off"), // + RegexLeaf.spaceOneOrMore(), // + new RegexLeaf("before") // + ); + + public static IRegex isOffAfter = new RegexConcat(new RegexLeaf("is"), // + RegexLeaf.spaceOneOrMore(), // + new RegexLeaf("off"), // + RegexLeaf.spaceOneOrMore(), // + new RegexLeaf("after") // + ); + public static IRegex isOn = new RegexConcat(new RegexLeaf("is"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("on"), // RegexLeaf.spaceOneOrMore(), // new RegexOr(// + new RegexLeaf("from"), // new RegexLeaf("on"), // new RegexLeaf("for"), // new RegexLeaf("the"), // diff --git a/src/net/sourceforge/plantuml/project/solver/ImpossibleSolvingException.java b/src/net/sourceforge/plantuml/project/solver/ImpossibleSolvingException.java new file mode 100644 index 000000000..c13085fde --- /dev/null +++ b/src/net/sourceforge/plantuml/project/solver/ImpossibleSolvingException.java @@ -0,0 +1,44 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.project.solver; + +public class ImpossibleSolvingException extends RuntimeException { + + public ImpossibleSolvingException(String message) { + super(message); + } + +} diff --git a/src/net/sourceforge/plantuml/project/solver/SolverImpl.java b/src/net/sourceforge/plantuml/project/solver/SolverImpl.java index b7898c72b..d20d0d851 100644 --- a/src/net/sourceforge/plantuml/project/solver/SolverImpl.java +++ b/src/net/sourceforge/plantuml/project/solver/SolverImpl.java @@ -41,7 +41,7 @@ import net.sourceforge.plantuml.project.core.TaskAttribute; import net.sourceforge.plantuml.project.time.Day; public class SolverImpl extends AbstractSolver implements Solver { - // ::remove folder when __HAXE__ + // ::remove folder when __HAXE__ private final LoadPlanable loadPlanable; @@ -54,12 +54,17 @@ public class SolverImpl extends AbstractSolver implements Solver { Day current = (Day) values.get(TaskAttribute.START); int fullLoad = ((Load) values.get(TaskAttribute.LOAD)).getFullLoad(); int cpt = 0; + final Day lastDayIfAny = loadPlanable.getLastDayIfAny(); while (fullLoad > 0) { fullLoad -= loadPlanable.getLoadAt(current); current = current.increment(); + if (lastDayIfAny != null && current.compareTo(lastDayIfAny) > 0) + throw new ImpossibleSolvingException( + "Because all resources will be off at some point, we cannot compute any end date for " + + loadPlanable); cpt++; if (cpt > 100000) - throw new IllegalStateException(); + throw new ImpossibleSolvingException("There is an issue in planning your tasks!"); } return current.decrement(); @@ -78,7 +83,7 @@ public class SolverImpl extends AbstractSolver implements Solver { cpt++; if (cpt > 100000) - throw new IllegalStateException(); + throw new ImpossibleSolvingException("There is an issue in planning your tasks!"); } return current.increment(); diff --git a/src/net/sourceforge/plantuml/style/SName.java b/src/net/sourceforge/plantuml/style/SName.java index aa74331bb..96644bffe 100644 --- a/src/net/sourceforge/plantuml/style/SName.java +++ b/src/net/sourceforge/plantuml/style/SName.java @@ -138,7 +138,8 @@ public enum SName { undone, // unstarted, // usecase, // - + verticalSeparator, // + visibilityIcon, // private_, // protected_, // diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index a8d2af927..942297437 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -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.13beta2"; + private static final String version = "1.2023.13beta3"; public static String versionString() { return version; From 422c74eba49abaad0fd5c601ee17a362775d965e Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Thu, 23 Nov 2023 20:11:10 +0100 Subject: [PATCH 14/95] fix: minor issue about Gantt D+00 syntax --- ...entenceLasts.java => SentenceRequire.java} | 6 +- .../lang/SentenceTaskEndsOnlyRelative.java | 58 +++++++++++++++++++ .../plantuml/project/lang/SubjectTask.java | 11 ++-- .../plantuml/project/lang/Verbs.java | 2 +- 4 files changed, 68 insertions(+), 9 deletions(-) rename src/net/sourceforge/plantuml/project/lang/{SentenceLasts.java => SentenceRequire.java} (92%) create mode 100644 src/net/sourceforge/plantuml/project/lang/SentenceTaskEndsOnlyRelative.java diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceLasts.java b/src/net/sourceforge/plantuml/project/lang/SentenceRequire.java similarity index 92% rename from src/net/sourceforge/plantuml/project/lang/SentenceLasts.java rename to src/net/sourceforge/plantuml/project/lang/SentenceRequire.java index 8927dc05b..d22d11f1b 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceLasts.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceRequire.java @@ -40,10 +40,10 @@ import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.project.Load; import net.sourceforge.plantuml.project.core.Task; -public class SentenceLasts extends SentenceSimple { +public class SentenceRequire extends SentenceSimple { - public SentenceLasts() { - super(SubjectTask.ME, Verbs.lasts, new ComplementSeveralDays()); + public SentenceRequire() { + super(SubjectTask.ME, Verbs.requires, new ComplementSeveralDays()); } @Override diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceTaskEndsOnlyRelative.java b/src/net/sourceforge/plantuml/project/lang/SentenceTaskEndsOnlyRelative.java new file mode 100644 index 000000000..95ed3fe3b --- /dev/null +++ b/src/net/sourceforge/plantuml/project/lang/SentenceTaskEndsOnlyRelative.java @@ -0,0 +1,58 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.project.lang; + +import net.sourceforge.plantuml.command.CommandExecutionResult; +import net.sourceforge.plantuml.project.GanttDiagram; +import net.sourceforge.plantuml.project.core.Task; +import net.sourceforge.plantuml.project.time.Day; + +public class SentenceTaskEndsOnlyRelative extends SentenceSimple { + + public SentenceTaskEndsOnlyRelative() { + super(SubjectTask.ME, Verbs.ends2, ComplementDate.onlyRelative()); + } + + @Override + public CommandExecutionResult execute(GanttDiagram project, Object subject, Object complement) { + final Task task = (Task) subject; + final Day end = (Day) complement; + + task.setEnd(end); + return CommandExecutionResult.ok(); + } + +} diff --git a/src/net/sourceforge/plantuml/project/lang/SubjectTask.java b/src/net/sourceforge/plantuml/project/lang/SubjectTask.java index 50cc79164..c04d64b16 100644 --- a/src/net/sourceforge/plantuml/project/lang/SubjectTask.java +++ b/src/net/sourceforge/plantuml/project/lang/SubjectTask.java @@ -80,12 +80,13 @@ public class SubjectTask implements Subject { } public Collection getSentences() { - return Arrays.asList(new SentenceLasts(), new SentenceTaskStarts(), new SentenceTaskStartsWithColor(), + return Arrays.asList(new SentenceRequire(), new SentenceTaskStarts(), new SentenceTaskStartsWithColor(), new SentenceTaskStartsOnlyRelative(), new SentenceTaskStartsAbsolute(), new SentenceHappens(), - new SentenceHappensDate(), new SentenceEnds(), new SentenceTaskEndsAbsolute(), new SentenceIsColored(), - new SentenceIsColoredForCompletion(), new SentenceIsDeleted(), new SentenceIsForTask(), - new SentenceLinksTo(), new SentenceOccurs(), new SentenceDisplayOnSameRowAs(), new SentencePausesDate(), - new SentencePausesDates(), new SentencePausesDayOfWeek()); + new SentenceHappensDate(), new SentenceEnds(), new SentenceTaskEndsOnlyRelative(), + new SentenceTaskEndsAbsolute(), new SentenceIsColored(), new SentenceIsColoredForCompletion(), + new SentenceIsDeleted(), new SentenceIsForTask(), new SentenceLinksTo(), new SentenceOccurs(), + new SentenceDisplayOnSameRowAs(), new SentencePausesDate(), new SentencePausesDates(), + new SentencePausesDayOfWeek()); } public IRegex toRegex() { diff --git a/src/net/sourceforge/plantuml/project/lang/Verbs.java b/src/net/sourceforge/plantuml/project/lang/Verbs.java index 58f92eafb..b534124ad 100644 --- a/src/net/sourceforge/plantuml/project/lang/Verbs.java +++ b/src/net/sourceforge/plantuml/project/lang/Verbs.java @@ -108,7 +108,7 @@ public class Verbs { public static IRegex isOrAreNamed = new RegexLeaf("(is|are)[%s]+named"); - public static IRegex lasts = new RegexLeaf("(lasts|requires)"); + public static IRegex requires = new RegexLeaf("(lasts|requires?)"); public static IRegex linksTo = new RegexLeaf("links to"); From b48ea951124cc3c70f606880134677752116e39b Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Thu, 23 Nov 2023 20:42:31 +0100 Subject: [PATCH 15/95] fix: fix bad note shape in sequence diagram https://github.com/plantuml/plantuml/issues/1609 --- .../plantuml/sequencediagram/NoteStyle.java | 15 ++++++++------- .../sequencediagram/graphic/Step1MessageExo.java | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/net/sourceforge/plantuml/sequencediagram/NoteStyle.java b/src/net/sourceforge/plantuml/sequencediagram/NoteStyle.java index 8de7a1bc6..bb5ff3d5f 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/NoteStyle.java +++ b/src/net/sourceforge/plantuml/sequencediagram/NoteStyle.java @@ -44,21 +44,22 @@ public enum NoteStyle { NORMAL, HEXAGONAL, BOX; public static NoteStyle getNoteStyle(String s) { - if (s.equalsIgnoreCase("hnote")) { + if (s.equalsIgnoreCase("hnote")) return NoteStyle.HEXAGONAL; - } else if (s.equalsIgnoreCase("rnote")) { + + if (s.equalsIgnoreCase("rnote")) return NoteStyle.BOX; - } + return NoteStyle.NORMAL; } public ComponentType getNoteComponentType() { - if (this == NoteStyle.HEXAGONAL) { + if (this == NoteStyle.HEXAGONAL) return ComponentType.NOTE_HEXAGONAL; - } - if (this == NoteStyle.BOX) { + + if (this == NoteStyle.BOX) return ComponentType.NOTE_BOX; - } + return ComponentType.NOTE; } diff --git a/src/net/sourceforge/plantuml/sequencediagram/graphic/Step1MessageExo.java b/src/net/sourceforge/plantuml/sequencediagram/graphic/Step1MessageExo.java index 63ba0a34e..be9146eb4 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/graphic/Step1MessageExo.java +++ b/src/net/sourceforge/plantuml/sequencediagram/graphic/Step1MessageExo.java @@ -46,7 +46,6 @@ import net.sourceforge.plantuml.sequencediagram.Note; import net.sourceforge.plantuml.skin.ArrowComponent; import net.sourceforge.plantuml.skin.ArrowConfiguration; import net.sourceforge.plantuml.skin.Component; -import net.sourceforge.plantuml.skin.ComponentType; import net.sourceforge.plantuml.style.ISkinParam; class Step1MessageExo extends Step1Abstract { @@ -69,7 +68,8 @@ class Step1MessageExo extends Step1Abstract { for (Note noteOnMessage : noteOnMessages) { final ISkinParam skinParam = noteOnMessage.getSkinParamBackcolored(drawingSet.getSkinParam()); final Component note = drawingSet.getSkin().createComponentNote(noteOnMessage.getUsedStyles(), - ComponentType.NOTE, skinParam, noteOnMessage.getDisplay(), noteOnMessage.getColors()); + noteOnMessage.getNoteStyle().getNoteComponentType(), skinParam, noteOnMessage.getDisplay(), + noteOnMessage.getColors()); addNote(note); } From a98d8ccdd5db6976cf01a6467b52d013b497072a Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Thu, 23 Nov 2023 21:04:56 +0100 Subject: [PATCH 16/95] fix: fix MaximumWidth style for legend https://github.com/plantuml/plantuml/issues/1608 --- .../sourceforge/plantuml/AnnotatedBuilder.java | 5 +++-- .../ftile/EntityImageLegend.java | 4 +++- .../plantuml/cucadiagram/DisplaySection.java | 4 +++- src/net/sourceforge/plantuml/png/PngTitler.java | 3 ++- .../graphic/SequenceDiagramFileMakerPuma2.java | 6 ++++-- .../teoz/SequenceDiagramFileMakerTeoz.java | 4 +++- src/net/sourceforge/plantuml/style/Style.java | 16 +++++++--------- 7 files changed, 25 insertions(+), 17 deletions(-) diff --git a/src/net/sourceforge/plantuml/AnnotatedBuilder.java b/src/net/sourceforge/plantuml/AnnotatedBuilder.java index 5b539e082..719d20fa4 100644 --- a/src/net/sourceforge/plantuml/AnnotatedBuilder.java +++ b/src/net/sourceforge/plantuml/AnnotatedBuilder.java @@ -40,6 +40,7 @@ import net.sourceforge.plantuml.abel.DisplayPositioned; import net.sourceforge.plantuml.activitydiagram3.ftile.EntityImageLegend; import net.sourceforge.plantuml.cucadiagram.DisplaySection; import net.sourceforge.plantuml.klimt.Fashion; +import net.sourceforge.plantuml.klimt.LineBreakStrategy; import net.sourceforge.plantuml.klimt.UTranslate; import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.creole.Display; @@ -167,7 +168,7 @@ public class AnnotatedBuilder { final Style style = StyleSignatureBasic.of(SName.root, SName.document, SName.title) .getMergedStyle(skinParam.getCurrentStyleBuilder()); final TextBlock block = style.createTextBlockBordered(title.getDisplay(), skinParam.getIHtmlColorSet(), - skinParam, Style.ID_TITLE); + skinParam, Style.ID_TITLE, LineBreakStrategy.NONE); return block; } @@ -179,7 +180,7 @@ public class AnnotatedBuilder { final Style style = StyleSignatureBasic.of(SName.root, SName.document, SName.caption) .getMergedStyle(skinParam.getCurrentStyleBuilder()); return style.createTextBlockBordered(caption.getDisplay(), skinParam.getIHtmlColorSet(), skinParam, - Style.ID_CAPTION); + Style.ID_CAPTION, LineBreakStrategy.NONE); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/EntityImageLegend.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/EntityImageLegend.java index 75a603cd2..ba8ae42b9 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/EntityImageLegend.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/EntityImageLegend.java @@ -49,7 +49,9 @@ public class EntityImageLegend { final Style style = StyleSignatureBasic .of(SName.root, SName.root, SName.document, skinParam.getUmlDiagramType().getStyleName(), SName.legend) .getMergedStyle(skinParam.getCurrentStyleBuilder()); - return style.createTextBlockBordered(note, skinParam.getIHtmlColorSet(), skinParam, Style.ID_LEGEND); + + return style.createTextBlockBordered(note, skinParam.getIHtmlColorSet(), skinParam, Style.ID_LEGEND, + style.wrapWidth()); } } diff --git a/src/net/sourceforge/plantuml/cucadiagram/DisplaySection.java b/src/net/sourceforge/plantuml/cucadiagram/DisplaySection.java index 6f4328614..c3248e6b6 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/DisplaySection.java +++ b/src/net/sourceforge/plantuml/cucadiagram/DisplaySection.java @@ -38,6 +38,7 @@ package net.sourceforge.plantuml.cucadiagram; import java.util.EnumMap; import java.util.Map; +import net.sourceforge.plantuml.klimt.LineBreakStrategy; import net.sourceforge.plantuml.klimt.creole.Display; import net.sourceforge.plantuml.klimt.font.FontConfiguration; import net.sourceforge.plantuml.klimt.geom.HorizontalAlignment; @@ -96,7 +97,8 @@ public class DisplaySection { return null; if (style != null) - return style.createTextBlockBordered(display, spriteContainer.getIHtmlColorSet(), spriteContainer, null); + return style.createTextBlockBordered(display, spriteContainer.getIHtmlColorSet(), spriteContainer, null, + LineBreakStrategy.NONE); return display.create(fontConfiguration, getHorizontalAlignment(), spriteContainer); } diff --git a/src/net/sourceforge/plantuml/png/PngTitler.java b/src/net/sourceforge/plantuml/png/PngTitler.java index 662710e6f..56a35e0d0 100644 --- a/src/net/sourceforge/plantuml/png/PngTitler.java +++ b/src/net/sourceforge/plantuml/png/PngTitler.java @@ -36,6 +36,7 @@ package net.sourceforge.plantuml.png; import net.sourceforge.plantuml.cucadiagram.DisplaySection; +import net.sourceforge.plantuml.klimt.LineBreakStrategy; import net.sourceforge.plantuml.klimt.color.HColorSet; import net.sourceforge.plantuml.klimt.creole.Display; import net.sourceforge.plantuml.klimt.font.StringBounder; @@ -73,6 +74,6 @@ public class PngTitler { if (display == null) return null; - return style.createTextBlockBordered(display, set, spriteContainer, Style.ID_TITLE); + return style.createTextBlockBordered(display, set, spriteContainer, Style.ID_TITLE, LineBreakStrategy.NONE); } } diff --git a/src/net/sourceforge/plantuml/sequencediagram/graphic/SequenceDiagramFileMakerPuma2.java b/src/net/sourceforge/plantuml/sequencediagram/graphic/SequenceDiagramFileMakerPuma2.java index 65600ca90..f6f35de5a 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/graphic/SequenceDiagramFileMakerPuma2.java +++ b/src/net/sourceforge/plantuml/sequencediagram/graphic/SequenceDiagramFileMakerPuma2.java @@ -46,6 +46,7 @@ import net.sourceforge.plantuml.AnnotatedBuilder; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.cucadiagram.DisplaySection; +import net.sourceforge.plantuml.klimt.LineBreakStrategy; import net.sourceforge.plantuml.klimt.UTranslate; import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.creole.Display; @@ -165,7 +166,7 @@ public class SequenceDiagramFileMakerPuma2 implements FileMaker { final Style style = StyleSignatureBasic.of(SName.root, SName.document, SName.title) .getMergedStyle(diagram.getSkinParam().getCurrentStyleBuilder()); compTitle = style.createTextBlockBordered(page.getTitle(), diagram.getSkinParam().getIHtmlColorSet(), - diagram.getSkinParam(), Style.ID_TITLE); + diagram.getSkinParam(), Style.ID_TITLE, LineBreakStrategy.NONE); final XDimension2D dimTitle = compTitle.calculateDimension(stringBounder); area.setTitleArea(dimTitle.getWidth(), dimTitle.getHeight()); } @@ -179,7 +180,8 @@ public class SequenceDiagramFileMakerPuma2 implements FileMaker { final Style style = StyleSignatureBasic.of(SName.root, SName.document, SName.legend) .getMergedStyle(diagram.getSkinParam().getCurrentStyleBuilder()); legendBlock = style.createTextBlockBordered(diagram.getLegend().getDisplay(), - diagram.getSkinParam().getIHtmlColorSet(), diagram.getSkinParam(), Style.ID_LEGEND); + diagram.getSkinParam().getIHtmlColorSet(), diagram.getSkinParam(), Style.ID_LEGEND, + LineBreakStrategy.NONE); } final XDimension2D dimLegend = legendBlock.calculateDimension(stringBounder); area.setLegend(dimLegend, isLegendTop(), diagram.getLegend().getHorizontalAlignment()); diff --git a/src/net/sourceforge/plantuml/sequencediagram/teoz/SequenceDiagramFileMakerTeoz.java b/src/net/sourceforge/plantuml/sequencediagram/teoz/SequenceDiagramFileMakerTeoz.java index 96d4a3fff..0128c06a9 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/teoz/SequenceDiagramFileMakerTeoz.java +++ b/src/net/sourceforge/plantuml/sequencediagram/teoz/SequenceDiagramFileMakerTeoz.java @@ -43,6 +43,7 @@ import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.activitydiagram3.ftile.EntityImageLegend; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.cucadiagram.DisplaySection; +import net.sourceforge.plantuml.klimt.LineBreakStrategy; import net.sourceforge.plantuml.klimt.UTranslate; import net.sourceforge.plantuml.klimt.creole.Display; import net.sourceforge.plantuml.klimt.drawing.UGraphic; @@ -213,7 +214,8 @@ public class SequenceDiagramFileMakerTeoz implements FileMaker { final Style style = StyleSignatureBasic.of(SName.root, SName.document, SName.title) .getMergedStyle(diagram.getSkinParam().getCurrentStyleBuilder()); final TextBlock compTitle = style.createTextBlockBordered(diagram.getTitle().getDisplay(), - diagram.getSkinParam().getIHtmlColorSet(), diagram.getSkinParam(), Style.ID_TITLE); + diagram.getSkinParam().getIHtmlColorSet(), diagram.getSkinParam(), Style.ID_TITLE, + LineBreakStrategy.NONE); return compTitle; } diff --git a/src/net/sourceforge/plantuml/style/Style.java b/src/net/sourceforge/plantuml/style/Style.java index 78e92f2de..c1c960ec6 100644 --- a/src/net/sourceforge/plantuml/style/Style.java +++ b/src/net/sourceforge/plantuml/style/Style.java @@ -40,7 +40,6 @@ import java.util.Map; import java.util.Map.Entry; import java.util.StringTokenizer; -import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.klimt.Fashion; import net.sourceforge.plantuml.klimt.LineBreakStrategy; import net.sourceforge.plantuml.klimt.UStroke; @@ -49,6 +48,7 @@ import net.sourceforge.plantuml.klimt.color.Colors; import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.HColorSet; import net.sourceforge.plantuml.klimt.color.HColors; +import net.sourceforge.plantuml.klimt.creole.CreoleMode; import net.sourceforge.plantuml.klimt.creole.Display; import net.sourceforge.plantuml.klimt.drawing.UGraphic; import net.sourceforge.plantuml.klimt.font.FontConfiguration; @@ -283,19 +283,17 @@ public class Style { return value(PName.HorizontalAlignment).asHorizontalAlignment(); } - private TextBlock createTextBlockInternal(Display display, HColorSet set, ISkinSimple spriteContainer, - HorizontalAlignment alignment) { - final FontConfiguration fc = getFontConfiguration(set); - return display.create(fc, alignment, spriteContainer); - } - public static final String ID_TITLE = "_title"; public static final String ID_CAPTION = "_caption"; public static final String ID_LEGEND = "_legend"; - public TextBlock createTextBlockBordered(Display note, HColorSet set, ISkinSimple spriteContainer, String id) { + public TextBlock createTextBlockBordered(Display note, HColorSet set, ISkinSimple spriteContainer, String id, + LineBreakStrategy lineBreak) { final HorizontalAlignment alignment = this.getHorizontalAlignment(); - final TextBlock textBlock = this.createTextBlockInternal(note, set, spriteContainer, alignment); + final FontConfiguration fc = this.getFontConfiguration(set); + + final TextBlock textBlock = note.create0(fc, alignment, spriteContainer, lineBreak, CreoleMode.FULL, null, + null); final HColor backgroundColor = this.value(PName.BackGroundColor).asColor(set); final HColor lineColor = this.value(PName.LineColor).asColor(set); From bcb3b92dbc28b911c258bd1067e33f319248a80d Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Thu, 23 Nov 2023 21:16:49 +0100 Subject: [PATCH 17/95] fix: disable creole for file listing https://github.com/plantuml/plantuml/issues/1448#issuecomment-1820720969 --- src/net/sourceforge/plantuml/filesdiagram/FEntry.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net/sourceforge/plantuml/filesdiagram/FEntry.java b/src/net/sourceforge/plantuml/filesdiagram/FEntry.java index eefc7d18e..8364e560d 100644 --- a/src/net/sourceforge/plantuml/filesdiagram/FEntry.java +++ b/src/net/sourceforge/plantuml/filesdiagram/FEntry.java @@ -135,7 +135,7 @@ public class FEntry implements Iterable { return createOpale(); final Display display = Display.getWithNewlines(getEmoticon() + getName()); - TextBlock result = display.create(fontConfiguration, HorizontalAlignment.LEFT, skinParam); + TextBlock result = display.create7(fontConfiguration, HorizontalAlignment.LEFT, skinParam, CreoleMode.NO_CREOLE); return result; } From f0b3e6900c3adc7b6c52d1482304815c28975b36 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Sun, 26 Nov 2023 18:57:11 +0100 Subject: [PATCH 18/95] feat: improve gantt language --- .../plantuml/project/GanttDiagram.java | 24 ++++- ...wBasicImpl.java => ResourceDrawBasic.java} | 4 +- .../plantuml/project/lang/Adverbial.java | 44 +++++++++ .../project/lang/ComplementDates.java | 8 +- .../plantuml/project/lang/ComplementTask.java | 58 +++++++++++ .../plantuml/project/lang/Sentence.java | 5 + .../plantuml/project/lang/SentenceAnd.java | 36 +++---- .../plantuml/project/lang/SentenceAndAnd.java | 53 +++++------ .../project/lang/SentenceHappens.java | 3 +- .../project/lang/SentenceHappensDate.java | 2 +- .../lang/SentenceIsColoredForCompletion.java | 3 +- .../project/lang/SentencePausesDate.java | 3 +- .../project/lang/SentencePausesDates.java | 11 +-- .../project/lang/SentencePausesDayOfWeek.java | 3 +- .../plantuml/project/lang/SentenceSimple.java | 58 +++++++---- .../lang/SentenceTaskEndsAbsolute.java | 3 +- .../lang/SentenceTaskEndsOnlyRelative.java | 3 +- .../project/lang/SentenceTaskStarts.java | 2 +- .../lang/SentenceTaskStartsAbsolute.java | 2 +- .../lang/SentenceTaskStartsOnlyRelative.java | 3 +- .../lang/SentenceTaskStartsWithColor.java | 2 +- .../plantuml/project/lang/SubjectProject.java | 3 +- .../project/lang/SubjectResource.java | 73 ++++++++++---- .../project/lang/SubjectSeparator.java | 4 +- .../plantuml/project/lang/SubjectTask.java | 54 ++++++----- .../plantuml/project/lang/Verbs.java | 95 ++----------------- .../plantuml/project/lang/Words.java | 77 +++++++++++++++ .../regex/RegexRepeatedZeroOrMore.java | 58 +++++++++++ 28 files changed, 475 insertions(+), 219 deletions(-) rename src/net/sourceforge/plantuml/project/draw/{ResourceDrawBasicImpl.java => ResourceDrawBasic.java} (96%) create mode 100644 src/net/sourceforge/plantuml/project/lang/Adverbial.java create mode 100644 src/net/sourceforge/plantuml/project/lang/ComplementTask.java create mode 100644 src/net/sourceforge/plantuml/project/lang/Words.java create mode 100644 src/net/sourceforge/plantuml/regex/RegexRepeatedZeroOrMore.java diff --git a/src/net/sourceforge/plantuml/project/GanttDiagram.java b/src/net/sourceforge/plantuml/project/GanttDiagram.java index b3207c3df..10a540edc 100644 --- a/src/net/sourceforge/plantuml/project/GanttDiagram.java +++ b/src/net/sourceforge/plantuml/project/GanttDiagram.java @@ -86,7 +86,7 @@ import net.sourceforge.plantuml.project.core.TaskInstant; import net.sourceforge.plantuml.project.core.TaskSeparator; import net.sourceforge.plantuml.project.draw.FingerPrint; import net.sourceforge.plantuml.project.draw.ResourceDraw; -import net.sourceforge.plantuml.project.draw.ResourceDrawVersion2; +import net.sourceforge.plantuml.project.draw.ResourceDrawBasic; import net.sourceforge.plantuml.project.draw.TaskDraw; import net.sourceforge.plantuml.project.draw.TaskDrawDiamond; import net.sourceforge.plantuml.project.draw.TaskDrawGroup; @@ -153,6 +153,9 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit private int defaultCompletion = 100; + private Task it; + private Resource they; + public CommandExecutionResult changeLanguage(String lang) { this.locale = new Locale(lang); return CommandExecutionResult.ok(); @@ -487,7 +490,8 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit private ResourceDraw buildResourceDraw(GanttDiagram gantt, Resource res, TimeScale timeScale, double y, Day min, Day max) { - return new ResourceDrawVersion2(gantt, res, timeScale, y, min, max); + return new ResourceDrawBasic(gantt, res, timeScale, y, min, max); + // return new ResourceDrawVersion2(gantt, res, timeScale, y, min, max); } private Collection getConstraints(Task task) { @@ -906,4 +910,20 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit return Collections.unmodifiableList(result); } + public void setIt(Task result) { + this.it = result; + } + + public Task getIt() { + return it; + } + + public final Resource getThey() { + return they; + } + + public final void setThey(Resource they) { + this.they = they; + } + } diff --git a/src/net/sourceforge/plantuml/project/draw/ResourceDrawBasicImpl.java b/src/net/sourceforge/plantuml/project/draw/ResourceDrawBasic.java similarity index 96% rename from src/net/sourceforge/plantuml/project/draw/ResourceDrawBasicImpl.java rename to src/net/sourceforge/plantuml/project/draw/ResourceDrawBasic.java index 7be2906d0..5ba180cda 100644 --- a/src/net/sourceforge/plantuml/project/draw/ResourceDrawBasicImpl.java +++ b/src/net/sourceforge/plantuml/project/draw/ResourceDrawBasic.java @@ -52,7 +52,7 @@ import net.sourceforge.plantuml.project.core.Resource; import net.sourceforge.plantuml.project.time.Day; import net.sourceforge.plantuml.project.timescale.TimeScale; -public class ResourceDrawBasicImpl implements ResourceDraw { +public class ResourceDrawBasic implements ResourceDraw { private final Resource res; private final TimeScale timeScale; @@ -61,7 +61,7 @@ public class ResourceDrawBasicImpl implements ResourceDraw { private final Day max; private final GanttDiagram gantt; - public ResourceDrawBasicImpl(GanttDiagram gantt, Resource res, TimeScale timeScale, double y, Day min, Day max) { + public ResourceDrawBasic(GanttDiagram gantt, Resource res, TimeScale timeScale, double y, Day min, Day max) { this.res = res; this.timeScale = timeScale; this.y = y; diff --git a/src/net/sourceforge/plantuml/project/lang/Adverbial.java b/src/net/sourceforge/plantuml/project/lang/Adverbial.java new file mode 100644 index 000000000..2c8ad3a02 --- /dev/null +++ b/src/net/sourceforge/plantuml/project/lang/Adverbial.java @@ -0,0 +1,44 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.project.lang; + +import net.sourceforge.plantuml.regex.IRegex; + +public interface Adverbial { + + public IRegex toRegex(); + +} diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementDates.java b/src/net/sourceforge/plantuml/project/lang/ComplementDates.java index 4bcbb31f1..eece3d85f 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementDates.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementDates.java @@ -58,8 +58,8 @@ public class ComplementDates implements Something { new RegexLeaf("BMONTH1" + suffix, "([\\d]{1,2})"), // new RegexLeaf("\\D"), // new RegexLeaf("BDAY1" + suffix, "([\\d]{1,2})"), // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("to"), // + Words.exactly(Words.TO), // + Words.zeroOrMore(Words.THE), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("BYEAR2" + suffix, "([\\d]{4})"), // new RegexLeaf("\\D"), // @@ -73,8 +73,8 @@ public class ComplementDates implements Something { return new RegexConcat( // new RegexLeaf("[dD]\\+"), // new RegexLeaf("ECOUNT1" + suffix, "([\\d]+)"), // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("to"), // + Words.exactly(Words.TO), // + Words.zeroOrMore(Words.THE), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("[dD]\\+"), // new RegexLeaf("ECOUNT2" + suffix, "([\\d]+)") // diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementTask.java b/src/net/sourceforge/plantuml/project/lang/ComplementTask.java new file mode 100644 index 000000000..aae8a1e63 --- /dev/null +++ b/src/net/sourceforge/plantuml/project/lang/ComplementTask.java @@ -0,0 +1,58 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.project.lang; + +import net.sourceforge.plantuml.project.Failable; +import net.sourceforge.plantuml.project.GanttDiagram; +import net.sourceforge.plantuml.project.core.Task; +import net.sourceforge.plantuml.regex.IRegex; +import net.sourceforge.plantuml.regex.RegexLeaf; +import net.sourceforge.plantuml.regex.RegexResult; + +public class ComplementTask implements Something { + + public IRegex toRegex(String suffix) { + return new RegexLeaf("COMPLEMENT" + suffix, "\\[([^\\[\\]]+?)\\]"); + } + + public Failable getMe(GanttDiagram gantt, RegexResult arg, String suffix) { + final String code = arg.get("COMPLEMENT" + suffix, 0); + final Task task = gantt.getExistingTask(code); + if (task == null) + return Failable.error("No such task " + code); + return Failable.ok(task); + } +} diff --git a/src/net/sourceforge/plantuml/project/lang/Sentence.java b/src/net/sourceforge/plantuml/project/lang/Sentence.java index 3110735fd..eaed4f5a5 100644 --- a/src/net/sourceforge/plantuml/project/lang/Sentence.java +++ b/src/net/sourceforge/plantuml/project/lang/Sentence.java @@ -38,9 +38,14 @@ package net.sourceforge.plantuml.project.lang; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.regex.IRegex; +import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; public interface Sentence { + + public final RegexLeaf OPTIONAL_FINAL_DOT = new RegexLeaf("\\s*[.]?\\s*$"); + + public final RegexLeaf SENTENCE_SEPARATOR = new RegexLeaf("\\s*(,|\\sand\\s)\\s*"); public IRegex toRegex(); diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceAnd.java b/src/net/sourceforge/plantuml/project/lang/SentenceAnd.java index c2f9bd82b..3929c6a7a 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceAnd.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceAnd.java @@ -56,37 +56,37 @@ public class SentenceAnd implements Sentence { public IRegex toRegex() { return new RegexConcat(// RegexLeaf.start(), // - sentence1.subjectii.toRegex(), // + sentence1.getSubject().toRegex(), // RegexLeaf.spaceOneOrMore(), // sentence1.getVerbRegex(), // + sentence1.getAdverbialOrPropositon(), // RegexLeaf.spaceOneOrMore(), // - sentence1.complementii.toRegex("1"), // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("and"), // - RegexLeaf.spaceOneOrMore(), // + sentence1.getComplement().toRegex("1"), // + SENTENCE_SEPARATOR, // sentence2.getVerbRegex(), // + sentence2.getAdverbialOrPropositon(), // RegexLeaf.spaceOneOrMore(), // - sentence2.complementii.toRegex("2"), // - RegexLeaf.end()); + sentence2.getComplement().toRegex("2"), // + OPTIONAL_FINAL_DOT); } public final CommandExecutionResult execute(GanttDiagram project, RegexResult arg) { - final Failable subject = sentence1.subjectii.getMe(project, arg); - if (subject.isFail()) { + final Failable subject = sentence1.getSubject().getMe(project, arg); + if (subject.isFail()) return CommandExecutionResult.error(subject.getError()); - } - final Failable complement1 = sentence1.complementii.getMe(project, arg, "1"); - if (complement1.isFail()) { + + final Failable complement1 = sentence1.getComplement().getMe(project, arg, "1"); + if (complement1.isFail()) return CommandExecutionResult.error(complement1.getError()); - } + final CommandExecutionResult result1 = sentence1.execute(project, subject.get(), complement1.get()); - if (result1.isOk() == false) { + if (result1.isOk() == false) return result1; - } - final Failable complement2 = sentence2.complementii.getMe(project, arg, "2"); - if (complement2.isFail()) { + + final Failable complement2 = sentence2.getComplement().getMe(project, arg, "2"); + if (complement2.isFail()) return CommandExecutionResult.error(complement2.getError()); - } + return sentence2.execute(project, subject.get(), complement2.get()); } diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceAndAnd.java b/src/net/sourceforge/plantuml/project/lang/SentenceAndAnd.java index 3385842fc..27a9d4ca7 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceAndAnd.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceAndAnd.java @@ -58,51 +58,50 @@ public class SentenceAndAnd implements Sentence { public IRegex toRegex() { return new RegexConcat(// RegexLeaf.start(), // - sentence1.subjectii.toRegex(), // + sentence1.getSubject().toRegex(), // RegexLeaf.spaceOneOrMore(), // sentence1.getVerbRegex(), // + sentence1.getAdverbialOrPropositon(), // RegexLeaf.spaceOneOrMore(), // - sentence1.complementii.toRegex("1"), // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("and"), // - RegexLeaf.spaceOneOrMore(), // + sentence1.getComplement().toRegex("1"), // + SENTENCE_SEPARATOR, // sentence2.getVerbRegex(), // + sentence2.getAdverbialOrPropositon(), // RegexLeaf.spaceOneOrMore(), // - sentence2.complementii.toRegex("2"), // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("and"), // - RegexLeaf.spaceOneOrMore(), // + sentence2.getComplement().toRegex("2"), // + SENTENCE_SEPARATOR, // sentence3.getVerbRegex(), // + sentence3.getAdverbialOrPropositon(), // RegexLeaf.spaceOneOrMore(), // - sentence3.complementii.toRegex("3"), // - RegexLeaf.end()); + sentence3.getComplement().toRegex("3"), // + OPTIONAL_FINAL_DOT); } public final CommandExecutionResult execute(GanttDiagram project, RegexResult arg) { - final Failable subject = sentence1.subjectii.getMe(project, arg); - if (subject.isFail()) { + final Failable subject = sentence1.getSubject().getMe(project, arg); + if (subject.isFail()) return CommandExecutionResult.error(subject.getError()); - } - final Failable complement1 = sentence1.complementii.getMe(project, arg, "1"); - if (complement1.isFail()) { + + final Failable complement1 = sentence1.getComplement().getMe(project, arg, "1"); + if (complement1.isFail()) return CommandExecutionResult.error(complement1.getError()); - } + final CommandExecutionResult result1 = sentence1.execute(project, subject.get(), complement1.get()); - if (result1.isOk() == false) { + if (result1.isOk() == false) return result1; - } - final Failable complement2 = sentence2.complementii.getMe(project, arg, "2"); - if (complement2.isFail()) { + + final Failable complement2 = sentence2.getComplement().getMe(project, arg, "2"); + if (complement2.isFail()) return CommandExecutionResult.error(complement2.getError()); - } + final CommandExecutionResult result2 = sentence2.execute(project, subject.get(), complement2.get()); - if (result2.isOk() == false) { + if (result2.isOk() == false) return result2; - } - final Failable complement3 = sentence3.complementii.getMe(project, arg, "3"); - if (complement3.isFail()) { + + final Failable complement3 = sentence3.getComplement().getMe(project, arg, "3"); + if (complement3.isFail()) return CommandExecutionResult.error(complement3.getError()); - } + final CommandExecutionResult result3 = sentence3.execute(project, subject.get(), complement3.get()); return result3; diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceHappens.java b/src/net/sourceforge/plantuml/project/lang/SentenceHappens.java index 4c41586f3..f046ef8e2 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceHappens.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceHappens.java @@ -44,7 +44,8 @@ import net.sourceforge.plantuml.project.core.TaskInstant; public class SentenceHappens extends SentenceSimple { public SentenceHappens() { - super(SubjectTask.ME, Verbs.happens, new ComplementBeforeOrAfterOrAtTaskStartOrEnd()); + super(SubjectTask.ME, Verbs.happens, Words.zeroOrMore(Words.THE, Words.ON, Words.AT), + new ComplementBeforeOrAfterOrAtTaskStartOrEnd()); } @Override diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceHappensDate.java b/src/net/sourceforge/plantuml/project/lang/SentenceHappensDate.java index 456935ae1..afb8d886f 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceHappensDate.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceHappensDate.java @@ -44,7 +44,7 @@ import net.sourceforge.plantuml.project.time.Day; public class SentenceHappensDate extends SentenceSimple { public SentenceHappensDate() { - super(SubjectTask.ME, Verbs.happens, ComplementDate.any()); + super(SubjectTask.ME, Verbs.happens, Words.zeroOrMore(Words.THE, Words.ON, Words.AT), ComplementDate.any()); } @Override diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceIsColoredForCompletion.java b/src/net/sourceforge/plantuml/project/lang/SentenceIsColoredForCompletion.java index 8aa022a2b..c07c2bd8a 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceIsColoredForCompletion.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceIsColoredForCompletion.java @@ -42,7 +42,8 @@ import net.sourceforge.plantuml.project.core.Task; public class SentenceIsColoredForCompletion extends SentenceSimple { public SentenceIsColoredForCompletion() { - super(SubjectTask.ME, Verbs.isColoredForCompletion, new ComplementInColorsFromTo()); + super(SubjectTask.ME, Verbs.isColored, Words.exactly(Words.FOR, Words.COMPLETION), + new ComplementInColorsFromTo()); } @Override diff --git a/src/net/sourceforge/plantuml/project/lang/SentencePausesDate.java b/src/net/sourceforge/plantuml/project/lang/SentencePausesDate.java index 97ceea3a1..8cf020b38 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentencePausesDate.java +++ b/src/net/sourceforge/plantuml/project/lang/SentencePausesDate.java @@ -43,7 +43,8 @@ import net.sourceforge.plantuml.project.time.Day; public class SentencePausesDate extends SentenceSimple { public SentencePausesDate() { - super(SubjectTask.ME, Verbs.pauses, ComplementDate.any()); + super(SubjectTask.ME, Verbs.pauses, Words.zeroOrMore(Words.THE, Words.ON, Words.AT, Words.FROM), + ComplementDate.any()); } @Override diff --git a/src/net/sourceforge/plantuml/project/lang/SentencePausesDates.java b/src/net/sourceforge/plantuml/project/lang/SentencePausesDates.java index 9fdf7dc5e..46d074559 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentencePausesDates.java +++ b/src/net/sourceforge/plantuml/project/lang/SentencePausesDates.java @@ -44,20 +44,17 @@ import net.sourceforge.plantuml.project.time.Day; public class SentencePausesDates extends SentenceSimple { public SentencePausesDates() { - super(SubjectTask.ME, Verbs.pauses, new ComplementDates()); + super(SubjectTask.ME, Verbs.pauses, Words.zeroOrMore(Words.THE, Words.ON, Words.AT, Words.FROM), + new ComplementDates()); } @Override public CommandExecutionResult execute(GanttDiagram project, Object subject, Object complement) { final Task task = (Task) subject; final DaysAsDates pauses = (DaysAsDates) complement; -// final Day startingDate = project.getStartingDate(); -// if (startingDate == null) { -// return CommandExecutionResult.error("No starting date for the project"); -// } - for (Day day : pauses) { + for (Day day : pauses) task.addPause(day); - } + return CommandExecutionResult.ok(); } diff --git a/src/net/sourceforge/plantuml/project/lang/SentencePausesDayOfWeek.java b/src/net/sourceforge/plantuml/project/lang/SentencePausesDayOfWeek.java index 05526f414..8edc3d2b5 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentencePausesDayOfWeek.java +++ b/src/net/sourceforge/plantuml/project/lang/SentencePausesDayOfWeek.java @@ -43,7 +43,8 @@ import net.sourceforge.plantuml.project.time.DayOfWeek; public class SentencePausesDayOfWeek extends SentenceSimple { public SentencePausesDayOfWeek() { - super(SubjectTask.ME, Verbs.pauses, new ComplementDayOfWeek()); + super(SubjectTask.ME, Verbs.pauses, Words.zeroOrMore(Words.THE, Words.ON, Words.AT, Words.FROM), + new ComplementDayOfWeek()); } @Override diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceSimple.java b/src/net/sourceforge/plantuml/project/lang/SentenceSimple.java index 745dc4b39..d36769296 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceSimple.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceSimple.java @@ -45,49 +45,57 @@ import net.sourceforge.plantuml.regex.RegexResult; public abstract class SentenceSimple implements Sentence { - protected final Subject subjectii; + private final Subject subject; private final IRegex verb; - protected final Something complementii; + private final IRegex adverbialOrPropositon; + private final Something complement; public SentenceSimple(Subject subject, IRegex verb, Something complement) { - this.subjectii = subject; + this(subject, verb, new RegexLeaf(""), complement); + } + + public SentenceSimple(Subject subject, IRegex verb, IRegex adverbialOrPropositon, Something complement) { + this.subject = subject; this.verb = verb; - this.complementii = complement; + this.adverbialOrPropositon = adverbialOrPropositon; + this.complement = complement; } public String getSignature() { - return subjectii.getClass() + "/" + verb.getPattern() + "/" + complementii.getClass(); + return subject.getClass() + "/" + verb.getPattern() + "/" + complement.getClass(); } public final IRegex toRegex() { - if (complementii instanceof ComplementEmpty) + if (complement instanceof ComplementEmpty) return new RegexConcat(// RegexLeaf.start(), // - subjectii.toRegex(), // + subject.toRegex(), // RegexLeaf.spaceOneOrMore(), // verb, // - RegexLeaf.end()); + adverbialOrPropositon, // + OPTIONAL_FINAL_DOT); return new RegexConcat(// RegexLeaf.start(), // - subjectii.toRegex(), // + subject.toRegex(), // RegexLeaf.spaceOneOrMore(), // verb, // + adverbialOrPropositon, // RegexLeaf.spaceOneOrMore(), // - complementii.toRegex("0"), // - RegexLeaf.end()); + complement.toRegex("0"), // + OPTIONAL_FINAL_DOT); } public final CommandExecutionResult execute(GanttDiagram project, RegexResult arg) { - final Failable subject = subjectii.getMe(project, arg); - if (subject.isFail()) - return CommandExecutionResult.error(subject.getError()); + final Failable currentSubject = subject.getMe(project, arg); + if (currentSubject.isFail()) + return CommandExecutionResult.error(currentSubject.getError()); - final Failable complement = complementii.getMe(project, arg, "0"); - if (complement.isFail()) - return CommandExecutionResult.error(complement.getError()); + final Failable currentComplement = complement.getMe(project, arg, "0"); + if (currentComplement.isFail()) + return CommandExecutionResult.error(currentComplement.getError()); - return execute(project, subject.get(), complement.get()); + return execute(project, currentSubject.get(), currentComplement.get()); } @@ -97,4 +105,18 @@ public abstract class SentenceSimple implements Sentence { return verb; } + protected final IRegex getAdverbialOrPropositon() { + return adverbialOrPropositon; + } + + protected final Subject getSubject() { + return subject; + } + + protected final Something getComplement() { + return complement; + } + + + } diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceTaskEndsAbsolute.java b/src/net/sourceforge/plantuml/project/lang/SentenceTaskEndsAbsolute.java index a01539449..ea10010e9 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceTaskEndsAbsolute.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceTaskEndsAbsolute.java @@ -43,9 +43,10 @@ import net.sourceforge.plantuml.project.time.Day; public class SentenceTaskEndsAbsolute extends SentenceSimple { public SentenceTaskEndsAbsolute() { - super(SubjectTask.ME, Verbs.ends2, ComplementDate.any()); + super(SubjectTask.ME, Verbs.ends, Words.zeroOrMore(Words.THE, Words.ON, Words.AT), ComplementDate.any()); } + @Override public CommandExecutionResult execute(GanttDiagram project, Object subject, Object complement) { final Task task = (Task) subject; diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceTaskEndsOnlyRelative.java b/src/net/sourceforge/plantuml/project/lang/SentenceTaskEndsOnlyRelative.java index 95ed3fe3b..25524553f 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceTaskEndsOnlyRelative.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceTaskEndsOnlyRelative.java @@ -43,7 +43,8 @@ import net.sourceforge.plantuml.project.time.Day; public class SentenceTaskEndsOnlyRelative extends SentenceSimple { public SentenceTaskEndsOnlyRelative() { - super(SubjectTask.ME, Verbs.ends2, ComplementDate.onlyRelative()); + super(SubjectTask.ME, Verbs.ends, Words.zeroOrMore(Words.THE, Words.ON, Words.AT), + ComplementDate.onlyRelative()); } @Override diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceTaskStarts.java b/src/net/sourceforge/plantuml/project/lang/SentenceTaskStarts.java index 8737f4020..6ce0543d3 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceTaskStarts.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceTaskStarts.java @@ -46,7 +46,7 @@ import net.sourceforge.plantuml.project.core.TaskInstant; public class SentenceTaskStarts extends SentenceSimple { public SentenceTaskStarts() { - super(SubjectTask.ME, Verbs.starts2, new ComplementBeforeOrAfterOrAtTaskStartOrEnd()); + super(SubjectTask.ME, Verbs.starts, new ComplementBeforeOrAfterOrAtTaskStartOrEnd()); } @Override diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsAbsolute.java b/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsAbsolute.java index 492259ec7..3eb5b6616 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsAbsolute.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsAbsolute.java @@ -43,7 +43,7 @@ import net.sourceforge.plantuml.project.time.Day; public class SentenceTaskStartsAbsolute extends SentenceSimple { public SentenceTaskStartsAbsolute() { - super(SubjectTask.ME, Verbs.starts3, ComplementDate.any()); + super(SubjectTask.ME, Verbs.starts, Words.zeroOrMore(Words.THE, Words.ON, Words.AT), ComplementDate.any()); } @Override diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsOnlyRelative.java b/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsOnlyRelative.java index bf9d07fae..80b4ded71 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsOnlyRelative.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsOnlyRelative.java @@ -43,7 +43,8 @@ import net.sourceforge.plantuml.project.time.Day; public class SentenceTaskStartsOnlyRelative extends SentenceSimple { public SentenceTaskStartsOnlyRelative() { - super(SubjectTask.ME, Verbs.starts3, ComplementDate.onlyRelative()); + super(SubjectTask.ME, Verbs.starts, Words.zeroOrMore(Words.THE, Words.ON, Words.AT), + ComplementDate.onlyRelative()); } @Override diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsWithColor.java b/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsWithColor.java index 9029d0a8a..2e3acc159 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsWithColor.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsWithColor.java @@ -46,7 +46,7 @@ import net.sourceforge.plantuml.project.core.TaskInstant; public class SentenceTaskStartsWithColor extends SentenceSimple { public SentenceTaskStartsWithColor() { - super(SubjectTask.ME, Verbs.starts2, + super(SubjectTask.ME, Verbs.starts, new PairOfSomething(new ComplementBeforeOrAfterOrAtTaskStartOrEnd(), new ComplementWithColorLink())); } diff --git a/src/net/sourceforge/plantuml/project/lang/SubjectProject.java b/src/net/sourceforge/plantuml/project/lang/SubjectProject.java index 50a42619f..4f72a2748 100644 --- a/src/net/sourceforge/plantuml/project/lang/SubjectProject.java +++ b/src/net/sourceforge/plantuml/project/lang/SubjectProject.java @@ -68,7 +68,8 @@ public class SubjectProject implements Subject { class Starts extends SentenceSimple { public Starts() { - super(SubjectProject.this, Verbs.starts, ComplementDate.onlyAbsolute()); + super(SubjectProject.this, Verbs.starts, Words.zeroOrMore(Words.ON, Words.FOR, Words.THE, Words.AT), + ComplementDate.onlyAbsolute()); } @Override diff --git a/src/net/sourceforge/plantuml/project/lang/SubjectResource.java b/src/net/sourceforge/plantuml/project/lang/SubjectResource.java index 89e14f57b..d9d311e2d 100644 --- a/src/net/sourceforge/plantuml/project/lang/SubjectResource.java +++ b/src/net/sourceforge/plantuml/project/lang/SubjectResource.java @@ -43,11 +43,12 @@ import net.sourceforge.plantuml.project.DaysAsDates; import net.sourceforge.plantuml.project.Failable; import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.project.core.Resource; +import net.sourceforge.plantuml.project.core.Task; import net.sourceforge.plantuml.project.time.Day; import net.sourceforge.plantuml.project.time.DayOfWeek; import net.sourceforge.plantuml.regex.IRegex; -import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; +import net.sourceforge.plantuml.regex.RegexOr; import net.sourceforge.plantuml.regex.RegexResult; public class SubjectResource implements Subject { @@ -57,30 +58,56 @@ public class SubjectResource implements Subject { private SubjectResource() { } - public Failable getMe(GanttDiagram project, RegexResult arg) { - final String s = arg.get("RESOURCE", 0); - return Failable.ok(project.getResource(s)); + public Failable getMe(GanttDiagram gantt, RegexResult arg) { + if (arg.get("THEY", 0) != null) { + final Resource they = gantt.getThey(); + if (they == null) + return Failable.error("Not sure who are you refering to?"); + return Failable.ok(they); + } + final String resource = arg.get("RESOURCE", 0); + final Resource result = gantt.getResource(resource); + gantt.setThey(result); + return Failable.ok(result); } public Collection getSentences() { return Arrays.asList(new IsOffDate(), new IsOffDates(), new IsOffDayOfWeek(), new IsOnDate(), new IsOnDates(), - new IsOffBeforeDate(), new IsOffAfterDate()); + new IsOffBeforeDate(), new IsOffAfterDate(), new WorksOn()); } public IRegex toRegex() { - return new RegexConcat( // + return new RegexOr( // + new RegexLeaf("THEY", "(she|he|they)"), // new RegexLeaf("RESOURCE", "\\{([^{}]+)\\}") // ); } + public class WorksOn extends SentenceSimple { + + public WorksOn() { + super(SubjectResource.this, Verbs.worksOn, new ComplementTask()); + } + + @Override + public CommandExecutionResult execute(GanttDiagram gantt, Object subject, Object complement) { + final Resource resource = (Resource) subject; + final Task task = (Task) complement; + task.addResource(resource, 100); + return CommandExecutionResult.ok(); + } + + } + public class IsOffBeforeDate extends SentenceSimple { public IsOffBeforeDate() { - super(SubjectResource.this, Verbs.isOffBefore, ComplementDate.any()); + super(SubjectResource.this, Verbs.isOff, + Words.concat(Words.exactly(Words.BEFORE), Words.zeroOrMore(Words.THE)), ComplementDate.any()); } @Override - public CommandExecutionResult execute(GanttDiagram project, Object subject, Object complement) { + public CommandExecutionResult execute(GanttDiagram gantt, Object subject, Object complement) { final Resource resource = (Resource) subject; final Day when = (Day) complement; resource.setOffBeforeDate(when); @@ -92,11 +119,12 @@ public class SubjectResource implements Subject { public class IsOffAfterDate extends SentenceSimple { public IsOffAfterDate() { - super(SubjectResource.this, Verbs.isOffAfter, ComplementDate.any()); + super(SubjectResource.this, Verbs.isOff, + Words.concat(Words.exactly(Words.AFTER), Words.zeroOrMore(Words.THE)), ComplementDate.any()); } @Override - public CommandExecutionResult execute(GanttDiagram project, Object subject, Object complement) { + public CommandExecutionResult execute(GanttDiagram gantt, Object subject, Object complement) { final Resource resource = (Resource) subject; final Day when = (Day) complement; resource.setOffAfterDate(when); @@ -108,11 +136,12 @@ public class SubjectResource implements Subject { public class IsOffDate extends SentenceSimple { public IsOffDate() { - super(SubjectResource.this, Verbs.isOff, ComplementDate.any()); + super(SubjectResource.this, Verbs.isOff, + Words.zeroOrMore(Words.FROM, Words.ON, Words.FOR, Words.THE, Words.AT), ComplementDate.any()); } @Override - public CommandExecutionResult execute(GanttDiagram project, Object subject, Object complement) { + public CommandExecutionResult execute(GanttDiagram gantt, Object subject, Object complement) { final Resource resource = (Resource) subject; final Day when = (Day) complement; resource.addCloseDay(when); @@ -124,11 +153,12 @@ public class SubjectResource implements Subject { public class IsOffDates extends SentenceSimple { public IsOffDates() { - super(SubjectResource.this, Verbs.isOff, new ComplementDates()); + super(SubjectResource.this, Verbs.isOff, + Words.zeroOrMore(Words.FROM, Words.ON, Words.FOR, Words.THE, Words.AT), new ComplementDates()); } @Override - public CommandExecutionResult execute(GanttDiagram project, Object subject, Object complement) { + public CommandExecutionResult execute(GanttDiagram gantt, Object subject, Object complement) { final Resource resource = (Resource) subject; for (Day when : (DaysAsDates) complement) { resource.addCloseDay(when); @@ -141,11 +171,12 @@ public class SubjectResource implements Subject { public class IsOffDayOfWeek extends SentenceSimple { public IsOffDayOfWeek() { - super(SubjectResource.this, Verbs.isOff, new ComplementDayOfWeek()); + super(SubjectResource.this, Verbs.isOff, + Words.zeroOrMore(Words.FROM, Words.ON, Words.FOR, Words.THE, Words.AT), new ComplementDayOfWeek()); } @Override - public CommandExecutionResult execute(GanttDiagram project, Object subject, Object complement) { + public CommandExecutionResult execute(GanttDiagram gantt, Object subject, Object complement) { final Resource resource = (Resource) subject; resource.addCloseDay(((DayOfWeek) complement)); return CommandExecutionResult.ok(); @@ -156,11 +187,12 @@ public class SubjectResource implements Subject { public class IsOnDate extends SentenceSimple { public IsOnDate() { - super(SubjectResource.this, Verbs.isOn, ComplementDate.any()); + super(SubjectResource.this, Verbs.isOn, + Words.zeroOrMore(Words.FROM, Words.ON, Words.FOR, Words.THE, Words.AT), ComplementDate.any()); } @Override - public CommandExecutionResult execute(GanttDiagram project, Object subject, Object complement) { + public CommandExecutionResult execute(GanttDiagram gantt, Object subject, Object complement) { final Resource resource = (Resource) subject; final Day when = (Day) complement; resource.addForceOnDay(when); @@ -172,11 +204,12 @@ public class SubjectResource implements Subject { public class IsOnDates extends SentenceSimple { public IsOnDates() { - super(SubjectResource.this, Verbs.isOn, new ComplementDates()); + super(SubjectResource.this, Verbs.isOn, + Words.zeroOrMore(Words.FROM, Words.ON, Words.FOR, Words.THE, Words.AT), new ComplementDates()); } @Override - public CommandExecutionResult execute(GanttDiagram project, Object subject, Object complement) { + public CommandExecutionResult execute(GanttDiagram gantt, Object subject, Object complement) { final Resource resource = (Resource) subject; for (Day when : (DaysAsDates) complement) { resource.addForceOnDay(when); diff --git a/src/net/sourceforge/plantuml/project/lang/SubjectSeparator.java b/src/net/sourceforge/plantuml/project/lang/SubjectSeparator.java index 261e640d4..4ed3a05e8 100644 --- a/src/net/sourceforge/plantuml/project/lang/SubjectSeparator.java +++ b/src/net/sourceforge/plantuml/project/lang/SubjectSeparator.java @@ -69,7 +69,7 @@ public class SubjectSeparator implements Subject { class JustBefore extends SentenceSimple { public JustBefore() { - super(SubjectSeparator.this, Verbs.justBefore, ComplementDate.any()); + super(SubjectSeparator.this, Verbs.just, Words.exactly(Words.BEFORE), ComplementDate.any()); } @Override @@ -85,7 +85,7 @@ public class SubjectSeparator implements Subject { class JustAfter extends SentenceSimple { public JustAfter() { - super(SubjectSeparator.this, Verbs.justAfter, ComplementDate.any()); + super(SubjectSeparator.this, Verbs.just, Words.exactly(Words.AFTER), ComplementDate.any()); } @Override diff --git a/src/net/sourceforge/plantuml/project/lang/SubjectTask.java b/src/net/sourceforge/plantuml/project/lang/SubjectTask.java index c04d64b16..279f4ecf8 100644 --- a/src/net/sourceforge/plantuml/project/lang/SubjectTask.java +++ b/src/net/sourceforge/plantuml/project/lang/SubjectTask.java @@ -46,6 +46,7 @@ import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexOptional; +import net.sourceforge.plantuml.regex.RegexOr; import net.sourceforge.plantuml.regex.RegexResult; public class SubjectTask implements Subject { @@ -55,23 +56,32 @@ public class SubjectTask implements Subject { private SubjectTask() { } - public Failable getMe(GanttDiagram project, RegexResult arg) { - final String s = arg.get("SUBJECT", 0); - final String shortName = arg.get("SUBJECT", 1); - final String then = arg.get("THEN", 0); - final String resource = arg.get("RESOURCE", 0); - final Task result = project.getOrCreateTask(s, shortName, then != null); - if (result == null) { - throw new IllegalStateException(); + public Failable getMe(GanttDiagram gantt, RegexResult arg) { + final Task result; + if (arg.get("IT", 0) != null) { + result = gantt.getIt(); + if (result == null) + return Failable.error("Not sure what are you refering to?"); + } else { + final String subject = arg.get("SUBJECT", 0); + final String shortName = arg.get("SUBJECT", 1); + final String then = arg.get("THEN", 0); + result = gantt.getOrCreateTask(subject, shortName, then != null); + gantt.setIt(result); } + + if (result == null) + throw new IllegalStateException(); + + final String resource = arg.get("RESOURCE", 0); if (resource != null) { for (final StringTokenizer st = new StringTokenizer(resource, "{}"); st.hasMoreTokens();) { final String part = st.nextToken().trim(); if (part.length() > 0) { - final boolean ok = project.affectResource(result, part); - if (ok == false) { + final boolean ok = gantt.affectResource(result, part); + if (ok == false) return Failable.error("Bad argument for resource"); - } + } } @@ -90,17 +100,17 @@ public class SubjectTask implements Subject { } public IRegex toRegex() { - return new RegexConcat( // - new RegexLeaf("THEN", "(then[%s]+)?"), // - new RegexLeaf("SUBJECT", "\\[([^\\[\\]]+?)\\](?:[%s]+as[%s]+\\[([^\\[\\]]+?)\\])?"), // - new RegexOptional( // - new RegexConcat( // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("on"), // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("RESOURCE", "((?:\\{[^{}]+\\}[%s]*)+)") // - )) // - ); + return new RegexOr( // + new RegexLeaf("IT", "(it)"), // + new RegexConcat(new RegexLeaf("THEN", "(then[%s]+)?"), // + new RegexLeaf("SUBJECT", "\\[([^\\[\\]]+?)\\](?:[%s]+as[%s]+\\[([^\\[\\]]+?)\\])?"), // + new RegexOptional( // + new RegexConcat( // + RegexLeaf.spaceOneOrMore(), // + new RegexLeaf("on"), // + RegexLeaf.spaceOneOrMore(), // + new RegexLeaf("RESOURCE", "((?:\\{[^{}]+\\}[%s]*)+)") // + )))); } } diff --git a/src/net/sourceforge/plantuml/project/lang/Verbs.java b/src/net/sourceforge/plantuml/project/lang/Verbs.java index b534124ad..5b7ed01e5 100644 --- a/src/net/sourceforge/plantuml/project/lang/Verbs.java +++ b/src/net/sourceforge/plantuml/project/lang/Verbs.java @@ -36,103 +36,28 @@ package net.sourceforge.plantuml.project.lang; import net.sourceforge.plantuml.regex.IRegex; -import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; -import net.sourceforge.plantuml.regex.RegexOptional; -import net.sourceforge.plantuml.regex.RegexOr; public class Verbs { public static IRegex are = new RegexLeaf("are"); - public static IRegex areColored = new RegexLeaf("are[%s]+colou?red"); - public static IRegex displayOnSameRowAs = new RegexLeaf("displays?[%s]+on[%s]+same[%s]+row[%s]+as"); - public static IRegex ends = new RegexLeaf("ends"); - - public static IRegex ends2 = new RegexLeaf("ends[%s]*(the[%s]*|on[%s]*|at[%s]*)*"); - - public static IRegex happens = new RegexLeaf("happens?[%s]*(at[%s]*|the[%s]*|on[%s]*)*"); - - public static IRegex pauses = new RegexLeaf("pauses?[%s]*(at[%s]*|the[%s]*|on[%s]*|from[%s]*)*"); - - public static IRegex isDeleted = new RegexLeaf("is[%s]+deleted"); - + public static IRegex happens = new RegexLeaf("happens"); public static IRegex is = new RegexLeaf("is"); - public static IRegex isColored = new RegexLeaf("is[%s]+colou?red"); - - public static IRegex isColoredForCompletion = new RegexLeaf("is[%s]+colou?red[%s]+for[%s]+completion"); - - public static IRegex isOff = new RegexConcat(new RegexLeaf("is"), // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("off"), // - RegexLeaf.spaceOneOrMore(), // - new RegexOr(// - new RegexLeaf("from"), // - new RegexLeaf("on"), // - new RegexLeaf("for"), // - new RegexLeaf("the"), // - new RegexLeaf("at") // - )); - - public static IRegex isOffBefore = new RegexConcat(new RegexLeaf("is"), // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("off"), // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("before") // - ); - - public static IRegex isOffAfter = new RegexConcat(new RegexLeaf("is"), // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("off"), // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("after") // - ); - - public static IRegex isOn = new RegexConcat(new RegexLeaf("is"), // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("on"), // - RegexLeaf.spaceOneOrMore(), // - new RegexOr(// - new RegexLeaf("from"), // - new RegexLeaf("on"), // - new RegexLeaf("for"), // - new RegexLeaf("the"), // - new RegexLeaf("at") // - ) // - ); - + public static IRegex isDeleted = new RegexLeaf("is[%s]+deleted"); + public static IRegex isOff = new RegexLeaf("is[%s]+off"); + public static IRegex isOn = new RegexLeaf("is[%s]+on"); public static IRegex isOrAre = new RegexLeaf("(is|are)"); - public static IRegex isOrAreNamed = new RegexLeaf("(is|are)[%s]+named"); - - public static IRegex requires = new RegexLeaf("(lasts|requires?)"); - - public static IRegex linksTo = new RegexLeaf("links to"); - - public static IRegex occurs = new RegexLeaf("occurs?"); - - public static IRegex starts3 = new RegexLeaf("starts[%s]*(the[%s]*|on[%s]*|at[%s]*)*"); - - public static IRegex starts2 = new RegexLeaf("starts"); - - public static IRegex starts = new RegexConcat(new RegexLeaf("start"), // - new RegexOptional(new RegexLeaf("s")), // - RegexLeaf.spaceZeroOrMore(), // - new RegexOptional(new RegexOr(// - new RegexLeaf("on"), // - new RegexLeaf("for"), // - new RegexLeaf("the"), // - new RegexLeaf("at") // - )) // - ); - public static IRegex just = new RegexLeaf("just"); - - public static IRegex justBefore = new RegexLeaf("just[%s]*before"); - - public static IRegex justAfter = new RegexLeaf("just[%s]*after"); + public static IRegex linksTo = new RegexLeaf("links[%s]+to"); + public static IRegex occurs = new RegexLeaf("occurs"); + public static IRegex pauses = new RegexLeaf("pauses"); + public static IRegex requires = new RegexLeaf("(lasts|requires)"); + public static IRegex starts = new RegexLeaf("starts"); + public static IRegex worksOn = new RegexLeaf("works[%s]+on"); } diff --git a/src/net/sourceforge/plantuml/project/lang/Words.java b/src/net/sourceforge/plantuml/project/lang/Words.java new file mode 100644 index 000000000..9d30ddd85 --- /dev/null +++ b/src/net/sourceforge/plantuml/project/lang/Words.java @@ -0,0 +1,77 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.project.lang; + +import net.sourceforge.plantuml.regex.IRegex; +import net.sourceforge.plantuml.regex.RegexConcat; +import net.sourceforge.plantuml.regex.RegexLeaf; +import net.sourceforge.plantuml.regex.RegexOr; +import net.sourceforge.plantuml.regex.RegexRepeatedZeroOrMore; + +public class Words { + + public final static String AFTER = "after"; + public final static String AT = "at"; + public final static String BEFORE = "before"; + public final static String COMPLETION = "completion"; + public final static String FOR = "for"; + public final static String FROM = "from"; + public final static String ON = "on"; + public final static String THE = "the"; + public final static String TO = "to"; + + public static IRegex zeroOrMore(String... words) { + final IRegex tmp[] = new IRegex[words.length]; + for (int i = 0; i < words.length; i++) + tmp[i] = new RegexLeaf(words[i]); + + final RegexOr or = new RegexOr(tmp); + return new RegexRepeatedZeroOrMore(new RegexConcat(RegexLeaf.spaceOneOrMore(), or)); + } + + public static IRegex exactly(String... words) { + final IRegex tmp[] = new IRegex[words.length]; + for (int i = 0; i < words.length; i++) + tmp[i] = new RegexConcat(RegexLeaf.spaceOneOrMore(), new RegexLeaf(words[i])); + + return new RegexConcat(tmp); + } + + public static IRegex concat(IRegex... expressions) { + return new RegexConcat(expressions); + } + +} diff --git a/src/net/sourceforge/plantuml/regex/RegexRepeatedZeroOrMore.java b/src/net/sourceforge/plantuml/regex/RegexRepeatedZeroOrMore.java new file mode 100644 index 000000000..ab0febc5e --- /dev/null +++ b/src/net/sourceforge/plantuml/regex/RegexRepeatedZeroOrMore.java @@ -0,0 +1,58 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.regex; + +import net.sourceforge.plantuml.text.StringLocated; + +public class RegexRepeatedZeroOrMore extends RegexComposed implements IRegex { + + public RegexRepeatedZeroOrMore(IRegex partial) { + super(partial); + } + + @Override + protected String getFullSlow() { + final StringBuilder sb = new StringBuilder("(?:"); + sb.append(partials().get(0).getPattern()); + sb.append(")*"); + return sb.toString(); + } + + public boolean match(StringLocated full) { + throw new UnsupportedOperationException(); + } + +} From e991c4699be76588535ef1f4ba2bd2d0908ae80f Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Mon, 27 Nov 2023 18:41:15 +0100 Subject: [PATCH 19/95] feat: several gantt improvement --- skin/plantuml.skin | 7 + .../plantuml/project/GanttDiagram.java | 51 ++++--- .../{lang/Adverbial.java => GanttStyle.java} | 11 +- .../project/TimeHeaderParameters.java | 40 ++++-- .../plantuml/project/core/AbstractTask.java | 15 ++ .../plantuml/project/core/Task.java | 4 + .../project/draw/TaskDrawDiamond.java | 28 ++-- .../plantuml/project/draw/TimeHeader.java | 39 +++-- .../project/draw/TimeHeaderCalendar.java | 2 +- .../project/draw/TimeHeaderDaily.java | 106 +++++++++----- .../project/draw/TimeHeaderMonthly.java | 68 +++++---- .../project/draw/TimeHeaderQuarterly.java | 66 +++++---- .../project/draw/TimeHeaderSimple.java | 46 +++--- .../project/draw/TimeHeaderWeekly.java | 65 +++++---- .../project/draw/TimeHeaderYearly.java | 46 +++--- .../project/lang/ComplementAnything.java | 54 +++++++ .../plantuml/project/lang/ComplementDate.java | 65 +-------- .../project/lang/ComplementDates.java | 39 ++--- .../plantuml/project/lang/DayPattern.java | 136 ++++++++++++++++++ .../project/lang/SentenceIsDisplayedAs.java | 56 ++++++++ .../project/lang/SubjectDayAsDate.java | 7 +- .../project/lang/SubjectDaysAsDates.java | 27 +--- .../plantuml/project/lang/SubjectTask.java | 5 +- .../plantuml/project/lang/TimeResolution.java | 72 ++++++++++ .../plantuml/project/lang/Verbs.java | 1 + .../plantuml/project/lang/Words.java | 1 + .../timescale/TimeScaleCompressed.java | 4 +- .../project/timescale/TimeScaleDaily.java | 6 +- .../project/timescale/TimeScaleWink.java | 10 +- src/net/sourceforge/plantuml/style/SName.java | 3 + 30 files changed, 731 insertions(+), 349 deletions(-) rename src/net/sourceforge/plantuml/project/{lang/Adverbial.java => GanttStyle.java} (83%) create mode 100644 src/net/sourceforge/plantuml/project/lang/ComplementAnything.java create mode 100644 src/net/sourceforge/plantuml/project/lang/DayPattern.java create mode 100644 src/net/sourceforge/plantuml/project/lang/SentenceIsDisplayedAs.java create mode 100644 src/net/sourceforge/plantuml/project/lang/TimeResolution.java diff --git a/skin/plantuml.skin b/skin/plantuml.skin index ecba3aa67..e71b91a42 100644 --- a/skin/plantuml.skin +++ b/skin/plantuml.skin @@ -375,6 +375,13 @@ ganttDiagram { timeline { BackgroundColor transparent LineColor #C0C0C0 + FontSize 10 + month { + FontSize 12 + } + year { + FontSize 14 + } } closed { BackGroundColor #F1E5E5 diff --git a/src/net/sourceforge/plantuml/project/GanttDiagram.java b/src/net/sourceforge/plantuml/project/GanttDiagram.java index 10a540edc..6314bdc33 100644 --- a/src/net/sourceforge/plantuml/project/GanttDiagram.java +++ b/src/net/sourceforge/plantuml/project/GanttDiagram.java @@ -117,7 +117,7 @@ import net.sourceforge.plantuml.style.StyleSignatureBasic; import net.sourceforge.plantuml.svek.GraphvizCrash; import net.sourceforge.plantuml.text.BackSlash; -public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprite { +public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprite, GanttStyle { private final Map draws = new LinkedHashMap(); private final Map tasks = new LinkedHashMap(); @@ -233,8 +233,9 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit this.min = printStart; this.max = printEnd; } - final TimeHeader timeHeader = getTimeHeader(); - initTaskAndResourceDraws(timeHeader.getTimeScale(), timeHeader.getFullHeaderHeight(), stringBounder); + final TimeHeader timeHeader = getTimeHeader(stringBounder); + initTaskAndResourceDraws(timeHeader.getTimeScale(), timeHeader.getFullHeaderHeight(stringBounder), + stringBounder); return new AbstractTextBlock() { public void drawU(UGraphic ug) { @@ -250,12 +251,12 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit final HColor back = timelineStyle.value(PName.BackGroundColor).asColor(getIHtmlColorSet()); if (back.isTransparent() == false) { final URectangle rect1 = URectangle.build(calculateDimension(ug.getStringBounder()).getWidth(), - timeHeader.getTimeHeaderHeight()); + timeHeader.getTimeHeaderHeight(ug.getStringBounder())); ug.apply(back.bg()).draw(rect1); if (showFootbox) { final URectangle rect2 = URectangle.build( calculateDimension(ug.getStringBounder()).getWidth(), - timeHeader.getTimeFooterHeight()); + timeHeader.getTimeFooterHeight(ug.getStringBounder())); ug.apply(back.bg()).apply(UTranslate.dy(totalHeightWithoutFooter)).draw(rect2); } } @@ -297,7 +298,7 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit public XDimension2D calculateDimension(StringBounder stringBounder) { return new XDimension2D(getTitlesColumnWidth(stringBounder) + getBarsColumnWidth(timeHeader), - getTotalHeight(timeHeader)); + getTotalHeight(stringBounder, timeHeader)); } private double getBarsColumnWidth(final TimeHeader timeHeader) { @@ -309,28 +310,27 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit }; } - private TimeHeader getTimeHeader() { + private TimeHeader getTimeHeader(StringBounder stringBounder) { if (openClose.getStartingDay() == null) - return new TimeHeaderSimple(thParam(), printScale); + return new TimeHeaderSimple(stringBounder, thParam(), printScale); else if (printScale == PrintScale.DAILY) - return new TimeHeaderDaily(thParam(), nameDays, printStart, printEnd); + return new TimeHeaderDaily(stringBounder, thParam(), nameDays, printStart, printEnd); else if (printScale == PrintScale.WEEKLY) - return new TimeHeaderWeekly(thParam(), weekNumberStrategy, withCalendarDate); + return new TimeHeaderWeekly(stringBounder, thParam(), weekNumberStrategy, withCalendarDate); else if (printScale == PrintScale.MONTHLY) - return new TimeHeaderMonthly(thParam()); + return new TimeHeaderMonthly(stringBounder, thParam()); else if (printScale == PrintScale.QUARTERLY) - return new TimeHeaderQuarterly(thParam()); + return new TimeHeaderQuarterly(stringBounder, thParam()); else if (printScale == PrintScale.YEARLY) - return new TimeHeaderYearly(thParam()); + return new TimeHeaderYearly(stringBounder, thParam()); else throw new IllegalStateException(); } private TimeHeaderParameters thParam() { - return new TimeHeaderParameters(colorDays(), getFactorScale(), min, max, getIHtmlColorSet(), getTimelineStyle(), - getClosedStyle(), locale, openClose, colorDaysOfWeek, verticalSeparatorBefore, - getVerticalSeparatorStyle()); + return new TimeHeaderParameters(colorDays(), getFactorScale(), min, max, getIHtmlColorSet(), locale, openClose, + colorDaysOfWeek, verticalSeparatorBefore, this); } private Map colorDays() { @@ -338,24 +338,21 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit return Collections.unmodifiableMap(colorDaysInternal); } - private Style getClosedStyle() { - return StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, SName.closed) + @Override + public final Style getStyle(SName param) { + return StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, param) .getMergedStyle(getCurrentStyleBuilder()); } - private Style getTimelineStyle() { - return StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, SName.timeline) + @Override + public final Style getStyle(SName param1, SName param2) { + return StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, param1, param2) .getMergedStyle(getCurrentStyleBuilder()); } - private Style getVerticalSeparatorStyle() { - return StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, SName.verticalSeparator) - .getMergedStyle(getCurrentStyleBuilder()); - } - - private double getTotalHeight(TimeHeader timeHeader) { + private double getTotalHeight(StringBounder stringBounder, TimeHeader timeHeader) { if (showFootbox) - return totalHeightWithoutFooter + timeHeader.getTimeFooterHeight(); + return totalHeightWithoutFooter + timeHeader.getTimeFooterHeight(stringBounder); return totalHeightWithoutFooter; } diff --git a/src/net/sourceforge/plantuml/project/lang/Adverbial.java b/src/net/sourceforge/plantuml/project/GanttStyle.java similarity index 83% rename from src/net/sourceforge/plantuml/project/lang/Adverbial.java rename to src/net/sourceforge/plantuml/project/GanttStyle.java index 2c8ad3a02..44e15537d 100644 --- a/src/net/sourceforge/plantuml/project/lang/Adverbial.java +++ b/src/net/sourceforge/plantuml/project/GanttStyle.java @@ -33,12 +33,15 @@ * * */ -package net.sourceforge.plantuml.project.lang; +package net.sourceforge.plantuml.project; -import net.sourceforge.plantuml.regex.IRegex; +import net.sourceforge.plantuml.style.SName; +import net.sourceforge.plantuml.style.Style; -public interface Adverbial { +public interface GanttStyle { - public IRegex toRegex(); + public Style getStyle(SName param); + + public Style getStyle(SName param1, SName param2); } diff --git a/src/net/sourceforge/plantuml/project/TimeHeaderParameters.java b/src/net/sourceforge/plantuml/project/TimeHeaderParameters.java index d19da40ce..14cab9795 100644 --- a/src/net/sourceforge/plantuml/project/TimeHeaderParameters.java +++ b/src/net/sourceforge/plantuml/project/TimeHeaderParameters.java @@ -43,41 +43,39 @@ import net.sourceforge.plantuml.klimt.UStroke; import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.HColorSet; import net.sourceforge.plantuml.klimt.drawing.UGraphic; +import net.sourceforge.plantuml.klimt.font.StringBounder; import net.sourceforge.plantuml.project.time.Day; import net.sourceforge.plantuml.project.time.DayOfWeek; import net.sourceforge.plantuml.style.PName; +import net.sourceforge.plantuml.style.SName; import net.sourceforge.plantuml.style.Style; -public class TimeHeaderParameters { +public class TimeHeaderParameters implements GanttStyle { private final Map colorDays; private final double scale; private final Day min; private final Day max; private final HColorSet colorSet; - private final Style timelineStyle; - private final Style closedStyle; - private final Style verticalSeparatorStyle; + private final GanttStyle ganttStyle; private final Locale locale; private final OpenClose openClose; private final Map colorDaysOfWeek; private final Set verticalSeparatorBefore; public TimeHeaderParameters(Map colorDays, double scale, Day min, Day max, HColorSet colorSet, - Style timelineStyle, Style closedStyle, Locale locale, OpenClose openClose, - Map colorDaysOfWeek, Set verticalSeparatorBefore, Style verticalSeparatorStyle) { + Locale locale, OpenClose openClose, Map colorDaysOfWeek, + Set verticalSeparatorBefore, GanttStyle ganttStyle) { this.colorDays = colorDays; this.scale = scale; this.min = min; this.max = max; this.colorSet = colorSet; - this.timelineStyle = timelineStyle; - this.closedStyle = closedStyle; + this.ganttStyle = ganttStyle; this.locale = locale; this.openClose = openClose; this.colorDaysOfWeek = colorDaysOfWeek; this.verticalSeparatorBefore = verticalSeparatorBefore; - this.verticalSeparatorStyle = verticalSeparatorStyle; } public HColor getColor(Day wink) { @@ -105,11 +103,11 @@ public class TimeHeaderParameters { } public final Style getTimelineStyle() { - return timelineStyle; + return getStyle(SName.timeline); } public final Style getClosedStyle() { - return closedStyle; + return getStyle(SName.closed); } public final Locale getLocale() { @@ -129,9 +127,25 @@ public class TimeHeaderParameters { } public final UGraphic forVerticalSeparator(UGraphic ug) { - final HColor color = verticalSeparatorStyle.value(PName.LineColor).asColor(getColorSet()); - final UStroke stroke = verticalSeparatorStyle.getStroke(); + final Style style = getStyle(SName.verticalSeparator); + final HColor color = style.value(PName.LineColor).asColor(getColorSet()); + final UStroke stroke = style.getStroke(); return ug.apply(color).apply(stroke); } + @Override + public final Style getStyle(SName param1, SName param2) { + return ganttStyle.getStyle(param1, param2); + } + + @Override + public Style getStyle(SName param) { + return ganttStyle.getStyle(param); + } + + public double getCellWidth(StringBounder stringBounder) { + final double w = getStyle(SName.timeline, SName.day).value(PName.FontSize).asDouble(); + return w * 1.6; + } + } diff --git a/src/net/sourceforge/plantuml/project/core/AbstractTask.java b/src/net/sourceforge/plantuml/project/core/AbstractTask.java index fe74f41cf..549e2c11f 100644 --- a/src/net/sourceforge/plantuml/project/core/AbstractTask.java +++ b/src/net/sourceforge/plantuml/project/core/AbstractTask.java @@ -43,27 +43,42 @@ public abstract class AbstractTask implements Task { private final StyleBuilder styleBuilder; private Task row; + private String displayString; protected AbstractTask(StyleBuilder styleBuilder, TaskCode code) { this.styleBuilder = styleBuilder; this.code = code; } + @Override final public void putInSameRowAs(Task row) { if (this != row) this.row = row; } + @Override public final Task getRow() { return row; } + @Override public final TaskCode getCode() { return code; } + @Override public final StyleBuilder getStyleBuilder() { return styleBuilder; } + @Override + public void setDisplay(String displayString) { + this.displayString = displayString; + } + + @Override + public String getDisplayString() { + return this.displayString; + } + } diff --git a/src/net/sourceforge/plantuml/project/core/Task.java b/src/net/sourceforge/plantuml/project/core/Task.java index 178b6283e..467274875 100644 --- a/src/net/sourceforge/plantuml/project/core/Task.java +++ b/src/net/sourceforge/plantuml/project/core/Task.java @@ -81,4 +81,8 @@ public interface Task extends Moment { public boolean isAssignedTo(Resource res); + public void setDisplay(String displayString); + + public String getDisplayString(); + } diff --git a/src/net/sourceforge/plantuml/project/draw/TaskDrawDiamond.java b/src/net/sourceforge/plantuml/project/draw/TaskDrawDiamond.java index 30e3d8031..df3a3854b 100644 --- a/src/net/sourceforge/plantuml/project/draw/TaskDrawDiamond.java +++ b/src/net/sourceforge/plantuml/project/draw/TaskDrawDiamond.java @@ -134,29 +134,39 @@ public class TaskDrawDiamond extends AbstractTaskDraw { @Override public void drawU(UGraphic ug) { + if (url != null) + ug.startUrl(url); + + final String displayString = getTask().getDisplayString(); + final Style style = getStyle(); final ClockwiseTopRightBottomLeft margin = style.getMargin(); ug = ug.apply(UTranslate.dy(margin.getTop())); final double x1 = timeScale.getStartingPosition(start); - final double x2 = timeScale.getEndingPosition(start); - final double width = getDiamondHeight(); - final double delta = x2 - x1 - width; - if (url != null) - ug.startUrl(url); - - drawShape(applyColors(ug).apply(UTranslate.dx(x1 + delta / 2))); + ug = ug.apply(UTranslate.dx(x1)); + if (displayString == null) { + final double x2 = timeScale.getEndingPosition(start); + final double width = getDiamondHeight(); + final double delta = x2 - x1 - width; + ug = ug.apply(UTranslate.dx(delta / 2)); + drawShape(applyColors(ug)); + } else { + final TextBlock draw = Display.getWithNewlines(displayString).create(getFontConfiguration(), + HorizontalAlignment.LEFT, new SpriteContainerEmpty()); + draw.drawU(ug); + } if (url != null) ug.closeUrl(); } private UGraphic applyColors(UGraphic ug) { final CenterBorderColor col = this.getColors(); - if (col != null && col.isOk()) { + if (col != null && col.isOk()) return col.apply(ug); - } + return ug.apply(getLineColor()).apply(getBackgroundColor().bg()); } diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeader.java b/src/net/sourceforge/plantuml/project/draw/TimeHeader.java index b50138d03..9d171188e 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeader.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeader.java @@ -41,6 +41,7 @@ import net.sourceforge.plantuml.klimt.color.HColors; import net.sourceforge.plantuml.klimt.creole.Display; import net.sourceforge.plantuml.klimt.drawing.UGraphic; import net.sourceforge.plantuml.klimt.font.FontConfiguration; +import net.sourceforge.plantuml.klimt.font.StringBounder; import net.sourceforge.plantuml.klimt.font.UFont; import net.sourceforge.plantuml.klimt.geom.HorizontalAlignment; import net.sourceforge.plantuml.klimt.shape.TextBlock; @@ -51,18 +52,11 @@ import net.sourceforge.plantuml.project.TimeHeaderParameters; import net.sourceforge.plantuml.project.time.Day; import net.sourceforge.plantuml.project.timescale.TimeScale; import net.sourceforge.plantuml.style.PName; +import net.sourceforge.plantuml.style.SName; public abstract class TimeHeader { // ::remove folder when __HAXE__ - protected final double Y_POS_ROW16() { - return 16; - } - - protected final double Y_POS_ROW28() { - return 28; - } - private final TimeScale timeScale; protected final TimeHeaderParameters thParam; @@ -100,15 +94,19 @@ public abstract class TimeHeader { return thParam.getTimelineStyle().value(PName.LineColor).asColor(thParam.getColorSet()); } - public abstract double getTimeHeaderHeight(); + public abstract double getTimeHeaderHeight(StringBounder stringBounder); - public abstract double getTimeFooterHeight(); + public abstract double getTimeFooterHeight(StringBounder stringBounder); + + public abstract double getFullHeaderHeight(StringBounder stringBounder); public abstract void drawTimeHeader(UGraphic ug, double totalHeightWithoutFooter); public abstract void drawTimeFooter(UGraphic ug); - public abstract double getFullHeaderHeight(); + public final TimeScale getTimeScale() { + return timeScale; + } protected final void drawHline(UGraphic ug, double y) { final double xmin = getTimeScale().getStartingPosition(thParam.getMin()); @@ -122,20 +120,17 @@ public abstract class TimeHeader { ug.apply(new UTranslate(x, y1)).draw(vbar); } - final protected FontConfiguration getFontConfiguration(int size, boolean bold, HColor color) { - UFont font = UFont.serif(size); + final protected FontConfiguration getFontConfiguration(UFont font, boolean bold, HColor color) { if (bold) font = font.bold(); return FontConfiguration.create(font, color, color, null); } - public final TimeScale getTimeScale() { - return timeScale; - } - - protected final TextBlock getTextBlock(String text, int size, boolean bold, HColor color) { - return Display.getWithNewlines(text).create(getFontConfiguration(size, bold, color), HorizontalAlignment.LEFT, + protected final TextBlock getTextBlock(SName param, String text, boolean bold, HColor color) { + final UFont font = thParam.getStyle(SName.timeline, param).getUFont(); + final FontConfiguration fontConfiguration = getFontConfiguration(font, bold, color); + return Display.getWithNewlines(text).create(fontConfiguration, HorizontalAlignment.LEFT, new SpriteContainerEmpty()); } @@ -165,7 +160,7 @@ public abstract class TimeHeader { return; ug = ug.apply(HColors.none()); - ug = ug.apply(new UTranslate(x1, getFullHeaderHeight())); + ug = ug.apply(new UTranslate(x1, getFullHeaderHeight(ug.getStringBounder()))); ug.draw(URectangle.build(x2 - x1, height)); } @@ -173,8 +168,8 @@ public abstract class TimeHeader { ug = thParam.forVerticalSeparator(ug); for (Day wink = getMin(); wink.compareTo(getMax()) <= 0; wink = wink.increment()) if (isBold2(wink)) - drawVline(ug, getTimeScale().getStartingPosition(wink), getFullHeaderHeight(), - totalHeightWithoutFooter); + drawVline(ug, getTimeScale().getStartingPosition(wink), + getFullHeaderHeight(ug.getStringBounder()), totalHeightWithoutFooter); } } diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeaderCalendar.java b/src/net/sourceforge/plantuml/project/draw/TimeHeaderCalendar.java index ff606e347..fb85e6503 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeaderCalendar.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeaderCalendar.java @@ -76,7 +76,7 @@ public abstract class TimeHeaderCalendar extends TimeHeader { protected final void drawTextsBackground(UGraphic ug, double totalHeightWithoutFooter) { - final double height = totalHeightWithoutFooter - getFullHeaderHeight(); + final double height = totalHeightWithoutFooter - getFullHeaderHeight(ug.getStringBounder()); Pending pending = null; for (Day wink = getMin(); wink.compareTo(getMax()) <= 0; wink = wink.increment()) { diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeaderDaily.java b/src/net/sourceforge/plantuml/project/draw/TimeHeaderDaily.java index 55f04437c..6d5a550bb 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeaderDaily.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeaderDaily.java @@ -40,41 +40,79 @@ import java.util.Map; import net.sourceforge.plantuml.klimt.UTranslate; import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.drawing.UGraphic; +import net.sourceforge.plantuml.klimt.font.StringBounder; import net.sourceforge.plantuml.klimt.shape.TextBlock; import net.sourceforge.plantuml.project.TimeHeaderParameters; import net.sourceforge.plantuml.project.time.Day; import net.sourceforge.plantuml.project.time.MonthYear; import net.sourceforge.plantuml.project.timescale.TimeScaleDaily; +import net.sourceforge.plantuml.style.PName; +import net.sourceforge.plantuml.style.SName; public class TimeHeaderDaily extends TimeHeaderCalendar { - public double getTimeHeaderHeight() { - return Y_POS_ROW28() + 13; + private double getH1(StringBounder stringBounder) { + final double h = thParam.getStyle(SName.timeline, SName.month).value(PName.FontSize).asDouble() + 2; + return h; } - public double getTimeFooterHeight() { - // return 0; - return 24 + 14; + private double getH2(StringBounder stringBounder) { + final double h = thParam.getStyle(SName.timeline, SName.day).value(PName.FontSize).asDouble() + 2; + return getH1(stringBounder) + h; + } + + private double getH3(StringBounder stringBounder) { + final double h = thParam.getStyle(SName.timeline, SName.day).value(PName.FontSize).asDouble() + 3; + return getH2(stringBounder) + h; + } + + @Override + public double getTimeHeaderHeight(StringBounder stringBounder) { + return getH3(stringBounder); + } + + @Override + public double getTimeFooterHeight(StringBounder stringBounder) { + final double h1 = thParam.getStyle(SName.timeline, SName.day).value(PName.FontSize).asDouble(); + final double h2 = thParam.getStyle(SName.timeline, SName.day).value(PName.FontSize).asDouble(); + final double h3 = thParam.getStyle(SName.timeline, SName.month).value(PName.FontSize).asDouble(); + return h1 + h2 + h3 + 8; + } + + private double getHeaderNameDayHeight() { + if (nameDays.size() > 0) { + final double h = thParam.getStyle(SName.timeline, SName.day).value(PName.FontSize).asDouble() + 6; + return h; + } + + return 0; + } + + @Override + public double getFullHeaderHeight(StringBounder stringBounder) { + return getTimeHeaderHeight(stringBounder) + getHeaderNameDayHeight(); } private final Map nameDays; - public TimeHeaderDaily(TimeHeaderParameters thParam, Map nameDays, Day printStart, Day printEnd) { - super(thParam, new TimeScaleDaily(thParam.getStartingDay(), thParam.getScale(), printStart)); + public TimeHeaderDaily(StringBounder stringBounder, TimeHeaderParameters thParam, Map nameDays, + Day printStart, Day printEnd) { + super(thParam, new TimeScaleDaily(thParam.getCellWidth(stringBounder), thParam.getStartingDay(), + thParam.getScale(), printStart)); this.nameDays = nameDays; } @Override public void drawTimeHeader(final UGraphic ug, double totalHeightWithoutFooter) { drawTextsBackground(ug, totalHeightWithoutFooter); - drawTextsDayOfWeek(ug.apply(UTranslate.dy(Y_POS_ROW16()))); - drawTextDayOfMonth(ug.apply(UTranslate.dy(Y_POS_ROW28()))); + drawTextsDayOfWeek(ug.apply(UTranslate.dy(getH1(ug.getStringBounder())))); + drawTextDayOfMonth(ug.apply(UTranslate.dy(getH2(ug.getStringBounder())))); drawMonths(ug); printVerticalSeparators(ug, totalHeightWithoutFooter); printNamedDays(ug); - drawHline(ug, getFullHeaderHeight()); + drawHline(ug, getFullHeaderHeight(ug.getStringBounder())); drawHline(ug, totalHeightWithoutFooter); } @@ -84,21 +122,22 @@ public class TimeHeaderDaily extends TimeHeaderCalendar { final UGraphic ugLineColor = ug.apply(getLineColor()); for (Day wink = getMin(); wink.compareTo(getMax()) <= 0; wink = wink.increment()) if (isBold2(wink)) - drawVline(ugVerticalSeparator, getTimeScale().getStartingPosition(wink), getFullHeaderHeight(), - totalHeightWithoutFooter); + drawVline(ugVerticalSeparator, getTimeScale().getStartingPosition(wink), + getFullHeaderHeight(ug.getStringBounder()), totalHeightWithoutFooter); else - drawVline(ugLineColor, getTimeScale().getStartingPosition(wink), getFullHeaderHeight(), - totalHeightWithoutFooter); + drawVline(ugLineColor, getTimeScale().getStartingPosition(wink), + getFullHeaderHeight(ug.getStringBounder()), totalHeightWithoutFooter); - drawVline(ugLineColor, getTimeScale().getEndingPosition(getMax()), getFullHeaderHeight(), + drawVline(ugLineColor, getTimeScale().getEndingPosition(getMax()), getFullHeaderHeight(ug.getStringBounder()), totalHeightWithoutFooter); } @Override public void drawTimeFooter(UGraphic ug) { - drawTextDayOfMonth(ug.apply(UTranslate.dy(12))); + final double h = thParam.getStyle(SName.timeline, SName.day).value(PName.FontSize).asDouble() + 2; drawTextsDayOfWeek(ug); - drawMonths(ug.apply(UTranslate.dy(24))); + drawTextDayOfMonth(ug.apply(UTranslate.dy(h + 2))); + drawMonths(ug.apply(UTranslate.dy(2 * h + 3))); } private void drawTextsDayOfWeek(UGraphic ug) { @@ -106,7 +145,8 @@ public class TimeHeaderDaily extends TimeHeaderCalendar { final double x1 = getTimeScale().getStartingPosition(wink); final double x2 = getTimeScale().getEndingPosition(wink); final HColor textColor = getTextBackColor(wink); - printCentered(ug, getTextBlock(wink.getDayOfWeek().shortName(locale()), 10, false, textColor), x1, x2); + printCentered(ug, getTextBlock(SName.day, wink.getDayOfWeek().shortName(locale()), false, textColor), x1, + x2); } } @@ -115,7 +155,7 @@ public class TimeHeaderDaily extends TimeHeaderCalendar { final double x1 = getTimeScale().getStartingPosition(wink); final double x2 = getTimeScale().getEndingPosition(wink); final HColor textColor = getTextBackColor(wink); - printCentered(ug, getTextBlock("" + wink.getDayOfMonth(), 10, false, textColor), x1, x2); + printCentered(ug, getTextBlock(SName.day, "" + wink.getDayOfMonth(), false, textColor), x1, x2); } } @@ -146,9 +186,9 @@ public class TimeHeaderDaily extends TimeHeaderCalendar { } private void printMonth(UGraphic ug, MonthYear monthYear, double start, double end) { - final TextBlock tiny = getTextBlock(monthYear.shortName(locale()), 12, true, openFontColor()); - final TextBlock small = getTextBlock(monthYear.longName(locale()), 12, true, openFontColor()); - final TextBlock big = getTextBlock(monthYear.longNameYYYY(locale()), 12, true, openFontColor()); + final TextBlock tiny = getTextBlock(SName.month, monthYear.shortName(locale()), true, openFontColor()); + final TextBlock small = getTextBlock(SName.month, monthYear.longName(locale()), true, openFontColor()); + final TextBlock big = getTextBlock(SName.month, monthYear.longNameYYYY(locale()), true, openFontColor()); printCentered(ug, false, start, end, tiny, small, big); } @@ -160,27 +200,17 @@ public class TimeHeaderDaily extends TimeHeaderCalendar { if (name != null && name.equals(last) == false) { final double x1 = getTimeScale().getStartingPosition(wink); final double x2 = getTimeScale().getEndingPosition(wink); - final TextBlock label = getTextBlock(name, 12, false, openFontColor()); + final TextBlock label = getTextBlock(SName.month, name, false, openFontColor()); final double h = label.calculateDimension(ug.getStringBounder()).getHeight(); - double y1 = getTimeHeaderHeight(); - double y2 = getFullHeaderHeight(); - label.drawU(ug.apply(new UTranslate(x1, Y_POS_ROW28() + 11))); + double y1 = getTimeHeaderHeight(ug.getStringBounder()); + double y2 = getFullHeaderHeight(ug.getStringBounder()); + + final double position = getH3(ug.getStringBounder()); + label.drawU(ug.apply(new UTranslate(x1, position))); } last = name; } } } - @Override - public double getFullHeaderHeight() { - return getTimeHeaderHeight() + getHeaderNameDayHeight(); - } - - private double getHeaderNameDayHeight() { - if (nameDays.size() > 0) - return 16; - - return 0; - } - } diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeaderMonthly.java b/src/net/sourceforge/plantuml/project/draw/TimeHeaderMonthly.java index fc6c99771..81e619c86 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeaderMonthly.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeaderMonthly.java @@ -37,54 +37,76 @@ package net.sourceforge.plantuml.project.draw; import net.sourceforge.plantuml.klimt.UTranslate; import net.sourceforge.plantuml.klimt.drawing.UGraphic; +import net.sourceforge.plantuml.klimt.font.StringBounder; import net.sourceforge.plantuml.klimt.shape.TextBlock; import net.sourceforge.plantuml.project.TimeHeaderParameters; import net.sourceforge.plantuml.project.time.Day; import net.sourceforge.plantuml.project.time.MonthYear; import net.sourceforge.plantuml.project.timescale.TimeScaleCompressed; +import net.sourceforge.plantuml.style.PName; +import net.sourceforge.plantuml.style.SName; public class TimeHeaderMonthly extends TimeHeaderCalendar { - public double getTimeHeaderHeight() { - return 16 + 13; + @Override + public double getTimeHeaderHeight(StringBounder stringBounder) { + final double h1 = thParam.getStyle(SName.timeline, SName.year).value(PName.FontSize).asDouble(); + final double h2 = thParam.getStyle(SName.timeline, SName.month).value(PName.FontSize).asDouble(); + return h1 + h2 + 5; } - public double getTimeFooterHeight() { - return 16 + 13 - 1; + @Override + public double getTimeFooterHeight(StringBounder stringBounder) { + final double h1 = thParam.getStyle(SName.timeline, SName.year).value(PName.FontSize).asDouble(); + final double h2 = thParam.getStyle(SName.timeline, SName.month).value(PName.FontSize).asDouble(); + return h1 + h2 + 5; } - public TimeHeaderMonthly(TimeHeaderParameters thParam) { - super(thParam, new TimeScaleCompressed(thParam.getStartingDay(), thParam.getScale())); + @Override + public double getFullHeaderHeight(StringBounder stringBounder) { + return getTimeHeaderHeight(stringBounder); + } + + public TimeHeaderMonthly(StringBounder stringBounder, TimeHeaderParameters thParam) { + super(thParam, new TimeScaleCompressed(thParam.getCellWidth(stringBounder), thParam.getStartingDay(), + thParam.getScale())); } @Override public void drawTimeHeader(final UGraphic ug, double totalHeightWithoutFooter) { drawTextsBackground(ug, totalHeightWithoutFooter); drawYears(ug); - drawMonths(ug.apply(UTranslate.dy(16))); + final double h1 = thParam.getStyle(SName.timeline, SName.year).value(PName.FontSize).asDouble(); + final double h2 = thParam.getStyle(SName.timeline, SName.month).value(PName.FontSize).asDouble(); + drawMonths(ug.apply(UTranslate.dy(h1 + 2))); printVerticalSeparators(ug, totalHeightWithoutFooter); drawHline(ug, 0); - drawHline(ug, 16); - drawHline(ug, getFullHeaderHeight()); + drawHline(ug, h1 + 2); + drawHline(ug, h1 + 2 + h2 + 2); +// drawHline(ug, getFullHeaderHeight(ug.getStringBounder())); } @Override public void drawTimeFooter(UGraphic ug) { - ug = ug.apply(UTranslate.dy(3)); + final double h1 = thParam.getStyle(SName.timeline, SName.year).value(PName.FontSize).asDouble(); + final double h2 = thParam.getStyle(SName.timeline, SName.month).value(PName.FontSize).asDouble(); + // ug = ug.apply(UTranslate.dy(3)); drawMonths(ug); - drawYears(ug.apply(UTranslate.dy(13))); + drawYears(ug.apply(UTranslate.dy(h2 + 2))); drawHline(ug, 0); - drawHline(ug, 13); - drawHline(ug, getTimeFooterHeight()); + drawHline(ug, h2 + 2); + drawHline(ug, h1 + 2 + h2 + 2); +// drawHline(ug, getTimeFooterHeight(ug.getStringBounder())); } private void drawYears(final UGraphic ug) { + final double h1 = thParam.getStyle(SName.timeline, SName.year).value(PName.FontSize).asDouble(); MonthYear last = null; double lastChange = -1; for (Day wink = getMin(); wink.compareTo(getMax()) < 0; wink = wink.increment()) { final double x1 = getTimeScale().getStartingPosition(wink); if (last == null || wink.monthYear().year() != last.year()) { - drawVline(ug.apply(getLineColor()), x1, 0, 15); + drawVline(ug.apply(getLineColor()), x1, 0, h1 + 2); if (last != null) printYear(ug, last, lastChange, x1); @@ -96,16 +118,17 @@ public class TimeHeaderMonthly extends TimeHeaderCalendar { if (x1 > lastChange) printYear(ug, last, lastChange, x1); - drawVline(ug.apply(getLineColor()), getTimeScale().getEndingPosition(getMax()), (double) 0, (double) 15); + drawVline(ug.apply(getLineColor()), getTimeScale().getEndingPosition(getMax()), 0, h1 + 2); } private void drawMonths(UGraphic ug) { + final double h2 = thParam.getStyle(SName.timeline, SName.month).value(PName.FontSize).asDouble(); MonthYear last = null; double lastChange = -1; for (Day wink = getMin(); wink.compareTo(getMax()) < 0; wink = wink.increment()) { final double x1 = getTimeScale().getStartingPosition(wink); if (wink.monthYear().equals(last) == false) { - drawVline(ug.apply(getLineColor()), x1, (double) 0, (double) 12); + drawVline(ug.apply(getLineColor()), x1, 0, h2 + 2); if (last != null) printMonth(ug, last, lastChange, x1); @@ -117,17 +140,17 @@ public class TimeHeaderMonthly extends TimeHeaderCalendar { if (x1 > lastChange) printMonth(ug, last, lastChange, x1); - drawVline(ug.apply(getLineColor()), getTimeScale().getEndingPosition(getMax()), (double) 0, (double) 12); + drawVline(ug.apply(getLineColor()), getTimeScale().getEndingPosition(getMax()), 0, h2 + 2); } private void printYear(UGraphic ug, MonthYear monthYear, double start, double end) { - final TextBlock small = getTextBlock("" + monthYear.year(), 12, true, openFontColor()); + final TextBlock small = getTextBlock(SName.month, "" + monthYear.year(), true, openFontColor()); printCentered(ug, false, start, end, small); } private void printMonth(UGraphic ug, MonthYear monthYear, double start, double end) { - final TextBlock small = getTextBlock(monthYear.shortName(locale()), 10, false, openFontColor()); - final TextBlock big = getTextBlock(monthYear.longName(locale()), 10, false, openFontColor()); + final TextBlock small = getTextBlock(SName.day, monthYear.shortName(locale()), false, openFontColor()); + final TextBlock big = getTextBlock(SName.day, monthYear.longName(locale()), false, openFontColor()); printCentered(ug, false, start, end, small, big); } @@ -135,9 +158,4 @@ public class TimeHeaderMonthly extends TimeHeaderCalendar { text.drawU(ug.apply(UTranslate.dx(start))); } - @Override - public double getFullHeaderHeight() { - return getTimeHeaderHeight(); - } - } diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeaderQuarterly.java b/src/net/sourceforge/plantuml/project/draw/TimeHeaderQuarterly.java index b19cdad98..87e202be0 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeaderQuarterly.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeaderQuarterly.java @@ -37,54 +37,76 @@ package net.sourceforge.plantuml.project.draw; import net.sourceforge.plantuml.klimt.UTranslate; import net.sourceforge.plantuml.klimt.drawing.UGraphic; +import net.sourceforge.plantuml.klimt.font.StringBounder; import net.sourceforge.plantuml.klimt.shape.TextBlock; import net.sourceforge.plantuml.project.TimeHeaderParameters; import net.sourceforge.plantuml.project.time.Day; import net.sourceforge.plantuml.project.time.MonthYear; import net.sourceforge.plantuml.project.timescale.TimeScaleCompressed; +import net.sourceforge.plantuml.style.PName; +import net.sourceforge.plantuml.style.SName; public class TimeHeaderQuarterly extends TimeHeaderCalendar { - public double getTimeHeaderHeight() { - return 16 + 13; + @Override + public double getTimeHeaderHeight(StringBounder stringBounder) { + final double h1 = thParam.getStyle(SName.timeline, SName.year).value(PName.FontSize).asDouble(); + final double h2 = thParam.getStyle(SName.timeline, SName.month).value(PName.FontSize).asDouble(); + return h1 + h2 + 5; } - public double getTimeFooterHeight() { - return 16 + 13 - 1; + @Override + public double getTimeFooterHeight(StringBounder stringBounder) { + final double h1 = thParam.getStyle(SName.timeline, SName.year).value(PName.FontSize).asDouble(); + final double h2 = thParam.getStyle(SName.timeline, SName.month).value(PName.FontSize).asDouble(); + return h1 + h2 + 5; } - public TimeHeaderQuarterly(TimeHeaderParameters thParam) { - super(thParam, new TimeScaleCompressed(thParam.getStartingDay(), thParam.getScale())); + @Override + public double getFullHeaderHeight(StringBounder stringBounder) { + return getTimeHeaderHeight(stringBounder); + } + + public TimeHeaderQuarterly(StringBounder stringBounder, TimeHeaderParameters thParam) { + super(thParam, new TimeScaleCompressed(thParam.getCellWidth(stringBounder), thParam.getStartingDay(), + thParam.getScale())); } @Override public void drawTimeHeader(final UGraphic ug, double totalHeightWithoutFooter) { drawTextsBackground(ug, totalHeightWithoutFooter); drawYears(ug); - drawQuarters(ug.apply(UTranslate.dy(16))); + final double h1 = thParam.getStyle(SName.timeline, SName.year).value(PName.FontSize).asDouble(); + final double h2 = thParam.getStyle(SName.timeline, SName.month).value(PName.FontSize).asDouble(); + drawQuarters(ug.apply(UTranslate.dy(h1 + 2))); printVerticalSeparators(ug, totalHeightWithoutFooter); drawHline(ug, 0); - drawHline(ug, 16); - drawHline(ug, getFullHeaderHeight()); + drawHline(ug, h1 + 2); + drawHline(ug, h1 + 2 + h2 + 2); + // drawHline(ug, getFullHeaderHeight(ug.getStringBounder())); } @Override public void drawTimeFooter(UGraphic ug) { - ug = ug.apply(UTranslate.dy(3)); + final double h1 = thParam.getStyle(SName.timeline, SName.year).value(PName.FontSize).asDouble(); + final double h2 = thParam.getStyle(SName.timeline, SName.month).value(PName.FontSize).asDouble(); + // ug = ug.apply(UTranslate.dy(3)); drawQuarters(ug); - drawYears(ug.apply(UTranslate.dy(13))); + drawYears(ug.apply(UTranslate.dy(h2 + 2))); drawHline(ug, 0); - drawHline(ug, 13); - drawHline(ug, getTimeFooterHeight()); + drawHline(ug, h2 + 2); + drawHline(ug, h1 + 2 + h2 + 2); +// drawHline(ug, getTimeFooterHeight(ug.getStringBounder())); } private void drawYears(final UGraphic ug) { + final double h1 = thParam.getStyle(SName.timeline, SName.year).value(PName.FontSize).asDouble(); MonthYear last = null; double lastChange = -1; for (Day wink = getMin(); wink.compareTo(getMax()) < 0; wink = wink.increment()) { final double x1 = getTimeScale().getStartingPosition(wink); if (last == null || wink.monthYear().year() != last.year()) { - drawVline(ug.apply(getLineColor()), x1, (double) 0, (double) 15); + drawVline(ug.apply(getLineColor()), x1, 0, h1 + 2); if (last != null) printYear(ug, last, lastChange, x1); @@ -96,16 +118,17 @@ public class TimeHeaderQuarterly extends TimeHeaderCalendar { if (x1 > lastChange) printYear(ug, last, lastChange, x1); - drawVline(ug.apply(getLineColor()), getTimeScale().getEndingPosition(getMax()), (double) 0, (double) 15); + drawVline(ug.apply(getLineColor()), getTimeScale().getEndingPosition(getMax()), 0, h1 + 2); } private void drawQuarters(UGraphic ug) { + final double h2 = thParam.getStyle(SName.timeline, SName.month).value(PName.FontSize).asDouble(); String last = null; double lastChange = -1; for (Day wink = getMin(); wink.compareTo(getMax()) < 0; wink = wink.increment()) { final double x1 = getTimeScale().getStartingPosition(wink); if (quarter(wink).equals(last) == false) { - drawVline(ug.apply(getLineColor()), x1, (double) 0, (double) 12); + drawVline(ug.apply(getLineColor()), x1, 0, h2 + 2); if (last != null) printQuarter(ug, last, lastChange, x1); @@ -117,7 +140,7 @@ public class TimeHeaderQuarterly extends TimeHeaderCalendar { if (x1 > lastChange) printQuarter(ug, last, lastChange, x1); - drawVline(ug.apply(getLineColor()), getTimeScale().getEndingPosition(getMax()), (double) 0, (double) 12); + drawVline(ug.apply(getLineColor()), getTimeScale().getEndingPosition(getMax()), 0, h2 + 2); } private String quarter(Day day) { @@ -125,12 +148,12 @@ public class TimeHeaderQuarterly extends TimeHeaderCalendar { } private void printYear(UGraphic ug, MonthYear monthYear, double start, double end) { - final TextBlock small = getTextBlock("" + monthYear.year(), 12, true, openFontColor()); + final TextBlock small = getTextBlock(SName.month, "" + monthYear.year(), true, openFontColor()); printCentered(ug, false, start, end, small); } private void printQuarter(UGraphic ug, String quarter, double start, double end) { - final TextBlock small = getTextBlock(quarter, 10, false, openFontColor()); + final TextBlock small = getTextBlock(SName.day, quarter, false, openFontColor()); printCentered(ug, false, start, end, small); } @@ -138,9 +161,4 @@ public class TimeHeaderQuarterly extends TimeHeaderCalendar { text.drawU(ug.apply(UTranslate.dx(start))); } - @Override - public double getFullHeaderHeight() { - return getTimeHeaderHeight(); - } - } diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeaderSimple.java b/src/net/sourceforge/plantuml/project/draw/TimeHeaderSimple.java index 7d23798ea..65685fe36 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeaderSimple.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeaderSimple.java @@ -39,6 +39,9 @@ import net.sourceforge.plantuml.klimt.UTranslate; import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.creole.Display; import net.sourceforge.plantuml.klimt.drawing.UGraphic; +import net.sourceforge.plantuml.klimt.font.FontConfiguration; +import net.sourceforge.plantuml.klimt.font.StringBounder; +import net.sourceforge.plantuml.klimt.font.UFont; import net.sourceforge.plantuml.klimt.geom.HorizontalAlignment; import net.sourceforge.plantuml.klimt.shape.TextBlock; import net.sourceforge.plantuml.klimt.shape.ULine; @@ -48,30 +51,36 @@ import net.sourceforge.plantuml.project.core.PrintScale; import net.sourceforge.plantuml.project.time.Day; import net.sourceforge.plantuml.project.timescale.TimeScale; import net.sourceforge.plantuml.project.timescale.TimeScaleWink; +import net.sourceforge.plantuml.style.PName; +import net.sourceforge.plantuml.style.SName; public class TimeHeaderSimple extends TimeHeader { private final PrintScale printScale; @Override - public double getFullHeaderHeight() { - return getTimeHeaderHeight() + getHeaderNameDayHeight(); + public double getFullHeaderHeight(StringBounder stringBounder) { + return getTimeHeaderHeight(stringBounder) + getHeaderNameDayHeight(); } - public double getTimeHeaderHeight() { - return 16; + @Override + public double getTimeHeaderHeight(StringBounder stringBounder) { + final double h = thParam.getStyle(SName.timeline, SName.day).value(PName.FontSize).asDouble(); + return h + 6; } - public double getTimeFooterHeight() { - return 16; + @Override + public double getTimeFooterHeight(StringBounder stringBounder) { + final double h = thParam.getStyle(SName.timeline, SName.day).value(PName.FontSize).asDouble(); + return h + 6; } private double getHeaderNameDayHeight() { return 0; } - public TimeHeaderSimple(TimeHeaderParameters thParam, PrintScale printScale) { - super(thParam, new TimeScaleWink(thParam.getScale(), printScale)); + public TimeHeaderSimple(StringBounder stringBounder, TimeHeaderParameters thParam, PrintScale printScale) { + super(thParam, new TimeScaleWink(thParam.getCellWidth(stringBounder), thParam.getScale(), printScale)); this.printScale = printScale; } @@ -91,9 +100,10 @@ public class TimeHeaderSimple extends TimeHeader { value = i.getAbsoluteDayNum() / 7 + 1; else value = i.getAbsoluteDayNum() + 1; - final TextBlock num = Display.getWithNewlines("" + value).create( - getFontConfiguration(10, false, openFontColor()), HorizontalAlignment.LEFT, - new SpriteContainerEmpty()); + final UFont font = thParam.getStyle(SName.timeline, SName.day).getUFont(); + final FontConfiguration fontConfiguration = getFontConfiguration(font, false, openFontColor()); + final TextBlock num = Display.getWithNewlines("" + value).create(fontConfiguration, + HorizontalAlignment.LEFT, new SpriteContainerEmpty()); final double x1 = timeScale.getStartingPosition(i); final double x2; if (printScale == PrintScale.WEEKLY) @@ -110,15 +120,15 @@ public class TimeHeaderSimple extends TimeHeader { @Override public void drawTimeHeader(UGraphic ug, double totalHeightWithoutFooter) { - drawTextsBackground(ug.apply(UTranslate.dy(-3)), totalHeightWithoutFooter + 6); + // drawTextsBackground(ug.apply(UTranslate.dy(-3)), totalHeightWithoutFooter + 6); final double xmin = getTimeScale().getStartingPosition(getMin()); final double xmax = getTimeScale().getEndingPosition(getMax()); drawSmallVlinesDay(ug, getTimeScale(), totalHeightWithoutFooter + 2); printVerticalSeparators(ug, totalHeightWithoutFooter); drawSimpleDayCounter(ug, getTimeScale()); - ug = ug.apply(getLineColor()); - ug.draw(ULine.hline(xmax - xmin)); - ug.apply(UTranslate.dy(getFullHeaderHeight() - 3)).draw(ULine.hline(xmax - xmin)); + // ug = ug.apply(getLineColor()); + // ug.draw(ULine.hline(xmax - xmin)); + // ug.apply(UTranslate.dy(getFullHeaderHeight(ug.getStringBounder()) - 3)).draw(ULine.hline(xmax - xmin)); } @@ -127,9 +137,9 @@ public class TimeHeaderSimple extends TimeHeader { final double xmin = getTimeScale().getStartingPosition(getMin()); final double xmax = getTimeScale().getEndingPosition(getMax()); ug = ug.apply(UTranslate.dy(3)); - drawSmallVlinesDay(ug, getTimeScale(), getTimeFooterHeight() - 3); + drawSmallVlinesDay(ug, getTimeScale(), getTimeFooterHeight(ug.getStringBounder()) - 3); drawSimpleDayCounter(ug, getTimeScale()); - ug.apply(getLineColor()).draw(ULine.hline(xmax - xmin)); + // ug.apply(getLineColor()).draw(ULine.hline(xmax - xmin)); } // Duplicate in TimeHeaderDaily @@ -151,7 +161,7 @@ public class TimeHeaderSimple extends TimeHeader { protected final void drawTextsBackground(UGraphic ug, double totalHeightWithoutFooter) { - final double height = totalHeightWithoutFooter - getFullHeaderHeight(); + final double height = totalHeightWithoutFooter - getFullHeaderHeight(ug.getStringBounder()); Pending pending = null; for (Day wink = getMin(); wink.compareTo(getMax()) <= 0; wink = wink.increment()) { diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeaderWeekly.java b/src/net/sourceforge/plantuml/project/draw/TimeHeaderWeekly.java index 53688b08c..c2cbc0d96 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeaderWeekly.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeaderWeekly.java @@ -37,29 +37,48 @@ package net.sourceforge.plantuml.project.draw; import net.sourceforge.plantuml.klimt.UTranslate; import net.sourceforge.plantuml.klimt.drawing.UGraphic; +import net.sourceforge.plantuml.klimt.font.StringBounder; import net.sourceforge.plantuml.klimt.shape.TextBlock; import net.sourceforge.plantuml.project.TimeHeaderParameters; import net.sourceforge.plantuml.project.time.Day; import net.sourceforge.plantuml.project.time.MonthYear; import net.sourceforge.plantuml.project.time.WeekNumberStrategy; import net.sourceforge.plantuml.project.timescale.TimeScaleCompressed; +import net.sourceforge.plantuml.style.PName; +import net.sourceforge.plantuml.style.SName; public class TimeHeaderWeekly extends TimeHeaderCalendar { private final WeekNumberStrategy weekNumberStrategy; private final boolean withCalendarDate; - public double getTimeHeaderHeight() { - return 16 + 13; + @Override + public double getTimeHeaderHeight(StringBounder stringBounder) { + final double h1 = thParam.getStyle(SName.timeline, SName.month).value(PName.FontSize).asDouble(); + final double h2 = thParam.getStyle(SName.timeline, SName.day).value(PName.FontSize).asDouble(); + return h1 + h2 + 5; } - public double getTimeFooterHeight() { - return 16; + @Override + public double getTimeFooterHeight(StringBounder stringBounder) { + final double h = thParam.getStyle(SName.timeline, SName.month).value(PName.FontSize).asDouble() + 4; + return h; } - public TimeHeaderWeekly(TimeHeaderParameters thParam, WeekNumberStrategy weekNumberStrategy, - boolean withCalendarDate) { - super(thParam, new TimeScaleCompressed(thParam.getStartingDay(), thParam.getScale())); + @Override + public double getFullHeaderHeight(StringBounder stringBounder) { + return getTimeHeaderHeight(stringBounder); + } + + private double getH1(StringBounder stringBounder) { + final double h = thParam.getStyle(SName.timeline, SName.month).value(PName.FontSize).asDouble() + 4; + return h; + } + + public TimeHeaderWeekly(StringBounder stringBounder, TimeHeaderParameters thParam, + WeekNumberStrategy weekNumberStrategy, boolean withCalendarDate) { + super(thParam, new TimeScaleCompressed(thParam.getCellWidth(stringBounder), thParam.getStartingDay(), + thParam.getScale())); this.weekNumberStrategy = weekNumberStrategy; this.withCalendarDate = withCalendarDate; } @@ -69,15 +88,15 @@ public class TimeHeaderWeekly extends TimeHeaderCalendar { drawTextsBackground(ug, totalHeightWithoutFooter); drawCalendar(ug, totalHeightWithoutFooter); drawHline(ug, 0); - drawHline(ug, Y_POS_ROW16()); - drawHline(ug, getFullHeaderHeight()); + drawHline(ug, getH1(ug.getStringBounder())); + drawHline(ug, getFullHeaderHeight(ug.getStringBounder())); } @Override public void drawTimeFooter(UGraphic ug) { drawHline(ug, 0); printMonths(ug); - drawHline(ug, getTimeFooterHeight()); + drawHline(ug, getTimeFooterHeight(ug.getStringBounder())); } private void drawCalendar(final UGraphic ug, double totalHeightWithoutFooter) { @@ -92,7 +111,7 @@ public class TimeHeaderWeekly extends TimeHeaderCalendar { for (Day wink = getMin(); wink.compareTo(getMax()) < 0; wink = wink.increment()) { final double x1 = getTimeScale().getStartingPosition(wink); if (wink.monthYear().equals(last) == false) { - drawVline(ug.apply(getLineColor()), x1, (double) 0, Y_POS_ROW16()); + drawVline(ug.apply(getLineColor()), x1, 0, getH1(ug.getStringBounder())); if (last != null) printMonth(ug, last, lastChangeMonth, x1); @@ -100,9 +119,10 @@ public class TimeHeaderWeekly extends TimeHeaderCalendar { last = wink.monthYear(); } } - drawVline(ug.apply(getLineColor()), getTimeScale().getEndingPosition(getMax()), (double) 0, Y_POS_ROW16()); + drawVline(ug.apply(getLineColor()), getTimeScale().getEndingPosition(getMax()), (double) 0, + getH1(ug.getStringBounder())); final double x1 = getTimeScale().getStartingPosition(getMax().increment()); - if (x1 > lastChangeMonth) + if (last != null && x1 > lastChangeMonth) printMonth(ug, last, lastChangeMonth, x1); } @@ -111,9 +131,11 @@ public class TimeHeaderWeekly extends TimeHeaderCalendar { protected void printVerticalSeparators(final UGraphic ug, double totalHeightWithoutFooter) { for (Day wink = getMin(); wink.compareTo(getMax()) <= 0; wink = wink.increment()) if (wink.getDayOfWeek() == weekNumberStrategy.getFirstDayOfWeek()) - drawVline(ug.apply(getLineColor()), getTimeScale().getStartingPosition(wink), Y_POS_ROW16(), totalHeightWithoutFooter); + drawVline(ug.apply(getLineColor()), getTimeScale().getStartingPosition(wink), + getH1(ug.getStringBounder()), totalHeightWithoutFooter); - drawVline(ug.apply(getLineColor()), getTimeScale().getEndingPosition(getMax()), Y_POS_ROW16(), totalHeightWithoutFooter); + drawVline(ug.apply(getLineColor()), getTimeScale().getEndingPosition(getMax()), getH1(ug.getStringBounder()), + totalHeightWithoutFooter); super.printVerticalSeparators(ug, totalHeightWithoutFooter); } @@ -125,16 +147,16 @@ public class TimeHeaderWeekly extends TimeHeaderCalendar { num = "" + wink.getDayOfMonth(); else num = "" + wink.getWeekOfYear(weekNumberStrategy); - final TextBlock textBlock = getTextBlock(num, 10, false, openFontColor()); - printLeft(ug.apply(UTranslate.dy(Y_POS_ROW16())), textBlock, + final TextBlock textBlock = getTextBlock(SName.day, num, false, openFontColor()); + printLeft(ug.apply(UTranslate.dy(getH1(ug.getStringBounder()))), textBlock, getTimeScale().getStartingPosition(wink) + 5); } } } private void printMonth(UGraphic ug, MonthYear monthYear, double start, double end) { - final TextBlock small = getTextBlock(monthYear.shortName(locale()), 12, true, openFontColor()); - final TextBlock big = getTextBlock(monthYear.shortNameYYYY(locale()), 12, true, openFontColor()); + final TextBlock small = getTextBlock(SName.month, monthYear.shortName(locale()), true, openFontColor()); + final TextBlock big = getTextBlock(SName.month, monthYear.shortNameYYYY(locale()), true, openFontColor()); printCentered(ug, false, start, end, small, big); } @@ -142,9 +164,4 @@ public class TimeHeaderWeekly extends TimeHeaderCalendar { text.drawU(ug.apply(UTranslate.dx(start))); } - @Override - public double getFullHeaderHeight() { - return getTimeHeaderHeight(); - } - } diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeaderYearly.java b/src/net/sourceforge/plantuml/project/draw/TimeHeaderYearly.java index 04b25e86c..47893ed51 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeaderYearly.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeaderYearly.java @@ -37,24 +37,37 @@ package net.sourceforge.plantuml.project.draw; import net.sourceforge.plantuml.klimt.UTranslate; import net.sourceforge.plantuml.klimt.drawing.UGraphic; +import net.sourceforge.plantuml.klimt.font.StringBounder; import net.sourceforge.plantuml.klimt.shape.TextBlock; import net.sourceforge.plantuml.project.TimeHeaderParameters; import net.sourceforge.plantuml.project.time.Day; import net.sourceforge.plantuml.project.time.MonthYear; import net.sourceforge.plantuml.project.timescale.TimeScaleCompressed; +import net.sourceforge.plantuml.style.PName; +import net.sourceforge.plantuml.style.SName; public class TimeHeaderYearly extends TimeHeaderCalendar { - public double getTimeHeaderHeight() { - return 20; + @Override + public double getTimeHeaderHeight(StringBounder stringBounder) { + final double h1 = thParam.getStyle(SName.timeline, SName.year).value(PName.FontSize).asDouble(); + return h1 + 3; } - public double getTimeFooterHeight() { - return 20 - 1; + @Override + public double getTimeFooterHeight(StringBounder stringBounder) { + final double h1 = thParam.getStyle(SName.timeline, SName.year).value(PName.FontSize).asDouble(); + return h1 + 3; } - public TimeHeaderYearly(TimeHeaderParameters thParam) { - super(thParam, new TimeScaleCompressed(thParam.getStartingDay(), thParam.getScale())); + @Override + public double getFullHeaderHeight(StringBounder stringBounder) { + return getTimeHeaderHeight(stringBounder); + } + + public TimeHeaderYearly(StringBounder stringBounder, TimeHeaderParameters thParam) { + super(thParam, new TimeScaleCompressed(thParam.getCellWidth(stringBounder), thParam.getStartingDay(), + thParam.getScale())); } @Override @@ -63,24 +76,26 @@ public class TimeHeaderYearly extends TimeHeaderCalendar { drawYears(ug); printVerticalSeparators(ug, totalHeightWithoutFooter); drawHline(ug, 0); - drawHline(ug, getFullHeaderHeight()); + drawHline(ug, getFullHeaderHeight(ug.getStringBounder())); } @Override public void drawTimeFooter(UGraphic ug) { - ug = ug.apply(UTranslate.dy(3)); + // ug = ug.apply(UTranslate.dy(3)); drawYears(ug); drawHline(ug, 0); - drawHline(ug, getTimeFooterHeight()); + drawHline(ug, getTimeFooterHeight(ug.getStringBounder())); } private void drawYears(final UGraphic ug) { + final double h1 = thParam.getStyle(SName.timeline, SName.year).value(PName.FontSize).asDouble(); + MonthYear last = null; double lastChange = -1; for (Day wink = getMin(); wink.compareTo(getMax()) < 0; wink = wink.increment()) { final double x1 = getTimeScale().getStartingPosition(wink); if (last == null || wink.monthYear().year() != last.year()) { - drawVline(ug.apply(getLineColor()), x1, (double) 0, (double) 19); + drawVline(ug.apply(getLineColor()), x1, 0, h1 + 2); if (last != null) printYear(ug, last, lastChange, x1); @@ -91,18 +106,13 @@ public class TimeHeaderYearly extends TimeHeaderCalendar { final double x1 = getTimeScale().getStartingPosition(getMax().increment()); if (x1 > lastChange) printYear(ug, last, lastChange, x1); - - drawVline(ug.apply(getLineColor()), getTimeScale().getEndingPosition(getMax()), (double) 0, (double) 19); + + drawVline(ug.apply(getLineColor()), getTimeScale().getEndingPosition(getMax()), 0, h1 + 2); } private void printYear(UGraphic ug, MonthYear monthYear, double start, double end) { - final TextBlock small = getTextBlock("" + monthYear.year(), 14, true, openFontColor()); + final TextBlock small = getTextBlock(SName.year, "" + monthYear.year(), true, openFontColor()); printCentered(ug, true, start, end, small); } - @Override - public double getFullHeaderHeight() { - return getTimeHeaderHeight(); - } - } diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementAnything.java b/src/net/sourceforge/plantuml/project/lang/ComplementAnything.java new file mode 100644 index 000000000..787e7e55a --- /dev/null +++ b/src/net/sourceforge/plantuml/project/lang/ComplementAnything.java @@ -0,0 +1,54 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.project.lang; + +import net.sourceforge.plantuml.project.Failable; +import net.sourceforge.plantuml.project.GanttDiagram; +import net.sourceforge.plantuml.regex.IRegex; +import net.sourceforge.plantuml.regex.RegexLeaf; +import net.sourceforge.plantuml.regex.RegexResult; + +public class ComplementAnything implements Something { + + public IRegex toRegex(String suffix) { + return new RegexLeaf("ANYTHING" + suffix, "(.*?)"); + } + + public Failable getMe(GanttDiagram system, RegexResult arg, String suffix) { + final String value = arg.get("ANYTHING" + suffix, 0); + return Failable.ok(value); + } +} diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementDate.java b/src/net/sourceforge/plantuml/project/lang/ComplementDate.java index 701f15dfc..032af9d04 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementDate.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementDate.java @@ -38,7 +38,6 @@ package net.sourceforge.plantuml.project.lang; import net.sourceforge.plantuml.project.Failable; import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.project.time.Day; -import net.sourceforge.plantuml.project.time.Month; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -70,40 +69,14 @@ public class ComplementDate implements Something { } public IRegex toRegex(String suffix) { + final DayPattern dayPattern = new DayPattern(suffix); switch (type) { case ONLY_ABSOLUTE: - return new RegexOr(toRegexA(suffix), toRegexB(suffix), toRegexC(suffix)); + return dayPattern.toRegex(); case ONLY_RELATIVE: return new RegexOr(toRegexD(suffix), toRegexE(suffix)); } - return new RegexOr(toRegexA(suffix), toRegexB(suffix), toRegexC(suffix), toRegexD(suffix), toRegexE(suffix)); - } - - private IRegex toRegexA(String suffix) { - return new RegexConcat( // - new RegexLeaf("ADAY" + suffix, "([\\d]+)"), // - new RegexLeaf("[\\w, ]*?"), // - new RegexLeaf("AMONTH" + suffix, "(" + Month.getRegexString() + ")"), // - new RegexLeaf("[\\w, ]*?"), // - new RegexLeaf("AYEAR" + suffix, "([\\d]{4})")); - } - - private IRegex toRegexB(String suffix) { - return new RegexConcat( // - new RegexLeaf("BYEAR" + suffix, "([\\d]{4})"), // - new RegexLeaf("\\D"), // - new RegexLeaf("BMONTH" + suffix, "([\\d]{1,2})"), // - new RegexLeaf("\\D"), // - new RegexLeaf("BDAY" + suffix, "([\\d]{1,2})")); - } - - private IRegex toRegexC(String suffix) { - return new RegexConcat( // - new RegexLeaf("CMONTH" + suffix, "(" + Month.getRegexString() + ")"), // - new RegexLeaf("[\\w, ]*?"), // - new RegexLeaf("CDAY" + suffix, "([\\d]+)"), // - new RegexLeaf("[\\w, ]*?"), // - new RegexLeaf("CYEAR" + suffix, "([\\d]{4})")); + return new RegexOr(dayPattern.toRegex(), toRegexD(suffix), toRegexE(suffix)); } private IRegex toRegexD(String suffix) { @@ -126,14 +99,11 @@ public class ComplementDate implements Something { } public Failable getMe(GanttDiagram system, RegexResult arg, String suffix) { - if (arg.get("ADAY" + suffix, 0) != null) - return Failable.ok(resultA(arg, suffix)); + final DayPattern dayPattern = new DayPattern(suffix); + final Day result = dayPattern.getDay(arg); - if (arg.get("BDAY" + suffix, 0) != null) - return Failable.ok(resultB(arg, suffix)); - - if (arg.get("CDAY" + suffix, 0) != null) - return Failable.ok(resultC(arg, suffix)); + if (result != null) + return Failable.ok(result); if (arg.get("DCOUNT" + suffix, 0) != null) return Failable.ok(resultD(system, arg, suffix)); @@ -144,27 +114,6 @@ public class ComplementDate implements Something { throw new IllegalStateException(); } - private Day resultA(RegexResult arg, String suffix) { - final int day = Integer.parseInt(arg.get("ADAY" + suffix, 0)); - final String month = arg.get("AMONTH" + suffix, 0); - final int year = Integer.parseInt(arg.get("AYEAR" + suffix, 0)); - return Day.create(year, month, day); - } - - private Day resultB(RegexResult arg, String suffix) { - final int day = Integer.parseInt(arg.get("BDAY" + suffix, 0)); - final int month = Integer.parseInt(arg.get("BMONTH" + suffix, 0)); - final int year = Integer.parseInt(arg.get("BYEAR" + suffix, 0)); - return Day.create(year, month, day); - } - - private Day resultC(RegexResult arg, String suffix) { - final int day = Integer.parseInt(arg.get("CDAY" + suffix, 0)); - final String month = arg.get("CMONTH" + suffix, 0); - final int year = Integer.parseInt(arg.get("CYEAR" + suffix, 0)); - return Day.create(year, month, day); - } - private Day resultD(GanttDiagram system, RegexResult arg, String suffix) { final int day = Integer.parseInt(arg.get("DCOUNT" + suffix, 0)); return system.getStartingDate().addDays(day); diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementDates.java b/src/net/sourceforge/plantuml/project/lang/ComplementDates.java index eece3d85f..a48a91aed 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementDates.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementDates.java @@ -52,20 +52,14 @@ public class ComplementDates implements Something { } private IRegex toRegexB(String suffix) { + final DayPattern dayPattern1 = new DayPattern("1"); + final DayPattern dayPattern2 = new DayPattern("2"); return new RegexConcat( // - new RegexLeaf("BYEAR1" + suffix, "([\\d]{4})"), // - new RegexLeaf("\\D"), // - new RegexLeaf("BMONTH1" + suffix, "([\\d]{1,2})"), // - new RegexLeaf("\\D"), // - new RegexLeaf("BDAY1" + suffix, "([\\d]{1,2})"), // + dayPattern1.toRegex(), // Words.exactly(Words.TO), // Words.zeroOrMore(Words.THE), // RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("BYEAR2" + suffix, "([\\d]{4})"), // - new RegexLeaf("\\D"), // - new RegexLeaf("BMONTH2" + suffix, "([\\d]{1,2})"), // - new RegexLeaf("\\D"), // - new RegexLeaf("BDAY2" + suffix, "([\\d]{1,2})") // + dayPattern2.toRegex() // ); } @@ -82,30 +76,19 @@ public class ComplementDates implements Something { } public Failable getMe(GanttDiagram project, RegexResult arg, String suffix) { - if (arg.get("BDAY1" + suffix, 0) != null) { - return Failable.ok(resultB(arg, suffix)); + final Day d1 = new DayPattern("1").getDay(arg); + if (d1 != null) { + final Day d2 = new DayPattern("2").getDay(arg); + return Failable.ok(new DaysAsDates(d1, d2)); } - if (arg.get("ECOUNT1" + suffix, 0) != null) { + + if (arg.get("ECOUNT1" + suffix, 0) != null) return Failable.ok(resultE(project, arg, suffix)); - } + throw new IllegalStateException(); } - private DaysAsDates resultB(RegexResult arg, String suffix) { - final int day1 = Integer.parseInt(arg.get("BDAY1" + suffix, 0)); - final int month1 = Integer.parseInt(arg.get("BMONTH1" + suffix, 0)); - final int year1 = Integer.parseInt(arg.get("BYEAR1" + suffix, 0)); - final Day date1 = Day.create(year1, month1, day1); - - final int day2 = Integer.parseInt(arg.get("BDAY2" + suffix, 0)); - final int month2 = Integer.parseInt(arg.get("BMONTH2" + suffix, 0)); - final int year2 = Integer.parseInt(arg.get("BYEAR2" + suffix, 0)); - final Day date2 = Day.create(year2, month2, day2); - - return new DaysAsDates(date1, date2); - } - private DaysAsDates resultE(GanttDiagram project, RegexResult arg, String suffix) { final int day1 = Integer.parseInt(arg.get("ECOUNT1" + suffix, 0)); final Day date1 = project.getStartingDate().addDays(day1); diff --git a/src/net/sourceforge/plantuml/project/lang/DayPattern.java b/src/net/sourceforge/plantuml/project/lang/DayPattern.java new file mode 100644 index 000000000..647d204d4 --- /dev/null +++ b/src/net/sourceforge/plantuml/project/lang/DayPattern.java @@ -0,0 +1,136 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.project.lang; + +import net.sourceforge.plantuml.project.time.Day; +import net.sourceforge.plantuml.project.time.Month; +import net.sourceforge.plantuml.regex.IRegex; +import net.sourceforge.plantuml.regex.RegexConcat; +import net.sourceforge.plantuml.regex.RegexLeaf; +import net.sourceforge.plantuml.regex.RegexOr; +import net.sourceforge.plantuml.regex.RegexResult; + +public class DayPattern { + + private final String id; + private final String yearKeyA; + private final String yearKeyB; + private final String yearKeyC; + private final String monthKeyA; + private final String monthKeyB; + private final String monthKeyC; + private final String dayKeyA; + private final String dayKeyB; + private final String dayKeyC; + + public DayPattern(String id) { + this.id = id; + this.yearKeyA = "AYEAR" + id; + this.yearKeyB = "BYEAR" + id; + this.yearKeyC = "CYEAR" + id; + this.monthKeyA = "AMONTH" + id; + this.monthKeyB = "BMONTH" + id; + this.monthKeyC = "CMONTH" + id; + this.dayKeyA = "ADAY" + id; + this.dayKeyB = "BDAY" + id; + this.dayKeyC = "CDAY" + id; + } + + public IRegex toRegex() { + return new RegexOr(toRegexA_DD_MONTH_YYYY(), toRegexB_YYYY_MM_DD(), toRegexC_MONTH_DD_YYYY()); + } + + public Day getDay(RegexResult arg) { + if (arg.get(dayKeyA, 0) != null) + return resultA(arg); + + if (arg.get(dayKeyB, 0) != null) + return resultB(arg); + + if (arg.get(dayKeyC, 0) != null) + return resultC(arg); + return null; + } + + private IRegex toRegexA_DD_MONTH_YYYY() { + return new RegexConcat( // + new RegexLeaf(dayKeyA, "([\\d]{1,2})"), // + new RegexLeaf("[\\w, ]*?"), // + new RegexLeaf(monthKeyA, "(" + Month.getRegexString() + ")"), // + new RegexLeaf("[\\w, ]*?"), // + new RegexLeaf(yearKeyA, "([\\d]{1,4})")); + } + + private Day resultA(RegexResult arg) { + final int day = Integer.parseInt(arg.get(dayKeyA, 0)); + final String month = arg.get(monthKeyA, 0); + final int year = Integer.parseInt(arg.get(yearKeyA, 0)); + return Day.create(year, month, day); + } + + private IRegex toRegexB_YYYY_MM_DD() { + return new RegexConcat( // + new RegexLeaf(yearKeyB, "([\\d]{1,4})"), // + new RegexLeaf("\\D"), // + new RegexLeaf(monthKeyB, "([\\d]{1,2})"), // + new RegexLeaf("\\D"), // + new RegexLeaf(dayKeyB, "([\\d]{1,2})")); + } + + private Day resultB(RegexResult arg) { + final int day = Integer.parseInt(arg.get(dayKeyB, 0)); + final int month = Integer.parseInt(arg.get(monthKeyB, 0)); + final int year = Integer.parseInt(arg.get(yearKeyB, 0)); + return Day.create(year, month, day); + } + + private IRegex toRegexC_MONTH_DD_YYYY() { + return new RegexConcat( // + new RegexLeaf(monthKeyC, "(" + Month.getRegexString() + ")"), // + new RegexLeaf("[\\w, ]*?"), // + new RegexLeaf(dayKeyC, "([\\d]{1,2})"), // + new RegexLeaf("[\\w, ]*?"), // + new RegexLeaf(yearKeyC, "([\\d]{1,4})")); + } + + private Day resultC(RegexResult arg) { + final int day = Integer.parseInt(arg.get(dayKeyC, 0)); + final String month = arg.get(monthKeyC, 0); + final int year = Integer.parseInt(arg.get(yearKeyC, 0)); + return Day.create(year, month, day); + } + +} diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceIsDisplayedAs.java b/src/net/sourceforge/plantuml/project/lang/SentenceIsDisplayedAs.java new file mode 100644 index 000000000..78de0f2b3 --- /dev/null +++ b/src/net/sourceforge/plantuml/project/lang/SentenceIsDisplayedAs.java @@ -0,0 +1,56 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.project.lang; + +import net.sourceforge.plantuml.command.CommandExecutionResult; +import net.sourceforge.plantuml.project.GanttDiagram; +import net.sourceforge.plantuml.project.core.Task; + +public class SentenceIsDisplayedAs extends SentenceSimple { + + public SentenceIsDisplayedAs() { + super(SubjectTask.ME, Verbs.isDisplayedAs, new ComplementAnything()); + } + + @Override + public CommandExecutionResult execute(GanttDiagram project, Object subject, Object complement) { + final Task task = (Task) subject; + final String displayString = (String) complement; + task.setDisplay(displayString); + return CommandExecutionResult.ok(); + } + +} diff --git a/src/net/sourceforge/plantuml/project/lang/SubjectDayAsDate.java b/src/net/sourceforge/plantuml/project/lang/SubjectDayAsDate.java index 9394b889e..473218921 100644 --- a/src/net/sourceforge/plantuml/project/lang/SubjectDayAsDate.java +++ b/src/net/sourceforge/plantuml/project/lang/SubjectDayAsDate.java @@ -138,12 +138,7 @@ public class SubjectDayAsDate implements Subject { } private IRegex toRegexB() { - return new RegexConcat( // - new RegexLeaf("BYEAR", "([\\d]{4})"), // - new RegexLeaf("\\D"), // - new RegexLeaf("BMONTH", "([\\d]{1,2})"), // - new RegexLeaf("\\D"), // - new RegexLeaf("BDAY", "([\\d]{1,2})")); + return TimeResolution.toRegexB_YYYY_MM_DD("BYEAR", "BMONTH", "BDAY"); } private IRegex toRegexE() { diff --git a/src/net/sourceforge/plantuml/project/lang/SubjectDaysAsDates.java b/src/net/sourceforge/plantuml/project/lang/SubjectDaysAsDates.java index e3f48196f..99680e27b 100644 --- a/src/net/sourceforge/plantuml/project/lang/SubjectDaysAsDates.java +++ b/src/net/sourceforge/plantuml/project/lang/SubjectDaysAsDates.java @@ -63,19 +63,10 @@ public class SubjectDaysAsDates implements Subject { private IRegex toRegexB() { return new RegexConcat( // - new RegexLeaf("BYEAR1", "([\\d]{4})"), // - new RegexLeaf("\\D"), // - new RegexLeaf("BMONTH1", "([\\d]{1,2})"), // - new RegexLeaf("\\D"), // - new RegexLeaf("BDAY1", "([\\d]{1,2})"), // + TimeResolution.toRegexB_YYYY_MM_DD("BYEAR1", "BMONTH1", "BDAY1"), // + Words.exactly(Words.TO), // RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("to"), // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("BYEAR2", "([\\d]{4})"), // - new RegexLeaf("\\D"), // - new RegexLeaf("BMONTH2", "([\\d]{1,2})"), // - new RegexLeaf("\\D"), // - new RegexLeaf("BDAY2", "([\\d]{1,2})") // + TimeResolution.toRegexB_YYYY_MM_DD("BYEAR2", "BMONTH2", "BDAY2") // ); } @@ -83,8 +74,7 @@ public class SubjectDaysAsDates implements Subject { return new RegexConcat( // new RegexLeaf("[dD]\\+"), // new RegexLeaf("ECOUNT1", "([\\d]+)"), // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("to"), // + Words.exactly(Words.TO), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("[dD]\\+"), // new RegexLeaf("ECOUNT2", "([\\d]+)") // @@ -93,13 +83,8 @@ public class SubjectDaysAsDates implements Subject { private IRegex andRegex() { return new RegexConcat( // - new RegexLeaf("BYEAR3", "([\\d]{4})"), // - new RegexLeaf("\\D"), // - new RegexLeaf("BMONTH3", "([\\d]{1,2})"), // - new RegexLeaf("\\D"), // - new RegexLeaf("BDAY3", "([\\d]{1,2})"), // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("and"), // + TimeResolution.toRegexB_YYYY_MM_DD("BYEAR3", "BMONTH3", "BDAY3"), // + Words.exactly(Words.AND), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("COUNT_AND", "([\\d]+)"), // RegexLeaf.spaceOneOrMore(), // diff --git a/src/net/sourceforge/plantuml/project/lang/SubjectTask.java b/src/net/sourceforge/plantuml/project/lang/SubjectTask.java index 279f4ecf8..da31a4542 100644 --- a/src/net/sourceforge/plantuml/project/lang/SubjectTask.java +++ b/src/net/sourceforge/plantuml/project/lang/SubjectTask.java @@ -96,7 +96,7 @@ public class SubjectTask implements Subject { new SentenceTaskEndsAbsolute(), new SentenceIsColored(), new SentenceIsColoredForCompletion(), new SentenceIsDeleted(), new SentenceIsForTask(), new SentenceLinksTo(), new SentenceOccurs(), new SentenceDisplayOnSameRowAs(), new SentencePausesDate(), new SentencePausesDates(), - new SentencePausesDayOfWeek()); + new SentencePausesDayOfWeek(), new SentenceIsDisplayedAs()); } public IRegex toRegex() { @@ -106,8 +106,7 @@ public class SubjectTask implements Subject { new RegexLeaf("SUBJECT", "\\[([^\\[\\]]+?)\\](?:[%s]+as[%s]+\\[([^\\[\\]]+?)\\])?"), // new RegexOptional( // new RegexConcat( // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("on"), // + Words.exactly(Words.ON), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("RESOURCE", "((?:\\{[^{}]+\\}[%s]*)+)") // )))); diff --git a/src/net/sourceforge/plantuml/project/lang/TimeResolution.java b/src/net/sourceforge/plantuml/project/lang/TimeResolution.java new file mode 100644 index 000000000..8d9015823 --- /dev/null +++ b/src/net/sourceforge/plantuml/project/lang/TimeResolution.java @@ -0,0 +1,72 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.project.lang; + +import net.sourceforge.plantuml.project.time.Month; +import net.sourceforge.plantuml.regex.IRegex; +import net.sourceforge.plantuml.regex.RegexConcat; +import net.sourceforge.plantuml.regex.RegexLeaf; + +public abstract class TimeResolution { + + public static IRegex toRegexA_DD_MONTH_YYYY(String year, String month, String day) { + return new RegexConcat( // + new RegexLeaf(day, "([\\d]{1,2})"), // + new RegexLeaf("[\\w, ]*?"), // + new RegexLeaf(month, "(" + Month.getRegexString() + ")"), // + new RegexLeaf("[\\w, ]*?"), // + new RegexLeaf(year, "([\\d]{1,4})")); + } + + public static IRegex toRegexB_YYYY_MM_DD(String year, String month, String day) { + return new RegexConcat( // + new RegexLeaf(year, "([\\d]{1,4})"), // + new RegexLeaf("\\D"), // + new RegexLeaf(month, "([\\d]{1,2})"), // + new RegexLeaf("\\D"), // + new RegexLeaf(day, "([\\d]{1,2})")); + } + + public static IRegex toRegexC_MONTH_DD_YYYY(String year, String month, String day) { + return new RegexConcat( // + new RegexLeaf(month, "(" + Month.getRegexString() + ")"), // + new RegexLeaf("[\\w, ]*?"), // + new RegexLeaf(day, "([\\d]{1,2})"), // + new RegexLeaf("[\\w, ]*?"), // + new RegexLeaf(year, "([\\d]{1,4})")); + } + +} diff --git a/src/net/sourceforge/plantuml/project/lang/Verbs.java b/src/net/sourceforge/plantuml/project/lang/Verbs.java index 5b7ed01e5..107a16b3f 100644 --- a/src/net/sourceforge/plantuml/project/lang/Verbs.java +++ b/src/net/sourceforge/plantuml/project/lang/Verbs.java @@ -48,6 +48,7 @@ public class Verbs { public static IRegex is = new RegexLeaf("is"); public static IRegex isColored = new RegexLeaf("is[%s]+colou?red"); public static IRegex isDeleted = new RegexLeaf("is[%s]+deleted"); + public static IRegex isDisplayedAs = new RegexLeaf("is[%s]+displayed[%s]+as"); public static IRegex isOff = new RegexLeaf("is[%s]+off"); public static IRegex isOn = new RegexLeaf("is[%s]+on"); public static IRegex isOrAre = new RegexLeaf("(is|are)"); diff --git a/src/net/sourceforge/plantuml/project/lang/Words.java b/src/net/sourceforge/plantuml/project/lang/Words.java index 9d30ddd85..e3239c218 100644 --- a/src/net/sourceforge/plantuml/project/lang/Words.java +++ b/src/net/sourceforge/plantuml/project/lang/Words.java @@ -44,6 +44,7 @@ import net.sourceforge.plantuml.regex.RegexRepeatedZeroOrMore; public class Words { public final static String AFTER = "after"; + public final static String AND = "and"; public final static String AT = "at"; public final static String BEFORE = "before"; public final static String COMPLETION = "completion"; diff --git a/src/net/sourceforge/plantuml/project/timescale/TimeScaleCompressed.java b/src/net/sourceforge/plantuml/project/timescale/TimeScaleCompressed.java index 1f0ea9a3d..31cc3283a 100644 --- a/src/net/sourceforge/plantuml/project/timescale/TimeScaleCompressed.java +++ b/src/net/sourceforge/plantuml/project/timescale/TimeScaleCompressed.java @@ -42,8 +42,8 @@ public class TimeScaleCompressed implements TimeScale { private final TimeScale daily; - public TimeScaleCompressed(Day calendar, double scale) { - this.daily = new TimeScaleDaily(calendar, scale, null); + public TimeScaleCompressed(double size, Day calendar, double scale) { + this.daily = new TimeScaleDaily(size, calendar, scale, null); } public double getStartingPosition(Day instant) { diff --git a/src/net/sourceforge/plantuml/project/timescale/TimeScaleDaily.java b/src/net/sourceforge/plantuml/project/timescale/TimeScaleDaily.java index dafc2e93f..acf558340 100644 --- a/src/net/sourceforge/plantuml/project/timescale/TimeScaleDaily.java +++ b/src/net/sourceforge/plantuml/project/timescale/TimeScaleDaily.java @@ -39,13 +39,13 @@ import net.sourceforge.plantuml.project.core.PrintScale; import net.sourceforge.plantuml.project.time.Day; public final class TimeScaleDaily implements TimeScale { - // ::remove folder when __HAXE__ + // ::remove folder when __HAXE__ private final TimeScaleWink basic; private final double delta; - public TimeScaleDaily(Day startingDay, double scale, Day zeroDay) { - this.basic = new TimeScaleWink(scale, PrintScale.DAILY); + public TimeScaleDaily(double size, Day startingDay, double scale, Day zeroDay) { + this.basic = new TimeScaleWink(size, scale, PrintScale.DAILY); if (zeroDay == null) this.delta = basic.getStartingPosition(startingDay); else diff --git a/src/net/sourceforge/plantuml/project/timescale/TimeScaleWink.java b/src/net/sourceforge/plantuml/project/timescale/TimeScaleWink.java index 9324097e2..d4cc0a070 100644 --- a/src/net/sourceforge/plantuml/project/timescale/TimeScaleWink.java +++ b/src/net/sourceforge/plantuml/project/timescale/TimeScaleWink.java @@ -40,17 +40,17 @@ import net.sourceforge.plantuml.project.time.Day; public class TimeScaleWink implements TimeScale { - private final double scale; + private final double cellWidth; private final PrintScale printScale; - public TimeScaleWink(double scale, PrintScale printScale) { - this.scale = 16.0 * scale; + public TimeScaleWink(double size, double scale, PrintScale printScale) { + this.cellWidth = size * scale; this.printScale = printScale; } public double getStartingPosition(Day instant) { final long wink = instant.getMillis(); - return wink * scale / Day.MILLISECONDS_PER_DAY; + return wink * cellWidth / Day.MILLISECONDS_PER_DAY; } public double getEndingPosition(Day instant) { @@ -58,7 +58,7 @@ public class TimeScaleWink implements TimeScale { } public double getWidth(Day instant) { - return scale; + return cellWidth; } public boolean isBreaking(Day instant) { diff --git a/src/net/sourceforge/plantuml/style/SName.java b/src/net/sourceforge/plantuml/style/SName.java index 96644bffe..111c7863a 100644 --- a/src/net/sourceforge/plantuml/style/SName.java +++ b/src/net/sourceforge/plantuml/style/SName.java @@ -69,6 +69,7 @@ public enum SName { constraintArrow, // control, // database, // + day, // delay, // destroy, // diamond, // @@ -100,6 +101,7 @@ public enum SName { map, // milestone, // mindmapDiagram, // + month, // network, // node, // note, // @@ -139,6 +141,7 @@ public enum SName { unstarted, // usecase, // verticalSeparator, // + year, // visibilityIcon, // private_, // From ee7022f19ebbe9ff9bbba935840943da5761eaae Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Mon, 27 Nov 2023 18:57:42 +0100 Subject: [PATCH 20/95] chore: fix test --- test/nonreg/simple/A0003_TestResult.java | 268 +++++++++++------------ 1 file changed, 134 insertions(+), 134 deletions(-) diff --git a/test/nonreg/simple/A0003_TestResult.java b/test/nonreg/simple/A0003_TestResult.java index 8bf3f0424..f37024c6e 100644 --- a/test/nonreg/simple/A0003_TestResult.java +++ b/test/nonreg/simple/A0003_TestResult.java @@ -5,7 +5,7 @@ public class A0003_TestResult { /* """ DPI: 96 -dimension: [ 367.7447 ; 76.0000 ] +dimension: [ 367.7447 ; 74.0000 ] scaleFactor: 2.0000 seed: 2061842952546013393 svgLinkTarget: _top @@ -13,8 +13,8 @@ hoverPathColorRGB: null preserveAspectRatio: none RECTANGLE: - pt1: [ 8.0000 ; 29.0000 ] - pt2: [ 16.0000 ; 59.0000 ] + pt1: [ 8.0000 ; 27.0000 ] + pt2: [ 16.0000 ; 57.0000 ] xCorner: 0 yCorner: 0 stroke: 0.0-0.0-1.0 @@ -23,8 +23,8 @@ RECTANGLE: backcolor: fff1e5e5 RECTANGLE: - pt1: [ 36.0000 ; 29.0000 ] - pt2: [ 44.0000 ; 59.0000 ] + pt1: [ 36.0000 ; 27.0000 ] + pt2: [ 44.0000 ; 57.0000 ] xCorner: 0 yCorner: 0 stroke: 0.0-0.0-1.0 @@ -33,8 +33,8 @@ RECTANGLE: backcolor: fff1e5e5 RECTANGLE: - pt1: [ 44.0000 ; 29.0000 ] - pt2: [ 72.0000 ; 59.0000 ] + pt1: [ 44.0000 ; 27.0000 ] + pt2: [ 72.0000 ; 57.0000 ] xCorner: 0 yCorner: 0 stroke: 0.0-0.0-1.0 @@ -43,8 +43,8 @@ RECTANGLE: backcolor: fffa8072 RECTANGLE: - pt1: [ 92.0000 ; 29.0000 ] - pt2: [ 100.0000 ; 59.0000 ] + pt1: [ 92.0000 ; 27.0000 ] + pt2: [ 100.0000 ; 57.0000 ] xCorner: 0 yCorner: 0 stroke: 0.0-0.0-1.0 @@ -53,8 +53,8 @@ RECTANGLE: backcolor: fff1e5e5 RECTANGLE: - pt1: [ 120.0000 ; 29.0000 ] - pt2: [ 128.0000 ; 59.0000 ] + pt1: [ 120.0000 ; 27.0000 ] + pt2: [ 128.0000 ; 57.0000 ] xCorner: 0 yCorner: 0 stroke: 0.0-0.0-1.0 @@ -63,8 +63,8 @@ RECTANGLE: backcolor: fff1e5e5 RECTANGLE: - pt1: [ 148.0000 ; 29.0000 ] - pt2: [ 156.0000 ; 59.0000 ] + pt1: [ 148.0000 ; 27.0000 ] + pt2: [ 156.0000 ; 57.0000 ] xCorner: 0 yCorner: 0 stroke: 0.0-0.0-1.0 @@ -76,7 +76,7 @@ TEXT: text: 43 position: [ 21.0000 ; 23.7778 ] orientation: 0 - font: Serif.plain/10 [] + font: SansSerif.plain/10 [] color: ff000000 extendedColor: NULL_COLOR @@ -84,7 +84,7 @@ TEXT: text: 44 position: [ 49.0000 ; 23.7778 ] orientation: 0 - font: Serif.plain/10 [] + font: SansSerif.plain/10 [] color: ff000000 extendedColor: NULL_COLOR @@ -92,7 +92,7 @@ TEXT: text: 45 position: [ 77.0000 ; 23.7778 ] orientation: 0 - font: Serif.plain/10 [] + font: SansSerif.plain/10 [] color: ff000000 extendedColor: NULL_COLOR @@ -100,7 +100,7 @@ TEXT: text: 46 position: [ 105.0000 ; 23.7778 ] orientation: 0 - font: Serif.plain/10 [] + font: SansSerif.plain/10 [] color: ff000000 extendedColor: NULL_COLOR @@ -108,7 +108,7 @@ TEXT: text: 47 position: [ 133.0000 ; 23.7778 ] orientation: 0 - font: Serif.plain/10 [] + font: SansSerif.plain/10 [] color: ff000000 extendedColor: NULL_COLOR @@ -116,55 +116,55 @@ TEXT: text: 48 position: [ 161.0000 ; 23.7778 ] orientation: 0 - font: Serif.plain/10 [] + font: SansSerif.plain/10 [] color: ff000000 extendedColor: NULL_COLOR LINE: pt1: [ 16.0000 ; 16.0000 ] - pt2: [ 16.0000 ; 59.0000 ] + pt2: [ 16.0000 ; 57.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffc0c0c0 LINE: pt1: [ 44.0000 ; 16.0000 ] - pt2: [ 44.0000 ; 59.0000 ] + pt2: [ 44.0000 ; 57.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffc0c0c0 LINE: pt1: [ 72.0000 ; 16.0000 ] - pt2: [ 72.0000 ; 59.0000 ] + pt2: [ 72.0000 ; 57.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffc0c0c0 LINE: pt1: [ 100.0000 ; 16.0000 ] - pt2: [ 100.0000 ; 59.0000 ] + pt2: [ 100.0000 ; 57.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffc0c0c0 LINE: pt1: [ 128.0000 ; 16.0000 ] - pt2: [ 128.0000 ; 59.0000 ] + pt2: [ 128.0000 ; 57.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffc0c0c0 LINE: pt1: [ 156.0000 ; 16.0000 ] - pt2: [ 156.0000 ; 59.0000 ] + pt2: [ 156.0000 ; 57.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffc0c0c0 LINE: pt1: [ 168.0000 ; 16.0000 ] - pt2: [ 168.0000 ; 59.0000 ] + pt2: [ 168.0000 ; 57.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffc0c0c0 @@ -187,7 +187,7 @@ TEXT: text: Oct position: [ 17.4989 ; 9.3333 ] orientation: 0 - font: Serif.bold/12 [BOLD] + font: SansSerif.bold/12 [BOLD] color: ff000000 extendedColor: NULL_COLOR @@ -202,7 +202,7 @@ TEXT: text: Nov 2020 position: [ 72.7816 ; 9.3333 ] orientation: 0 - font: Serif.bold/12 [BOLD] + font: SansSerif.bold/12 [BOLD] color: ff000000 extendedColor: NULL_COLOR @@ -221,40 +221,40 @@ LINE: color: ffc0c0c0 LINE: - pt1: [ 0.0000 ; 29.0000 ] - pt2: [ 168.0000 ; 29.0000 ] + pt1: [ 0.0000 ; 27.0000 ] + pt2: [ 168.0000 ; 27.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffc0c0c0 LINE: - pt1: [ 131.0000 ; 42.0000 ] - pt2: [ 131.0000 ; 51.5000 ] + pt1: [ 131.0000 ; 40.0000 ] + pt2: [ 131.0000 ; 49.5000 ] stroke: 0.0-0.0-1.5 shadow: 0 color: ff181818 LINE: - pt1: [ 131.0000 ; 51.5000 ] - pt2: [ 139.0000 ; 51.5000 ] + pt1: [ 131.0000 ; 49.5000 ] + pt2: [ 139.0000 ; 49.5000 ] stroke: 0.0-0.0-1.5 shadow: 0 color: ff181818 POLYGON: points: - - [ 135.0000 ; 47.5000 ] - - [ 135.0000 ; 51.5000 ] - - [ 135.0000 ; 55.5000 ] - - [ 139.0000 ; 51.5000 ] + - [ 135.0000 ; 45.5000 ] + - [ 135.0000 ; 49.5000 ] + - [ 135.0000 ; 53.5000 ] + - [ 139.0000 ; 49.5000 ] stroke: 0.0-0.0-1.5 shadow: 0 color: ff181818 backcolor: ff181818 RECTANGLE: - pt1: [ 2.0000 ; 31.0000 ] - pt2: [ 9.0000 ; 42.0000 ] + pt1: [ 2.0000 ; 29.0000 ] + pt2: [ 9.0000 ; 40.0000 ] xCorner: 0 yCorner: 0 stroke: 0.0-0.0-1.0 @@ -263,29 +263,29 @@ RECTANGLE: backcolor: ffe6e6fa LINE: - pt1: [ 2.0000 ; 31.0000 ] - pt2: [ 7.0000 ; 31.0000 ] + pt1: [ 2.0000 ; 29.0000 ] + pt2: [ 7.0000 ; 29.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffadd8e6 LINE: - pt1: [ 2.0000 ; 42.0000 ] - pt2: [ 7.0000 ; 42.0000 ] + pt1: [ 2.0000 ; 40.0000 ] + pt2: [ 7.0000 ; 40.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffadd8e6 LINE: - pt1: [ 2.0000 ; 31.0000 ] - pt2: [ 2.0000 ; 42.0000 ] + pt1: [ 2.0000 ; 29.0000 ] + pt2: [ 2.0000 ; 40.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffadd8e6 RECTANGLE: - pt1: [ 16.0000 ; 31.0000 ] - pt2: [ 37.0000 ; 42.0000 ] + pt1: [ 16.0000 ; 29.0000 ] + pt2: [ 37.0000 ; 40.0000 ] xCorner: 0 yCorner: 0 stroke: 0.0-0.0-1.0 @@ -294,22 +294,22 @@ RECTANGLE: backcolor: ffe6e6fa LINE: - pt1: [ 17.0000 ; 31.0000 ] - pt2: [ 36.0000 ; 31.0000 ] + pt1: [ 17.0000 ; 29.0000 ] + pt2: [ 36.0000 ; 29.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffadd8e6 LINE: - pt1: [ 17.0000 ; 42.0000 ] - pt2: [ 36.0000 ; 42.0000 ] + pt1: [ 17.0000 ; 40.0000 ] + pt2: [ 36.0000 ; 40.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffadd8e6 RECTANGLE: - pt1: [ 44.0000 ; 31.0000 ] - pt2: [ 65.0000 ; 42.0000 ] + pt1: [ 44.0000 ; 29.0000 ] + pt2: [ 65.0000 ; 40.0000 ] xCorner: 0 yCorner: 0 stroke: 0.0-0.0-1.0 @@ -318,22 +318,22 @@ RECTANGLE: backcolor: ffe6e6fa LINE: - pt1: [ 45.0000 ; 31.0000 ] - pt2: [ 64.0000 ; 31.0000 ] + pt1: [ 45.0000 ; 29.0000 ] + pt2: [ 64.0000 ; 29.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffadd8e6 LINE: - pt1: [ 45.0000 ; 42.0000 ] - pt2: [ 64.0000 ; 42.0000 ] + pt1: [ 45.0000 ; 40.0000 ] + pt2: [ 64.0000 ; 40.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffadd8e6 RECTANGLE: - pt1: [ 72.0000 ; 31.0000 ] - pt2: [ 93.0000 ; 42.0000 ] + pt1: [ 72.0000 ; 29.0000 ] + pt2: [ 93.0000 ; 40.0000 ] xCorner: 0 yCorner: 0 stroke: 0.0-0.0-1.0 @@ -342,22 +342,22 @@ RECTANGLE: backcolor: ffe6e6fa LINE: - pt1: [ 73.0000 ; 31.0000 ] - pt2: [ 92.0000 ; 31.0000 ] + pt1: [ 73.0000 ; 29.0000 ] + pt2: [ 92.0000 ; 29.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffadd8e6 LINE: - pt1: [ 73.0000 ; 42.0000 ] - pt2: [ 92.0000 ; 42.0000 ] + pt1: [ 73.0000 ; 40.0000 ] + pt2: [ 92.0000 ; 40.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffadd8e6 RECTANGLE: - pt1: [ 100.0000 ; 31.0000 ] - pt2: [ 121.0000 ; 42.0000 ] + pt1: [ 100.0000 ; 29.0000 ] + pt2: [ 121.0000 ; 40.0000 ] xCorner: 0 yCorner: 0 stroke: 0.0-0.0-1.0 @@ -366,22 +366,22 @@ RECTANGLE: backcolor: ffe6e6fa LINE: - pt1: [ 101.0000 ; 31.0000 ] - pt2: [ 120.0000 ; 31.0000 ] + pt1: [ 101.0000 ; 29.0000 ] + pt2: [ 120.0000 ; 29.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffadd8e6 LINE: - pt1: [ 101.0000 ; 42.0000 ] - pt2: [ 120.0000 ; 42.0000 ] + pt1: [ 101.0000 ; 40.0000 ] + pt2: [ 120.0000 ; 40.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffadd8e6 RECTANGLE: - pt1: [ 128.0000 ; 31.0000 ] - pt2: [ 138.0000 ; 42.0000 ] + pt1: [ 128.0000 ; 29.0000 ] + pt2: [ 138.0000 ; 40.0000 ] xCorner: 0 yCorner: 0 stroke: 0.0-0.0-1.0 @@ -390,99 +390,99 @@ RECTANGLE: backcolor: ffe6e6fa LINE: - pt1: [ 129.0000 ; 31.0000 ] - pt2: [ 138.0000 ; 31.0000 ] + pt1: [ 129.0000 ; 29.0000 ] + pt2: [ 138.0000 ; 29.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffadd8e6 LINE: - pt1: [ 129.0000 ; 42.0000 ] - pt2: [ 138.0000 ; 42.0000 ] + pt1: [ 129.0000 ; 40.0000 ] + pt2: [ 138.0000 ; 40.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffadd8e6 LINE: - pt1: [ 138.0000 ; 31.0000 ] - pt2: [ 138.0000 ; 42.0000 ] + pt1: [ 138.0000 ; 29.0000 ] + pt2: [ 138.0000 ; 40.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffadd8e6 LINE: - pt1: [ 11.0000 ; 31.0000 ] - pt2: [ 13.0000 ; 31.0000 ] + pt1: [ 11.0000 ; 29.0000 ] + pt2: [ 13.0000 ; 29.0000 ] stroke: 2.0-3.0-1.0 shadow: 0 color: ffadd8e6 LINE: - pt1: [ 11.0000 ; 42.0000 ] - pt2: [ 13.0000 ; 42.0000 ] + pt1: [ 11.0000 ; 40.0000 ] + pt2: [ 13.0000 ; 40.0000 ] stroke: 2.0-3.0-1.0 shadow: 0 color: ffadd8e6 LINE: - pt1: [ 39.0000 ; 31.0000 ] - pt2: [ 41.0000 ; 31.0000 ] + pt1: [ 39.0000 ; 29.0000 ] + pt2: [ 41.0000 ; 29.0000 ] stroke: 2.0-3.0-1.0 shadow: 0 color: ffadd8e6 LINE: - pt1: [ 39.0000 ; 42.0000 ] - pt2: [ 41.0000 ; 42.0000 ] + pt1: [ 39.0000 ; 40.0000 ] + pt2: [ 41.0000 ; 40.0000 ] stroke: 2.0-3.0-1.0 shadow: 0 color: ffadd8e6 LINE: - pt1: [ 67.0000 ; 31.0000 ] - pt2: [ 69.0000 ; 31.0000 ] + pt1: [ 67.0000 ; 29.0000 ] + pt2: [ 69.0000 ; 29.0000 ] stroke: 2.0-3.0-1.0 shadow: 0 color: ffadd8e6 LINE: - pt1: [ 67.0000 ; 42.0000 ] - pt2: [ 69.0000 ; 42.0000 ] + pt1: [ 67.0000 ; 40.0000 ] + pt2: [ 69.0000 ; 40.0000 ] stroke: 2.0-3.0-1.0 shadow: 0 color: ffadd8e6 LINE: - pt1: [ 95.0000 ; 31.0000 ] - pt2: [ 97.0000 ; 31.0000 ] + pt1: [ 95.0000 ; 29.0000 ] + pt2: [ 97.0000 ; 29.0000 ] stroke: 2.0-3.0-1.0 shadow: 0 color: ffadd8e6 LINE: - pt1: [ 95.0000 ; 42.0000 ] - pt2: [ 97.0000 ; 42.0000 ] + pt1: [ 95.0000 ; 40.0000 ] + pt2: [ 97.0000 ; 40.0000 ] stroke: 2.0-3.0-1.0 shadow: 0 color: ffadd8e6 LINE: - pt1: [ 123.0000 ; 31.0000 ] - pt2: [ 125.0000 ; 31.0000 ] + pt1: [ 123.0000 ; 29.0000 ] + pt2: [ 125.0000 ; 29.0000 ] stroke: 2.0-3.0-1.0 shadow: 0 color: ffadd8e6 LINE: - pt1: [ 123.0000 ; 42.0000 ] - pt2: [ 125.0000 ; 42.0000 ] + pt1: [ 123.0000 ; 40.0000 ] + pt2: [ 125.0000 ; 40.0000 ] stroke: 2.0-3.0-1.0 shadow: 0 color: ffadd8e6 RECTANGLE: - pt1: [ 142.0000 ; 46.0000 ] - pt2: [ 149.0000 ; 57.0000 ] + pt1: [ 142.0000 ; 44.0000 ] + pt2: [ 149.0000 ; 55.0000 ] xCorner: 0 yCorner: 0 stroke: 0.0-0.0-1.0 @@ -491,29 +491,29 @@ RECTANGLE: backcolor: ffe2e2f0 LINE: - pt1: [ 142.0000 ; 46.0000 ] - pt2: [ 147.0000 ; 46.0000 ] + pt1: [ 142.0000 ; 44.0000 ] + pt2: [ 147.0000 ; 44.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ff181818 LINE: - pt1: [ 142.0000 ; 57.0000 ] - pt2: [ 147.0000 ; 57.0000 ] + pt1: [ 142.0000 ; 55.0000 ] + pt2: [ 147.0000 ; 55.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ff181818 LINE: - pt1: [ 142.0000 ; 46.0000 ] - pt2: [ 142.0000 ; 57.0000 ] + pt1: [ 142.0000 ; 44.0000 ] + pt2: [ 142.0000 ; 55.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ff181818 RECTANGLE: - pt1: [ 156.0000 ; 46.0000 ] - pt2: [ 166.0000 ; 57.0000 ] + pt1: [ 156.0000 ; 44.0000 ] + pt2: [ 166.0000 ; 55.0000 ] xCorner: 0 yCorner: 0 stroke: 0.0-0.0-1.0 @@ -522,43 +522,43 @@ RECTANGLE: backcolor: ffe2e2f0 LINE: - pt1: [ 157.0000 ; 46.0000 ] - pt2: [ 166.0000 ; 46.0000 ] + pt1: [ 157.0000 ; 44.0000 ] + pt2: [ 166.0000 ; 44.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ff181818 LINE: - pt1: [ 157.0000 ; 57.0000 ] - pt2: [ 166.0000 ; 57.0000 ] + pt1: [ 157.0000 ; 55.0000 ] + pt2: [ 166.0000 ; 55.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ff181818 LINE: - pt1: [ 166.0000 ; 46.0000 ] - pt2: [ 166.0000 ; 57.0000 ] + pt1: [ 166.0000 ; 44.0000 ] + pt2: [ 166.0000 ; 55.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ff181818 LINE: - pt1: [ 151.0000 ; 46.0000 ] - pt2: [ 153.0000 ; 46.0000 ] + pt1: [ 151.0000 ; 44.0000 ] + pt2: [ 153.0000 ; 44.0000 ] stroke: 2.0-3.0-1.0 shadow: 0 color: ff181818 LINE: - pt1: [ 151.0000 ; 57.0000 ] - pt2: [ 153.0000 ; 57.0000 ] + pt1: [ 151.0000 ; 55.0000 ] + pt2: [ 153.0000 ; 55.0000 ] stroke: 2.0-3.0-1.0 shadow: 0 color: ff181818 TEXT: text: Prototype design - position: [ 142.0000 ; 39.5556 ] + position: [ 142.0000 ; 37.5556 ] orientation: 0 font: SansSerif.plain/11 [] color: ff000000 @@ -566,59 +566,59 @@ TEXT: TEXT: text: Testing - position: [ 170.0000 ; 54.5556 ] + position: [ 170.0000 ; 52.5556 ] orientation: 0 font: SansSerif.plain/11 [] color: ff000000 extendedColor: NULL_COLOR LINE: - pt1: [ 0.0000 ; 59.0000 ] - pt2: [ 168.0000 ; 59.0000 ] + pt1: [ 0.0000 ; 57.0000 ] + pt2: [ 168.0000 ; 57.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffc0c0c0 LINE: - pt1: [ 0.0000 ; 59.0000 ] - pt2: [ 0.0000 ; 75.0000 ] + pt1: [ 0.0000 ; 57.0000 ] + pt2: [ 0.0000 ; 73.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffc0c0c0 LINE: - pt1: [ 68.0000 ; 59.0000 ] - pt2: [ 68.0000 ; 75.0000 ] + pt1: [ 68.0000 ; 57.0000 ] + pt2: [ 68.0000 ; 73.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffc0c0c0 TEXT: text: Oct - position: [ 17.4989 ; 68.3333 ] + position: [ 17.4989 ; 66.3333 ] orientation: 0 - font: Serif.bold/12 [BOLD] + font: SansSerif.bold/12 [BOLD] color: ff000000 extendedColor: NULL_COLOR LINE: - pt1: [ 168.0000 ; 59.0000 ] - pt2: [ 168.0000 ; 75.0000 ] + pt1: [ 168.0000 ; 57.0000 ] + pt2: [ 168.0000 ; 73.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffc0c0c0 TEXT: text: Nov 2020 - position: [ 72.7816 ; 68.3333 ] + position: [ 72.7816 ; 66.3333 ] orientation: 0 - font: Serif.bold/12 [BOLD] + font: SansSerif.bold/12 [BOLD] color: ff000000 extendedColor: NULL_COLOR LINE: - pt1: [ 0.0000 ; 75.0000 ] - pt2: [ 168.0000 ; 75.0000 ] + pt1: [ 0.0000 ; 73.0000 ] + pt2: [ 168.0000 ; 73.0000 ] stroke: 0.0-0.0-1.0 shadow: 0 color: ffc0c0c0 From a570cea56f2bc6c2cec1764d2c4d9b025f4d5be8 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Mon, 27 Nov 2023 20:02:54 +0000 Subject: [PATCH 21/95] feat: Allow JSON Array on JSON preproc. (affectation on plantuml variable, on foreach, ...) --- src/net/sourceforge/plantuml/tim/Eater.java | 7 +- .../plantuml/tim/VariableManager.java | 3 +- .../sourceforge/plantuml/tim/EaterTest.java | 64 +++++++++++++++++++ 3 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 test/net/sourceforge/plantuml/tim/EaterTest.java diff --git a/src/net/sourceforge/plantuml/tim/Eater.java b/src/net/sourceforge/plantuml/tim/Eater.java index 6e97e651f..9d1ca8ff7 100644 --- a/src/net/sourceforge/plantuml/tim/Eater.java +++ b/src/net/sourceforge/plantuml/tim/Eater.java @@ -79,11 +79,12 @@ public abstract class Eater { } final public TValue eatExpression(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { - if (peekChar() == '{') { + char ch = peekChar(); + if (ch == '{' || ch == '[') { final String data = eatAllToEnd(); - // System.err.println("data=" + data); + // System.err.println("data=" + data); final JsonValue json = Json.parse(data); - // System.err.println("json=" + json); + // System.err.println("json=" + json); return TValue.fromJson(json); } final TokenStack tokenStack = eatTokenStack(); diff --git a/src/net/sourceforge/plantuml/tim/VariableManager.java b/src/net/sourceforge/plantuml/tim/VariableManager.java index ae29bba05..8f3a7bd00 100644 --- a/src/net/sourceforge/plantuml/tim/VariableManager.java +++ b/src/net/sourceforge/plantuml/tim/VariableManager.java @@ -66,7 +66,8 @@ public class VariableManager { } else if (value.toJson().isNumber()) { result.append(value.toJson().toString()); } else { - JsonValue jsonValue = (JsonObject) value.toJson(); + JsonValue jsonValue = (value.toJson().isArray()) ? (JsonArray) value.toJson() + : (JsonObject) value.toJson(); i++; i = replaceJson(jsonValue, str, i, result) - 1; } diff --git a/test/net/sourceforge/plantuml/tim/EaterTest.java b/test/net/sourceforge/plantuml/tim/EaterTest.java new file mode 100644 index 000000000..3dbdbe57f --- /dev/null +++ b/test/net/sourceforge/plantuml/tim/EaterTest.java @@ -0,0 +1,64 @@ +package net.sourceforge.plantuml.tim; + +import static java.nio.charset.StandardCharsets.UTF_8; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.util.Lists.newArrayList; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import java.util.Collections; +import java.util.List; + +import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; +import org.junit.jupiter.api.IndicativeSentencesGeneration; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.CsvSource; + +import net.sourceforge.plantuml.ErrorStatus; +import net.sourceforge.plantuml.Option; +import net.sourceforge.plantuml.Pipe; + +@IndicativeSentencesGeneration(separator = ": ", generator = ReplaceUnderscores.class) +/** + * Tests the Eater (for JSON data). + */ +class EaterTest { + + @ParameterizedTest(name = "[{index}] {1}") + @CsvSource(nullValues = "null", value = { + "'@startuml\n!$a={\"k\": \"exampleValue\"}\ntitle $a.k\na -> b\n@enduml\n' , exampleValue", + "'@startuml\n!$a=[1, 2, 3]\ntitle xx $a[2] yy\na -> a\n' , xx 3 yy", + "'@startuml\ntitle\n!foreach $i in [1, 2, 3]\nxx $i yy\n!endfor\nendtitle\na -> a\n' , xx 2 yy", + "'@startuml\ntitle\n!foreach $i in [\"a\", \"b\", \"c\"]\nxx $i yy\n!endfor\nendtitle\na -> a\n' , xx b yy", + }) + void Test_EaterTest(String input, String expected) throws Exception { + assertRenderExpectedOutput(input, expected); + } + + // TODO: to Factorize on a specific test package... + private static final String[] COMMON_OPTIONS = {"-tutxt"}; + + private String[] optionArray(String... extraOptions) { + final List list = newArrayList(COMMON_OPTIONS); + Collections.addAll(list, extraOptions); + return list.toArray(new String[0]); + } + + private String render(String diagram, String... extraOptions) throws Exception { + final Option option = new Option(optionArray(extraOptions)); + final ByteArrayInputStream bais = new ByteArrayInputStream(diagram.getBytes(UTF_8)); + final ByteArrayOutputStream baos = new ByteArrayOutputStream(); + final Pipe pipe = new Pipe(option, new PrintStream(baos), bais, option.getCharset()); + pipe.managePipe(ErrorStatus.init()); + String rendered = new String(baos.toByteArray(), UTF_8); + // System.err.println(rendered); + return rendered; + } + + public void assertRenderExpectedOutput(String input, String expected) throws Exception { + String rendered = render(input); + assertThat(rendered).doesNotContain("syntax").contains(expected); + } +} From a7d434cff18ffc514376bb8f2c327faab930651d Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Mon, 27 Nov 2023 20:06:09 +0000 Subject: [PATCH 22/95] fix: comment indent --- src/net/sourceforge/plantuml/tim/Eater.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net/sourceforge/plantuml/tim/Eater.java b/src/net/sourceforge/plantuml/tim/Eater.java index 9d1ca8ff7..a4b74b118 100644 --- a/src/net/sourceforge/plantuml/tim/Eater.java +++ b/src/net/sourceforge/plantuml/tim/Eater.java @@ -82,9 +82,9 @@ public abstract class Eater { char ch = peekChar(); if (ch == '{' || ch == '[') { final String data = eatAllToEnd(); - // System.err.println("data=" + data); + // System.err.println("data=" + data); final JsonValue json = Json.parse(data); - // System.err.println("json=" + json); + // System.err.println("json=" + json); return TValue.fromJson(json); } final TokenStack tokenStack = eatTokenStack(); From b29df7758a3f50f687d86b6ab9ae908ff8a45efc Mon Sep 17 00:00:00 2001 From: "jef.overweg" Date: Wed, 29 Nov 2023 16:28:01 +0100 Subject: [PATCH 23/95] Feat: Adding SUPPORT.md file --- docs/SUPPORT.md | 58 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 docs/SUPPORT.md diff --git a/docs/SUPPORT.md b/docs/SUPPORT.md new file mode 100644 index 000000000..555a79f16 --- /dev/null +++ b/docs/SUPPORT.md @@ -0,0 +1,58 @@ +# 🌱 PlantUML Support + +Thank you for using PlantUML! If you need assistance or have questions, please refer to the following resources: + +## Where to Get Support + +### GitHub Issues + +- For reporting bugs or issues, open an [issue on GitHub](https://github.com/plantuml/plantuml/issues). + - When submitting an issue, provide clear steps to reproduce the problem and include your PlantUML version. +- Before creating a new issue, search the existing ones on [GitHub](https://github.com/plantuml/plantuml/issues) to see if your problem has already been addressed. + +### Community Forum + +- Visit our [Community Forum](https://forum.plantuml.net/) for discussions, FAQs, and community support. +- Check for existing threads to see if your question has already been answered. + +### Discord + +- Feel free to ask questions on our official [Discord](https://discord.com/invite/sXhzexAQGh) server. + +## Asking Questions + +If you have a question about using PlantUML: + +- Search through the [official documentation](https://plantuml.com/) and available resources before asking. +- Feel free to ask questions on the GitHub issues or the Community Forum after performing initial research. +- Provide as much detail as possible when asking questions to receive effective assistance. + +## Contributing + +We welcome contributions to PlantUML! If you're interested in contributing: + +### Reporting Bugs + +- Ensure you're using the latest version and search for existing issues on GitHub or the Community Forum before reporting a bug. +- Submit a bug report on [GitHub](https://github.com/plantuml/plantuml/issues) with clear steps to reproduce and your environment details. + +### Suggesting Enhancements + +- Search existing enhancement suggestions on GitHub or the Community Forum before submitting a new one. +- Submit your enhancement suggestion with a clear title and detailed description on [GitHub](https://github.com/plantuml/plantuml/issues). + +### Your First Code Contribution + +- Review our [contributing guide](CONTRIBUTING.md) to get started with code contributions. +- If you're new to contributing, consider tackling issues labeled as 'good first issue' or 'help wanted'. + +## Additional Resources + +- For comprehensive documentation, refer to the [official PlantUML Javadoc](https://plantuml.github.io/plantuml/). +- Explore the [GitHub issues](https://github.com/plantuml/plantuml/issues/) for discussions and known problems. + +## 🧑‍🤝‍🧑 Community Support + +Feel free to engage with the PlantUML community on GitHub and the Community Forum. + +Thank you for being a part of the PlantUML community! From 35505fd24cd891581d284309421cdc71114c5ddb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 30 Nov 2023 02:17:43 +0000 Subject: [PATCH 24/95] chore(deps): bump actions/setup-java from 3 to 4 Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3 to 4. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-java dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1bc3effb2..ec444f245 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,7 +99,7 @@ jobs: - name: Set up java if: needs.workflow_config.outputs.do_test_linux == 'true' - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: ${{ matrix.java_version }} distribution: temurin @@ -132,7 +132,7 @@ jobs: - name: Checkout the repository uses: actions/checkout@v4 - name: Set up java - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: 17 distribution: temurin @@ -195,7 +195,7 @@ jobs: uses: actions/checkout@v4 - name: Set up java - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: 17 distribution: temurin @@ -221,7 +221,7 @@ jobs: uses: actions/checkout@v4 - name: Set up java - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: 17 distribution: temurin From 1899280e21d6f7ea05e47d670b5789a8ec4b10d4 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Sun, 3 Dec 2023 10:48:30 +0100 Subject: [PATCH 25/95] fix: minor fix `final` variable definition --- src/net/sourceforge/plantuml/tim/Eater.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net/sourceforge/plantuml/tim/Eater.java b/src/net/sourceforge/plantuml/tim/Eater.java index a4b74b118..c23fbf085 100644 --- a/src/net/sourceforge/plantuml/tim/Eater.java +++ b/src/net/sourceforge/plantuml/tim/Eater.java @@ -79,7 +79,7 @@ public abstract class Eater { } final public TValue eatExpression(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { - char ch = peekChar(); + final char ch = peekChar(); if (ch == '{' || ch == '[') { final String data = eatAllToEnd(); // System.err.println("data=" + data); From 7b1f67a57e0d6a7baa40fb1b080b821e0620442c Mon Sep 17 00:00:00 2001 From: "Daum Alexander (DCL ATV SC D RAD CSFW FW)" Date: Mon, 4 Dec 2023 10:53:01 +0100 Subject: [PATCH 26/95] test: Use XMLUnit to compare XMI The XMLUnit DiffBuilder used can ignore element order, but still checks for correct nesting, which the string sorting could not. --- build.gradle.kts | 1 + plantuml-asl/build.gradle.kts | 1 + plantuml-epl/build.gradle.kts | 1 + plantuml-gplv2/build.gradle.kts | 1 + plantuml-lgpl/build.gradle.kts | 1 + plantuml-mit/build.gradle.kts | 1 + test/nonreg/xmi/XmiTest.java | 50 +++++++++++++-------------------- 7 files changed, 26 insertions(+), 30 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 72fb2d760..6aa48b2dd 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -33,6 +33,7 @@ dependencies { testImplementation("io.github.glytching:junit-extensions:2.6.0") testImplementation("org.assertj:assertj-core:3.24.2") testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") + testImplementation("org.xmlunit:xmlunit-core:2.9.+") if (JavaVersion.current().isJava8) { testImplementation("org.mockito:mockito-core:4.+") testImplementation("org.mockito:mockito-junit-jupiter:4.+") diff --git a/plantuml-asl/build.gradle.kts b/plantuml-asl/build.gradle.kts index 79ebca686..b27324b28 100644 --- a/plantuml-asl/build.gradle.kts +++ b/plantuml-asl/build.gradle.kts @@ -28,6 +28,7 @@ dependencies { testImplementation("org.assertj:assertj-core:3.24.2") testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") testImplementation("org.scilab.forge:jlatexmath:1.0.7") + testImplementation("org.xmlunit:xmlunit-core:2.9.+") } repositories { diff --git a/plantuml-epl/build.gradle.kts b/plantuml-epl/build.gradle.kts index 0c94e1a85..5d0683378 100644 --- a/plantuml-epl/build.gradle.kts +++ b/plantuml-epl/build.gradle.kts @@ -28,6 +28,7 @@ dependencies { testImplementation("org.assertj:assertj-core:3.24.2") testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") testImplementation("org.scilab.forge:jlatexmath:1.0.7") + testImplementation("org.xmlunit:xmlunit-core:2.9.+") } repositories { diff --git a/plantuml-gplv2/build.gradle.kts b/plantuml-gplv2/build.gradle.kts index 740d97e91..e5903f8ba 100644 --- a/plantuml-gplv2/build.gradle.kts +++ b/plantuml-gplv2/build.gradle.kts @@ -28,6 +28,7 @@ dependencies { testImplementation("org.assertj:assertj-core:3.24.2") testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") testImplementation("org.scilab.forge:jlatexmath:1.0.7") + testImplementation("org.xmlunit:xmlunit-core:2.9.+") } repositories { diff --git a/plantuml-lgpl/build.gradle.kts b/plantuml-lgpl/build.gradle.kts index f110030e0..5f6ebfd67 100644 --- a/plantuml-lgpl/build.gradle.kts +++ b/plantuml-lgpl/build.gradle.kts @@ -28,6 +28,7 @@ dependencies { testImplementation("org.assertj:assertj-core:3.24.2") testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") testImplementation("org.scilab.forge:jlatexmath:1.0.7") + testImplementation("org.xmlunit:xmlunit-core:2.9.+") } repositories { diff --git a/plantuml-mit/build.gradle.kts b/plantuml-mit/build.gradle.kts index 995be47c3..4d3655bfa 100644 --- a/plantuml-mit/build.gradle.kts +++ b/plantuml-mit/build.gradle.kts @@ -28,6 +28,7 @@ dependencies { testImplementation("org.assertj:assertj-core:3.24.2") testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") testImplementation("org.scilab.forge:jlatexmath:1.0.7") + testImplementation("org.xmlunit:xmlunit-core:2.9.+") } repositories { diff --git a/test/nonreg/xmi/XmiTest.java b/test/nonreg/xmi/XmiTest.java index db85e694d..760a2ae6a 100644 --- a/test/nonreg/xmi/XmiTest.java +++ b/test/nonreg/xmi/XmiTest.java @@ -12,9 +12,12 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.Collection; import java.util.List; -import java.util.Map; -import java.util.TreeMap; -import java.util.concurrent.atomic.AtomicInteger; + +import org.xmlunit.builder.DiffBuilder; +import org.xmlunit.builder.Input; +import org.xmlunit.diff.DefaultNodeMatcher; +import org.xmlunit.diff.Diff; +import org.xmlunit.diff.ElementSelectors; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormatOption; @@ -30,44 +33,31 @@ public class XmiTest { final String star = removeVersion(runPlantUML(expectedDescription, FileFormat.XMI_STAR)); final String starExpected = readStringFromSourceFile(getDiagramFile(), "{{{star", "}}}star"); - // This is really a hack. Since XML generation does not guarantee the order of - // attributes, we make an easy to do check by sorting characters. - // Of course, this is really incomplete: a faulty String may match the expected - // result if, for example, an attribute is moved from a node to another. - // However, we consider that it is a good start. - if (sortString(star).equals(sortString(starExpected)) == false) { - assertEquals(starExpected, star, "XmiStar: Generated GraphML is not ok"); - } + assertXMIEqual(star, starExpected); final String argo = removeVersion(runPlantUML(expectedDescription, FileFormat.XMI_ARGO)); final String argoExpected = readStringFromSourceFile(getDiagramFile(), "{{{argo", "}}}argo"); - if (sortString(argo).equals(sortString(argoExpected)) == false) { - assertEquals(argoExpected, argo, "XmiArgo: Generated GraphML is not ok"); - } + assertXMIEqual(argo, argoExpected); + } + private void assertXMIEqual(final String actual, final String expected) { + // XMI is XML, so we can just use the xmlunit diffbuilder + // Compare elements with the same xmi ID + // checkForSimilar required to ignore order + Diff diff = DiffBuilder.compare(Input.fromString(actual)).withTest(Input.fromString(expected)) + .ignoreWhitespace().ignoreComments().checkForSimilar() + .withNodeMatcher(new DefaultNodeMatcher(ElementSelectors.byNameAndAttributes("xmi.id"))).build(); + + if (diff.hasDifferences()) { + assertTrue(false, diff.fullDescription()); + } } private String removeVersion(String xmi) { return xmi.replaceFirst("\\.*\\", ""); } - private String sortString(String s) { - final Map map = new TreeMap<>(); - for (int i = 0; i < s.length(); i++) { - final char ch = s.charAt(i); - // We ignore non writable characters - if (ch <= ' ') - continue; - - AtomicInteger count = map.get(ch); - if (count == null) - map.put(ch, new AtomicInteger(1)); - else - count.addAndGet(1); - } - return map.toString(); - } private String getLocalFolder() { return "test/" + getPackageName().replace(".", "/"); From de5d791eb42563595065c9283d8b12f1da2dda08 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Mon, 4 Dec 2023 13:23:17 +0000 Subject: [PATCH 27/95] docs: improve `@deprecated` description --- src/net/sourceforge/plantuml/Option.java | 3 +++ .../sourceforge/plantuml/SourceStringReader.java | 15 +++++++++++++++ src/net/sourceforge/plantuml/core/UmlSource.java | 5 ++++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/net/sourceforge/plantuml/Option.java b/src/net/sourceforge/plantuml/Option.java index 2f1db45a0..31ad4bc7b 100644 --- a/src/net/sourceforge/plantuml/Option.java +++ b/src/net/sourceforge/plantuml/Option.java @@ -112,6 +112,9 @@ public class Option { private FileFormatOption fileFormatOption = new FileFormatOption(FileFormat.PNG); + /** + * @deprecated Use {@link #setFileFormatOption(FileFormatOption)} instead + */ @Deprecated @ApiWarning(willBeRemoved = "in next major release") final public void setFileFormat(FileFormat fileFormat) { diff --git a/src/net/sourceforge/plantuml/SourceStringReader.java b/src/net/sourceforge/plantuml/SourceStringReader.java index 32e7f5ace..e73c1f577 100644 --- a/src/net/sourceforge/plantuml/SourceStringReader.java +++ b/src/net/sourceforge/plantuml/SourceStringReader.java @@ -106,6 +106,9 @@ public class SourceStringReader { } } + /** + * @deprecated Use {@link #outputImage(OutputStream)} instead + */ @Deprecated public String generateImage(OutputStream os) throws IOException { return outputImage(os).getDescription(); @@ -116,6 +119,9 @@ public class SourceStringReader { } // ::comment when __CORE__ + /** + * @deprecated Use {@link #outputImage(SFile)} instead + */ @Deprecated public String generateImage(SFile f) throws IOException { return outputImage(f).getDescription(); @@ -128,6 +134,9 @@ public class SourceStringReader { } // ::done + /** + * @deprecated Use {@link #outputImage(OutputStream, FileFormatOption)} instead + */ @Deprecated public String generateImage(OutputStream os, FileFormatOption fileFormatOption) throws IOException { return outputImage(os, fileFormatOption).getDescription(); @@ -137,6 +146,9 @@ public class SourceStringReader { return outputImage(os, 0, fileFormatOption); } + /** + * @deprecated Use {@link #outputImage(OutputStream, int)} instead + */ @Deprecated public String generateImage(OutputStream os, int numImage) throws IOException { return outputImage(os, numImage).getDescription(); @@ -146,6 +158,9 @@ public class SourceStringReader { return outputImage(os, numImage, new FileFormatOption(FileFormat.PNG)); } + /** + * @deprecated Use {@link #outputImage(OutputStream, int, FileFormatOption)} instead + */ @Deprecated public String generateImage(OutputStream os, int numImage, FileFormatOption fileFormatOption) throws IOException { return outputImage(os, numImage, fileFormatOption).getDescription(); diff --git a/src/net/sourceforge/plantuml/core/UmlSource.java b/src/net/sourceforge/plantuml/core/UmlSource.java index 97b5ccc7b..0dacdc5ef 100755 --- a/src/net/sourceforge/plantuml/core/UmlSource.java +++ b/src/net/sourceforge/plantuml/core/UmlSource.java @@ -158,7 +158,10 @@ final public class UmlSource { // return Collections.unmodifiableCollection(rawSource).iterator(); // } - + /** + * @deprecated Use {@link #getPlainString(String)} instead, + * like getPlainString("\n") + */ @Deprecated() public String getPlainString() { return getPlainString("\n"); From cb5b881e46403237d8891c7939fd86a7c931ec26 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 02:46:52 +0000 Subject: [PATCH 28/95] chore(deps): bump actions/labeler from 4 to 5 Bumps [actions/labeler](https://github.com/actions/labeler) from 4 to 5. - [Release notes](https://github.com/actions/labeler/releases) - [Commits](https://github.com/actions/labeler/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/labeler dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/labeler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 07b21837d..2a340279e 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -9,4 +9,4 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: actions/labeler@v4 + - uses: actions/labeler@v5 From 1cb61d56099d3fddd5f0ea33812160fb939b576d Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Fri, 8 Dec 2023 21:08:36 +0000 Subject: [PATCH 29/95] fix: allow different type inside array for `GetJsonKey` builtin fct --- src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java | 8 +++++--- .../sourceforge/plantuml/tim/stdlib/GetJsonKeyTest.java | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java b/src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java index 77824aabc..4df4bf5b5 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java @@ -76,9 +76,11 @@ public class GetJsonKey extends SimpleReturnFunction { final JsonArray array = (JsonArray) json; final JsonArray result = new JsonArray(); for (JsonValue tmp : array) { - final JsonObject object = (JsonObject) tmp; - for (String key : object.names()) - result.add(key); + if (tmp.isObject()) { + final JsonObject object = (JsonObject) tmp; + for (String key : object.names()) + result.add(key); + } } return TValue.fromJson(result); } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/GetJsonKeyTest.java b/test/net/sourceforge/plantuml/tim/stdlib/GetJsonKeyTest.java index c9985befd..c84f32bd8 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/GetJsonKeyTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/GetJsonKeyTest.java @@ -61,11 +61,11 @@ class GetJsonKeyTest { " '{\"a\":\"abc\"}' , [\"a\"]", " '[{\"a\":[1, 2]}, {\"b\":[3, 4]}]' , '[\"a\",\"b\"]'", " '{\"a\":[1, 2], \"b\":\"abc\", \"b\":true}' , '[\"a\",\"b\",\"b\"]'", - // TODO: Manage Array with different type inside + // DONE: Manage Array with different type inside // Ref.: // - https://datatracker.ietf.org/doc/html/rfc8259#section-5 // - https://json-schema.org/understanding-json-schema/reference/array.html - //" '[3, \"different\", { \"types\" : \"of values\" }]', [\"types\"]", + " '[3, \"different\", { \"types\" : \"of values\" }]', [\"types\"]", }) void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterException, EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); From 3f836a44ccc507713b4cfcc87149e5853e02185a Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Fri, 8 Dec 2023 21:20:22 +0000 Subject: [PATCH 30/95] fix: allow (`int` corresponding of) unicode value for `Chr` builtin fct That fixes partialy #1571. --- src/net/sourceforge/plantuml/tim/stdlib/Chr.java | 4 ++-- test/net/sourceforge/plantuml/tim/stdlib/ChrTest.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Chr.java b/src/net/sourceforge/plantuml/tim/stdlib/Chr.java index 622230500..7fdc13f2b 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Chr.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Chr.java @@ -59,8 +59,8 @@ public class Chr extends SimpleReturnFunction { public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { try { - final char value = (char) values.get(0).toInt(); - return TValue.fromString("" + value); + final String value = String.valueOf(Character.toChars(values.get(0).toInt())); + return TValue.fromString(value); } catch (Throwable t) { return TValue.fromString("\0"); } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/ChrTest.java b/test/net/sourceforge/plantuml/tim/stdlib/ChrTest.java index cf3886aaa..97eb1ece3 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/ChrTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/ChrTest.java @@ -32,9 +32,9 @@ class ChrTest { " 34 , '\"' ", " 224 , à ", " 233 , é ", -// TODO: fix `%chr` to allow Unicode chars, the corresponding tests are here: -// " 128512 , 😀 ", -// " 128512 , \uD83D\uDE00 ", +// DONE: fix `%chr` to allow Unicode chars, the corresponding tests are here: + " 128512 , 😀 ", + " 128512 , \uD83D\uDE00 ", }) void executeReturnFunctionChrTest(Integer input, String expected) throws EaterException, EaterExceptionLocated { Chr cut = new Chr(); From 5c7245623a1c8cd700b7aaa30bbc44399a2307d3 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Fri, 8 Dec 2023 21:44:05 +0000 Subject: [PATCH 31/95] test refactor: simplify test using `TimTestUtils` For: `Chr` and `Ord` --- .../plantuml/tim/stdlib/ChrTest.java | 24 +++++++++---------- .../plantuml/tim/stdlib/OrdTest.java | 24 +++++++++---------- 2 files changed, 22 insertions(+), 26 deletions(-) diff --git a/test/net/sourceforge/plantuml/tim/stdlib/ChrTest.java b/test/net/sourceforge/plantuml/tim/stdlib/ChrTest.java index 97eb1ece3..6659ecd95 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/ChrTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/ChrTest.java @@ -1,29 +1,31 @@ package net.sourceforge.plantuml.tim.stdlib; -import static org.junit.jupiter.api.Assertions.assertEquals; - -import java.util.Collections; -import java.util.List; +import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput; +import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; +import org.junit.jupiter.api.IndicativeSentencesGeneration; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; -import net.sourceforge.plantuml.tim.expression.TValue; +import net.sourceforge.plantuml.tim.TFunction; /** * Tests the builtin function %chr. */ -class ChrTest { +@IndicativeSentencesGeneration(separator = ": ", generator = ReplaceUnderscores.class) +class ChrTest { + TFunction cut = new Chr(); + final String cutName = "Chr"; /** * Tests chr according to a list of input / expected output * * @throws EaterException should not * @throws EaterExceptionLocated should not */ - @ParameterizedTest + @ParameterizedTest(name = "[{index}] " + cutName + "({0}) = ''{1}''") @CsvSource(nullValues = "null", value = { " 65 , A ", " 9 , '\t' ", @@ -36,11 +38,7 @@ class ChrTest { " 128512 , 😀 ", " 128512 , \uD83D\uDE00 ", }) - void executeReturnFunctionChrTest(Integer input, String expected) throws EaterException, EaterExceptionLocated { - Chr cut = new Chr(); - - List values = Collections.singletonList(TValue.fromInt(input)); - TValue tValue = cut.executeReturnFunction(null, null, null, values, null); - assertEquals(expected, tValue.toString()); + void Test_with_Integer(Integer input, String expected) throws EaterException, EaterExceptionLocated { + assertTimExpectedOutputFromInput(cut, input, expected); } } \ No newline at end of file diff --git a/test/net/sourceforge/plantuml/tim/stdlib/OrdTest.java b/test/net/sourceforge/plantuml/tim/stdlib/OrdTest.java index 3d4c2f203..4fd0411ab 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/OrdTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/OrdTest.java @@ -1,29 +1,31 @@ package net.sourceforge.plantuml.tim.stdlib; -import static org.junit.jupiter.api.Assertions.assertEquals; - -import java.util.Collections; -import java.util.List; +import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput; +import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; +import org.junit.jupiter.api.IndicativeSentencesGeneration; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; -import net.sourceforge.plantuml.tim.expression.TValue; +import net.sourceforge.plantuml.tim.TFunction; /** * Tests the builtin function %ord. */ -class OrdTest { +@IndicativeSentencesGeneration(separator = ": ", generator = ReplaceUnderscores.class) +class OrdTest { + TFunction cut = new Ord(); + final String cutName = "Ord"; /** * Tests ord according to a list of input / expected output * * @throws EaterException should not * @throws EaterExceptionLocated should not */ - @ParameterizedTest + @ParameterizedTest(name = "[{index}] " + cutName + "(''{0}'') = {1}") @CsvSource(nullValues = "null", value = { " A , 65 ", " ABC , 65 ", @@ -39,11 +41,7 @@ class OrdTest { " 😀 , 128512 ", " \uD83D\uDE00 , 128512 ", }) - void executeReturnFunctionOrdTest(String input, String expected) throws EaterException, EaterExceptionLocated { - Ord cut = new Ord(); - - List values = Collections.singletonList(TValue.fromString(input)); - TValue tValue = cut.executeReturnFunction(null, null, null, values, null); - assertEquals(expected, tValue.toString()); + void Test_with_String(String input, String expected) throws EaterException, EaterExceptionLocated { + assertTimExpectedOutputFromInput(cut, input, expected); } } \ No newline at end of file From c20b3d9642eb56600c6c22b09021b545b05f6174 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Mon, 11 Dec 2023 18:34:23 +0100 Subject: [PATCH 32/95] feat: work on chronology --- gradle.properties | 2 +- .../plantuml/api/cheerpj/v1/DirectDraw.java | 3 +- src/com/plantuml/api/cheerpj/v1/Raw.java | 5 +- src/net/atmp/CucaDiagram.java | 4 +- .../sourceforge/plantuml/AbstractPSystem.java | 18 +- src/net/sourceforge/plantuml/Option.java | 2 + .../sourceforge/plantuml/PSystemBuilder.java | 8 +- .../sourceforge/plantuml/PlainDiagram.java | 7 +- .../plantuml/SourceStringReader.java | 12 +- .../sourceforge/plantuml/TitledDiagram.java | 6 +- .../command/CommandLinkActivity.java | 9 +- .../command/CommandLinkLongActivity.java | 5 +- .../command/CommandPartition.java | 13 +- .../activitydiagram3/ActivityDiagram3.java | 11 +- .../plantuml/activitydiagram3/Branch.java | 5 +- .../activitydiagram3/InstructionIf.java | 20 +- .../activitydiagram3/InstructionSwitch.java | 4 +- .../command/CommandActivity3.java | 5 +- .../command/CommandArrow3.java | 3 +- .../activitydiagram3/command/CommandIf2.java | 10 +- .../activitydiagram3/command/CommandIf4.java | 6 +- .../command/CommandIfLegacy1.java | 2 +- .../command/CommandPartition3.java | 5 +- .../command/CommandRepeat3.java | 3 +- .../activitydiagram3/ftile/FtileFactory.java | 2 +- .../ftile/FtileFactoryDelegator.java | 4 +- .../vcompact/FtileFactoryDelegatorIf.java | 5 +- .../ftile/vcompact/FtileForkInner.java | 12 +- .../ftile/vcompact/ParallelBuilderFork.java | 2 +- .../ftile/vcompact/VCompactFactory.java | 2 +- .../plantuml/board/BoardDiagram.java | 4 +- .../sourceforge/plantuml/bpm/BpmDiagram.java | 2 +- .../chronology/ChronologyDiagram.java | 853 ++++++++++++++++++ .../chronology/ChronologyDiagramFactory.java | 126 +++ .../chronology/ComplementAnything.java | 54 ++ .../plantuml/chronology/ComplementHour.java | 84 ++ .../plantuml/chronology/HourPattern.java | 136 +++ .../chronology/SentenceHappensChronology.java | 60 ++ .../plantuml/chronology/SubjectTask.java | 92 ++ .../plantuml/chronology/TaskChronology.java | 372 ++++++++ .../chronology/TimeHeaderChronology.java | 197 ++++ .../chronology/TimeScaleChronology.java | 81 ++ .../command/CommandCreateClass.java | 5 +- .../command/CommandCreateClassMultilines.java | 5 +- .../command/CommandCreateElementFull2.java | 24 +- .../command/CommandStereotype.java | 4 +- .../plantuml/command/CommandNamespace.java | 5 +- .../plantuml/command/CommandNamespace2.java | 5 +- .../command/CommandNamespaceEmpty.java | 5 +- .../plantuml/command/CommandPackage.java | 5 +- .../command/note/CommandFactoryNote.java | 9 +- .../note/CommandFactoryNoteOnEntity.java | 13 +- .../note/CommandFactoryTipOnEntity.java | 9 +- .../FactorySequenceNoteAcrossCommand.java | 17 +- .../sequence/FactorySequenceNoteCommand.java | 19 +- .../FactorySequenceNoteOnArrowCommand.java | 17 +- ...FactorySequenceNoteOverSeveralCommand.java | 17 +- .../sourceforge/plantuml/core/Diagram.java | 2 +- .../plantuml/core/DiagramType.java | 12 +- .../descdiagram/CommandCreateDomain.java | 7 +- .../descdiagram/command/CommandArchimate.java | 32 +- .../command/CommandArchimateMultilines.java | 11 +- .../command/CommandCreateElementFull.java | 27 +- .../CommandCreateElementMultilines.java | 9 +- .../command/CommandLinkElement.java | 5 +- .../command/CommandPackageWithUSymbol.java | 5 +- .../plantuml/ebnf/PSystemEbnf.java | 4 +- .../plantuml/filesdiagram/FilesDiagram.java | 4 +- .../plantuml/flowdiagram/FlowDiagram.java | 2 +- .../plantuml/gitlog/GitDiagram.java | 4 +- src/net/sourceforge/plantuml/help/Help.java | 2 +- .../plantuml/jsondiagram/JsonDiagram.java | 6 +- .../klimt/sprite/ListSpriteDiagram.java | 4 +- .../plantuml/klimt/sprite/StdlibDiagram.java | 4 +- .../plantuml/mindmap/MindMapDiagram.java | 4 +- .../plantuml/nwdiag/NwDiagram.java | 4 +- .../command/CommandCreateEntityObject.java | 5 +- .../CommandCreateEntityObjectMultilines.java | 5 +- .../command/CommandCreateJson.java | 5 +- .../command/CommandCreateJsonSingleLine.java | 5 +- .../command/CommandCreateMap.java | 5 +- .../plantuml/project/GanttDiagram.java | 18 +- .../plantuml/project/GanttDiagramFactory.java | 22 +- .../project/TimeHeaderParameters.java | 3 +- .../project/command/CommandColorTask.java | 3 +- .../project/command/CommandFootbox.java | 5 +- .../project/command/CommandGanttArrow.java | 3 +- .../command/CommandHideResourceFootbox.java | 2 +- .../command/CommandHideResourceName.java | 2 +- .../project/command/CommandLabelOnColumn.java | 3 +- .../project/command/CommandLanguage.java | 2 +- .../project/command/CommandPrintBetween.java | 2 +- .../project/command/CommandPrintScale.java | 2 +- .../command/CommandTaskCompleteDefault.java | 1 - .../project/command/NaturalCommand.java | 14 +- .../plantuml/project/core/AbstractTask.java | 13 + .../plantuml/project/core/Task.java | 5 + .../project/draw/AbstractTaskDraw.java | 8 +- .../project/draw/TaskDrawDiamond.java | 10 +- .../plantuml/project/draw/TaskDrawGroup.java | 13 +- .../project/draw/TaskDrawRegular.java | 18 +- .../project/draw/TimeHeaderSimple.java | 14 +- .../project/draw/TimeHeaderYearly.java | 1 - .../project/lang/ComplementAnything.java | 2 +- ...lementBeforeOrAfterOrAtTaskStartOrEnd.java | 2 +- .../project/lang/ComplementClose.java | 2 +- .../project/lang/ComplementCompleted.java | 2 +- .../plantuml/project/lang/ComplementDate.java | 2 +- .../project/lang/ComplementDates.java | 2 +- .../project/lang/ComplementDayOfWeek.java | 2 +- .../project/lang/ComplementEmpty.java | 2 +- .../project/lang/ComplementFromTo.java | 2 +- .../project/lang/ComplementInColors.java | 2 +- .../project/lang/ComplementInColors2.java | 2 +- .../lang/ComplementInColorsFromTo.java | 2 +- .../project/lang/ComplementNamed.java | 2 +- .../plantuml/project/lang/ComplementOpen.java | 2 +- .../project/lang/ComplementSeveralDays.java | 2 +- .../plantuml/project/lang/ComplementTask.java | 2 +- .../plantuml/project/lang/ComplementUrl.java | 2 +- .../project/lang/ComplementWithColorLink.java | 2 +- .../project/lang/PairOfSomething.java | 16 +- .../plantuml/project/lang/Sentence.java | 10 +- .../plantuml/project/lang/SentenceAnd.java | 12 +- .../plantuml/project/lang/SentenceAndAnd.java | 14 +- .../lang/SentenceDisplayOnSameRowAs.java | 2 +- .../plantuml/project/lang/SentenceEnds.java | 2 +- .../project/lang/SentenceHappens.java | 2 +- .../project/lang/SentenceHappensDate.java | 2 +- .../project/lang/SentenceIsColored.java | 2 +- .../lang/SentenceIsColoredForCompletion.java | 2 +- .../project/lang/SentenceIsDeleted.java | 2 +- .../project/lang/SentenceIsDisplayedAs.java | 2 +- .../project/lang/SentenceIsForTask.java | 2 +- .../project/lang/SentenceLinksTo.java | 2 +- .../plantuml/project/lang/SentenceOccurs.java | 2 +- .../project/lang/SentencePausesDate.java | 2 +- .../project/lang/SentencePausesDates.java | 2 +- .../project/lang/SentencePausesDayOfWeek.java | 2 +- .../project/lang/SentenceRequire.java | 2 +- .../plantuml/project/lang/SentenceSimple.java | 24 +- .../lang/SentenceTaskEndsAbsolute.java | 2 +- .../lang/SentenceTaskEndsOnlyRelative.java | 2 +- .../project/lang/SentenceTaskStarts.java | 2 +- .../lang/SentenceTaskStartsAbsolute.java | 2 +- .../lang/SentenceTaskStartsOnlyRelative.java | 2 +- .../lang/SentenceTaskStartsWithColor.java | 4 +- .../plantuml/project/lang/Something.java | 6 +- .../plantuml/project/lang/Subject.java | 8 +- .../project/lang/SubjectDayAsDate.java | 12 +- .../project/lang/SubjectDayOfWeek.java | 12 +- .../project/lang/SubjectDaysAsDates.java | 14 +- .../plantuml/project/lang/SubjectLinks.java | 6 +- .../plantuml/project/lang/SubjectProject.java | 8 +- .../project/lang/SubjectResource.java | 22 +- .../project/lang/SubjectSeparator.java | 12 +- .../plantuml/project/lang/SubjectTask.java | 35 +- .../plantuml/project/lang/SubjectToday.java | 12 +- .../plantuml/project/lang/Words.java | 1 + .../plantuml/project/time/Day.java | 25 +- .../plantuml/regexdiagram/PSystemRegex.java | 11 +- .../regexdiagram/RegexExpression.java | 13 +- .../plantuml/salt/PSystemSalt.java | 3 +- .../sequencediagram/SequenceDiagram.java | 6 +- .../sequencediagram/command/CommandArrow.java | 5 +- .../command/CommandBoxStart.java | 4 +- .../command/CommandParticipantA.java | 6 +- .../command/CommandParticipantA2.java | 5 +- .../command/CommandParticipantA3.java | 5 +- .../command/CommandParticipantA4.java | 5 +- .../command/CommandParticipantMultilines.java | 5 +- .../plantuml/skin/UmlDiagramType.java | 5 +- .../command/CommandCreatePackage2.java | 5 +- .../command/CommandCreatePackageState.java | 5 +- .../command/CommandCreateState.java | 5 +- .../plantuml/stereo/Stereotype.java | 2 + .../plantuml/stereo/StereotypePattern.java | 71 ++ .../plantuml/sudoku/PSystemSudoku.java | 2 +- src/net/sourceforge/plantuml/tim/Eater.java | 2 +- .../plantuml/timingdiagram/TimingDiagram.java | 4 +- .../timingdiagram/command/CommandAnalog.java | 9 +- .../timingdiagram/command/CommandBinary.java | 9 +- .../command/CommandRobustConcise.java | 9 +- .../plantuml/version/PSystemLicense.java | 2 +- .../sourceforge/plantuml/version/Version.java | 2 +- .../plantuml/wbs/CommandWBSLink.java | 5 +- .../sourceforge/plantuml/wbs/WBSDiagram.java | 4 +- .../plantuml/wire/WireDiagram.java | 4 +- test/net/sourceforge/plantuml/PipeTest.java | 2 +- test/nonreg/RenderViaApiTest.java | 56 ++ test/nonreg/RenderViaPipeTest.java | 63 ++ test/nonreg/simple/A0003_Test.java | 2 +- 192 files changed, 2806 insertions(+), 611 deletions(-) create mode 100644 src/net/sourceforge/plantuml/chronology/ChronologyDiagram.java create mode 100644 src/net/sourceforge/plantuml/chronology/ChronologyDiagramFactory.java create mode 100644 src/net/sourceforge/plantuml/chronology/ComplementAnything.java create mode 100644 src/net/sourceforge/plantuml/chronology/ComplementHour.java create mode 100644 src/net/sourceforge/plantuml/chronology/HourPattern.java create mode 100644 src/net/sourceforge/plantuml/chronology/SentenceHappensChronology.java create mode 100644 src/net/sourceforge/plantuml/chronology/SubjectTask.java create mode 100644 src/net/sourceforge/plantuml/chronology/TaskChronology.java create mode 100644 src/net/sourceforge/plantuml/chronology/TimeHeaderChronology.java create mode 100644 src/net/sourceforge/plantuml/chronology/TimeScaleChronology.java create mode 100644 src/net/sourceforge/plantuml/stereo/StereotypePattern.java create mode 100644 test/nonreg/RenderViaApiTest.java create mode 100644 test/nonreg/RenderViaPipeTest.java diff --git a/gradle.properties b/gradle.properties index 2318ed74a..ee1cf3aff 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 \ No newline at end of file diff --git a/src/com/plantuml/api/cheerpj/v1/DirectDraw.java b/src/com/plantuml/api/cheerpj/v1/DirectDraw.java index 295b0cc0b..88572fcf6 100644 --- a/src/com/plantuml/api/cheerpj/v1/DirectDraw.java +++ b/src/com/plantuml/api/cheerpj/v1/DirectDraw.java @@ -53,6 +53,7 @@ import net.sourceforge.plantuml.BlockUml; 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 class DirectDraw { 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!"); diff --git a/src/com/plantuml/api/cheerpj/v1/Raw.java b/src/com/plantuml/api/cheerpj/v1/Raw.java index c8a12200e..e1ec34f5c 100644 --- a/src/com/plantuml/api/cheerpj/v1/Raw.java +++ b/src/com/plantuml/api/cheerpj/v1/Raw.java @@ -55,6 +55,7 @@ import net.sourceforge.plantuml.BlockUmlBuilder; 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 class Raw { 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 class Raw { 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()); diff --git a/src/net/atmp/CucaDiagram.java b/src/net/atmp/CucaDiagram.java index d13c5fda3..c91cc88d6 100644 --- a/src/net/atmp/CucaDiagram.java +++ b/src/net/atmp/CucaDiagram.java @@ -376,13 +376,13 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, // ::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(); } diff --git a/src/net/sourceforge/plantuml/AbstractPSystem.java b/src/net/sourceforge/plantuml/AbstractPSystem.java index abebc8b07..e45fe9f16 100644 --- a/src/net/sourceforge/plantuml/AbstractPSystem.java +++ b/src/net/sourceforge/plantuml/AbstractPSystem.java @@ -114,14 +114,14 @@ public abstract class AbstractPSystem implements Diagram { } 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 @@ public abstract class AbstractPSystem implements Diagram { } final public long seed() { - if (source == null) + if (source == null) return 42; - + return getSource().seed(); } @@ -159,9 +159,9 @@ public abstract class AbstractPSystem implements Diagram { } 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 abstract class AbstractPSystem implements Diagram { } @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); diff --git a/src/net/sourceforge/plantuml/Option.java b/src/net/sourceforge/plantuml/Option.java index 2f1db45a0..401ee8bcf 100644 --- a/src/net/sourceforge/plantuml/Option.java +++ b/src/net/sourceforge/plantuml/Option.java @@ -440,9 +440,11 @@ public class Option { } 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; diff --git a/src/net/sourceforge/plantuml/PSystemBuilder.java b/src/net/sourceforge/plantuml/PSystemBuilder.java index e1e2a3e7b..5d1fbca15 100644 --- a/src/net/sourceforge/plantuml/PSystemBuilder.java +++ b/src/net/sourceforge/plantuml/PSystemBuilder.java @@ -48,6 +48,7 @@ import net.sourceforge.plantuml.activitydiagram3.ActivityDiagramFactory3; 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 @@ public class PSystemBuilder { // 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 @@ public class PSystemBuilder { // ::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__ diff --git a/src/net/sourceforge/plantuml/PlainDiagram.java b/src/net/sourceforge/plantuml/PlainDiagram.java index 7945b7feb..88385e9e5 100644 --- a/src/net/sourceforge/plantuml/PlainDiagram.java +++ b/src/net/sourceforge/plantuml/PlainDiagram.java @@ -66,14 +66,13 @@ public abstract class PlainDiagram extends AbstractPSystem { } @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); } } diff --git a/src/net/sourceforge/plantuml/SourceStringReader.java b/src/net/sourceforge/plantuml/SourceStringReader.java index 32e7f5ace..a31dfe233 100644 --- a/src/net/sourceforge/plantuml/SourceStringReader.java +++ b/src/net/sourceforge/plantuml/SourceStringReader.java @@ -54,6 +54,7 @@ import net.sourceforge.plantuml.klimt.shape.GraphicStrings; 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 class SourceStringReader { 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 class SourceStringReader { } 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); diff --git a/src/net/sourceforge/plantuml/TitledDiagram.java b/src/net/sourceforge/plantuml/TitledDiagram.java index f5faeba59..9f365f86c 100644 --- a/src/net/sourceforge/plantuml/TitledDiagram.java +++ b/src/net/sourceforge/plantuml/TitledDiagram.java @@ -253,11 +253,11 @@ public abstract class TitledDiagram extends AbstractPSystem implements Diagram, } - 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); } diff --git a/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkActivity.java b/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkActivity.java index 6daa6844e..143b3225d 100644 --- a/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkActivity.java +++ b/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkActivity.java @@ -61,6 +61,7 @@ import net.sourceforge.plantuml.regex.RegexOr; 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 @@ public class CommandLinkActivity extends SingleLineCommand2 { 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 @@ public class CommandLinkActivity extends SingleLineCommand2 { 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"), // diff --git a/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkLongActivity.java b/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkLongActivity.java index 4e008bac8..75d2551e1 100644 --- a/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkLongActivity.java +++ b/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkLongActivity.java @@ -64,6 +64,7 @@ import net.sourceforge.plantuml.regex.RegexOptional; 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 @@ public class CommandLinkLongActivity extends CommandMultilines2 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, // diff --git a/src/net/sourceforge/plantuml/activitydiagram/command/CommandPartition.java b/src/net/sourceforge/plantuml/activitydiagram/command/CommandPartition.java index 488cff81b..cef3f0753 100644 --- a/src/net/sourceforge/plantuml/activitydiagram/command/CommandPartition.java +++ b/src/net/sourceforge/plantuml/activitydiagram/command/CommandPartition.java @@ -52,6 +52,7 @@ import net.sourceforge.plantuml.regex.RegexLeaf; 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 { @@ -69,9 +70,7 @@ public class CommandPartition extends SingleLineCommand2 { 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 @@ public class CommandPartition extends SingleLineCommand2 { 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(); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java b/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java index 009bed4dc..4378abb42 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java @@ -40,7 +40,6 @@ import java.io.OutputStream; 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 @@ public class ActivityDiagram3 extends UmlDiagram { } @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 class ActivityDiagram3 extends UmlDiagram { 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 class ActivityDiagram3 extends UmlDiagram { 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) { diff --git a/src/net/sourceforge/plantuml/activitydiagram3/Branch.java b/src/net/sourceforge/plantuml/activitydiagram3/Branch.java index 0a25a1dc9..35270db4d 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/Branch.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/Branch.java @@ -57,6 +57,7 @@ import net.sourceforge.plantuml.klimt.shape.TextBlock; 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 class Branch { } 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; diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionIf.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionIf.java index 23ddbae23..ee2b423b8 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionIf.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionIf.java @@ -47,7 +47,6 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.FtileDecorateWelding; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.WeldingPoint; -import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileWithNoteOpale; import net.sourceforge.plantuml.activitydiagram3.gtile.Gtile; import net.sourceforge.plantuml.activitydiagram3.gtile.GtileIfAlone; import net.sourceforge.plantuml.activitydiagram3.gtile.GtileIfHexagon; @@ -56,9 +55,9 @@ import net.sourceforge.plantuml.klimt.color.Colors; import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.creole.Display; import net.sourceforge.plantuml.klimt.font.StringBounder; -import net.sourceforge.plantuml.klimt.geom.VerticalAlignment; 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.url.Url; @@ -75,6 +74,7 @@ public class InstructionIf extends WithNote implements Instruction, InstructionC private Branch current; private final LinkRendering topInlinkRendering; private LinkRendering outColor = LinkRendering.none(); + private final Stereotype stereotype; private final Swimlane swimlane; @@ -91,14 +91,15 @@ public class InstructionIf extends WithNote implements Instruction, InstructionC } public InstructionIf(Swimlane swimlane, Instruction parent, Display labelTest, LinkRendering whenThen, - LinkRendering inlinkRendering, HColor color, ISkinParam skinParam, Url url) { + LinkRendering inlinkRendering, HColor color, ISkinParam skinParam, Url url, Stereotype stereotype) { this.url = url; + this.stereotype = stereotype; this.parent = parent; this.skinParam = skinParam; this.topInlinkRendering = Objects.requireNonNull(inlinkRendering); this.swimlane = swimlane; this.thens.add(new Branch(skinParam.getCurrentStyleBuilder(), swimlane, whenThen, labelTest, color, - LinkRendering.none())); + LinkRendering.none(), stereotype)); this.current = this.thens.get(0); } @@ -138,11 +139,11 @@ public class InstructionIf extends WithNote implements Instruction, InstructionC if (elseBranch == null) this.elseBranch = new Branch(skinParam.getCurrentStyleBuilder(), swimlane, LinkRendering.none(), - Display.NULL, null, LinkRendering.none()); + Display.NULL, null, LinkRendering.none(), stereotype); elseBranch.updateFtile(factory); Ftile result = factory.createIf(swimlane, thens, elseBranch, outColor, topInlinkRendering, url, - getPositionedNotes()); + getPositionedNotes(), stereotype); // if (getPositionedNotes().size() > 0) // result = FtileWithNoteOpale.create(result, getPositionedNotes(), false, VerticalAlignment.CENTER); @@ -169,7 +170,7 @@ public class InstructionIf extends WithNote implements Instruction, InstructionC this.current.setInlinkRendering(nextLinkRenderer); this.elseBranch = new Branch(skinParam.getCurrentStyleBuilder(), swimlane, whenElse, Display.NULL, null, - LinkRendering.none()); + LinkRendering.none(), stereotype); this.current = elseBranch; return true; } @@ -180,7 +181,8 @@ public class InstructionIf extends WithNote implements Instruction, InstructionC return false; this.current.setSpecial(nextLinkRenderer); - this.current = new Branch(skinParam.getCurrentStyleBuilder(), swimlane, whenThen, test, color, inlabel); + this.current = new Branch(skinParam.getCurrentStyleBuilder(), swimlane, whenThen, test, color, inlabel, + stereotype); this.thens.add(current); return true; @@ -190,7 +192,7 @@ public class InstructionIf extends WithNote implements Instruction, InstructionC endifCalled = true; if (elseBranch == null) this.elseBranch = new Branch(skinParam.getCurrentStyleBuilder(), swimlane, LinkRendering.none(), - Display.NULL, null, LinkRendering.none()); + Display.NULL, null, LinkRendering.none(), stereotype); this.elseBranch.setSpecial(nextLinkRenderer); this.current.setInlinkRendering(nextLinkRenderer); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionSwitch.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionSwitch.java index 9ed4ddb98..dc9efedc6 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionSwitch.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionSwitch.java @@ -58,7 +58,7 @@ import net.sourceforge.plantuml.sequencediagram.NoteType; import net.sourceforge.plantuml.style.ISkinParam; public class InstructionSwitch extends WithNote implements Instruction, InstructionCollection { - // ::remove folder when __HAXE__ + // ::remove folder when __HAXE__ private final List switches = new ArrayList<>(); private final ISkinParam skinParam; @@ -166,7 +166,7 @@ public class InstructionSwitch extends WithNote implements Instruction, Instruct this.current.setSpecial(nextLinkRenderer); this.current = new Branch(skinParam.getCurrentStyleBuilder(), swimlane, LinkRendering.none().withDisplay(labelCase), labelCase, null, - LinkRendering.none().withDisplay(labelCase)); + LinkRendering.none().withDisplay(labelCase), null); this.switches.add(this.current); return true; } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivity3.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivity3.java index a78abd2eb..4a38e0c61 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivity3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivity3.java @@ -52,6 +52,7 @@ import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.skin.ColorParam; 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; @@ -104,9 +105,7 @@ public class CommandActivity3 extends SingleLineCommand2 { return RegexConcat.build(CommandActivity3.class.getName(), RegexLeaf.start(), // UrlBuilder.OPTIONAL, // color().getRegex(), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO"), // new RegexLeaf(":"), // new RegexLeaf("LABEL", "(.*?)"), // new RegexLeaf("STYLE", endingGroupShort()), // diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandArrow3.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandArrow3.java index 6f7f93d18..643717928 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandArrow3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandArrow3.java @@ -78,9 +78,8 @@ public class CommandArrow3 extends SingleLineCommand2 { diagram.setColorNextArrow(rainbow); } final String label = arg.get("LABEL", 0); - if (label != null && label.length() > 0) { + if (label != null && label.length() > 0) diagram.setLabelNextArrow(Display.getWithNewlines(label)); - } return CommandExecutionResult.ok(); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandIf2.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandIf2.java index efd28fb28..fca210ab9 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandIf2.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandIf2.java @@ -47,6 +47,8 @@ import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexOptional; 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; @@ -63,7 +65,7 @@ public class CommandIf2 extends SingleLineCommand2 { UrlBuilder.OPTIONAL, // ColorParser.exp4(), // new RegexLeaf("if"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO"), // new RegexLeaf("\\("), // new RegexLeaf("TEST", "(.*?)"), // new RegexLeaf("\\)"), // @@ -85,9 +87,8 @@ public class CommandIf2 extends SingleLineCommand2 { final HColor color = s == null ? null : diagram.getSkinParam().getIHtmlColorSet().getColor(s); String test = arg.get("TEST", 0); - if (test.length() == 0) { + if (test.length() == 0) test = null; - } final Url url; if (arg.get("URL", 0) == null) { @@ -96,8 +97,9 @@ public class CommandIf2 extends SingleLineCommand2 { final UrlBuilder urlBuilder = new UrlBuilder(diagram.getSkinParam().getValue("topurl"), UrlMode.STRICT); url = urlBuilder.getUrl(arg.get("URL", 0)); } + final Stereotype stereotype = Stereotype.build(arg.get("STEREO", 0)); - diagram.startIf(Display.getWithNewlines(test), Display.getWithNewlines(arg.get("WHEN", 0)), color, url); + diagram.startIf(Display.getWithNewlines(test), Display.getWithNewlines(arg.get("WHEN", 0)), color, url, stereotype); return CommandExecutionResult.ok(); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandIf4.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandIf4.java index 926746f8e..331389707 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandIf4.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandIf4.java @@ -82,10 +82,10 @@ public class CommandIf4 extends SingleLineCommand2 { final HColor color = s == null ? null : diagram.getSkinParam().getIHtmlColorSet().getColor(s); String test = arg.get("TEST", 0); - if (test.length() == 0) { + if (test.length() == 0) test = null; - } - diagram.startIf(Display.getWithNewlines(test), Display.getWithNewlines(arg.get("WHEN", 0)), color, null); + + diagram.startIf(Display.getWithNewlines(test), Display.getWithNewlines(arg.get("WHEN", 0)), color, null, null); return CommandExecutionResult.ok(); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandIfLegacy1.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandIfLegacy1.java index 7f1b9a30d..78f120eaa 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandIfLegacy1.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandIfLegacy1.java @@ -72,7 +72,7 @@ public class CommandIfLegacy1 extends SingleLineCommand2 { protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, LineLocation location, RegexResult arg) { diagram.startIf(Display.getWithNewlines(arg.get("TEST", 0)), Display.getWithNewlines(arg.get("WHEN", 0)), null, - null); + null, null); return CommandExecutionResult.ok(); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandPartition3.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandPartition3.java index 63132a782..3e7dcc420 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandPartition3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandPartition3.java @@ -54,6 +54,7 @@ import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexOptional; import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.stereo.Stereotype; +import net.sourceforge.plantuml.stereo.StereotypePattern; import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.utils.LineLocation; @@ -77,9 +78,7 @@ public class CommandPartition3 extends SingleLineCommand2 { new RegexConcat( // RegexLeaf.spaceOneOrMore(), // color("BACK2").getRegex())), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO"), // new RegexLeaf("\\{?"), // RegexLeaf.end()); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandRepeat3.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandRepeat3.java index 6289d2b60..82170a3e8 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandRepeat3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandRepeat3.java @@ -52,6 +52,7 @@ import net.sourceforge.plantuml.regex.RegexOptional; import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.skin.ColorParam; import net.sourceforge.plantuml.stereo.Stereotype; +import net.sourceforge.plantuml.stereo.StereotypePattern; import net.sourceforge.plantuml.utils.LineLocation; public class CommandRepeat3 extends SingleLineCommand2 { @@ -62,7 +63,7 @@ public class CommandRepeat3 extends SingleLineCommand2 { static IRegex getRegexConcat() { return RegexConcat.build(CommandRepeat3.class.getName(), RegexLeaf.start(), // - new RegexLeaf("STEREO", "(\\<\\<.*\\>\\>)?"), // + StereotypePattern.optional("STEREO"), // ColorParser.exp4(), // new RegexLeaf("repeat"), // RegexLeaf.spaceZeroOrMore(), // diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactory.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactory.java index 897491f1b..ada34034c 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactory.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactory.java @@ -89,7 +89,7 @@ public interface FtileFactory { HColor color, Instruction specialOut, Ftile backward, LinkRendering incoming1, LinkRendering incoming2); public Ftile createIf(Swimlane swimlane, List thens, Branch elseBranch, LinkRendering outColor, - LinkRendering topInlinkRendering, Url url, Collection notes); + LinkRendering topInlinkRendering, Url url, Collection notes, Stereotype stereotype); public Ftile createSwitch(Swimlane swimlane, List branches, LinkRendering afterEndwhile, LinkRendering topInlinkRendering, Display labelTest); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java index 5969966ce..c95352ecb 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java @@ -188,8 +188,8 @@ public class FtileFactoryDelegator implements FtileFactory { @Override public Ftile createIf(Swimlane swimlane, List thens, Branch elseBranch, LinkRendering afterEndwhile, - LinkRendering topInlinkRendering, Url url, Collection notes) { - return factory.createIf(swimlane, thens, elseBranch, afterEndwhile, topInlinkRendering, url, notes); + LinkRendering topInlinkRendering, Url url, Collection notes, Stereotype stereotype) { + return factory.createIf(swimlane, thens, elseBranch, afterEndwhile, topInlinkRendering, url, notes, stereotype); } @Override diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorIf.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorIf.java index 4330e476b..bd116dc3f 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorIf.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorIf.java @@ -48,6 +48,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond.ConditionalBuilder; import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.skin.Pragma; +import net.sourceforge.plantuml.stereo.Stereotype; import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.svek.ConditionEndStyle; @@ -65,14 +66,14 @@ public class FtileFactoryDelegatorIf extends FtileFactoryDelegator { @Override public Ftile createIf(Swimlane swimlane, List thens, Branch elseBranch, LinkRendering afterEndwhile, - LinkRendering topInlinkRendering, Url url, Collection notes) { + LinkRendering topInlinkRendering, Url url, Collection notes, Stereotype stereotype) { final ConditionStyle conditionStyle = skinParam().getConditionStyle(); final ConditionEndStyle conditionEndStyle = skinParam().getConditionEndStyle(); final Branch branch0 = thens.get(0); final Style styleArrow = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder()); - final Style styleDiamond = getDefaultStyleDefinitionDiamond() + final Style styleDiamond = getDefaultStyleDefinitionDiamond().withTOBECHANGED(stereotype) .getMergedStyle(skinParam().getCurrentStyleBuilder()); final HColor backColor = branch0.getColor() == null ? styleDiamond.value(PName.BackGroundColor).asColor(skinParam().getIHtmlColorSet()) diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileForkInner.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileForkInner.java index fd6a1a7cb..924829dd3 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileForkInner.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileForkInner.java @@ -81,9 +81,9 @@ class FtileForkInner extends AbstractFtile { public static Set mergeSwimlanes(List tiles) { final Set result = new HashSet<>(); - for (Ftile tile : tiles) { + for (Ftile tile : tiles) result.addAll(tile.getSwimlanes()); - } + return Collections.unmodifiableSet(result); } @@ -105,9 +105,9 @@ class FtileForkInner extends AbstractFtile { for (Ftile ftile : forks) { final XDimension2D dim = ftile.calculateDimension(stringBounder); width += dim.getWidth(); - if (dim.getHeight() > height) { + if (dim.getHeight() > height) height = dim.getHeight(); - } + } final XDimension2D dimTotal = new XDimension2D(width, height); return new FtileGeometry(dimTotal, dimTotal.getWidth() / 2, 0, dimTotal.getHeight()); @@ -116,9 +116,9 @@ class FtileForkInner extends AbstractFtile { public UTranslate getTranslateFor(Ftile searched, StringBounder stringBounder) { double xpos = 0; for (Ftile ftile : forks) { - if (ftile == searched) { + if (ftile == searched) return UTranslate.dx(xpos); - } + final XDimension2D dim = ftile.calculateDimension(stringBounder); xpos += dim.getWidth(); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderFork.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderFork.java index 053470efe..90ce41f44 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderFork.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderFork.java @@ -85,7 +85,7 @@ public class ParallelBuilderFork extends AbstractParallelFtilesBuilder { Ftile result = middle; final List conns = new ArrayList<>(); final Swimlane swimlaneBlack = in; - final Style style = getStyleSignature().getMergedStyle(skinParam().getCurrentStyleBuilder()); + final Style style = getStyleSignatureArrow().getMergedStyle(skinParam().getCurrentStyleBuilder()); final Ftile black = new FtileBlackBlock(skinParam(), swimlaneBlack); double x = 0; for (Ftile tmp : list99) { diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java index 267511711..e2ee4eaa6 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java @@ -169,7 +169,7 @@ public class VCompactFactory implements FtileFactory { @Override public Ftile createIf(Swimlane swimlane, List thens, Branch elseBranch, LinkRendering afterEndwhile, - LinkRendering topInlinkRendering, Url url, Collection notes) { + LinkRendering topInlinkRendering, Url url, Collection notes, Stereotype stereotype) { final List ftiles = new ArrayList<>(); for (Branch branch : thens) ftiles.add(branch.getFtile()); diff --git a/src/net/sourceforge/plantuml/board/BoardDiagram.java b/src/net/sourceforge/plantuml/board/BoardDiagram.java index 266c7cb8f..f7fc67e1b 100644 --- a/src/net/sourceforge/plantuml/board/BoardDiagram.java +++ b/src/net/sourceforge/plantuml/board/BoardDiagram.java @@ -73,11 +73,11 @@ public class BoardDiagram extends UmlDiagram { protected ImageData exportDiagramInternal(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException { - return createImageBuilder(fileFormatOption).drawable(getTextBlock()).write(os); + return createImageBuilder(fileFormatOption).drawable(getTextMainBlock(fileFormatOption)).write(os); } @Override - protected TextBlock getTextBlock() { + protected TextBlock getTextMainBlock(FileFormatOption fileFormatOption) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { diff --git a/src/net/sourceforge/plantuml/bpm/BpmDiagram.java b/src/net/sourceforge/plantuml/bpm/BpmDiagram.java index 2cbc3663e..c568879e4 100644 --- a/src/net/sourceforge/plantuml/bpm/BpmDiagram.java +++ b/src/net/sourceforge/plantuml/bpm/BpmDiagram.java @@ -194,7 +194,7 @@ public class BpmDiagram extends UmlDiagram { } @Override - protected TextBlock getTextBlock() { + protected TextBlock getTextMainBlock(FileFormatOption fileFormatOption) { throw new UnsupportedOperationException(); } } diff --git a/src/net/sourceforge/plantuml/chronology/ChronologyDiagram.java b/src/net/sourceforge/plantuml/chronology/ChronologyDiagram.java new file mode 100644 index 000000000..9731c3506 --- /dev/null +++ b/src/net/sourceforge/plantuml/chronology/ChronologyDiagram.java @@ -0,0 +1,853 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.chronology; + +import java.io.IOException; +import java.io.OutputStream; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Locale; +import java.util.Map; +import java.util.Objects; + +import net.sourceforge.plantuml.FileFormatOption; +import net.sourceforge.plantuml.TitledDiagram; +import net.sourceforge.plantuml.WithSprite; +import net.sourceforge.plantuml.command.CommandExecutionResult; +import net.sourceforge.plantuml.core.DiagramDescription; +import net.sourceforge.plantuml.core.ImageData; +import net.sourceforge.plantuml.core.UmlSource; +import net.sourceforge.plantuml.klimt.UTranslate; +import net.sourceforge.plantuml.klimt.color.HColorSet; +import net.sourceforge.plantuml.klimt.drawing.UGraphic; +import net.sourceforge.plantuml.klimt.font.StringBounder; +import net.sourceforge.plantuml.klimt.geom.HorizontalAlignment; +import net.sourceforge.plantuml.klimt.geom.XDimension2D; +import net.sourceforge.plantuml.klimt.shape.AbstractTextBlock; +import net.sourceforge.plantuml.klimt.shape.TextBlock; +import net.sourceforge.plantuml.project.GanttStyle; +import net.sourceforge.plantuml.project.LabelPosition; +import net.sourceforge.plantuml.project.LabelStrategy; +import net.sourceforge.plantuml.project.LoadPlanable; +import net.sourceforge.plantuml.project.TimeHeaderParameters; +import net.sourceforge.plantuml.project.ToTaskDraw; +import net.sourceforge.plantuml.project.core.PrintScale; +import net.sourceforge.plantuml.project.core.Task; +import net.sourceforge.plantuml.project.core.TaskCode; +import net.sourceforge.plantuml.project.core.TaskGroup; +import net.sourceforge.plantuml.project.draw.TaskDraw; +import net.sourceforge.plantuml.project.draw.TaskDrawDiamond; +import net.sourceforge.plantuml.project.draw.TimeHeader; +import net.sourceforge.plantuml.project.time.Day; +import net.sourceforge.plantuml.project.timescale.TimeScale; +import net.sourceforge.plantuml.real.Real; +import net.sourceforge.plantuml.real.RealOrigin; +import net.sourceforge.plantuml.real.RealUtils; +import net.sourceforge.plantuml.skin.UmlDiagramType; +import net.sourceforge.plantuml.style.SName; +import net.sourceforge.plantuml.style.Style; +import net.sourceforge.plantuml.style.StyleSignatureBasic; + +public class ChronologyDiagram extends TitledDiagram implements ToTaskDraw, WithSprite, GanttStyle { + + private final Map draws = new LinkedHashMap(); + private final Map tasks = new LinkedHashMap(); + private final Map byShortName = new HashMap(); +// private final List constraints = new ArrayList<>(); + private final HColorSet colorSet = HColorSet.instance(); +// +// private final OpenClose openClose = new OpenClose(); +// +// private final Map resources = new LinkedHashMap(); +// private final Map colorDaysToday = new HashMap(); +// private final Map colorDaysInternal = new HashMap(); +// private final Map colorDaysOfWeek = new HashMap(); +// private final Map nameDays = new HashMap(); + private LabelStrategy labelStrategy = new LabelStrategy(LabelPosition.LEGACY, HorizontalAlignment.LEFT); +// +// // Let's follow ISO-8601 rules +// private WeekNumberStrategy weekNumberStrategy = new WeekNumberStrategy(DayOfWeek.MONDAY, 4); +// +// private PrintScale printScale = PrintScale.DAILY; +// private double factorScale = 1.0; + private Locale locale = Locale.ENGLISH; +// +// private Day today; +// private double totalHeightWithoutFooter; + private Day min; + private Day max; + private TimeScaleChronology timeScale; +// +// private Day printStart; +// private Day printEnd; +// + private final RealOrigin origin = RealUtils.createOrigin(); +// +// private int defaultCompletion = 100; +// +// private Task it; +// private Resource they; + + public CommandExecutionResult changeLanguage(String lang) { + this.locale = new Locale(lang); + return CommandExecutionResult.ok(); + } + + public DiagramDescription getDescription() { + return new DiagramDescription("(Chronology)"); + } + +// public void setWeekNumberStrategy(DayOfWeek firstDayOfWeek, int minimalDaysInFirstWeek) { +// this.weekNumberStrategy = new WeekNumberStrategy(firstDayOfWeek, minimalDaysInFirstWeek); +// } + + public ChronologyDiagram(UmlSource source) { + super(source, UmlDiagramType.CHRONOLOGY, null); + } + +// public final int getDpi(FileFormatOption fileFormatOption) { +// return 96; +// } + + @Override + protected ImageData exportDiagramNow(OutputStream os, int index, FileFormatOption fileFormatOption) + throws IOException { + return createImageBuilder(fileFormatOption).drawable(getTextMainBlock(fileFormatOption)).write(os); + } + +// public void setPrintScale(PrintScale printScale) { +// this.printScale = printScale; +// } +// +// public void setFactorScale(double factorScale) { +// this.factorScale = factorScale; +// } +// +// private double getFactorScale() { +// return this.printScale.getDefaultScale() * this.factorScale; +// } +// +// private boolean isHidden(Task task) { +// if (printStart == null || task instanceof TaskSeparator) +// return false; +// +// if (task.getEnd().compareTo(min) < 0) +// return true; +// +// if (task.getStart().compareTo(max) > 0) +// return true; +// +// return false; +// } +// +// @Override +// public String checkFinalError() { +// try { +// initMinMax(); +// } catch (ImpossibleSolvingException ex) { +// return ex.getMessage(); +// } +// return null; +// } + + @Override + protected TextBlock getTextMainBlock(FileFormatOption fileFormatOption) { + final StringBounder stringBounder = fileFormatOption.getDefaultStringBounder(getSkinParam()); + initMinMax(); + + final TimeHeader timeHeader = new TimeHeaderChronology(stringBounder, thParam(), PrintScale.DAILY, + this.timeScale); + initTaskAndResourceDraws(timeHeader.getTimeScale(), timeHeader.getFullHeaderHeight(stringBounder), + stringBounder); + + return new AbstractTextBlock() { + public XDimension2D calculateDimension(StringBounder stringBounder) { + return new XDimension2D(1000, 1000); + } + + @Override + public void drawU(UGraphic ug) { + timeHeader.drawTimeHeader(ug, 200); + drawTasksRect(ug); + drawTasksTitle(ug, 0, 0); + } + }; + + } + +// +// private double getTitlesColumnWidth(StringBounder stringBounder) { +// if (labelStrategy.titleInside()) +// return 0; +// +// double width = 0; +// for (Task task : tasks.values()) { +// if (isHidden(task)) +// continue; +// +// width = Math.max(width, draws.get(task).getTitleWidth(stringBounder)); +// } +// return width; +// } +// +// public XDimension2D calculateDimension(StringBounder stringBounder) { +// return new XDimension2D(getTitlesColumnWidth(stringBounder) + getBarsColumnWidth(timeHeader), +// getTotalHeight(stringBounder, timeHeader)); +// } +// +// private double getBarsColumnWidth(final TimeHeader timeHeader) { +// final double xmin = timeHeader.getTimeScale().getStartingPosition(min); +// final double xmax = timeHeader.getTimeScale().getEndingPosition(max); +// return xmax - xmin; +// } +// +// }; +// } +// +// private TimeHeader getTimeHeader(StringBounder stringBounder) { +// if (openClose.getStartingDay() == null) +// return new TimeHeaderSimple(stringBounder, thParam(), printScale); +// else if (printScale == PrintScale.DAILY) +// return new TimeHeaderDaily(stringBounder, thParam(), nameDays, printStart, printEnd); +// else if (printScale == PrintScale.WEEKLY) +// return new TimeHeaderWeekly(stringBounder, thParam(), weekNumberStrategy, withCalendarDate); +// else if (printScale == PrintScale.MONTHLY) +// return new TimeHeaderMonthly(stringBounder, thParam()); +// else if (printScale == PrintScale.QUARTERLY) +// return new TimeHeaderQuarterly(stringBounder, thParam()); +// else if (printScale == PrintScale.YEARLY) +// return new TimeHeaderYearly(stringBounder, thParam()); +// else +// throw new IllegalStateException(); +// +// } + + private TimeHeaderParameters thParam() { + return new TimeHeaderParameters(null, 1, min, max, getIHtmlColorSet(), locale, null, null, null, this); + } + +// private Map colorDays() { +// colorDaysInternal.putAll(colorDaysToday); +// return Collections.unmodifiableMap(colorDaysInternal); +// } + + @Override + public final Style getStyle(SName param) { + return StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, param) + .getMergedStyle(getCurrentStyleBuilder()); + } + + @Override + public final Style getStyle(SName param1, SName param2) { + return StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, param1, param2) + .getMergedStyle(getCurrentStyleBuilder()); + } + +// private double getTotalHeight(StringBounder stringBounder, TimeHeader timeHeader) { +// if (showFootbox) +// return totalHeightWithoutFooter + timeHeader.getTimeFooterHeight(stringBounder); +// +// return totalHeightWithoutFooter; +// } + + private void drawTasksRect(UGraphic ug) { + for (Task task : tasks.values()) { +// if (isHidden(task)) +// continue; + + final TaskDraw draw = draws.get(task); + final UTranslate move = UTranslate.dy(draw.getY(ug.getStringBounder()).getCurrentValue()); + draw.drawU(ug.apply(move)); + } + } + +// private void drawConstraints(final UGraphic ug, TimeScale timeScale) { +// for (GanttConstraint constraint : constraints) { +// if (printStart != null && constraint.isHidden(min, max)) +// continue; +// +// constraint.getUDrawable(timeScale, this).drawU(ug); +// } +// +// } +// +// public StyleSignatureBasic getDefaultStyleDefinitionArrow() { +// return StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, SName.arrow); +// } + + private void drawTasksTitle(UGraphic ug, double colTitles, double colBars) { + for (Task task : tasks.values()) { +// if (isHidden(task)) +// continue; + + final TaskDraw draw = draws.get(task); + final UTranslate move = UTranslate.dy(draw.getY(ug.getStringBounder()).getCurrentValue()); + draw.drawTitle(ug.apply(move), labelStrategy, colTitles, colBars); + } + } + +// private void drawResources(UGraphic ug) { +// for (Resource res : resources.values()) { +// final ResourceDraw draw = res.getResourceDraw(); +// final UTranslate move = UTranslate.dy(draw.getY()); +// draw.drawU(ug.apply(move)); +// } +// } +// +// public void closeDayOfWeek(DayOfWeek day, String task) { +// openClose.close(day); +// } +// +// public void openDayOfWeek(DayOfWeek day, String task) { +// if (task.length() == 0) +// openClose.open(day); +// else +// getOpenCloseForTask(task).open(day); +// } +// +// public void closeDayAsDate(Day day, String task) { +// if (task.length() == 0) +// openClose.close(day); +// else +// getOpenCloseForTask(task).close(day); +// +// } +// +// public void openDayAsDate(Day day, String task) { +// if (task.length() == 0) +// openClose.open(day); +// else +// getOpenCloseForTask(task).open(day); +// +// } +// +// private OpenClose getOpenCloseForTask(String task) { +// OpenClose except = openCloseForTask.get(task); +// if (except == null) { +// except = new OpenClose(); +// openCloseForTask.put(task, except); +// } +// return except; +// } +// +// private final Map openCloseForTask = new HashMap<>(); +// + private void initTaskAndResourceDraws(TimeScale timeScale, double headerHeight, StringBounder stringBounder) { + Real y = origin; + y = y.addFixed(headerHeight); + for (Task task : tasks.values()) { + final TaskDraw draw; + final String disp = task.getCode().getSimpleDisplay(); + draw = new TaskDrawDiamond(timeScale, y, disp, task.getStart(), task, this, task.getStyleBuilder()); + final double height = draw.getFullHeightTask(stringBounder); + y = y.addAtLeast(height); +// if (task instanceof TaskSeparator) { +// final TaskSeparator taskSeparator = (TaskSeparator) task; +// draw = new TaskDrawSeparator(taskSeparator.getName(), timeScale, y, min, max, task.getStyleBuilder(), +// getSkinParam().getIHtmlColorSet()); +// } else if (task instanceof TaskGroup) { +// final TaskGroup taskGroup = (TaskGroup) task; +// draw = new TaskDrawGroup(timeScale, y, taskGroup.getCode().getSimpleDisplay(), getStart(taskGroup), +// getEnd(taskGroup), task, this, task.getStyleBuilder()); +// } else { +// final TaskImpl tmp = (TaskImpl) task; +// final String disp = hideResourceName ? tmp.getCode().getSimpleDisplay() : tmp.getPrettyDisplay(); +// if (tmp.isDiamond()) { +// draw = new TaskDrawDiamond(timeScale, y, disp, getStart(tmp), task, this, task.getStyleBuilder()); +// } else { +// final boolean oddStart = printStart != null && min.compareTo(getStart(tmp)) == 0; +// final boolean oddEnd = printStart != null && max.compareTo(getEnd(tmp)) == 0; +// draw = new TaskDrawRegular(timeScale, y, disp, getStart(tmp), getEnd(tmp), oddStart, oddEnd, +// getSkinParam(), task, this, getConstraints(task), task.getStyleBuilder()); +// } +// draw.setColorsAndCompletion(tmp.getColors(), tmp.getCompletion(), tmp.getUrl(), tmp.getNote()); +// } +// if (task.getRow() == null) +// y = y.addAtLeast(draw.getFullHeightTask(stringBounder)); +// + draws.put(task, draw); + } +// origin.compileNow(); +// magicPush(stringBounder); +// double yy = lastY(stringBounder); +// if (yy == 0) { +// yy = headerHeight; +// } else if (this.hideResourceFoobox == false) +// for (Resource res : resources.values()) { +// final ResourceDraw draw = buildResourceDraw(this, res, timeScale, yy, min, max); +// res.setTaskDraw(draw); +// yy += draw.getHeight(stringBounder); +// } +// +// this.totalHeightWithoutFooter = yy; + } + +// +// private ResourceDraw buildResourceDraw(ChronologyDiagram gantt, Resource res, TimeScale timeScale, double y, Day min, +// Day max) { +// return new ResourceDrawBasic(gantt, res, timeScale, y, min, max); +// // return new ResourceDrawVersion2(gantt, res, timeScale, y, min, max); +// } +// +// private Collection getConstraints(Task task) { +// final List result = new ArrayList<>(); +// for (GanttConstraint constraint : constraints) { +// if (constraint.isOn(task)) +// result.add(constraint); +// +// } +// return Collections.unmodifiableCollection(result); +// } +// +// private double lastY(StringBounder stringBounder) { +// double result = 0; +// for (TaskDraw td : draws.values()) +// result = Math.max(result, td.getY(stringBounder).getCurrentValue() + td.getHeightMax(stringBounder)); +// +// return result; +// } +// +// private void magicPush(StringBounder stringBounder) { +// final List notes = new ArrayList<>(); +// for (TaskDraw td : draws.values()) { +// final FingerPrint taskPrint = td.getFingerPrint(stringBounder); +// final FingerPrint fingerPrintNote = td.getFingerPrintNote(stringBounder); +// +// if (td.getTrueRow() == null) +// for (TaskDraw note : notes) { +// final FingerPrint otherNote = note.getFingerPrintNote(stringBounder); +// final double deltaY = otherNote.overlap(taskPrint); +// if (deltaY > 0) { +// final Real bottom = note.getY(stringBounder).addAtLeast(note.getHeightMax(stringBounder)); +// td.getY(stringBounder).ensureBiggerThan(bottom); +// origin.compileNow(); +// } +// +// } +// +// if (fingerPrintNote != null) +// notes.add(td); +// +// } +// } +// +// private Day getStart(final Task tmp) { +// if (printStart == null) +// return tmp.getStart(); +// +// return Day.max(min, tmp.getStart()); +// } +// +// private Day getEnd(final Task tmp) { +// if (printStart == null) +// return tmp.getEnd(); +// +// return Day.min(max, tmp.getEnd()); +// } +// + private void initMinMax() { + if (tasks.size() == 0) { + throw new IllegalStateException(); + } + for (Task task : tasks.values()) { + if (this.min == null || this.max == null) { + this.min = task.getStart(); + this.max = task.getEnd(); + continue; + + } + if (this.min.compareTo(task.getStart()) > 0) + this.min = task.getStart(); + if (this.max.compareTo(task.getEnd()) < 0) + this.max = task.getEnd(); + } + + this.min = this.min.roundDayDown(); + this.max = this.max.roundDayUp(); + + this.timeScale = new TimeScaleChronology(1000); + this.timeScale.setMin(this.min.getMillis()); + this.timeScale.setMax(this.max.getMillis()); + } + +// public Day getThenDate() { +// Day result = getStartingDate(); +// for (Day d : colorDays().keySet()) +// if (d.compareTo(result) > 0) +// result = d; +// +// for (Day d : nameDays.keySet()) +// if (d.compareTo(result) > 0) +// result = d; +// +// return result; +// } +// +// public Task getExistingTask(String id) { +// final Task result = byShortName.get(Objects.requireNonNull(id)); +// if (result != null) +// return result; +// +// final TaskCode code = new TaskCode(id); +// return tasks.get(code); +// } +// +// public GanttConstraint forceTaskOrder(Task task1, Task task2) { +// final TaskInstant end1 = new TaskInstant(task1, TaskAttribute.END); +// task2.setStart(end1.getInstantPrecise()); +// final GanttConstraint result = new GanttConstraint(this.getIHtmlColorSet(), +// getSkinParam().getCurrentStyleBuilder(), end1, new TaskInstant(task2, TaskAttribute.START)); +// addContraint(result); +// return result; +// } + + public Task getOrCreateTask(String codeOrShortName, String shortName, boolean linkedToPrevious) { + Objects.requireNonNull(codeOrShortName); + Task result = shortName == null ? null : byShortName.get(shortName); + if (result != null) + return result; + + result = byShortName.get(codeOrShortName); + if (result != null) + return result; + + final TaskCode code = new TaskCode(codeOrShortName); + result = tasks.get(code); + if (result == null) { + + result = new TaskChronology(getSkinParam().getCurrentStyleBuilder(), code); + if (currentGroup != null) + currentGroup.addTask(result); + + tasks.put(code, result); + if (byShortName != null) + byShortName.put(shortName, result); + + } + return result; + } + +// private Task getLastCreatedTask() { +// final List all = new ArrayList<>(tasks.values()); +// for (int i = all.size() - 1; i >= 0; i--) +// if (all.get(i) instanceof TaskImpl) +// return all.get(i); +// +// return null; +// } +// +// public void addSeparator(String comment) { +// TaskSeparator separator = new TaskSeparator(getSkinParam().getCurrentStyleBuilder(), comment, tasks.size()); +// tasks.put(separator.getCode(), separator); +// } +// + private TaskGroup currentGroup = null; +// +// public CommandExecutionResult addGroup(String name) { +// TaskGroup group = new TaskGroup(this.currentGroup, getSkinParam().getCurrentStyleBuilder(), name); +// +// if (this.currentGroup != null) +// this.currentGroup.addTask(group); +// +// this.currentGroup = group; +// tasks.put(group.getCode(), group); +// return CommandExecutionResult.ok(); +// } +// +// public CommandExecutionResult endGroup() { +// if (this.currentGroup == null) +// return CommandExecutionResult.error("No group to be closed"); +// +// this.currentGroup = this.currentGroup.getParent(); +// +// return CommandExecutionResult.ok(); +// } +// +// public void addContraint(GanttConstraint constraint) { +// constraints.add(constraint); +// } +// +// public HColorSet getIHtmlColorSet() { +// return colorSet; +// } +// +// public void setProjectStartingDate(Day start) { +// openClose.setStartingDay(start); +// this.min = start; +// } +// +// public Day getStartingDate() { +// if (openClose.getStartingDay() == null) +// return min; +// +// return openClose.getStartingDay(); +// } +// +// public Day getEndingDate() { +// initMinMax(); +// return max; +// } +// +// public int daysInWeek() { +// return openClose.daysInWeek(); +// } +// +// public boolean isOpen(Day day) { +// return openClose.getLoadAt(day) > 0; +// } +// +// public boolean affectResource(Task result, String description) { +// final Pattern p = Pattern.compile("([^:]+)(:(\\d+))?"); +// final Matcher m = p.matcher(description); +// if (m.find() == false) +// throw new IllegalArgumentException(); +// +// final Resource resource = getResource(m.group(1)); +// int percentage = 100; +// if (m.group(3) != null) +// percentage = Integer.parseInt(m.group(3)); +// +// if (percentage == 0) +// return false; +// +// result.addResource(resource, percentage); +// return true; +// } +// +// public Resource getResource(String resourceName) { +// Resource resource = resources.get(resourceName); +// if (resource == null) +// resource = new Resource(resourceName); +// +// resources.put(resourceName, resource); +// return resource; +// } +// +// public int getLoadForResource(Resource res, Day i) { +// int result = 0; +// for (Task task : tasks.values()) { +// if (task instanceof TaskSeparator) +// continue; +// +// final TaskImpl task2 = (TaskImpl) task; +// result += task2.loadForResource(res, i); +// } +// return result; +// } +// +// public Moment getExistingMoment(String id) { +// Moment result = getExistingTask(id); +// if (result == null) { +// Day start = null; +// Day end = null; +// for (Map.Entry ent : nameDays.entrySet()) { +// if (ent.getValue().equalsIgnoreCase(id) == false) +// continue; +// +// start = min(start, ent.getKey()); +// end = max(end, ent.getKey()); +// } +// if (start != null) +// result = new MomentImpl(start, end); +// +// } +// return result; +// } +// +// private Day min(Day d1, Day d2) { +// if (d1 == null) +// return d2; +// +// if (d1.compareTo(d2) > 0) +// return d2; +// +// return d1; +// } +// +// private Day max(Day d1, Day d2) { +// if (d1 == null) +// return d2; +// +// if (d1.compareTo(d2) < 0) +// return d2; +// +// return d1; +// } +// +// public void colorDay(Day day, HColor color) { +// colorDaysInternal.put(day, color); +// } +// +// public void colorDay(DayOfWeek day, HColor color) { +// colorDaysOfWeek.put(day, color); +// } +// +// public void nameDay(Day day, String name) { +// nameDays.put(day, name); +// } +// +// public Day getToday() { +// if (today == null) +// this.today = Day.today(); +// +// return today; +// } +// +// public void setTodayColors(CenterBorderColor colors) { +// if (today == null) +// this.today = Day.today(); +// +// colorDaysToday.put(today, colors.getCenter()); +// } +// +// public CommandExecutionResult setToday(Day date) { +// this.today = date; +// return CommandExecutionResult.ok(); +// } +// +// public CommandExecutionResult deleteTask(Task task) { +// task.setColors(new CenterBorderColor(HColors.WHITE, HColors.BLACK)); +// return CommandExecutionResult.ok(); +// } +// +// public void setPrintInterval(Day start, Day end) { +// this.printStart = start; +// this.printEnd = end; +// } +// +// public TaskDraw getTaskDraw(Task task) { +// return draws.get(task); +// } +// +// public CommandExecutionResult addNote(Display note) { +// Task last = null; +// for (Task current : tasks.values()) +// last = current; +// if (last == null) +// return CommandExecutionResult.error("No task defined"); +// +// last.setNote(note); +// return CommandExecutionResult.ok(); +// } + + public LoadPlanable getDefaultPlan() { + throw new UnsupportedOperationException(); + } + + @Override + public TaskDraw getTaskDraw(Task task) { + // TODO Auto-generated method stub + return null; + } + + @Override + public HColorSet getIHtmlColorSet() { + return colorSet; + } + +// private boolean showFootbox = true; +// +// public void setShowFootbox(boolean footbox) { +// this.showFootbox = footbox; +// +// } +// +// @Override +// public ClockwiseTopRightBottomLeft getDefaultMargins() { +// return ClockwiseTopRightBottomLeft.none(); +// } +// +// public void setLabelStrategy(LabelStrategy strategy) { +// this.labelStrategy = strategy; +// } +// +// private boolean withCalendarDate; +// +// public void setWithCalendarDate(boolean withCalendarDate) { +// this.withCalendarDate = withCalendarDate; +// } +// +// private boolean hideResourceName; +// private boolean hideResourceFoobox; +// +// public CommandExecutionResult hideResourceName() { +// this.hideResourceName = true; +// return CommandExecutionResult.ok(); +// } +// +// public CommandExecutionResult hideResourceFootbox() { +// this.hideResourceFoobox = true; +// return CommandExecutionResult.ok(); +// } +// +// private final Set verticalSeparatorBefore = new HashSet<>(); +// +// public void addVerticalSeparatorBefore(Day day) { +// verticalSeparatorBefore.add(day); +// } +// +// public void setTaskDefaultCompletion(int defaultCompletion) { +// this.defaultCompletion = defaultCompletion; +// } +// +// public List getAllTasksForResource(Resource res) { +// final List result = new ArrayList(); +// for (Task task : tasks.values()) +// if (task.isAssignedTo(res)) { +// final TaskDrawRegular draw = (TaskDrawRegular) draws.get(task); +// result.add(draw); +// } +// +// return Collections.unmodifiableList(result); +// } +// +// public void setIt(Task result) { +// this.it = result; +// } +// +// public Task getIt() { +// return it; +// } +// +// public final Resource getThey() { +// return they; +// } +// +// public final void setThey(Resource they) { +// this.they = they; +// } + +} diff --git a/src/net/sourceforge/plantuml/chronology/ChronologyDiagramFactory.java b/src/net/sourceforge/plantuml/chronology/ChronologyDiagramFactory.java new file mode 100644 index 000000000..063b908f9 --- /dev/null +++ b/src/net/sourceforge/plantuml/chronology/ChronologyDiagramFactory.java @@ -0,0 +1,126 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.chronology; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +import net.sourceforge.plantuml.command.Command; +import net.sourceforge.plantuml.command.CommonCommands; +import net.sourceforge.plantuml.command.PSystemCommandFactory; +import net.sourceforge.plantuml.core.DiagramType; +import net.sourceforge.plantuml.core.UmlSource; +import net.sourceforge.plantuml.project.command.NaturalCommand; +import net.sourceforge.plantuml.project.lang.SentenceAnd; +import net.sourceforge.plantuml.project.lang.SentenceAndAnd; +import net.sourceforge.plantuml.project.lang.SentenceSimple; +import net.sourceforge.plantuml.project.lang.Subject; + +public class ChronologyDiagramFactory extends PSystemCommandFactory { + + static private final List> subjects() { + return Arrays.asList(SubjectTask.ME); + } + + public ChronologyDiagramFactory() { + super(DiagramType.CHRONOLOGY); + } + + @Override + protected void initCommandsList(List cmds) { + CommonCommands.addTitleCommands(cmds); + CommonCommands.addCommonCommands2(cmds); + +// cmds.add(CommandStyleMultilinesCSS.ME); +// cmds.add(CommandStyleImport.ME); +// +// cmds.add(CommandNope.ME); + + addLanguageCommands(cmds); + +// cmds.add(new CommandGanttArrow()); +// cmds.add(new CommandGanttArrow2()); +// cmds.add(new CommandColorTask()); +// cmds.add(new CommandSeparator()); +// cmds.add(new CommandWeekNumberStrategy()); +// cmds.add(new CommandGroupStart()); +// cmds.add(new CommandGroupEnd()); +// +// cmds.add(new CommandLanguage()); +// cmds.add(new CommandPrintScale()); +// cmds.add(new CommandPrintBetween()); +// cmds.add(new CommandNoteBottom()); +// cmds.add(new CommandFootbox()); +// cmds.add(new CommandLabelOnColumn()); +// cmds.add(new CommandHideResourceName()); +// cmds.add(new CommandHideResourceFootbox()); +// cmds.add(new CommandTaskCompleteDefault()); + } + + private void addLanguageCommands(List cmd) { + for (Subject subject : subjects()) + for (SentenceSimple sentenceA : subject.getSentences()) { + cmd.add(NaturalCommand.create(sentenceA)); + for (SentenceSimple sentenceB : subject.getSentences()) { + final String signatureA = sentenceA.getSignature(); + final String signatureB = sentenceB.getSignature(); + if (signatureA.equals(signatureB) == false) + cmd.add(NaturalCommand.create(new SentenceAnd(sentenceA, sentenceB))); + + } + } + + for (Subject subject : subjects()) + for (SentenceSimple sentenceA : subject.getSentences()) + for (SentenceSimple sentenceB : subject.getSentences()) + for (SentenceSimple sentenceC : subject.getSentences()) { + final String signatureA = sentenceA.getSignature(); + final String signatureB = sentenceB.getSignature(); + final String signatureC = sentenceC.getSignature(); + if (signatureA.equals(signatureB) == false && signatureA.equals(signatureC) == false + && signatureC.equals(signatureB) == false) + cmd.add(NaturalCommand + .create(new SentenceAndAnd(sentenceA, sentenceB, sentenceC))); + } + } + + @Override + public ChronologyDiagram createEmptyDiagram(UmlSource source, Map skinParam) { + return new ChronologyDiagram(source); + } + +} diff --git a/src/net/sourceforge/plantuml/chronology/ComplementAnything.java b/src/net/sourceforge/plantuml/chronology/ComplementAnything.java new file mode 100644 index 000000000..436232f47 --- /dev/null +++ b/src/net/sourceforge/plantuml/chronology/ComplementAnything.java @@ -0,0 +1,54 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.chronology; + +import net.sourceforge.plantuml.project.Failable; +import net.sourceforge.plantuml.project.lang.Something; +import net.sourceforge.plantuml.regex.IRegex; +import net.sourceforge.plantuml.regex.RegexLeaf; +import net.sourceforge.plantuml.regex.RegexResult; + +public class ComplementAnything implements Something { + + public IRegex toRegex(String suffix) { + return new RegexLeaf("ANYTHING" + suffix, "(.*?)"); + } + + public Failable getMe(ChronologyDiagram system, RegexResult arg, String suffix) { + final String value = arg.get("ANYTHING" + suffix, 0); + return Failable.ok(value); + } +} diff --git a/src/net/sourceforge/plantuml/chronology/ComplementHour.java b/src/net/sourceforge/plantuml/chronology/ComplementHour.java new file mode 100644 index 000000000..d45338571 --- /dev/null +++ b/src/net/sourceforge/plantuml/chronology/ComplementHour.java @@ -0,0 +1,84 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.chronology; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.TimeZone; + +import net.sourceforge.plantuml.project.Failable; +import net.sourceforge.plantuml.project.lang.Something; +import net.sourceforge.plantuml.project.time.Day; +import net.sourceforge.plantuml.regex.IRegex; +import net.sourceforge.plantuml.regex.RegexConcat; +import net.sourceforge.plantuml.regex.RegexLeaf; +import net.sourceforge.plantuml.regex.RegexOptional; +import net.sourceforge.plantuml.regex.RegexResult; + +public class ComplementHour implements Something { + + // [Task1] starts at 2023-11-28 15:41:21, ends at 2023-11-28 19:40:00 + + static private final SimpleDateFormat inputFormat; + static private final SimpleDateFormat inputFormat2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); + + static { + inputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + inputFormat.setTimeZone(TimeZone.getTimeZone("GMT")); + + } + + public IRegex toRegex(String suffix) { + return new RegexConcat( // + new RegexLeaf("TIME", "(\\d+-\\d+-\\d+ \\d+:\\d+:\\d+)"), // + new RegexOptional(new RegexLeaf("MS", "\\.(\\d+)")) // + ); // + } + + public Failable getMe(ChronologyDiagram system, RegexResult arg, String suffix) { + final String value = arg.get("TIME", 0); + System.err.println("value=" + value); + try { + final Date date = inputFormat.parse(value); + return Failable.ok(Day.create(date.getTime())); + } catch (ParseException e) { + e.printStackTrace(); + } + throw new IllegalStateException(); + } + +} diff --git a/src/net/sourceforge/plantuml/chronology/HourPattern.java b/src/net/sourceforge/plantuml/chronology/HourPattern.java new file mode 100644 index 000000000..f34c49290 --- /dev/null +++ b/src/net/sourceforge/plantuml/chronology/HourPattern.java @@ -0,0 +1,136 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.chronology; + +import net.sourceforge.plantuml.project.time.Day; +import net.sourceforge.plantuml.project.time.Month; +import net.sourceforge.plantuml.regex.IRegex; +import net.sourceforge.plantuml.regex.RegexConcat; +import net.sourceforge.plantuml.regex.RegexLeaf; +import net.sourceforge.plantuml.regex.RegexOr; +import net.sourceforge.plantuml.regex.RegexResult; + +public class HourPattern { + + private final String id; + private final String yearKeyA; + private final String yearKeyB; + private final String yearKeyC; + private final String monthKeyA; + private final String monthKeyB; + private final String monthKeyC; + private final String dayKeyA; + private final String dayKeyB; + private final String dayKeyC; + + public HourPattern(String id) { + this.id = id; + this.yearKeyA = "AYEAR" + id; + this.yearKeyB = "BYEAR" + id; + this.yearKeyC = "CYEAR" + id; + this.monthKeyA = "AMONTH" + id; + this.monthKeyB = "BMONTH" + id; + this.monthKeyC = "CMONTH" + id; + this.dayKeyA = "ADAY" + id; + this.dayKeyB = "BDAY" + id; + this.dayKeyC = "CDAY" + id; + } + + public IRegex toRegex() { + return new RegexOr(toRegexA_DD_MONTH_YYYY(), toRegexB_YYYY_MM_DD(), toRegexC_MONTH_DD_YYYY()); + } + + public Day getDay(RegexResult arg) { + if (arg.get(dayKeyA, 0) != null) + return resultA(arg); + + if (arg.get(dayKeyB, 0) != null) + return resultB(arg); + + if (arg.get(dayKeyC, 0) != null) + return resultC(arg); + return null; + } + + private IRegex toRegexA_DD_MONTH_YYYY() { + return new RegexConcat( // + new RegexLeaf(dayKeyA, "([\\d]{1,2})"), // + new RegexLeaf("[\\w, ]*?"), // + new RegexLeaf(monthKeyA, "(" + Month.getRegexString() + ")"), // + new RegexLeaf("[\\w, ]*?"), // + new RegexLeaf(yearKeyA, "([\\d]{1,4})")); + } + + private Day resultA(RegexResult arg) { + final int day = Integer.parseInt(arg.get(dayKeyA, 0)); + final String month = arg.get(monthKeyA, 0); + final int year = Integer.parseInt(arg.get(yearKeyA, 0)); + return Day.create(year, month, day); + } + + private IRegex toRegexB_YYYY_MM_DD() { + return new RegexConcat( // + new RegexLeaf(yearKeyB, "([\\d]{1,4})"), // + new RegexLeaf("\\D"), // + new RegexLeaf(monthKeyB, "([\\d]{1,2})"), // + new RegexLeaf("\\D"), // + new RegexLeaf(dayKeyB, "([\\d]{1,2})")); + } + + private Day resultB(RegexResult arg) { + final int day = Integer.parseInt(arg.get(dayKeyB, 0)); + final int month = Integer.parseInt(arg.get(monthKeyB, 0)); + final int year = Integer.parseInt(arg.get(yearKeyB, 0)); + return Day.create(year, month, day); + } + + private IRegex toRegexC_MONTH_DD_YYYY() { + return new RegexConcat( // + new RegexLeaf(monthKeyC, "(" + Month.getRegexString() + ")"), // + new RegexLeaf("[\\w, ]*?"), // + new RegexLeaf(dayKeyC, "([\\d]{1,2})"), // + new RegexLeaf("[\\w, ]*?"), // + new RegexLeaf(yearKeyC, "([\\d]{1,4})")); + } + + private Day resultC(RegexResult arg) { + final int day = Integer.parseInt(arg.get(dayKeyC, 0)); + final String month = arg.get(monthKeyC, 0); + final int year = Integer.parseInt(arg.get(yearKeyC, 0)); + return Day.create(year, month, day); + } + +} diff --git a/src/net/sourceforge/plantuml/chronology/SentenceHappensChronology.java b/src/net/sourceforge/plantuml/chronology/SentenceHappensChronology.java new file mode 100644 index 000000000..2cfb488db --- /dev/null +++ b/src/net/sourceforge/plantuml/chronology/SentenceHappensChronology.java @@ -0,0 +1,60 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.chronology; + +import net.sourceforge.plantuml.command.CommandExecutionResult; +import net.sourceforge.plantuml.project.core.Task; +import net.sourceforge.plantuml.project.lang.SentenceSimple; +import net.sourceforge.plantuml.project.lang.Verbs; +import net.sourceforge.plantuml.project.lang.Words; +import net.sourceforge.plantuml.project.time.Day; + +public class SentenceHappensChronology extends SentenceSimple { + + public SentenceHappensChronology() { + super(SubjectTask.ME, Verbs.happens, Words.zeroOrMore(Words.THE, Words.ON, Words.AT), new ComplementHour()); + } + + @Override + public CommandExecutionResult execute(ChronologyDiagram project, Object subject, Object complement) { + final Task task = (Task) subject; + final Day start = (Day) complement; + task.setStart(start); + task.setEnd(start); + return CommandExecutionResult.ok(); + } + +} diff --git a/src/net/sourceforge/plantuml/chronology/SubjectTask.java b/src/net/sourceforge/plantuml/chronology/SubjectTask.java new file mode 100644 index 000000000..cd5eeb396 --- /dev/null +++ b/src/net/sourceforge/plantuml/chronology/SubjectTask.java @@ -0,0 +1,92 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.chronology; + +import java.util.Arrays; +import java.util.Collection; + +import net.sourceforge.plantuml.project.Failable; +import net.sourceforge.plantuml.project.core.Task; +import net.sourceforge.plantuml.project.lang.SentenceSimple; +import net.sourceforge.plantuml.project.lang.Subject; +import net.sourceforge.plantuml.project.lang.Words; +import net.sourceforge.plantuml.regex.IRegex; +import net.sourceforge.plantuml.regex.RegexConcat; +import net.sourceforge.plantuml.regex.RegexLeaf; +import net.sourceforge.plantuml.regex.RegexOptional; +import net.sourceforge.plantuml.regex.RegexOr; +import net.sourceforge.plantuml.regex.RegexResult; +import net.sourceforge.plantuml.stereo.Stereotype; +import net.sourceforge.plantuml.stereo.StereotypePattern; + +public class SubjectTask implements Subject { + + public static final Subject ME = new SubjectTask(); + + private SubjectTask() { + } + + public Failable getMe(ChronologyDiagram chronology, RegexResult arg) { + final Task result; + + final String subject = arg.get("SUBJECT", 0); + final String shortName = arg.get("SHORTNAME", 0); + final String stereotype = arg.get("STEREOTYPE", 0); + + result = chronology.getOrCreateTask(subject, shortName, false); + + if (stereotype != null) + result.setStereotype(Stereotype.build(arg.get("STEREOTYPE", 0))); + + return Failable.ok(result); + } + + public Collection> getSentences() { + return Arrays.asList(new SentenceHappensChronology()); + } + + public IRegex toRegex() { + return new RegexOr( // + new RegexLeaf("SUBJECT", "\\[([^\\[\\]]+?)\\]"), // + StereotypePattern.optional("STEREOTYPE"), // + new RegexOptional(new RegexConcat(// + Words.exactly(Words.AS), // + RegexLeaf.spaceOneOrMore(), // + new RegexLeaf("SHORTNAME", "\\[([^\\[\\]]+?)\\]"))) // + ); + } + +} diff --git a/src/net/sourceforge/plantuml/chronology/TaskChronology.java b/src/net/sourceforge/plantuml/chronology/TaskChronology.java new file mode 100644 index 000000000..20d877c1e --- /dev/null +++ b/src/net/sourceforge/plantuml/chronology/TaskChronology.java @@ -0,0 +1,372 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.chronology; + +import net.sourceforge.plantuml.klimt.creole.Display; +import net.sourceforge.plantuml.project.Load; +import net.sourceforge.plantuml.project.core.AbstractTask; +import net.sourceforge.plantuml.project.core.Resource; +import net.sourceforge.plantuml.project.core.Task; +import net.sourceforge.plantuml.project.core.TaskCode; +import net.sourceforge.plantuml.project.lang.CenterBorderColor; +import net.sourceforge.plantuml.project.time.Day; +import net.sourceforge.plantuml.project.time.DayOfWeek; +import net.sourceforge.plantuml.style.StyleBuilder; +import net.sourceforge.plantuml.url.Url; + +public class TaskChronology extends AbstractTask implements Task { + + private Display note; + + private Url url; + private CenterBorderColor[] colors; + + private Day start; + private Day end; + + public void setUrl(Url url) { + this.url = url; + } + + public TaskChronology(StyleBuilder styleBuilder, TaskCode code) { + super(styleBuilder, code); + } + + @Override + public void setStart(Day start) { + this.start = start; + + } + + @Override + public Day getStart() { + return this.start; + } + + @Override + public void setEnd(Day end) { + this.end = end; + } + + @Override + public Day getEnd() { + return this.end; + } + + @Override + public Load getLoad() { + throw new UnsupportedOperationException(); + } + + @Override + public void setLoad(Load load) { + throw new UnsupportedOperationException(); + } + + @Override + public void addResource(Resource resource, int percentage) { + throw new UnsupportedOperationException(); + } + + @Override + public void setDiamond(boolean diamond) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean isDiamond() { + return false; + } + + @Override + public void setCompletion(int completion) { + throw new UnsupportedOperationException(); + } + + @Override + public void addPause(Day pause) { + throw new UnsupportedOperationException(); + } + + @Override + public void addPause(DayOfWeek pause) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean isAssignedTo(Resource res) { + throw new UnsupportedOperationException(); + } + +// @Override +// public int getLoadAt(Day instant) { +// if (isPaused(instant)) +// return 0; +// +// LoadPlanable result = defaultPlan; +// if (resources.size() > 0) +// result = PlanUtils.multiply(defaultPlan, getResourcePlan()); +// +// return result.getLoadAt(instant); +// } +// +// private boolean isPaused(Day instant) { +// if (pausedDay.contains(instant)) +// return true; +// +// if (pausedDayOfWeek(instant)) +// return true; +// +// return false; +// } +// +// private boolean pausedDayOfWeek(Day instant) { +// for (DayOfWeek dayOfWeek : pausedDayOfWeek) +// if (instant.getDayOfWeek() == dayOfWeek) +// return true; +// +// return false; +// } +// +// public int loadForResource(Resource res, Day instant) { +// if (resources.keySet().contains(res) && instant.compareTo(getStart()) >= 0 +// && instant.compareTo(getEnd()) <= 0) { +// if (isPaused(instant)) +// return 0; +// +// if (res.isClosedAt(instant)) +// return 0; +// +// return resources.get(res); +// } +// return 0; +// } +// +// @Override +// public void addPause(Day pause) { +// this.pausedDay.add(pause); +// } +// +// @Override +// public void addPause(DayOfWeek pause) { +// this.pausedDayOfWeek.add(pause); +// } +// +// private LoadPlanable getResourcePlan() { +// if (resources.size() == 0) +// throw new IllegalStateException(); +// +// return new LoadPlanable() { +// public int getLoadAt(Day instant) { +// int result = 0; +// for (Map.Entry ent : resources.entrySet()) { +// final Resource res = ent.getKey(); +// if (res.isClosedAt(instant)) +// continue; +// +// final int percentage = ent.getValue(); +// result += percentage; +// } +// return result; +// } +// +// @Override +// public Day getLastDayIfAny() { +// return TaskChronology.this.getLastDayIfAny(); +// } +// }; +// } +// +// @Override +// public Day getLastDayIfAny() { +// Day result = null; +// +// for (Resource res : resources.keySet()) { +// if (res.getLastDayIfAny() == null) +// return null; +// +// if (result == null || result.compareTo(res.getLastDayIfAny()) < 0) +// result = res.getLastDayIfAny(); +// } +// +// return result; +// } +// +// public String getPrettyDisplay() { +// if (resources.size() > 0) { +// final StringBuilder result = new StringBuilder(getCode().getSimpleDisplay()); +// result.append(" "); +// for (Iterator> it = resources.entrySet().iterator(); it.hasNext();) { +// final Map.Entry ent = it.next(); +// result.append("{"); +// result.append(ent.getKey().getName()); +// final int percentage = ent.getValue(); +// if (percentage != 100) +// result.append(":" + percentage + "%"); +// +// result.append("}"); +// if (it.hasNext()) +// result.append(" "); +// +// } +// return result.toString(); +// } +// return getCode().getSimpleDisplay(); +// } +// +// @Override +// public String toString() { +// return getCode().toString(); +// } +// +// public String debug() { +// return "" + getStart() + " ---> " + getEnd() + " [" + getLoad() + "]"; +// } +// +// @Override +// public Day getStart() { +// Day result = (Day) solver.getData(TaskAttribute.START); +// if (diamond == false) +// while (getLoadAt(result) == 0) +// result = result.increment(); +// +// return result; +// } +// +// @Override +// public Day getEnd() { +// return (Day) solver.getData(TaskAttribute.END); +// } +// +// @Override +// public Load getLoad() { +// return (Load) solver.getData(TaskAttribute.LOAD); +// } +// +// @Override +// public void setLoad(Load load) { +// solver.setData(TaskAttribute.LOAD, load); +// } +// +// @Override +// public void setStart(Day start) { +// solver.setData(TaskAttribute.START, start); +// } +// +// @Override +// public void setEnd(Day end) { +// solver.setData(TaskAttribute.END, end); +// } + + @Override + public void setColors(CenterBorderColor... colors) { + this.colors = colors; + } + +// @Override +// public void addResource(Resource resource, int percentage) { +// this.resources.put(resource, percentage); +// } +// +// @Override +// public void setDiamond(boolean diamond) { +// this.diamond = diamond; +// } +// +// @Override +// public boolean isDiamond() { +// return this.diamond; +// } +// +// @Override +// public void setCompletion(int completion) { +// this.completion = completion; +// } +// +// public final Url getUrl() { +// return url; +// } +// +// public final CenterBorderColor getColors() { +// if (colors == null) +// return null; +// +// if (colors.length == 1) +// return colors[0]; +// +// return colors[0].unlinearTo(colors[1], completion); +// } +// +// public final int getCompletion() { +// return completion; +// } +// +// public final Collection getAllPaused() { +// final SortedSet result = new TreeSet<>(pausedDay); +// for (DayOfWeek dayOfWeek : pausedDayOfWeek) +// addAll(result, dayOfWeek); +// +// return Collections.unmodifiableCollection(result); +// } +// +// private void addAll(SortedSet result, DayOfWeek dayOfWeek) { +// final Day start = getStart(); +// final Day end = getEnd(); +// for (Day current = start; current.compareTo(end) <= 0; current = current.increment()) +// if (current.getDayOfWeek() == dayOfWeek) +// result.add(current); +// +// } + + @Override + public void setNote(Display note) { + this.note = note; + } + + public Display getNote() { + return note; + } + +// public LoadPlanable getDefaultPlan() { +// return defaultPlan; +// } +// +// @Override +// public boolean isAssignedTo(Resource res) { +// return resources.containsKey(res); +// } + +} diff --git a/src/net/sourceforge/plantuml/chronology/TimeHeaderChronology.java b/src/net/sourceforge/plantuml/chronology/TimeHeaderChronology.java new file mode 100644 index 000000000..fca77fb27 --- /dev/null +++ b/src/net/sourceforge/plantuml/chronology/TimeHeaderChronology.java @@ -0,0 +1,197 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.chronology; + +import net.sourceforge.plantuml.klimt.UTranslate; +import net.sourceforge.plantuml.klimt.color.HColor; +import net.sourceforge.plantuml.klimt.creole.Display; +import net.sourceforge.plantuml.klimt.drawing.UGraphic; +import net.sourceforge.plantuml.klimt.font.FontConfiguration; +import net.sourceforge.plantuml.klimt.font.StringBounder; +import net.sourceforge.plantuml.klimt.font.UFont; +import net.sourceforge.plantuml.klimt.geom.HorizontalAlignment; +import net.sourceforge.plantuml.klimt.shape.TextBlock; +import net.sourceforge.plantuml.klimt.shape.ULine; +import net.sourceforge.plantuml.klimt.sprite.SpriteContainerEmpty; +import net.sourceforge.plantuml.project.TimeHeaderParameters; +import net.sourceforge.plantuml.project.core.PrintScale; +import net.sourceforge.plantuml.project.draw.TimeHeader; +import net.sourceforge.plantuml.project.time.Day; +import net.sourceforge.plantuml.project.timescale.TimeScale; +import net.sourceforge.plantuml.style.PName; +import net.sourceforge.plantuml.style.SName; + +public class TimeHeaderChronology extends TimeHeader { + + private final PrintScale printScale; + + @Override + public double getFullHeaderHeight(StringBounder stringBounder) { + return getTimeHeaderHeight(stringBounder) + getHeaderNameDayHeight(); + } + + @Override + public double getTimeHeaderHeight(StringBounder stringBounder) { + final double h = thParam.getStyle(SName.timeline, SName.day).value(PName.FontSize).asDouble(); + return h + 6; + } + + @Override + public double getTimeFooterHeight(StringBounder stringBounder) { + final double h = thParam.getStyle(SName.timeline, SName.day).value(PName.FontSize).asDouble(); + return h + 6; + } + + private double getHeaderNameDayHeight() { + return 0; + } + + public TimeHeaderChronology(StringBounder stringBounder, TimeHeaderParameters thParam, PrintScale printScale, + TimeScaleChronology timeScale) { + super(thParam, timeScale); + this.printScale = printScale; + } + + private void drawSmallVlinesDay(UGraphic ug, TimeScale timeScale, double totalHeightWithoutFooter) { + ug = ug.apply(getLineColor()); + ug = ug.apply(UTranslate.dy(6)); + final ULine vbar = ULine.vline(totalHeightWithoutFooter + 2); + for (Day i = getMin(); i.compareTo(getMax().increment()) < 0; i = i.increment(printScale)) { + final double x1 = timeScale.getStartingPosition(i); + ug.apply(UTranslate.dx(x1)).draw(vbar); + } + } + + private void drawSimpleDayCounter(UGraphic ug, TimeScale timeScale) { + for (Day i = getMin(); i.compareTo(getMax().increment()) < 0; i = i.increment(printScale)) { + final UFont font = thParam.getStyle(SName.timeline, SName.day).getUFont(); + final FontConfiguration fontConfiguration = getFontConfiguration(font, false, openFontColor()); + final TextBlock num = Display.getWithNewlines(i.toStringShort(thParam.getLocale())) + .create(fontConfiguration, HorizontalAlignment.LEFT, new SpriteContainerEmpty()); + final double x1 = timeScale.getStartingPosition(i); + final double x2; + if (printScale == PrintScale.WEEKLY) + x2 = timeScale.getEndingPosition(i.addDays(6)); + else + x2 = timeScale.getEndingPosition(i); + final double width = num.calculateDimension(ug.getStringBounder()).getWidth(); + final double delta = (x2 - x1) - width; + if (i.compareTo(getMax().increment()) < 0) + num.drawU(ug.apply(UTranslate.dx(x1 + delta / 2))); + + } + } + + @Override + public void drawTimeHeader(UGraphic ug, double totalHeightWithoutFooter) { + // drawTextsBackground(ug.apply(UTranslate.dy(-3)), totalHeightWithoutFooter + + // 6); + final double xmin = getTimeScale().getStartingPosition(getMin()); + final double xmax = getTimeScale().getEndingPosition(getMax()); + drawSmallVlinesDay(ug, getTimeScale(), totalHeightWithoutFooter); + // printVerticalSeparators(ug, totalHeightWithoutFooter); + drawSimpleDayCounter(ug, getTimeScale()); + // ug = ug.apply(getLineColor()); + // ug.draw(ULine.hline(xmax - xmin)); + // ug.apply(UTranslate.dy(getFullHeaderHeight(ug.getStringBounder()) - + // 3)).draw(ULine.hline(xmax - xmin)); + + } + + @Override + public void drawTimeFooter(UGraphic ug) { + final double xmin = getTimeScale().getStartingPosition(getMin()); + final double xmax = getTimeScale().getEndingPosition(getMax()); + ug = ug.apply(UTranslate.dy(3)); + // drawSmallVlinesDay(ug, getTimeScale(), + // getTimeFooterHeight(ug.getStringBounder()) - 3); + drawSimpleDayCounter(ug, getTimeScale()); + // ug.apply(getLineColor()).draw(ULine.hline(xmax - xmin)); + } + + // Duplicate in TimeHeaderDaily + class Pending { + final double x1; + double x2; + final HColor color; + + Pending(HColor color, double x1, double x2) { + this.x1 = x1; + this.x2 = x2; + this.color = color; + } + + public void draw(UGraphic ug, double height) { + drawRectangle(ug.apply(color.bg()), height, x1, x2); + } + } + + protected final void drawTextsBackground(UGraphic ug, double totalHeightWithoutFooter) { + + final double height = totalHeightWithoutFooter - getFullHeaderHeight(ug.getStringBounder()); + Pending pending = null; + + for (Day wink = getMin(); wink.compareTo(getMax()) <= 0; wink = wink.increment()) { + final double x1 = getTimeScale().getStartingPosition(wink); + final double x2 = getTimeScale().getEndingPosition(wink); + HColor back = thParam.getColor(wink); +// // Day of week should be stronger than period of time (back color). +// final HColor backDoW = colorDaysOfWeek.get(wink.getDayOfWeek()); +// if (backDoW != null) { +// back = backDoW; +// } +// if (back == null && defaultPlan.getLoadAt(wink) == 0) { +// back = closedBackgroundColor(); +// } + if (back == null) { + if (pending != null) + pending.draw(ug, height); + pending = null; + } else { + if (pending != null && pending.color.equals(back) == false) { + pending.draw(ug, height); + pending = null; + } + if (pending == null) + pending = new Pending(back, x1, x2); + else + pending.x2 = x2; + + } + } + } + +} diff --git a/src/net/sourceforge/plantuml/chronology/TimeScaleChronology.java b/src/net/sourceforge/plantuml/chronology/TimeScaleChronology.java new file mode 100644 index 000000000..b77f714cd --- /dev/null +++ b/src/net/sourceforge/plantuml/chronology/TimeScaleChronology.java @@ -0,0 +1,81 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.chronology; + +import net.sourceforge.plantuml.project.time.Day; +import net.sourceforge.plantuml.project.timescale.TimeScale; + +public class TimeScaleChronology implements TimeScale { + + private final double fullWidth; + private long min; + private long max; + + public TimeScaleChronology(double fullWidth) { + this.fullWidth = fullWidth; + } + + public double getStartingPosition(Day instant) { + final long wink = instant.getMillis(); + if (wink < min) + throw new IllegalArgumentException(); + if (wink > max) + throw new IllegalArgumentException(); + + return fullWidth * (wink - min) / (max - min); + } + + public double getEndingPosition(Day instant) { + return getStartingPosition(instant); + } + + public double getWidth(Day instant) { + throw new UnsupportedOperationException(); + } + + public boolean isBreaking(Day instant) { + throw new UnsupportedOperationException(); + } + + public final void setMin(long min) { + this.min = min; + } + + public final void setMax(long max) { + this.max = max; + } + +} diff --git a/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClass.java b/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClass.java index 7f42d13f0..0b5c8cd73 100644 --- a/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClass.java +++ b/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClass.java @@ -58,6 +58,7 @@ import net.sourceforge.plantuml.regex.RegexOr; import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.stereo.Stereotag; 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; @@ -101,9 +102,7 @@ public class CommandCreateClass extends SingleLineCommand2 { new RegexLeaf("GENERIC", "\\<(" + GenericRegexProducer.PATTERN + ")\\>"))), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("TAGS1", Stereotag.pattern() + "?"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO"), // new RegexLeaf("TAGS2", Stereotag.pattern() + "?"), // RegexLeaf.spaceZeroOrMore(), // UrlBuilder.OPTIONAL, // diff --git a/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClassMultilines.java b/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClassMultilines.java index 2ddf84b86..dc1719990 100644 --- a/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClassMultilines.java +++ b/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClassMultilines.java @@ -65,6 +65,7 @@ import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.skin.VisibilityModifier; import net.sourceforge.plantuml.stereo.Stereotag; import net.sourceforge.plantuml.stereo.Stereotype; +import net.sourceforge.plantuml.stereo.StereotypePattern; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.url.Url; import net.sourceforge.plantuml.url.UrlBuilder; @@ -115,9 +116,7 @@ public class CommandCreateClassMultilines extends CommandMultilines2"))), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("TAGS1", Stereotag.pattern() + "?"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO", "(\\<\\<.+\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO"), // new RegexLeaf("TAGS2", Stereotag.pattern() + "?"), // RegexLeaf.spaceZeroOrMore(), // UrlBuilder.OPTIONAL, // diff --git a/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateElementFull2.java b/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateElementFull2.java index 906f0d877..cb1a677e8 100644 --- a/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateElementFull2.java +++ b/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateElementFull2.java @@ -53,11 +53,11 @@ import net.sourceforge.plantuml.klimt.font.FontParam; import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; -import net.sourceforge.plantuml.regex.RegexOptional; import net.sourceforge.plantuml.regex.RegexOr; import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.stereo.Stereotag; 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; @@ -88,21 +88,14 @@ public class CommandCreateElementFull2 extends SingleLineCommand2 new RegexLeaf("CODE1", CommandCreateElementFull.CODE_WITH_QUOTE), // new RegexConcat(// new RegexLeaf("DISPLAY2", CommandCreateElementFull.DISPLAY), // - new RegexOptional( // - new RegexConcat( // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("STEREOTYPE2", "(\\<\\<.+\\>\\>)") // - )), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREOTYPE2"), // new RegexLeaf("as"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("CODE2", CommandCreateElementFull.CODE)) // ), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("TAGS1", Stereotag.pattern() + "?"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREOTYPE", "(\\<\\<.+\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREOTYPE"), // new RegexLeaf("TAGS2", Stereotag.pattern() + "?"), // RegexLeaf.spaceZeroOrMore(), // UrlBuilder.OPTIONAL, // @@ -118,21 +111,14 @@ public class CommandCreateElementFull2 extends SingleLineCommand2 new RegexLeaf("CODE1", CommandCreateElementFull.CODE_WITH_QUOTE), // new RegexConcat(// new RegexLeaf("DISPLAY2", CommandCreateElementFull.DISPLAY), // - new RegexOptional( // - new RegexConcat( // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("STEREOTYPE2", "(\\<\\<.+\\>\\>)") // - )), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREOTYPE2"), // new RegexLeaf("as"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("CODE2", CommandCreateElementFull.CODE)) // ), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("TAGS1", Stereotag.pattern() + "?"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREOTYPE", "(\\<\\<.+\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREOTYPE"), // new RegexLeaf("TAGS2", Stereotag.pattern() + "?"), // RegexLeaf.spaceZeroOrMore(), // UrlBuilder.OPTIONAL, // diff --git a/src/net/sourceforge/plantuml/classdiagram/command/CommandStereotype.java b/src/net/sourceforge/plantuml/classdiagram/command/CommandStereotype.java index d4b8686b5..4d762c4f8 100644 --- a/src/net/sourceforge/plantuml/classdiagram/command/CommandStereotype.java +++ b/src/net/sourceforge/plantuml/classdiagram/command/CommandStereotype.java @@ -47,6 +47,7 @@ import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; 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 CommandStereotype extends SingleLineCommand2 { @@ -60,7 +61,8 @@ public class CommandStereotype extends SingleLineCommand2 { RegexLeaf.start(), // new RegexLeaf("NAME", "([%pLN_.]+|[%g][^%g]+[%g])"), // RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO", "(\\<\\<.*\\>\\>)"), RegexLeaf.end()); // + StereotypePattern.mandatory("STEREO"), // + RegexLeaf.end()); // } @Override diff --git a/src/net/sourceforge/plantuml/command/CommandNamespace.java b/src/net/sourceforge/plantuml/command/CommandNamespace.java index 67cf02b22..9404cd513 100644 --- a/src/net/sourceforge/plantuml/command/CommandNamespace.java +++ b/src/net/sourceforge/plantuml/command/CommandNamespace.java @@ -50,6 +50,7 @@ import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; 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; @@ -68,9 +69,7 @@ public class CommandNamespace extends SingleLineCommand2 { new RegexLeaf("namespace"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("NAME", NAMESPACE_REGEX), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREOTYPE"), // UrlBuilder.OPTIONAL, // RegexLeaf.spaceZeroOrMore(), // ColorParser.exp1(), // diff --git a/src/net/sourceforge/plantuml/command/CommandNamespace2.java b/src/net/sourceforge/plantuml/command/CommandNamespace2.java index 768b1a181..f32845c77 100644 --- a/src/net/sourceforge/plantuml/command/CommandNamespace2.java +++ b/src/net/sourceforge/plantuml/command/CommandNamespace2.java @@ -48,6 +48,7 @@ import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; 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; @@ -72,9 +73,7 @@ public class CommandNamespace2 extends SingleLineCommand2 { RegexLeaf.spaceOneOrMore(), // new RegexLeaf("NAME", CommandNamespace.NAMESPACE_REGEX), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREOTYPE"), // UrlBuilder.OPTIONAL, // RegexLeaf.spaceZeroOrMore(), // ColorParser.exp1(), // diff --git a/src/net/sourceforge/plantuml/command/CommandNamespaceEmpty.java b/src/net/sourceforge/plantuml/command/CommandNamespaceEmpty.java index 6e9e9c81b..00a0ab641 100644 --- a/src/net/sourceforge/plantuml/command/CommandNamespaceEmpty.java +++ b/src/net/sourceforge/plantuml/command/CommandNamespaceEmpty.java @@ -48,6 +48,7 @@ import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; 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; @@ -64,9 +65,7 @@ public class CommandNamespaceEmpty extends SingleLineCommand2 { new RegexLeaf("namespace"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("NAME", CommandNamespace.NAMESPACE_REGEX), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREOTYPE"), // UrlBuilder.OPTIONAL, // RegexLeaf.spaceZeroOrMore(), // ColorParser.exp1(), // diff --git a/src/net/sourceforge/plantuml/command/CommandPackage.java b/src/net/sourceforge/plantuml/command/CommandPackage.java index d0d64c477..934bd4020 100644 --- a/src/net/sourceforge/plantuml/command/CommandPackage.java +++ b/src/net/sourceforge/plantuml/command/CommandPackage.java @@ -55,6 +55,7 @@ import net.sourceforge.plantuml.regex.RegexOptional; import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.stereo.Stereotag; 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; @@ -80,9 +81,7 @@ public class CommandPackage extends SingleLineCommand2 { )), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("TAGS1", Stereotag.pattern() + "?"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREOTYPE"), // new RegexLeaf("TAGS2", Stereotag.pattern() + "?"), // RegexLeaf.spaceZeroOrMore(), // UrlBuilder.OPTIONAL, // diff --git a/src/net/sourceforge/plantuml/command/note/CommandFactoryNote.java b/src/net/sourceforge/plantuml/command/note/CommandFactoryNote.java index 65a763e9b..bc89bf64a 100644 --- a/src/net/sourceforge/plantuml/command/note/CommandFactoryNote.java +++ b/src/net/sourceforge/plantuml/command/note/CommandFactoryNote.java @@ -55,6 +55,7 @@ import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.stereo.Stereotag; import net.sourceforge.plantuml.stereo.Stereotype; +import net.sourceforge.plantuml.stereo.StereotypePattern; import net.sourceforge.plantuml.utils.BlocLines; import net.sourceforge.plantuml.utils.LineLocation; @@ -70,9 +71,7 @@ public final class CommandFactoryNote implements SingleMultiFactoryCommand\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO"), // ColorParser.exp1(), // RegexLeaf.end() // ); @@ -91,9 +90,7 @@ public final class CommandFactoryNote implements SingleMultiFactoryCommand\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO"), // ColorParser.exp1(), // RegexLeaf.end() // ); diff --git a/src/net/sourceforge/plantuml/command/note/CommandFactoryNoteOnEntity.java b/src/net/sourceforge/plantuml/command/note/CommandFactoryNoteOnEntity.java index 363f8809e..f3d7f37ea 100644 --- a/src/net/sourceforge/plantuml/command/note/CommandFactoryNoteOnEntity.java +++ b/src/net/sourceforge/plantuml/command/note/CommandFactoryNoteOnEntity.java @@ -63,6 +63,7 @@ import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.skin.ColorParam; import net.sourceforge.plantuml.stereo.Stereotag; 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; @@ -92,9 +93,7 @@ public final class CommandFactoryNoteOnEntity implements SingleMultiFactoryComma new RegexLeaf("")), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("TAGS1", Stereotag.pattern() + "?"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO"), // new RegexLeaf("TAGS2", Stereotag.pattern() + "?"), // RegexLeaf.spaceZeroOrMore(), // color().getRegex(), // @@ -127,9 +126,7 @@ public final class CommandFactoryNoteOnEntity implements SingleMultiFactoryComma new RegexLeaf("")), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("TAGS1", Stereotag.pattern() + "?"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO"), // new RegexLeaf("TAGS2", Stereotag.pattern() + "?"), // RegexLeaf.spaceZeroOrMore(), // color().getRegex(), // @@ -153,9 +150,7 @@ public final class CommandFactoryNoteOnEntity implements SingleMultiFactoryComma new RegexLeaf("")), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("TAGS1", Stereotag.pattern() + "?"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO"), // new RegexLeaf("TAGS2", Stereotag.pattern() + "?"), // RegexLeaf.spaceZeroOrMore(), // color().getRegex(), // diff --git a/src/net/sourceforge/plantuml/command/note/CommandFactoryTipOnEntity.java b/src/net/sourceforge/plantuml/command/note/CommandFactoryTipOnEntity.java index bdfac6571..edfb84034 100644 --- a/src/net/sourceforge/plantuml/command/note/CommandFactoryTipOnEntity.java +++ b/src/net/sourceforge/plantuml/command/note/CommandFactoryTipOnEntity.java @@ -61,6 +61,7 @@ import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.skin.ColorParam; import net.sourceforge.plantuml.stereo.Stereotag; 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; @@ -89,9 +90,7 @@ public final class CommandFactoryTipOnEntity implements SingleMultiFactoryComman partialPattern, // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("TAGS1", Stereotag.pattern() + "?"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO"), // new RegexLeaf("TAGS2", Stereotag.pattern() + "?"), // RegexLeaf.spaceZeroOrMore(), // ColorParser.exp1(), // @@ -112,9 +111,7 @@ public final class CommandFactoryTipOnEntity implements SingleMultiFactoryComman partialPattern, // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("TAGS1", Stereotag.pattern() + "?"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO"), // new RegexLeaf("TAGS2", Stereotag.pattern() + "?"), // RegexLeaf.spaceZeroOrMore(), // ColorParser.exp1(), // diff --git a/src/net/sourceforge/plantuml/command/note/sequence/FactorySequenceNoteAcrossCommand.java b/src/net/sourceforge/plantuml/command/note/sequence/FactorySequenceNoteAcrossCommand.java index ccbbfb5ad..a93e0bafe 100644 --- a/src/net/sourceforge/plantuml/command/note/sequence/FactorySequenceNoteAcrossCommand.java +++ b/src/net/sourceforge/plantuml/command/note/sequence/FactorySequenceNoteAcrossCommand.java @@ -57,6 +57,7 @@ import net.sourceforge.plantuml.sequencediagram.Participant; import net.sourceforge.plantuml.sequencediagram.SequenceDiagram; import net.sourceforge.plantuml.skin.ColorParam; 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; @@ -70,13 +71,9 @@ public final class FactorySequenceNoteAcrossCommand implements SingleMultiFactor new RegexLeaf("VMERGE", "(/)?"), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("STYLE", "(note|hnote|rnote)"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO1", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO1"), // new RegexLeaf("ACROSS", "(accross|across)"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO2", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO2"), // color().getRegex(), // RegexLeaf.spaceZeroOrMore(), // UrlBuilder.OPTIONAL, // @@ -89,13 +86,9 @@ public final class FactorySequenceNoteAcrossCommand implements SingleMultiFactor new RegexLeaf("VMERGE", "(/)?"), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("STYLE", "(note|hnote|rnote)"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO1", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO1"), // new RegexLeaf("ACROSS", "(accross|across)"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO2", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO2"), // color().getRegex(), // RegexLeaf.spaceZeroOrMore(), // UrlBuilder.OPTIONAL, // diff --git a/src/net/sourceforge/plantuml/command/note/sequence/FactorySequenceNoteCommand.java b/src/net/sourceforge/plantuml/command/note/sequence/FactorySequenceNoteCommand.java index fb6a746fb..c5a0d4596 100644 --- a/src/net/sourceforge/plantuml/command/note/sequence/FactorySequenceNoteCommand.java +++ b/src/net/sourceforge/plantuml/command/note/sequence/FactorySequenceNoteCommand.java @@ -59,6 +59,7 @@ import net.sourceforge.plantuml.sequencediagram.Participant; import net.sourceforge.plantuml.sequencediagram.SequenceDiagram; import net.sourceforge.plantuml.skin.ColorParam; 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; @@ -66,7 +67,7 @@ import net.sourceforge.plantuml.utils.BlocLines; import net.sourceforge.plantuml.utils.LineLocation; public final class FactorySequenceNoteCommand implements SingleMultiFactoryCommand { - // ::remove folder when __HAXE__ + // ::remove folder when __HAXE__ private IRegex getRegexConcatMultiLine() { return RegexConcat.build(FactorySequenceNoteCommand.class.getName() + "multi", RegexLeaf.start(), // @@ -74,15 +75,11 @@ public final class FactorySequenceNoteCommand implements SingleMultiFactoryComma new RegexLeaf("VMERGE", "(/)?"), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("STYLE", "(note|hnote|rnote)"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO1", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO1"), // new RegexLeaf("POSITION", "(right|left|over)"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("PARTICIPANT", "(?:of[%s]+)?([%pLN_.@]+|[%g][^%g]+[%g])"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO2", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO2"), // color().getRegex(), // RegexLeaf.spaceZeroOrMore(), // UrlBuilder.OPTIONAL, // @@ -95,15 +92,11 @@ public final class FactorySequenceNoteCommand implements SingleMultiFactoryComma new RegexLeaf("VMERGE", "(/)?"), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("STYLE", "(note|hnote|rnote)"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO1", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO1"), // new RegexLeaf("POSITION", "(right|left|over)"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("PARTICIPANT", "(?:of[%s])?([%pLN_.@]+|[%g][^%g]+[%g])"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO2", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO2"), // color().getRegex(), // RegexLeaf.spaceZeroOrMore(), // UrlBuilder.OPTIONAL, // diff --git a/src/net/sourceforge/plantuml/command/note/sequence/FactorySequenceNoteOnArrowCommand.java b/src/net/sourceforge/plantuml/command/note/sequence/FactorySequenceNoteOnArrowCommand.java index f886d749f..556b146da 100644 --- a/src/net/sourceforge/plantuml/command/note/sequence/FactorySequenceNoteOnArrowCommand.java +++ b/src/net/sourceforge/plantuml/command/note/sequence/FactorySequenceNoteOnArrowCommand.java @@ -60,6 +60,7 @@ import net.sourceforge.plantuml.sequencediagram.NoteStyle; import net.sourceforge.plantuml.sequencediagram.SequenceDiagram; import net.sourceforge.plantuml.skin.ColorParam; 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; @@ -72,13 +73,9 @@ public final class FactorySequenceNoteOnArrowCommand implements SingleMultiFacto return RegexConcat.build(FactorySequenceNoteOnArrowCommand.class.getName() + "multi", RegexLeaf.start(), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("STYLE", "(note|hnote|rnote)"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO1", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceOneOrMore(), // + StereotypePattern.optional("STEREO1"), // new RegexLeaf("POSITION", "(right|left|bottom|top)"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO2", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO2"), // ColorParser.exp1(), // RegexLeaf.spaceZeroOrMore(), // UrlBuilder.OPTIONAL, // @@ -89,13 +86,9 @@ public final class FactorySequenceNoteOnArrowCommand implements SingleMultiFacto return RegexConcat.build(FactorySequenceNoteOnArrowCommand.class.getName() + "single", RegexLeaf.start(), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("STYLE", "(note|hnote|rnote)"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO1", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceOneOrMore(), // + StereotypePattern.optional("STEREO1"), // new RegexLeaf("POSITION", "(right|left|bottom|top)"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO2", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO2"), // ColorParser.exp1(), // RegexLeaf.spaceZeroOrMore(), // UrlBuilder.OPTIONAL, // diff --git a/src/net/sourceforge/plantuml/command/note/sequence/FactorySequenceNoteOverSeveralCommand.java b/src/net/sourceforge/plantuml/command/note/sequence/FactorySequenceNoteOverSeveralCommand.java index 52154e96e..a2ceee953 100644 --- a/src/net/sourceforge/plantuml/command/note/sequence/FactorySequenceNoteOverSeveralCommand.java +++ b/src/net/sourceforge/plantuml/command/note/sequence/FactorySequenceNoteOverSeveralCommand.java @@ -58,6 +58,7 @@ import net.sourceforge.plantuml.sequencediagram.Participant; import net.sourceforge.plantuml.sequencediagram.SequenceDiagram; import net.sourceforge.plantuml.skin.ColorParam; 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; @@ -72,9 +73,7 @@ public final class FactorySequenceNoteOverSeveralCommand implements SingleMultiF new RegexLeaf("VMERGE", "(/)?"), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("STYLE", "(note|hnote|rnote)"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO1", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO1"), // new RegexLeaf("over"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("P1", "([%pLN_.@]+|[%g][^%g]+[%g])"), // @@ -82,9 +81,7 @@ public final class FactorySequenceNoteOverSeveralCommand implements SingleMultiF new RegexLeaf(","), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("P2", "([%pLN_.@]+|[%g][^%g]+[%g])"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO2", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO2"), // color().getRegex(), // RegexLeaf.spaceZeroOrMore(), // UrlBuilder.OPTIONAL, // @@ -98,9 +95,7 @@ public final class FactorySequenceNoteOverSeveralCommand implements SingleMultiF new RegexLeaf("VMERGE", "(/)?"), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("STYLE", "(note|hnote|rnote)"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO1", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO1"), // new RegexLeaf("over"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("P1", "([%pLN_.@]+|[%g][^%g]+[%g])"), // @@ -108,9 +103,7 @@ public final class FactorySequenceNoteOverSeveralCommand implements SingleMultiF new RegexLeaf(","), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("P2", "([%pLN_.@]+|[%g][^%g]+[%g])"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO2", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO2"), // color().getRegex(), // RegexLeaf.spaceZeroOrMore(), // UrlBuilder.OPTIONAL, // diff --git a/src/net/sourceforge/plantuml/core/Diagram.java b/src/net/sourceforge/plantuml/core/Diagram.java index 368d0b926..18ce748ff 100644 --- a/src/net/sourceforge/plantuml/core/Diagram.java +++ b/src/net/sourceforge/plantuml/core/Diagram.java @@ -68,7 +68,7 @@ public interface Diagram { */ ImageData exportDiagram(OutputStream os, int num, FileFormatOption fileFormat) throws IOException; - void exportDiagramGraphic(UGraphic ug); + void exportDiagramGraphic(UGraphic ug, FileFormatOption fileFormat); /** * Number of images in this diagram (usually, 1) diff --git a/src/net/sourceforge/plantuml/core/DiagramType.java b/src/net/sourceforge/plantuml/core/DiagramType.java index 7a045e588..1f1e7f9ae 100644 --- a/src/net/sourceforge/plantuml/core/DiagramType.java +++ b/src/net/sourceforge/plantuml/core/DiagramType.java @@ -38,9 +38,9 @@ package net.sourceforge.plantuml.core; import net.sourceforge.plantuml.utils.StartUtils; public enum DiagramType { - // ::remove folder when __HAXE__ - UML, BPM, DITAA, DOT, PROJECT, JCCKIT, SALT, FLOW, CREOLE, MATH, LATEX, DEFINITION, GANTT, NW, - MINDMAP, WBS, WIRE, JSON, GIT, BOARD, YAML, HCL, EBNF, REGEX, FILES, UNKNOWN; + // ::remove folder when __HAXE__ + UML, BPM, DITAA, DOT, PROJECT, JCCKIT, SALT, FLOW, CREOLE, MATH, LATEX, DEFINITION, GANTT, CHRONOLOGY, NW, MINDMAP, + WBS, WIRE, JSON, GIT, BOARD, YAML, HCL, EBNF, REGEX, FILES, UNKNOWN; static public DiagramType getTypeFromArobaseStart(String s) { s = s.toLowerCase(); @@ -59,7 +59,8 @@ public enum DiagramType { if (StartUtils.startsWithSymbolAnd("startdot", s)) return DOT; - // ::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__ if (StartUtils.startsWithSymbolAnd("startjcckit", s)) return JCCKIT; // ::done @@ -126,6 +127,9 @@ public enum DiagramType { if (StartUtils.startsWithSymbolAnd("startfiles", s)) return FILES; + if (StartUtils.startsWithSymbolAnd("startchronology", s)) + return CHRONOLOGY; + return UNKNOWN; } } diff --git a/src/net/sourceforge/plantuml/descdiagram/CommandCreateDomain.java b/src/net/sourceforge/plantuml/descdiagram/CommandCreateDomain.java index 10e4f354c..43864b44d 100644 --- a/src/net/sourceforge/plantuml/descdiagram/CommandCreateDomain.java +++ b/src/net/sourceforge/plantuml/descdiagram/CommandCreateDomain.java @@ -53,6 +53,7 @@ import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; 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; @@ -73,11 +74,11 @@ public class CommandCreateDomain extends SingleLineCommand2 new RegexLeaf("DISPLAY", DISPLAY_WITH_GENERIC), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("as"), // - RegexLeaf.spaceOneOrMore(), new RegexLeaf("CODE", "([a-zA-Z0-9]+)"), RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO", "(\\<\\<.+\\>\\>)?"), // + RegexLeaf.spaceOneOrMore(), // + new RegexLeaf("CODE", "([a-zA-Z0-9]+)"), // + StereotypePattern.optional("STEREO"), // // domain: lexical, causal, biddable // requirement: FR, NFR, quality - RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("GROUP", "(\\{)?"), RegexLeaf.end()); } diff --git a/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimate.java b/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimate.java index 7bc02b008..cfa09179c 100644 --- a/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimate.java +++ b/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimate.java @@ -56,6 +56,7 @@ import net.sourceforge.plantuml.regex.RegexOptional; 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 CommandArchimate extends SingleLineCommand2 { @@ -74,44 +75,25 @@ public class CommandArchimate extends SingleLineCommand2 { new RegexLeaf("CODE1", CommandCreateElementFull.CODE_WITH_QUOTE), // new RegexConcat(// new RegexLeaf("DISPLAY2", CommandCreateElementFull.DISPLAY), // - new RegexOptional( // - new RegexConcat( // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("STEREOTYPE2", "(?:\\<\\<([-\\w]+)\\>\\>)") // - )), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optionalArchimate("STEREOTYPE2"), // new RegexLeaf("as"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("CODE2", CommandCreateElementFull.CODE)), // new RegexConcat(// new RegexLeaf("CODE3", CommandCreateElementFull.CODE), // - new RegexOptional( // - new RegexConcat( // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("STEREOTYPE3", "(?:\\<\\<([-\\w]+)\\>\\>)") // - )), // - RegexLeaf.spaceOneOrMore(), // + StereotypePattern.optionalArchimate("STEREOTYPE3"), // new RegexLeaf("as"), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("DISPLAY3", CommandCreateElementFull.DISPLAY)), // new RegexConcat(// new RegexLeaf("DISPLAY4", CommandCreateElementFull.DISPLAY_WITHOUT_QUOTE), // - new RegexOptional( // - new RegexConcat( // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("STEREOTYPE4", "(?:\\<\\<([-\\w]+)\\>\\>)") // - )), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optionalArchimate("STEREOTYPE4"), // new RegexLeaf("as"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("CODE4", CommandCreateElementFull.CODE)) // ), // - RegexLeaf.spaceZeroOrMore(), // - new RegexOptional( // - new RegexConcat( // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREOTYPE", "(?:\\<\\<([-\\w]+)\\>\\>)") // - )), RegexLeaf.end()); + StereotypePattern.optionalArchimate("STEREOTYPE"), // + RegexLeaf.end()); } private static ColorParser color() { @@ -134,7 +116,7 @@ public class CommandArchimate extends SingleLineCommand2 { entity = diagram.reallyCreateLeaf(quark, Display.getWithNewlines(display), LeafType.DESCRIPTION, USymbols.ARCHIMATE); - final String icon = arg.getLazzy("STEREOTYPE", 0); + final String icon = StereotypePattern.removeChevronBrackets(arg.getLazzy("STEREOTYPE", 0)); entity.setDisplay(Display.getWithNewlines(display)); entity.setUSymbol(USymbols.ARCHIMATE); diff --git a/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimateMultilines.java b/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimateMultilines.java index 11cccd9bc..5aa5f5012 100644 --- a/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimateMultilines.java +++ b/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimateMultilines.java @@ -56,6 +56,7 @@ import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexOptional; import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.stereo.Stereotype; +import net.sourceforge.plantuml.stereo.StereotypePattern; import net.sourceforge.plantuml.url.UrlBuilder; import net.sourceforge.plantuml.utils.BlocLines; @@ -77,13 +78,7 @@ public class CommandArchimateMultilines extends CommandMultilines2\\>)") // - )), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optionalArchimate("STEREOTYPE"), // UrlBuilder.OPTIONAL, // RegexLeaf.spaceZeroOrMore(), // ColorParser.exp1(), // @@ -108,7 +103,7 @@ public class CommandArchimateMultilines extends CommandMultilines2\\>)")// - )), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREOTYPE2"), // new RegexLeaf("as"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("CODE2", CODE)), // new RegexConcat(// new RegexLeaf("CODE3", CODE), // - new RegexOptional( // - new RegexConcat( // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("STEREOTYPE3", "(\\<\\<.+\\>\\>)") // - )), // - RegexLeaf.spaceOneOrMore(), // + StereotypePattern.optional("STEREOTYPE3"), // new RegexLeaf("as"), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("DISPLAY3", DISPLAY)), // new RegexConcat(// new RegexLeaf("DISPLAY4", DISPLAY_WITHOUT_QUOTE), // - new RegexOptional( // - new RegexConcat( // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("STEREOTYPE4", "(\\<\\<.+\\>\\>)") // - )), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREOTYPE4"), // new RegexLeaf("as"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("CODE4", CODE)) // ), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("TAGS1", Stereotag.pattern() + "?"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREOTYPE", "(\\<\\<.+\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREOTYPE"), // new RegexLeaf("TAGS2", Stereotag.pattern() + "?"), // RegexLeaf.spaceZeroOrMore(), // UrlBuilder.OPTIONAL, // diff --git a/src/net/sourceforge/plantuml/descdiagram/command/CommandCreateElementMultilines.java b/src/net/sourceforge/plantuml/descdiagram/command/CommandCreateElementMultilines.java index 3dc3a4665..eeba727d1 100644 --- a/src/net/sourceforge/plantuml/descdiagram/command/CommandCreateElementMultilines.java +++ b/src/net/sourceforge/plantuml/descdiagram/command/CommandCreateElementMultilines.java @@ -59,6 +59,7 @@ import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; 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; @@ -93,9 +94,7 @@ public class CommandCreateElementMultilines extends CommandMultilines2\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO"), // UrlBuilder.OPTIONAL, // RegexLeaf.spaceZeroOrMore(), // ColorParser.exp1(), // @@ -110,9 +109,7 @@ public class CommandCreateElementMultilines extends CommandMultilines2\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO"), // UrlBuilder.OPTIONAL, // RegexLeaf.spaceZeroOrMore(), // ColorParser.exp1(), // diff --git a/src/net/sourceforge/plantuml/descdiagram/command/CommandLinkElement.java b/src/net/sourceforge/plantuml/descdiagram/command/CommandLinkElement.java index b607964eb..bbc59b124 100644 --- a/src/net/sourceforge/plantuml/descdiagram/command/CommandLinkElement.java +++ b/src/net/sourceforge/plantuml/descdiagram/command/CommandLinkElement.java @@ -59,6 +59,7 @@ import net.sourceforge.plantuml.regex.RegexOptional; import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.skin.ActorStyle; import net.sourceforge.plantuml.stereo.Stereotype; +import net.sourceforge.plantuml.stereo.StereotypePattern; import net.sourceforge.plantuml.utils.Direction; import net.sourceforge.plantuml.utils.LineLocation; @@ -104,9 +105,7 @@ public class CommandLinkElement extends SingleLineCommand2 { // RegexLeaf.spaceZeroOrMore(), // color().getRegex(), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREOTYPE"), // new RegexLeaf("LABEL_LINK", "(?::[%s]*(.+))?"), // RegexLeaf.end()); } diff --git a/src/net/sourceforge/plantuml/descdiagram/command/CommandPackageWithUSymbol.java b/src/net/sourceforge/plantuml/descdiagram/command/CommandPackageWithUSymbol.java index 92a2e931a..fbbfa15a9 100644 --- a/src/net/sourceforge/plantuml/descdiagram/command/CommandPackageWithUSymbol.java +++ b/src/net/sourceforge/plantuml/descdiagram/command/CommandPackageWithUSymbol.java @@ -57,6 +57,7 @@ import net.sourceforge.plantuml.regex.RegexOr; import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.stereo.Stereotag; 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; @@ -115,9 +116,7 @@ public class CommandPackageWithUSymbol extends SingleLineCommand2\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREOTYPE"), // new RegexLeaf("TAGS2", Stereotag.pattern() + "?"), // RegexLeaf.spaceZeroOrMore(), // UrlBuilder.OPTIONAL, // diff --git a/src/net/sourceforge/plantuml/ebnf/PSystemEbnf.java b/src/net/sourceforge/plantuml/ebnf/PSystemEbnf.java index 9604c7f74..ccf0e1649 100644 --- a/src/net/sourceforge/plantuml/ebnf/PSystemEbnf.java +++ b/src/net/sourceforge/plantuml/ebnf/PSystemEbnf.java @@ -97,11 +97,11 @@ public class PSystemEbnf extends TitledDiagram { @Override protected ImageData exportDiagramNow(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException { - return createImageBuilder(fileFormatOption).drawable(getTextBlock()).write(os); + return createImageBuilder(fileFormatOption).drawable(getTextMainBlock(fileFormatOption)).write(os); } @Override - protected TextBlock getTextBlock() { + protected TextBlock getTextMainBlock(FileFormatOption fileFormatOption) { if (expressions.size() == 0) { final Style style = ETile.getStyleSignature().getMergedStyle(getSkinParam().getCurrentStyleBuilder()); final FontConfiguration fc = style.getFontConfiguration(getSkinParam().getIHtmlColorSet()); diff --git a/src/net/sourceforge/plantuml/filesdiagram/FilesDiagram.java b/src/net/sourceforge/plantuml/filesdiagram/FilesDiagram.java index b5142b7c0..891ad8940 100644 --- a/src/net/sourceforge/plantuml/filesdiagram/FilesDiagram.java +++ b/src/net/sourceforge/plantuml/filesdiagram/FilesDiagram.java @@ -89,11 +89,11 @@ public class FilesDiagram extends UmlDiagram { protected ImageData exportDiagramInternal(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException { - return createImageBuilder(fileFormatOption).drawable(getTextBlock()).write(os); + return createImageBuilder(fileFormatOption).drawable(getTextMainBlock(fileFormatOption)).write(os); } @Override - protected TextBlock getTextBlock() { + protected TextBlock getTextMainBlock(FileFormatOption fileFormatOption) { return list; } diff --git a/src/net/sourceforge/plantuml/flowdiagram/FlowDiagram.java b/src/net/sourceforge/plantuml/flowdiagram/FlowDiagram.java index 7d4b21638..5b4b4b125 100644 --- a/src/net/sourceforge/plantuml/flowdiagram/FlowDiagram.java +++ b/src/net/sourceforge/plantuml/flowdiagram/FlowDiagram.java @@ -230,7 +230,7 @@ public class FlowDiagram extends UmlDiagram implements TextBlock { } @Override - protected TextBlock getTextBlock() { + protected TextBlock getTextMainBlock(FileFormatOption fileFormatOption) { return this; } diff --git a/src/net/sourceforge/plantuml/gitlog/GitDiagram.java b/src/net/sourceforge/plantuml/gitlog/GitDiagram.java index b355612cf..f1ad5fd1e 100644 --- a/src/net/sourceforge/plantuml/gitlog/GitDiagram.java +++ b/src/net/sourceforge/plantuml/gitlog/GitDiagram.java @@ -68,7 +68,7 @@ public class GitDiagram extends UmlDiagram { protected ImageData exportDiagramInternal(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException { - return createImageBuilder(fileFormatOption).drawable(getTextBlock()).write(os); + return createImageBuilder(fileFormatOption).drawable(getTextMainBlock(fileFormatOption)).write(os); } private void drawInternal(UGraphic ug) { @@ -84,7 +84,7 @@ public class GitDiagram extends UmlDiagram { } @Override - protected TextBlock getTextBlock() { + protected TextBlock getTextMainBlock(FileFormatOption fileFormatOption) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { diff --git a/src/net/sourceforge/plantuml/help/Help.java b/src/net/sourceforge/plantuml/help/Help.java index 36962e0a5..cc7322dbb 100644 --- a/src/net/sourceforge/plantuml/help/Help.java +++ b/src/net/sourceforge/plantuml/help/Help.java @@ -96,7 +96,7 @@ public class Help extends UmlDiagram { } @Override - protected TextBlock getTextBlock() { + protected TextBlock getTextMainBlock(FileFormatOption fileFormatOption) { throw new UnsupportedOperationException(); } diff --git a/src/net/sourceforge/plantuml/jsondiagram/JsonDiagram.java b/src/net/sourceforge/plantuml/jsondiagram/JsonDiagram.java index 7aabbed27..cdc6eb494 100644 --- a/src/net/sourceforge/plantuml/jsondiagram/JsonDiagram.java +++ b/src/net/sourceforge/plantuml/jsondiagram/JsonDiagram.java @@ -94,7 +94,7 @@ public class JsonDiagram extends TitledDiagram { protected ImageData exportDiagramNow(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException { - return createImageBuilder(fileFormatOption).drawable(getTextBlock()).write(os); + return createImageBuilder(fileFormatOption).drawable(getTextMainBlock(fileFormatOption)).write(os); } private void drawInternal(UGraphic ug) { @@ -113,7 +113,7 @@ public class JsonDiagram extends TitledDiagram { } @Override - protected TextBlock getTextBlock() { + protected TextBlock getTextMainBlock(final FileFormatOption fileFormatOption) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { @@ -121,7 +121,7 @@ public class JsonDiagram extends TitledDiagram { } public XDimension2D calculateDimension(StringBounder stringBounder) { - return TextBlockUtils.getMinMax(getTextBlock(), stringBounder, true).getDimension(); + return TextBlockUtils.getMinMax(getTextMainBlock(fileFormatOption), stringBounder, true).getDimension(); } }; } diff --git a/src/net/sourceforge/plantuml/klimt/sprite/ListSpriteDiagram.java b/src/net/sourceforge/plantuml/klimt/sprite/ListSpriteDiagram.java index b23c5610d..ec49bdf7d 100644 --- a/src/net/sourceforge/plantuml/klimt/sprite/ListSpriteDiagram.java +++ b/src/net/sourceforge/plantuml/klimt/sprite/ListSpriteDiagram.java @@ -79,11 +79,11 @@ public class ListSpriteDiagram extends UmlDiagram { protected ImageData exportDiagramInternal(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException { - return createImageBuilder(fileFormatOption).drawable(getTextBlock()).write(os); + return createImageBuilder(fileFormatOption).drawable(getTextMainBlock(fileFormatOption)).write(os); } @Override - protected TextBlock getTextBlock() { + protected TextBlock getTextMainBlock(FileFormatOption fileFormatOption) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { diff --git a/src/net/sourceforge/plantuml/klimt/sprite/StdlibDiagram.java b/src/net/sourceforge/plantuml/klimt/sprite/StdlibDiagram.java index f637002ea..74c0f7ec5 100644 --- a/src/net/sourceforge/plantuml/klimt/sprite/StdlibDiagram.java +++ b/src/net/sourceforge/plantuml/klimt/sprite/StdlibDiagram.java @@ -91,11 +91,11 @@ public class StdlibDiagram extends UmlDiagram { protected ImageData exportDiagramInternal(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException { - return createImageBuilder(fileFormatOption).drawable(getTextBlock()).write(os); + return createImageBuilder(fileFormatOption).drawable(getTextMainBlock(fileFormatOption)).write(os); } @Override - protected TextBlock getTextBlock() { + protected TextBlock getTextMainBlock(FileFormatOption fileFormatOption) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { diff --git a/src/net/sourceforge/plantuml/mindmap/MindMapDiagram.java b/src/net/sourceforge/plantuml/mindmap/MindMapDiagram.java index d1981b833..975e3d791 100644 --- a/src/net/sourceforge/plantuml/mindmap/MindMapDiagram.java +++ b/src/net/sourceforge/plantuml/mindmap/MindMapDiagram.java @@ -83,11 +83,11 @@ public class MindMapDiagram extends UmlDiagram { protected ImageData exportDiagramInternal(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException { - return createImageBuilder(fileFormatOption).drawable(getTextBlock()).write(os); + return createImageBuilder(fileFormatOption).drawable(getTextMainBlock(fileFormatOption)).write(os); } @Override - protected TextBlock getTextBlock() { + protected TextBlock getTextMainBlock(FileFormatOption fileFormatOption) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { diff --git a/src/net/sourceforge/plantuml/nwdiag/NwDiagram.java b/src/net/sourceforge/plantuml/nwdiag/NwDiagram.java index 6bc30d64e..6f9074546 100644 --- a/src/net/sourceforge/plantuml/nwdiag/NwDiagram.java +++ b/src/net/sourceforge/plantuml/nwdiag/NwDiagram.java @@ -331,11 +331,11 @@ public class NwDiagram extends UmlDiagram { protected ImageData exportDiagramInternal(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException { - return createImageBuilder(fileFormatOption).drawable(getTextBlock()).write(os); + return createImageBuilder(fileFormatOption).drawable(getTextMainBlock(fileFormatOption)).write(os); } @Override - protected TextBlock getTextBlock() { + protected TextBlock getTextMainBlock(FileFormatOption fileFormatOption) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { drawMe(ug); diff --git a/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateEntityObject.java b/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateEntityObject.java index 403e67b21..3c5d4ded5 100644 --- a/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateEntityObject.java +++ b/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateEntityObject.java @@ -52,6 +52,7 @@ import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; 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; @@ -68,9 +69,7 @@ public class CommandCreateEntityObject extends SingleLineCommand2\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO"), // UrlBuilder.OPTIONAL, // RegexLeaf.spaceZeroOrMore(), // ColorParser.exp1(), RegexLeaf.end()); diff --git a/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateEntityObjectMultilines.java b/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateEntityObjectMultilines.java index ec7457a56..de7209791 100644 --- a/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateEntityObjectMultilines.java +++ b/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateEntityObjectMultilines.java @@ -55,6 +55,7 @@ import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.skin.VisibilityModifier; import net.sourceforge.plantuml.stereo.Stereotype; +import net.sourceforge.plantuml.stereo.StereotypePattern; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.url.UrlBuilder; import net.sourceforge.plantuml.utils.BlocLines; @@ -70,9 +71,7 @@ public class CommandCreateEntityObjectMultilines extends CommandMultilines2\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO"), // UrlBuilder.OPTIONAL, // RegexLeaf.spaceZeroOrMore(), // ColorParser.exp1(), // diff --git a/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateJson.java b/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateJson.java index 94f3c4c13..ad217dd09 100644 --- a/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateJson.java +++ b/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateJson.java @@ -59,6 +59,7 @@ import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.stereo.Stereotype; +import net.sourceforge.plantuml.stereo.StereotypePattern; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.url.UrlBuilder; import net.sourceforge.plantuml.utils.BlocLines; @@ -74,9 +75,7 @@ public class CommandCreateJson extends CommandMultilines2 new RegexLeaf("TYPE", "json"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("NAME", "(?:[%g]([^%g]+)[%g][%s]+as[%s]+)?([%pLN_.]+)"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO", "(\\<\\<.+\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO"), // UrlBuilder.OPTIONAL, // RegexLeaf.spaceZeroOrMore(), // ColorParser.exp1(), // diff --git a/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateJsonSingleLine.java b/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateJsonSingleLine.java index fbdc4aa76..b185f30aa 100644 --- a/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateJsonSingleLine.java +++ b/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateJsonSingleLine.java @@ -56,6 +56,7 @@ import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.stereo.Stereotype; +import net.sourceforge.plantuml.stereo.StereotypePattern; import net.sourceforge.plantuml.url.UrlBuilder; import net.sourceforge.plantuml.utils.LineLocation; @@ -70,9 +71,7 @@ public class CommandCreateJsonSingleLine extends SingleLineCommand2\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO"), // UrlBuilder.OPTIONAL, // RegexLeaf.spaceZeroOrMore(), // ColorParser.exp1(), // diff --git a/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateMap.java b/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateMap.java index 8e2cbe564..939c14edf 100644 --- a/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateMap.java +++ b/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateMap.java @@ -62,6 +62,7 @@ import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexOptional; import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.stereo.Stereotype; +import net.sourceforge.plantuml.stereo.StereotypePattern; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.url.UrlBuilder; import net.sourceforge.plantuml.utils.BlocLines; @@ -77,9 +78,7 @@ public class CommandCreateMap extends CommandMultilines2 new RegexLeaf("TYPE", "map"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("NAME", "(?:[%g]([^%g]+)[%g][%s]+as[%s]+)?([%pLN_.]+)"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO", "(\\<\\<.+\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO"), // UrlBuilder.OPTIONAL, // RegexLeaf.spaceZeroOrMore(), // color().getRegex(), // diff --git a/src/net/sourceforge/plantuml/project/GanttDiagram.java b/src/net/sourceforge/plantuml/project/GanttDiagram.java index 6314bdc33..529e21ae8 100644 --- a/src/net/sourceforge/plantuml/project/GanttDiagram.java +++ b/src/net/sourceforge/plantuml/project/GanttDiagram.java @@ -51,7 +51,6 @@ import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; -import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.TitledDiagram; import net.sourceforge.plantuml.WithSprite; @@ -162,7 +161,7 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit } public DiagramDescription getDescription() { - return new DiagramDescription("(Project)"); + return new DiagramDescription("(Gantt)"); } public void setWeekNumberStrategy(DayOfWeek firstDayOfWeek, int minimalDaysInFirstWeek) { @@ -180,8 +179,7 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit @Override protected ImageData exportDiagramNow(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException { - final StringBounder stringBounder = fileFormatOption.getDefaultStringBounder(getSkinParam()); - return createImageBuilder(fileFormatOption).drawable(getTextBlock(stringBounder)).write(os); + return createImageBuilder(fileFormatOption).drawable(getTextMainBlock(fileFormatOption)).write(os); } public void setPrintScale(PrintScale printScale) { @@ -220,13 +218,8 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit } @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); - } - - private TextBlock getTextBlock(StringBounder stringBounder) { if (printStart == null) { initMinMax(); } else { @@ -450,13 +443,12 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit } else if (task instanceof TaskGroup) { final TaskGroup taskGroup = (TaskGroup) task; draw = new TaskDrawGroup(timeScale, y, taskGroup.getCode().getSimpleDisplay(), getStart(taskGroup), - getEnd(taskGroup), getSkinParam(), task, this, task.getStyleBuilder()); + getEnd(taskGroup), task, this, task.getStyleBuilder()); } else { final TaskImpl tmp = (TaskImpl) task; final String disp = hideResourceName ? tmp.getCode().getSimpleDisplay() : tmp.getPrettyDisplay(); if (tmp.isDiamond()) { - draw = new TaskDrawDiamond(timeScale, y, disp, getStart(tmp), getSkinParam(), task, this, - task.getStyleBuilder()); + draw = new TaskDrawDiamond(timeScale, y, disp, getStart(tmp), task, this, task.getStyleBuilder()); } else { final boolean oddStart = printStart != null && min.compareTo(getStart(tmp)) == 0; final boolean oddEnd = printStart != null && max.compareTo(getEnd(tmp)) == 0; diff --git a/src/net/sourceforge/plantuml/project/GanttDiagramFactory.java b/src/net/sourceforge/plantuml/project/GanttDiagramFactory.java index eb7d662d3..ceb183bcb 100644 --- a/src/net/sourceforge/plantuml/project/GanttDiagramFactory.java +++ b/src/net/sourceforge/plantuml/project/GanttDiagramFactory.java @@ -79,8 +79,8 @@ import net.sourceforge.plantuml.style.CommandStyleMultilinesCSS; public class GanttDiagramFactory extends PSystemCommandFactory { - static private final List subjects() { - return Arrays.asList(SubjectTask.ME, SubjectProject.ME, SubjectDayOfWeek.ME, SubjectDayAsDate.ME, + static private final List> subjects() { + return Arrays.asList(SubjectTask.ME, SubjectProject.ME, SubjectDayOfWeek.ME, SubjectDayAsDate.ME, SubjectDaysAsDates.ME, SubjectResource.ME, SubjectToday.ME, SubjectSeparator.ME); } @@ -120,28 +120,28 @@ public class GanttDiagramFactory extends PSystemCommandFactory { } private void addLanguageCommands(List cmd) { - for (Subject subject : subjects()) - for (SentenceSimple sentenceA : subject.getSentences()) { + for (Subject subject : subjects()) + for (SentenceSimple sentenceA : subject.getSentences()) { cmd.add(NaturalCommand.create(sentenceA)); - for (SentenceSimple sentenceB : subject.getSentences()) { + for (SentenceSimple sentenceB : subject.getSentences()) { final String signatureA = sentenceA.getSignature(); final String signatureB = sentenceB.getSignature(); if (signatureA.equals(signatureB) == false) - cmd.add(NaturalCommand.create(new SentenceAnd(sentenceA, sentenceB))); + cmd.add(NaturalCommand.create(new SentenceAnd(sentenceA, sentenceB))); } } - for (Subject subject : subjects()) - for (SentenceSimple sentenceA : subject.getSentences()) - for (SentenceSimple sentenceB : subject.getSentences()) - for (SentenceSimple sentenceC : subject.getSentences()) { + for (Subject subject : subjects()) + for (SentenceSimple sentenceA : subject.getSentences()) + for (SentenceSimple sentenceB : subject.getSentences()) + for (SentenceSimple sentenceC : subject.getSentences()) { final String signatureA = sentenceA.getSignature(); final String signatureB = sentenceB.getSignature(); final String signatureC = sentenceC.getSignature(); if (signatureA.equals(signatureB) == false && signatureA.equals(signatureC) == false && signatureC.equals(signatureB) == false) - cmd.add(NaturalCommand.create(new SentenceAndAnd(sentenceA, sentenceB, sentenceC))); + cmd.add(NaturalCommand.create(new SentenceAndAnd(sentenceA, sentenceB, sentenceC))); } } diff --git a/src/net/sourceforge/plantuml/project/TimeHeaderParameters.java b/src/net/sourceforge/plantuml/project/TimeHeaderParameters.java index 14cab9795..c140797ac 100644 --- a/src/net/sourceforge/plantuml/project/TimeHeaderParameters.java +++ b/src/net/sourceforge/plantuml/project/TimeHeaderParameters.java @@ -37,6 +37,7 @@ package net.sourceforge.plantuml.project; import java.util.Locale; import java.util.Map; +import java.util.Objects; import java.util.Set; import net.sourceforge.plantuml.klimt.UStroke; @@ -70,7 +71,7 @@ public class TimeHeaderParameters implements GanttStyle { this.scale = scale; this.min = min; this.max = max; - this.colorSet = colorSet; + this.colorSet = Objects.requireNonNull(colorSet); this.ganttStyle = ganttStyle; this.locale = locale; this.openClose = openClose; diff --git a/src/net/sourceforge/plantuml/project/command/CommandColorTask.java b/src/net/sourceforge/plantuml/project/command/CommandColorTask.java index 57f5e58c0..6c5583384 100644 --- a/src/net/sourceforge/plantuml/project/command/CommandColorTask.java +++ b/src/net/sourceforge/plantuml/project/command/CommandColorTask.java @@ -59,7 +59,8 @@ public class CommandColorTask extends SingleLineCommand2 { new RegexLeaf("CODE", "\\[([%pLN_.]+)\\]"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("COLORS", "#(\\w+)(?:/(#?\\w+))?"), // - RegexLeaf.spaceZeroOrMore(), RegexLeaf.end()); + RegexLeaf.spaceZeroOrMore(), // + RegexLeaf.end()); } @Override diff --git a/src/net/sourceforge/plantuml/project/command/CommandFootbox.java b/src/net/sourceforge/plantuml/project/command/CommandFootbox.java index 43697e905..36ce4504c 100644 --- a/src/net/sourceforge/plantuml/project/command/CommandFootbox.java +++ b/src/net/sourceforge/plantuml/project/command/CommandFootbox.java @@ -45,7 +45,7 @@ import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.utils.LineLocation; public class CommandFootbox extends SingleLineCommand2 { - // ::remove folder when __HAXE__ + // ::remove folder when __HAXE__ public CommandFootbox() { super(getRegexConcat()); @@ -55,7 +55,8 @@ public class CommandFootbox extends SingleLineCommand2 { return RegexConcat.build(CommandFootbox.class.getName(), RegexLeaf.start(), // new RegexLeaf("TYPE", "(hide|show)?"), // RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("footbox"), RegexLeaf.end()); // + new RegexLeaf("footbox"), // + RegexLeaf.end()); } @Override diff --git a/src/net/sourceforge/plantuml/project/command/CommandGanttArrow.java b/src/net/sourceforge/plantuml/project/command/CommandGanttArrow.java index 1c1c55a30..0929fd2a8 100644 --- a/src/net/sourceforge/plantuml/project/command/CommandGanttArrow.java +++ b/src/net/sourceforge/plantuml/project/command/CommandGanttArrow.java @@ -63,7 +63,8 @@ public class CommandGanttArrow extends SingleLineCommand2 { new RegexLeaf("\\>"), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("CODE2", "([%pLN_.]+)"), // - RegexLeaf.spaceZeroOrMore(), RegexLeaf.end()); + RegexLeaf.spaceZeroOrMore(), // + RegexLeaf.end()); } @Override diff --git a/src/net/sourceforge/plantuml/project/command/CommandHideResourceFootbox.java b/src/net/sourceforge/plantuml/project/command/CommandHideResourceFootbox.java index acfa84310..08e48fa3c 100644 --- a/src/net/sourceforge/plantuml/project/command/CommandHideResourceFootbox.java +++ b/src/net/sourceforge/plantuml/project/command/CommandHideResourceFootbox.java @@ -57,7 +57,7 @@ public class CommandHideResourceFootbox extends SingleLineCommand2 new RegexLeaf("ress?ources?"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("footbox"), // - RegexLeaf.end()); // + RegexLeaf.end()); } @Override diff --git a/src/net/sourceforge/plantuml/project/command/CommandHideResourceName.java b/src/net/sourceforge/plantuml/project/command/CommandHideResourceName.java index e343e3461..e386dee8c 100644 --- a/src/net/sourceforge/plantuml/project/command/CommandHideResourceName.java +++ b/src/net/sourceforge/plantuml/project/command/CommandHideResourceName.java @@ -57,7 +57,7 @@ public class CommandHideResourceName extends SingleLineCommand2 { new RegexLeaf("ress?ources?"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("names?"), // - RegexLeaf.end()); // + RegexLeaf.end()); } @Override diff --git a/src/net/sourceforge/plantuml/project/command/CommandLabelOnColumn.java b/src/net/sourceforge/plantuml/project/command/CommandLabelOnColumn.java index ff2d12789..949f12e64 100644 --- a/src/net/sourceforge/plantuml/project/command/CommandLabelOnColumn.java +++ b/src/net/sourceforge/plantuml/project/command/CommandLabelOnColumn.java @@ -70,7 +70,8 @@ public class CommandLabelOnColumn extends SingleLineCommand2 { new RegexLeaf("ALIGNED", "(left|right)"), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("aligned") // - )), RegexLeaf.end()); // + )), // + RegexLeaf.end()); } @Override diff --git a/src/net/sourceforge/plantuml/project/command/CommandLanguage.java b/src/net/sourceforge/plantuml/project/command/CommandLanguage.java index cae28078d..a8532b63d 100644 --- a/src/net/sourceforge/plantuml/project/command/CommandLanguage.java +++ b/src/net/sourceforge/plantuml/project/command/CommandLanguage.java @@ -55,7 +55,7 @@ public class CommandLanguage extends SingleLineCommand2 { new RegexLeaf("language"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("LANG", "(\\w+)"), // - RegexLeaf.end()); // + RegexLeaf.end()); } @Override diff --git a/src/net/sourceforge/plantuml/project/command/CommandPrintBetween.java b/src/net/sourceforge/plantuml/project/command/CommandPrintBetween.java index f13460e09..5c0d1a8a5 100644 --- a/src/net/sourceforge/plantuml/project/command/CommandPrintBetween.java +++ b/src/net/sourceforge/plantuml/project/command/CommandPrintBetween.java @@ -66,7 +66,7 @@ public class CommandPrintBetween extends SingleLineCommand2 { new RegexLeaf("and"), // RegexLeaf.spaceOneOrMore(), // pattern.toRegex("END"), // - RegexLeaf.end()); // + RegexLeaf.end()); } @Override diff --git a/src/net/sourceforge/plantuml/project/command/CommandPrintScale.java b/src/net/sourceforge/plantuml/project/command/CommandPrintScale.java index c82a9c027..84b1a6edb 100644 --- a/src/net/sourceforge/plantuml/project/command/CommandPrintScale.java +++ b/src/net/sourceforge/plantuml/project/command/CommandPrintScale.java @@ -77,7 +77,7 @@ public class CommandPrintScale extends SingleLineCommand2 { new RegexLeaf("zoom"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("ZOOM", "([.\\d]+)"))), // - RegexLeaf.end()); // + RegexLeaf.end()); } @Override diff --git a/src/net/sourceforge/plantuml/project/command/CommandTaskCompleteDefault.java b/src/net/sourceforge/plantuml/project/command/CommandTaskCompleteDefault.java index aeec499cd..794c91455 100644 --- a/src/net/sourceforge/plantuml/project/command/CommandTaskCompleteDefault.java +++ b/src/net/sourceforge/plantuml/project/command/CommandTaskCompleteDefault.java @@ -64,7 +64,6 @@ public class CommandTaskCompleteDefault extends SingleLineCommand2 RegexLeaf.spaceOneOrMore(), // new RegexLeaf("VALUE", "(\\d+)"), // new RegexLeaf(".*"), // - RegexLeaf.spaceZeroOrMore(), // RegexLeaf.end()); } diff --git a/src/net/sourceforge/plantuml/project/command/NaturalCommand.java b/src/net/sourceforge/plantuml/project/command/NaturalCommand.java index 2da5d3792..88511e131 100644 --- a/src/net/sourceforge/plantuml/project/command/NaturalCommand.java +++ b/src/net/sourceforge/plantuml/project/command/NaturalCommand.java @@ -37,27 +37,27 @@ package net.sourceforge.plantuml.project.command; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; -import net.sourceforge.plantuml.project.GanttDiagram; +import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.project.lang.Sentence; import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.utils.LineLocation; -public class NaturalCommand extends SingleLineCommand2 { +public class NaturalCommand extends SingleLineCommand2 { - private final Sentence sentence; + private final Sentence sentence; - public NaturalCommand(Sentence sentence) { + public NaturalCommand(Sentence sentence) { super(sentence.toRegex()); this.sentence = sentence; } @Override - final protected CommandExecutionResult executeArg(GanttDiagram system, LineLocation location, RegexResult arg) { + final protected CommandExecutionResult executeArg(D system, LineLocation location, RegexResult arg) { return sentence.execute(system, arg); } - public static NaturalCommand create(Sentence sentence) { - return new NaturalCommand(sentence); + public static NaturalCommand create(Sentence sentence) { + return new NaturalCommand(sentence); } diff --git a/src/net/sourceforge/plantuml/project/core/AbstractTask.java b/src/net/sourceforge/plantuml/project/core/AbstractTask.java index 549e2c11f..69d385016 100644 --- a/src/net/sourceforge/plantuml/project/core/AbstractTask.java +++ b/src/net/sourceforge/plantuml/project/core/AbstractTask.java @@ -35,6 +35,7 @@ */ package net.sourceforge.plantuml.project.core; +import net.sourceforge.plantuml.stereo.Stereotype; import net.sourceforge.plantuml.style.StyleBuilder; public abstract class AbstractTask implements Task { @@ -44,6 +45,7 @@ public abstract class AbstractTask implements Task { private Task row; private String displayString; + private Stereotype stereotype; protected AbstractTask(StyleBuilder styleBuilder, TaskCode code) { this.styleBuilder = styleBuilder; @@ -80,5 +82,16 @@ public abstract class AbstractTask implements Task { public String getDisplayString() { return this.displayString; } + + @Override + public Stereotype getStereotype() { + return stereotype; + } + + @Override + public final void setStereotype(Stereotype stereotype) { + this.stereotype = stereotype; + } + } diff --git a/src/net/sourceforge/plantuml/project/core/Task.java b/src/net/sourceforge/plantuml/project/core/Task.java index 467274875..b6b2bc351 100644 --- a/src/net/sourceforge/plantuml/project/core/Task.java +++ b/src/net/sourceforge/plantuml/project/core/Task.java @@ -40,6 +40,7 @@ import net.sourceforge.plantuml.project.Load; import net.sourceforge.plantuml.project.lang.CenterBorderColor; import net.sourceforge.plantuml.project.time.Day; import net.sourceforge.plantuml.project.time.DayOfWeek; +import net.sourceforge.plantuml.stereo.Stereotype; import net.sourceforge.plantuml.style.StyleBuilder; import net.sourceforge.plantuml.url.Url; @@ -85,4 +86,8 @@ public interface Task extends Moment { public String getDisplayString(); + public Stereotype getStereotype(); + + public void setStereotype(Stereotype stereotype); + } diff --git a/src/net/sourceforge/plantuml/project/draw/AbstractTaskDraw.java b/src/net/sourceforge/plantuml/project/draw/AbstractTaskDraw.java index 70c21a718..7d501e98e 100644 --- a/src/net/sourceforge/plantuml/project/draw/AbstractTaskDraw.java +++ b/src/net/sourceforge/plantuml/project/draw/AbstractTaskDraw.java @@ -49,11 +49,11 @@ import net.sourceforge.plantuml.project.time.Day; import net.sourceforge.plantuml.project.timescale.TimeScale; import net.sourceforge.plantuml.real.Real; import net.sourceforge.plantuml.style.ClockwiseTopRightBottomLeft; -import net.sourceforge.plantuml.style.ISkinParam; import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.SName; import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.style.StyleBuilder; +import net.sourceforge.plantuml.style.StyleSignature; import net.sourceforge.plantuml.style.StyleSignatureBasic; import net.sourceforge.plantuml.url.Url; import net.sourceforge.plantuml.utils.Direction; @@ -85,8 +85,8 @@ public abstract class AbstractTaskDraw implements TaskDraw { this.note = note; } - public AbstractTaskDraw(TimeScale timeScale, Real y, String prettyDisplay, Day start, ISkinParam skinParam, - Task task, ToTaskDraw toTaskDraw, StyleBuilder styleBuilder) { + public AbstractTaskDraw(TimeScale timeScale, Real y, String prettyDisplay, Day start, Task task, + ToTaskDraw toTaskDraw, StyleBuilder styleBuilder) { this.y = y; this.styleBuilder = styleBuilder; this.toTaskDraw = toTaskDraw; @@ -96,7 +96,7 @@ public abstract class AbstractTaskDraw implements TaskDraw { this.task = task; } - abstract StyleSignatureBasic getStyleSignature(); + abstract StyleSignature getStyleSignature(); private StyleSignatureBasic getStyleSignatureUnstarted() { return StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, SName.task, SName.unstarted); diff --git a/src/net/sourceforge/plantuml/project/draw/TaskDrawDiamond.java b/src/net/sourceforge/plantuml/project/draw/TaskDrawDiamond.java index df3a3854b..260579d10 100644 --- a/src/net/sourceforge/plantuml/project/draw/TaskDrawDiamond.java +++ b/src/net/sourceforge/plantuml/project/draw/TaskDrawDiamond.java @@ -54,21 +54,21 @@ import net.sourceforge.plantuml.project.time.Day; import net.sourceforge.plantuml.project.timescale.TimeScale; import net.sourceforge.plantuml.real.Real; import net.sourceforge.plantuml.style.ClockwiseTopRightBottomLeft; -import net.sourceforge.plantuml.style.ISkinParam; import net.sourceforge.plantuml.style.SName; import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.style.StyleBuilder; +import net.sourceforge.plantuml.style.StyleSignature; import net.sourceforge.plantuml.style.StyleSignatureBasic; public class TaskDrawDiamond extends AbstractTaskDraw { - public TaskDrawDiamond(TimeScale timeScale, Real y, String prettyDisplay, Day start, ISkinParam skinParam, - Task task, ToTaskDraw toTaskDraw, StyleBuilder styleBuilder) { - super(timeScale, y, prettyDisplay, start, skinParam, task, toTaskDraw, styleBuilder); + public TaskDrawDiamond(TimeScale timeScale, Real y, String prettyDisplay, Day start, Task task, + ToTaskDraw toTaskDraw, StyleBuilder styleBuilder) { + super(timeScale, y, prettyDisplay, start, task, toTaskDraw, styleBuilder); } @Override - StyleSignatureBasic getStyleSignature() { + StyleSignature getStyleSignature() { return StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, SName.milestone); } diff --git a/src/net/sourceforge/plantuml/project/draw/TaskDrawGroup.java b/src/net/sourceforge/plantuml/project/draw/TaskDrawGroup.java index 88ff50d60..346182887 100644 --- a/src/net/sourceforge/plantuml/project/draw/TaskDrawGroup.java +++ b/src/net/sourceforge/plantuml/project/draw/TaskDrawGroup.java @@ -54,22 +54,19 @@ import net.sourceforge.plantuml.project.time.Day; import net.sourceforge.plantuml.project.timescale.TimeScale; import net.sourceforge.plantuml.real.Real; import net.sourceforge.plantuml.style.ClockwiseTopRightBottomLeft; -import net.sourceforge.plantuml.style.ISkinParam; import net.sourceforge.plantuml.style.SName; import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.style.StyleBuilder; +import net.sourceforge.plantuml.style.StyleSignature; import net.sourceforge.plantuml.style.StyleSignatureBasic; public class TaskDrawGroup extends AbstractTaskDraw { private final Day end; - private final ISkinParam skinParam; - - public TaskDrawGroup(TimeScale timeScale, Real y, String prettyDisplay, Day start, Day end, ISkinParam skinParam, - Task task, ToTaskDraw toTaskDraw, StyleBuilder styleBuilder) { - super(timeScale, y, prettyDisplay, start, skinParam, task, toTaskDraw, styleBuilder); - this.skinParam = skinParam; + public TaskDrawGroup(TimeScale timeScale, Real y, String prettyDisplay, Day start, Day end, Task task, + ToTaskDraw toTaskDraw, StyleBuilder styleBuilder) { + super(timeScale, y, prettyDisplay, start, task, toTaskDraw, styleBuilder); this.end = end; } @@ -122,7 +119,7 @@ public class TaskDrawGroup extends AbstractTaskDraw { } @Override - StyleSignatureBasic getStyleSignature() { + StyleSignature getStyleSignature() { return StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, SName.task); } diff --git a/src/net/sourceforge/plantuml/project/draw/TaskDrawRegular.java b/src/net/sourceforge/plantuml/project/draw/TaskDrawRegular.java index cf3cb4cab..7d8d9a1ae 100644 --- a/src/net/sourceforge/plantuml/project/draw/TaskDrawRegular.java +++ b/src/net/sourceforge/plantuml/project/draw/TaskDrawRegular.java @@ -65,11 +65,12 @@ import net.sourceforge.plantuml.project.timescale.TimeScale; import net.sourceforge.plantuml.real.Real; import net.sourceforge.plantuml.sequencediagram.graphic.Segment; import net.sourceforge.plantuml.style.ClockwiseTopRightBottomLeft; -import net.sourceforge.plantuml.style.ISkinParam; +import net.sourceforge.plantuml.style.ISkinSimple; import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.SName; import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.style.StyleBuilder; +import net.sourceforge.plantuml.style.StyleSignature; import net.sourceforge.plantuml.style.StyleSignatureBasic; import net.sourceforge.plantuml.svek.image.Opale; @@ -80,13 +81,13 @@ public class TaskDrawRegular extends AbstractTaskDraw { private final boolean oddEnd; private final Collection paused; private final Collection constraints; - private final ISkinParam skinParam; + private final ISkinSimple skinSimple; public TaskDrawRegular(TimeScale timeScale, Real y, String prettyDisplay, Day start, Day end, boolean oddStart, - boolean oddEnd, ISkinParam skinParam, Task task, ToTaskDraw toTaskDraw, + boolean oddEnd, ISkinSimple skinSimple, Task task, ToTaskDraw toTaskDraw, Collection constraints, StyleBuilder styleBuilder) { - super(timeScale, y, prettyDisplay, start, skinParam, task, toTaskDraw, styleBuilder); - this.skinParam = skinParam; + super(timeScale, y, prettyDisplay, start, task, toTaskDraw, styleBuilder); + this.skinSimple = skinSimple; this.constraints = constraints; this.end = end; this.oddStart = oddStart; @@ -162,8 +163,9 @@ public class TaskDrawRegular extends AbstractTaskDraw { } @Override - StyleSignatureBasic getStyleSignature() { - return StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, SName.task); + StyleSignature getStyleSignature() { + return StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, SName.task) + .withTOBECHANGED(getTask().getStereotype()); } public void drawU(UGraphic ug) { @@ -202,7 +204,7 @@ public class TaskDrawRegular extends AbstractTaskDraw { final FontConfiguration fc = style.getFontConfiguration(getColorSet()); final HorizontalAlignment horizontalAlignment = style.value(PName.HorizontalAlignment).asHorizontalAlignment(); - final Sheet sheet = skinParam.sheet(fc, horizontalAlignment, CreoleMode.FULL).createSheet(note); + final Sheet sheet = skinSimple.sheet(fc, horizontalAlignment, CreoleMode.FULL).createSheet(note); final double padding = style.value(PName.Padding).asDouble(); final SheetBlock1 sheet1 = new SheetBlock1(sheet, LineBreakStrategy.NONE, padding); diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeaderSimple.java b/src/net/sourceforge/plantuml/project/draw/TimeHeaderSimple.java index 65685fe36..a837c08f1 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeaderSimple.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeaderSimple.java @@ -86,7 +86,8 @@ public class TimeHeaderSimple extends TimeHeader { private void drawSmallVlinesDay(UGraphic ug, TimeScale timeScale, double totalHeightWithoutFooter) { ug = ug.apply(getLineColor()); - final ULine vbar = ULine.vline(totalHeightWithoutFooter); + ug = ug.apply(UTranslate.dy(6)); + final ULine vbar = ULine.vline(totalHeightWithoutFooter + 2); for (Day i = getMin(); i.compareTo(getMax().increment()) <= 0; i = i.increment(printScale)) { final double x1 = timeScale.getStartingPosition(i); ug.apply(UTranslate.dx(x1)).draw(vbar); @@ -120,15 +121,17 @@ public class TimeHeaderSimple extends TimeHeader { @Override public void drawTimeHeader(UGraphic ug, double totalHeightWithoutFooter) { - // drawTextsBackground(ug.apply(UTranslate.dy(-3)), totalHeightWithoutFooter + 6); + // drawTextsBackground(ug.apply(UTranslate.dy(-3)), totalHeightWithoutFooter + + // 6); final double xmin = getTimeScale().getStartingPosition(getMin()); final double xmax = getTimeScale().getEndingPosition(getMax()); - drawSmallVlinesDay(ug, getTimeScale(), totalHeightWithoutFooter + 2); + drawSmallVlinesDay(ug, getTimeScale(), totalHeightWithoutFooter); printVerticalSeparators(ug, totalHeightWithoutFooter); drawSimpleDayCounter(ug, getTimeScale()); // ug = ug.apply(getLineColor()); // ug.draw(ULine.hline(xmax - xmin)); - // ug.apply(UTranslate.dy(getFullHeaderHeight(ug.getStringBounder()) - 3)).draw(ULine.hline(xmax - xmin)); + // ug.apply(UTranslate.dy(getFullHeaderHeight(ug.getStringBounder()) - + // 3)).draw(ULine.hline(xmax - xmin)); } @@ -137,7 +140,8 @@ public class TimeHeaderSimple extends TimeHeader { final double xmin = getTimeScale().getStartingPosition(getMin()); final double xmax = getTimeScale().getEndingPosition(getMax()); ug = ug.apply(UTranslate.dy(3)); - drawSmallVlinesDay(ug, getTimeScale(), getTimeFooterHeight(ug.getStringBounder()) - 3); + // drawSmallVlinesDay(ug, getTimeScale(), + // getTimeFooterHeight(ug.getStringBounder()) - 3); drawSimpleDayCounter(ug, getTimeScale()); // ug.apply(getLineColor()).draw(ULine.hline(xmax - xmin)); } diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeaderYearly.java b/src/net/sourceforge/plantuml/project/draw/TimeHeaderYearly.java index 47893ed51..1c569b4ff 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeaderYearly.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeaderYearly.java @@ -35,7 +35,6 @@ */ package net.sourceforge.plantuml.project.draw; -import net.sourceforge.plantuml.klimt.UTranslate; import net.sourceforge.plantuml.klimt.drawing.UGraphic; import net.sourceforge.plantuml.klimt.font.StringBounder; import net.sourceforge.plantuml.klimt.shape.TextBlock; diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementAnything.java b/src/net/sourceforge/plantuml/project/lang/ComplementAnything.java index 787e7e55a..5a9bc3c45 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementAnything.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementAnything.java @@ -41,7 +41,7 @@ import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; -public class ComplementAnything implements Something { +public class ComplementAnything implements Something { public IRegex toRegex(String suffix) { return new RegexLeaf("ANYTHING" + suffix, "(.*?)"); diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementBeforeOrAfterOrAtTaskStartOrEnd.java b/src/net/sourceforge/plantuml/project/lang/ComplementBeforeOrAfterOrAtTaskStartOrEnd.java index fc61a7aad..cd8a2b411 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementBeforeOrAfterOrAtTaskStartOrEnd.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementBeforeOrAfterOrAtTaskStartOrEnd.java @@ -45,7 +45,7 @@ import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; -public class ComplementBeforeOrAfterOrAtTaskStartOrEnd implements Something { +public class ComplementBeforeOrAfterOrAtTaskStartOrEnd implements Something { private static final int POS_NB1 = 0; private static final int POS_WORKING1 = 1; diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementClose.java b/src/net/sourceforge/plantuml/project/lang/ComplementClose.java index a3ef45a6e..c2c2e449d 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementClose.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementClose.java @@ -41,7 +41,7 @@ import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; -public class ComplementClose implements Something { +public class ComplementClose implements Something { public IRegex toRegex(String suffix) { return new RegexLeaf("CLOSED" + suffix, "(closed?(?: for \\[([^\\[\\]]+?)\\])?)"); diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementCompleted.java b/src/net/sourceforge/plantuml/project/lang/ComplementCompleted.java index 5931f8e37..0ffcf0b1e 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementCompleted.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementCompleted.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; -public class ComplementCompleted implements Something { +public class ComplementCompleted implements Something { public IRegex toRegex(String suffix) { return new RegexLeaf("COMPLEMENT" + suffix, "(\\d+).*completed?"); diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementDate.java b/src/net/sourceforge/plantuml/project/lang/ComplementDate.java index 032af9d04..2b70fd246 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementDate.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementDate.java @@ -44,7 +44,7 @@ import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexOr; import net.sourceforge.plantuml.regex.RegexResult; -public class ComplementDate implements Something { +public class ComplementDate implements Something { private final Type type; diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementDates.java b/src/net/sourceforge/plantuml/project/lang/ComplementDates.java index a48a91aed..253f3e0cf 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementDates.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementDates.java @@ -45,7 +45,7 @@ import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexOr; import net.sourceforge.plantuml.regex.RegexResult; -public class ComplementDates implements Something { +public class ComplementDates implements Something { public IRegex toRegex(String suffix) { return new RegexOr(toRegexB(suffix), toRegexE(suffix)); diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementDayOfWeek.java b/src/net/sourceforge/plantuml/project/lang/ComplementDayOfWeek.java index 0bf87b3fe..e0cb00362 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementDayOfWeek.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementDayOfWeek.java @@ -43,7 +43,7 @@ import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; -public class ComplementDayOfWeek implements Something { +public class ComplementDayOfWeek implements Something { public IRegex toRegex(String suffix) { return new RegexConcat( // diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementEmpty.java b/src/net/sourceforge/plantuml/project/lang/ComplementEmpty.java index 52b5a3c96..d8ea753fe 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementEmpty.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementEmpty.java @@ -41,7 +41,7 @@ import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; -public class ComplementEmpty implements Something { +public class ComplementEmpty implements Something { public IRegex toRegex(String suffix) { return new RegexLeaf(""); diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementFromTo.java b/src/net/sourceforge/plantuml/project/lang/ComplementFromTo.java index e20149962..ac0eec32b 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementFromTo.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementFromTo.java @@ -41,7 +41,7 @@ import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; -public class ComplementFromTo implements Something { +public class ComplementFromTo implements Something { public IRegex toRegex(String suffix) { return new RegexLeaf("COMPLEMENT" + suffix, "from[%s]+\\[([^\\[\\]]+)\\][%s]+to[%s]+\\[([^\\[\\]]+)\\]"); diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementInColors.java b/src/net/sourceforge/plantuml/project/lang/ComplementInColors.java index 05fa7851e..a5e6cc3aa 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementInColors.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementInColors.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; -public class ComplementInColors implements Something { +public class ComplementInColors implements Something { public IRegex toRegex(String suffix) { return new RegexLeaf("COMPLEMENT" + suffix, "in[%s]+(#?\\w+)(?:/(#?\\w+))?"); diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementInColors2.java b/src/net/sourceforge/plantuml/project/lang/ComplementInColors2.java index 1a31c1c37..d68fefc74 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementInColors2.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementInColors2.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; -public class ComplementInColors2 implements Something { +public class ComplementInColors2 implements Something { public IRegex toRegex(String suffix) { return new RegexLeaf("COMPLEMENT" + suffix, "colou?red[%s]+(?:in[%s]+)?(#?\\w+)(?:/(#?\\w+))?"); diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementInColorsFromTo.java b/src/net/sourceforge/plantuml/project/lang/ComplementInColorsFromTo.java index 05d964cd6..ae9d67cdd 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementInColorsFromTo.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementInColorsFromTo.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; -public class ComplementInColorsFromTo implements Something { +public class ComplementInColorsFromTo implements Something { public IRegex toRegex(String suffix) { return new RegexLeaf("COMPLEMENT" + suffix, diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementNamed.java b/src/net/sourceforge/plantuml/project/lang/ComplementNamed.java index 901aef1ba..d8f05d7aa 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementNamed.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementNamed.java @@ -41,7 +41,7 @@ import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; -public class ComplementNamed implements Something { +public class ComplementNamed implements Something { public IRegex toRegex(String suffix) { return new RegexLeaf("COMPLEMENT" + suffix, "\\[([^\\[\\]]+)\\]"); diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementOpen.java b/src/net/sourceforge/plantuml/project/lang/ComplementOpen.java index c2090468d..a72a48027 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementOpen.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementOpen.java @@ -41,7 +41,7 @@ import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; -public class ComplementOpen implements Something { +public class ComplementOpen implements Something { public IRegex toRegex(String suffix) { return new RegexLeaf("OPEN" + suffix, "(opene?d?(?: for \\[([^\\[\\]]+?)\\])?)"); diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementSeveralDays.java b/src/net/sourceforge/plantuml/project/lang/ComplementSeveralDays.java index 03f1ebad2..b59548795 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementSeveralDays.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementSeveralDays.java @@ -43,7 +43,7 @@ import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; -public class ComplementSeveralDays implements Something { +public class ComplementSeveralDays implements Something { public IRegex toRegex(String suffix) { return new RegexConcat( // diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementTask.java b/src/net/sourceforge/plantuml/project/lang/ComplementTask.java index aae8a1e63..79759fcb9 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementTask.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementTask.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; -public class ComplementTask implements Something { +public class ComplementTask implements Something { public IRegex toRegex(String suffix) { return new RegexLeaf("COMPLEMENT" + suffix, "\\[([^\\[\\]]+?)\\]"); diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementUrl.java b/src/net/sourceforge/plantuml/project/lang/ComplementUrl.java index c7499f38a..5d2c44c9d 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementUrl.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementUrl.java @@ -45,7 +45,7 @@ import net.sourceforge.plantuml.url.Url; import net.sourceforge.plantuml.url.UrlBuilder; import net.sourceforge.plantuml.url.UrlMode; -public class ComplementUrl implements Something { +public class ComplementUrl implements Something { public IRegex toRegex(String suffix) { return new RegexConcat( // diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementWithColorLink.java b/src/net/sourceforge/plantuml/project/lang/ComplementWithColorLink.java index 688e44b44..b03645955 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementWithColorLink.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementWithColorLink.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; -public class ComplementWithColorLink implements Something { +public class ComplementWithColorLink implements Something { public IRegex toRegex(String suffix) { final String optionalStyle = "(?:(dotted|bold|dashed)[%s]+)?"; diff --git a/src/net/sourceforge/plantuml/project/lang/PairOfSomething.java b/src/net/sourceforge/plantuml/project/lang/PairOfSomething.java index ceb3e679b..9c2a02364 100644 --- a/src/net/sourceforge/plantuml/project/lang/PairOfSomething.java +++ b/src/net/sourceforge/plantuml/project/lang/PairOfSomething.java @@ -35,26 +35,26 @@ */ package net.sourceforge.plantuml.project.lang; +import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.project.Failable; -import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; -public class PairOfSomething implements Something { +public class PairOfSomething implements Something { - private final Something complement1; - private final Something complement2; + private final Something complement1; + private final Something complement2; - public PairOfSomething(Something complement1, Something complement2) { + public PairOfSomething(Something complement1, Something complement2) { this.complement1 = complement1; this.complement2 = complement2; } - public Failable getMe(GanttDiagram system, RegexResult arg, String suffix) { - final Failable r1 = complement1.getMe(system, arg, "A" + suffix); - final Failable r2 = complement2.getMe(system, arg, "B" + suffix); + public Failable getMe(D diagram, RegexResult arg, String suffix) { + final Failable r1 = complement1.getMe(diagram, arg, "A" + suffix); + final Failable r2 = complement2.getMe(diagram, arg, "B" + suffix); if (r1.isFail()) { return r1; } diff --git a/src/net/sourceforge/plantuml/project/lang/Sentence.java b/src/net/sourceforge/plantuml/project/lang/Sentence.java index eaed4f5a5..769157d28 100644 --- a/src/net/sourceforge/plantuml/project/lang/Sentence.java +++ b/src/net/sourceforge/plantuml/project/lang/Sentence.java @@ -36,19 +36,19 @@ package net.sourceforge.plantuml.project.lang; import net.sourceforge.plantuml.command.CommandExecutionResult; -import net.sourceforge.plantuml.project.GanttDiagram; +import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; -public interface Sentence { - +public interface Sentence { + public final RegexLeaf OPTIONAL_FINAL_DOT = new RegexLeaf("\\s*[.]?\\s*$"); - + public final RegexLeaf SENTENCE_SEPARATOR = new RegexLeaf("\\s*(,|\\sand\\s)\\s*"); public IRegex toRegex(); - public CommandExecutionResult execute(GanttDiagram project, RegexResult arg); + public CommandExecutionResult execute(D project, RegexResult arg); } diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceAnd.java b/src/net/sourceforge/plantuml/project/lang/SentenceAnd.java index 3929c6a7a..898a476fc 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceAnd.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceAnd.java @@ -36,19 +36,19 @@ package net.sourceforge.plantuml.project.lang; import net.sourceforge.plantuml.command.CommandExecutionResult; +import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.project.Failable; -import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; -public class SentenceAnd implements Sentence { +public class SentenceAnd implements Sentence { - private final SentenceSimple sentence1; - private final SentenceSimple sentence2; + private final SentenceSimple sentence1; + private final SentenceSimple sentence2; - public SentenceAnd(SentenceSimple sentence1, SentenceSimple sentence2) { + public SentenceAnd(SentenceSimple sentence1, SentenceSimple sentence2) { this.sentence1 = sentence1; this.sentence2 = sentence2; } @@ -70,7 +70,7 @@ public class SentenceAnd implements Sentence { OPTIONAL_FINAL_DOT); } - public final CommandExecutionResult execute(GanttDiagram project, RegexResult arg) { + public final CommandExecutionResult execute(D project, RegexResult arg) { final Failable subject = sentence1.getSubject().getMe(project, arg); if (subject.isFail()) return CommandExecutionResult.error(subject.getError()); diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceAndAnd.java b/src/net/sourceforge/plantuml/project/lang/SentenceAndAnd.java index 27a9d4ca7..5e8ba2406 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceAndAnd.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceAndAnd.java @@ -36,20 +36,20 @@ package net.sourceforge.plantuml.project.lang; import net.sourceforge.plantuml.command.CommandExecutionResult; +import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.project.Failable; -import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; -public class SentenceAndAnd implements Sentence { +public class SentenceAndAnd implements Sentence { - private final SentenceSimple sentence1; - private final SentenceSimple sentence2; - private final SentenceSimple sentence3; + private final SentenceSimple sentence1; + private final SentenceSimple sentence2; + private final SentenceSimple sentence3; - public SentenceAndAnd(SentenceSimple sentence1, SentenceSimple sentence2, SentenceSimple sentence3) { + public SentenceAndAnd(SentenceSimple sentence1, SentenceSimple sentence2, SentenceSimple sentence3) { this.sentence1 = sentence1; this.sentence2 = sentence2; this.sentence3 = sentence3; @@ -77,7 +77,7 @@ public class SentenceAndAnd implements Sentence { OPTIONAL_FINAL_DOT); } - public final CommandExecutionResult execute(GanttDiagram project, RegexResult arg) { + public final CommandExecutionResult execute(D project, RegexResult arg) { final Failable subject = sentence1.getSubject().getMe(project, arg); if (subject.isFail()) return CommandExecutionResult.error(subject.getError()); diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceDisplayOnSameRowAs.java b/src/net/sourceforge/plantuml/project/lang/SentenceDisplayOnSameRowAs.java index 4e4c955cb..9881a9a6b 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceDisplayOnSameRowAs.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceDisplayOnSameRowAs.java @@ -39,7 +39,7 @@ import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.project.core.Task; -public class SentenceDisplayOnSameRowAs extends SentenceSimple { +public class SentenceDisplayOnSameRowAs extends SentenceSimple { public SentenceDisplayOnSameRowAs() { super(SubjectTask.ME, Verbs.displayOnSameRowAs, new ComplementNamed()); diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceEnds.java b/src/net/sourceforge/plantuml/project/lang/SentenceEnds.java index 1fad6f20e..8cccba70f 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceEnds.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceEnds.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.project.core.Task; import net.sourceforge.plantuml.project.core.TaskAttribute; import net.sourceforge.plantuml.project.core.TaskInstant; -public class SentenceEnds extends SentenceSimple { +public class SentenceEnds extends SentenceSimple { public SentenceEnds() { super(SubjectTask.ME, Verbs.ends, new ComplementBeforeOrAfterOrAtTaskStartOrEnd()); diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceHappens.java b/src/net/sourceforge/plantuml/project/lang/SentenceHappens.java index f046ef8e2..7d408b59c 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceHappens.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceHappens.java @@ -41,7 +41,7 @@ import net.sourceforge.plantuml.project.Load; import net.sourceforge.plantuml.project.core.Task; import net.sourceforge.plantuml.project.core.TaskInstant; -public class SentenceHappens extends SentenceSimple { +public class SentenceHappens extends SentenceSimple { public SentenceHappens() { super(SubjectTask.ME, Verbs.happens, Words.zeroOrMore(Words.THE, Words.ON, Words.AT), diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceHappensDate.java b/src/net/sourceforge/plantuml/project/lang/SentenceHappensDate.java index afb8d886f..8dd8ceac8 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceHappensDate.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceHappensDate.java @@ -41,7 +41,7 @@ import net.sourceforge.plantuml.project.Load; import net.sourceforge.plantuml.project.core.Task; import net.sourceforge.plantuml.project.time.Day; -public class SentenceHappensDate extends SentenceSimple { +public class SentenceHappensDate extends SentenceSimple { public SentenceHappensDate() { super(SubjectTask.ME, Verbs.happens, Words.zeroOrMore(Words.THE, Words.ON, Words.AT), ComplementDate.any()); diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceIsColored.java b/src/net/sourceforge/plantuml/project/lang/SentenceIsColored.java index 67b576d84..8787d7472 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceIsColored.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceIsColored.java @@ -39,7 +39,7 @@ import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.project.core.Task; -public class SentenceIsColored extends SentenceSimple { +public class SentenceIsColored extends SentenceSimple { public SentenceIsColored() { super(SubjectTask.ME, Verbs.isColored, new ComplementInColors()); diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceIsColoredForCompletion.java b/src/net/sourceforge/plantuml/project/lang/SentenceIsColoredForCompletion.java index c07c2bd8a..502b2e370 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceIsColoredForCompletion.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceIsColoredForCompletion.java @@ -39,7 +39,7 @@ import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.project.core.Task; -public class SentenceIsColoredForCompletion extends SentenceSimple { +public class SentenceIsColoredForCompletion extends SentenceSimple { public SentenceIsColoredForCompletion() { super(SubjectTask.ME, Verbs.isColored, Words.exactly(Words.FOR, Words.COMPLETION), diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceIsDeleted.java b/src/net/sourceforge/plantuml/project/lang/SentenceIsDeleted.java index 470793882..6e9840f49 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceIsDeleted.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceIsDeleted.java @@ -39,7 +39,7 @@ import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.project.core.Task; -public class SentenceIsDeleted extends SentenceSimple { +public class SentenceIsDeleted extends SentenceSimple { public SentenceIsDeleted() { super(SubjectTask.ME, Verbs.isDeleted, new ComplementEmpty()); diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceIsDisplayedAs.java b/src/net/sourceforge/plantuml/project/lang/SentenceIsDisplayedAs.java index 78de0f2b3..9cd47e52c 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceIsDisplayedAs.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceIsDisplayedAs.java @@ -39,7 +39,7 @@ import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.project.core.Task; -public class SentenceIsDisplayedAs extends SentenceSimple { +public class SentenceIsDisplayedAs extends SentenceSimple { public SentenceIsDisplayedAs() { super(SubjectTask.ME, Verbs.isDisplayedAs, new ComplementAnything()); diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceIsForTask.java b/src/net/sourceforge/plantuml/project/lang/SentenceIsForTask.java index f69a156e7..2744814c7 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceIsForTask.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceIsForTask.java @@ -40,7 +40,7 @@ import net.sourceforge.plantuml.project.Completion; import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.project.core.Task; -public class SentenceIsForTask extends SentenceSimple { +public class SentenceIsForTask extends SentenceSimple { public SentenceIsForTask() { super(SubjectTask.ME, Verbs.is, new ComplementCompleted()); diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceLinksTo.java b/src/net/sourceforge/plantuml/project/lang/SentenceLinksTo.java index 68aca0d68..0901fd427 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceLinksTo.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceLinksTo.java @@ -40,7 +40,7 @@ import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.project.core.Task; import net.sourceforge.plantuml.url.Url; -public class SentenceLinksTo extends SentenceSimple { +public class SentenceLinksTo extends SentenceSimple { public SentenceLinksTo() { super(SubjectTask.ME, Verbs.linksTo, new ComplementUrl()); diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceOccurs.java b/src/net/sourceforge/plantuml/project/lang/SentenceOccurs.java index b307a2dc1..04fe2c3e3 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceOccurs.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceOccurs.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.project.core.Task; import net.sourceforge.plantuml.project.core.TaskAttribute; import net.sourceforge.plantuml.project.core.TaskInstant; -public class SentenceOccurs extends SentenceSimple { +public class SentenceOccurs extends SentenceSimple { public SentenceOccurs() { super(SubjectTask.ME, Verbs.occurs, new ComplementFromTo()); diff --git a/src/net/sourceforge/plantuml/project/lang/SentencePausesDate.java b/src/net/sourceforge/plantuml/project/lang/SentencePausesDate.java index 8cf020b38..893a20967 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentencePausesDate.java +++ b/src/net/sourceforge/plantuml/project/lang/SentencePausesDate.java @@ -40,7 +40,7 @@ import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.project.core.Task; import net.sourceforge.plantuml.project.time.Day; -public class SentencePausesDate extends SentenceSimple { +public class SentencePausesDate extends SentenceSimple { public SentencePausesDate() { super(SubjectTask.ME, Verbs.pauses, Words.zeroOrMore(Words.THE, Words.ON, Words.AT, Words.FROM), diff --git a/src/net/sourceforge/plantuml/project/lang/SentencePausesDates.java b/src/net/sourceforge/plantuml/project/lang/SentencePausesDates.java index 46d074559..36ac07c9a 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentencePausesDates.java +++ b/src/net/sourceforge/plantuml/project/lang/SentencePausesDates.java @@ -41,7 +41,7 @@ import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.project.core.Task; import net.sourceforge.plantuml.project.time.Day; -public class SentencePausesDates extends SentenceSimple { +public class SentencePausesDates extends SentenceSimple { public SentencePausesDates() { super(SubjectTask.ME, Verbs.pauses, Words.zeroOrMore(Words.THE, Words.ON, Words.AT, Words.FROM), diff --git a/src/net/sourceforge/plantuml/project/lang/SentencePausesDayOfWeek.java b/src/net/sourceforge/plantuml/project/lang/SentencePausesDayOfWeek.java index 8edc3d2b5..da52bf859 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentencePausesDayOfWeek.java +++ b/src/net/sourceforge/plantuml/project/lang/SentencePausesDayOfWeek.java @@ -40,7 +40,7 @@ import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.project.core.Task; import net.sourceforge.plantuml.project.time.DayOfWeek; -public class SentencePausesDayOfWeek extends SentenceSimple { +public class SentencePausesDayOfWeek extends SentenceSimple { public SentencePausesDayOfWeek() { super(SubjectTask.ME, Verbs.pauses, Words.zeroOrMore(Words.THE, Words.ON, Words.AT, Words.FROM), diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceRequire.java b/src/net/sourceforge/plantuml/project/lang/SentenceRequire.java index d22d11f1b..d866359c9 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceRequire.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceRequire.java @@ -40,7 +40,7 @@ import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.project.Load; import net.sourceforge.plantuml.project.core.Task; -public class SentenceRequire extends SentenceSimple { +public class SentenceRequire extends SentenceSimple { public SentenceRequire() { super(SubjectTask.ME, Verbs.requires, new ComplementSeveralDays()); diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceSimple.java b/src/net/sourceforge/plantuml/project/lang/SentenceSimple.java index d36769296..a82b8121e 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceSimple.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceSimple.java @@ -36,25 +36,25 @@ package net.sourceforge.plantuml.project.lang; import net.sourceforge.plantuml.command.CommandExecutionResult; +import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.project.Failable; -import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; -public abstract class SentenceSimple implements Sentence { +public abstract class SentenceSimple implements Sentence { - private final Subject subject; + private final Subject subject; private final IRegex verb; private final IRegex adverbialOrPropositon; - private final Something complement; + private final Something complement; - public SentenceSimple(Subject subject, IRegex verb, Something complement) { + public SentenceSimple(Subject subject, IRegex verb, Something complement) { this(subject, verb, new RegexLeaf(""), complement); } - public SentenceSimple(Subject subject, IRegex verb, IRegex adverbialOrPropositon, Something complement) { + public SentenceSimple(Subject subject, IRegex verb, IRegex adverbialOrPropositon, Something complement) { this.subject = subject; this.verb = verb; this.adverbialOrPropositon = adverbialOrPropositon; @@ -86,7 +86,7 @@ public abstract class SentenceSimple implements Sentence { OPTIONAL_FINAL_DOT); } - public final CommandExecutionResult execute(GanttDiagram project, RegexResult arg) { + public final CommandExecutionResult execute(D project, RegexResult arg) { final Failable currentSubject = subject.getMe(project, arg); if (currentSubject.isFail()) return CommandExecutionResult.error(currentSubject.getError()); @@ -99,7 +99,7 @@ public abstract class SentenceSimple implements Sentence { } - public abstract CommandExecutionResult execute(GanttDiagram project, Object subject, Object complement); + public abstract CommandExecutionResult execute(D project, Object subject, Object complement); public IRegex getVerbRegex() { return verb; @@ -108,15 +108,13 @@ public abstract class SentenceSimple implements Sentence { protected final IRegex getAdverbialOrPropositon() { return adverbialOrPropositon; } - - protected final Subject getSubject() { + + protected final Subject getSubject() { return subject; } - protected final Something getComplement() { + protected final Something getComplement() { return complement; } - - } diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceTaskEndsAbsolute.java b/src/net/sourceforge/plantuml/project/lang/SentenceTaskEndsAbsolute.java index ea10010e9..57d26e398 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceTaskEndsAbsolute.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceTaskEndsAbsolute.java @@ -40,7 +40,7 @@ import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.project.core.Task; import net.sourceforge.plantuml.project.time.Day; -public class SentenceTaskEndsAbsolute extends SentenceSimple { +public class SentenceTaskEndsAbsolute extends SentenceSimple { public SentenceTaskEndsAbsolute() { super(SubjectTask.ME, Verbs.ends, Words.zeroOrMore(Words.THE, Words.ON, Words.AT), ComplementDate.any()); diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceTaskEndsOnlyRelative.java b/src/net/sourceforge/plantuml/project/lang/SentenceTaskEndsOnlyRelative.java index 25524553f..0fbbd5676 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceTaskEndsOnlyRelative.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceTaskEndsOnlyRelative.java @@ -40,7 +40,7 @@ import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.project.core.Task; import net.sourceforge.plantuml.project.time.Day; -public class SentenceTaskEndsOnlyRelative extends SentenceSimple { +public class SentenceTaskEndsOnlyRelative extends SentenceSimple { public SentenceTaskEndsOnlyRelative() { super(SubjectTask.ME, Verbs.ends, Words.zeroOrMore(Words.THE, Words.ON, Words.AT), diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceTaskStarts.java b/src/net/sourceforge/plantuml/project/lang/SentenceTaskStarts.java index 6ce0543d3..95aeb442b 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceTaskStarts.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceTaskStarts.java @@ -43,7 +43,7 @@ import net.sourceforge.plantuml.project.core.Task; import net.sourceforge.plantuml.project.core.TaskAttribute; import net.sourceforge.plantuml.project.core.TaskInstant; -public class SentenceTaskStarts extends SentenceSimple { +public class SentenceTaskStarts extends SentenceSimple { public SentenceTaskStarts() { super(SubjectTask.ME, Verbs.starts, new ComplementBeforeOrAfterOrAtTaskStartOrEnd()); diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsAbsolute.java b/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsAbsolute.java index 3eb5b6616..a37db325d 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsAbsolute.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsAbsolute.java @@ -40,7 +40,7 @@ import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.project.core.Task; import net.sourceforge.plantuml.project.time.Day; -public class SentenceTaskStartsAbsolute extends SentenceSimple { +public class SentenceTaskStartsAbsolute extends SentenceSimple { public SentenceTaskStartsAbsolute() { super(SubjectTask.ME, Verbs.starts, Words.zeroOrMore(Words.THE, Words.ON, Words.AT), ComplementDate.any()); diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsOnlyRelative.java b/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsOnlyRelative.java index 80b4ded71..223a321d4 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsOnlyRelative.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsOnlyRelative.java @@ -40,7 +40,7 @@ import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.project.core.Task; import net.sourceforge.plantuml.project.time.Day; -public class SentenceTaskStartsOnlyRelative extends SentenceSimple { +public class SentenceTaskStartsOnlyRelative extends SentenceSimple { public SentenceTaskStartsOnlyRelative() { super(SubjectTask.ME, Verbs.starts, Words.zeroOrMore(Words.THE, Words.ON, Words.AT), diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsWithColor.java b/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsWithColor.java index 2e3acc159..a02ff614a 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsWithColor.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsWithColor.java @@ -43,11 +43,11 @@ import net.sourceforge.plantuml.project.core.Task; import net.sourceforge.plantuml.project.core.TaskAttribute; import net.sourceforge.plantuml.project.core.TaskInstant; -public class SentenceTaskStartsWithColor extends SentenceSimple { +public class SentenceTaskStartsWithColor extends SentenceSimple { public SentenceTaskStartsWithColor() { super(SubjectTask.ME, Verbs.starts, - new PairOfSomething(new ComplementBeforeOrAfterOrAtTaskStartOrEnd(), new ComplementWithColorLink())); + new PairOfSomething<>(new ComplementBeforeOrAfterOrAtTaskStartOrEnd(), new ComplementWithColorLink())); } @Override diff --git a/src/net/sourceforge/plantuml/project/lang/Something.java b/src/net/sourceforge/plantuml/project/lang/Something.java index 174518188..ac005a991 100644 --- a/src/net/sourceforge/plantuml/project/lang/Something.java +++ b/src/net/sourceforge/plantuml/project/lang/Something.java @@ -35,15 +35,15 @@ */ package net.sourceforge.plantuml.project.lang; +import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.project.Failable; -import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexResult; -public interface Something { +public interface Something { public IRegex toRegex(String suffix); - public Failable getMe(GanttDiagram project, RegexResult arg, String suffix); + public Failable getMe(D diagram, RegexResult arg, String suffix); } diff --git a/src/net/sourceforge/plantuml/project/lang/Subject.java b/src/net/sourceforge/plantuml/project/lang/Subject.java index 92c80670c..f53c0f906 100644 --- a/src/net/sourceforge/plantuml/project/lang/Subject.java +++ b/src/net/sourceforge/plantuml/project/lang/Subject.java @@ -37,17 +37,17 @@ package net.sourceforge.plantuml.project.lang; import java.util.Collection; +import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.project.Failable; -import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexResult; -public interface Subject { +public interface Subject { - public Collection getSentences(); + public Collection> getSentences(); public IRegex toRegex(); - public Failable getMe(GanttDiagram project, RegexResult arg); + public Failable getMe(D project, RegexResult arg); } diff --git a/src/net/sourceforge/plantuml/project/lang/SubjectDayAsDate.java b/src/net/sourceforge/plantuml/project/lang/SubjectDayAsDate.java index 473218921..ddc48e6e1 100644 --- a/src/net/sourceforge/plantuml/project/lang/SubjectDayAsDate.java +++ b/src/net/sourceforge/plantuml/project/lang/SubjectDayAsDate.java @@ -49,9 +49,9 @@ import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexOr; import net.sourceforge.plantuml.regex.RegexResult; -public class SubjectDayAsDate implements Subject { +public class SubjectDayAsDate implements Subject { - public static final Subject ME = new SubjectDayAsDate(); + public static final Subject ME = new SubjectDayAsDate(); private SubjectDayAsDate() { } @@ -89,11 +89,11 @@ public class SubjectDayAsDate implements Subject { throw new IllegalStateException(); } - public Collection getSentences() { + public Collection> getSentences() { return Arrays.asList(new Close(), new Open(), new InColor()); } - class Close extends SentenceSimple { + class Close extends SentenceSimple { public Close() { super(SubjectDayAsDate.this, Verbs.isOrAre, new ComplementClose()); @@ -106,7 +106,7 @@ public class SubjectDayAsDate implements Subject { } } - class Open extends SentenceSimple { + class Open extends SentenceSimple { public Open() { super(SubjectDayAsDate.this, Verbs.isOrAre, new ComplementOpen()); } @@ -118,7 +118,7 @@ public class SubjectDayAsDate implements Subject { } } - class InColor extends SentenceSimple { + class InColor extends SentenceSimple { public InColor() { super(SubjectDayAsDate.this, Verbs.isOrAre, new ComplementInColors2()); diff --git a/src/net/sourceforge/plantuml/project/lang/SubjectDayOfWeek.java b/src/net/sourceforge/plantuml/project/lang/SubjectDayOfWeek.java index a1c643774..9b4fffd05 100644 --- a/src/net/sourceforge/plantuml/project/lang/SubjectDayOfWeek.java +++ b/src/net/sourceforge/plantuml/project/lang/SubjectDayOfWeek.java @@ -47,9 +47,9 @@ import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; -public class SubjectDayOfWeek implements Subject { +public class SubjectDayOfWeek implements Subject { - public static final Subject ME = new SubjectDayOfWeek(); + public static final Subject ME = new SubjectDayOfWeek(); private SubjectDayOfWeek() { } @@ -63,11 +63,11 @@ public class SubjectDayOfWeek implements Subject { return Failable.ok(DayOfWeek.fromString(s)); } - public Collection getSentences() { + public Collection> getSentences() { return Arrays.asList(new AreClose(), new AreOpen(), new InColor()); } - class AreOpen extends SentenceSimple { + class AreOpen extends SentenceSimple { public AreOpen() { super(SubjectDayOfWeek.this, Verbs.are, new ComplementOpen()); } @@ -80,7 +80,7 @@ public class SubjectDayOfWeek implements Subject { } } - class AreClose extends SentenceSimple { + class AreClose extends SentenceSimple { public AreClose() { super(SubjectDayOfWeek.this, Verbs.are, new ComplementClose()); @@ -95,7 +95,7 @@ public class SubjectDayOfWeek implements Subject { } - class InColor extends SentenceSimple { + class InColor extends SentenceSimple { public InColor() { super(SubjectDayOfWeek.this, Verbs.isOrAre, new ComplementInColors2()); diff --git a/src/net/sourceforge/plantuml/project/lang/SubjectDaysAsDates.java b/src/net/sourceforge/plantuml/project/lang/SubjectDaysAsDates.java index 99680e27b..6f8955fa7 100644 --- a/src/net/sourceforge/plantuml/project/lang/SubjectDaysAsDates.java +++ b/src/net/sourceforge/plantuml/project/lang/SubjectDaysAsDates.java @@ -50,9 +50,9 @@ import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexOr; import net.sourceforge.plantuml.regex.RegexResult; -public class SubjectDaysAsDates implements Subject { +public class SubjectDaysAsDates implements Subject { - public static final Subject ME = new SubjectDaysAsDates(); + public static final Subject ME = new SubjectDaysAsDates(); private SubjectDaysAsDates() { } @@ -136,11 +136,11 @@ public class SubjectDaysAsDates implements Subject { throw new IllegalStateException(); } - public Collection getSentences() { + public Collection> getSentences() { return Arrays.asList(new Close(), new Open(), new InColor(), new Named()); } - class Close extends SentenceSimple { + class Close extends SentenceSimple { public Close() { super(SubjectDaysAsDates.this, Verbs.isOrAre, new ComplementClose()); @@ -156,7 +156,7 @@ public class SubjectDaysAsDates implements Subject { } } - class Open extends SentenceSimple { + class Open extends SentenceSimple { public Open() { super(SubjectDaysAsDates.this, Verbs.isOrAre, new ComplementOpen()); @@ -173,7 +173,7 @@ public class SubjectDaysAsDates implements Subject { } - class InColor extends SentenceSimple { + class InColor extends SentenceSimple { public InColor() { super(SubjectDaysAsDates.this, Verbs.isOrAre, new ComplementInColors2()); @@ -191,7 +191,7 @@ public class SubjectDaysAsDates implements Subject { } - class Named extends SentenceSimple { + class Named extends SentenceSimple { public Named() { super(SubjectDaysAsDates.this, Verbs.isOrAreNamed, new ComplementNamed()); diff --git a/src/net/sourceforge/plantuml/project/lang/SubjectLinks.java b/src/net/sourceforge/plantuml/project/lang/SubjectLinks.java index c76eaec28..164726cb6 100644 --- a/src/net/sourceforge/plantuml/project/lang/SubjectLinks.java +++ b/src/net/sourceforge/plantuml/project/lang/SubjectLinks.java @@ -46,7 +46,7 @@ import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; // Removed -public class SubjectLinks implements Subject { +public class SubjectLinks implements Subject { private SubjectLinks() { } @@ -59,11 +59,11 @@ public class SubjectLinks implements Subject { return Failable.ok(project); } - public Collection getSentences() { + public Collection> getSentences() { return Arrays.asList(new InColor()); } - public class InColor extends SentenceSimple { + public class InColor extends SentenceSimple { public InColor() { super(SubjectLinks.this, Verbs.areColored, new ComplementInColors()); diff --git a/src/net/sourceforge/plantuml/project/lang/SubjectProject.java b/src/net/sourceforge/plantuml/project/lang/SubjectProject.java index 4f72a2748..6bafeb2f2 100644 --- a/src/net/sourceforge/plantuml/project/lang/SubjectProject.java +++ b/src/net/sourceforge/plantuml/project/lang/SubjectProject.java @@ -46,9 +46,9 @@ import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; -public class SubjectProject implements Subject { +public class SubjectProject implements Subject { - public static final Subject ME = new SubjectProject(); + public static final Subject ME = new SubjectProject(); private SubjectProject() { } @@ -61,11 +61,11 @@ public class SubjectProject implements Subject { return Failable.ok(project); } - public Collection getSentences() { + public Collection> getSentences() { return Arrays.asList(new Starts()); } - class Starts extends SentenceSimple { + class Starts extends SentenceSimple { public Starts() { super(SubjectProject.this, Verbs.starts, Words.zeroOrMore(Words.ON, Words.FOR, Words.THE, Words.AT), diff --git a/src/net/sourceforge/plantuml/project/lang/SubjectResource.java b/src/net/sourceforge/plantuml/project/lang/SubjectResource.java index d9d311e2d..ab9ab182a 100644 --- a/src/net/sourceforge/plantuml/project/lang/SubjectResource.java +++ b/src/net/sourceforge/plantuml/project/lang/SubjectResource.java @@ -51,9 +51,9 @@ import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexOr; import net.sourceforge.plantuml.regex.RegexResult; -public class SubjectResource implements Subject { +public class SubjectResource implements Subject { - public static final Subject ME = new SubjectResource(); + public static final Subject ME = new SubjectResource(); private SubjectResource() { } @@ -71,7 +71,7 @@ public class SubjectResource implements Subject { return Failable.ok(result); } - public Collection getSentences() { + public Collection> getSentences() { return Arrays.asList(new IsOffDate(), new IsOffDates(), new IsOffDayOfWeek(), new IsOnDate(), new IsOnDates(), new IsOffBeforeDate(), new IsOffAfterDate(), new WorksOn()); } @@ -83,7 +83,7 @@ public class SubjectResource implements Subject { ); } - public class WorksOn extends SentenceSimple { + public class WorksOn extends SentenceSimple { public WorksOn() { super(SubjectResource.this, Verbs.worksOn, new ComplementTask()); @@ -99,7 +99,7 @@ public class SubjectResource implements Subject { } - public class IsOffBeforeDate extends SentenceSimple { + public class IsOffBeforeDate extends SentenceSimple { public IsOffBeforeDate() { super(SubjectResource.this, Verbs.isOff, @@ -116,7 +116,7 @@ public class SubjectResource implements Subject { } - public class IsOffAfterDate extends SentenceSimple { + public class IsOffAfterDate extends SentenceSimple { public IsOffAfterDate() { super(SubjectResource.this, Verbs.isOff, @@ -133,7 +133,7 @@ public class SubjectResource implements Subject { } - public class IsOffDate extends SentenceSimple { + public class IsOffDate extends SentenceSimple { public IsOffDate() { super(SubjectResource.this, Verbs.isOff, @@ -150,7 +150,7 @@ public class SubjectResource implements Subject { } - public class IsOffDates extends SentenceSimple { + public class IsOffDates extends SentenceSimple { public IsOffDates() { super(SubjectResource.this, Verbs.isOff, @@ -168,7 +168,7 @@ public class SubjectResource implements Subject { } - public class IsOffDayOfWeek extends SentenceSimple { + public class IsOffDayOfWeek extends SentenceSimple { public IsOffDayOfWeek() { super(SubjectResource.this, Verbs.isOff, @@ -184,7 +184,7 @@ public class SubjectResource implements Subject { } - public class IsOnDate extends SentenceSimple { + public class IsOnDate extends SentenceSimple { public IsOnDate() { super(SubjectResource.this, Verbs.isOn, @@ -201,7 +201,7 @@ public class SubjectResource implements Subject { } - public class IsOnDates extends SentenceSimple { + public class IsOnDates extends SentenceSimple { public IsOnDates() { super(SubjectResource.this, Verbs.isOn, diff --git a/src/net/sourceforge/plantuml/project/lang/SubjectSeparator.java b/src/net/sourceforge/plantuml/project/lang/SubjectSeparator.java index 4ed3a05e8..473696163 100644 --- a/src/net/sourceforge/plantuml/project/lang/SubjectSeparator.java +++ b/src/net/sourceforge/plantuml/project/lang/SubjectSeparator.java @@ -47,9 +47,9 @@ import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; -public class SubjectSeparator implements Subject { +public class SubjectSeparator implements Subject { - public static final Subject ME = new SubjectSeparator(); + public static final Subject ME = new SubjectSeparator(); private SubjectSeparator() { } @@ -62,11 +62,11 @@ public class SubjectSeparator implements Subject { return Failable.ok(project); } - public Collection getSentences() { + public Collection> getSentences() { return Arrays.asList(new JustBefore(), new JustAfter(), new Just()); } - class JustBefore extends SentenceSimple { + class JustBefore extends SentenceSimple { public JustBefore() { super(SubjectSeparator.this, Verbs.just, Words.exactly(Words.BEFORE), ComplementDate.any()); @@ -82,7 +82,7 @@ public class SubjectSeparator implements Subject { } - class JustAfter extends SentenceSimple { + class JustAfter extends SentenceSimple { public JustAfter() { super(SubjectSeparator.this, Verbs.just, Words.exactly(Words.AFTER), ComplementDate.any()); @@ -98,7 +98,7 @@ public class SubjectSeparator implements Subject { } - class Just extends SentenceSimple { + class Just extends SentenceSimple { public Just() { super(SubjectSeparator.this, Verbs.just, new ComplementBeforeOrAfterOrAtTaskStartOrEnd()); diff --git a/src/net/sourceforge/plantuml/project/lang/SubjectTask.java b/src/net/sourceforge/plantuml/project/lang/SubjectTask.java index da31a4542..0a0ef31dd 100644 --- a/src/net/sourceforge/plantuml/project/lang/SubjectTask.java +++ b/src/net/sourceforge/plantuml/project/lang/SubjectTask.java @@ -48,10 +48,12 @@ import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexOptional; import net.sourceforge.plantuml.regex.RegexOr; import net.sourceforge.plantuml.regex.RegexResult; +import net.sourceforge.plantuml.stereo.Stereotype; +import net.sourceforge.plantuml.stereo.StereotypePattern; -public class SubjectTask implements Subject { +public class SubjectTask implements Subject { - public static final Subject ME = new SubjectTask(); + public static final Subject ME = new SubjectTask(); private SubjectTask() { } @@ -64,9 +66,16 @@ public class SubjectTask implements Subject { return Failable.error("Not sure what are you refering to?"); } else { final String subject = arg.get("SUBJECT", 0); - final String shortName = arg.get("SUBJECT", 1); + final String shortName = arg.get("SHORTNAME", 0); final String then = arg.get("THEN", 0); + final String stereotype = arg.get("STEREOTYPE", 0); + result = gantt.getOrCreateTask(subject, shortName, then != null); + + if (stereotype != null) + result.setStereotype(Stereotype.build(arg.get("STEREOTYPE", 0))); + + gantt.setIt(result); } @@ -89,7 +98,7 @@ public class SubjectTask implements Subject { return Failable.ok(result); } - public Collection getSentences() { + public Collection> getSentences() { return Arrays.asList(new SentenceRequire(), new SentenceTaskStarts(), new SentenceTaskStartsWithColor(), new SentenceTaskStartsOnlyRelative(), new SentenceTaskStartsAbsolute(), new SentenceHappens(), new SentenceHappensDate(), new SentenceEnds(), new SentenceTaskEndsOnlyRelative(), @@ -103,13 +112,17 @@ public class SubjectTask implements Subject { return new RegexOr( // new RegexLeaf("IT", "(it)"), // new RegexConcat(new RegexLeaf("THEN", "(then[%s]+)?"), // - new RegexLeaf("SUBJECT", "\\[([^\\[\\]]+?)\\](?:[%s]+as[%s]+\\[([^\\[\\]]+?)\\])?"), // - new RegexOptional( // - new RegexConcat( // - Words.exactly(Words.ON), // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("RESOURCE", "((?:\\{[^{}]+\\}[%s]*)+)") // - )))); + new RegexLeaf("SUBJECT", "\\[([^\\[\\]]+?)\\]"), // + StereotypePattern.optional("STEREOTYPE"), // + new RegexOptional(new RegexConcat(// + Words.exactly(Words.AS), // + RegexLeaf.spaceOneOrMore(), // + new RegexLeaf("SHORTNAME", "\\[([^\\[\\]]+?)\\]"))), // + new RegexOptional(new RegexConcat( // + Words.exactly(Words.ON), // + RegexLeaf.spaceOneOrMore(), // + new RegexLeaf("RESOURCE", "((?:\\{[^{}]+\\}[%s]*)+)") // + )))); } } diff --git a/src/net/sourceforge/plantuml/project/lang/SubjectToday.java b/src/net/sourceforge/plantuml/project/lang/SubjectToday.java index 3ee19a018..0f4854f16 100644 --- a/src/net/sourceforge/plantuml/project/lang/SubjectToday.java +++ b/src/net/sourceforge/plantuml/project/lang/SubjectToday.java @@ -48,10 +48,10 @@ import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; -public class SubjectToday implements Subject { - // ::remove folder when __HAXE__ +public class SubjectToday implements Subject { + // ::remove folder when __HAXE__ - public static final Subject ME = new SubjectToday(); + public static final Subject ME = new SubjectToday(); private SubjectToday() { } @@ -66,11 +66,11 @@ public class SubjectToday implements Subject { return Failable.ok(new Today()); } - public Collection getSentences() { + public Collection> getSentences() { return Arrays.asList(new InColor(), new IsDate()); } - class InColor extends SentenceSimple { + class InColor extends SentenceSimple { public InColor() { super(SubjectToday.this, Verbs.isColored, new ComplementInColors()); @@ -87,7 +87,7 @@ public class SubjectToday implements Subject { } - class IsDate extends SentenceSimple { + class IsDate extends SentenceSimple { public IsDate() { super(SubjectToday.this, Verbs.is, ComplementDate.any()); diff --git a/src/net/sourceforge/plantuml/project/lang/Words.java b/src/net/sourceforge/plantuml/project/lang/Words.java index e3239c218..41bb31782 100644 --- a/src/net/sourceforge/plantuml/project/lang/Words.java +++ b/src/net/sourceforge/plantuml/project/lang/Words.java @@ -45,6 +45,7 @@ public class Words { public final static String AFTER = "after"; public final static String AND = "and"; + public final static String AS = "as"; public final static String AT = "at"; public final static String BEFORE = "before"; public final static String COMPLETION = "completion"; diff --git a/src/net/sourceforge/plantuml/project/time/Day.java b/src/net/sourceforge/plantuml/project/time/Day.java index b6eb3df98..f8d27cae6 100644 --- a/src/net/sourceforge/plantuml/project/time/Day.java +++ b/src/net/sourceforge/plantuml/project/time/Day.java @@ -36,6 +36,7 @@ package net.sourceforge.plantuml.project.time; import java.util.Calendar; +import java.util.Locale; import java.util.TimeZone; import net.sourceforge.plantuml.project.Value; @@ -48,7 +49,7 @@ public class Day implements Comparable, Value { private final int dayOfMonth; private final MonthYear monthYear; - private final long ms1; + private final long milliseconds; public static Day create(int year, String month, int dayOfMonth) { return new Day(year, Month.fromString(month), dayOfMonth); @@ -66,10 +67,14 @@ public class Day implements Comparable, Value { return create(System.currentTimeMillis()); } + public String toStringShort(Locale locale) { + return monthYear.shortName(locale) + " " + dayOfMonth; + } + public int getWeekOfYear(WeekNumberStrategy strategy) { synchronized (gmt) { gmt.clear(); - gmt.setTimeInMillis(ms1); + gmt.setTimeInMillis(milliseconds); gmt.setFirstDayOfWeek(strategy.getFirstDayOfWeekAsLegacyInt()); gmt.setMinimalDaysInFirstWeek(strategy.getMinimalDaysInFirstWeek()); return gmt.get(Calendar.WEEK_OF_YEAR); @@ -82,12 +87,12 @@ public class Day implements Comparable, Value { synchronized (gmt) { gmt.clear(); gmt.set(year, month.ordinal(), dayOfMonth); - this.ms1 = gmt.getTimeInMillis(); + this.milliseconds = gmt.getTimeInMillis(); } } private Day(long ms) { - this.ms1 = ms; + this.milliseconds = ms; synchronized (gmt) { gmt.clear(); gmt.setTimeInMillis(ms); @@ -113,11 +118,11 @@ public class Day implements Comparable, Value { } public final int getAbsoluteDayNum() { - return (int) (ms1 / MILLISECONDS_PER_DAY); + return (int) (milliseconds / MILLISECONDS_PER_DAY); } public final long getMillis() { - return ms1; + return milliseconds; } public int year() { @@ -195,4 +200,12 @@ public class Day implements Comparable, Value { return increment(); } + public Day roundDayDown() { + return new Day((milliseconds / MILLISECONDS_PER_DAY) * MILLISECONDS_PER_DAY); + } + + public Day roundDayUp() { + return new Day(((milliseconds + MILLISECONDS_PER_DAY - 1) / MILLISECONDS_PER_DAY) * MILLISECONDS_PER_DAY); + } + } diff --git a/src/net/sourceforge/plantuml/regexdiagram/PSystemRegex.java b/src/net/sourceforge/plantuml/regexdiagram/PSystemRegex.java index af874516c..e66975752 100644 --- a/src/net/sourceforge/plantuml/regexdiagram/PSystemRegex.java +++ b/src/net/sourceforge/plantuml/regexdiagram/PSystemRegex.java @@ -122,11 +122,11 @@ public class PSystemRegex extends TitledDiagram { @Override protected ImageData exportDiagramNow(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException { - return createImageBuilder(fileFormatOption).drawable(getTextBlock()).write(os); + return createImageBuilder(fileFormatOption).drawable(getTextMainBlock(fileFormatOption)).write(os); } @Override - protected TextBlock getTextBlock() { + protected TextBlock getTextMainBlock(FileFormatOption fileFormatOption) { // while (stack.size() > 1) // concatenation(); final ETile peekFirst = stack.peekFirst(); @@ -266,9 +266,10 @@ public class PSystemRegex extends TitledDiagram { if (arg1 instanceof ETileConcatenation) { arg1.push(arg2); stack.addFirst(arg1); - } else if (arg2 instanceof ETileConcatenation) { - arg2.push(arg1); - stack.addFirst(arg2); + // This does not work for (A[B])(C) +// } else if (arg2 instanceof ETileConcatenation) { +// arg2.push(arg1); +// stack.addFirst(arg2); } else { final ETile concat = new ETileConcatenation(); concat.push(arg1); diff --git a/src/net/sourceforge/plantuml/regexdiagram/RegexExpression.java b/src/net/sourceforge/plantuml/regexdiagram/RegexExpression.java index 77ab74334..584ed4e63 100644 --- a/src/net/sourceforge/plantuml/regexdiagram/RegexExpression.java +++ b/src/net/sourceforge/plantuml/regexdiagram/RegexExpression.java @@ -103,7 +103,7 @@ public class RegexExpression { return false; } - private static String readOpenParenthesis(CharInspector it) { + private static String readOpenParenthesis(CharInspector it) throws RegexParsingException { final char current0 = it.peek(0); it.jump(); final StringBuilder result = new StringBuilder(); @@ -118,6 +118,17 @@ public class RegexExpression { it.jump(); result.append("?!"); } + if (it.peek(0) == '?' && it.peek(1) == '<') { + while (true) { + if (it.peek(0) == 0) + throw new RegexParsingException("Unclosed named capturing group"); + if (it.peek(0) == '>') { + it.jump(); + return result.toString(); + } + it.jump(); + } + } return result.toString(); } diff --git a/src/net/sourceforge/plantuml/salt/PSystemSalt.java b/src/net/sourceforge/plantuml/salt/PSystemSalt.java index be3c0922a..303aa32bf 100644 --- a/src/net/sourceforge/plantuml/salt/PSystemSalt.java +++ b/src/net/sourceforge/plantuml/salt/PSystemSalt.java @@ -126,8 +126,7 @@ public class PSystemSalt extends TitledDiagram implements WithSprite { } @Override - protected TextBlock getTextBlock() { - final FileFormatOption fileFormatOption = new FileFormatOption(FileFormat.PNG); + protected TextBlock getTextMainBlock(FileFormatOption fileFormatOption) { final Element salt = createElement(manageSprite()); final StringBounder stringBounder = fileFormatOption.getDefaultStringBounder(getSkinParam()); final XDimension2D size = salt.getPreferredDimension(stringBounder, 0, 0); diff --git a/src/net/sourceforge/plantuml/sequencediagram/SequenceDiagram.java b/src/net/sourceforge/plantuml/sequencediagram/SequenceDiagram.java index d70277fb4..21bd66775 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/SequenceDiagram.java +++ b/src/net/sourceforge/plantuml/sequencediagram/SequenceDiagram.java @@ -296,13 +296,13 @@ public class SequenceDiagram extends UmlDiagram { } @Override - final public void exportDiagramGraphic(UGraphic ug) { - final FileMaker sequenceDiagramPngMaker = getSequenceDiagramPngMaker(0, new FileFormatOption(FileFormat.PNG)); + final public void exportDiagramGraphic(UGraphic ug, FileFormatOption fileFormatOption) { + final FileMaker sequenceDiagramPngMaker = getSequenceDiagramPngMaker(0, fileFormatOption); sequenceDiagramPngMaker.createOneGraphic(ug); } @Override - final protected TextBlock getTextBlock() { + final protected TextBlock getTextMainBlock(FileFormatOption fileFormatOption) { throw new UnsupportedOperationException(); } diff --git a/src/net/sourceforge/plantuml/sequencediagram/command/CommandArrow.java b/src/net/sourceforge/plantuml/sequencediagram/command/CommandArrow.java index c41b98fbd..5b4aa1ebe 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/command/CommandArrow.java +++ b/src/net/sourceforge/plantuml/sequencediagram/command/CommandArrow.java @@ -65,6 +65,7 @@ import net.sourceforge.plantuml.skin.ArrowDecoration; import net.sourceforge.plantuml.skin.ArrowHead; import net.sourceforge.plantuml.skin.ArrowPart; 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; @@ -123,9 +124,7 @@ public class CommandArrow extends SingleLineCommand2 { new RegexLeaf("ACTIVATION", "(?:(\\+\\+|\\*\\*|!!|--|--\\+\\+|\\+\\+--)?)"), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("LIFECOLOR", "(?:(#\\w+)?)"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREOTYPE"), // UrlBuilder.OPTIONAL, // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("MESSAGE", "(?::[%s]*(.*))?"), // diff --git a/src/net/sourceforge/plantuml/sequencediagram/command/CommandBoxStart.java b/src/net/sourceforge/plantuml/sequencediagram/command/CommandBoxStart.java index 9dc4752c6..10bd93bdd 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/command/CommandBoxStart.java +++ b/src/net/sourceforge/plantuml/sequencediagram/command/CommandBoxStart.java @@ -50,6 +50,7 @@ import net.sourceforge.plantuml.regex.RegexOr; import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.sequencediagram.SequenceDiagram; import net.sourceforge.plantuml.stereo.Stereotype; +import net.sourceforge.plantuml.stereo.StereotypePattern; import net.sourceforge.plantuml.style.ISkinParam; import net.sourceforge.plantuml.utils.LineLocation; @@ -69,8 +70,7 @@ public class CommandBoxStart extends SingleLineCommand2 { new RegexConcat( // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("NAME2", "([^#]+)")))), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO", "(\\<\\<.*\\>\\>)?"), // + StereotypePattern.optional("STEREO"), // color().getRegex(), // RegexLeaf.end()); } diff --git a/src/net/sourceforge/plantuml/sequencediagram/command/CommandParticipantA.java b/src/net/sourceforge/plantuml/sequencediagram/command/CommandParticipantA.java index 03c0cd3df..04236f68c 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/command/CommandParticipantA.java +++ b/src/net/sourceforge/plantuml/sequencediagram/command/CommandParticipantA.java @@ -40,6 +40,7 @@ import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexOptional; +import net.sourceforge.plantuml.stereo.StereotypePattern; import net.sourceforge.plantuml.url.UrlBuilder; public class CommandParticipantA extends CommandParticipant { @@ -60,13 +61,12 @@ public class CommandParticipantA extends CommandParticipant { RegexLeaf.spaceOneOrMore() // )), // new RegexLeaf("CODE", "([%pLN_.@]+)"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO"), // getOrderRegex(), // RegexLeaf.spaceZeroOrMore(), // UrlBuilder.OPTIONAL, // RegexLeaf.spaceZeroOrMore(), // ColorParser.exp1(), RegexLeaf.end()); } + } diff --git a/src/net/sourceforge/plantuml/sequencediagram/command/CommandParticipantA2.java b/src/net/sourceforge/plantuml/sequencediagram/command/CommandParticipantA2.java index 954bf7ac2..7014b0073 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/command/CommandParticipantA2.java +++ b/src/net/sourceforge/plantuml/sequencediagram/command/CommandParticipantA2.java @@ -39,6 +39,7 @@ import net.sourceforge.plantuml.klimt.color.ColorParser; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; +import net.sourceforge.plantuml.stereo.StereotypePattern; import net.sourceforge.plantuml.url.UrlBuilder; public class CommandParticipantA2 extends CommandParticipant { @@ -56,9 +57,7 @@ public class CommandParticipantA2 extends CommandParticipant { new RegexLeaf("as"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("FULL", "[%g]([^%g]+)[%g]"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO"), // getOrderRegex(), // RegexLeaf.spaceZeroOrMore(), // UrlBuilder.OPTIONAL, // diff --git a/src/net/sourceforge/plantuml/sequencediagram/command/CommandParticipantA3.java b/src/net/sourceforge/plantuml/sequencediagram/command/CommandParticipantA3.java index dcb2b2f0c..fe05fbc49 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/command/CommandParticipantA3.java +++ b/src/net/sourceforge/plantuml/sequencediagram/command/CommandParticipantA3.java @@ -39,6 +39,7 @@ import net.sourceforge.plantuml.klimt.color.ColorParser; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; +import net.sourceforge.plantuml.stereo.StereotypePattern; import net.sourceforge.plantuml.url.UrlBuilder; public class CommandParticipantA3 extends CommandParticipant { @@ -56,9 +57,7 @@ public class CommandParticipantA3 extends CommandParticipant { new RegexLeaf("as"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("CODE", "([%pLN_.@]+)"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO"), // getOrderRegex(), // RegexLeaf.spaceZeroOrMore(), // UrlBuilder.OPTIONAL, // diff --git a/src/net/sourceforge/plantuml/sequencediagram/command/CommandParticipantA4.java b/src/net/sourceforge/plantuml/sequencediagram/command/CommandParticipantA4.java index 6197f0265..c2ec8e1d0 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/command/CommandParticipantA4.java +++ b/src/net/sourceforge/plantuml/sequencediagram/command/CommandParticipantA4.java @@ -39,6 +39,7 @@ import net.sourceforge.plantuml.klimt.color.ColorParser; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; +import net.sourceforge.plantuml.stereo.StereotypePattern; import net.sourceforge.plantuml.url.UrlBuilder; public class CommandParticipantA4 extends CommandParticipant { @@ -52,9 +53,7 @@ public class CommandParticipantA4 extends CommandParticipant { getRegexType(), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("CODE", "[%g]([^%g]+)[%g]"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREO", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO"), // getOrderRegex(), // RegexLeaf.spaceZeroOrMore(), // UrlBuilder.OPTIONAL, // diff --git a/src/net/sourceforge/plantuml/sequencediagram/command/CommandParticipantMultilines.java b/src/net/sourceforge/plantuml/sequencediagram/command/CommandParticipantMultilines.java index b9d3a554e..6404fb347 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/command/CommandParticipantMultilines.java +++ b/src/net/sourceforge/plantuml/sequencediagram/command/CommandParticipantMultilines.java @@ -52,6 +52,7 @@ import net.sourceforge.plantuml.sequencediagram.Participant; import net.sourceforge.plantuml.sequencediagram.ParticipantType; import net.sourceforge.plantuml.sequencediagram.SequenceDiagram; import net.sourceforge.plantuml.stereo.Stereotype; +import net.sourceforge.plantuml.stereo.StereotypePattern; import net.sourceforge.plantuml.style.ISkinParam; import net.sourceforge.plantuml.url.Url; import net.sourceforge.plantuml.url.UrlBuilder; @@ -74,9 +75,7 @@ public class CommandParticipantMultilines extends CommandMultilines2\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREO"), // CommandParticipant.getOrderRegex(), // RegexLeaf.spaceZeroOrMore(), // UrlBuilder.OPTIONAL, // diff --git a/src/net/sourceforge/plantuml/skin/UmlDiagramType.java b/src/net/sourceforge/plantuml/skin/UmlDiagramType.java index 3beaf0691..00bdbd29f 100644 --- a/src/net/sourceforge/plantuml/skin/UmlDiagramType.java +++ b/src/net/sourceforge/plantuml/skin/UmlDiagramType.java @@ -39,7 +39,7 @@ import net.sourceforge.plantuml.style.SName; public enum UmlDiagramType { SEQUENCE, STATE, CLASS, OBJECT, ACTIVITY, DESCRIPTION, COMPOSITE, FLOW, TIMING, BPM, NWDIAG, MINDMAP, WBS, WIRE, - HELP, GANTT, SALT, JSON, GIT, BOARD, YAML, HCL, EBNF, REGEX, FILES; + HELP, GANTT, SALT, JSON, GIT, BOARD, YAML, HCL, EBNF, REGEX, FILES, CHRONOLOGY; public SName getStyleName() { if (this == SEQUENCE) @@ -96,6 +96,9 @@ public enum UmlDiagramType { if (this == REGEX) return SName.regex; + if (this == CHRONOLOGY) + return SName.ganttDiagram; + return SName.activityDiagram; } } diff --git a/src/net/sourceforge/plantuml/statediagram/command/CommandCreatePackage2.java b/src/net/sourceforge/plantuml/statediagram/command/CommandCreatePackage2.java index a683fe5b7..b2d94a443 100644 --- a/src/net/sourceforge/plantuml/statediagram/command/CommandCreatePackage2.java +++ b/src/net/sourceforge/plantuml/statediagram/command/CommandCreatePackage2.java @@ -55,6 +55,7 @@ import net.sourceforge.plantuml.regex.RegexOr; import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.statediagram.StateDiagram; 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; @@ -83,9 +84,7 @@ public class CommandCreatePackage2 extends SingleLineCommand2 { new RegexLeaf("as"), RegexLeaf.spaceOneOrMore() // )), // new RegexLeaf("CODE2", "([%pLN_.]+)"))), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREOTYPE"), // UrlBuilder.OPTIONAL, // RegexLeaf.spaceZeroOrMore(), // color().getRegex(), // diff --git a/src/net/sourceforge/plantuml/statediagram/command/CommandCreatePackageState.java b/src/net/sourceforge/plantuml/statediagram/command/CommandCreatePackageState.java index 6a8e408aa..b8a502ab9 100644 --- a/src/net/sourceforge/plantuml/statediagram/command/CommandCreatePackageState.java +++ b/src/net/sourceforge/plantuml/statediagram/command/CommandCreatePackageState.java @@ -56,6 +56,7 @@ import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.statediagram.StateDiagram; import net.sourceforge.plantuml.stereo.Stereotag; 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; @@ -86,9 +87,7 @@ public class CommandCreatePackageState extends SingleLineCommand2 new RegexLeaf("CODE2", "([%pLN_.]+)"))), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("TAGS1", Stereotag.pattern() + "?"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREOTYPE"), // new RegexLeaf("TAGS2", Stereotag.pattern() + "?"), // RegexLeaf.spaceZeroOrMore(), // UrlBuilder.OPTIONAL, // diff --git a/src/net/sourceforge/plantuml/statediagram/command/CommandCreateState.java b/src/net/sourceforge/plantuml/statediagram/command/CommandCreateState.java index 1de76f5f1..abb561747 100644 --- a/src/net/sourceforge/plantuml/statediagram/command/CommandCreateState.java +++ b/src/net/sourceforge/plantuml/statediagram/command/CommandCreateState.java @@ -56,6 +56,7 @@ import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.statediagram.StateDiagram; import net.sourceforge.plantuml.stereo.Stereotag; 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; @@ -85,9 +86,7 @@ public class CommandCreateState extends SingleLineCommand2 { new RegexLeaf("CODE4", "[%g]([^%g]+)[%g]")), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("TAGS1", Stereotag.pattern() + "?"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREOTYPE"), // new RegexLeaf("TAGS2", Stereotag.pattern() + "?"), // RegexLeaf.spaceZeroOrMore(), // UrlBuilder.OPTIONAL, // diff --git a/src/net/sourceforge/plantuml/stereo/Stereotype.java b/src/net/sourceforge/plantuml/stereo/Stereotype.java index 0268b9ae6..7cc43cd38 100644 --- a/src/net/sourceforge/plantuml/stereo/Stereotype.java +++ b/src/net/sourceforge/plantuml/stereo/Stereotype.java @@ -78,6 +78,8 @@ public class Stereotype implements CharSequence { } public static Stereotype build(String label) { + if (label == null) + return null; return build(label, true); } diff --git a/src/net/sourceforge/plantuml/stereo/StereotypePattern.java b/src/net/sourceforge/plantuml/stereo/StereotypePattern.java new file mode 100644 index 000000000..c86520408 --- /dev/null +++ b/src/net/sourceforge/plantuml/stereo/StereotypePattern.java @@ -0,0 +1,71 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.stereo; + +import net.sourceforge.plantuml.regex.IRegex; +import net.sourceforge.plantuml.regex.RegexConcat; +import net.sourceforge.plantuml.regex.RegexLeaf; +import net.sourceforge.plantuml.regex.RegexOptional; + +public class StereotypePattern { + + public static IRegex optional(String param) { + return new RegexConcat( // + RegexLeaf.spaceZeroOrMore(), // + new RegexOptional(mandatory(param)), // + RegexLeaf.spaceZeroOrMore() // + ); + } + + public static IRegex mandatory(String param) { + return new RegexLeaf(param, "(\\<\\<.+\\>\\>)"); + } + + public static IRegex optionalArchimate(String param) { + return new RegexConcat( // + RegexLeaf.spaceZeroOrMore(), // + new RegexOptional(new RegexLeaf(param, "(\\<\\<[-\\w]+\\>\\>)")), // + RegexLeaf.spaceZeroOrMore() // + ); + } + + public static String removeChevronBrackets(String stereo) { + if (stereo != null && stereo.startsWith("<<") && stereo.endsWith(">>")) + return stereo.substring(2, stereo.length() - 2); + return stereo; + } + +} diff --git a/src/net/sourceforge/plantuml/sudoku/PSystemSudoku.java b/src/net/sourceforge/plantuml/sudoku/PSystemSudoku.java index 90ce3c596..11c342031 100644 --- a/src/net/sourceforge/plantuml/sudoku/PSystemSudoku.java +++ b/src/net/sourceforge/plantuml/sudoku/PSystemSudoku.java @@ -70,7 +70,7 @@ public class PSystemSudoku extends AbstractPSystem { } @Override - public void exportDiagramGraphic(UGraphic ug) { + public void exportDiagramGraphic(UGraphic ug, FileFormatOption fileFormatOption) { final GraphicsSudoku sud = new GraphicsSudoku(sudoku); sud.drawInternal(ug); } diff --git a/src/net/sourceforge/plantuml/tim/Eater.java b/src/net/sourceforge/plantuml/tim/Eater.java index a4b74b118..c23fbf085 100644 --- a/src/net/sourceforge/plantuml/tim/Eater.java +++ b/src/net/sourceforge/plantuml/tim/Eater.java @@ -79,7 +79,7 @@ public abstract class Eater { } final public TValue eatExpression(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { - char ch = peekChar(); + final char ch = peekChar(); if (ch == '{' || ch == '[') { final String data = eatAllToEnd(); // System.err.println("data=" + data); diff --git a/src/net/sourceforge/plantuml/timingdiagram/TimingDiagram.java b/src/net/sourceforge/plantuml/timingdiagram/TimingDiagram.java index 0847489b3..03d10d127 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/TimingDiagram.java +++ b/src/net/sourceforge/plantuml/timingdiagram/TimingDiagram.java @@ -99,11 +99,11 @@ public class TimingDiagram extends UmlDiagram implements Clocks { protected ImageData exportDiagramInternal(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException { - return createImageBuilder(fileFormatOption).drawable(getTextBlock()).write(os); + return createImageBuilder(fileFormatOption).drawable(getTextMainBlock(fileFormatOption)).write(os); } @Override - protected TextBlock getTextBlock() { + protected TextBlock getTextMainBlock(FileFormatOption fileFormatOption) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { diff --git a/src/net/sourceforge/plantuml/timingdiagram/command/CommandAnalog.java b/src/net/sourceforge/plantuml/timingdiagram/command/CommandAnalog.java index ebbaf7a68..2c16fc6c2 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/command/CommandAnalog.java +++ b/src/net/sourceforge/plantuml/timingdiagram/command/CommandAnalog.java @@ -43,6 +43,7 @@ import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexOptional; import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.stereo.Stereotype; +import net.sourceforge.plantuml.stereo.StereotypePattern; import net.sourceforge.plantuml.timingdiagram.PlayerAnalog; import net.sourceforge.plantuml.timingdiagram.TimingDiagram; import net.sourceforge.plantuml.utils.LineLocation; @@ -62,9 +63,7 @@ public class CommandAnalog extends SingleLineCommand2 { new RegexLeaf("analog"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("FULL", "[%g]([^%g]+)[%g]"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceOneOrMore(), // + StereotypePattern.optional("STEREOTYPE"), // new RegexOptional(// new RegexConcat( // new RegexLeaf("between"), // @@ -78,9 +77,7 @@ public class CommandAnalog extends SingleLineCommand2 { new RegexLeaf("as"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("CODE", "([%pLN_.@]+)"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREOTYPE2", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREOTYPE2"), // RegexLeaf.end()); } diff --git a/src/net/sourceforge/plantuml/timingdiagram/command/CommandBinary.java b/src/net/sourceforge/plantuml/timingdiagram/command/CommandBinary.java index 8feb151ab..e46b9d077 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/command/CommandBinary.java +++ b/src/net/sourceforge/plantuml/timingdiagram/command/CommandBinary.java @@ -43,6 +43,7 @@ import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexOptional; import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.stereo.Stereotype; +import net.sourceforge.plantuml.stereo.StereotypePattern; import net.sourceforge.plantuml.timingdiagram.TimingDiagram; import net.sourceforge.plantuml.utils.LineLocation; @@ -61,15 +62,11 @@ public class CommandBinary extends SingleLineCommand2 { new RegexLeaf("binary"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("FULL", "[%g]([^%g]+)[%g]"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceOneOrMore(), // + StereotypePattern.optional("STEREOTYPE"), // new RegexLeaf("as"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("CODE", "([%pLN_.@]+)"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREOTYPE2", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREOTYPE2"), // RegexLeaf.end()); } diff --git a/src/net/sourceforge/plantuml/timingdiagram/command/CommandRobustConcise.java b/src/net/sourceforge/plantuml/timingdiagram/command/CommandRobustConcise.java index 432b0fde1..51716350c 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/command/CommandRobustConcise.java +++ b/src/net/sourceforge/plantuml/timingdiagram/command/CommandRobustConcise.java @@ -43,6 +43,7 @@ import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexOptional; import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.stereo.Stereotype; +import net.sourceforge.plantuml.stereo.StereotypePattern; import net.sourceforge.plantuml.timingdiagram.TimingDiagram; import net.sourceforge.plantuml.timingdiagram.TimingStyle; import net.sourceforge.plantuml.utils.LineLocation; @@ -64,15 +65,11 @@ public class CommandRobustConcise extends SingleLineCommand2 { new RegexOptional( // new RegexConcat( // new RegexLeaf("FULL", "[%g]([^%g]+)[%g]"), // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREOTYPE"), // new RegexLeaf("as"), // RegexLeaf.spaceOneOrMore())), // new RegexLeaf("CODE", "([%pLN_.@]+)"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREOTYPE2", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREOTYPE2"), // RegexLeaf.end()); } diff --git a/src/net/sourceforge/plantuml/version/PSystemLicense.java b/src/net/sourceforge/plantuml/version/PSystemLicense.java index 50cebbdee..d3ecb24e8 100644 --- a/src/net/sourceforge/plantuml/version/PSystemLicense.java +++ b/src/net/sourceforge/plantuml/version/PSystemLicense.java @@ -76,7 +76,7 @@ public class PSystemLicense extends PlainDiagram implements UDrawable { } @Override - public void exportDiagramGraphic(UGraphic ug) { + public void exportDiagramGraphic(UGraphic ug, FileFormatOption fileFormatOption) { final LicenseInfo licenseInfo = LicenseInfo.retrieveQuick(); getTextBlock(licenseInfo).drawU(ug); } diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index 942297437..1d1a930c7 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -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.13beta3"; + private static final String version = "1.2023.13beta4"; public static String versionString() { return version; diff --git a/src/net/sourceforge/plantuml/wbs/CommandWBSLink.java b/src/net/sourceforge/plantuml/wbs/CommandWBSLink.java index a8ca6d469..0a88bb07e 100644 --- a/src/net/sourceforge/plantuml/wbs/CommandWBSLink.java +++ b/src/net/sourceforge/plantuml/wbs/CommandWBSLink.java @@ -46,6 +46,7 @@ import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; 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 CommandWBSLink extends SingleLineCommand2 { @@ -64,9 +65,7 @@ public class CommandWBSLink extends SingleLineCommand2 { new RegexLeaf("CODE2", "([%pLN_]+)"), // RegexLeaf.spaceZeroOrMore(), // color().getRegex(), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), // - RegexLeaf.spaceZeroOrMore(), // + StereotypePattern.optional("STEREOTYPE"), // new RegexLeaf("LABEL_LINK", "(?::[%s]*(.+))?"), // RegexLeaf.end()); } diff --git a/src/net/sourceforge/plantuml/wbs/WBSDiagram.java b/src/net/sourceforge/plantuml/wbs/WBSDiagram.java index 6d3e03663..192d9e3b4 100644 --- a/src/net/sourceforge/plantuml/wbs/WBSDiagram.java +++ b/src/net/sourceforge/plantuml/wbs/WBSDiagram.java @@ -92,11 +92,11 @@ public class WBSDiagram extends UmlDiagram { protected ImageData exportDiagramInternal(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException { - return createImageBuilder(fileFormatOption).drawable(getTextBlock()).write(os); + return createImageBuilder(fileFormatOption).drawable(getTextMainBlock(fileFormatOption)).write(os); } @Override - protected TextBlock getTextBlock() { + protected TextBlock getTextMainBlock(FileFormatOption fileFormatOption) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { diff --git a/src/net/sourceforge/plantuml/wire/WireDiagram.java b/src/net/sourceforge/plantuml/wire/WireDiagram.java index 12cf30cc3..7919be884 100644 --- a/src/net/sourceforge/plantuml/wire/WireDiagram.java +++ b/src/net/sourceforge/plantuml/wire/WireDiagram.java @@ -76,11 +76,11 @@ public class WireDiagram extends UmlDiagram { protected ImageData exportDiagramInternal(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException { - return createImageBuilder(fileFormatOption).drawable(getTextBlock()).write(os); + return createImageBuilder(fileFormatOption).drawable(getTextMainBlock(fileFormatOption)).write(os); } @Override - protected TextBlock getTextBlock() { + protected TextBlock getTextMainBlock(FileFormatOption fileFormatOption) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { diff --git a/test/net/sourceforge/plantuml/PipeTest.java b/test/net/sourceforge/plantuml/PipeTest.java index a975bf26c..6db686723 100644 --- a/test/net/sourceforge/plantuml/PipeTest.java +++ b/test/net/sourceforge/plantuml/PipeTest.java @@ -127,7 +127,7 @@ class PipeTest { false, false)); l.add(TestCase.of("-syntax", "@startuml\na->b\n@enduml\n@startuml\na->b\nb->c\n@enduml\n", "SEQUENCE\n(2 participants)\nSEQUENCE\n(3 participants)\n", Verification.EXACT, false, false)); - l.add(TestCase.of("-syntax", "@startgantt\n[a] lasts 1 day\n@endgantt", "OTHER\n(Project)\n", + l.add(TestCase.of("-syntax", "@startgantt\n[a] lasts 1 day\n@endgantt", "OTHER\n(Gantt)\n", Verification.EXACT, false, false)); // invalid syntax diff --git a/test/nonreg/RenderViaApiTest.java b/test/nonreg/RenderViaApiTest.java new file mode 100644 index 000000000..295eb1a56 --- /dev/null +++ b/test/nonreg/RenderViaApiTest.java @@ -0,0 +1,56 @@ +package nonreg; + +import static java.nio.charset.StandardCharsets.UTF_8; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.util.Lists.newArrayList; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.io.PrintStream; +import java.util.Collections; +import java.util.List; + +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.CsvSource; + +import net.sourceforge.plantuml.FileFormat; +import net.sourceforge.plantuml.FileFormatOption; +import net.sourceforge.plantuml.SourceStringReader; +import net.sourceforge.plantuml.core.DiagramDescription; + +/** + * Tests the Render + */ +class RenderViaApiTest { + + @ParameterizedTest(name = "[{index}] {1}") + @CsvSource(nullValues = "null", value = { + "'@startuml\n!$a={\"k\": \"exampleValue\"}\ntitle $a.k\na -> b\n@enduml\n' , exampleValue", + "'@startuml\n!$a=[1, 2, 3]\ntitle xx $a[2] yy\na -> a\n@enduml' , xx 3 yy", + "'@startuml\ntitle\n!foreach $i in [1, 2, 3]\nxx $i yy\n!endfor\nendtitle\na -> a\n@enduml' , xx 2 yy", + "'@startuml\ntitle\n!foreach $i in [\"a\", \"b\", \"c\"]\nxx $i yy\n!endfor\nendtitle\na -> a\n@enduml' , xx b yy", + }) + void RenderTest(String input, String expected) throws Exception { + assertRenderExpectedOutput(input, expected); + } + + // TODO: to Factorize on a specific test package... + + private String RenderViaApiTest(String diagram, FileFormat format) throws IOException, UnsupportedEncodingException { + final SourceStringReader ssr = new SourceStringReader(diagram, UTF_8); + final ByteArrayOutputStream baos = new ByteArrayOutputStream(); + final DiagramDescription diagramDescription = ssr.outputImage(baos, 0, new FileFormatOption(format)); + final String rendered = new String(baos.toByteArray(), UTF_8); + // System.out.println(rendered); + return rendered; + } + + public void assertRenderExpectedOutput(String input, String expected) throws Exception { + final String rendered = RenderViaApiTest(input, FileFormat.PREPROC); + // OK with: + // final String rendered = RenderViaApiTest(input, FileFormat.UTXT); + assertThat(rendered).doesNotContain("syntax").contains(expected); + } +} diff --git a/test/nonreg/RenderViaPipeTest.java b/test/nonreg/RenderViaPipeTest.java new file mode 100644 index 000000000..9a76078b9 --- /dev/null +++ b/test/nonreg/RenderViaPipeTest.java @@ -0,0 +1,63 @@ +package nonreg; + +import static java.nio.charset.StandardCharsets.UTF_8; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.util.Lists.newArrayList; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import java.util.Collections; +import java.util.List; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.CsvSource; + +import net.sourceforge.plantuml.ErrorStatus; +import net.sourceforge.plantuml.Option; +import net.sourceforge.plantuml.Pipe; + +/** + * Tests the Render + */ +class RenderViaPipeTest { + + @ParameterizedTest(name = "[{index}] {1}") + @CsvSource(nullValues = "null", value = { + "'@startuml\n!$a={\"k\": \"exampleValue\"}\ntitle $a.k\na -> b\n@enduml\n' , exampleValue", + "'@startuml\n!$a=[1, 2, 3]\ntitle xx $a[2] yy\na -> a\n' , xx 3 yy", + "'@startuml\ntitle\n!foreach $i in [1, 2, 3]\nxx $i yy\n!endfor\nendtitle\na -> a\n' , xx 2 yy", + "'@startuml\ntitle\n!foreach $i in [\"a\", \"b\", \"c\"]\nxx $i yy\n!endfor\nendtitle\na -> a\n' , xx b yy", + }) + void RenderTest(String input, String expected) throws Exception { + assertRenderExpectedOutput(input, expected); + } + + // TODO: to Factorize on a specific test package... + private static final String[] COMMON_OPTIONS = {"-preproc"}; + // OK with "-tutxt" + // private static final String[] COMMON_OPTIONS = {"-tutxt"}; + + private String[] optionArray(String... extraOptions) { + final List list = newArrayList(COMMON_OPTIONS); + Collections.addAll(list, extraOptions); + return list.toArray(new String[0]); + } + + private String renderViaPipe(String diagram, String... extraOptions) throws Exception { + final Option option = new Option(optionArray(extraOptions)); + final ByteArrayInputStream bais = new ByteArrayInputStream(diagram.getBytes(UTF_8)); + final ByteArrayOutputStream baos = new ByteArrayOutputStream(); + final Pipe pipe = new Pipe(option, new PrintStream(baos), bais, option.getCharset()); + pipe.managePipe(ErrorStatus.init()); + final String rendered = new String(baos.toByteArray(), UTF_8); + // System.out.println(rendered); + return rendered; + } + + public void assertRenderExpectedOutput(String input, String expected) throws Exception { + final String rendered = renderViaPipe(input); + assertThat(rendered).doesNotContain("syntax").contains(expected); + } +} diff --git a/test/nonreg/simple/A0003_Test.java b/test/nonreg/simple/A0003_Test.java index 5d78367bd..99bbf5888 100644 --- a/test/nonreg/simple/A0003_Test.java +++ b/test/nonreg/simple/A0003_Test.java @@ -29,6 +29,6 @@ public class A0003_Test extends BasicTest { @Test void testSimple() throws IOException { - checkImage("(Project)"); + checkImage("(Gantt)"); } } From a061b11305e8754a958fd8f59ed336de0c99f7b5 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Mon, 11 Dec 2023 18:47:30 +0100 Subject: [PATCH 33/95] chore: formatting issue --- src/net/sourceforge/plantuml/PSystemBuilder.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/net/sourceforge/plantuml/PSystemBuilder.java b/src/net/sourceforge/plantuml/PSystemBuilder.java index 5d1fbca15..40bde6ee6 100644 --- a/src/net/sourceforge/plantuml/PSystemBuilder.java +++ b/src/net/sourceforge/plantuml/PSystemBuilder.java @@ -224,8 +224,7 @@ public class PSystemBuilder { // 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 @@ -249,8 +248,7 @@ public class PSystemBuilder { // ::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 From a87f84406465e29784342173ee1eb2733d135b81 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Mon, 11 Dec 2023 19:03:13 +0100 Subject: [PATCH 34/95] fix: missing label in activity diagrams https://github.com/plantuml/plantuml/issues/1622#issuecomment-1847091587 --- .../plantuml/activitydiagram3/InstructionList.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionList.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionList.java index 7bec98e0d..d8362f656 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionList.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionList.java @@ -129,8 +129,13 @@ public class InstructionList extends WithNote implements Instruction, Instructio @Override public Ftile createFtile(FtileFactory factory) { - if (all.size() == 0) - return new FtileEmpty(factory.skinParam(), defaultSwimlane); + if (all.size() == 0) { + Ftile result = new FtileEmpty(factory.skinParam(), defaultSwimlane); + // Not a typo, in that case, we decide to decorate the entry link. + if (outlinkRendering != null) + result = factory.decorateIn(result, outlinkRendering); + return result; + } final List breaks = new ArrayList<>(); Ftile result = eventuallyAddNote(factory, null, getSwimlaneIn(), VerticalAlignment.CENTER); From 5128891a0fe3473bf660a24f2077c5f6eab6d9e7 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Mon, 11 Dec 2023 19:24:54 +0100 Subject: [PATCH 35/95] chore: version 1.2023.13 --- gradle.properties | 2 +- src/net/sourceforge/plantuml/version/Version.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index ee1cf3aff..e5189954b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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.13beta4 +version = 1.2023.13 org.gradle.workers.max = 3 \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index 1d1a930c7..c14810bc1 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -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.13beta4"; + private static final String version = "1.2023.13"; public static String versionString() { return version; @@ -80,7 +80,7 @@ public class Version { } public static long compileTime() { - return 1697809794384L; + return 1702318857783L; } public static String compileTimeString() { From cc80d86bc3c13e4f95d6c4060692fbab15301fde Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Tue, 12 Dec 2023 21:35:19 +0100 Subject: [PATCH 36/95] chore: prepare next development cycle --- gradle.properties | 2 +- src/net/sourceforge/plantuml/version/Version.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index e5189954b..13efff07a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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.13 +version = 1.2023.14beta1 org.gradle.workers.max = 3 \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index c14810bc1..05f088d68 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -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.13"; + private static final String version = "1.2023.14beta1"; public static String versionString() { return version; From 371bafaade0a51030c3cb7b86d49d5e14bef5a6d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Dec 2023 02:43:21 +0000 Subject: [PATCH 37/95] chore(deps): bump actions/upload-artifact from 3 to 4 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec444f245..88dde8a0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -115,7 +115,7 @@ jobs: run: gradle test --no-daemon -i - name: Upload test reports - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: needs.workflow_config.outputs.do_test_linux == 'true' with: # Using github.run_number here to reduce confusion when downloading & comparing from several builds @@ -244,7 +244,7 @@ jobs: enableCrossOsArchive: true - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: # Using github.run_number here to reduce confusion when downloading & comparing artifacts from several builds name: ${{ github.run_number }}-artifacts From b65aaff80b1837ea1e56d70802c88e7dbfb1470f Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Mon, 18 Dec 2023 18:24:29 +0100 Subject: [PATCH 38/95] fix: improve local style for activity diagrams https://github.com/plantuml/plantuml/issues/1623 --- .../activitydiagram3/InstructionIf.java | 11 +- .../activitydiagram3/ftile/FtileFactory.java | 4 +- .../ftile/FtileFactoryDelegator.java | 7 +- .../vcompact/FtileFactoryDelegatorIf.java | 8 +- .../ftile/vcompact/VCompactFactory.java | 3 +- .../plantuml/ebnf/ETileNamedGroup.java | 143 ++++++++++++++++++ .../plantuml/regexdiagram/PSystemRegex.java | 11 +- .../plantuml/regexdiagram/ReTokenType.java | 3 + .../regexdiagram/RegexExpression.java | 73 +++++++-- .../plantuml/regexdiagram/ShuntingYard.java | 7 +- 10 files changed, 240 insertions(+), 30 deletions(-) create mode 100644 src/net/sourceforge/plantuml/ebnf/ETileNamedGroup.java diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionIf.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionIf.java index ee2b423b8..49e136308 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionIf.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionIf.java @@ -59,6 +59,7 @@ 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.StyleBuilder; import net.sourceforge.plantuml.url.Url; public class InstructionIf extends WithNote implements Instruction, InstructionCollection { @@ -77,6 +78,7 @@ public class InstructionIf extends WithNote implements Instruction, InstructionC private final Stereotype stereotype; private final Swimlane swimlane; + private final StyleBuilder currentStyleBuilder; @Override public boolean containsBreak() { @@ -98,8 +100,9 @@ public class InstructionIf extends WithNote implements Instruction, InstructionC this.skinParam = skinParam; this.topInlinkRendering = Objects.requireNonNull(inlinkRendering); this.swimlane = swimlane; - this.thens.add(new Branch(skinParam.getCurrentStyleBuilder(), swimlane, whenThen, labelTest, color, - LinkRendering.none(), stereotype)); + this.currentStyleBuilder = skinParam.getCurrentStyleBuilder(); + this.thens.add(new Branch(currentStyleBuilder, swimlane, whenThen, labelTest, color, LinkRendering.none(), + stereotype)); this.current = this.thens.get(0); } @@ -138,12 +141,12 @@ public class InstructionIf extends WithNote implements Instruction, InstructionC branch.updateFtile(factory); if (elseBranch == null) - this.elseBranch = new Branch(skinParam.getCurrentStyleBuilder(), swimlane, LinkRendering.none(), + this.elseBranch = new Branch(currentStyleBuilder, swimlane, LinkRendering.none(), Display.NULL, null, LinkRendering.none(), stereotype); elseBranch.updateFtile(factory); Ftile result = factory.createIf(swimlane, thens, elseBranch, outColor, topInlinkRendering, url, - getPositionedNotes(), stereotype); + getPositionedNotes(), stereotype, currentStyleBuilder); // if (getPositionedNotes().size() > 0) // result = FtileWithNoteOpale.create(result, getPositionedNotes(), false, VerticalAlignment.CENTER); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactory.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactory.java index ada34034c..7b4f9a4bf 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactory.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactory.java @@ -52,6 +52,7 @@ import net.sourceforge.plantuml.klimt.geom.VerticalAlignment; import net.sourceforge.plantuml.stereo.Stereotype; import net.sourceforge.plantuml.style.ISkinParam; import net.sourceforge.plantuml.style.Style; +import net.sourceforge.plantuml.style.StyleBuilder; import net.sourceforge.plantuml.url.Url; public interface FtileFactory { @@ -89,7 +90,8 @@ public interface FtileFactory { HColor color, Instruction specialOut, Ftile backward, LinkRendering incoming1, LinkRendering incoming2); public Ftile createIf(Swimlane swimlane, List thens, Branch elseBranch, LinkRendering outColor, - LinkRendering topInlinkRendering, Url url, Collection notes, Stereotype stereotype); + LinkRendering topInlinkRendering, Url url, Collection notes, Stereotype stereotype, + StyleBuilder currentStyleBuilder); public Ftile createSwitch(Swimlane swimlane, List branches, LinkRendering afterEndwhile, LinkRendering topInlinkRendering, Display labelTest); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java index c95352ecb..4738d0725 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java @@ -60,6 +60,7 @@ import net.sourceforge.plantuml.stereo.Stereotype; import net.sourceforge.plantuml.style.ISkinParam; import net.sourceforge.plantuml.style.SName; import net.sourceforge.plantuml.style.Style; +import net.sourceforge.plantuml.style.StyleBuilder; import net.sourceforge.plantuml.style.StyleSignatureBasic; import net.sourceforge.plantuml.url.Url; @@ -188,8 +189,10 @@ public class FtileFactoryDelegator implements FtileFactory { @Override public Ftile createIf(Swimlane swimlane, List thens, Branch elseBranch, LinkRendering afterEndwhile, - LinkRendering topInlinkRendering, Url url, Collection notes, Stereotype stereotype) { - return factory.createIf(swimlane, thens, elseBranch, afterEndwhile, topInlinkRendering, url, notes, stereotype); + LinkRendering topInlinkRendering, Url url, Collection notes, Stereotype stereotype, + StyleBuilder currentStyleBuilder) { + return factory.createIf(swimlane, thens, elseBranch, afterEndwhile, topInlinkRendering, url, notes, stereotype, + currentStyleBuilder); } @Override diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorIf.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorIf.java index bd116dc3f..92eda31fe 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorIf.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorIf.java @@ -51,6 +51,7 @@ import net.sourceforge.plantuml.skin.Pragma; import net.sourceforge.plantuml.stereo.Stereotype; import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.Style; +import net.sourceforge.plantuml.style.StyleBuilder; import net.sourceforge.plantuml.svek.ConditionEndStyle; import net.sourceforge.plantuml.svek.ConditionStyle; import net.sourceforge.plantuml.url.Url; @@ -66,15 +67,16 @@ public class FtileFactoryDelegatorIf extends FtileFactoryDelegator { @Override public Ftile createIf(Swimlane swimlane, List thens, Branch elseBranch, LinkRendering afterEndwhile, - LinkRendering topInlinkRendering, Url url, Collection notes, Stereotype stereotype) { + LinkRendering topInlinkRendering, Url url, Collection notes, Stereotype stereotype, + StyleBuilder currentStyleBuilder) { final ConditionStyle conditionStyle = skinParam().getConditionStyle(); final ConditionEndStyle conditionEndStyle = skinParam().getConditionEndStyle(); final Branch branch0 = thens.get(0); - final Style styleArrow = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder()); + final Style styleArrow = getDefaultStyleDefinitionArrow().getMergedStyle(currentStyleBuilder); final Style styleDiamond = getDefaultStyleDefinitionDiamond().withTOBECHANGED(stereotype) - .getMergedStyle(skinParam().getCurrentStyleBuilder()); + .getMergedStyle(currentStyleBuilder); final HColor backColor = branch0.getColor() == null ? styleDiamond.value(PName.BackGroundColor).asColor(skinParam().getIHtmlColorSet()) : branch0.getColor(); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java index e2ee4eaa6..340ed7a57 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java @@ -169,7 +169,8 @@ public class VCompactFactory implements FtileFactory { @Override public Ftile createIf(Swimlane swimlane, List thens, Branch elseBranch, LinkRendering afterEndwhile, - LinkRendering topInlinkRendering, Url url, Collection notes, Stereotype stereotype) { + LinkRendering topInlinkRendering, Url url, Collection notes, Stereotype stereotype, + StyleBuilder currentStyleBuilder) { final List ftiles = new ArrayList<>(); for (Branch branch : thens) ftiles.add(branch.getFtile()); diff --git a/src/net/sourceforge/plantuml/ebnf/ETileNamedGroup.java b/src/net/sourceforge/plantuml/ebnf/ETileNamedGroup.java new file mode 100644 index 000000000..60927fa4c --- /dev/null +++ b/src/net/sourceforge/plantuml/ebnf/ETileNamedGroup.java @@ -0,0 +1,143 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2020, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.ebnf; + +import net.sourceforge.plantuml.klimt.UTranslate; +import net.sourceforge.plantuml.klimt.color.HColor; +import net.sourceforge.plantuml.klimt.color.HColorSet; +import net.sourceforge.plantuml.klimt.color.NoSuchColorException; +import net.sourceforge.plantuml.klimt.drawing.UGraphic; +import net.sourceforge.plantuml.klimt.font.FontConfiguration; +import net.sourceforge.plantuml.klimt.font.StringBounder; +import net.sourceforge.plantuml.klimt.geom.XDimension2D; +import net.sourceforge.plantuml.klimt.shape.URectangle; +import net.sourceforge.plantuml.klimt.shape.UText; +import net.sourceforge.plantuml.style.ISkinParam; + +public class ETileNamedGroup extends ETile { + + private final ETile orig; + private final ISkinParam skinParam; + private String commentAbove; + private String commentBelow; + private final HColorSet colorSet; + private final double deltax = 10; + private final double deltay1 = 10; + private final double deltay2 = 10; + private final UText groupName; + + private final FontConfiguration fc; + + public ETileNamedGroup(ETile orig, FontConfiguration fc, HColorSet colorSet, ISkinParam skinParam, String name) { + this.skinParam = skinParam; + this.orig = orig; + this.fc = fc; + this.colorSet = colorSet; + this.groupName = UText.build(name, fc); + + } + + @Override + public double getH1(StringBounder stringBounder) { + // final TextBlock note = getNoteAbove(stringBounder); + return deltay1 + orig.getH1(stringBounder); + } + + @Override + public double getH2(StringBounder stringBounder) { + // final TextBlock note = getNoteBelow(stringBounder); + return orig.getH2(stringBounder) + deltay2; + } + + @Override + public double getWidth(StringBounder stringBounder) { + return orig.getWidth(stringBounder) + 2 * deltax; + } + + @Override + public void drawU(UGraphic ug) { + final StringBounder stringBounder = ug.getStringBounder(); + final XDimension2D dim = calculateDimension(stringBounder); + + try { + final HColor background = colorSet.getColor("#E8E8FF"); + final UGraphic ugBack = ug.apply(background).apply(background.bg()); + ugBack.draw(URectangle.build(dim)); + final XDimension2D dimText = stringBounder.calculateDimension(fc.getFont(), groupName.getText()); + ugBack.apply(UTranslate.dy(-dimText.getHeight())).draw(URectangle.build(dimText.delta(10, 0))); + + } catch (NoSuchColorException e) { + e.printStackTrace(); + } + final double linePos = getH1(stringBounder); + drawHline(ug, linePos, 0, deltax); + drawHline(ug, linePos, dim.getWidth() - deltax, dim.getWidth()); + + orig.drawU(ug.apply(new UTranslate(deltax, deltay1))); + ug.apply(UTranslate.dx(5)).draw(groupName); + + } + + @Override + public void push(ETile tile) { + throw new UnsupportedOperationException(); + } + +// @Override +// protected void addCommentAbove(String comment) { +// this.commentAbove = comment; +// } +// +// @Override +// protected void addCommentBelow(String comment) { +// this.commentBelow = comment; +// } + +// private TextBlock getNoteAbove(StringBounder stringBounder) { +// if (commentAbove == null) +// return TextBlockUtils.EMPTY_TEXT_BLOCK; +// final FloatingNote note = FloatingNote.create(Display.getWithNewlines(commentAbove), skinParam, SName.ebnf); +// return TextBlockUtils.withMargin(note, 0, 0, 0, 10); +// } +// +// private TextBlock getNoteBelow(StringBounder stringBounder) { +// if (commentBelow == null) +// return TextBlockUtils.EMPTY_TEXT_BLOCK; +// final FloatingNote note = FloatingNote.create(Display.getWithNewlines(commentBelow), skinParam, SName.ebnf); +// return TextBlockUtils.withMargin(note, 0, 0, 10, 0); +// } + +} diff --git a/src/net/sourceforge/plantuml/regexdiagram/PSystemRegex.java b/src/net/sourceforge/plantuml/regexdiagram/PSystemRegex.java index e66975752..03e171ef1 100644 --- a/src/net/sourceforge/plantuml/regexdiagram/PSystemRegex.java +++ b/src/net/sourceforge/plantuml/regexdiagram/PSystemRegex.java @@ -52,11 +52,11 @@ import net.sourceforge.plantuml.ebnf.ETile; import net.sourceforge.plantuml.ebnf.ETileAlternation; import net.sourceforge.plantuml.ebnf.ETileBox; import net.sourceforge.plantuml.ebnf.ETileConcatenation; +import net.sourceforge.plantuml.ebnf.ETileNamedGroup; import net.sourceforge.plantuml.ebnf.ETileOneOrMore; import net.sourceforge.plantuml.ebnf.ETileOptional; import net.sourceforge.plantuml.ebnf.ETileZeroOrMore; import net.sourceforge.plantuml.ebnf.Symbol; -import net.sourceforge.plantuml.ebnf.TextBlockable; import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.HColorSet; import net.sourceforge.plantuml.klimt.color.HColors; @@ -76,8 +76,6 @@ import net.sourceforge.plantuml.utils.CharInspector; public class PSystemRegex extends TitledDiagram { - private final List expressions = new ArrayList<>(); - public PSystemRegex(UmlSource source) { super(source, UmlDiagramType.REGEX, null); final ISkinParam skinParam = getSkinParam(); @@ -164,6 +162,8 @@ public class PSystemRegex extends TitledDiagram { push(token, Symbol.TERMINAL_STRING1); else if (token.getType() == ReTokenType.GROUP) push(token, Symbol.SPECIAL_SEQUENCE); + else if (token.getType() == ReTokenType.NAMED_GROUP) + namedGroup(token.getData()); else if (token.getType() == ReTokenType.CLASS) push(token, Symbol.LITTERAL); else if (token.getType() == ReTokenType.ANCHOR) @@ -205,6 +205,11 @@ public class PSystemRegex extends TitledDiagram { stack.addFirst(new ETileBox(element.getData(), type, fontConfiguration, style, colorSet, getSkinParam())); } + private void namedGroup(String name) { + final ETile arg1 = stack.removeFirst(); + stack.addFirst(new ETileNamedGroup(arg1, fontConfiguration, colorSet, getSkinParam(), name)); + } + private void repetitionZeroOrMore(boolean isCompact) { final ETile arg1 = stack.removeFirst(); if (isCompact) diff --git a/src/net/sourceforge/plantuml/regexdiagram/ReTokenType.java b/src/net/sourceforge/plantuml/regexdiagram/ReTokenType.java index d723fcfed..11d68ff88 100644 --- a/src/net/sourceforge/plantuml/regexdiagram/ReTokenType.java +++ b/src/net/sourceforge/plantuml/regexdiagram/ReTokenType.java @@ -43,12 +43,15 @@ public enum ReTokenType { QUANTIFIER, // ANCHOR, // GROUP, // + NAMED_GROUP, // ALTERNATIVE, // PARENTHESIS_OPEN, // PARENTHESIS_CLOSE, // CONCATENATION_IMPLICIT; static public boolean needImplicitConcatenation(ReTokenType token1, ReTokenType token2) { + if (token1 == NAMED_GROUP) + return false; if (token1 == ALTERNATIVE) return false; if (token2 == ALTERNATIVE) diff --git a/src/net/sourceforge/plantuml/regexdiagram/RegexExpression.java b/src/net/sourceforge/plantuml/regexdiagram/RegexExpression.java index 584ed4e63..01bd39abd 100644 --- a/src/net/sourceforge/plantuml/regexdiagram/RegexExpression.java +++ b/src/net/sourceforge/plantuml/regexdiagram/RegexExpression.java @@ -63,9 +63,15 @@ public class RegexExpression { } else if (current == '[') { final String s = readGroup(it); result.add(new ReToken(ReTokenType.GROUP, s)); + } else if (isStartComment(it)) { + skipComment(it); + } else if (isStartNamedCapturingGroup(it)) { + final ReToken token = readNamedGroup(it); + result.add(token); + result.add(new ReToken(ReTokenType.PARENTHESIS_OPEN, "(")); } else if (isStartOpenParenthesis(it)) { - final String s = readOpenParenthesis(it); - result.add(new ReToken(ReTokenType.PARENTHESIS_OPEN, s)); + final ReToken token = readOpenParenthesis(it); + result.add(token); } else if (current == ')') { result.add(new ReToken(ReTokenType.PARENTHESIS_CLOSE, ")")); it.jump(); @@ -103,7 +109,55 @@ public class RegexExpression { return false; } - private static String readOpenParenthesis(CharInspector it) throws RegexParsingException { + private static boolean isStartNamedCapturingGroup(CharInspector it) { + final char current0 = it.peek(0); + if (current0 == '(' && it.peek(1) == '?' && it.peek(2) == '<') + return true; + return false; + } + + private static boolean isStartComment(CharInspector it) { + final char current0 = it.peek(0); + if (current0 == '(' && it.peek(1) == '?' && it.peek(2) == '#') + return true; + return false; + } + + private static void skipComment(CharInspector it) throws RegexParsingException { + it.jump(); + it.jump(); + it.jump(); + final StringBuilder comment = new StringBuilder(); + while (true) { + if (it.peek(0) == 0) + throw new RegexParsingException("Unclosed comment"); + if (it.peek(0) == ')') { + it.jump(); + return; + } + comment.append(it.peek(0)); + it.jump(); + } + } + + private static ReToken readNamedGroup(CharInspector it) throws RegexParsingException { + it.jump(); + it.jump(); + it.jump(); + final StringBuilder namedGroup = new StringBuilder(); + while (true) { + if (it.peek(0) == 0) + throw new RegexParsingException("Unclosed named capturing group"); + if (it.peek(0) == '>') { + it.jump(); + return new ReToken(ReTokenType.NAMED_GROUP, namedGroup.toString()); + } + namedGroup.append(it.peek(0)); + it.jump(); + } + } + + private static ReToken readOpenParenthesis(CharInspector it) { final char current0 = it.peek(0); it.jump(); final StringBuilder result = new StringBuilder(); @@ -118,18 +172,7 @@ public class RegexExpression { it.jump(); result.append("?!"); } - if (it.peek(0) == '?' && it.peek(1) == '<') { - while (true) { - if (it.peek(0) == 0) - throw new RegexParsingException("Unclosed named capturing group"); - if (it.peek(0) == '>') { - it.jump(); - return result.toString(); - } - it.jump(); - } - } - return result.toString(); + return new ReToken(ReTokenType.PARENTHESIS_OPEN, result.toString()); } private static boolean isStartQuantifier(CharInspector it) { diff --git a/src/net/sourceforge/plantuml/regexdiagram/ShuntingYard.java b/src/net/sourceforge/plantuml/regexdiagram/ShuntingYard.java index c29e83702..8b45b6274 100644 --- a/src/net/sourceforge/plantuml/regexdiagram/ShuntingYard.java +++ b/src/net/sourceforge/plantuml/regexdiagram/ShuntingYard.java @@ -59,6 +59,8 @@ public class ShuntingYard { ouputQueue.add(token); } else if (token.getType() == ReTokenType.GROUP) { ouputQueue.add(token); + } else if (token.getType() == ReTokenType.NAMED_GROUP) { + operatorStack.addFirst(token); } else if (token.getType() == ReTokenType.CLASS) { ouputQueue.add(token); } else if (token.getType() == ReTokenType.ANCHOR) { @@ -80,7 +82,10 @@ public class ShuntingYard { && operatorStack.peekFirst().getType() != ReTokenType.PARENTHESIS_OPEN) ouputQueue.add(operatorStack.removeFirst()); final ReToken first = operatorStack.removeFirst(); -// ouputQueue.add(first); + if (operatorStack.peekFirst() != null + && operatorStack.peekFirst().getType() == ReTokenType.NAMED_GROUP) + ouputQueue.add(operatorStack.removeFirst()); + } else { throw new UnsupportedOperationException(token.toString()); From 26189b1e64e142df0277c7deaeb59d79fcd92c49 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Tue, 19 Dec 2023 19:08:24 +0100 Subject: [PATCH 39/95] fix: improve local style management for activity diagrams https://github.com/plantuml/plantuml/issues/1629 --- gradle.properties | 2 +- .../activitydiagram3/InstructionRepeat.java | 5 +- .../activitydiagram3/InstructionWhile.java | 5 +- .../activitydiagram3/ftile/FtileFactory.java | 5 +- .../ftile/FtileFactoryDelegator.java | 9 +- .../activitydiagram3/ftile/Swimlanes.java | 9 +- .../vcompact/FtileFactoryDelegatorRepeat.java | 8 +- .../vcompact/FtileFactoryDelegatorWhile.java | 9 +- .../ftile/vcompact/VCompactFactory.java | 4 +- .../plantuml/ebnf/ETileLookAheadOrBehind.java | 110 ++++++++++++++++++ .../plantuml/klimt/shape/UText.java | 5 + .../plantuml/regexdiagram/PSystemRegex.java | 10 ++ .../plantuml/regexdiagram/ReTokenType.java | 8 +- .../regexdiagram/RegexExpression.java | 81 ++++++++++++- .../plantuml/regexdiagram/ShuntingYard.java | 6 +- .../sourceforge/plantuml/version/Version.java | 2 +- 16 files changed, 249 insertions(+), 29 deletions(-) create mode 100644 src/net/sourceforge/plantuml/ebnf/ETileLookAheadOrBehind.java diff --git a/gradle.properties b/gradle.properties index 13efff07a..07537229c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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.14beta1 +version = 1.2023.14beta2 org.gradle.workers.max = 3 \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionRepeat.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionRepeat.java index 287b84a21..1680f463f 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionRepeat.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionRepeat.java @@ -59,6 +59,7 @@ 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.StyleBuilder; public class InstructionRepeat extends AbstractInstruction implements Instruction { @@ -87,6 +88,7 @@ public class InstructionRepeat extends AbstractInstruction implements Instructio private LinkRendering endRepeatLinkRendering = LinkRendering.none(); private final Colors colors; + private final StyleBuilder currentStyleBuilder; public boolean containsBreak() { return repeatList.containsBreak(); @@ -94,6 +96,7 @@ public class InstructionRepeat extends AbstractInstruction implements Instructio public InstructionRepeat(Swimlanes swimlanes, Instruction parent, LinkRendering nextLinkRenderer, HColor color, Display startLabel, BoxStyle boxStyleIn, Colors colors) { + this.currentStyleBuilder = swimlanes.getCurrentStyleBuilder(); this.swimlanes = swimlanes; this.swimlane = swimlanes.getCurrentSwimlane(); this.repeatList = new InstructionList(this.swimlane); @@ -158,7 +161,7 @@ public class InstructionRepeat extends AbstractInstruction implements Instructio if (this.testCalled == false && incoming1.isNone()) incoming1 = swimlanes.nextLinkRenderer(); final Ftile result = factory.repeat(boxStyleIn, swimlane, swimlaneOut, startLabel, decorateOut, test, yes, out, - colors, back, isLastOfTheParent(), incoming1, incoming2); + colors, back, isLastOfTheParent(), incoming1, incoming2, currentStyleBuilder); if (killed) return new FtileKilled(result); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionWhile.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionWhile.java index 554510da7..8ec637324 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionWhile.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionWhile.java @@ -56,6 +56,7 @@ import net.sourceforge.plantuml.klimt.geom.VerticalAlignment; import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NoteType; import net.sourceforge.plantuml.style.ISkinParam; +import net.sourceforge.plantuml.style.StyleBuilder; public class InstructionWhile extends WithNote implements Instruction, InstructionCollection { @@ -82,6 +83,7 @@ public class InstructionWhile extends WithNote implements Instruction, Instructi private LinkRendering incoming1 = LinkRendering.none(); private LinkRendering incoming2 = LinkRendering.none(); private boolean backwardCalled; + private final StyleBuilder currentStyleBuilder; public void overwriteYes(Display yes) { this.yes = yes; @@ -94,6 +96,7 @@ public class InstructionWhile extends WithNote implements Instruction, Instructi this.nextLinkRenderer = Objects.requireNonNull(nextLinkRenderer); this.yes = Objects.requireNonNull(yes); this.swimlane = swimlane; + this.currentStyleBuilder = skinParam.getCurrentStyleBuilder(); this.color = color; this.skinParam = skinParam; } @@ -118,7 +121,7 @@ public class InstructionWhile extends WithNote implements Instruction, Instructi final Ftile back = Display.isNull(backward) ? null : factory.activity(backward, swimlane, boxStyle, Colors.empty(), null); Ftile tmp = repeatList.createFtile(factory); - tmp = factory.createWhile(outColor, swimlane, tmp, test, yes, color, specialOut, back, incoming1, incoming2); + tmp = factory.createWhile(outColor, swimlane, tmp, test, yes, color, specialOut, back, incoming1, incoming2, currentStyleBuilder); if (getPositionedNotes().size() > 0) tmp = FtileWithNoteOpale.create(tmp, getPositionedNotes(), false, VerticalAlignment.CENTER); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactory.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactory.java index 7b4f9a4bf..f7cabc662 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactory.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactory.java @@ -84,10 +84,11 @@ public interface FtileFactory { public Ftile repeat(BoxStyle boxStyleIn, Swimlane swimlane, Swimlane swimlaneOut, Display startLabel, Ftile repeat, Display test, Display yes, Display out, Colors colors, Ftile backward, boolean noOut, - LinkRendering incoming1, LinkRendering incoming2); + LinkRendering incoming1, LinkRendering incoming2, StyleBuilder currentStyleBuilder); public Ftile createWhile(LinkRendering outColor, Swimlane swimlane, Ftile whileBlock, Display test, Display yes, - HColor color, Instruction specialOut, Ftile backward, LinkRendering incoming1, LinkRendering incoming2); + HColor color, Instruction specialOut, Ftile backward, LinkRendering incoming1, LinkRendering incoming2, + StyleBuilder currentStyleBuilder); public Ftile createIf(Swimlane swimlane, List thens, Branch elseBranch, LinkRendering outColor, LinkRendering topInlinkRendering, Url url, Collection notes, Stereotype stereotype, diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java index 4738d0725..b39f1ad2e 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java @@ -175,16 +175,17 @@ public class FtileFactoryDelegator implements FtileFactory { @Override public Ftile repeat(BoxStyle boxStyleIn, Swimlane swimlane, Swimlane swimlaneOut, Display startLabel, Ftile repeat, Display test, Display yes, Display out, Colors colors, Ftile backward, boolean noOut, - LinkRendering incoming1, LinkRendering incoming2) { + LinkRendering incoming1, LinkRendering incoming2, StyleBuilder currentStyleBuilder) { return factory.repeat(boxStyleIn, swimlane, swimlaneOut, startLabel, repeat, test, yes, out, colors, backward, - noOut, incoming1, incoming2); + noOut, incoming1, incoming2, currentStyleBuilder); } @Override public Ftile createWhile(LinkRendering outColor, Swimlane swimlane, Ftile whileBlock, Display test, Display yes, - HColor color, Instruction specialOut, Ftile back, LinkRendering incoming1, LinkRendering incoming2) { + HColor color, Instruction specialOut, Ftile back, LinkRendering incoming1, LinkRendering incoming2, + StyleBuilder styleBuilder) { return factory.createWhile(outColor, swimlane, whileBlock, test, yes, color, specialOut, back, incoming1, - incoming2); + incoming2, styleBuilder); } @Override diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlanes.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlanes.java index 1d5bebdd7..0df019d31 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlanes.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlanes.java @@ -82,6 +82,7 @@ import net.sourceforge.plantuml.style.ISkinParam; import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.SName; import net.sourceforge.plantuml.style.Style; +import net.sourceforge.plantuml.style.StyleBuilder; import net.sourceforge.plantuml.style.StyleSignatureBasic; import net.sourceforge.plantuml.style.Styleable; import net.sourceforge.plantuml.svek.UGraphicForSnake; @@ -127,9 +128,9 @@ public class Swimlanes extends AbstractTextBlock implements TextBlock, Styleable } protected Style getStyle() { - if (style == null) { + if (style == null) this.style = getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder()); - } + return style; } @@ -455,4 +456,8 @@ public class Swimlanes extends AbstractTextBlock implements TextBlock, Styleable return cachedMinMax; } + public StyleBuilder getCurrentStyleBuilder() { + return skinParam.getCurrentStyleBuilder(); + } + } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorRepeat.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorRepeat.java index a289a153d..140845b0a 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorRepeat.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorRepeat.java @@ -62,6 +62,7 @@ import net.sourceforge.plantuml.klimt.font.FontConfiguration; import net.sourceforge.plantuml.klimt.geom.XDimension2D; import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.Style; +import net.sourceforge.plantuml.style.StyleBuilder; import net.sourceforge.plantuml.svek.ConditionStyle; public class FtileFactoryDelegatorRepeat extends FtileFactoryDelegator { @@ -73,13 +74,12 @@ public class FtileFactoryDelegatorRepeat extends FtileFactoryDelegator { @Override public Ftile repeat(BoxStyle boxStyleIn, Swimlane swimlane, Swimlane swimlaneOut, Display startLabel, final Ftile repeat, Display test, Display yes, Display out, Colors colors, Ftile backward, boolean noOut, - LinkRendering incoming1, LinkRendering incoming2) { + LinkRendering incoming1, LinkRendering incoming2, StyleBuilder currentStyleBuilder) { final ConditionStyle conditionStyle = skinParam().getConditionStyle(); - final Style styleArrow = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder()); - final Style styleDiamond = getDefaultStyleDefinitionDiamond() - .getMergedStyle(skinParam().getCurrentStyleBuilder()); + final Style styleArrow = getDefaultStyleDefinitionArrow().getMergedStyle(currentStyleBuilder); + final Style styleDiamond = getDefaultStyleDefinitionDiamond().getMergedStyle(currentStyleBuilder); final HColor borderColor = styleDiamond.value(PName.LineColor).asColor(skinParam().getIHtmlColorSet()); final HColor diamondColor = styleDiamond.value(PName.BackGroundColor).asColor(skinParam().getIHtmlColorSet()); final Rainbow arrowColor = Rainbow.build(styleArrow, skinParam().getIHtmlColorSet()); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorWhile.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorWhile.java index 510a8df34..09e28adbc 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorWhile.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorWhile.java @@ -58,6 +58,7 @@ import net.sourceforge.plantuml.klimt.drawing.UGraphic; import net.sourceforge.plantuml.klimt.font.FontConfiguration; import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.Style; +import net.sourceforge.plantuml.style.StyleBuilder; import net.sourceforge.plantuml.svek.ConditionStyle; public class FtileFactoryDelegatorWhile extends FtileFactoryDelegator { @@ -68,13 +69,13 @@ public class FtileFactoryDelegatorWhile extends FtileFactoryDelegator { @Override public Ftile createWhile(LinkRendering outColor, Swimlane swimlane, Ftile whileBlock, Display test, Display yes, - HColor color, Instruction specialOut, Ftile backward, LinkRendering incoming1, LinkRendering incoming2) { + HColor color, Instruction specialOut, Ftile backward, LinkRendering incoming1, LinkRendering incoming2, + StyleBuilder currentStyleBuilder) { final ConditionStyle conditionStyle = skinParam().getConditionStyle(); - final Style styleArrow = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder()); - final Style styleDiamond = getDefaultStyleDefinitionDiamond() - .getMergedStyle(skinParam().getCurrentStyleBuilder()); + final Style styleArrow = getDefaultStyleDefinitionArrow().getMergedStyle(currentStyleBuilder); + final Style styleDiamond = getDefaultStyleDefinitionDiamond().getMergedStyle(currentStyleBuilder); final HColor borderColor = styleDiamond.value(PName.LineColor).asColor(skinParam().getIHtmlColorSet()); final HColor backColor = styleDiamond.value(PName.BackGroundColor).asColor(skinParam().getIHtmlColorSet()); final Rainbow arrowColor = Rainbow.build(styleArrow, skinParam().getIHtmlColorSet()); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java index 340ed7a57..743936057 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java @@ -156,14 +156,14 @@ public class VCompactFactory implements FtileFactory { @Override public Ftile repeat(BoxStyle boxStyleIn, Swimlane swimlane, Swimlane swimlaneOut, Display startLabel, Ftile repeat, Display test, Display yes, Display out, Colors colors, Ftile backward, boolean noOut, - LinkRendering incoming1, LinkRendering incoming2) { + LinkRendering incoming1, LinkRendering incoming2, StyleBuilder currentStyleBuilder) { return repeat; } @Override public Ftile createWhile(LinkRendering afterEndwhile, Swimlane swimlane, Ftile whileBlock, Display test, Display yes, HColor color, Instruction specialOut, Ftile back, LinkRendering incoming1, - LinkRendering incoming2) { + LinkRendering incoming2, StyleBuilder styleBuilder) { return whileBlock; } diff --git a/src/net/sourceforge/plantuml/ebnf/ETileLookAheadOrBehind.java b/src/net/sourceforge/plantuml/ebnf/ETileLookAheadOrBehind.java new file mode 100644 index 000000000..23a046faf --- /dev/null +++ b/src/net/sourceforge/plantuml/ebnf/ETileLookAheadOrBehind.java @@ -0,0 +1,110 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2020, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.ebnf; + +import net.sourceforge.plantuml.klimt.UStroke; +import net.sourceforge.plantuml.klimt.UTranslate; +import net.sourceforge.plantuml.klimt.color.HColor; +import net.sourceforge.plantuml.klimt.color.HColorSet; +import net.sourceforge.plantuml.klimt.drawing.UGraphic; +import net.sourceforge.plantuml.klimt.font.FontConfiguration; +import net.sourceforge.plantuml.klimt.font.StringBounder; +import net.sourceforge.plantuml.klimt.geom.XDimension2D; +import net.sourceforge.plantuml.klimt.shape.URectangle; +import net.sourceforge.plantuml.klimt.shape.UText; +import net.sourceforge.plantuml.style.PName; +import net.sourceforge.plantuml.style.Style; + +public class ETileLookAheadOrBehind extends ETile { + + private final ETile orig; + private final HColorSet colorSet; + private final double deltax1 = 4; + private final double deltax2 = 8; + private final double deltay = 6; + private final Style style; + private final UText supText; + + private final FontConfiguration fc; + + public ETileLookAheadOrBehind(ETile orig, FontConfiguration fc, Style style, HColorSet colorSet, String type) { + this.style = style; + this.orig = orig; + this.fc = fc; + this.colorSet = colorSet; + this.supText = UText.build(type, fc); + + } + + @Override + public double getH1(StringBounder stringBounder) { + return deltay + orig.getH1(stringBounder); + } + + @Override + public double getH2(StringBounder stringBounder) { + return orig.getH2(stringBounder) + deltay; + } + + @Override + public double getWidth(StringBounder stringBounder) { + return orig.getWidth(stringBounder) + deltax1 + deltax2 + supText.calculateDimension(stringBounder).getWidth(); + } + + @Override + public void drawU(UGraphic ug) { + final StringBounder stringBounder = ug.getStringBounder(); + final XDimension2D dim = calculateDimension(stringBounder); + + final HColor lineColor = style.value(PName.LineColor).asColor(colorSet); + + final URectangle rect = URectangle.build(dim).rounded(30); + + ug.apply(lineColor).apply(new UStroke(2, 3, 1)).draw(rect); + final double posText = getH1(stringBounder) + supText.getDescent(stringBounder); + + ug.apply(new UTranslate(4, 2 + posText)).draw(supText); + + orig.drawU(ug.apply(new UTranslate(deltax1 + supText.calculateDimension(stringBounder).getWidth(), deltay))); + + } + + @Override + public void push(ETile tile) { + throw new UnsupportedOperationException(); + } + +} diff --git a/src/net/sourceforge/plantuml/klimt/shape/UText.java b/src/net/sourceforge/plantuml/klimt/shape/UText.java index 938007efb..6968ba1ed 100644 --- a/src/net/sourceforge/plantuml/klimt/shape/UText.java +++ b/src/net/sourceforge/plantuml/klimt/shape/UText.java @@ -38,6 +38,7 @@ package net.sourceforge.plantuml.klimt.shape; import net.sourceforge.plantuml.klimt.UShape; import net.sourceforge.plantuml.klimt.font.FontConfiguration; import net.sourceforge.plantuml.klimt.font.StringBounder; +import net.sourceforge.plantuml.klimt.geom.XDimension2D; public class UText implements UShape { @@ -83,4 +84,8 @@ public class UText implements UShape { return orientation; } + public XDimension2D calculateDimension(StringBounder stringBounder) { + return stringBounder.calculateDimension(font.getFont(), text); + } + } diff --git a/src/net/sourceforge/plantuml/regexdiagram/PSystemRegex.java b/src/net/sourceforge/plantuml/regexdiagram/PSystemRegex.java index 03e171ef1..4a1e610f0 100644 --- a/src/net/sourceforge/plantuml/regexdiagram/PSystemRegex.java +++ b/src/net/sourceforge/plantuml/regexdiagram/PSystemRegex.java @@ -52,6 +52,7 @@ import net.sourceforge.plantuml.ebnf.ETile; import net.sourceforge.plantuml.ebnf.ETileAlternation; import net.sourceforge.plantuml.ebnf.ETileBox; import net.sourceforge.plantuml.ebnf.ETileConcatenation; +import net.sourceforge.plantuml.ebnf.ETileLookAheadOrBehind; import net.sourceforge.plantuml.ebnf.ETileNamedGroup; import net.sourceforge.plantuml.ebnf.ETileOneOrMore; import net.sourceforge.plantuml.ebnf.ETileOptional; @@ -162,6 +163,10 @@ public class PSystemRegex extends TitledDiagram { push(token, Symbol.TERMINAL_STRING1); else if (token.getType() == ReTokenType.GROUP) push(token, Symbol.SPECIAL_SEQUENCE); + else if (token.getType() == ReTokenType.LOOK_AHEAD) + lookAheadOrBehind(token.getData()); + else if (token.getType() == ReTokenType.LOOK_BEHIND) + lookAheadOrBehind(token.getData()); else if (token.getType() == ReTokenType.NAMED_GROUP) namedGroup(token.getData()); else if (token.getType() == ReTokenType.CLASS) @@ -205,6 +210,11 @@ public class PSystemRegex extends TitledDiagram { stack.addFirst(new ETileBox(element.getData(), type, fontConfiguration, style, colorSet, getSkinParam())); } + private void lookAheadOrBehind(String name) { + final ETile arg1 = stack.removeFirst(); + stack.addFirst(new ETileLookAheadOrBehind(arg1, fontConfiguration, style, colorSet, name)); + } + private void namedGroup(String name) { final ETile arg1 = stack.removeFirst(); stack.addFirst(new ETileNamedGroup(arg1, fontConfiguration, colorSet, getSkinParam(), name)); diff --git a/src/net/sourceforge/plantuml/regexdiagram/ReTokenType.java b/src/net/sourceforge/plantuml/regexdiagram/ReTokenType.java index 11d68ff88..5941488ea 100644 --- a/src/net/sourceforge/plantuml/regexdiagram/ReTokenType.java +++ b/src/net/sourceforge/plantuml/regexdiagram/ReTokenType.java @@ -44,13 +44,19 @@ public enum ReTokenType { ANCHOR, // GROUP, // NAMED_GROUP, // + LOOK_AHEAD, // + LOOK_BEHIND, // ALTERNATIVE, // PARENTHESIS_OPEN, // PARENTHESIS_CLOSE, // CONCATENATION_IMPLICIT; + public boolean isNamedGroupOrLookAheadOrLookBehind() { + return this == NAMED_GROUP || this == LOOK_AHEAD || this == LOOK_BEHIND; + } + static public boolean needImplicitConcatenation(ReTokenType token1, ReTokenType token2) { - if (token1 == NAMED_GROUP) + if (token1.isNamedGroupOrLookAheadOrLookBehind()) return false; if (token1 == ALTERNATIVE) return false; diff --git a/src/net/sourceforge/plantuml/regexdiagram/RegexExpression.java b/src/net/sourceforge/plantuml/regexdiagram/RegexExpression.java index 01bd39abd..50a3003e3 100644 --- a/src/net/sourceforge/plantuml/regexdiagram/RegexExpression.java +++ b/src/net/sourceforge/plantuml/regexdiagram/RegexExpression.java @@ -60,11 +60,22 @@ public class RegexExpression { } else if (current == '|') { result.add(new ReToken(ReTokenType.ALTERNATIVE, "|")); it.jump(); + } else if (isStartPosixGroup(it)) { + final String s = readGroupPosix(it); + result.add(new ReToken(ReTokenType.CLASS, s)); } else if (current == '[') { final String s = readGroup(it); result.add(new ReToken(ReTokenType.GROUP, s)); } else if (isStartComment(it)) { skipComment(it); + } else if (isStartLookAhead(it)) { + final ReToken token = readLookAhead(it); + result.add(token); + result.add(new ReToken(ReTokenType.PARENTHESIS_OPEN, "(")); + } else if (isStartLookBehind(it)) { + final ReToken token = readLookBehind(it); + result.add(token); + result.add(new ReToken(ReTokenType.PARENTHESIS_OPEN, "(")); } else if (isStartNamedCapturingGroup(it)) { final ReToken token = readNamedGroup(it); result.add(token); @@ -102,6 +113,20 @@ public class RegexExpression { } + private static boolean isStartLookAhead(CharInspector it) { + final char current0 = it.peek(0); + if (current0 == '(' && it.peek(1) == '?' && (it.peek(2) == '=' || it.peek(2) == '!')) + return true; + return false; + } + + private static boolean isStartLookBehind(CharInspector it) { + final char current0 = it.peek(0); + if (current0 == '(' && it.peek(1) == '?' && it.peek(2) == '<' && (it.peek(3) == '=' || it.peek(3) == '!')) + return true; + return false; + } + private static boolean isStartOpenParenthesis(CharInspector it) { final char current0 = it.peek(0); if (current0 == '(') @@ -109,10 +134,28 @@ public class RegexExpression { return false; } + private static boolean isStartPosixGroup(CharInspector it) { + final char current0 = it.peek(0); + if (current0 == '[' && it.peek(1) == '[' && it.peek(2) == ':') + return true; + return false; + } + private static boolean isStartNamedCapturingGroup(CharInspector it) { final char current0 = it.peek(0); - if (current0 == '(' && it.peek(1) == '?' && it.peek(2) == '<') - return true; + if (current0 == '(' && it.peek(1) == '?' && it.peek(2) == '<') { + int i = 3; + while (it.peek(i) != 0) { + if (it.peek(i) == '>' && i == 3) + return false; + if (it.peek(i) == '>') + return true; + if (Character.isLetter(it.peek(i)) == false) + return false; + i++; + } + + } return false; } @@ -140,6 +183,23 @@ public class RegexExpression { } } + private static ReToken readLookAhead(CharInspector it) throws RegexParsingException { + it.jump(); + it.jump(); + final char ch = it.peek(0); + it.jump(); + return new ReToken(ReTokenType.LOOK_AHEAD, "?" + ch); + } + + private static ReToken readLookBehind(CharInspector it) throws RegexParsingException { + it.jump(); + it.jump(); + it.jump(); + final char ch = it.peek(0); + it.jump(); + return new ReToken(ReTokenType.LOOK_BEHIND, "?<" + ch); + } + private static ReToken readNamedGroup(CharInspector it) throws RegexParsingException { it.jump(); it.jump(); @@ -218,6 +278,23 @@ public class RegexExpression { return false; } + private static String readGroupPosix(CharInspector it) { + it.jump(); + it.jump(); + it.jump(); + final StringBuilder result = new StringBuilder(":"); + while (it.peek(0) != 0) { + char ch = it.peek(0); + it.jump(); + result.append(ch); + if (ch == ':') + break; + } + it.jump(); + it.jump(); + return result.toString(); + } + private static String readGroup(CharInspector it) { final char current0 = it.peek(0); if (current0 != '[') diff --git a/src/net/sourceforge/plantuml/regexdiagram/ShuntingYard.java b/src/net/sourceforge/plantuml/regexdiagram/ShuntingYard.java index 8b45b6274..3749d771e 100644 --- a/src/net/sourceforge/plantuml/regexdiagram/ShuntingYard.java +++ b/src/net/sourceforge/plantuml/regexdiagram/ShuntingYard.java @@ -59,7 +59,7 @@ public class ShuntingYard { ouputQueue.add(token); } else if (token.getType() == ReTokenType.GROUP) { ouputQueue.add(token); - } else if (token.getType() == ReTokenType.NAMED_GROUP) { + } else if (token.getType().isNamedGroupOrLookAheadOrLookBehind()) { operatorStack.addFirst(token); } else if (token.getType() == ReTokenType.CLASS) { ouputQueue.add(token); @@ -82,10 +82,8 @@ public class ShuntingYard { && operatorStack.peekFirst().getType() != ReTokenType.PARENTHESIS_OPEN) ouputQueue.add(operatorStack.removeFirst()); final ReToken first = operatorStack.removeFirst(); - if (operatorStack.peekFirst() != null - && operatorStack.peekFirst().getType() == ReTokenType.NAMED_GROUP) + if (operatorStack.peekFirst() != null && operatorStack.peekFirst().getType().isNamedGroupOrLookAheadOrLookBehind()) ouputQueue.add(operatorStack.removeFirst()); - } else { throw new UnsupportedOperationException(token.toString()); diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index 05f088d68..fa4a80d68 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -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.14beta1"; + private static final String version = "1.2023.14beta2"; public static String versionString() { return version; From 533c27cba52db66726a924fa26913a602478a3f9 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Wed, 3 Jan 2024 18:21:29 +0100 Subject: [PATCH 40/95] feat: adding edgy tools in stdlib https://github.com/plantuml/plantuml-stdlib/pull/84 --- gradle.properties | 2 +- .../sourceforge/plantuml/version/Version.java | 2 +- stdlib/edgy-abx.repx | Bin 0 -> 3430 bytes stdlib/edgy-dex.repx | 1 + stdlib/home.repx | 1 + 5 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 stdlib/edgy-abx.repx create mode 100644 stdlib/edgy-dex.repx diff --git a/gradle.properties b/gradle.properties index 07537229c..fd7b57c96 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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.14beta2 +version = 1.2024.0beta1 org.gradle.workers.max = 3 \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index fa4a80d68..b00a5ec7b 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -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.14beta2"; + private static final String version = "1.2024.0beta1"; public static String versionString() { return version; diff --git a/stdlib/edgy-abx.repx b/stdlib/edgy-abx.repx new file mode 100644 index 0000000000000000000000000000000000000000..de91dc97bfdf0e358d925e3d9ccd6e1a92abfb4e GIT binary patch literal 3430 zcmV-s4Vm&A{xeYo8wWA){0&7^h=v5vvVb>?Ccj~FlVSojsodsCI8$IAn+P@n!Y(Fr z{<|zHq5B_mxA{%XzTL!7(U8bw3x!9>WD=zjy6>CQ*R{KxR3`<>6rjDi+h@ER4QGt3}~+zlFBi1b1L9Gp$51)ps9V|NCRV|3igZ|EI9QSVL`7^L2aB`+EUDP$F`K zi=VF8*fY~q({`&nUBa|Ju=jVDyxyz3-FD$SyKVJF`eWNX0p8{mM!ssuvxfw2;kzWX zRh-3Kpy4c!3~Et_>ro4lk5Wop>G1ERlmxbZy+RZSRl9!&r6l0O1#!$L_r*ADPLf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Yc-u$ I_x1YT1A Date: Sat, 6 Jan 2024 12:02:26 +0100 Subject: [PATCH 41/95] feat: adding action and process keywords https://github.com/plantuml/plantuml/issues/1631 --- .../decoration/symbol/USymbolAction.java | 113 +++++++++++++++++ .../decoration/symbol/USymbolProcess.java | 114 ++++++++++++++++++ .../plantuml/decoration/symbol/USymbols.java | 6 + .../command/CommandCreateElementFull.java | 2 +- .../sourceforge/plantuml/version/version.txt | 2 - 5 files changed, 234 insertions(+), 3 deletions(-) create mode 100644 src/net/sourceforge/plantuml/decoration/symbol/USymbolAction.java create mode 100644 src/net/sourceforge/plantuml/decoration/symbol/USymbolProcess.java delete mode 100644 src/net/sourceforge/plantuml/version/version.txt diff --git a/src/net/sourceforge/plantuml/decoration/symbol/USymbolAction.java b/src/net/sourceforge/plantuml/decoration/symbol/USymbolAction.java new file mode 100644 index 000000000..3326d96c9 --- /dev/null +++ b/src/net/sourceforge/plantuml/decoration/symbol/USymbolAction.java @@ -0,0 +1,113 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.decoration.symbol; + +import net.sourceforge.plantuml.klimt.Fashion; +import net.sourceforge.plantuml.klimt.Shadowable; +import net.sourceforge.plantuml.klimt.UPath; +import net.sourceforge.plantuml.klimt.UTranslate; +import net.sourceforge.plantuml.klimt.drawing.UGraphic; +import net.sourceforge.plantuml.klimt.drawing.UGraphicStencil; +import net.sourceforge.plantuml.klimt.font.StringBounder; +import net.sourceforge.plantuml.klimt.geom.HorizontalAlignment; +import net.sourceforge.plantuml.klimt.geom.XDimension2D; +import net.sourceforge.plantuml.klimt.shape.AbstractTextBlock; +import net.sourceforge.plantuml.klimt.shape.TextBlock; +import net.sourceforge.plantuml.klimt.shape.TextBlockUtils; +import net.sourceforge.plantuml.klimt.shape.UPolygon; +import net.sourceforge.plantuml.klimt.shape.URectangle; +import net.sourceforge.plantuml.style.SName; + +class USymbolAction extends USymbol { + + private final SName sname; + + public USymbolAction(SName sname) { + this.sname = sname; + } + + @Override + public SName getSName() { + return sname; + } + + private void drawAction(UGraphic ug, double width, double height, double shadowing, double roundCorner, + double diagonalCorner) { + final UPolygon shape = new UPolygon(); + shape.addPoint(0, 0); + shape.addPoint(width - 10, 0); + shape.addPoint(width, height / 2); + shape.addPoint(width - 10, height); + shape.addPoint(0, height); + ug.draw(shape); + } + + private Margin getMargin() { + return new Margin(10, 20, 10, 10); + } + + @Override + public TextBlock asSmall(TextBlock name, final TextBlock label, final TextBlock stereotype, + final Fashion symbolContext, final HorizontalAlignment stereoAlignment) { + return new AbstractTextBlock() { + + public void drawU(UGraphic ug) { + final XDimension2D dim = calculateDimension(ug.getStringBounder()); + ug = UGraphicStencil.create(ug, dim); + ug = symbolContext.apply(ug); + drawAction(ug, dim.getWidth(), dim.getHeight(), symbolContext.getDeltaShadow(), + symbolContext.getRoundCorner(), symbolContext.getDiagonalCorner()); + final Margin margin = getMargin(); + final TextBlock tb = TextBlockUtils.mergeTB(stereotype, label, stereoAlignment); + tb.drawU(ug.apply(new UTranslate(margin.getX1(), margin.getY1()))); + } + + public XDimension2D calculateDimension(StringBounder stringBounder) { + final XDimension2D dimLabel = label.calculateDimension(stringBounder); + final XDimension2D dimStereo = stereotype.calculateDimension(stringBounder); + return getMargin().addDimension(dimStereo.mergeTB(dimLabel)); + } + }; + } + + @Override + public TextBlock asBig(final TextBlock title, final HorizontalAlignment labelAlignment, final TextBlock stereotype, + final double width, final double height, final Fashion symbolContext, + final HorizontalAlignment stereoAlignment) { + throw new UnsupportedOperationException(); + } + +} \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/decoration/symbol/USymbolProcess.java b/src/net/sourceforge/plantuml/decoration/symbol/USymbolProcess.java new file mode 100644 index 000000000..2c566b9f9 --- /dev/null +++ b/src/net/sourceforge/plantuml/decoration/symbol/USymbolProcess.java @@ -0,0 +1,114 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.decoration.symbol; + +import net.sourceforge.plantuml.klimt.Fashion; +import net.sourceforge.plantuml.klimt.Shadowable; +import net.sourceforge.plantuml.klimt.UPath; +import net.sourceforge.plantuml.klimt.UTranslate; +import net.sourceforge.plantuml.klimt.drawing.UGraphic; +import net.sourceforge.plantuml.klimt.drawing.UGraphicStencil; +import net.sourceforge.plantuml.klimt.font.StringBounder; +import net.sourceforge.plantuml.klimt.geom.HorizontalAlignment; +import net.sourceforge.plantuml.klimt.geom.XDimension2D; +import net.sourceforge.plantuml.klimt.shape.AbstractTextBlock; +import net.sourceforge.plantuml.klimt.shape.TextBlock; +import net.sourceforge.plantuml.klimt.shape.TextBlockUtils; +import net.sourceforge.plantuml.klimt.shape.UPolygon; +import net.sourceforge.plantuml.klimt.shape.URectangle; +import net.sourceforge.plantuml.style.SName; + +class USymbolProcess extends USymbol { + + private final SName sname; + + public USymbolProcess(SName sname) { + this.sname = sname; + } + + @Override + public SName getSName() { + return sname; + } + + private void drawAction(UGraphic ug, double width, double height, double shadowing, double roundCorner, + double diagonalCorner) { + final UPolygon shape = new UPolygon(); + shape.addPoint(0, 0); + shape.addPoint(width - 10, 0); + shape.addPoint(width, height / 2); + shape.addPoint(width - 10, height); + shape.addPoint(0, height); + shape.addPoint(10, height / 2); + ug.draw(shape); + } + + private Margin getMargin() { + return new Margin(20, 20, 10, 10); + } + + @Override + public TextBlock asSmall(TextBlock name, final TextBlock label, final TextBlock stereotype, + final Fashion symbolContext, final HorizontalAlignment stereoAlignment) { + return new AbstractTextBlock() { + + public void drawU(UGraphic ug) { + final XDimension2D dim = calculateDimension(ug.getStringBounder()); + ug = UGraphicStencil.create(ug, dim); + ug = symbolContext.apply(ug); + drawAction(ug, dim.getWidth(), dim.getHeight(), symbolContext.getDeltaShadow(), + symbolContext.getRoundCorner(), symbolContext.getDiagonalCorner()); + final Margin margin = getMargin(); + final TextBlock tb = TextBlockUtils.mergeTB(stereotype, label, stereoAlignment); + tb.drawU(ug.apply(new UTranslate(margin.getX1(), margin.getY1()))); + } + + public XDimension2D calculateDimension(StringBounder stringBounder) { + final XDimension2D dimLabel = label.calculateDimension(stringBounder); + final XDimension2D dimStereo = stereotype.calculateDimension(stringBounder); + return getMargin().addDimension(dimStereo.mergeTB(dimLabel)); + } + }; + } + + @Override + public TextBlock asBig(final TextBlock title, final HorizontalAlignment labelAlignment, final TextBlock stereotype, + final double width, final double height, final Fashion symbolContext, + final HorizontalAlignment stereoAlignment) { + throw new UnsupportedOperationException(); + } + +} \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/decoration/symbol/USymbols.java b/src/net/sourceforge/plantuml/decoration/symbol/USymbols.java index b2f64a4a2..1fad58c66 100644 --- a/src/net/sourceforge/plantuml/decoration/symbol/USymbols.java +++ b/src/net/sourceforge/plantuml/decoration/symbol/USymbols.java @@ -70,6 +70,8 @@ public abstract class USymbols { public final static USymbol FOLDER = record("FOLDER", new USymbolFolder(SName.folder, false)); public final static USymbol FILE = record("FILE", new USymbolFile()); public final static USymbol RECTANGLE = record("RECTANGLE", new USymbolRectangle(SName.rectangle)); + public final static USymbol ACTION = record("ACTION", new USymbolAction(SName.rectangle)); + public final static USymbol PROCESS = record("PROCESS", new USymbolProcess(SName.rectangle)); public final static USymbol HEXAGON = record("HEXAGON", new USymbolHexagon()); public final static USymbol PERSON = record("PERSON", new USymbolPerson()); public final static USymbol LABEL = record("LABEL", new USymbolLabel()); @@ -142,6 +144,10 @@ public abstract class USymbols { usymbol = USymbols.FRAME; else if (symbol.equalsIgnoreCase("cloud")) usymbol = USymbols.CLOUD; + else if (symbol.equalsIgnoreCase("action")) + usymbol = USymbols.ACTION; + else if (symbol.equalsIgnoreCase("process")) + usymbol = USymbols.PROCESS; else if (symbol.equalsIgnoreCase("database")) usymbol = USymbols.DATABASE; else if (symbol.equalsIgnoreCase("queue")) diff --git a/src/net/sourceforge/plantuml/descdiagram/command/CommandCreateElementFull.java b/src/net/sourceforge/plantuml/descdiagram/command/CommandCreateElementFull.java index 84eeedbc0..b4fd353ba 100644 --- a/src/net/sourceforge/plantuml/descdiagram/command/CommandCreateElementFull.java +++ b/src/net/sourceforge/plantuml/descdiagram/command/CommandCreateElementFull.java @@ -69,7 +69,7 @@ import net.sourceforge.plantuml.utils.LineLocation; public class CommandCreateElementFull extends SingleLineCommand2 { - public static final String ALL_TYPES = "person|artifact|actor/|actor|folder|card|file|package|rectangle|hexagon|label|node|frame|cloud|database|queue|stack|storage|agent|usecase/|usecase|component|boundary|control|entity|interface|circle|collections|port|portin|portout"; + public static final String ALL_TYPES = "person|artifact|actor/|actor|folder|card|file|package|rectangle|hexagon|label|node|frame|cloud|action|process|database|queue|stack|storage|agent|usecase/|usecase|component|boundary|control|entity|interface|circle|collections|port|portin|portout"; public CommandCreateElementFull() { super(getRegexConcat()); diff --git a/src/net/sourceforge/plantuml/version/version.txt b/src/net/sourceforge/plantuml/version/version.txt deleted file mode 100644 index 3dfd733c5..000000000 --- a/src/net/sourceforge/plantuml/version/version.txt +++ /dev/null @@ -1,2 +0,0 @@ -1.2023.6-beta-3 -1680642535564 \ No newline at end of file From 6c73caa94375b1ec09920de90ad396777dcf459d Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Mon, 8 Jan 2024 21:11:41 +0100 Subject: [PATCH 42/95] fix: minor issues about multiples stereotype and improve new shapes action and process https://github.com/plantuml/plantuml/issues/1538 https://github.com/plantuml/plantuml/issues/1631 --- .../activitydiagram3/ActivityDiagram3.java | 8 ++--- .../activitydiagram3/InstructionSimple.java | 12 +++---- .../activitydiagram3/InstructionWhile.java | 22 ++++++------ .../activitydiagram3/ftile/BoxStyle.java | 11 +++--- .../decoration/symbol/USymbolAction.java | 34 +++++++++++++++++- .../decoration/symbol/USymbolProcess.java | 36 +++++++++++++++++-- .../command/CommandPackageWithUSymbol.java | 2 +- 7 files changed, 95 insertions(+), 30 deletions(-) diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java b/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java index 4378abb42..281e6c6ce 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java @@ -108,11 +108,11 @@ public class ActivityDiagram3 extends UmlDiagram { return swinlanes.nextLinkRenderer(); } - public CommandExecutionResult addActivity(Display activity, BoxStyle style, Url url, Colors colors, + public CommandExecutionResult addActivity(Display activity, BoxStyle boxStyle, Url url, Colors colors, Stereotype stereotype) { manageSwimlaneStrategy(); final InstructionSimple ins = new InstructionSimple(activity, nextLinkRenderer(), - swinlanes.getCurrentSwimlane(), style, url, colors, stereotype); + swinlanes.getCurrentSwimlane(), boxStyle, url, colors, stereotype); final CommandExecutionResult added = current().add(ins); if (added.isOk() == false) return added; @@ -396,7 +396,7 @@ public class ActivityDiagram3 extends UmlDiagram { } if (current() instanceof InstructionWhile) { final InstructionWhile instructionWhile = (InstructionWhile) current(); - instructionWhile.setBackward(label, swinlanes.getCurrentSwimlane(), boxStyle, incoming1, incoming2); + instructionWhile.setBackward(label, boxStyle, incoming1, incoming2, stereotype); return CommandExecutionResult.ok(); } return CommandExecutionResult.error("Cannot find repeat"); @@ -406,7 +406,7 @@ public class ActivityDiagram3 extends UmlDiagram { public void doWhile(Display test, Display yes, HColor color) { manageSwimlaneStrategy(); final InstructionWhile instructionWhile = new InstructionWhile(swinlanes.getCurrentSwimlane(), current(), test, - nextLinkRenderer(), yes, color, getSkinParam()); + nextLinkRenderer(), yes, color, getSkinParam().getCurrentStyleBuilder()); current().add(instructionWhile); setCurrent(instructionWhile); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionSimple.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionSimple.java index 901b55ce5..d6886bd0b 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionSimple.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionSimple.java @@ -62,7 +62,7 @@ public class InstructionSimple extends MonoSwimable implements Instruction { private final Display label; private final Colors colors; private final LinkRendering inlinkRendering; - private final BoxStyle style; + private final BoxStyle boxStyle; private final Url url; private final Stereotype stereotype; @@ -71,12 +71,12 @@ public class InstructionSimple extends MonoSwimable implements Instruction { return false; } - public InstructionSimple(Display label, LinkRendering inlinkRendering, Swimlane swimlane, BoxStyle style, Url url, - Colors colors, Stereotype stereotype) { + public InstructionSimple(Display label, LinkRendering inlinkRendering, Swimlane swimlane, BoxStyle boxStyle, + Url url, Colors colors, Stereotype stereotype) { super(swimlane); this.stereotype = stereotype; this.url = url; - this.style = style; + this.boxStyle = boxStyle; this.label = label; this.inlinkRendering = Objects.requireNonNull(inlinkRendering); this.colors = Objects.requireNonNull(colors); @@ -85,7 +85,7 @@ public class InstructionSimple extends MonoSwimable implements Instruction { // ::comment when __CORE__ @Override public Gtile createGtile(ISkinParam skinParam, StringBounder stringBounder) { - GtileBox result = GtileBox.create(stringBounder, colors.mute(skinParam), label, getSwimlaneIn(), style, + GtileBox result = GtileBox.create(stringBounder, colors.mute(skinParam), label, getSwimlaneIn(), boxStyle, stereotype); if (hasNotes()) { final Collection notes = getPositionedNotes(); @@ -103,7 +103,7 @@ public class InstructionSimple extends MonoSwimable implements Instruction { @Override public Ftile createFtile(FtileFactory factory) { - Ftile result = factory.activity(label, getSwimlaneIn(), style, colors, stereotype); + Ftile result = factory.activity(label, getSwimlaneIn(), boxStyle, colors, stereotype); if (url != null) { result = factory.addUrl(result, url); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionWhile.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionWhile.java index 8ec637324..721f882d0 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionWhile.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionWhile.java @@ -55,6 +55,7 @@ import net.sourceforge.plantuml.klimt.font.StringBounder; import net.sourceforge.plantuml.klimt.geom.VerticalAlignment; 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.StyleBuilder; @@ -73,13 +74,14 @@ public class InstructionWhile extends WithNote implements Instruction, Instructi private LinkRendering outColor = LinkRendering.none(); private final Swimlane swimlane; - private final ISkinParam skinParam; private Instruction specialOut; private BoxStyle boxStyle; - private Swimlane swimlaneOut; + private Display backward = Display.NULL; + private Stereotype stereotype; + private LinkRendering incoming1 = LinkRendering.none(); private LinkRendering incoming2 = LinkRendering.none(); private boolean backwardCalled; @@ -90,15 +92,14 @@ public class InstructionWhile extends WithNote implements Instruction, Instructi } public InstructionWhile(Swimlane swimlane, Instruction parent, Display test, LinkRendering nextLinkRenderer, - Display yes, HColor color, ISkinParam skinParam) { + Display yes, HColor color, StyleBuilder currentStyleBuilder) { this.parent = parent; this.test = Objects.requireNonNull(test); this.nextLinkRenderer = Objects.requireNonNull(nextLinkRenderer); this.yes = Objects.requireNonNull(yes); this.swimlane = swimlane; - this.currentStyleBuilder = skinParam.getCurrentStyleBuilder(); + this.currentStyleBuilder = currentStyleBuilder; this.color = color; - this.skinParam = skinParam; } @Override @@ -119,9 +120,10 @@ public class InstructionWhile extends WithNote implements Instruction, Instructi @Override public Ftile createFtile(FtileFactory factory) { final Ftile back = Display.isNull(backward) ? null - : factory.activity(backward, swimlane, boxStyle, Colors.empty(), null); + : factory.activity(backward, swimlane, boxStyle, Colors.empty(), stereotype); Ftile tmp = repeatList.createFtile(factory); - tmp = factory.createWhile(outColor, swimlane, tmp, test, yes, color, specialOut, back, incoming1, incoming2, currentStyleBuilder); + tmp = factory.createWhile(outColor, swimlane, tmp, test, yes, color, specialOut, back, incoming1, incoming2, + currentStyleBuilder); if (getPositionedNotes().size() > 0) tmp = FtileWithNoteOpale.create(tmp, getPositionedNotes(), false, VerticalAlignment.CENTER); @@ -194,14 +196,14 @@ public class InstructionWhile extends WithNote implements Instruction, Instructi return repeatList.containsBreak(); } - public void setBackward(Display label, Swimlane swimlaneOut, BoxStyle boxStyle, LinkRendering incoming1, - LinkRendering incoming2) { + public void setBackward(Display label, BoxStyle boxStyle, LinkRendering incoming1, LinkRendering incoming2, + Stereotype stereotype) { this.backward = label; - this.swimlaneOut = swimlaneOut; this.boxStyle = boxStyle; this.incoming1 = incoming1; this.incoming2 = incoming2; this.backwardCalled = true; + this.stereotype = stereotype; } public void incoming(LinkRendering incoming) { diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/BoxStyle.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/BoxStyle.java index d2e6a70a3..f803285e7 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/BoxStyle.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/BoxStyle.java @@ -160,11 +160,12 @@ public enum BoxStyle { if (bs.style == style.charAt(0)) return bs; - style = style.replaceAll("\\W", ""); - - for (BoxStyle bs : BoxStyle.values()) - if (style.equalsIgnoreCase(bs.stereotype)) - return bs; + for (String s : style.split("\\s")) { + s = s.replaceAll("\\W", ""); + for (BoxStyle bs : BoxStyle.values()) + if (s.equalsIgnoreCase(bs.stereotype)) + return bs; + } } return PLAIN; } diff --git a/src/net/sourceforge/plantuml/decoration/symbol/USymbolAction.java b/src/net/sourceforge/plantuml/decoration/symbol/USymbolAction.java index 3326d96c9..7ee042799 100644 --- a/src/net/sourceforge/plantuml/decoration/symbol/USymbolAction.java +++ b/src/net/sourceforge/plantuml/decoration/symbol/USymbolAction.java @@ -102,12 +102,44 @@ class USymbolAction extends USymbol { } }; } + + private double getHTitle(XDimension2D dimTitle) { + final double htitle; + if (dimTitle.getWidth() == 0) + htitle = 10; + else + htitle = dimTitle.getHeight(); + + return htitle; + } + + @Override public TextBlock asBig(final TextBlock title, final HorizontalAlignment labelAlignment, final TextBlock stereotype, final double width, final double height, final Fashion symbolContext, final HorizontalAlignment stereoAlignment) { - throw new UnsupportedOperationException(); + return new AbstractTextBlock() { + + public void drawU(UGraphic ug) { + final StringBounder stringBounder = ug.getStringBounder(); + final XDimension2D dim = calculateDimension(stringBounder); + ug = symbolContext.apply(ug); + final XDimension2D dimTitle = title.calculateDimension(stringBounder); + drawAction(ug, dim.getWidth(), dim.getHeight(), symbolContext.getDeltaShadow(), + symbolContext.getRoundCorner(), symbolContext.getDiagonalCorner()); + final double posTitle = (width - dimTitle.getWidth()) / 2; + title.drawU(ug.apply(new UTranslate(posTitle, 2))); + final XDimension2D dimStereo = stereotype.calculateDimension(stringBounder); + final double posStereo = (width - dimStereo.getWidth()) / 2; + + stereotype.drawU(ug.apply(new UTranslate(4 + posStereo, 2 + getHTitle(dimTitle)))); + } + + public XDimension2D calculateDimension(StringBounder stringBounder) { + return new XDimension2D(width, height); + } + }; } } \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/decoration/symbol/USymbolProcess.java b/src/net/sourceforge/plantuml/decoration/symbol/USymbolProcess.java index 2c566b9f9..e8bcb9315 100644 --- a/src/net/sourceforge/plantuml/decoration/symbol/USymbolProcess.java +++ b/src/net/sourceforge/plantuml/decoration/symbol/USymbolProcess.java @@ -64,7 +64,7 @@ class USymbolProcess extends USymbol { return sname; } - private void drawAction(UGraphic ug, double width, double height, double shadowing, double roundCorner, + private void drawProcess(UGraphic ug, double width, double height, double shadowing, double roundCorner, double diagonalCorner) { final UPolygon shape = new UPolygon(); shape.addPoint(0, 0); @@ -89,7 +89,7 @@ class USymbolProcess extends USymbol { final XDimension2D dim = calculateDimension(ug.getStringBounder()); ug = UGraphicStencil.create(ug, dim); ug = symbolContext.apply(ug); - drawAction(ug, dim.getWidth(), dim.getHeight(), symbolContext.getDeltaShadow(), + drawProcess(ug, dim.getWidth(), dim.getHeight(), symbolContext.getDeltaShadow(), symbolContext.getRoundCorner(), symbolContext.getDiagonalCorner()); final Margin margin = getMargin(); final TextBlock tb = TextBlockUtils.mergeTB(stereotype, label, stereoAlignment); @@ -104,11 +104,41 @@ class USymbolProcess extends USymbol { }; } + private double getHTitle(XDimension2D dimTitle) { + final double htitle; + if (dimTitle.getWidth() == 0) + htitle = 10; + else + htitle = dimTitle.getHeight(); + + return htitle; + } + @Override public TextBlock asBig(final TextBlock title, final HorizontalAlignment labelAlignment, final TextBlock stereotype, final double width, final double height, final Fashion symbolContext, final HorizontalAlignment stereoAlignment) { - throw new UnsupportedOperationException(); + return new AbstractTextBlock() { + + public void drawU(UGraphic ug) { + final StringBounder stringBounder = ug.getStringBounder(); + final XDimension2D dim = calculateDimension(stringBounder); + ug = symbolContext.apply(ug); + final XDimension2D dimTitle = title.calculateDimension(stringBounder); + drawProcess(ug, dim.getWidth(), dim.getHeight(), symbolContext.getDeltaShadow(), + symbolContext.getRoundCorner(), symbolContext.getDiagonalCorner()); + final double posTitle = (width - dimTitle.getWidth()) / 2; + title.drawU(ug.apply(new UTranslate(posTitle, 2))); + final XDimension2D dimStereo = stereotype.calculateDimension(stringBounder); + final double posStereo = (width - dimStereo.getWidth()) / 2; + + stereotype.drawU(ug.apply(new UTranslate(4 + posStereo, 2 + getHTitle(dimTitle)))); + } + + public XDimension2D calculateDimension(StringBounder stringBounder) { + return new XDimension2D(width, height); + } + }; } } \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/descdiagram/command/CommandPackageWithUSymbol.java b/src/net/sourceforge/plantuml/descdiagram/command/CommandPackageWithUSymbol.java index fbbfa15a9..bbe8fc65c 100644 --- a/src/net/sourceforge/plantuml/descdiagram/command/CommandPackageWithUSymbol.java +++ b/src/net/sourceforge/plantuml/descdiagram/command/CommandPackageWithUSymbol.java @@ -72,7 +72,7 @@ public class CommandPackageWithUSymbol extends SingleLineCommand2 Date: Tue, 9 Jan 2024 18:46:10 +0100 Subject: [PATCH 43/95] fix: note placement in listfiles --- .../plantuml/decoration/symbol/USymbols.java | 4 +- .../plantuml/filesdiagram/FEntry.java | 40 +++++++++++-------- .../plantuml/filesdiagram/FilesListing.java | 10 +++-- src/net/sourceforge/plantuml/style/SName.java | 2 + 4 files changed, 34 insertions(+), 22 deletions(-) diff --git a/src/net/sourceforge/plantuml/decoration/symbol/USymbols.java b/src/net/sourceforge/plantuml/decoration/symbol/USymbols.java index 1fad58c66..98758878f 100644 --- a/src/net/sourceforge/plantuml/decoration/symbol/USymbols.java +++ b/src/net/sourceforge/plantuml/decoration/symbol/USymbols.java @@ -70,8 +70,8 @@ public abstract class USymbols { public final static USymbol FOLDER = record("FOLDER", new USymbolFolder(SName.folder, false)); public final static USymbol FILE = record("FILE", new USymbolFile()); public final static USymbol RECTANGLE = record("RECTANGLE", new USymbolRectangle(SName.rectangle)); - public final static USymbol ACTION = record("ACTION", new USymbolAction(SName.rectangle)); - public final static USymbol PROCESS = record("PROCESS", new USymbolProcess(SName.rectangle)); + public final static USymbol ACTION = record("ACTION", new USymbolAction(SName.action)); + public final static USymbol PROCESS = record("PROCESS", new USymbolProcess(SName.process)); public final static USymbol HEXAGON = record("HEXAGON", new USymbolHexagon()); public final static USymbol PERSON = record("PERSON", new USymbolPerson()); public final static USymbol LABEL = record("LABEL", new USymbolLabel()); diff --git a/src/net/sourceforge/plantuml/filesdiagram/FEntry.java b/src/net/sourceforge/plantuml/filesdiagram/FEntry.java index 8364e560d..c48785d39 100644 --- a/src/net/sourceforge/plantuml/filesdiagram/FEntry.java +++ b/src/net/sourceforge/plantuml/filesdiagram/FEntry.java @@ -60,47 +60,48 @@ import net.sourceforge.plantuml.svek.image.Opale; public class FEntry implements Iterable { - private final ISkinParam skinParam; + private final FEntry parent; private final List note; private final String name; private FilesType type; private List children = new ArrayList<>(); - public static FEntry createRoot(ISkinParam skinParam) { - return new FEntry(null, "", FilesType.FOLDER, skinParam); + public static FEntry createRoot() { + return new FEntry(null, FilesType.FOLDER, "", null); } - private FEntry(List note, String name, FilesType type, ISkinParam skinParam) { + private FEntry(FEntry parent, FilesType type, String name, List note) { + this.parent = parent; this.note = note; this.name = name; this.type = type; - this.skinParam = skinParam; } - public void addRawEntry(String raw, ISkinParam skinParam) { + public FEntry addRawEntry(String raw) { final int x = raw.indexOf('/'); if (x == -1) { - final FEntry result = new FEntry(null, raw, FilesType.DATA, skinParam); + final FEntry result = new FEntry(this, FilesType.DATA, raw, null); children.add(result); - return; + return result; } - final FEntry folder = getOrCreateFolder(raw.substring(0, x), skinParam); + final FEntry folder = getOrCreateFolder(raw.substring(0, x)); final String remain = raw.substring(x + 1); if (remain.length() != 0) - folder.addRawEntry(remain, skinParam); + return folder.addRawEntry(remain); + return null; } - public void addNote(List note, ISkinParam skinParam) { - final FEntry result = new FEntry(note, "NONE", FilesType.NOTE, skinParam); + public void addNote(List note) { + final FEntry result = new FEntry(this, FilesType.NOTE, "NONE", note); children.add(result); } - private FEntry getOrCreateFolder(String folderName, ISkinParam skinParam) { + private FEntry getOrCreateFolder(String folderName) { for (FEntry child : children) if (child.type == FilesType.FOLDER && child.getName().equals(folderName)) return child; - final FEntry result = new FEntry(null, folderName, FilesType.FOLDER, skinParam); + final FEntry result = new FEntry(this, FilesType.FOLDER, folderName, null); children.add(result); return result; } @@ -110,6 +111,10 @@ public class FEntry implements Iterable { return Collections.unmodifiableCollection(children).iterator(); } + public FEntry getParent() { + return parent; + } + public String getName() { return name; } @@ -132,14 +137,15 @@ public class FEntry implements Iterable { private TextBlock getTextBlock(FontConfiguration fontConfiguration, ISkinParam skinParam) { if (type == FilesType.NOTE) - return createOpale(); + return createOpale(skinParam); final Display display = Display.getWithNewlines(getEmoticon() + getName()); - TextBlock result = display.create7(fontConfiguration, HorizontalAlignment.LEFT, skinParam, CreoleMode.NO_CREOLE); + TextBlock result = display.create7(fontConfiguration, HorizontalAlignment.LEFT, skinParam, + CreoleMode.NO_CREOLE); return result; } - private Opale createOpale() { + private Opale createOpale(ISkinParam skinParam) { final StyleSignatureBasic signature = StyleSignatureBasic.of(SName.root, SName.element, SName.timingDiagram, SName.note); diff --git a/src/net/sourceforge/plantuml/filesdiagram/FilesListing.java b/src/net/sourceforge/plantuml/filesdiagram/FilesListing.java index 592a779a0..a90e78caf 100644 --- a/src/net/sourceforge/plantuml/filesdiagram/FilesListing.java +++ b/src/net/sourceforge/plantuml/filesdiagram/FilesListing.java @@ -49,10 +49,11 @@ public class FilesListing extends AbstractTextBlock { private final ISkinParam skinParam; private final FontConfiguration fontConfiguration = FontConfiguration.blackBlueTrue(UFont.courier(14)); private final FEntry root; + private FEntry lastCreated; public FilesListing(ISkinParam skinParam) { this.skinParam = skinParam; - this.root = FEntry.createRoot(skinParam); + this.root = FEntry.createRoot(); } @Override @@ -67,11 +68,14 @@ public class FilesListing extends AbstractTextBlock { } public void addRawEntry(String raw) { - root.addRawEntry(raw, skinParam); + lastCreated = root.addRawEntry(raw); } public void addNote(List note) { - root.addNote(note, skinParam); + if (lastCreated == null) + root.addNote(note); + else + lastCreated.getParent().addNote(note); } } diff --git a/src/net/sourceforge/plantuml/style/SName.java b/src/net/sourceforge/plantuml/style/SName.java index 111c7863a..7f1f9689f 100644 --- a/src/net/sourceforge/plantuml/style/SName.java +++ b/src/net/sourceforge/plantuml/style/SName.java @@ -36,6 +36,7 @@ package net.sourceforge.plantuml.style; public enum SName { + action, // activity, // activityBar, // activityDiagram, // @@ -113,6 +114,7 @@ public enum SName { partition, // person, // port, // + process, // queue, // rectangle, // reference, // From 9502ed812b5683e7e0b40b0d1798cab5c0a6df8a Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Tue, 16 Jan 2024 16:22:19 +0000 Subject: [PATCH 44/95] add: Language Descriptor Improvement (adding `action` and `process`) --- src/net/sourceforge/plantuml/syntax/LanguageDescriptor.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/net/sourceforge/plantuml/syntax/LanguageDescriptor.java b/src/net/sourceforge/plantuml/syntax/LanguageDescriptor.java index 31bd7245a..a0a414d4f 100644 --- a/src/net/sourceforge/plantuml/syntax/LanguageDescriptor.java +++ b/src/net/sourceforge/plantuml/syntax/LanguageDescriptor.java @@ -93,6 +93,8 @@ public class LanguageDescriptor { type.add("metaclass"); type.add("map"); type.add("json"); + type.add("action"); + type.add("process"); keyword.add("@startwire"); keyword.add("@startbpm"); From bf2312a2523c0715e40eaaedc9c9e0ebcaa784a1 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Tue, 16 Jan 2024 22:19:10 +0100 Subject: [PATCH 45/95] feat: edgy standard library improvement https://github.com/plantuml/plantuml-stdlib/pull/86 --- stdlib/edgy-abx.repx | Bin 3430 -> 3897 bytes 1 file changed, 0 insertions(+), 0 deletions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(H9(I6GZUZSiWWv*)&9#~3KN7UO2IFEr=N zbB*jKlSQ7hN=qSId7llk7!B%fFPDZob`Z`~(porE+nW_s{NQRe=(f85V|Pi;XK{b@ z9~Y6~+HVrrU;xCn$9?O~!VpK60aXN@5Jo1rShS1r>H}^jrKKX(XY}vb;)rbB9b2ht zlbfiGSX;og_u8E2vEDk%NxIjWKtAGqhV-t9)#@22=?L#EmdQ#1-@H@QJ4l7EDZV&) zd`)rBN#fU(Fz<=iT14df<*!UfnJ#lb-b-5&bpyXRed-3@JIEq-18?T=0GRp$Yc-u$ I_x1YT1A Date: Thu, 18 Jan 2024 02:11:38 +0000 Subject: [PATCH 46/95] chore(deps): bump actions/cache from 3 to 4 Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 4 ++-- .github/workflows/native-image.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec444f245..a8ad22dc1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -172,7 +172,7 @@ jobs: run: | echo "release_version=$(gradle properties -q | grep "version:" | awk '{print $2}')" >> $GITHUB_OUTPUT - name: Cache libs - uses: actions/cache/save@v3 + uses: actions/cache/save@v4 with: path: | build/libs @@ -228,7 +228,7 @@ jobs: cache: gradle - name: Restore Libs cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: path: | build/libs diff --git a/.github/workflows/native-image.yml b/.github/workflows/native-image.yml index de3990925..7db154b09 100644 --- a/.github/workflows/native-image.yml +++ b/.github/workflows/native-image.yml @@ -32,7 +32,7 @@ jobs: components: 'native-image' github-token: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/cache/restore@v3 + - uses: actions/cache/restore@v4 with: path: | build/libs @@ -57,7 +57,7 @@ jobs: native-image -H:ConfigurationFileDirectories=native-image-config-dir --no-fallback --report-unsupported-elements-at-runtime -jar "build/libs/plantuml-${{ inputs.release-version }}.jar" -H:Path="build/libs" -H:Name="plantuml-${{ matrix.platform }}-${{ inputs.release-version }}" - name: Cache native image - uses: actions/cache/save@v3 + uses: actions/cache/save@v4 with: path: "build/libs/plantuml-${{ matrix.platform }}-*" key: "native-image-${{ matrix.platform }}-${{ github.run_id }}" From 40268783002ff8b08efae45bcb2467c75bba2cbf Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Thu, 18 Jan 2024 22:32:45 +0100 Subject: [PATCH 47/95] perf: stop recompiling pattern at runtime https://github.com/plantuml/plantuml/issues/1642 --- gradle.properties | 2 +- .../klimt/drawing/svg/SvgGraphics.java | 2 +- .../sourceforge/plantuml/text/TLineType.java | 211 +++++++++++------- .../sourceforge/plantuml/version/Version.java | 2 +- 4 files changed, 139 insertions(+), 78 deletions(-) diff --git a/gradle.properties b/gradle.properties index fd7b57c96..b35705355 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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.2024.0beta1 +version = 1.2024.0beta2 org.gradle.workers.max = 3 \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/klimt/drawing/svg/SvgGraphics.java b/src/net/sourceforge/plantuml/klimt/drawing/svg/SvgGraphics.java index c13d9b5a7..be1e8f466 100644 --- a/src/net/sourceforge/plantuml/klimt/drawing/svg/SvgGraphics.java +++ b/src/net/sourceforge/plantuml/klimt/drawing/svg/SvgGraphics.java @@ -1024,7 +1024,7 @@ public class SvgGraphics { public void addCommentMetadata(String metadata) { // ::comment when __CORE__ - final String signature = getMetadataHex(metadata); + final String signature = getMetadataHex(metadata).replace("--", "- -"); final String comment = "SRC=[" + signature + "]"; final Comment commentElement = document.createComment(comment); getG().appendChild(commentElement); diff --git a/src/net/sourceforge/plantuml/text/TLineType.java b/src/net/sourceforge/plantuml/text/TLineType.java index 869f3d810..315c58b88 100644 --- a/src/net/sourceforge/plantuml/text/TLineType.java +++ b/src/net/sourceforge/plantuml/text/TLineType.java @@ -34,6 +34,8 @@ */ package net.sourceforge.plantuml.text; +import java.util.regex.Pattern; + public enum TLineType { PLAIN, AFFECTATION_DEFINE, AFFECTATION, ASSERT, IF, IFDEF, UNDEF, IFNDEF, ELSE, ELSEIF, ENDIF, WHILE, ENDWHILE, @@ -41,115 +43,174 @@ public enum TLineType { LEGACY_DEFINELONG, THEME, INCLUDE, INCLUDE_DEF, IMPORT, STARTSUB, ENDSUB, INCLUDESUB, LOG, DUMP_MEMORY, COMMENT_SIMPLE, COMMENT_LONG_START; -// private boolean elseLike() { -// return this == ELSE || this == ELSEIF; -// } -// -// public boolean incIndentAfter() { -// return this == IF || this == IFDEF || this == IFNDEF || elseLike(); -// } -// -// public boolean decIndentBefore() { -// return this == ENDIF || elseLike(); -// } + private static final Pattern PATTERN_LEGACY_DEFINE = Pattern.compile("^\\s*!define\\s+[\\p{L}_][\\p{L}_0-9]*\\(.*"); + + private static final Pattern PATTERN_LEGACY_DEFINELONG = Pattern + .compile("^\\s*!definelong\\s+[\\p{L}_][\\p{L}_0-9]*\\b.*"); + + private static final Pattern PATTERN_AFFECTATION_DEFINE = Pattern + .compile("^\\s*!define\\s+[\\p{L}_][\\p{L}_0-9]*\\b.*"); + + private static final Pattern PATTERN_AFFECTATION = Pattern + .compile("^\\s*!\\s*(local|global)?\\s*\\$?[\\p{L}_][\\p{L}_0-9]*\\s*\\??=.*"); + + private static final Pattern PATTERN_COMMENT_SIMPLE1 = Pattern.compile("^\\s*'.*"); + + private static final Pattern PATTERN_COMMENT_SIMPLE2 = Pattern.compile("^\\s*/'.*'/\\s*$"); + + private static final Pattern PATTERN_COMMENT_LONG_START = Pattern.compile("^\\s*/'.*"); + + private static final Pattern PATTERN_IFDEF = Pattern.compile("^\\s*!ifdef\\s+.*"); + + private static final Pattern PATTERN_UNDEF = Pattern.compile("^\\s*!undef\\s+.*"); + + private static final Pattern PATTERN_IFNDEF = Pattern.compile("^\\s*!ifndef\\s+.*"); + + private static final Pattern PATTERN_ASSERT = Pattern.compile("^\\s*!assert\\s+.*"); + + private static final Pattern PATTERN_IF = Pattern.compile("^\\s*!if\\s+.*"); + + private static final Pattern PATTERN_DECLARE_RETURN_FUNCTION = Pattern + .compile("^\\s*!(unquoted\\s|final\\s)*(function)\\s+\\$?[\\p{L}_][\\p{L}_0-9]*.*"); + + private static final Pattern PATTERN_DECLARE_PROCEDURE = Pattern + .compile("^\\s*!(unquoted\\s|final\\s)*(procedure)\\s+\\$?[\\p{L}_][\\p{L}_0-9]*.*"); + + private static final Pattern PATTERN_ELSE = Pattern.compile("^\\s*!else\\b.*"); + + private static final Pattern PATTERN_ELSEIF = Pattern.compile("^\\s*!elseif\\b.*"); + + private static final Pattern PATTERN_ENDIF = Pattern.compile("^\\s*!endif\\b.*"); + + private static final Pattern PATTERN_WHILE = Pattern.compile("^\\s*!while\\s+.*"); + + private static final Pattern PATTERN_ENDWHILE = Pattern.compile("^\\s*!endwhile\\b.*"); + + private static final Pattern PATTERN_FOREACH = Pattern.compile("^\\s*!foreach\\s+.*"); + + private static final Pattern PATTERN_ENDFOREACH = Pattern.compile("^\\s*!endfor\\b.*"); + + private static final Pattern PATTERN_END_FUNCTION = Pattern + .compile("^\\s*!(end\\s*function|end\\s*definelong|end\\s*procedure)\\b.*"); + + private static final Pattern PATTERN_RETURN = Pattern.compile("^\\s*!return\\b.*"); + + private static final Pattern PATTERN_THEME = Pattern.compile("^\\s*!theme\\b.*"); + + private static final Pattern PATTERN_INCLUDE = Pattern + .compile("^\\s*!(include|includeurl|include_many|include_once)\\b.*"); + + private static final Pattern PATTERN_INCLUDE_DEF = Pattern.compile("^\\s*!(includedef)\\b.*"); + + private static final Pattern PATTERN_IMPORT = Pattern.compile("^\\s*!(import)\\b.*"); + + private static final Pattern PATTERN_STARTSUB = Pattern.compile("^\\s*!startsub\\s+.*"); + + private static final Pattern PATTERN_ENDSUB = Pattern.compile("^\\s*!endsub\\b.*"); + + private static final Pattern PATTERN_INCLUDESUB = Pattern.compile("^\\s*!includesub\\b.*"); + + private static final Pattern PATTERN_LOG = Pattern.compile("^\\s*!(log)\\b.*"); + + private static final Pattern PATTERN_DUMP_MEMORY = Pattern.compile("^\\s*!(dump_memory)\\b.*"); public static TLineType getFromLineInternal(String s) { - if (s.matches("^\\s*!define\\s+[\\p{L}_][\\p{L}_0-9]*\\(.*")) { + if (PATTERN_LEGACY_DEFINE.matcher(s).matches()) return LEGACY_DEFINE; - } - if (s.matches("^\\s*!definelong\\s+[\\p{L}_][\\p{L}_0-9]*\\b.*")) { + + if (PATTERN_LEGACY_DEFINELONG.matcher(s).matches()) return LEGACY_DEFINELONG; - } - if (s.matches("^\\s*!define\\s+[\\p{L}_][\\p{L}_0-9]*\\b.*")) { + + if (PATTERN_AFFECTATION_DEFINE.matcher(s).matches()) return AFFECTATION_DEFINE; - } - if (s.matches("^\\s*!\\s*(local|global)?\\s*\\$?[\\p{L}_][\\p{L}_0-9]*\\s*\\??=.*")) { + + if (PATTERN_AFFECTATION.matcher(s).matches()) return AFFECTATION; - } - if (s.matches("^\\s*'.*")) { + + if (PATTERN_COMMENT_SIMPLE1.matcher(s).matches()) return COMMENT_SIMPLE; - } - if (s.matches("^\\s*/'.*'/\\s*$")) { + + if (PATTERN_COMMENT_SIMPLE2.matcher(s).matches()) return COMMENT_SIMPLE; - } - if (s.matches("^\\s*/'.*") && s.contains("'/") == false) { + + if (PATTERN_COMMENT_LONG_START.matcher(s).matches() && s.contains("'/") == false) return COMMENT_LONG_START; - } - if (s.matches("^\\s*!ifdef\\s+.*")) { + + if (PATTERN_IFDEF.matcher(s).matches()) return IFDEF; - } - if (s.matches("^\\s*!undef\\s+.*")) { + + if (PATTERN_UNDEF.matcher(s).matches()) return UNDEF; - } - if (s.matches("^\\s*!ifndef\\s+.*")) { + + if (PATTERN_IFNDEF.matcher(s).matches()) return IFNDEF; - } - if (s.matches("^\\s*!assert\\s+.*")) { + + if (PATTERN_ASSERT.matcher(s).matches()) return ASSERT; - } - if (s.matches("^\\s*!if\\s+.*")) { + + if (PATTERN_IF.matcher(s).matches()) return IF; - } - if (s.matches("^\\s*!(unquoted\\s|final\\s)*(function)\\s+\\$?[\\p{L}_][\\p{L}_0-9]*.*")) { + + if (PATTERN_DECLARE_RETURN_FUNCTION.matcher(s).matches()) return DECLARE_RETURN_FUNCTION; - } - if (s.matches("^\\s*!(unquoted\\s|final\\s)*(procedure)\\s+\\$?[\\p{L}_][\\p{L}_0-9]*.*")) { + + if (PATTERN_DECLARE_PROCEDURE.matcher(s).matches()) return DECLARE_PROCEDURE; - } - if (s.matches("^\\s*!else\\b.*")) { + + if (PATTERN_ELSE.matcher(s).matches()) return ELSE; - } - if (s.matches("^\\s*!elseif\\b.*")) { + + if (PATTERN_ELSEIF.matcher(s).matches()) return ELSEIF; - } - if (s.matches("^\\s*!endif\\b.*")) { + + if (PATTERN_ENDIF.matcher(s).matches()) return ENDIF; - } - if (s.matches("^\\s*!while\\s+.*")) { + + if (PATTERN_WHILE.matcher(s).matches()) return WHILE; - } - if (s.matches("^\\s*!endwhile\\b.*")) { + + if (PATTERN_ENDWHILE.matcher(s).matches()) return ENDWHILE; - } - if (s.matches("^\\s*!foreach\\s+.*")) { + + if (PATTERN_FOREACH.matcher(s).matches()) return FOREACH; - } - if (s.matches("^\\s*!endfor\\b.*")) { + + if (PATTERN_ENDFOREACH.matcher(s).matches()) return ENDFOREACH; - } - if (s.matches("^\\s*!(end\\s*function|end\\s*definelong|end\\s*procedure)\\b.*")) { + + if (PATTERN_END_FUNCTION.matcher(s).matches()) return END_FUNCTION; - } - if (s.matches("^\\s*!return\\b.*")) { + + if (PATTERN_RETURN.matcher(s).matches()) return RETURN; - } - if (s.matches("^\\s*!theme\\b.*")) { + + if (PATTERN_THEME.matcher(s).matches()) return THEME; - } - if (s.matches("^\\s*!(include|includeurl|include_many|include_once)\\b.*")) { + + if (PATTERN_INCLUDE.matcher(s).matches()) return INCLUDE; - } - if (s.matches("^\\s*!(includedef)\\b.*")) { + + if (PATTERN_INCLUDE_DEF.matcher(s).matches()) return INCLUDE_DEF; - } - if (s.matches("^\\s*!(import)\\b.*")) { + + if (PATTERN_IMPORT.matcher(s).matches()) return IMPORT; - } - if (s.matches("^\\s*!startsub\\s+.*")) { + + if (PATTERN_STARTSUB.matcher(s).matches()) return STARTSUB; - } - if (s.matches("^\\s*!endsub\\b.*")) { + + if (PATTERN_ENDSUB.matcher(s).matches()) return ENDSUB; - } - if (s.matches("^\\s*!includesub\\b.*")) { + + if (PATTERN_INCLUDESUB.matcher(s).matches()) return INCLUDESUB; - } - if (s.matches("^\\s*!(log)\\b.*")) { + + if (PATTERN_LOG.matcher(s).matches()) return LOG; - } - if (s.matches("^\\s*!(dump_memory)\\b.*")) { + + if (PATTERN_DUMP_MEMORY.matcher(s).matches()) return DUMP_MEMORY; - } + return PLAIN; } diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index b00a5ec7b..861b87679 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -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.2024.0beta1"; + private static final String version = "1.2024.0beta2"; public static String versionString() { return version; From f805d983fde835e100839d597ec56503063ec646 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Wed, 24 Jan 2024 12:29:33 +0100 Subject: [PATCH 48/95] docs: add `readme.md` on `chronology` --- src/net/sourceforge/plantuml/chronology/readme.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/net/sourceforge/plantuml/chronology/readme.md diff --git a/src/net/sourceforge/plantuml/chronology/readme.md b/src/net/sourceforge/plantuml/chronology/readme.md new file mode 100644 index 000000000..59ffb89f4 --- /dev/null +++ b/src/net/sourceforge/plantuml/chronology/readme.md @@ -0,0 +1,10 @@ +# Directory Documentation for `chronology` + +## Description +This package provides classes used to manage [Chronology Diagram](https://plantuml.com/chronology-diagram). + +## Link +- [Chronology Diagram](https://plantuml.com/chronology-diagram) + +## Reference +- [Gantt Diagram](https://plantuml.com/gantt-diagram) From 6d158d119673c7765bedf56702db8a418d9527e6 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Wed, 24 Jan 2024 12:35:16 +0100 Subject: [PATCH 49/95] docs: add `package-info.java` on `chronology` --- .../sourceforge/plantuml/chronology/package-info.java | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/net/sourceforge/plantuml/chronology/package-info.java diff --git a/src/net/sourceforge/plantuml/chronology/package-info.java b/src/net/sourceforge/plantuml/chronology/package-info.java new file mode 100644 index 000000000..297264f3b --- /dev/null +++ b/src/net/sourceforge/plantuml/chronology/package-info.java @@ -0,0 +1,9 @@ +/** + * Provides classes used to manage + * + * Chronology Diagram. + * + * @see net.sourceforge.plantuml.project + * + */ +package net.sourceforge.plantuml.chronology; From dbb535473cda22f17eb757fabb0799e402c2794c Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Sat, 27 Jan 2024 13:48:28 +0100 Subject: [PATCH 50/95] fix: clear cache when StringBounder has changed https://github.com/plantuml/plantuml/issues/1575 https://forum.plantuml.net/18480/teoz-produces-odd-legend-for-sequence-diagrams --- gradle.properties | 2 +- .../plantuml/klimt/creole/atom/AtomTable.java | 64 ++++++++++--------- .../sourceforge/plantuml/version/Version.java | 2 +- 3 files changed, 37 insertions(+), 31 deletions(-) diff --git a/gradle.properties b/gradle.properties index b35705355..2bd531824 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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.2024.0beta2 +version = 1.2024.0beta3 org.gradle.workers.max = 3 \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/klimt/creole/atom/AtomTable.java b/src/net/sourceforge/plantuml/klimt/creole/atom/AtomTable.java index 9e32d2a7a..d49fe62be 100644 --- a/src/net/sourceforge/plantuml/klimt/creole/atom/AtomTable.java +++ b/src/net/sourceforge/plantuml/klimt/creole/atom/AtomTable.java @@ -81,6 +81,7 @@ public class AtomTable extends AbstractAtom implements Atom { private final List lines = new ArrayList<>(); private final Map positions = new HashMap(); private final HColor lineColor; + private Class lastCaller; public AtomTable(HColor lineColor) { this.lineColor = lineColor; @@ -110,14 +111,14 @@ public class AtomTable extends AbstractAtom implements Atom { .draw(URectangle.build(x2 - x1, y2 - y1)); } for (int j = 0; j < getNbCols(); j++) { - if (j >= line.cells.size()) { + if (j >= line.cells.size()) continue; - } + final Atom cell = line.cells.get(j); HorizontalAlignment align = HorizontalAlignment.LEFT; - if (cell instanceof SheetBlock1) { + if (cell instanceof SheetBlock1) align = ((SheetBlock1) cell).getCellAlignment(); - } + final HColor cellBackColor = line.cellsBackColor.get(j); final double x1 = getStartingX(j); final double x2 = getStartingX(j + 1); @@ -131,11 +132,11 @@ public class AtomTable extends AbstractAtom implements Atom { final Position pos = positions.get(cell); final XDimension2D dimCell = cell.calculateDimension(ug.getStringBounder()); final double dx; - if (align == HorizontalAlignment.RIGHT) { + if (align == HorizontalAlignment.RIGHT) dx = cellWidth - dimCell.getWidth(); - } else { + else dx = 0; - } + if (cellBackColor == null) cell.drawU(ug.apply(pos.getTranslate().compose(UTranslate.dx(dx)))); else @@ -144,20 +145,25 @@ public class AtomTable extends AbstractAtom implements Atom { } ug = ug.apply(lineColor); final ULine hline = ULine.hline(getEndingX(getNbCols() - 1)); - for (int i = 0; i <= getNbLines(); i++) { + for (int i = 0; i <= getNbLines(); i++) ug.apply(UTranslate.dy(getStartingY(i))).draw(hline); - } + final ULine vline = ULine.vline(getEndingY(getNbLines() - 1)); - for (int i = 0; i <= getNbCols(); i++) { + for (int i = 0; i <= getNbCols(); i++) ug.apply(UTranslate.dx(getStartingX(i))).draw(vline); - } } private void initMap(StringBounder stringBounder) { - if (positions.size() > 0) { + final Class currentCaller = stringBounder.getClass(); + if (lastCaller != currentCaller) + positions.clear(); + + this.lastCaller = currentCaller; + + if (positions.size() > 0) return; - } + for (Line line : lines) { for (Atom cell : line.cells) { final XDimension2D dim = cell.calculateDimension(stringBounder); @@ -179,33 +185,33 @@ public class AtomTable extends AbstractAtom implements Atom { private double getStartingX(int col) { double result = 0; - for (int i = 0; i < col; i++) { + for (int i = 0; i < col; i++) result += getColWidth(i); - } + return result; } private double getEndingX(int col) { double result = 0; - for (int i = 0; i <= col; i++) { + for (int i = 0; i <= col; i++) result += getColWidth(i); - } + return result; } private double getStartingY(int line) { double result = 0; - for (int i = 0; i < line; i++) { + for (int i = 0; i < line; i++) result += getLineHeight(i); - } + return result; } private double getEndingY(int line) { double result = 0; - for (int i = 0; i <= line; i++) { + for (int i = 0; i <= line; i++) result += getLineHeight(i); - } + return result; } @@ -213,9 +219,9 @@ public class AtomTable extends AbstractAtom implements Atom { double result = 0; for (int i = 0; i < getNbLines(); i++) { final Position position = getPosition(i, col); - if (position == null) { + if (position == null) continue; - } + final double width = position.getWidth(); result = Math.max(result, width); } @@ -226,9 +232,9 @@ public class AtomTable extends AbstractAtom implements Atom { double result = 0; for (int i = 0; i < getNbCols(); i++) { final Position position = getPosition(line, i); - if (position == null) { + if (position == null) continue; - } + final double height = position.getHeight(); result = Math.max(result, height); } @@ -236,13 +242,13 @@ public class AtomTable extends AbstractAtom implements Atom { } private Position getPosition(int line, int col) { - if (line >= lines.size()) { + if (line >= lines.size()) return null; - } + final Line l = lines.get(line); - if (col >= l.cells.size()) { + if (col >= l.cells.size()) return null; - } + final Atom atom = l.cells.get(col); return positions.get(atom); } diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index 861b87679..2556013d9 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -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.2024.0beta2"; + private static final String version = "1.2024.0beta3"; public static String versionString() { return version; From e9139c8a38b595481aeb62831ce0e03adc0d9f27 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Sat, 27 Jan 2024 13:36:57 +0000 Subject: [PATCH 51/95] fix: Restore missing file `HelpTest.java` on an accurate folder. _Ref._: - https://github.com/plantuml/plantuml/commit/9c62daa35dbaef9c6c6c326243ec66b9c2192d95 - https://github.com/plantuml/plantuml/commit/e739cd8f5dccfdac2cec085ca37e2f1081b16b5d --- test/testhelper/TestHelper.java | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test/testhelper/TestHelper.java diff --git a/test/testhelper/TestHelper.java b/test/testhelper/TestHelper.java new file mode 100644 index 000000000..0a06fd1c8 --- /dev/null +++ b/test/testhelper/TestHelper.java @@ -0,0 +1,23 @@ +package testhelper; + +import static net.sourceforge.plantuml.test.PlantUmlTestUtils.exportDiagram; +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.jupiter.api.Test; + +class TestHelper { + + @Test + public void test_help_themes() throws Exception { + + final String output = exportDiagram( + "@startuml", + "help themes", + "@enduml" + ).asString(); + + assertThat(output) + .startsWith(" \nHelp on themes") + .contains("bluegray", "hacker"); + } +} \ No newline at end of file From 5fae97f44e369daba5a247c079e8a01c7d9e2f72 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Thu, 1 Feb 2024 18:52:57 +0100 Subject: [PATCH 52/95] fix: Gantt Layout issue when Print between is used with Printscale weekly https://github.com/plantuml/plantuml/issues/1664 --- src/net/sourceforge/plantuml/project/GanttDiagram.java | 10 +++++----- .../plantuml/project/draw/TimeHeaderDaily.java | 2 +- .../plantuml/project/draw/TimeHeaderMonthly.java | 4 ++-- .../plantuml/project/draw/TimeHeaderQuarterly.java | 4 ++-- .../plantuml/project/draw/TimeHeaderWeekly.java | 4 ++-- .../plantuml/project/draw/TimeHeaderYearly.java | 4 ++-- .../project/timescale/TimeScaleCompressed.java | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/net/sourceforge/plantuml/project/GanttDiagram.java b/src/net/sourceforge/plantuml/project/GanttDiagram.java index 529e21ae8..44e2bb2e6 100644 --- a/src/net/sourceforge/plantuml/project/GanttDiagram.java +++ b/src/net/sourceforge/plantuml/project/GanttDiagram.java @@ -307,15 +307,15 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit if (openClose.getStartingDay() == null) return new TimeHeaderSimple(stringBounder, thParam(), printScale); else if (printScale == PrintScale.DAILY) - return new TimeHeaderDaily(stringBounder, thParam(), nameDays, printStart, printEnd); + return new TimeHeaderDaily(stringBounder, thParam(), nameDays, printStart); else if (printScale == PrintScale.WEEKLY) - return new TimeHeaderWeekly(stringBounder, thParam(), weekNumberStrategy, withCalendarDate); + return new TimeHeaderWeekly(stringBounder, thParam(), weekNumberStrategy, withCalendarDate, printStart); else if (printScale == PrintScale.MONTHLY) - return new TimeHeaderMonthly(stringBounder, thParam()); + return new TimeHeaderMonthly(stringBounder, thParam(), printStart); else if (printScale == PrintScale.QUARTERLY) - return new TimeHeaderQuarterly(stringBounder, thParam()); + return new TimeHeaderQuarterly(stringBounder, thParam(), printStart); else if (printScale == PrintScale.YEARLY) - return new TimeHeaderYearly(stringBounder, thParam()); + return new TimeHeaderYearly(stringBounder, thParam(), printStart); else throw new IllegalStateException(); diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeaderDaily.java b/src/net/sourceforge/plantuml/project/draw/TimeHeaderDaily.java index 6d5a550bb..039180af5 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeaderDaily.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeaderDaily.java @@ -96,7 +96,7 @@ public class TimeHeaderDaily extends TimeHeaderCalendar { private final Map nameDays; public TimeHeaderDaily(StringBounder stringBounder, TimeHeaderParameters thParam, Map nameDays, - Day printStart, Day printEnd) { + Day printStart) { super(thParam, new TimeScaleDaily(thParam.getCellWidth(stringBounder), thParam.getStartingDay(), thParam.getScale(), printStart)); this.nameDays = nameDays; diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeaderMonthly.java b/src/net/sourceforge/plantuml/project/draw/TimeHeaderMonthly.java index 81e619c86..f784519cd 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeaderMonthly.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeaderMonthly.java @@ -67,9 +67,9 @@ public class TimeHeaderMonthly extends TimeHeaderCalendar { return getTimeHeaderHeight(stringBounder); } - public TimeHeaderMonthly(StringBounder stringBounder, TimeHeaderParameters thParam) { + public TimeHeaderMonthly(StringBounder stringBounder, TimeHeaderParameters thParam, Day printStart) { super(thParam, new TimeScaleCompressed(thParam.getCellWidth(stringBounder), thParam.getStartingDay(), - thParam.getScale())); + thParam.getScale(), printStart)); } @Override diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeaderQuarterly.java b/src/net/sourceforge/plantuml/project/draw/TimeHeaderQuarterly.java index 87e202be0..daa68bcfe 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeaderQuarterly.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeaderQuarterly.java @@ -67,9 +67,9 @@ public class TimeHeaderQuarterly extends TimeHeaderCalendar { return getTimeHeaderHeight(stringBounder); } - public TimeHeaderQuarterly(StringBounder stringBounder, TimeHeaderParameters thParam) { + public TimeHeaderQuarterly(StringBounder stringBounder, TimeHeaderParameters thParam, Day printStart) { super(thParam, new TimeScaleCompressed(thParam.getCellWidth(stringBounder), thParam.getStartingDay(), - thParam.getScale())); + thParam.getScale(), printStart)); } @Override diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeaderWeekly.java b/src/net/sourceforge/plantuml/project/draw/TimeHeaderWeekly.java index c2cbc0d96..af6fbaffd 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeaderWeekly.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeaderWeekly.java @@ -76,9 +76,9 @@ public class TimeHeaderWeekly extends TimeHeaderCalendar { } public TimeHeaderWeekly(StringBounder stringBounder, TimeHeaderParameters thParam, - WeekNumberStrategy weekNumberStrategy, boolean withCalendarDate) { + WeekNumberStrategy weekNumberStrategy, boolean withCalendarDate, Day printStart) { super(thParam, new TimeScaleCompressed(thParam.getCellWidth(stringBounder), thParam.getStartingDay(), - thParam.getScale())); + thParam.getScale(), printStart)); this.weekNumberStrategy = weekNumberStrategy; this.withCalendarDate = withCalendarDate; } diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeaderYearly.java b/src/net/sourceforge/plantuml/project/draw/TimeHeaderYearly.java index 1c569b4ff..fddee9e9a 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeaderYearly.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeaderYearly.java @@ -64,9 +64,9 @@ public class TimeHeaderYearly extends TimeHeaderCalendar { return getTimeHeaderHeight(stringBounder); } - public TimeHeaderYearly(StringBounder stringBounder, TimeHeaderParameters thParam) { + public TimeHeaderYearly(StringBounder stringBounder, TimeHeaderParameters thParam, Day printStart) { super(thParam, new TimeScaleCompressed(thParam.getCellWidth(stringBounder), thParam.getStartingDay(), - thParam.getScale())); + thParam.getScale(), printStart)); } @Override diff --git a/src/net/sourceforge/plantuml/project/timescale/TimeScaleCompressed.java b/src/net/sourceforge/plantuml/project/timescale/TimeScaleCompressed.java index 31cc3283a..3e8155866 100644 --- a/src/net/sourceforge/plantuml/project/timescale/TimeScaleCompressed.java +++ b/src/net/sourceforge/plantuml/project/timescale/TimeScaleCompressed.java @@ -42,8 +42,8 @@ public class TimeScaleCompressed implements TimeScale { private final TimeScale daily; - public TimeScaleCompressed(double size, Day calendar, double scale) { - this.daily = new TimeScaleDaily(size, calendar, scale, null); + public TimeScaleCompressed(double size, Day calendar, double scale, Day zeroDay) { + this.daily = new TimeScaleDaily(size, calendar, scale, zeroDay); } public double getStartingPosition(Day instant) { From dbbdf1277be55de8c6c4647c22c2e46572d28d60 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Thu, 1 Feb 2024 19:30:28 +0100 Subject: [PATCH 53/95] chore: version 1.2024.0 --- gradle.properties | 2 +- src/net/sourceforge/plantuml/version/Version.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 2bd531824..494210599 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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.2024.0beta3 +version = 1.2024.0 org.gradle.workers.max = 3 \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index 2556013d9..029ed51d6 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -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.2024.0beta3"; + private static final String version = "1.2024.0"; public static String versionString() { return version; @@ -80,7 +80,7 @@ public class Version { } public static long compileTime() { - return 1702318857783L; + return 1706811534365L; } public static String compileTimeString() { From dbaf8ac2cd50f04ac4ec4309e7dadae234ea8375 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Thu, 1 Feb 2024 22:29:55 +0100 Subject: [PATCH 54/95] feat: add some %random function https://github.com/plantuml/plantuml/issues/1667 --- gradle.properties | 2 +- .../sourceforge/plantuml/tim/TContext.java | 2 + .../plantuml/tim/stdlib/Random.java | 67 +++++++++++++++++++ .../sourceforge/plantuml/version/Version.java | 2 +- 4 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 src/net/sourceforge/plantuml/tim/stdlib/Random.java diff --git a/gradle.properties b/gradle.properties index 494210599..c1112c317 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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.2024.0 +version = 1.2024.1beta1 org.gradle.workers.max = 3 \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/tim/TContext.java b/src/net/sourceforge/plantuml/tim/TContext.java index 23c43aa07..7f789424a 100644 --- a/src/net/sourceforge/plantuml/tim/TContext.java +++ b/src/net/sourceforge/plantuml/tim/TContext.java @@ -122,6 +122,7 @@ import net.sourceforge.plantuml.tim.stdlib.Lower; import net.sourceforge.plantuml.tim.stdlib.Newline; import net.sourceforge.plantuml.tim.stdlib.Now; import net.sourceforge.plantuml.tim.stdlib.Ord; +import net.sourceforge.plantuml.tim.stdlib.Random; import net.sourceforge.plantuml.tim.stdlib.RetrieveProcedure; import net.sourceforge.plantuml.tim.stdlib.ReverseColor; import net.sourceforge.plantuml.tim.stdlib.ReverseHsluvColor; @@ -208,6 +209,7 @@ public class TContext { functionsSet.addFunction(new LogicalNor()); functionsSet.addFunction(new LogicalNxor()); functionsSet.addFunction(new Ord()); + functionsSet.addFunction(new Random()); // %standard_exists_function // %str_replace // !exit diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Random.java b/src/net/sourceforge/plantuml/tim/stdlib/Random.java new file mode 100644 index 000000000..51e0accdf --- /dev/null +++ b/src/net/sourceforge/plantuml/tim/stdlib/Random.java @@ -0,0 +1,67 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.tim.stdlib; + +import java.util.List; +import java.util.Map; +import java.util.Set; + +import net.sourceforge.plantuml.tim.EaterException; +import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.TContext; +import net.sourceforge.plantuml.tim.TFunctionSignature; +import net.sourceforge.plantuml.tim.TMemory; +import net.sourceforge.plantuml.tim.expression.TValue; +import net.sourceforge.plantuml.utils.LineLocation; + +public class Random extends SimpleReturnFunction { + + public TFunctionSignature getSignature() { + return new TFunctionSignature("%random", 1); + } + + public boolean canCover(int nbArg, Set namedArgument) { + return nbArg == 1; + } + + public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + Map named) throws EaterException, EaterExceptionLocated { + if (values.get(0).isNumber()) { + final int limit = values.get(0).toInt(); + return TValue.fromInt((int) (Math.random() * limit)); + } + return TValue.fromInt(0); + } +} diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index 029ed51d6..dcbf669b6 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -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.2024.0"; + private static final String version = "1.2024.1beta1"; public static String versionString() { return version; From 9e18d34936adbb8848e9c2c46097617705be3449 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Thu, 1 Feb 2024 23:10:43 +0100 Subject: [PATCH 55/95] Update and rename Random.java to RandomFunction.java Feat: improve to accept 0, 1, 2 args --- .../{Random.java => RandomFunction.java} | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) rename src/net/sourceforge/plantuml/tim/stdlib/{Random.java => RandomFunction.java} (75%) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Random.java b/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java similarity index 75% rename from src/net/sourceforge/plantuml/tim/stdlib/Random.java rename to src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java index 51e0accdf..915779c9c 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Random.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java @@ -36,6 +36,7 @@ package net.sourceforge.plantuml.tim.stdlib; import java.util.List; import java.util.Map; +import java.util.Random; import java.util.Set; import net.sourceforge.plantuml.tim.EaterException; @@ -46,22 +47,35 @@ import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; import net.sourceforge.plantuml.utils.LineLocation; -public class Random extends SimpleReturnFunction { +public class RandomFunction extends SimpleReturnFunction { public TFunctionSignature getSignature() { - return new TFunctionSignature("%random", 1); + return new TFunctionSignature("%random", 2); } public boolean canCover(int nbArg, Set namedArgument) { - return nbArg == 1; + return nbArg == 0 || nbArg == 1 || nbArg == 2; } + final Random random = new Random(); + public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { - if (values.get(0).isNumber()) { - final int limit = values.get(0).toInt(); - return TValue.fromInt((int) (Math.random() * limit)); + switch (values.size()) { + case 0: + return TValue.fromInt(random.nextInt(2)); + + case 1: + final Integer mx = values.get(0).toInt(); + return TValue.fromInt(random.nextInt(mx)); + + case 2: + final Integer min = values.get(0).toInt(); + final Integer max = values.get(1).toInt(); + return TValue.fromInt(random.nextInt(max - min) + min); + + default: + throw EaterException.located("Error on Random: Too many argument"); } - return TValue.fromInt(0); } } From 376ee9d8c212c6814f1d7152d0377a323f3300fd Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Thu, 1 Feb 2024 23:13:41 +0100 Subject: [PATCH 56/95] Update `TContext.java` with `RandomFunction` --- src/net/sourceforge/plantuml/tim/TContext.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net/sourceforge/plantuml/tim/TContext.java b/src/net/sourceforge/plantuml/tim/TContext.java index 7f789424a..b5eeeac68 100644 --- a/src/net/sourceforge/plantuml/tim/TContext.java +++ b/src/net/sourceforge/plantuml/tim/TContext.java @@ -209,7 +209,7 @@ public class TContext { functionsSet.addFunction(new LogicalNor()); functionsSet.addFunction(new LogicalNxor()); functionsSet.addFunction(new Ord()); - functionsSet.addFunction(new Random()); + functionsSet.addFunction(new RandomFunction()); // %standard_exists_function // %str_replace // !exit From c10ac1769d85ac17909d8f0a4fe21b2cd4628a7d Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Thu, 1 Feb 2024 23:31:08 +0100 Subject: [PATCH 57/95] fix: import the file `RandomFunction` --- src/net/sourceforge/plantuml/tim/TContext.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net/sourceforge/plantuml/tim/TContext.java b/src/net/sourceforge/plantuml/tim/TContext.java index b5eeeac68..af2db5c95 100644 --- a/src/net/sourceforge/plantuml/tim/TContext.java +++ b/src/net/sourceforge/plantuml/tim/TContext.java @@ -122,7 +122,7 @@ import net.sourceforge.plantuml.tim.stdlib.Lower; import net.sourceforge.plantuml.tim.stdlib.Newline; import net.sourceforge.plantuml.tim.stdlib.Now; import net.sourceforge.plantuml.tim.stdlib.Ord; -import net.sourceforge.plantuml.tim.stdlib.Random; +import net.sourceforge.plantuml.tim.stdlib.RandomFunction; import net.sourceforge.plantuml.tim.stdlib.RetrieveProcedure; import net.sourceforge.plantuml.tim.stdlib.ReverseColor; import net.sourceforge.plantuml.tim.stdlib.ReverseHsluvColor; From 23c86ba5b9ae435b8a718ffdde5f082d6f561a34 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Thu, 1 Feb 2024 22:36:05 +0000 Subject: [PATCH 58/95] Improve `Chronology diagram` management Adding `Chronology diagram` on: - Syntax - Sub-diagram - Readme --- README.md | 1 + src/net/sourceforge/plantuml/EmbeddedDiagram.java | 3 +++ src/net/sourceforge/plantuml/syntax/LanguageDescriptor.java | 2 ++ 3 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 94a914390..ed53dcb1e 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,7 @@ PlantUML is a component that allows you to create various UML diagrams through s - [SDL (Specification and Description Language)](http://plantuml.com/activity-diagram-beta#sdl) - [Ditaa diagram](http://plantuml.com/ditaa) - [Gantt diagram](http://plantuml.com/gantt-diagram) + - [Chronology diagram](http://plantuml.com/chronology-diagram) - [MindMap diagram](http://plantuml.com/mindmap-diagram) - [WBS (Work Breakdown Structure)](http://plantuml.com/wbs-diagram) - [Mathematical Notations (AsciiMath, JLaTeXMath)](http://plantuml.com/ascii-math) diff --git a/src/net/sourceforge/plantuml/EmbeddedDiagram.java b/src/net/sourceforge/plantuml/EmbeddedDiagram.java index 9543cdd91..6cdd7abed 100644 --- a/src/net/sourceforge/plantuml/EmbeddedDiagram.java +++ b/src/net/sourceforge/plantuml/EmbeddedDiagram.java @@ -119,6 +119,9 @@ public class EmbeddedDiagram extends AbstractTextBlock implements Line, Atom { if (s.equals(EMBEDDED_START + "files")) return "files"; + if (s.equals(EMBEDDED_START + "chronology")) + return "chronology"; + return null; } diff --git a/src/net/sourceforge/plantuml/syntax/LanguageDescriptor.java b/src/net/sourceforge/plantuml/syntax/LanguageDescriptor.java index a0a414d4f..597b5b2e7 100644 --- a/src/net/sourceforge/plantuml/syntax/LanguageDescriptor.java +++ b/src/net/sourceforge/plantuml/syntax/LanguageDescriptor.java @@ -123,6 +123,7 @@ public class LanguageDescriptor { keyword.add("@startebnf"); keyword.add("@startregex"); keyword.add("@startfiles"); + keyword.add("@startchronology"); keyword.add("@endwire"); keyword.add("@endbpm"); keyword.add("@enduml"); @@ -150,6 +151,7 @@ public class LanguageDescriptor { keyword.add("@endebnf"); keyword.add("@endregex"); keyword.add("@endfiles"); + keyword.add("@endchronology"); keyword.add("as"); keyword.add("also"); keyword.add("autonumber"); From 3bd3edb7402e09a4a33b9a12b267faf05d838c3f Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Sat, 3 Feb 2024 14:06:49 +0000 Subject: [PATCH 59/95] feat: `Random` function: add test and private declaration Add: - `RandomFunctionTest` test file - private declaration for random lib. Ref.: - #1667 Improve: - https://github.com/plantuml/plantuml/commit/dbaf8ac2cd50f04ac4ec4309e7dadae234ea8375 - #1668 --- .../plantuml/tim/stdlib/RandomFunction.java | 2 +- .../tim/stdlib/RandomFuntionTest.java | 50 +++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 test/net/sourceforge/plantuml/tim/stdlib/RandomFuntionTest.java diff --git a/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java b/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java index 915779c9c..d33a0af09 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java @@ -57,7 +57,7 @@ public class RandomFunction extends SimpleReturnFunction { return nbArg == 0 || nbArg == 1 || nbArg == 2; } - final Random random = new Random(); + private final Random random = new Random(); public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { diff --git a/test/net/sourceforge/plantuml/tim/stdlib/RandomFuntionTest.java b/test/net/sourceforge/plantuml/tim/stdlib/RandomFuntionTest.java new file mode 100644 index 000000000..c8505449e --- /dev/null +++ b/test/net/sourceforge/plantuml/tim/stdlib/RandomFuntionTest.java @@ -0,0 +1,50 @@ +package net.sourceforge.plantuml.tim.stdlib; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.util.Arrays; +import java.util.Collections; + +import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; +import org.junit.jupiter.api.IndicativeSentencesGeneration; +import org.junit.jupiter.api.RepeatedTest; + +import net.sourceforge.plantuml.tim.EaterException; +import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.TFunction; +import net.sourceforge.plantuml.tim.expression.TValue; + +/** + * Tests the builtin function. + */ +@IndicativeSentencesGeneration(separator = ": ", generator = ReplaceUnderscores.class) + +class RandomFunctionTest { + TFunction cut = new RandomFunction(); + final String cutName = "Random"; + final String repetitionLabel = "[{currentRepetition}/{totalRepetitions}] "; + + @RepeatedTest(value = 10, name = repetitionLabel + cutName + "()") + void test_with_no_argument() throws EaterException, EaterExceptionLocated { + final TValue tValue = cut.executeReturnFunction(null, null, null, Collections.emptyList(), null); + assertThat(tValue.toInt()).isIn(0, 1); + } + + @RepeatedTest(value = 10, name = repetitionLabel + cutName + "(7)") + void test_with_one_argument() throws EaterException, EaterExceptionLocated { + final TValue tValue = cut.executeReturnFunction(null, null, null, Arrays.asList(TValue.fromInt(7)), null); + assertThat(tValue.toInt()).isBetween(0, 7-1); + } + + @RepeatedTest(value = 10, name = repetitionLabel + cutName + "(0, 7)") + void test_with_two_argument_first_zero() throws EaterException, EaterExceptionLocated { + final TValue tValue = cut.executeReturnFunction(null, null, null, Arrays.asList(TValue.fromInt(0), TValue.fromInt(7)), null); + assertThat(tValue.toInt()).isBetween(0, 7-1); + } + + @RepeatedTest(value = 10, name = repetitionLabel + cutName + "(3, 7)") + void test_with_two_argument() throws EaterException, EaterExceptionLocated { + final TValue tValue = cut.executeReturnFunction(null, null, null, Arrays.asList(TValue.fromInt(3), TValue.fromInt(7)), null); + assertThat(tValue.toInt()).isBetween(3, 7-1); + } +} \ No newline at end of file From 1690ca3cc315cd2a8821cf0eeb4461e8e660d489 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 02:49:43 +0000 Subject: [PATCH 60/95] chore(deps): bump org.assertj:assertj-core from 3.24.2 to 3.25.3 Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.24.2 to 3.25.3. - [Release notes](https://github.com/assertj/assertj/releases) - [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.24.2...assertj-build-3.25.3) --- updated-dependencies: - dependency-name: org.assertj:assertj-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build.gradle.kts | 2 +- plantuml-asl/build.gradle.kts | 2 +- plantuml-bsd/build.gradle.kts | 2 +- plantuml-epl/build.gradle.kts | 2 +- plantuml-gplv2/build.gradle.kts | 2 +- plantuml-lgpl/build.gradle.kts | 2 +- plantuml-mit/build.gradle.kts | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 6aa48b2dd..e251ee2f9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -31,7 +31,7 @@ dependencies { compileOnly("org.apache.ant:ant:1.10.14") testImplementation("io.github.glytching:junit-extensions:2.6.0") - testImplementation("org.assertj:assertj-core:3.24.2") + testImplementation("org.assertj:assertj-core:3.25.3") testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") testImplementation("org.xmlunit:xmlunit-core:2.9.+") if (JavaVersion.current().isJava8) { diff --git a/plantuml-asl/build.gradle.kts b/plantuml-asl/build.gradle.kts index b27324b28..d6ed938b7 100644 --- a/plantuml-asl/build.gradle.kts +++ b/plantuml-asl/build.gradle.kts @@ -25,7 +25,7 @@ java { dependencies { compileOnly("org.apache.ant:ant:1.10.14") - testImplementation("org.assertj:assertj-core:3.24.2") + testImplementation("org.assertj:assertj-core:3.25.3") testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") testImplementation("org.scilab.forge:jlatexmath:1.0.7") testImplementation("org.xmlunit:xmlunit-core:2.9.+") diff --git a/plantuml-bsd/build.gradle.kts b/plantuml-bsd/build.gradle.kts index f57ec2fe1..63ae98403 100644 --- a/plantuml-bsd/build.gradle.kts +++ b/plantuml-bsd/build.gradle.kts @@ -25,7 +25,7 @@ java { dependencies { compileOnly("org.apache.ant:ant:1.10.14") - testImplementation("org.assertj:assertj-core:3.24.2") + testImplementation("org.assertj:assertj-core:3.25.3") testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") testImplementation("org.scilab.forge:jlatexmath:1.0.7") } diff --git a/plantuml-epl/build.gradle.kts b/plantuml-epl/build.gradle.kts index 5d0683378..eb88ac5ec 100644 --- a/plantuml-epl/build.gradle.kts +++ b/plantuml-epl/build.gradle.kts @@ -25,7 +25,7 @@ java { dependencies { compileOnly("org.apache.ant:ant:1.10.14") - testImplementation("org.assertj:assertj-core:3.24.2") + testImplementation("org.assertj:assertj-core:3.25.3") testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") testImplementation("org.scilab.forge:jlatexmath:1.0.7") testImplementation("org.xmlunit:xmlunit-core:2.9.+") diff --git a/plantuml-gplv2/build.gradle.kts b/plantuml-gplv2/build.gradle.kts index e5903f8ba..31c5670e4 100644 --- a/plantuml-gplv2/build.gradle.kts +++ b/plantuml-gplv2/build.gradle.kts @@ -25,7 +25,7 @@ java { dependencies { compileOnly("org.apache.ant:ant:1.10.14") - testImplementation("org.assertj:assertj-core:3.24.2") + testImplementation("org.assertj:assertj-core:3.25.3") testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") testImplementation("org.scilab.forge:jlatexmath:1.0.7") testImplementation("org.xmlunit:xmlunit-core:2.9.+") diff --git a/plantuml-lgpl/build.gradle.kts b/plantuml-lgpl/build.gradle.kts index 5f6ebfd67..79b38afc5 100644 --- a/plantuml-lgpl/build.gradle.kts +++ b/plantuml-lgpl/build.gradle.kts @@ -25,7 +25,7 @@ java { dependencies { compileOnly("org.apache.ant:ant:1.10.14") - testImplementation("org.assertj:assertj-core:3.24.2") + testImplementation("org.assertj:assertj-core:3.25.3") testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") testImplementation("org.scilab.forge:jlatexmath:1.0.7") testImplementation("org.xmlunit:xmlunit-core:2.9.+") diff --git a/plantuml-mit/build.gradle.kts b/plantuml-mit/build.gradle.kts index 4d3655bfa..bf9d48878 100644 --- a/plantuml-mit/build.gradle.kts +++ b/plantuml-mit/build.gradle.kts @@ -25,7 +25,7 @@ java { dependencies { compileOnly("org.apache.ant:ant:1.10.14") - testImplementation("org.assertj:assertj-core:3.24.2") + testImplementation("org.assertj:assertj-core:3.25.3") testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") testImplementation("org.scilab.forge:jlatexmath:1.0.7") testImplementation("org.xmlunit:xmlunit-core:2.9.+") From 81e1c967c37f5377ae960b7aff553e26b8c4d0c1 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Tue, 6 Feb 2024 23:02:32 +0100 Subject: [PATCH 61/95] feat: add eip in standard library https://github.com/plantuml/plantuml-stdlib/issues/88 --- stdlib/eip-abx.repx | Bin 0 -> 4370 bytes stdlib/eip-dex.repx | Bin 0 -> 11993 bytes stdlib/home.repx | 1 + 3 files changed, 1 insertion(+) create mode 100644 stdlib/eip-abx.repx create mode 100644 stdlib/eip-dex.repx diff --git a/stdlib/eip-abx.repx b/stdlib/eip-abx.repx new file mode 100644 index 0000000000000000000000000000000000000000..79df260821ee82d92ddc7fff5d89daedb0a8747f GIT binary patch literal 4370 zcmV+t5$*09u4@s+d=pVg3IOOV$jRu_0h2lWm!79sS+UyG?1JJVJX}PJa2O#&Zu|f3 zXWlJ1q`;dGm@M-I@P}{`UI11-zN)rLRLc6M>WgW7Kc(|aX{Bs9%EZaM&;Y|Ce|gx( z{OVw>%~*PmU|rgmn)%rxNlEvr09{q)90$v7$|C<3*0bL*h2A#64?Bfs9%)b_ew zIpZ=iB4&GQ=6toRr>A{f+(SL?2or(=LT- zbAJCAKjYaXUajAs@Sn%9C^+mtwe2-OU%~V-B7HAH^M7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q7QJQIu$;CWbdg(!it%HW4M*PhG5~$4ZwG rZK6?XVDnV)6fmBO!oa5Uv=Qq$Np45{wSyAE8YgCK&*p4cfmi Date: Wed, 7 Feb 2024 22:51:18 +0100 Subject: [PATCH 62/95] feat: improve standard library https://github.com/plantuml/plantuml-stdlib/issues/88 https://github.com/plantuml/plantuml-stdlib/pull/90 https://github.com/plantuml/plantuml-stdlib/pull/91 --- stdlib/edgy-abx.repx | Bin 3897 -> 3908 bytes stdlib/gcp-abx.repx | Bin 0 -> 6974 bytes stdlib/gcp-dex.repx | Bin 0 -> 17777 bytes stdlib/home.repx | 1 + 4 files changed, 1 insertion(+) create mode 100644 stdlib/gcp-abx.repx create mode 100644 stdlib/gcp-dex.repx diff --git a/stdlib/edgy-abx.repx b/stdlib/edgy-abx.repx index 4500959ddf04ef9d69500c2398e123eb712c3fc6..d3ea483fefa99f4b6120c9abc002e605528651eb 100644 GIT binary patch literal 3908 zcmV-K54-Ri6lPJBP*!3@b!eawRig_4S{Cqzs^Q;|aTst+u)IXr%*uWoQMT6VANJ`l zy<|hd9YlyDwDb}Ep-#J&RYpZ|-<468?XXiov=apicI)X)_bbcrp_3E<3Eun`K1cf_r*Y7G;v8ahit7FLwSG$OUe8 z!Gm*pegUn@_W#e-+wz-zWs)lk=zu0kfsLq9$-D0*J9z{6XV2`GW=lLJcsI$N%;p1t zDzf~oV-T)FqO2t2Dk~JSue62!^^BLH(&nR=sUMaD98ZW}vYais+o*4Bkm_B-mV=79 zt8bJ2SpF17y$~duG~GELTdefe(9w zM-hgvW>~+X*ZVs?tmN;?L6cgMFMa}=cF9XFH%!QPpR|S-eqn6lEY|`JLq0Mn4jb5x zS|<5GQl}##eP2qQXg>Ko{setcef2#kb)t*hxVcTc;VV*tje1;TJ^mN8v_sU%SCco% z8wy12X+evN3-fFM?S!$1ZX)N4-;6P=$z5GY0+cg$%@~w8D?WXv4UXVU)eDPUJ?kdg z<73dYDY(Jd!0bFfyU4oLM@Q`07WqIhRt6DL4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Su$F4SE_Dwkdp<_X~U&=p&V zW+#keusY!sh{%)uEYGsbH$~F2Y+6_Q6 zXuO)g0El%{yim2;8ZoXcSc1)ko-jOgRGbq_|R_5K^xCNbm>OSm8A1z_b|T(>bq{a z>m07{P5|cO;oK!17$F;1lW9kIsw)k92Em`BFYq4jp=Foa?oNN16<>K+F~TYk%L_I$ z0@`mef96JS)01z_GzNxdAe?DGQ9}AlbOX%!jtf!5K}zn_VAGr0pk=r#K512%5uUjT z2Q4Z`42gtgV~oS|d{2iMRjg*#2o1_^%Cf4Ks}!yQIIThw+xyxH@Thb zG*Zb}6`Bq+JKLsFknO3zN?QtqHM#d!c*NZRv048OBDws%r>BAl`E_?(ntD$gp1&Yw zj3>eLM8HBn^!$KWUFMn^odit55oZ2$N#u%rGgCm58Ao*7Ubn7dUwCQUmQR-ISWRzm zG#-zygPQ?D^a|gv;onf#^;a0g6nOp|$WtoJZ- z-R}d?_1*w544{f%3pKF@bpvnz9TmR|{XW)y9gMXfFh)KgnL+T}2ypgMwD`RWyg{h^ z?L?Nll3@R&Al#b-ZaTWwFuJ*Z8F>2T6!fIL$C3d$?|Rq4cz-i)t7EKn(74W6fq(lp zohyJp^Y1!bet$rJpzkH|)h(9>-Vz(+~ycHbBVoEPm#yf+zOTDpmcz2`!cO>Ea(0Mo_VS(b_6w$kNpl5_G I!v}zV=mZ@@vH$=8 literal 0 HcmV?d00001 diff --git a/stdlib/home.repx b/stdlib/home.repx index 8efc6813d..0c294ef9a 100644 --- a/stdlib/home.repx +++ b/stdlib/home.repx @@ -11,6 +11,7 @@ domainstory edgy eip elastic +gcp kubernetes logos material From 1c0c7d828c276ad6ffe034a677e4083f3b7c95b8 Mon Sep 17 00:00:00 2001 From: "Artem V. Ageev" Date: Thu, 8 Feb 2024 20:36:50 +0200 Subject: [PATCH 63/95] Add files via upload --- themes/puml-theme-sunlust.puml | 130 +++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 themes/puml-theme-sunlust.puml diff --git a/themes/puml-theme-sunlust.puml b/themes/puml-theme-sunlust.puml new file mode 100644 index 000000000..9f80e9b3e --- /dev/null +++ b/themes/puml-theme-sunlust.puml @@ -0,0 +1,130 @@ +@startuml +!$THEME = 'sunlust' +!if %not(%variable_exists("$BGCOLOR")) +!$BGCOLOR = '#fdf6e3' +!endif +scale max 2000 * 2000 +!$colors = { + "font" : "#657b83", + "bg" : "#fdf6e3", + "yellow" : "#b58900", + "yellow_bg" : "#BUSINESS", + "orange" : "#cb4b16", + "orange_bg" : "#STRATEGY", + "red" : "#dc322f", + "red_bg" : "#IMPLEMENTATION", + "violet" : "#6c71c4", + "violet_bg" : "#MOTIVATION", + "blue" : "#268bd2", + "blue_bg" : "#APPLICATION", + "green" : "#859900", + "green_bg" : "#TECHNOLOGY" +} +!$shapes = { + "TECHNOLOGY" : { + "color" : "#859900", + "shapes" : [ "Node", "File"] + }, + "APPLICATION" : { + "color" : "#268bd2", + "shapes" : [ "Participant", "Rectangle", "Component" ] + }, + "BUSINESS" : { + "color" : "#b58900", + "shapes" : [ "Actor", "Note", "Hexagon", "Boundary", "Control", "Entity" ] + }, + "IMPLEMENTATION" : { + "color" : "#dc322f", + "shapes" : [ "Class", "Map", "Json" ] + }, + "MOTIVATION" : { + "color" : "#6c71c4", + "shapes" : [ "Cloud", "Frame", "Collections", "Database", "Queue" ] + }, + "STRATEGY" : { + "color" : "#STRATEGY", + "shapes" : [ "Partition", "Folder", "Card" ] + } +} +!$thickness = 2 + +skinparam { + noteTextAlignment left + actorStyle awesome + Dpi 100 + Shadowing false + BackgroundColor $colors.bg + WrapWidth 200 + RoundCorner 15 + Swimlane { + BorderColor $colors.font + Thickness $thickness + WrapTitleWidth 150 + } + Arrow { + Color $colors.font + Thickness $thickness + } + Default { + TextAlignment center + FontName Dejavu Serif + } + Legend { + FontName VL Gothic + BorderColor transparent + BackgroundColor transparent + } + Sequence { + MessageAlign direction + ArrowThickness $thickness + LifeLineBorderColor $colors.yellow + BoxBorderThickness $thickness + } + !foreach $shape in %splitstr('Activity.State', '.') + $shape { + BackgroundColor transparent + Border { + Color $colors.violet + Thickness $thickness + } + Diamond { + BorderColor $colors.red + BackgroundColor transparent + } + } + !endfor + !foreach $key in %get_json_keys($shapes) + !foreach $shape in $shapes[$key].shapes + $shape { + BackgroundColor #$key + Border { + Color $shapes[$key].color + Thickness $thickness + } + } + !endfor + !endfor +} +@enduml From 68fdb662fe24ccd7e361befa3da37f43a0b959c9 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Thu, 8 Feb 2024 22:37:13 +0100 Subject: [PATCH 64/95] chore: version 1.2024.1 --- gradle.properties | 2 +- src/net/sourceforge/plantuml/version/Version.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index c1112c317..a6470a4d8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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.2024.1beta1 +version = 1.2024.1 org.gradle.workers.max = 3 \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index dcbf669b6..c7ebef382 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -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.2024.1beta1"; + private static final String version = "1.2024.1"; public static String versionString() { return version; From 0ba45e079687bc360c8c5a2d65f41eb38e05e857 Mon Sep 17 00:00:00 2001 From: "Artem V. Ageev" Date: Fri, 9 Feb 2024 11:28:11 +0200 Subject: [PATCH 65/95] Update puml-theme-sunlust.puml add Description theme --- themes/puml-theme-sunlust.puml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/themes/puml-theme-sunlust.puml b/themes/puml-theme-sunlust.puml index 9f80e9b3e..8ea47681d 100644 --- a/themes/puml-theme-sunlust.puml +++ b/themes/puml-theme-sunlust.puml @@ -1,4 +1,9 @@ @startuml +'' NAME = Sunlust +'' DESCRIPTION = sunlust theme based off of the [solarized theme](https://ethanschoonover.com/solarized) +'' AUTHOR = Artem V. Ageev +'' LICENCE = GPL 3+ + !$THEME = 'sunlust' !if %not(%variable_exists("$BGCOLOR")) !$BGCOLOR = '#fdf6e3' From d65951f520bc9c92c5644147e47146c9731c7536 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Sun, 11 Feb 2024 12:20:28 +0100 Subject: [PATCH 66/95] feat: Update C4-PlantUML to v2.9.0 https://github.com/plantuml/plantuml-stdlib/pull/93 --- gradle.properties | 2 +- .../sourceforge/plantuml/version/Version.java | 2 +- stdlib/c4-abx.repx | Bin 15559 -> 16046 bytes 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index a6470a4d8..faafaa448 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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.2024.1 +version = 1.2024.2beta1 org.gradle.workers.max = 3 \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index c7ebef382..9dc1f8365 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -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.2024.1"; + private static final String version = "1.2024.2beta1"; public static String versionString() { return version; diff --git a/stdlib/c4-abx.repx b/stdlib/c4-abx.repx index 24cd069abddb08baa9352d5793a58c3994da624f..10ef9117eb1b11a42125947a9d41157896ee4f4e 100644 GIT binary patch literal 16046 zcmV;fK2gD2zyl(R7~=r80olF@ce&dED5|WT01pE^8Mo9MB6K=q*U?jJQGA2wVklXZ zwU1>LU^mJaA-Mb2Kj{|VTN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1J|~stZ{94*M_;P-1zK3sPM;>IVQy4eDip z%4;BmoctJ48trCVW?Cy|FpGNKu?(k*LxVs$ov6rr$aE Date: Sun, 11 Feb 2024 19:43:14 +0100 Subject: [PATCH 67/95] fix: update graphviz version check pattern Right now, the `graphviz` version detection failed to match with `10.x.x`, thus relaxing the version check regex. Signed-off-by: Rui Chen --- src/net/sourceforge/plantuml/dot/GraphvizUtils.java | 2 +- src/net/sourceforge/plantuml/dot/GraphvizVersionFinder.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net/sourceforge/plantuml/dot/GraphvizUtils.java b/src/net/sourceforge/plantuml/dot/GraphvizUtils.java index 803023cbc..23261f328 100644 --- a/src/net/sourceforge/plantuml/dot/GraphvizUtils.java +++ b/src/net/sourceforge/plantuml/dot/GraphvizUtils.java @@ -197,7 +197,7 @@ public class GraphvizUtils { if (s == null) return -1; - final Pattern p = Pattern.compile("\\s(\\d)\\.(\\d\\d?)\\D"); + final Pattern p = Pattern.compile("\\s(\\d+)\\.(\\d\\d?)\\D"); final Matcher m = p.matcher(s); if (m.find() == false) return -1; diff --git a/src/net/sourceforge/plantuml/dot/GraphvizVersionFinder.java b/src/net/sourceforge/plantuml/dot/GraphvizVersionFinder.java index 8a58e7b25..706bb5f0a 100644 --- a/src/net/sourceforge/plantuml/dot/GraphvizVersionFinder.java +++ b/src/net/sourceforge/plantuml/dot/GraphvizVersionFinder.java @@ -73,7 +73,7 @@ public class GraphvizVersionFinder { public GraphvizVersion getVersion() { final String dotVersion = dotVersion(); - final Pattern p = Pattern.compile("(\\d)\\.(\\d\\d?)"); + final Pattern p = Pattern.compile("(\\d+)\\.(\\d\\d?)"); final Matcher m = p.matcher(dotVersion); final boolean find = m.find(); if (find == false) From e11d974ce59f217abf6d76bc1c6845d8a8180a22 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Mon, 12 Feb 2024 19:13:02 +0000 Subject: [PATCH 68/95] refactor: place `net.sourceforge.plantuml.test` on `test.utils` Create `test` folder with: - `example` - `utils` And put all `net.sourceforge.plantuml.test` on `test.utils`. _[no other change]_ --- test/net/sourceforge/plantuml/LoadJsonTest.java | 2 +- test/net/sourceforge/plantuml/TestFileDirOption.java | 2 +- test/net/sourceforge/plantuml/tim/stdlib/FeatureTest.java | 2 +- .../net/sourceforge/plantuml/tim/stdlib/GetJsonKeyTest.java | 2 +- .../sourceforge/plantuml/tim/stdlib/GetJsonTypeTest.java | 2 +- test/net/sourceforge/plantuml/tim/stdlib/LowerTest.java | 2 +- test/net/sourceforge/plantuml/tim/stdlib/SizeTest.java | 2 +- test/net/sourceforge/plantuml/tim/stdlib/UpperTest.java | 2 +- .../plantuml/tim/stdlib/_TemplateStdlibTest.template | 2 +- .../TestHelper.java => test/example/TestExample.java} | 6 +++--- .../plantuml/test => test/utils}/ImageTestUtils.java | 2 +- .../plantuml/test => test/utils}/ImageTestUtilsTest.java | 6 +++--- .../plantuml/test => test/utils}/JunitUtils.java | 2 +- .../plantuml/test => test/utils}/PlantUmlTestUtils.java | 2 +- .../plantuml/test => test/utils}/StringTestUtils.java | 2 +- .../sourceforge/plantuml/test => test/utils}/TestUtils.java | 2 +- 16 files changed, 20 insertions(+), 20 deletions(-) rename test/{testhelper/TestHelper.java => test/example/TestExample.java} (76%) rename test/{net/sourceforge/plantuml/test => test/utils}/ImageTestUtils.java (98%) rename test/{net/sourceforge/plantuml/test => test/utils}/ImageTestUtilsTest.java (93%) rename test/{net/sourceforge/plantuml/test => test/utils}/JunitUtils.java (95%) rename test/{net/sourceforge/plantuml/test => test/utils}/PlantUmlTestUtils.java (98%) rename test/{net/sourceforge/plantuml/test => test/utils}/StringTestUtils.java (96%) rename test/{net/sourceforge/plantuml/test => test/utils}/TestUtils.java (89%) diff --git a/test/net/sourceforge/plantuml/LoadJsonTest.java b/test/net/sourceforge/plantuml/LoadJsonTest.java index cd5302be7..3ff4c3bb9 100644 --- a/test/net/sourceforge/plantuml/LoadJsonTest.java +++ b/test/net/sourceforge/plantuml/LoadJsonTest.java @@ -1,9 +1,9 @@ package net.sourceforge.plantuml; import static java.nio.charset.StandardCharsets.UTF_8; -import static net.sourceforge.plantuml.test.TestUtils.writeUtf8File; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.util.Lists.newArrayList; +import static test.utils.TestUtils.writeUtf8File; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; diff --git a/test/net/sourceforge/plantuml/TestFileDirOption.java b/test/net/sourceforge/plantuml/TestFileDirOption.java index d68165ef6..5e71d1937 100644 --- a/test/net/sourceforge/plantuml/TestFileDirOption.java +++ b/test/net/sourceforge/plantuml/TestFileDirOption.java @@ -1,9 +1,9 @@ package net.sourceforge.plantuml; import static java.nio.charset.StandardCharsets.UTF_8; -import static net.sourceforge.plantuml.test.TestUtils.writeUtf8File; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.util.Lists.newArrayList; +import static test.utils.TestUtils.writeUtf8File; import java.io.BufferedOutputStream; import java.io.ByteArrayInputStream; diff --git a/test/net/sourceforge/plantuml/tim/stdlib/FeatureTest.java b/test/net/sourceforge/plantuml/tim/stdlib/FeatureTest.java index 74bdf712a..52507fb51 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/FeatureTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/FeatureTest.java @@ -1,8 +1,8 @@ package net.sourceforge.plantuml.tim.stdlib; -import static net.sourceforge.plantuml.test.JunitUtils.StringJsonConverter; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput; +import static test.utils.JunitUtils.StringJsonConverter; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; diff --git a/test/net/sourceforge/plantuml/tim/stdlib/GetJsonKeyTest.java b/test/net/sourceforge/plantuml/tim/stdlib/GetJsonKeyTest.java index c84f32bd8..80635e456 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/GetJsonKeyTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/GetJsonKeyTest.java @@ -1,8 +1,8 @@ package net.sourceforge.plantuml.tim.stdlib; -import static net.sourceforge.plantuml.test.JunitUtils.StringJsonConverter; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput; +import static test.utils.JunitUtils.StringJsonConverter; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; diff --git a/test/net/sourceforge/plantuml/tim/stdlib/GetJsonTypeTest.java b/test/net/sourceforge/plantuml/tim/stdlib/GetJsonTypeTest.java index 1b720c9e5..0fe35543c 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/GetJsonTypeTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/GetJsonTypeTest.java @@ -1,8 +1,8 @@ package net.sourceforge.plantuml.tim.stdlib; -import static net.sourceforge.plantuml.test.JunitUtils.StringJsonConverter; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput; +import static test.utils.JunitUtils.StringJsonConverter; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; diff --git a/test/net/sourceforge/plantuml/tim/stdlib/LowerTest.java b/test/net/sourceforge/plantuml/tim/stdlib/LowerTest.java index d149c26b9..3b50a2d30 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/LowerTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/LowerTest.java @@ -1,8 +1,8 @@ package net.sourceforge.plantuml.tim.stdlib; -import static net.sourceforge.plantuml.test.JunitUtils.StringJsonConverter; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput; +import static test.utils.JunitUtils.StringJsonConverter; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; diff --git a/test/net/sourceforge/plantuml/tim/stdlib/SizeTest.java b/test/net/sourceforge/plantuml/tim/stdlib/SizeTest.java index 137ff9bef..6bcfd105e 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/SizeTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/SizeTest.java @@ -1,8 +1,8 @@ package net.sourceforge.plantuml.tim.stdlib; -import static net.sourceforge.plantuml.test.JunitUtils.StringJsonConverter; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput; +import static test.utils.JunitUtils.StringJsonConverter; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; diff --git a/test/net/sourceforge/plantuml/tim/stdlib/UpperTest.java b/test/net/sourceforge/plantuml/tim/stdlib/UpperTest.java index 049f0b531..35c1e2e87 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/UpperTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/UpperTest.java @@ -1,8 +1,8 @@ package net.sourceforge.plantuml.tim.stdlib; -import static net.sourceforge.plantuml.test.JunitUtils.StringJsonConverter; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput; +import static test.utils.JunitUtils.StringJsonConverter; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; diff --git a/test/net/sourceforge/plantuml/tim/stdlib/_TemplateStdlibTest.template b/test/net/sourceforge/plantuml/tim/stdlib/_TemplateStdlibTest.template index a949f6023..d85b08db0 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/_TemplateStdlibTest.template +++ b/test/net/sourceforge/plantuml/tim/stdlib/_TemplateStdlibTest.template @@ -1,8 +1,8 @@ package net.sourceforge.plantuml.tim.stdlib; -import static net.sourceforge.plantuml.test.JunitUtils.StringJsonConverter; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput; +import static test.utils.JunitUtils.StringJsonConverter; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; diff --git a/test/testhelper/TestHelper.java b/test/test/example/TestExample.java similarity index 76% rename from test/testhelper/TestHelper.java rename to test/test/example/TestExample.java index 0a06fd1c8..1fc15a8d4 100644 --- a/test/testhelper/TestHelper.java +++ b/test/test/example/TestExample.java @@ -1,11 +1,11 @@ -package testhelper; +package test.example; -import static net.sourceforge.plantuml.test.PlantUmlTestUtils.exportDiagram; +import static test.utils.PlantUmlTestUtils.exportDiagram; import static org.assertj.core.api.Assertions.assertThat; import org.junit.jupiter.api.Test; -class TestHelper { +class TestExample { @Test public void test_help_themes() throws Exception { diff --git a/test/net/sourceforge/plantuml/test/ImageTestUtils.java b/test/test/utils/ImageTestUtils.java similarity index 98% rename from test/net/sourceforge/plantuml/test/ImageTestUtils.java rename to test/test/utils/ImageTestUtils.java index cd989f3a7..21dcd284a 100644 --- a/test/net/sourceforge/plantuml/test/ImageTestUtils.java +++ b/test/test/utils/ImageTestUtils.java @@ -1,4 +1,4 @@ -package net.sourceforge.plantuml.test; +package test.utils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/test/net/sourceforge/plantuml/test/ImageTestUtilsTest.java b/test/test/utils/ImageTestUtilsTest.java similarity index 93% rename from test/net/sourceforge/plantuml/test/ImageTestUtilsTest.java rename to test/test/utils/ImageTestUtilsTest.java index 5d96a85a7..c29cb1687 100644 --- a/test/net/sourceforge/plantuml/test/ImageTestUtilsTest.java +++ b/test/test/utils/ImageTestUtilsTest.java @@ -1,9 +1,9 @@ -package net.sourceforge.plantuml.test; +package test.utils; -import static net.sourceforge.plantuml.test.ImageTestUtils.assertImageSizeEqual; -import static net.sourceforge.plantuml.test.ImageTestUtils.assertImagesEqual; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; +import static test.utils.ImageTestUtils.assertImageSizeEqual; +import static test.utils.ImageTestUtils.assertImagesEqual; import java.awt.image.BufferedImage; diff --git a/test/net/sourceforge/plantuml/test/JunitUtils.java b/test/test/utils/JunitUtils.java similarity index 95% rename from test/net/sourceforge/plantuml/test/JunitUtils.java rename to test/test/utils/JunitUtils.java index 8064ba1fc..e0b6add41 100644 --- a/test/net/sourceforge/plantuml/test/JunitUtils.java +++ b/test/test/utils/JunitUtils.java @@ -1,4 +1,4 @@ -package net.sourceforge.plantuml.test; +package test.utils; import org.junit.jupiter.params.converter.ArgumentConversionException; import org.junit.jupiter.params.converter.SimpleArgumentConverter; diff --git a/test/net/sourceforge/plantuml/test/PlantUmlTestUtils.java b/test/test/utils/PlantUmlTestUtils.java similarity index 98% rename from test/net/sourceforge/plantuml/test/PlantUmlTestUtils.java rename to test/test/utils/PlantUmlTestUtils.java index e4bac23ce..f1f5774ad 100644 --- a/test/net/sourceforge/plantuml/test/PlantUmlTestUtils.java +++ b/test/test/utils/PlantUmlTestUtils.java @@ -1,4 +1,4 @@ -package net.sourceforge.plantuml.test; +package test.utils; import static java.nio.charset.StandardCharsets.UTF_8; import static org.assertj.core.api.Assertions.assertThat; diff --git a/test/net/sourceforge/plantuml/test/StringTestUtils.java b/test/test/utils/StringTestUtils.java similarity index 96% rename from test/net/sourceforge/plantuml/test/StringTestUtils.java rename to test/test/utils/StringTestUtils.java index 2248dc201..df3705a85 100644 --- a/test/net/sourceforge/plantuml/test/StringTestUtils.java +++ b/test/test/utils/StringTestUtils.java @@ -1,4 +1,4 @@ -package net.sourceforge.plantuml.test; +package test.utils; import static java.util.Objects.requireNonNull; diff --git a/test/net/sourceforge/plantuml/test/TestUtils.java b/test/test/utils/TestUtils.java similarity index 89% rename from test/net/sourceforge/plantuml/test/TestUtils.java rename to test/test/utils/TestUtils.java index 2506ddf4a..d381f545e 100644 --- a/test/net/sourceforge/plantuml/test/TestUtils.java +++ b/test/test/utils/TestUtils.java @@ -1,4 +1,4 @@ -package net.sourceforge.plantuml.test; +package test.utils; import static java.nio.charset.StandardCharsets.UTF_8; From e70f23b8fe8cc7ae5c296b16680da02dd0563f63 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Tue, 13 Feb 2024 11:04:02 +0000 Subject: [PATCH 69/95] refactor: Change `HelpTest` to `CommandHelpThemeTest` on a more accurate folder To continue: - #1655 Change `HelpTest.java` to `CommandHelpThemeTest.java` Put on a more accurate folder: - `net.sourceforge.plantuml.help` --- .../plantuml/help/CommandHelpThemeTest.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test/net/sourceforge/plantuml/help/CommandHelpThemeTest.java diff --git a/test/net/sourceforge/plantuml/help/CommandHelpThemeTest.java b/test/net/sourceforge/plantuml/help/CommandHelpThemeTest.java new file mode 100644 index 000000000..180522880 --- /dev/null +++ b/test/net/sourceforge/plantuml/help/CommandHelpThemeTest.java @@ -0,0 +1,23 @@ +package net.sourceforge.plantuml.help; + +import static org.assertj.core.api.Assertions.assertThat; +import static test.utils.PlantUmlTestUtils.exportDiagram; + +import org.junit.jupiter.api.Test; + +class CommandHelpThemeTest { + + @Test + public void command_help_theme() throws Exception { + + final String output = exportDiagram( + "@startuml", + "help themes", + "@enduml" + ).asString(); + + assertThat(output) + .startsWith(" \nHelp on themes") + .contains("bluegray", "hacker"); + } +} \ No newline at end of file From 7be48049ff8b059447eadecddbfd6eb29e914c64 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Tue, 13 Feb 2024 13:11:30 +0100 Subject: [PATCH 70/95] fix: emergency change to be compatible with `actions/labeler` v5 Emergency change to be compatible with `actions/labeler` v5 Observed on: - #1620 --- .github/labeler.yml | 58 +++++++++++++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 4f260b7ec..3924b988d 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,37 +1,55 @@ 'm:release': -- 'CHANGELOG.md' -- 'gradle.properties' +- changed-files: + - any-glob-to-any-file: + - 'CHANGELOG.md' + - 'gradle.properties' 'm:docs': -- '*.md' -- 'docs/**/*' +- changed-files: + - any-glob-to-any-file: + - '*.md' + - 'docs/**/*' 'm:workflow': -- .github/** +- changed-files: + - any-glob-to-any-file: + - .github/** 'm:gradle': -- 'gradle*' -- 'gradle/**' -- '**/settings.gradle.*' -- '**/build.gradle.*' -- 'sjpp.jar' +- changed-files: + - any-glob-to-any-file: + - 'gradle*' + - 'gradle/**' + - '**/settings.gradle.*' + - '**/build.gradle.*' + - 'sjpp.jar' 'm:source': -- 'skin/**/*' -- 'src/**/*' -- 'stdlib/**/*' -- 'svg/**/*' -- 'themes/**/*' -- 'manifest.txt' +- changed-files: + - any-glob-to-any-file: + - 'skin/**/*' + - 'src/**/*' + - 'stdlib/**/*' + - 'svg/**/*' + - 'themes/**/*' + - 'manifest.txt' 'm:test': -- 'test/**/*' +- changed-files: + - any-glob-to-any-file: + - 'test/**/*' 'm:license': -- '**/*license.txt' +- changed-files: + - any-glob-to-any-file: + - '**/*license.txt' 'm:docker': -- Dockerfile +- changed-files: + - any-glob-to-any-file: + - Dockerfile 'm:native': -- .github/workflows/native-image.yml +- changed-files: + - any-glob-to-any-file: + - .github/workflows/native-image.yml From af3c49c2aa29c903c89c6a1adaef58c7bdfe8188 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Tue, 13 Feb 2024 14:19:22 +0100 Subject: [PATCH 71/95] docs: fix links _(due to emoji)_ --- BUILDING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILDING.md b/BUILDING.md index 3c436bdb5..be2856729 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -2,7 +2,7 @@ Thank you for your interest in contributing to PlantUML! This guide will help you build the PlantUML project. -PlantUML can be built using either [Gradle](#building-plantuml-with-gradle) or [Ant](#building-plantuml-with-ant-alternative-method). It's recommended to use Gradle as the primary build tool for this project. You will find instructions for both methods, starting with Gradle. +PlantUML can be built using either [Gradle](#-building-plantuml-with-gradle) or [Ant](#-building-plantuml-with-ant-alternative-method). It's recommended to use Gradle as the primary build tool for this project. You will find instructions for both methods, starting with Gradle. ## ☕ Java Compatibility and Development Notes From ababa00835e04a9082690f4eca114b7c6f27d27f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Feb 2024 16:51:50 +0000 Subject: [PATCH 72/95] chore(deps): bump org.junit.jupiter:junit-jupiter from 5.10.1 to 5.10.2 Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.10.1 to 5.10.2. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.1...r5.10.2) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle.kts | 2 +- plantuml-asl/build.gradle.kts | 2 +- plantuml-bsd/build.gradle.kts | 2 +- plantuml-epl/build.gradle.kts | 2 +- plantuml-gplv2/build.gradle.kts | 2 +- plantuml-lgpl/build.gradle.kts | 2 +- plantuml-mit/build.gradle.kts | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index e251ee2f9..6b79adc39 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -32,7 +32,7 @@ dependencies { testImplementation("io.github.glytching:junit-extensions:2.6.0") testImplementation("org.assertj:assertj-core:3.25.3") - testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") + testImplementation("org.junit.jupiter:junit-jupiter:5.10.2") testImplementation("org.xmlunit:xmlunit-core:2.9.+") if (JavaVersion.current().isJava8) { testImplementation("org.mockito:mockito-core:4.+") diff --git a/plantuml-asl/build.gradle.kts b/plantuml-asl/build.gradle.kts index d6ed938b7..b4217ad15 100644 --- a/plantuml-asl/build.gradle.kts +++ b/plantuml-asl/build.gradle.kts @@ -26,7 +26,7 @@ java { dependencies { compileOnly("org.apache.ant:ant:1.10.14") testImplementation("org.assertj:assertj-core:3.25.3") - testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") + testImplementation("org.junit.jupiter:junit-jupiter:5.10.2") testImplementation("org.scilab.forge:jlatexmath:1.0.7") testImplementation("org.xmlunit:xmlunit-core:2.9.+") } diff --git a/plantuml-bsd/build.gradle.kts b/plantuml-bsd/build.gradle.kts index 63ae98403..393e7a45c 100644 --- a/plantuml-bsd/build.gradle.kts +++ b/plantuml-bsd/build.gradle.kts @@ -26,7 +26,7 @@ java { dependencies { compileOnly("org.apache.ant:ant:1.10.14") testImplementation("org.assertj:assertj-core:3.25.3") - testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") + testImplementation("org.junit.jupiter:junit-jupiter:5.10.2") testImplementation("org.scilab.forge:jlatexmath:1.0.7") } diff --git a/plantuml-epl/build.gradle.kts b/plantuml-epl/build.gradle.kts index eb88ac5ec..5bf7756f4 100644 --- a/plantuml-epl/build.gradle.kts +++ b/plantuml-epl/build.gradle.kts @@ -26,7 +26,7 @@ java { dependencies { compileOnly("org.apache.ant:ant:1.10.14") testImplementation("org.assertj:assertj-core:3.25.3") - testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") + testImplementation("org.junit.jupiter:junit-jupiter:5.10.2") testImplementation("org.scilab.forge:jlatexmath:1.0.7") testImplementation("org.xmlunit:xmlunit-core:2.9.+") } diff --git a/plantuml-gplv2/build.gradle.kts b/plantuml-gplv2/build.gradle.kts index 31c5670e4..c7df0ca29 100644 --- a/plantuml-gplv2/build.gradle.kts +++ b/plantuml-gplv2/build.gradle.kts @@ -26,7 +26,7 @@ java { dependencies { compileOnly("org.apache.ant:ant:1.10.14") testImplementation("org.assertj:assertj-core:3.25.3") - testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") + testImplementation("org.junit.jupiter:junit-jupiter:5.10.2") testImplementation("org.scilab.forge:jlatexmath:1.0.7") testImplementation("org.xmlunit:xmlunit-core:2.9.+") } diff --git a/plantuml-lgpl/build.gradle.kts b/plantuml-lgpl/build.gradle.kts index 79b38afc5..667667df0 100644 --- a/plantuml-lgpl/build.gradle.kts +++ b/plantuml-lgpl/build.gradle.kts @@ -26,7 +26,7 @@ java { dependencies { compileOnly("org.apache.ant:ant:1.10.14") testImplementation("org.assertj:assertj-core:3.25.3") - testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") + testImplementation("org.junit.jupiter:junit-jupiter:5.10.2") testImplementation("org.scilab.forge:jlatexmath:1.0.7") testImplementation("org.xmlunit:xmlunit-core:2.9.+") } diff --git a/plantuml-mit/build.gradle.kts b/plantuml-mit/build.gradle.kts index bf9d48878..d7e2cf555 100644 --- a/plantuml-mit/build.gradle.kts +++ b/plantuml-mit/build.gradle.kts @@ -26,7 +26,7 @@ java { dependencies { compileOnly("org.apache.ant:ant:1.10.14") testImplementation("org.assertj:assertj-core:3.25.3") - testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") + testImplementation("org.junit.jupiter:junit-jupiter:5.10.2") testImplementation("org.scilab.forge:jlatexmath:1.0.7") testImplementation("org.xmlunit:xmlunit-core:2.9.+") } From ab09e2ef1f48b0526c11a692345cc2f530c38ee8 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Wed, 14 Feb 2024 06:14:19 +0000 Subject: [PATCH 73/95] feat: add `%get_all_theme` builtin function --- .../sourceforge/plantuml/tim/TContext.java | 2 + .../plantuml/tim/stdlib/GetAllTheme.java | 76 +++++++++++++++++++ .../plantuml/tim/stdlib/GetTAllThemeTest.java | 30 ++++++++ 3 files changed, 108 insertions(+) create mode 100644 src/net/sourceforge/plantuml/tim/stdlib/GetAllTheme.java create mode 100644 test/net/sourceforge/plantuml/tim/stdlib/GetTAllThemeTest.java diff --git a/src/net/sourceforge/plantuml/tim/TContext.java b/src/net/sourceforge/plantuml/tim/TContext.java index af2db5c95..30f2f0b9f 100644 --- a/src/net/sourceforge/plantuml/tim/TContext.java +++ b/src/net/sourceforge/plantuml/tim/TContext.java @@ -97,6 +97,7 @@ import net.sourceforge.plantuml.tim.stdlib.Feature; import net.sourceforge.plantuml.tim.stdlib.FileExists; import net.sourceforge.plantuml.tim.stdlib.Filename; import net.sourceforge.plantuml.tim.stdlib.FunctionExists; +import net.sourceforge.plantuml.tim.stdlib.GetAllTheme; import net.sourceforge.plantuml.tim.stdlib.GetJsonKey; import net.sourceforge.plantuml.tim.stdlib.GetJsonType; import net.sourceforge.plantuml.tim.stdlib.GetVariableValue; @@ -210,6 +211,7 @@ public class TContext { functionsSet.addFunction(new LogicalNxor()); functionsSet.addFunction(new Ord()); functionsSet.addFunction(new RandomFunction()); + functionsSet.addFunction(new GetAllTheme()); // %standard_exists_function // %str_replace // !exit diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetAllTheme.java b/src/net/sourceforge/plantuml/tim/stdlib/GetAllTheme.java new file mode 100644 index 000000000..3446e6de8 --- /dev/null +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetAllTheme.java @@ -0,0 +1,76 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.tim.stdlib; + +import java.io.IOException; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import net.sourceforge.plantuml.log.Logme; +import net.sourceforge.plantuml.json.JsonArray; +import net.sourceforge.plantuml.theme.ThemeUtils; +import net.sourceforge.plantuml.tim.EaterException; +import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.TContext; +import net.sourceforge.plantuml.tim.TFunctionSignature; +import net.sourceforge.plantuml.tim.TMemory; +import net.sourceforge.plantuml.tim.expression.TValue; +import net.sourceforge.plantuml.utils.LineLocation; + +public class GetAllTheme extends SimpleReturnFunction { + + public TFunctionSignature getSignature() { + return new TFunctionSignature("%get_all_theme", 0); + } + + public boolean canCover(int nbArg, Set namedArgument) { + return nbArg == 0; + } + + public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + Map named) throws EaterException, EaterExceptionLocated { + final JsonArray result = new JsonArray(); + try { + for (String theme : ThemeUtils.getAllThemeNames()) { + result.add(theme); + } + return TValue.fromJson(result); + } catch (IOException e) { + Logme.error(e); + return TValue.fromJson(result); + } + } +} diff --git a/test/net/sourceforge/plantuml/tim/stdlib/GetTAllThemeTest.java b/test/net/sourceforge/plantuml/tim/stdlib/GetTAllThemeTest.java new file mode 100644 index 000000000..c17bc33d2 --- /dev/null +++ b/test/net/sourceforge/plantuml/tim/stdlib/GetTAllThemeTest.java @@ -0,0 +1,30 @@ +package net.sourceforge.plantuml.tim.stdlib; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.util.Collections; + +import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; +import org.junit.jupiter.api.IndicativeSentencesGeneration; +import org.junit.jupiter.api.Test; + +import net.sourceforge.plantuml.tim.EaterException; +import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.TFunction; +import net.sourceforge.plantuml.tim.expression.TValue; + +/** + * Tests the builtin function. + */ +@IndicativeSentencesGeneration(separator = ": ", generator = ReplaceUnderscores.class) + +class GetAllThemeTest { + TFunction cut = new GetAllTheme(); + final String cutName = "GetAllTheme"; + + @Test + void Test_without_Param() throws EaterException, EaterExceptionLocated { + final TValue tValue = cut.executeReturnFunction(null, null, null, Collections.emptyList(), null); + assertThat(tValue.toString()).contains("_none_", "amiga", "vibrant"); + } +} From 53bcc028cf9423bfd5bd88bbe7144d31bce36f18 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Wed, 14 Feb 2024 06:19:34 +0000 Subject: [PATCH 74/95] fix: typo on `GetAllThemeTest` filename --- .../tim/stdlib/{GetTAllThemeTest.java => GetAllThemeTest.java} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test/net/sourceforge/plantuml/tim/stdlib/{GetTAllThemeTest.java => GetAllThemeTest.java} (100%) diff --git a/test/net/sourceforge/plantuml/tim/stdlib/GetTAllThemeTest.java b/test/net/sourceforge/plantuml/tim/stdlib/GetAllThemeTest.java similarity index 100% rename from test/net/sourceforge/plantuml/tim/stdlib/GetTAllThemeTest.java rename to test/net/sourceforge/plantuml/tim/stdlib/GetAllThemeTest.java From cfa16d0f609873d3a41874ed8dbc4d1baa05d048 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Wed, 14 Feb 2024 19:05:53 +0100 Subject: [PATCH 75/95] chore: version 1.2024.2 --- gradle.properties | 2 +- .../drawing/g2d/ExtendedGeneralPath.java | 19 ------------------ .../sourceforge/plantuml/version/Version.java | 4 ++-- stdlib/awslib14-abx.repx | Bin 48688 -> 48765 bytes stdlib/azure-abx.repx | Bin 10752 -> 10890 bytes stdlib/gcp-abx.repx | Bin 6974 -> 7083 bytes stdlib/office-abx.repx | Bin 22962 -> 23868 bytes 7 files changed, 3 insertions(+), 22 deletions(-) diff --git a/gradle.properties b/gradle.properties index faafaa448..42657a6f1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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.2024.2beta1 +version = 1.2024.2 org.gradle.workers.max = 3 \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/klimt/drawing/g2d/ExtendedGeneralPath.java b/src/net/sourceforge/plantuml/klimt/drawing/g2d/ExtendedGeneralPath.java index 37bfe9b7b..1ff88279b 100644 --- a/src/net/sourceforge/plantuml/klimt/drawing/g2d/ExtendedGeneralPath.java +++ b/src/net/sourceforge/plantuml/klimt/drawing/g2d/ExtendedGeneralPath.java @@ -35,25 +35,6 @@ */ package net.sourceforge.plantuml.klimt.drawing.g2d; -/* - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - */ - import java.awt.Rectangle; import java.awt.Shape; import java.awt.geom.AffineTransform; diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index 9dc1f8365..c4fd81c82 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -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.2024.2beta1"; + private static final String version = "1.2024.2"; public static String versionString() { return version; @@ -80,7 +80,7 @@ public class Version { } public static long compileTime() { - return 1706811534365L; + return 1707932786357L; } public static String compileTimeString() { diff --git a/stdlib/awslib14-abx.repx b/stdlib/awslib14-abx.repx index df02cc1423402a1751fe50d096749fd1ecb3b20a..515704a8794373c1d26fd04abe18770d522a3ca9 100644 GIT binary patch literal 48765 zcmZ^qW0YsjvZo7Ow#_cvwr$&0UAEC>+qP~0tIM`++pd~^&zXDAoi#IGGxv%ezl_{Z zL`JTinO%qpwt<;#xNq=hg&o9hM@5Yo^tp11$jl3=5>3%{_6NHOB=DA|esT>`XGHIx z+X`Q|9}28Q<@ha$ZpOdATQ8FuGuVCX~!8!HB}b(Gpp-w+z*z=q8yK^oP!G zpux-qMB*-&cO$?6h*d2^0NQs`C;#NzRk{-Emn z8a1^a%d6kn(fgawd}gW!(FX6`D?z9_G>s?_3MviI^q78~W>k{OX*!#?pwVL|e4uss z3qDZysIVJwOD1H19L!XIQ{=8fV`qj55{_hiC||x+*1End@Fse8dsW*3h=5sxG?_?D zfc?LHtez@uTFMI`@`p(y$Xpdr>Js^7#5w%eyWFeTi}-oZQy*WaKG)u_-!`^u_rEgs z&&XE8JR)pKn$efEiX^I=DU~QFiQ^@tJ3~@ZB&5fK;8DnA(#-lExNDTNLoS75^>`qK zws=Fm*y(^*A z=At6SGhCf8&)d{rzJ2Y!edexGl2%oM!hxQ*_^3^z3?Emmo_q%Y?e|&McC}HARX>mP z$dsqLQp)v>me9^96iI+oCGKF^aNcp~Uaqwt$qZB%eq;)?|Ac|YQq0Yo+NQlS4aG6! zyRFGRkG;HM{+%+(;Mx zy^G?svGFE`6$?DPC;>bew;4~8=D8QxM2T~4^;(6K4W5^wKk!EQ9WX_dl^E~Sw*o$l zKQIt@AUe+L*Y&4e-)8Lvrl1$6zETD*=bhx(D?2+qYQEwkG43k)>pW>OB_<~a%~muz zHw@gvYa-2U;#!iKFU49H7J?QS-o9%q23~%h$_Rr!FwaYEt`Dh!s&FsesaI&pWC&a8 z`yzEP79-QfR(m?4)k5-Fi|wM*eyc@ZOq z3fJ5=0jk#D3Io^#B z>#V=YLnSg`Z`9bw&*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caz zv`ao|Vmv-LT?sNpp>P9xy{77AbVhUzhBV<;ym75d&FE1Pke)h^5G-riLtp_swSVm- zn>A|j*kLzMsE+?7#m~Ct9KnEMpzY(`ySE-b!{hhfsLu+NzSrKRCQ*tV3A7-32}9=56{Z_l9OOcT zlsA6OHh6z=Pju&!2&<=NK#|`jIgypW`T78*SEG!6jbVUjh6Ev(|F|rp;}XxIAV_vB7C|hUbf_=HcDE>u{3mznA@&dWqG7R6v8pm zL6OLe9qLc^2s5lQpJjACinGgiyJDn5NRQ(w2U)O|?4De?JotzBLnYReNA&Tkz4H4b zxp=3^t5`Va;M{A}ZX*4IS%_lDod5fqh(adYf?i!*mJCDMgPuE!l>M7i&+Mq3OC8AP bpbBRL5S*w!wiCD|PKj-w`|;}~Bj7&(eGcNZ From ad4a1bde571a90492a6b75be79c689714e1dea61 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Thu, 15 Feb 2024 20:35:36 +0100 Subject: [PATCH 76/95] feat: adding undocumented support for gzip URL --- gradle.properties | 2 +- .../plantuml/code/CompressionGZip.java | 71 +++++++++++++++++++ .../plantuml/code/TranscoderSmart.java | 5 ++ .../code/TranscoderSmartProtected.java | 5 ++ .../sourceforge/plantuml/version/Version.java | 2 +- 5 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 src/net/sourceforge/plantuml/code/CompressionGZip.java diff --git a/gradle.properties b/gradle.properties index 42657a6f1..0183477bd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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.2024.2 +version = 1.2024.3beta1 org.gradle.workers.max = 3 \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/code/CompressionGZip.java b/src/net/sourceforge/plantuml/code/CompressionGZip.java new file mode 100644 index 000000000..0f87d56ef --- /dev/null +++ b/src/net/sourceforge/plantuml/code/CompressionGZip.java @@ -0,0 +1,71 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.code; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.zip.GZIPInputStream; + +public class CompressionGZip implements Compression { + // ::remove file when __CORE__ + + public byte[] compress(byte[] in) { + throw new UnsupportedOperationException(); + } + + public ByteArray decompress(byte[] input) throws NoPlantumlCompressionException { + try { + try (final GZIPInputStream gzip = new GZIPInputStream(new ByteArrayInputStream(input))) { + final byte[] buffer = new byte[10_000]; + + try (final ByteArrayOutputStream baos = new ByteArrayOutputStream()) { + int len; + while ((len = gzip.read(buffer)) > 0) { + baos.write(buffer, 0, len); + if (baos.size() > 200_000) + throw new NoPlantumlCompressionException("Gzip error"); + } + return ByteArray.from(baos.toByteArray()); + } + } + } catch (IOException e) { + throw new NoPlantumlCompressionException(e); + } + + } + +} diff --git a/src/net/sourceforge/plantuml/code/TranscoderSmart.java b/src/net/sourceforge/plantuml/code/TranscoderSmart.java index 072bbd27c..dbf5a2bb2 100644 --- a/src/net/sourceforge/plantuml/code/TranscoderSmart.java +++ b/src/net/sourceforge/plantuml/code/TranscoderSmart.java @@ -49,6 +49,8 @@ public class TranscoderSmart implements Transcoder { new CompressionHuffman()); private final Transcoder zip = TranscoderImpl.utf8(new AsciiEncoder(), new ArobaseStringCompressor(), new CompressionZip()); + private final Transcoder gzip = TranscoderImpl.utf8(new AsciiEncoder(), new ArobaseStringCompressor(), + new CompressionGZip()); // ::done public String decode(String code) throws NoPlantumlCompressionException { @@ -66,6 +68,9 @@ public class TranscoderSmart implements Transcoder { if (code.startsWith("~h")) return hexOnly.decode(code.substring(2)); + if (code.startsWith("~g")) + return gzip.decode(code.substring(2)); + // ::comment when __CORE__ if (code.startsWith("~zip~")) return zip.decode(code.substring(5)); diff --git a/src/net/sourceforge/plantuml/code/TranscoderSmartProtected.java b/src/net/sourceforge/plantuml/code/TranscoderSmartProtected.java index f0b2dc7ca..61aefd6df 100644 --- a/src/net/sourceforge/plantuml/code/TranscoderSmartProtected.java +++ b/src/net/sourceforge/plantuml/code/TranscoderSmartProtected.java @@ -49,6 +49,8 @@ public class TranscoderSmartProtected implements Transcoder { new CompressionNone()); private final Transcoder zip = TranscoderImpl.utf8(new AsciiEncoder(), new ArobaseStringCompressor(), new CompressionZip()); + private final Transcoder gzip = TranscoderImpl.utf8(new AsciiEncoder(), new ArobaseStringCompressor(), + new CompressionGZip()); public String decode(String code) throws NoPlantumlCompressionException { // Work in progress @@ -63,6 +65,9 @@ public class TranscoderSmartProtected implements Transcoder { if (code.startsWith("~h")) return hexOnly.decode(code.substring(2)); + if (code.startsWith("~g")) + return gzip.decode(code.substring(2)); + if (code.startsWith("~zip~")) return zip.decode(code.substring(5)); diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index c4fd81c82..9919c1db5 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -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.2024.2"; + private static final String version = "1.2024.3beta1"; public static String versionString() { return version; From c6f150fd4e68997b6a7dd578089e07be2396d3e6 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Thu, 15 Feb 2024 20:43:50 +0100 Subject: [PATCH 77/95] chore: version 1.2024.3 --- gradle.properties | 2 +- .../sourceforge/plantuml/version/Version.java | 4 ++-- stdlib/home.repx | 1 + stdlib/k8s-abx.repx | Bin 0 -> 3118 bytes stdlib/k8s-dex.repx | Bin 0 -> 8727 bytes 5 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 stdlib/k8s-abx.repx create mode 100644 stdlib/k8s-dex.repx diff --git a/gradle.properties b/gradle.properties index 0183477bd..5ab97f29b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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.2024.3beta1 +version = 1.2024.3 org.gradle.workers.max = 3 \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index 9919c1db5..165700d5f 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -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.2024.3beta1"; + private static final String version = "1.2024.3"; public static String versionString() { return version; @@ -80,7 +80,7 @@ public class Version { } public static long compileTime() { - return 1707932786357L; + return 1708026005000L; } public static String compileTimeString() { diff --git a/stdlib/home.repx b/stdlib/home.repx index 0c294ef9a..f2ba66b23 100644 --- a/stdlib/home.repx +++ b/stdlib/home.repx @@ -13,6 +13,7 @@ eip elastic gcp kubernetes +k8s logos material office diff --git a/stdlib/k8s-abx.repx b/stdlib/k8s-abx.repx new file mode 100644 index 0000000000000000000000000000000000000000..c8f870c8c7da084c464913be8d3c0281b5d56609 GIT binary patch literal 3118 zcmV+}4AJu&2XP{b2|EgDG2%26;4H8kt_Lw3m^9JWIGz&(D2~w5GY{LawVVgSE*%$0 z1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RE-0^VXa;AZhnMuXl4*mp72 zXhEp^%A&6$rf_5CpkJh-H11Zl#=gmVt1aprp}u701;P=o%8@a$b;=&PlqJ!YUVR zF*D7LSY14p3y%3yp*>moPFET#P1US&PE%P3?CjpdF*%#_iTl`G6yN4uy34SuS>>B! z0Y9BhrY$&{=eH>uY4Y3=8IJd^%FH=E8hnzb5OP$J_FrylEbojr)J>#P}WLiJs0E8B^ji-1Zy0ji+O?mH&+% z>A!(=W2g5^b*is-;R2m<)0BIXaMM@j*ZIu;?yyOpyzy12R4!Of&J8Va6Zx1S|}B85zujP3s!zi#iRN*9b6ROuGT`SfQx{RgIloj zV=5liIk;qYwH8VRTm*C++=7)KL-DA7e&VA)1-l-q6?6~g4f&?(SVR(+r| zIiK0#&rB5Ta;SFDDbQ3_eV{WrpV=RVe85>6w-{;-WCpaHuGv85;%WVnVv}okt_D|E zDO6kyu1+SN)6Z%Lg4JJZp;W-7@FZ9xSotv)kLugh*6gooXmByqnuZ2a@u>bgt|`2` za6`DO6e{6L_?}Qar_(m}HyQ>mhT3Qtkcvn3PfC9D?WUb0S3|La4S}BXMIG2g&Ik72 zdQF+T%WTN(DuqgBCG(z4Jg1+H4kS<9VyHEcA<%L#vXx(g@w84^zP{WbA4Xo6vLLxL z@tnRpO%=PVXsGBag-S(3MJE)`>6G#M*no$@b%_mlNL-G;nd5)I4CHDkRmhT3Qtkcvn3W77w*>6+JKs5Ouo&~mzF1DT7b^&hE&?>xI&3#9@s0y++E!OD-J IcvR@$08fAii~s-t literal 0 HcmV?d00001 diff --git a/stdlib/k8s-dex.repx b/stdlib/k8s-dex.repx new file mode 100644 index 0000000000000000000000000000000000000000..1a528ba86a3132bae107b4446c0b1587e249d26e GIT binary patch literal 8727 zcmV+yBIw;)<5mISc~EXm&X8w*yl1u_1f;r}T?O0SnyhYZ;&uWNPMrV~)QKQKok;?9 zWTOtU)!j!<7V5G&wB7mn+&Rzc{LkB6!s-H~E`Jd8hR|)I@a#N~OI;)4%`qhw*yH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h5N`V5TUf ztoiuy8A4JU7ovdHAkjNhkM3<|zW;rs($e0^W_td_W)nl{g>B-DMp0IS^MvdqLN0p| z_eC(7399Y;v#dIV(OsNBG)>uC53ky7cGul?QTGN3uvd}j2bKM`PKae#vp0xZ(G0p& zfwWsSNTrk)b5DbT!B4j;4FejfFV0W0*s3;M?ms%9wDkedJw8?Qh8^EPZHVlFtRd9k z;d{bsCeGF=x8NV)-t1#6a*7B+ioqYm)C%MjbJ{3OFbujUlp?7Sq5a2$Tv0qCpI{DEEc z?ZncAO+YuRtF;b+vSsDri>%7Y12Q588&$_cc^v?HXKX_CfP_ICvZlcIwDvf% zM@MpO{>vs){j`-#wIM`s%g1^WSr`12&<)2aBpgf0TGaD1k{Jbhno*KO`iLa=S5q_D zz&E@) literal 0 HcmV?d00001 From 4ce77d3fa84d09c50686cfbec463a13a24771267 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Fri, 16 Feb 2024 18:05:22 +0100 Subject: [PATCH 78/95] fix: suppress `@[start|end]uml` on `sunlust` theme That fix: - https://forum.plantuml.net/18683/sunlust-theme-question --- themes/puml-theme-sunlust.puml | 2 -- 1 file changed, 2 deletions(-) diff --git a/themes/puml-theme-sunlust.puml b/themes/puml-theme-sunlust.puml index 8ea47681d..9001ba947 100644 --- a/themes/puml-theme-sunlust.puml +++ b/themes/puml-theme-sunlust.puml @@ -1,4 +1,3 @@ -@startuml '' NAME = Sunlust '' DESCRIPTION = sunlust theme based off of the [solarized theme](https://ethanschoonover.com/solarized) '' AUTHOR = Artem V. Ageev @@ -132,4 +131,3 @@ skinparam { !endfor !endfor } -@enduml From 04f718781f94bd5c998007e82f338017be507417 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Fri, 16 Feb 2024 20:20:56 +0100 Subject: [PATCH 79/95] refactor: remove dead code --- gradle.properties | 2 +- src/net/sourceforge/plantuml/tim/TFunction.java | 3 --- src/net/sourceforge/plantuml/tim/TFunctionImpl.java | 13 +------------ .../plantuml/tim/stdlib/InvokeProcedure.java | 6 +----- .../plantuml/tim/stdlib/SimpleReturnFunction.java | 6 +----- src/net/sourceforge/plantuml/version/Version.java | 2 +- 6 files changed, 5 insertions(+), 27 deletions(-) diff --git a/gradle.properties b/gradle.properties index 5ab97f29b..6f86d3d81 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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.2024.3 +version = 1.2024.4beta1 org.gradle.workers.max = 3 \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/tim/TFunction.java b/src/net/sourceforge/plantuml/tim/TFunction.java index 028996913..b608b4006 100644 --- a/src/net/sourceforge/plantuml/tim/TFunction.java +++ b/src/net/sourceforge/plantuml/tim/TFunction.java @@ -49,9 +49,6 @@ public interface TFunction { public TFunctionType getFunctionType(); - public void executeProcedure(TContext context, TMemory memory, LineLocation location, String s) - throws EaterException, EaterExceptionLocated; - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List args, Map named) throws EaterException, EaterExceptionLocated; diff --git a/src/net/sourceforge/plantuml/tim/TFunctionImpl.java b/src/net/sourceforge/plantuml/tim/TFunctionImpl.java index dbdf7eb1a..111942152 100644 --- a/src/net/sourceforge/plantuml/tim/TFunctionImpl.java +++ b/src/net/sourceforge/plantuml/tim/TFunctionImpl.java @@ -130,18 +130,7 @@ public class TFunctionImpl implements TFunction { } } - public void executeProcedure(TContext context, TMemory memory, LineLocation location, String s) - throws EaterException, EaterExceptionLocated { - final EaterFunctionCall call = new EaterFunctionCall(new StringLocated(s, location), - context.isLegacyDefine(signature.getFunctionName()), unquoted); - call.analyze(context, memory); - final String endOfLine = call.getEndOfLine(); - final List args = call.getValues(); - final Map named = call.getNamedArguments(); - executeProcedureInternal(context, memory, args, named); - context.appendEndOfLine(endOfLine); - } - + @Override public void executeProcedureInternal(TContext context, TMemory memory, List args, Map named) throws EaterException, EaterExceptionLocated { if (functionType != TFunctionType.PROCEDURE && functionType != TFunctionType.LEGACY_DEFINELONG) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java b/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java index c9079986a..3ea3695aa 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java @@ -62,11 +62,7 @@ public class InvokeProcedure implements TFunction { return TFunctionType.PROCEDURE; } - public void executeProcedure(TContext context, TMemory memory, LineLocation location, String s) - throws EaterException, EaterExceptionLocated { - throw new UnsupportedOperationException(); - } - + @Override public void executeProcedureInternal(TContext context, TMemory memory, List args, Map named) throws EaterException, EaterExceptionLocated { final String fname = args.get(0).toString(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/SimpleReturnFunction.java b/src/net/sourceforge/plantuml/tim/stdlib/SimpleReturnFunction.java index 146077597..f276bcbdd 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/SimpleReturnFunction.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/SimpleReturnFunction.java @@ -51,11 +51,7 @@ public abstract class SimpleReturnFunction implements TFunction { return TFunctionType.RETURN_FUNCTION; } - final public void executeProcedure(TContext context, TMemory memory, LineLocation location, String s) - throws EaterException { - throw new UnsupportedOperationException(); - } - + @Override final public void executeProcedureInternal(TContext context, TMemory memory, List args, Map named) throws EaterException { throw new UnsupportedOperationException(); diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index 165700d5f..50dd4b24e 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -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.2024.3"; + private static final String version = "1.2024.4beta1"; public static String versionString() { return version; From ee43dd0b9900510eccce72c73c13449ddc9665c7 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Fri, 16 Feb 2024 22:10:07 +0100 Subject: [PATCH 80/95] chore: fix some tests on Windows --- test/net/sourceforge/plantuml/help/CommandHelpThemeTest.java | 2 +- test/test/example/TestExample.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/net/sourceforge/plantuml/help/CommandHelpThemeTest.java b/test/net/sourceforge/plantuml/help/CommandHelpThemeTest.java index 180522880..caef807b6 100644 --- a/test/net/sourceforge/plantuml/help/CommandHelpThemeTest.java +++ b/test/net/sourceforge/plantuml/help/CommandHelpThemeTest.java @@ -17,7 +17,7 @@ class CommandHelpThemeTest { ).asString(); assertThat(output) - .startsWith(" \nHelp on themes") + .contains("Help on themes") .contains("bluegray", "hacker"); } } \ No newline at end of file diff --git a/test/test/example/TestExample.java b/test/test/example/TestExample.java index 1fc15a8d4..eeedbb088 100644 --- a/test/test/example/TestExample.java +++ b/test/test/example/TestExample.java @@ -17,7 +17,7 @@ class TestExample { ).asString(); assertThat(output) - .startsWith(" \nHelp on themes") + .contains("Help on themes") .contains("bluegray", "hacker"); } } \ No newline at end of file From 8fe9faec1b63da1400bb69ba7adf434e8df4ed82 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Fri, 16 Feb 2024 21:59:49 +0000 Subject: [PATCH 81/95] tests: add not working example about stdlib --- test/net/sourceforge/plantuml/tim/EaterTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/net/sourceforge/plantuml/tim/EaterTest.java b/test/net/sourceforge/plantuml/tim/EaterTest.java index 3dbdbe57f..fc370e459 100644 --- a/test/net/sourceforge/plantuml/tim/EaterTest.java +++ b/test/net/sourceforge/plantuml/tim/EaterTest.java @@ -31,7 +31,9 @@ class EaterTest { "'@startuml\n!$a={\"k\": \"exampleValue\"}\ntitle $a.k\na -> b\n@enduml\n' , exampleValue", "'@startuml\n!$a=[1, 2, 3]\ntitle xx $a[2] yy\na -> a\n' , xx 3 yy", "'@startuml\ntitle\n!foreach $i in [1, 2, 3]\nxx $i yy\n!endfor\nendtitle\na -> a\n' , xx 2 yy", - "'@startuml\ntitle\n!foreach $i in [\"a\", \"b\", \"c\"]\nxx $i yy\n!endfor\nendtitle\na -> a\n' , xx b yy", + "'@startuml\ntitle\n!foreach $i in [\"a\", \"b\", \"c\"]\nxx $i yy\n!endfor\nendtitle\na -> a\n' , xx b yy", +// TODO: fix code to allow test to access on stdlib, the corresponding (not working) test is here: +// "'@startuml\nstdlib\n@enduml', archimate", }) void Test_EaterTest(String input, String expected) throws Exception { assertRenderExpectedOutput(input, expected); From 415886e5d0ff19e51ee398ea11eedcec548e8425 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Sat, 17 Feb 2024 15:14:56 +0100 Subject: [PATCH 82/95] docs: add "PlantUML package and PlantUML on the GNU/Linux distribution" page To answer to: - #1572 Here is the links of plantuml version on: - the _[most popular]_ software package management systems - the _[most popular]_ GNU/Linux distributions --- docs/PACKAGE_AND_DISTRIBUTION.md | 97 ++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 docs/PACKAGE_AND_DISTRIBUTION.md diff --git a/docs/PACKAGE_AND_DISTRIBUTION.md b/docs/PACKAGE_AND_DISTRIBUTION.md new file mode 100644 index 000000000..c1266219c --- /dev/null +++ b/docs/PACKAGE_AND_DISTRIBUTION.md @@ -0,0 +1,97 @@ +# PlantUML packages and PlantUML on the _[most popular]_ GNU/Linux distributions + +## PlantUML packages + +### GitHub _(The main PlantUML package repository)_ +[![GitHub Release](https://img.shields.io/github/v/release/plantuml/plantuml)](https://github.com/plantuml/plantuml/releases/latest) + +### Chocolatey +[![Chocolatey Version](https://img.shields.io/chocolatey/v/plantuml)](https://community.chocolatey.org/packages/plantuml) + +### Docker +[![Docker Image Version](https://img.shields.io/docker/v/plantuml/plantuml)](https://github.com/plantuml/plantuml/pkgs/container/plantuml) + +### Homebrew +[![homebrew version](https://img.shields.io/homebrew/v/plantuml)](https://formulae.brew.sh/formula/plantuml) + +### Maven +[![Maven Central Version](https://img.shields.io/maven-central/v/net.sourceforge.plantuml/plantuml)](https://mvnrepository.com/artifact/net.sourceforge.plantuml/plantuml) + +### Scoop +[![Scoop Version](https://img.shields.io/scoop/v/plantuml?bucket=extras)](https://scoop.sh/#/apps?q=plantuml) + + + +## PlantUML on the _[most popular]_ GNU/Linux distributions + +### [Alpine Linux](https://www.alpinelinux.org) +| Type | Link | +| ------- | ---- | +| Distribution | ![Alpine Linux](https://img.shields.io/badge/Alpine_Linux-%230D597F.svg?style=for-the-badge&logo=alpine-linux&logoColor=white) | +| Last PlantUML version | | +| Link | https://pkgs.alpinelinux.org/packages?name=plantuml&branch=edge | +| Specificity | | + +### [Archlinux](https://archlinux.org) +| Type | Link | +| ------- | ---- | +| Distribution | ![Arch](https://img.shields.io/badge/Arch%20Linux-1793D1?logo=arch-linux&logoColor=fff&style=for-the-badge) | +| Last PlantUML version | [![Arch Linux package](https://img.shields.io/archlinux/v/extra/any/plantuml)](https://archlinux.org/packages/extra/any/plantuml/) | +| Link | https://archlinux.org/packages/extra/any/plantuml/ | +| Specificity | | + +### [Debian](https://www.debian.org) +| Type | Link | +| ------- | ---- | +| Distribution | ![Debian](https://img.shields.io/badge/Debian-D70A53?style=for-the-badge&logo=debian&logoColor=white) | +| Last PlantUML version | [![Debian package](https://img.shields.io/debian/v/plantuml)](https://salsa.debian.org/debian/plantuml) | +| Link | https://salsa.debian.org/debian/plantuml | +| Specificity | https://salsa.debian.org/debian/plantuml/-/tree/master/debian | + +### [Fedora](https://fedoraproject.org) +| Type | Link | +| ------- | ---- | +| Distribution | ![Fedora](https://img.shields.io/badge/Fedora-294172?style=for-the-badge&logo=fedora&logoColor=white) | +| Last PlantUML version | [![Fedora package](https://img.shields.io/fedora/v/plantuml)](https://src.fedoraproject.org/rpms/plantuml) | +| Link | https://src.fedoraproject.org/rpms/plantuml | +| Specificity | | + +### [Gentoo](https://www.gentoo.org/) +| Type | Link | +| ------- | ---- | +| Distribution | ![Gentoo](https://img.shields.io/badge/Gentoo-54487A?style=for-the-badge&logo=gentoo&logoColor=white) | +| Last PlantUML version | | +| Link | https://packages.gentoo.org/packages/media-gfx/plantuml | +| Specificity | | + +### [openSUSE](https://www.opensuse.org) +| Type | Link | +| ------- | ---- | +| Distribution | ![openSUSE](https://img.shields.io/badge/openSUSE-%2364B345?style=for-the-badge&logo=openSUSE&logoColor=white) | +| Last PlantUML version | | +| Link | https://build.opensuse.org/search?search_text=plantuml | +| Specificity | https://build.opensuse.org/package/show/Java:packages/plantuml
https://build.opensuse.org/package/show/home:mnhauke/plantuml | + +### [SUSE](https://www.suse.com) +| Type | Link | +| ------- | ---- | +| Distribution | ![Suse](https://img.shields.io/badge/SUSE-0C322C?style=for-the-badge&logo=SUSE&logoColor=white) | +| Last PlantUML version | | +| Link | https://packagehub.suse.com/packages/plantuml/ | +| Specificity | | + +### [Ubuntu](https://ubuntu.com) +| Type | Link | +| ------- | ---- | +| Distribution | ![Ubuntu](https://img.shields.io/badge/Ubuntu-E95420?style=for-the-badge&logo=ubuntu&logoColor=white) | +| Last PlantUML version | [![Ubuntu Package Version](https://img.shields.io/ubuntu/v/plantuml)](https://packages.ubuntu.com/search?keywords=plantuml&searchon=names&suite=all§ion=all) | +| Link | https://packages.ubuntu.com/search?keywords=plantuml&searchon=names&suite=all§ion=all | +| Specificity | | + + +# Reference and acknowledgement +- https://en.wikipedia.org/wiki/List_of_software_package_management_systems +- https://en.wikipedia.org/wiki/List_of_Linux_distributions +- https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file +- https://shields.io + From 2a961129f236f0d571b2e47bcd77e101909d6fb6 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Tue, 20 Feb 2024 19:52:29 +0100 Subject: [PATCH 83/95] chore: improve error message when missing stdlib https://github.com/plantuml/plantuml/pull/1692#issuecomment-1952831187 --- src/net/sourceforge/plantuml/preproc/Stdlib.java | 3 +++ src/net/sourceforge/plantuml/tim/TFunctionImpl.java | 6 ++++-- src/net/sourceforge/plantuml/tim/stdlib/AlwaysFalse.java | 4 +++- src/net/sourceforge/plantuml/tim/stdlib/AlwaysTrue.java | 2 ++ .../sourceforge/plantuml/tim/stdlib/CallUserFunction.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/Chr.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/Darken.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/DateFunction.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/Dec2hex.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/Dirpath.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/Eval.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/Feature.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/FileExists.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/Filename.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/FunctionExists.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/GetAllTheme.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/GetJsonType.java | 2 ++ .../sourceforge/plantuml/tim/stdlib/GetVariableValue.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/GetVersion.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/Getenv.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/Hex2dec.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/HslColor.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/IntVal.java | 2 ++ .../sourceforge/plantuml/tim/stdlib/InvokeProcedure.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/IsDark.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/IsLight.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/JsonKeyExists.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/Lighten.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/LogicalAnd.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/LogicalNand.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/LogicalNor.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/LogicalNot.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/LogicalNxor.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/LogicalOr.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/LogicalXor.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/Lower.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/Newline.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/Now.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/Ord.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java | 2 ++ .../sourceforge/plantuml/tim/stdlib/RetrieveProcedure.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/ReverseColor.java | 2 ++ .../sourceforge/plantuml/tim/stdlib/ReverseHsluvColor.java | 2 ++ .../sourceforge/plantuml/tim/stdlib/SetVariableValue.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/Size.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/SplitStr.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/StringFunction.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/Strlen.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/Strpos.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/Substr.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/Upper.java | 2 ++ src/net/sourceforge/plantuml/tim/stdlib/VariableExists.java | 2 ++ 54 files changed, 112 insertions(+), 3 deletions(-) diff --git a/src/net/sourceforge/plantuml/preproc/Stdlib.java b/src/net/sourceforge/plantuml/preproc/Stdlib.java index 43b00edea..2c4863e15 100644 --- a/src/net/sourceforge/plantuml/preproc/Stdlib.java +++ b/src/net/sourceforge/plantuml/preproc/Stdlib.java @@ -332,6 +332,9 @@ public class Stdlib { private static Collection getAll() throws IOException { final Set result = new TreeSet<>(); final InputStream home = getInternalInputStream("home", ".repx"); + if (home == null) + throw new IOException("Cannot access to /stdlib/*.repx files"); + final BufferedReader br = new BufferedReader(new InputStreamReader(home)); String name; while ((name = br.readLine()) != null) diff --git a/src/net/sourceforge/plantuml/tim/TFunctionImpl.java b/src/net/sourceforge/plantuml/tim/TFunctionImpl.java index 111942152..54183810b 100644 --- a/src/net/sourceforge/plantuml/tim/TFunctionImpl.java +++ b/src/net/sourceforge/plantuml/tim/TFunctionImpl.java @@ -69,6 +69,7 @@ public class TFunctionImpl implements TFunction { this.functionType = functionType; } + @Override public boolean canCover(int nbArg, Set namedArguments) { for (String n : namedArguments) if (signature.getNamedArguments().contains(n) == false) @@ -140,8 +141,9 @@ public class TFunctionImpl implements TFunction { context.executeLines(copy, body, TFunctionType.PROCEDURE, false); } - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List args, - Map named) throws EaterException, EaterExceptionLocated { + @Override + public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, + List args, Map named) throws EaterException, EaterExceptionLocated { if (functionType == TFunctionType.LEGACY_DEFINE) return executeReturnLegacyDefine(location, context, memory, args); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/AlwaysFalse.java b/src/net/sourceforge/plantuml/tim/stdlib/AlwaysFalse.java index c06523e00..0c73b754a 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/AlwaysFalse.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/AlwaysFalse.java @@ -52,10 +52,12 @@ public class AlwaysFalse extends SimpleReturnFunction { return new TFunctionSignature("%false", 0); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 0; } - + + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { return TValue.fromBoolean(false); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/AlwaysTrue.java b/src/net/sourceforge/plantuml/tim/stdlib/AlwaysTrue.java index 90ed2c7c1..66ec893af 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/AlwaysTrue.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/AlwaysTrue.java @@ -52,10 +52,12 @@ public class AlwaysTrue extends SimpleReturnFunction { return new TFunctionSignature("%true", 0); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 0; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { return TValue.fromBoolean(true); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/CallUserFunction.java b/src/net/sourceforge/plantuml/tim/stdlib/CallUserFunction.java index 3282983ca..5d9107a92 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/CallUserFunction.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/CallUserFunction.java @@ -53,10 +53,12 @@ public class CallUserFunction extends SimpleReturnFunction { return new TFunctionSignature("%call_user_func", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg > 0; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final String fname = values.get(0).toString(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Chr.java b/src/net/sourceforge/plantuml/tim/stdlib/Chr.java index 7fdc13f2b..cdd7e139a 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Chr.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Chr.java @@ -52,10 +52,12 @@ public class Chr extends SimpleReturnFunction { return new TFunctionSignature("%chr", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { try { diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Darken.java b/src/net/sourceforge/plantuml/tim/stdlib/Darken.java index bb5d05a7b..e053ac6c7 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Darken.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Darken.java @@ -56,10 +56,12 @@ public class Darken extends SimpleReturnFunction { return new TFunctionSignature("%darken", 2); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 2; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final String colorString = values.get(0).toString(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/DateFunction.java b/src/net/sourceforge/plantuml/tim/stdlib/DateFunction.java index 0140a6385..1c18155d9 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/DateFunction.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/DateFunction.java @@ -54,10 +54,12 @@ public class DateFunction extends SimpleReturnFunction { return new TFunctionSignature("%date", 2); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 0 || nbArg == 1 || nbArg == 2; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { if (values.size() == 0) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Dec2hex.java b/src/net/sourceforge/plantuml/tim/stdlib/Dec2hex.java index 1c3172996..3dc6f7b63 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Dec2hex.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Dec2hex.java @@ -52,10 +52,12 @@ public class Dec2hex extends SimpleReturnFunction { return new TFunctionSignature("%dec2hex", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { try { diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Dirpath.java b/src/net/sourceforge/plantuml/tim/stdlib/Dirpath.java index 54fabb43d..1c918c4e8 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Dirpath.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Dirpath.java @@ -59,10 +59,12 @@ public class Dirpath extends SimpleReturnFunction { return new TFunctionSignature("%dirpath", 0); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 0; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { if (value == null) { diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Eval.java b/src/net/sourceforge/plantuml/tim/stdlib/Eval.java index 7175e2ffc..ee7ad6e46 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Eval.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Eval.java @@ -53,10 +53,12 @@ public class Eval extends SimpleReturnFunction { return new TFunctionSignature("%eval", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final String exp = values.get(0).toString(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Feature.java b/src/net/sourceforge/plantuml/tim/stdlib/Feature.java index 088958f9e..f79b4ed4d 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Feature.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Feature.java @@ -52,10 +52,12 @@ public class Feature extends SimpleReturnFunction { return new TFunctionSignature("%feature", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final String arg = values.get(0).toString(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/FileExists.java b/src/net/sourceforge/plantuml/tim/stdlib/FileExists.java index 47355c4dd..d7b68e423 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/FileExists.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/FileExists.java @@ -53,10 +53,12 @@ public class FileExists extends SimpleReturnFunction { return new TFunctionSignature("%file_exists", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { // ::comment when __CORE__ diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Filename.java b/src/net/sourceforge/plantuml/tim/stdlib/Filename.java index 02e0f2d56..49fd6b6c8 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Filename.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Filename.java @@ -59,10 +59,12 @@ public class Filename extends SimpleReturnFunction { return new TFunctionSignature("%filename", 0); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 0; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { if (value == null) { diff --git a/src/net/sourceforge/plantuml/tim/stdlib/FunctionExists.java b/src/net/sourceforge/plantuml/tim/stdlib/FunctionExists.java index c7ccef030..43442f82e 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/FunctionExists.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/FunctionExists.java @@ -53,10 +53,12 @@ public class FunctionExists extends SimpleReturnFunction { return new TFunctionSignature("%function_exists", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final String name = values.get(0).toString(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetAllTheme.java b/src/net/sourceforge/plantuml/tim/stdlib/GetAllTheme.java index 3446e6de8..e0b2d0281 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetAllTheme.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetAllTheme.java @@ -56,10 +56,12 @@ public class GetAllTheme extends SimpleReturnFunction { return new TFunctionSignature("%get_all_theme", 0); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 0; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final JsonArray result = new JsonArray(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java b/src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java index 4df4bf5b5..244824ee3 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java @@ -55,10 +55,12 @@ public class GetJsonKey extends SimpleReturnFunction { return new TFunctionSignature("%get_json_keys", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final TValue data = values.get(0); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetJsonType.java b/src/net/sourceforge/plantuml/tim/stdlib/GetJsonType.java index e44b7ce55..33d3b5b64 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetJsonType.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetJsonType.java @@ -53,10 +53,12 @@ public class GetJsonType extends SimpleReturnFunction { return new TFunctionSignature("%get_json_type", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final TValue data = values.get(0); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetVariableValue.java b/src/net/sourceforge/plantuml/tim/stdlib/GetVariableValue.java index ac9261793..082921acb 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetVariableValue.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetVariableValue.java @@ -52,10 +52,12 @@ public class GetVariableValue extends SimpleReturnFunction { return new TFunctionSignature("%get_variable_value", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final String name = values.get(0).toString(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetVersion.java b/src/net/sourceforge/plantuml/tim/stdlib/GetVersion.java index 960fd1fb2..c206538cb 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetVersion.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetVersion.java @@ -53,10 +53,12 @@ public class GetVersion extends SimpleReturnFunction { return new TFunctionSignature("%version", 0); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 0; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { return TValue.fromString(Version.versionString()); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Getenv.java b/src/net/sourceforge/plantuml/tim/stdlib/Getenv.java index 6e947d050..88fd8a638 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Getenv.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Getenv.java @@ -53,10 +53,12 @@ public class Getenv extends SimpleReturnFunction { return new TFunctionSignature("%getenv", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { // ::comment when __CORE__ diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Hex2dec.java b/src/net/sourceforge/plantuml/tim/stdlib/Hex2dec.java index 622023df2..27f510248 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Hex2dec.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Hex2dec.java @@ -52,10 +52,12 @@ public class Hex2dec extends SimpleReturnFunction { return new TFunctionSignature("%hex2dec", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { try { diff --git a/src/net/sourceforge/plantuml/tim/stdlib/HslColor.java b/src/net/sourceforge/plantuml/tim/stdlib/HslColor.java index fae231c88..cc1173882 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/HslColor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/HslColor.java @@ -55,10 +55,12 @@ public class HslColor extends SimpleReturnFunction { return new TFunctionSignature("%hsl_color", 3); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 3 || nbArg == 4; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final int h = values.get(0).toInt(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/IntVal.java b/src/net/sourceforge/plantuml/tim/stdlib/IntVal.java index b9540e5dd..27e19db7a 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/IntVal.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/IntVal.java @@ -53,10 +53,12 @@ public class IntVal extends SimpleReturnFunction { return new TFunctionSignature("%intval", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final String s = values.get(0).toString(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java b/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java index 3ea3695aa..5331f7b2e 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java @@ -54,6 +54,7 @@ public class InvokeProcedure implements TFunction { return new TFunctionSignature("%invoke_procedure", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg > 0; } @@ -75,6 +76,7 @@ public class InvokeProcedure implements TFunction { func.executeProcedureInternal(context, memory, sublist, named); } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) { throw new UnsupportedOperationException(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/IsDark.java b/src/net/sourceforge/plantuml/tim/stdlib/IsDark.java index 23a4ccc67..efc4299da 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/IsDark.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/IsDark.java @@ -56,10 +56,12 @@ public class IsDark extends SimpleReturnFunction { return new TFunctionSignature("%is_dark", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final String colorString = values.get(0).toString(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/IsLight.java b/src/net/sourceforge/plantuml/tim/stdlib/IsLight.java index b75e781ef..deff7b24d 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/IsLight.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/IsLight.java @@ -56,10 +56,12 @@ public class IsLight extends SimpleReturnFunction { return new TFunctionSignature("%is_light", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final String colorString = values.get(0).toString(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/JsonKeyExists.java b/src/net/sourceforge/plantuml/tim/stdlib/JsonKeyExists.java index 64be7d60f..85eafc540 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/JsonKeyExists.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/JsonKeyExists.java @@ -54,10 +54,12 @@ public class JsonKeyExists extends SimpleReturnFunction { return new TFunctionSignature("%json_key_exists", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 2; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final TValue arg0 = values.get(0); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Lighten.java b/src/net/sourceforge/plantuml/tim/stdlib/Lighten.java index 8519054c3..e4de200fe 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Lighten.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Lighten.java @@ -56,10 +56,12 @@ public class Lighten extends SimpleReturnFunction { return new TFunctionSignature("%lighten", 2); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 2; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final String colorString = values.get(0).toString(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java b/src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java index 19dffd462..a5021562c 100755 --- a/src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java @@ -102,10 +102,12 @@ public class LoadJson extends SimpleReturnFunction { return new TFunctionSignature("%load_json", 3); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1 || nbArg == 2 || nbArg == 3; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final String path = values.get(0).toString(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalAnd.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalAnd.java index b674b4b46..4fe2d2a14 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalAnd.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalAnd.java @@ -52,10 +52,12 @@ public class LogicalAnd extends SimpleReturnFunction { return new TFunctionSignature("%and", 2); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg >= 2; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { for (TValue v : values) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNand.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNand.java index c4f5ea8e0..9b018d3c0 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNand.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNand.java @@ -52,10 +52,12 @@ public class LogicalNand extends SimpleReturnFunction { return new TFunctionSignature("%nand", 2); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg >= 2; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { for (TValue v : values) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNor.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNor.java index de7a99644..95c4e3c6d 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNor.java @@ -52,10 +52,12 @@ public class LogicalNor extends SimpleReturnFunction { return new TFunctionSignature("%nor", 2); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg >= 2; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { for (TValue v : values) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNot.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNot.java index b2385ee38..ca6d5ab3a 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNot.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNot.java @@ -52,10 +52,12 @@ public class LogicalNot extends SimpleReturnFunction { return new TFunctionSignature("%not", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final boolean arg = values.get(0).toBoolean(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNxor.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNxor.java index 61f8ab06a..e83c05b1e 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNxor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNxor.java @@ -52,10 +52,12 @@ public class LogicalNxor extends SimpleReturnFunction { return new TFunctionSignature("%nxor", 2); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg >= 2; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { int cpt = 0; diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalOr.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalOr.java index 3460a3683..41026ac89 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalOr.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalOr.java @@ -52,10 +52,12 @@ public class LogicalOr extends SimpleReturnFunction { return new TFunctionSignature("%or", 2); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg >= 2; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { for (TValue v : values) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalXor.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalXor.java index 1736b6cde..14ad07a5e 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalXor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalXor.java @@ -52,10 +52,12 @@ public class LogicalXor extends SimpleReturnFunction { return new TFunctionSignature("%xor", 2); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg >= 2; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { int cpt = 0; diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Lower.java b/src/net/sourceforge/plantuml/tim/stdlib/Lower.java index 463c272d8..d0dbcb731 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Lower.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Lower.java @@ -50,10 +50,12 @@ public class Lower extends SimpleReturnFunction { return new TFunctionSignature("%lower", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) { return TValue.fromString(values.get(0).toString().toLowerCase()); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Newline.java b/src/net/sourceforge/plantuml/tim/stdlib/Newline.java index 8b3cc6659..2f5c7abb7 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Newline.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Newline.java @@ -50,10 +50,12 @@ public class Newline extends SimpleReturnFunction { return new TFunctionSignature("%newline", 0); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 0; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) { return TValue.fromString("\n"); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Now.java b/src/net/sourceforge/plantuml/tim/stdlib/Now.java index 866e90f0e..c90eb25d1 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Now.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Now.java @@ -52,10 +52,12 @@ public class Now extends SimpleReturnFunction { return new TFunctionSignature("%now", 0); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 0; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final long now = System.currentTimeMillis() / 1000L; diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Ord.java b/src/net/sourceforge/plantuml/tim/stdlib/Ord.java index 6e5262189..bf0f7d767 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Ord.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Ord.java @@ -52,10 +52,12 @@ public class Ord extends SimpleReturnFunction { return new TFunctionSignature("%ord", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { try { diff --git a/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java b/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java index d33a0af09..a165f00a4 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java @@ -53,12 +53,14 @@ public class RandomFunction extends SimpleReturnFunction { return new TFunctionSignature("%random", 2); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 0 || nbArg == 1 || nbArg == 2; } private final Random random = new Random(); + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { switch (values.size()) { diff --git a/src/net/sourceforge/plantuml/tim/stdlib/RetrieveProcedure.java b/src/net/sourceforge/plantuml/tim/stdlib/RetrieveProcedure.java index 94a98ec81..fa75ab946 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/RetrieveProcedure.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/RetrieveProcedure.java @@ -54,10 +54,12 @@ public class RetrieveProcedure extends SimpleReturnFunction { return new TFunctionSignature("%retrieve_procedure", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg > 0; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final String fname = values.get(0).toString(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/ReverseColor.java b/src/net/sourceforge/plantuml/tim/stdlib/ReverseColor.java index 3a5d5e718..6084e16d1 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/ReverseColor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/ReverseColor.java @@ -55,10 +55,12 @@ public class ReverseColor extends SimpleReturnFunction { return new TFunctionSignature("%reverse_color", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final String colorString = values.get(0).toString(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/ReverseHsluvColor.java b/src/net/sourceforge/plantuml/tim/stdlib/ReverseHsluvColor.java index d9599aecc..6a42843f7 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/ReverseHsluvColor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/ReverseHsluvColor.java @@ -55,10 +55,12 @@ public class ReverseHsluvColor extends SimpleReturnFunction { return new TFunctionSignature("%reverse_hsluv_color", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final String colorString = values.get(0).toString(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/SetVariableValue.java b/src/net/sourceforge/plantuml/tim/stdlib/SetVariableValue.java index 31897f608..a35ec7786 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/SetVariableValue.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/SetVariableValue.java @@ -53,10 +53,12 @@ public class SetVariableValue extends SimpleReturnFunction { return new TFunctionSignature("%set_variable_value", 2); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 2; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { // if (memory instanceof TMemoryLocal) { diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Size.java b/src/net/sourceforge/plantuml/tim/stdlib/Size.java index ecc0891bf..0794bca42 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Size.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Size.java @@ -55,10 +55,12 @@ public class Size extends SimpleReturnFunction { return new TFunctionSignature("%size", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final TValue value = values.get(0); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/SplitStr.java b/src/net/sourceforge/plantuml/tim/stdlib/SplitStr.java index 2158332ee..d9aa2fded 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/SplitStr.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/SplitStr.java @@ -54,10 +54,12 @@ public class SplitStr extends SimpleReturnFunction { return new TFunctionSignature("%splitstr", 3); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 2; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final JsonArray result = new JsonArray(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/StringFunction.java b/src/net/sourceforge/plantuml/tim/stdlib/StringFunction.java index ef87d8cb9..f2b972a80 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/StringFunction.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/StringFunction.java @@ -50,10 +50,12 @@ public class StringFunction extends SimpleReturnFunction { return new TFunctionSignature("%string", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) { return TValue.fromString(values.get(0).toString()); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Strlen.java b/src/net/sourceforge/plantuml/tim/stdlib/Strlen.java index 432c6a42d..3e1578fba 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Strlen.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Strlen.java @@ -52,10 +52,12 @@ public class Strlen extends SimpleReturnFunction { return new TFunctionSignature("%strlen", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { return TValue.fromInt(values.get(0).toString().length()); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Strpos.java b/src/net/sourceforge/plantuml/tim/stdlib/Strpos.java index 7b7b58f1b..09a5c43a9 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Strpos.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Strpos.java @@ -52,10 +52,12 @@ public class Strpos extends SimpleReturnFunction { return new TFunctionSignature("%strpos", 2); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 2; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final String full = values.get(0).toString(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Substr.java b/src/net/sourceforge/plantuml/tim/stdlib/Substr.java index 2a94fcab6..ba0c0e8ce 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Substr.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Substr.java @@ -52,10 +52,12 @@ public class Substr extends SimpleReturnFunction { return new TFunctionSignature("%substr", 3); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 2 || nbArg == 3; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final String full = values.get(0).toString(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Upper.java b/src/net/sourceforge/plantuml/tim/stdlib/Upper.java index f3901fb8a..98caf89ff 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Upper.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Upper.java @@ -50,10 +50,12 @@ public class Upper extends SimpleReturnFunction { return new TFunctionSignature("%upper", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) { return TValue.fromString(values.get(0).toString().toUpperCase()); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/VariableExists.java b/src/net/sourceforge/plantuml/tim/stdlib/VariableExists.java index f19110114..a63730447 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/VariableExists.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/VariableExists.java @@ -52,10 +52,12 @@ public class VariableExists extends SimpleReturnFunction { return new TFunctionSignature("%variable_exists", 1); } + @Override public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 1; } + @Override public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { final String name = values.get(0).toString(); From be69889e7f4450de7458ea45ac206f97ab3c9c79 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Wed, 21 Feb 2024 22:23:31 +0100 Subject: [PATCH 84/95] tests: fix stdlib test https://github.com/plantuml/plantuml/pull/1692#issuecomment-1952831187 --- .gitignore | 2 +- src/net/sourceforge/plantuml/preproc/Stdlib.java | 12 +++++++++--- test/net/sourceforge/plantuml/tim/EaterTest.java | 3 +-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 73ddb5bb8..da13ed288 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ out #vscode files -/bin +**/bin/ # Ant result file plantuml.jar diff --git a/src/net/sourceforge/plantuml/preproc/Stdlib.java b/src/net/sourceforge/plantuml/preproc/Stdlib.java index 2c4863e15..3072500d0 100644 --- a/src/net/sourceforge/plantuml/preproc/Stdlib.java +++ b/src/net/sourceforge/plantuml/preproc/Stdlib.java @@ -3,10 +3,13 @@ package net.sourceforge.plantuml.preproc; import static java.nio.charset.StandardCharsets.UTF_8; import java.awt.image.BufferedImage; +import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.DataInputStream; +import java.io.FileInputStream; +import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; @@ -317,9 +320,12 @@ public class Stdlib { return new BrotliInputStream(raw); } - private static InputStream getInternalInputStream(String fullname, String extension) { - final String res = "/stdlib/" + fullname + extension; - return Stdlib.class.getResourceAsStream(res); + private static InputStream getInternalInputStream(String fullname, String extension) throws FileNotFoundException { + final String path = "stdlib/" + fullname + extension; + InputStream result = Stdlib.class.getResourceAsStream("/" + path); + if (result == null) + result = new BufferedInputStream(new FileInputStream(path)); + return result; } public static void extractStdLib() throws IOException { diff --git a/test/net/sourceforge/plantuml/tim/EaterTest.java b/test/net/sourceforge/plantuml/tim/EaterTest.java index fc370e459..1a458ceaa 100644 --- a/test/net/sourceforge/plantuml/tim/EaterTest.java +++ b/test/net/sourceforge/plantuml/tim/EaterTest.java @@ -32,8 +32,7 @@ class EaterTest { "'@startuml\n!$a=[1, 2, 3]\ntitle xx $a[2] yy\na -> a\n' , xx 3 yy", "'@startuml\ntitle\n!foreach $i in [1, 2, 3]\nxx $i yy\n!endfor\nendtitle\na -> a\n' , xx 2 yy", "'@startuml\ntitle\n!foreach $i in [\"a\", \"b\", \"c\"]\nxx $i yy\n!endfor\nendtitle\na -> a\n' , xx b yy", -// TODO: fix code to allow test to access on stdlib, the corresponding (not working) test is here: -// "'@startuml\nstdlib\n@enduml', archimate", + "'@startuml\nstdlib\n@enduml', archimate", }) void Test_EaterTest(String input, String expected) throws Exception { assertRenderExpectedOutput(input, expected); From fea505ab77b591ceb2c9f93413ea9d3c3e4bd855 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Thu, 22 Feb 2024 15:11:26 +0000 Subject: [PATCH 85/95] feat: add `%get_all_stdlib` builtin function --- .../sourceforge/plantuml/preproc/Stdlib.java | 6 +- .../sourceforge/plantuml/tim/TContext.java | 2 + .../plantuml/tim/stdlib/GetAllStdlib.java | 105 ++++++++++++++++++ .../plantuml/tim/stdlib/GetAllStdlibTest.java | 37 ++++++ 4 files changed, 147 insertions(+), 3 deletions(-) create mode 100644 src/net/sourceforge/plantuml/tim/stdlib/GetAllStdlib.java create mode 100644 test/net/sourceforge/plantuml/tim/stdlib/GetAllStdlibTest.java diff --git a/src/net/sourceforge/plantuml/preproc/Stdlib.java b/src/net/sourceforge/plantuml/preproc/Stdlib.java index 3072500d0..805b9f1c8 100644 --- a/src/net/sourceforge/plantuml/preproc/Stdlib.java +++ b/src/net/sourceforge/plantuml/preproc/Stdlib.java @@ -335,7 +335,7 @@ public class Stdlib { } } - private static Collection getAll() throws IOException { + public static Collection getAll() throws IOException { final Set result = new TreeSet<>(); final InputStream home = getInternalInputStream("home", ".repx"); if (home == null) @@ -451,11 +451,11 @@ public class Stdlib { } } - private String getVersion() { + public String getVersion() { return info.get("VERSION"); } - private String getSource() { + public String getSource() { return info.get("SOURCE"); } diff --git a/src/net/sourceforge/plantuml/tim/TContext.java b/src/net/sourceforge/plantuml/tim/TContext.java index 30f2f0b9f..f37dd7819 100644 --- a/src/net/sourceforge/plantuml/tim/TContext.java +++ b/src/net/sourceforge/plantuml/tim/TContext.java @@ -97,6 +97,7 @@ import net.sourceforge.plantuml.tim.stdlib.Feature; import net.sourceforge.plantuml.tim.stdlib.FileExists; import net.sourceforge.plantuml.tim.stdlib.Filename; import net.sourceforge.plantuml.tim.stdlib.FunctionExists; +import net.sourceforge.plantuml.tim.stdlib.GetAllStdlib; import net.sourceforge.plantuml.tim.stdlib.GetAllTheme; import net.sourceforge.plantuml.tim.stdlib.GetJsonKey; import net.sourceforge.plantuml.tim.stdlib.GetJsonType; @@ -212,6 +213,7 @@ public class TContext { functionsSet.addFunction(new Ord()); functionsSet.addFunction(new RandomFunction()); functionsSet.addFunction(new GetAllTheme()); + functionsSet.addFunction(new GetAllStdlib()); // %standard_exists_function // %str_replace // !exit diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetAllStdlib.java b/src/net/sourceforge/plantuml/tim/stdlib/GetAllStdlib.java new file mode 100644 index 000000000..6a84fd84e --- /dev/null +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetAllStdlib.java @@ -0,0 +1,105 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2024, Arnaud Roques + * + * Project Info: https://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * https://plantuml.com/patreon (only 1$ per month!) + * https://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.tim.stdlib; + +import java.io.IOException; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import net.sourceforge.plantuml.log.Logme; +import net.sourceforge.plantuml.json.Json; +import net.sourceforge.plantuml.json.JsonArray; +import net.sourceforge.plantuml.json.JsonObject; +import net.sourceforge.plantuml.preproc.Stdlib; +import net.sourceforge.plantuml.tim.EaterException; +import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.TContext; +import net.sourceforge.plantuml.tim.TFunctionSignature; +import net.sourceforge.plantuml.tim.TMemory; +import net.sourceforge.plantuml.tim.expression.TValue; +import net.sourceforge.plantuml.utils.LineLocation; + +public class GetAllStdlib extends SimpleReturnFunction { + + public TFunctionSignature getSignature() { + return new TFunctionSignature("%get_all_stdlib", 1); + } + + @Override + public boolean canCover(int nbArg, Set namedArgument) { + return nbArg == 0 || nbArg == 1; + } + + @Override + public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + Map named) throws EaterException, EaterExceptionLocated { + + switch (values.size()) { + case 0: + final JsonArray result = new JsonArray(); + try { + for (String name : Stdlib.getAll()) { + result.add(name); + } + return TValue.fromJson(result); + } catch (IOException e) { + Logme.error(e); + return TValue.fromJson(result); + } + + case 1: + final JsonObject res = new JsonObject(); + try { + // Inspired by Stdlib.addInfoVersion + for (String name : Stdlib.getAll()) { + final Stdlib folder = Stdlib.retrieve(name); + final JsonObject object = Json.object() // + .add("name", name) // + .add("version", folder.getVersion()) // + .add("source", folder.getSource()); + res.add(name, object); + } + return TValue.fromJson(res); + } catch (IOException e) { + Logme.error(e); + return TValue.fromJson(res); + } + + default: + throw EaterException.located("Error on get_all_stdlib: Too many arguments"); + } + } +} diff --git a/test/net/sourceforge/plantuml/tim/stdlib/GetAllStdlibTest.java b/test/net/sourceforge/plantuml/tim/stdlib/GetAllStdlibTest.java new file mode 100644 index 000000000..f274f52e7 --- /dev/null +++ b/test/net/sourceforge/plantuml/tim/stdlib/GetAllStdlibTest.java @@ -0,0 +1,37 @@ +package net.sourceforge.plantuml.tim.stdlib; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.util.Arrays; +import java.util.Collections; + +import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; +import org.junit.jupiter.api.IndicativeSentencesGeneration; +import org.junit.jupiter.api.Test; + +import net.sourceforge.plantuml.tim.EaterException; +import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.TFunction; +import net.sourceforge.plantuml.tim.expression.TValue; + +/** + * Tests the builtin function. + */ +@IndicativeSentencesGeneration(separator = ": ", generator = ReplaceUnderscores.class) + +class GetAllStdlibTest { + TFunction cut = new GetAllStdlib(); + final String cutName = "GetAllStdlib"; + + @Test + void Test_without_Param() throws EaterException, EaterExceptionLocated { + final TValue tValue = cut.executeReturnFunction(null, null, null, Collections.emptyList(), null); + assertThat(tValue.toString()).contains("archimate", "aws", "tupadr3"); + } + + @Test + void Test_with_one_argument() throws EaterException, EaterExceptionLocated { + final TValue tValue = cut.executeReturnFunction(null, null, null, Arrays.asList(TValue.fromInt(0)), null); + assertThat(tValue.toString()).contains("archimate", "https://github.com/plantuml-stdlib/Archimate-PlantUML"); + } +} From 436fb37f1a37b52190880c837fa30972f3734d6b Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Thu, 22 Feb 2024 18:33:29 +0100 Subject: [PATCH 86/95] refactor: prepare preprocessor error improvement (in progress) https://github.com/plantuml/plantuml/pull/1668 --- gradle.properties | 2 +- .../plantuml/text/StringLocated.java | 4 ++ src/net/sourceforge/plantuml/tim/Eater.java | 60 +++++++++--------- .../plantuml/tim/EaterAffectation.java | 3 +- .../plantuml/tim/EaterAffectationDefine.java | 2 +- .../plantuml/tim/EaterFunctionCall.java | 13 ++-- .../sourceforge/plantuml/tim/EaterImport.java | 9 +-- .../plantuml/tim/EaterInclude.java | 3 +- .../plantuml/tim/EaterIncludeDef.java | 3 +- .../plantuml/tim/EaterIncludesub.java | 3 +- .../sourceforge/plantuml/tim/EaterLog.java | 3 +- .../sourceforge/plantuml/tim/EaterTheme.java | 4 +- .../plantuml/tim/ExecutionContextWhile.java | 3 +- .../sourceforge/plantuml/tim/StringEater.java | 4 +- .../sourceforge/plantuml/tim/TContext.java | 40 ++++++------ .../sourceforge/plantuml/tim/TFunction.java | 8 +-- .../plantuml/tim/TFunctionImpl.java | 12 ++-- .../plantuml/tim/VariableManager.java | 6 +- .../expression/ReversePolishInterpretor.java | 3 +- .../plantuml/tim/expression/TokenStack.java | 5 +- .../tim/iterator/CodeIteratorWhile.java | 12 ++-- .../plantuml/tim/package-info.java | 6 +- .../plantuml/tim/stdlib/AlwaysFalse.java | 6 +- .../plantuml/tim/stdlib/AlwaysTrue.java | 4 +- .../plantuml/tim/stdlib/CallUserFunction.java | 4 +- .../sourceforge/plantuml/tim/stdlib/Chr.java | 4 +- .../plantuml/tim/stdlib/Darken.java | 4 +- .../plantuml/tim/stdlib/DateFunction.java | 4 +- .../plantuml/tim/stdlib/Dec2hex.java | 4 +- .../plantuml/tim/stdlib/Dirpath.java | 8 +-- .../sourceforge/plantuml/tim/stdlib/Eval.java | 4 +- .../plantuml/tim/stdlib/Feature.java | 12 ++-- .../plantuml/tim/stdlib/FileExists.java | 4 +- .../plantuml/tim/stdlib/Filename.java | 4 +- .../plantuml/tim/stdlib/FunctionExists.java | 6 +- .../plantuml/tim/stdlib/GetAllStdlib.java | 62 +++++++++---------- .../plantuml/tim/stdlib/GetAllTheme.java | 6 +- .../plantuml/tim/stdlib/GetJsonKey.java | 4 +- .../plantuml/tim/stdlib/GetJsonType.java | 4 +- .../plantuml/tim/stdlib/GetVariableValue.java | 8 +-- .../plantuml/tim/stdlib/GetVersion.java | 4 +- .../plantuml/tim/stdlib/Getenv.java | 6 +- .../plantuml/tim/stdlib/Hex2dec.java | 4 +- .../plantuml/tim/stdlib/HslColor.java | 4 +- .../plantuml/tim/stdlib/IntVal.java | 4 +- .../plantuml/tim/stdlib/InvokeProcedure.java | 14 ++--- .../plantuml/tim/stdlib/IsDark.java | 4 +- .../plantuml/tim/stdlib/IsLight.java | 4 +- .../plantuml/tim/stdlib/JsonKeyExists.java | 4 +- .../plantuml/tim/stdlib/Lighten.java | 4 +- .../plantuml/tim/stdlib/LoadJson.java | 4 +- .../plantuml/tim/stdlib/LogicalAnd.java | 4 +- .../plantuml/tim/stdlib/LogicalNand.java | 4 +- .../plantuml/tim/stdlib/LogicalNor.java | 4 +- .../plantuml/tim/stdlib/LogicalNot.java | 4 +- .../plantuml/tim/stdlib/LogicalNxor.java | 4 +- .../plantuml/tim/stdlib/LogicalOr.java | 4 +- .../plantuml/tim/stdlib/LogicalXor.java | 4 +- .../plantuml/tim/stdlib/Lower.java | 4 +- .../plantuml/tim/stdlib/Newline.java | 4 +- .../sourceforge/plantuml/tim/stdlib/Now.java | 4 +- .../sourceforge/plantuml/tim/stdlib/Ord.java | 4 +- .../plantuml/tim/stdlib/RandomFunction.java | 28 ++++----- .../tim/stdlib/RetrieveProcedure.java | 6 +- .../plantuml/tim/stdlib/ReverseColor.java | 4 +- .../tim/stdlib/ReverseHsluvColor.java | 4 +- .../plantuml/tim/stdlib/SetVariableValue.java | 4 +- .../tim/stdlib/SimpleReturnFunction.java | 6 +- .../sourceforge/plantuml/tim/stdlib/Size.java | 4 +- .../plantuml/tim/stdlib/SplitStr.java | 4 +- .../plantuml/tim/stdlib/StringFunction.java | 4 +- .../plantuml/tim/stdlib/Strlen.java | 4 +- .../plantuml/tim/stdlib/Strpos.java | 4 +- .../plantuml/tim/stdlib/Substr.java | 4 +- .../plantuml/tim/stdlib/Upper.java | 4 +- .../plantuml/tim/stdlib/VariableExists.java | 4 +- .../sourceforge/plantuml/version/Version.java | 2 +- 77 files changed, 281 insertions(+), 265 deletions(-) diff --git a/gradle.properties b/gradle.properties index 6f86d3d81..4336095e9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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.2024.4beta1 +version = 1.2024.4beta2 org.gradle.workers.max = 3 \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/text/StringLocated.java b/src/net/sourceforge/plantuml/text/StringLocated.java index ed15e2f11..bc99b864a 100644 --- a/src/net/sourceforge/plantuml/text/StringLocated.java +++ b/src/net/sourceforge/plantuml/text/StringLocated.java @@ -158,4 +158,8 @@ final public class StringLocated { return s.length(); } + public char charAt(int i) { + return s.charAt(i); + } + } diff --git a/src/net/sourceforge/plantuml/tim/Eater.java b/src/net/sourceforge/plantuml/tim/Eater.java index c23fbf085..193a62c5f 100644 --- a/src/net/sourceforge/plantuml/tim/Eater.java +++ b/src/net/sourceforge/plantuml/tim/Eater.java @@ -50,20 +50,18 @@ import net.sourceforge.plantuml.utils.LineLocation; public abstract class Eater { private int i = 0; - private final String s; - private final LineLocation lineLocation; + private final StringLocated stringLocated; - public Eater(StringLocated sl) { - this(sl.getString(), sl.getLocation()); - } - - protected Eater(String s, LineLocation lineLocation) { - this.s = s; - this.lineLocation = lineLocation; + public Eater(StringLocated stringLocated) { + this.stringLocated = stringLocated; } public final LineLocation getLineLocation() { - return lineLocation; + return stringLocated.getLocation(); + } + + public final StringLocated getStringLocated() { + return stringLocated; } public abstract void analyze(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated; @@ -73,8 +71,8 @@ public abstract class Eater { } final protected String eatAllToEnd() throws EaterException { - final String result = s.substring(i); - i = s.length(); + final String result = stringLocated.getString().substring(i); + i = stringLocated.length(); return result; } @@ -88,7 +86,7 @@ public abstract class Eater { return TValue.fromJson(json); } final TokenStack tokenStack = eatTokenStack(); - return tokenStack.getResult(getLineLocation(), context, memory); + return tokenStack.getResult(getStringLocated(), context, memory); } final protected TokenStack eatTokenStack() throws EaterException { @@ -104,7 +102,7 @@ public abstract class Eater { throws EaterException, EaterExceptionLocated { final TokenStack tokenStack = new TokenStack(); addIntoTokenStack(tokenStack, true); - return tokenStack.getResult(getLineLocation(), context, memory); + return tokenStack.getResult(getStringLocated(), context, memory); } final protected void addIntoTokenStack(TokenStack tokenStack, boolean stopAtColon) throws EaterException { @@ -208,56 +206,56 @@ public abstract class Eater { } final public void skipSpaces() { - while (i < s.length() && Character.isWhitespace(s.charAt(i))) + while (i < stringLocated.length() && Character.isWhitespace(stringLocated.charAt(i))) i++; } final protected void skipUntilChar(char ch) { - while (i < s.length() && s.charAt(i) != ch) + while (i < stringLocated.length() && stringLocated.charAt(i) != ch) i++; } final public char peekChar() { - if (i >= s.length()) + if (i >= stringLocated.length()) return 0; - return s.charAt(i); + return stringLocated.charAt(i); } final public boolean matchAffectation() { - final String tmp = s.substring(i); + final String tmp = stringLocated.getString().substring(i); final boolean result = tmp.matches("^\\$?[_\\p{L}][_\\p{L}0-9]*\\s*=.*"); return result; } final public char peekCharN2() { - if (i + 1 >= s.length()) + if (i + 1 >= stringLocated.length()) return 0; - return s.charAt(i + 1); + return stringLocated.charAt(i + 1); } final protected boolean hasNextChar() { - return i < s.length(); + return i < stringLocated.length(); } final public char eatOneChar() { - final char ch = s.charAt(i); + final char ch = stringLocated.charAt(i); i++; return ch; } final protected void checkAndEatChar(char ch) throws EaterException { - if (i >= s.length() || s.charAt(i) != ch) + if (i >= stringLocated.length() || stringLocated.charAt(i) != ch) throw EaterException.located("a001"); i++; } final protected boolean safeCheckAndEatChar(char ch) throws EaterException { - if (i >= s.length() || s.charAt(i) != ch) + if (i >= stringLocated.length() || stringLocated.charAt(i) != ch) return false; i++; @@ -265,10 +263,10 @@ public abstract class Eater { } final protected void optionallyEatChar(char ch) throws EaterException { - if (i >= s.length() || s.charAt(i) != ch) + if (i >= stringLocated.length() || stringLocated.charAt(i) != ch) return; - assert s.charAt(i) == ch; + assert stringLocated.charAt(i) == ch; i++; } @@ -279,8 +277,8 @@ public abstract class Eater { } final protected void addUpToLastLetterOrUnderscoreOrDigit(StringBuilder sb) { - while (i < s.length()) { - final char ch = s.charAt(i); + while (i < stringLocated.length()) { + final char ch = stringLocated.charAt(i); if (TLineType.isLetterOrUnderscoreOrDigit(ch) == false) return; @@ -290,7 +288,7 @@ public abstract class Eater { } final protected void addUpTo(char separator, StringBuilder sb) { - while (i < s.length()) { + while (i < stringLocated.length()) { final char ch = peekChar(); if (ch == separator) return; @@ -323,7 +321,7 @@ public abstract class Eater { eatOneChar(); final TokenStack def = TokenStack.eatUntilCloseParenthesisOrComma(this); def.guessFunctions(); - defValue = def.getResult(getLineLocation(), context, memory); + defValue = def.getResult(getStringLocated(), context, memory); // System.err.println("result=" + defValue); } else { defValue = null; diff --git a/src/net/sourceforge/plantuml/tim/EaterAffectation.java b/src/net/sourceforge/plantuml/tim/EaterAffectation.java index 1c7297580..99d25e20f 100644 --- a/src/net/sourceforge/plantuml/tim/EaterAffectation.java +++ b/src/net/sourceforge/plantuml/tim/EaterAffectation.java @@ -53,7 +53,8 @@ public class EaterAffectation extends Eater { if (scope != null) { skipSpaces(); if (peekChar() == '?' || peekChar() == '=') { - // The variable itself is "local" or "glocal", which is not a good idea by the way + // The variable itself is "local" or "glocal", which is not a good idea by the + // way scope = null; } else varname = eatAndGetVarname(); diff --git a/src/net/sourceforge/plantuml/tim/EaterAffectationDefine.java b/src/net/sourceforge/plantuml/tim/EaterAffectationDefine.java index d5a4fb950..c6cb3fbd2 100644 --- a/src/net/sourceforge/plantuml/tim/EaterAffectationDefine.java +++ b/src/net/sourceforge/plantuml/tim/EaterAffectationDefine.java @@ -51,7 +51,7 @@ public class EaterAffectationDefine extends Eater { final String varname = eatAndGetVarname(); skipSpaces(); final String tmp = eatAllToEnd(); - final String tmp2 = context.applyFunctionsAndVariables(memory, getLineLocation(), tmp); + final String tmp2 = context.applyFunctionsAndVariables(memory, new StringLocated(tmp, getLineLocation())); final TValue value = TValue.fromString(tmp2); // if (memory instanceof TMemoryLocal) { // memory = ((TMemoryLocal) memory).getGlobalForInternalUseOnly(); diff --git a/src/net/sourceforge/plantuml/tim/EaterFunctionCall.java b/src/net/sourceforge/plantuml/tim/EaterFunctionCall.java index 22c233868..1c116eab0 100644 --- a/src/net/sourceforge/plantuml/tim/EaterFunctionCall.java +++ b/src/net/sourceforge/plantuml/tim/EaterFunctionCall.java @@ -70,7 +70,8 @@ public class EaterFunctionCall extends Eater { skipSpaces(); if (isLegacyDefine) { final String read = eatAndGetOptionalQuotedString(); - final String value = context.applyFunctionsAndVariables(memory, getLineLocation(), read); + final String value = context.applyFunctionsAndVariables(memory, + new StringLocated(read, getLineLocation())); final TValue result = TValue.fromString(value); values.add(result); } else if (unquoted) { @@ -80,12 +81,14 @@ public class EaterFunctionCall extends Eater { checkAndEatChar('='); skipSpaces(); final String read = eatAndGetOptionalQuotedString(); - final String value = context.applyFunctionsAndVariables(memory, getLineLocation(), read); + final String value = context.applyFunctionsAndVariables(memory, + new StringLocated(read, getLineLocation())); final TValue result = TValue.fromString(value); namedArguments.put(varname, result); } else { final String read = eatAndGetOptionalQuotedString(); - final String value = context.applyFunctionsAndVariables(memory, getLineLocation(), read); + final String value = context.applyFunctionsAndVariables(memory, + new StringLocated(read, getLineLocation())); final TValue result = TValue.fromString(value); values.add(result); } @@ -98,12 +101,12 @@ public class EaterFunctionCall extends Eater { skipSpaces(); final TokenStack tokens = TokenStack.eatUntilCloseParenthesisOrComma(this).withoutSpace(); tokens.guessFunctions(); - final TValue result = tokens.getResult(getLineLocation(), context, memory); + final TValue result = tokens.getResult(getStringLocated(), context, memory); namedArguments.put(varname, result); } else { final TokenStack tokens = TokenStack.eatUntilCloseParenthesisOrComma(this).withoutSpace(); tokens.guessFunctions(); - final TValue result = tokens.getResult(getLineLocation(), context, memory); + final TValue result = tokens.getResult(getStringLocated(), context, memory); values.add(result); } } diff --git a/src/net/sourceforge/plantuml/tim/EaterImport.java b/src/net/sourceforge/plantuml/tim/EaterImport.java index b17727d17..6784a01f2 100644 --- a/src/net/sourceforge/plantuml/tim/EaterImport.java +++ b/src/net/sourceforge/plantuml/tim/EaterImport.java @@ -38,7 +38,7 @@ import net.sourceforge.plantuml.text.StringLocated; public class EaterImport extends Eater { - private String location; + private String what; public EaterImport(StringLocated s) { super(s); @@ -49,12 +49,13 @@ public class EaterImport extends Eater { skipSpaces(); checkAndEatChar("!import"); skipSpaces(); - this.location = context.applyFunctionsAndVariables(memory, getLineLocation(), this.eatAllToEnd()); + this.what = context.applyFunctionsAndVariables(memory, + new StringLocated(this.eatAllToEnd(), getLineLocation())); } - public final String getLocation() { - return location; + public final String getWhat() { + return what; } } diff --git a/src/net/sourceforge/plantuml/tim/EaterInclude.java b/src/net/sourceforge/plantuml/tim/EaterInclude.java index c41bd9f88..dd16097f9 100644 --- a/src/net/sourceforge/plantuml/tim/EaterInclude.java +++ b/src/net/sourceforge/plantuml/tim/EaterInclude.java @@ -65,7 +65,8 @@ public class EaterInclude extends Eater { } } skipSpaces(); - this.location = context.applyFunctionsAndVariables(memory, getLineLocation(), this.eatAllToEnd()); + this.location = context.applyFunctionsAndVariables(memory, + new StringLocated(this.eatAllToEnd(), getLineLocation())); // final TValue value = eatExpression(context, memory); // this.location = value.toString(); diff --git a/src/net/sourceforge/plantuml/tim/EaterIncludeDef.java b/src/net/sourceforge/plantuml/tim/EaterIncludeDef.java index 1cb813363..f0ffecce5 100644 --- a/src/net/sourceforge/plantuml/tim/EaterIncludeDef.java +++ b/src/net/sourceforge/plantuml/tim/EaterIncludeDef.java @@ -49,7 +49,8 @@ public class EaterIncludeDef extends Eater { skipSpaces(); checkAndEatChar("!includedef"); skipSpaces(); - this.location = context.applyFunctionsAndVariables(memory, getLineLocation(), this.eatAllToEnd()); + this.location = context.applyFunctionsAndVariables(memory, + new StringLocated(this.eatAllToEnd(), getLineLocation())); } diff --git a/src/net/sourceforge/plantuml/tim/EaterIncludesub.java b/src/net/sourceforge/plantuml/tim/EaterIncludesub.java index 355b11605..cfd9da7dc 100644 --- a/src/net/sourceforge/plantuml/tim/EaterIncludesub.java +++ b/src/net/sourceforge/plantuml/tim/EaterIncludesub.java @@ -49,7 +49,8 @@ public class EaterIncludesub extends Eater { skipSpaces(); checkAndEatChar("!includesub"); skipSpaces(); - this.location = context.applyFunctionsAndVariables(memory, getLineLocation(), this.eatAllToEnd()); + this.location = context.applyFunctionsAndVariables(memory, + new StringLocated(this.eatAllToEnd(), getLineLocation())); } diff --git a/src/net/sourceforge/plantuml/tim/EaterLog.java b/src/net/sourceforge/plantuml/tim/EaterLog.java index 4a0bc62df..805a64306 100644 --- a/src/net/sourceforge/plantuml/tim/EaterLog.java +++ b/src/net/sourceforge/plantuml/tim/EaterLog.java @@ -48,7 +48,8 @@ public class EaterLog extends Eater { skipSpaces(); checkAndEatChar("!log"); skipSpaces(); - final String logData = context.applyFunctionsAndVariables(memory, getLineLocation(), this.eatAllToEnd()); + final String logData = context.applyFunctionsAndVariables(memory, + new StringLocated(this.eatAllToEnd(), getLineLocation())); Log.error("[Log] " + logData); } diff --git a/src/net/sourceforge/plantuml/tim/EaterTheme.java b/src/net/sourceforge/plantuml/tim/EaterTheme.java index 35dfc4938..09e292785 100644 --- a/src/net/sourceforge/plantuml/tim/EaterTheme.java +++ b/src/net/sourceforge/plantuml/tim/EaterTheme.java @@ -76,12 +76,12 @@ public class EaterTheme extends Eater { final int x = this.name.toLowerCase().indexOf(" from "); if (x != -1) { final String fromTmp = this.name.substring(x + " from ".length()).trim(); - this.from = context.applyFunctionsAndVariables(memory, getLineLocation(), fromTmp); + this.from = context.applyFunctionsAndVariables(memory, new StringLocated(fromTmp, getLineLocation())); this.name = this.name.substring(0, x).trim(); this.context = context; } - this.realName = context.applyFunctionsAndVariables(memory, getLineLocation(), this.name); + this.realName = context.applyFunctionsAndVariables(memory, new StringLocated(this.name, getLineLocation())); } diff --git a/src/net/sourceforge/plantuml/tim/ExecutionContextWhile.java b/src/net/sourceforge/plantuml/tim/ExecutionContextWhile.java index 424a3d845..cc65cc222 100644 --- a/src/net/sourceforge/plantuml/tim/ExecutionContextWhile.java +++ b/src/net/sourceforge/plantuml/tim/ExecutionContextWhile.java @@ -34,6 +34,7 @@ */ package net.sourceforge.plantuml.tim; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.expression.TValue; import net.sourceforge.plantuml.tim.expression.TokenStack; import net.sourceforge.plantuml.tim.iterator.CodePosition; @@ -59,7 +60,7 @@ public class ExecutionContextWhile { return new ExecutionContextWhile(whileExpression, codePosition); } - public TValue conditionValue(LineLocation location, TContext context, TMemory memory) + public TValue conditionValue(StringLocated location, TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { return whileExpression.getResult(location, context, memory); } diff --git a/src/net/sourceforge/plantuml/tim/StringEater.java b/src/net/sourceforge/plantuml/tim/StringEater.java index 6e6a1489a..85ca881c9 100644 --- a/src/net/sourceforge/plantuml/tim/StringEater.java +++ b/src/net/sourceforge/plantuml/tim/StringEater.java @@ -34,10 +34,12 @@ */ package net.sourceforge.plantuml.tim; +import net.sourceforge.plantuml.text.StringLocated; + public class StringEater extends Eater { public StringEater(String s) { - super(s, null); + super(new StringLocated(s, null)); } @Override diff --git a/src/net/sourceforge/plantuml/tim/TContext.java b/src/net/sourceforge/plantuml/tim/TContext.java index f37dd7819..6a79011f4 100644 --- a/src/net/sourceforge/plantuml/tim/TContext.java +++ b/src/net/sourceforge/plantuml/tim/TContext.java @@ -252,7 +252,7 @@ public class TContext { private TValue fromJson(TMemory memory, String name, LineLocation location) throws EaterException, EaterExceptionLocated { - final String result = applyFunctionsAndVariables(memory, location, name); + final String result = applyFunctionsAndVariables(memory, new StringLocated(name, location)); try { final JsonValue json = Json.parse(result); return TValue.fromJson(json); @@ -428,7 +428,7 @@ public class TContext { if (memory.isEmpty() && functionsSet.size() == 0) return new StringLocated[] { located }; - final String result = applyFunctionsAndVariables(memory, located.getLocation(), located.getString()); + final String result = applyFunctionsAndVariables(memory, located); if (result == null) return null; @@ -442,7 +442,7 @@ public class TContext { private String pendingAdd = null; - public String applyFunctionsAndVariables(TMemory memory, LineLocation location, final String str) + public String applyFunctionsAndVariables(TMemory memory, final StringLocated str) throws EaterException, EaterExceptionLocated { // https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore%E2%80%93Horspool_algorithm // https://stackoverflow.com/questions/1326682/java-replacing-multiple-different-substring-in-a-string-at-once-or-in-the-most @@ -450,15 +450,15 @@ public class TContext { // https://www.quora.com/What-is-the-most-efficient-algorithm-to-replace-all-occurrences-of-a-pattern-P-in-a-string-with-a-pattern-P // https://en.wikipedia.org/wiki/Trie if (memory.isEmpty() && functionsSet.size() == 0) - return str; + return str.getString(); final StringBuilder result = new StringBuilder(); for (int i = 0; i < str.length(); i++) { final char c = str.charAt(i); - final String presentFunction = getFunctionNameAt(str, i); + final String presentFunction = getFunctionNameAt(str.getString(), i); if (presentFunction != null) { - final String sub = str.substring(i); - final EaterFunctionCall call = new EaterFunctionCall(new StringLocated(sub, location), + final String sub = str.getString().substring(i); + final EaterFunctionCall call = new EaterFunctionCall(new StringLocated(sub, str.getLocation()), isLegacyDefine(presentFunction), isUnquoted(presentFunction)); call.analyze(this, memory); final TFunctionSignature signature = new TFunctionSignature(presentFunction, call.getValues().size(), @@ -469,27 +469,27 @@ public class TContext { if (function.getFunctionType() == TFunctionType.PROCEDURE) { this.pendingAdd = result.toString(); - executeVoid3(location, memory, sub, function, call); + executeVoid3(str, memory, function, call); i += call.getCurrentPosition(); - final String remaining = str.substring(i); + final String remaining = str.getString().substring(i); if (remaining.length() > 0) appendToLastResult(remaining); return null; } if (function.getFunctionType() == TFunctionType.LEGACY_DEFINELONG) { - this.pendingAdd = str.substring(0, i); - executeVoid3(location, memory, sub, function, call); + this.pendingAdd = str.getString().substring(0, i); + executeVoid3(str, memory, function, call); return null; } assert function.getFunctionType() == TFunctionType.RETURN_FUNCTION || function.getFunctionType() == TFunctionType.LEGACY_DEFINE; - final TValue functionReturn = function.executeReturnFunction(this, memory, location, call.getValues(), + final TValue functionReturn = function.executeReturnFunction(this, memory, str, call.getValues(), call.getNamedArguments()); result.append(functionReturn.toString()); i += call.getCurrentPosition() - 1; - } else if (new VariableManager(this, memory, location).getVarnameAt(str, i) != null) { - i = new VariableManager(this, memory, location).replaceVariables(str, i, result); + } else if (new VariableManager(this, memory, str.getLocation()).getVarnameAt(str.getString(), i) != null) { + i = new VariableManager(this, memory, str.getLocation()).replaceVariables(str.getString(), i, result); } else { result.append(c); } @@ -502,11 +502,9 @@ public class TContext { this.resultList.set(this.resultList.size() - 1, last.append(remaining)); } - private void executeVoid3(LineLocation location, TMemory memory, String s, TFunction function, - EaterFunctionCall call) throws EaterException, EaterExceptionLocated { - function.executeProcedureInternal(this, memory, call.getValues(), call.getNamedArguments()); - // function.executeProcedure(this, memory, location, s, call.getValues(), - // call.getNamedArguments()); + private void executeVoid3(StringLocated location, TMemory memory, TFunction function, EaterFunctionCall call) + throws EaterException, EaterExceptionLocated { + function.executeProcedureInternal(this, memory, location, call.getValues(), call.getNamedArguments()); } private void executeImport(TMemory memory, StringLocated s) throws EaterException, EaterExceptionLocated { @@ -514,8 +512,8 @@ public class TContext { _import.analyze(this, memory); try { - final SFile file = FileSystem.getInstance() - .getFile(applyFunctionsAndVariables(memory, s.getLocation(), _import.getLocation())); + final SFile file = FileSystem.getInstance().getFile( + applyFunctionsAndVariables(memory, new StringLocated(_import.getWhat(), s.getLocation()))); if (file.exists() && file.isDirectory() == false) { importedFiles.add(file); return; diff --git a/src/net/sourceforge/plantuml/tim/TFunction.java b/src/net/sourceforge/plantuml/tim/TFunction.java index b608b4006..d6572f378 100644 --- a/src/net/sourceforge/plantuml/tim/TFunction.java +++ b/src/net/sourceforge/plantuml/tim/TFunction.java @@ -38,8 +38,8 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public interface TFunction { @@ -49,11 +49,11 @@ public interface TFunction { public TFunctionType getFunctionType(); - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List args, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List args, Map named) throws EaterException, EaterExceptionLocated; - public void executeProcedureInternal(TContext context, TMemory memory, List args, Map named) - throws EaterException, EaterExceptionLocated; + public void executeProcedureInternal(TContext context, TMemory memory, StringLocated location, List args, + Map named) throws EaterException, EaterExceptionLocated; public boolean isUnquoted(); diff --git a/src/net/sourceforge/plantuml/tim/TFunctionImpl.java b/src/net/sourceforge/plantuml/tim/TFunctionImpl.java index 54183810b..4d1237feb 100644 --- a/src/net/sourceforge/plantuml/tim/TFunctionImpl.java +++ b/src/net/sourceforge/plantuml/tim/TFunctionImpl.java @@ -132,8 +132,8 @@ public class TFunctionImpl implements TFunction { } @Override - public void executeProcedureInternal(TContext context, TMemory memory, List args, Map named) - throws EaterException, EaterExceptionLocated { + public void executeProcedureInternal(TContext context, TMemory memory, StringLocated location, List args, + Map named) throws EaterException, EaterExceptionLocated { if (functionType != TFunctionType.PROCEDURE && functionType != TFunctionType.LEGACY_DEFINELONG) throw new IllegalStateException(); @@ -142,10 +142,10 @@ public class TFunctionImpl implements TFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, - List args, Map named) throws EaterException, EaterExceptionLocated { + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List args, + Map named) throws EaterException, EaterExceptionLocated { if (functionType == TFunctionType.LEGACY_DEFINE) - return executeReturnLegacyDefine(location, context, memory, args); + return executeReturnLegacyDefine(location.getLocation(), context, memory, args); if (functionType != TFunctionType.RETURN_FUNCTION) throw EaterException.unlocated("Illegal call here. Is there a return directive in your function?"); @@ -164,7 +164,7 @@ public class TFunctionImpl implements TFunction { throw new IllegalStateException(); final TMemory copy = getNewMemory(memory, args, Collections.emptyMap()); - final String tmp = context.applyFunctionsAndVariables(copy, location, legacyDefinition); + final String tmp = context.applyFunctionsAndVariables(copy, new StringLocated(legacyDefinition, location)); if (tmp == null) return TValue.fromString(""); diff --git a/src/net/sourceforge/plantuml/tim/VariableManager.java b/src/net/sourceforge/plantuml/tim/VariableManager.java index 8f3a7bd00..88332ac3d 100644 --- a/src/net/sourceforge/plantuml/tim/VariableManager.java +++ b/src/net/sourceforge/plantuml/tim/VariableManager.java @@ -37,6 +37,7 @@ package net.sourceforge.plantuml.tim; import net.sourceforge.plantuml.json.JsonArray; import net.sourceforge.plantuml.json.JsonObject; import net.sourceforge.plantuml.json.JsonValue; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.text.TLineType; import net.sourceforge.plantuml.tim.expression.TValue; import net.sourceforge.plantuml.utils.LineLocation; @@ -67,7 +68,7 @@ public class VariableManager { result.append(value.toJson().toString()); } else { JsonValue jsonValue = (value.toJson().isArray()) ? (JsonArray) value.toJson() - : (JsonObject) value.toJson(); + : (JsonObject) value.toJson(); i++; i = replaceJson(jsonValue, str, i, result) - 1; } @@ -111,7 +112,8 @@ public class VariableManager { inBracket.append(str.charAt(i)); i++; } - final String nbString = context.applyFunctionsAndVariables(memory, location, inBracket.toString()); + final String nbString = context.applyFunctionsAndVariables(memory, + new StringLocated(inBracket.toString(), location)); if (jsonValue instanceof JsonArray) { final int nb = Integer.parseInt(nbString); jsonValue = ((JsonArray) jsonValue).get(nb); diff --git a/src/net/sourceforge/plantuml/tim/expression/ReversePolishInterpretor.java b/src/net/sourceforge/plantuml/tim/expression/ReversePolishInterpretor.java index c5b4be109..4d19e7642 100644 --- a/src/net/sourceforge/plantuml/tim/expression/ReversePolishInterpretor.java +++ b/src/net/sourceforge/plantuml/tim/expression/ReversePolishInterpretor.java @@ -40,6 +40,7 @@ import java.util.Collections; import java.util.Deque; import java.util.List; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; @@ -58,7 +59,7 @@ public class ReversePolishInterpretor { this(null, queue, knowledge, memory, context); } - public ReversePolishInterpretor(LineLocation location, TokenStack queue, Knowledge knowledge, TMemory memory, + public ReversePolishInterpretor(StringLocated location, TokenStack queue, Knowledge knowledge, TMemory memory, TContext context) throws EaterException, EaterExceptionLocated { final Deque stack = new ArrayDeque<>(); diff --git a/src/net/sourceforge/plantuml/tim/expression/TokenStack.java b/src/net/sourceforge/plantuml/tim/expression/TokenStack.java index 3bd091e4b..61eeebae6 100644 --- a/src/net/sourceforge/plantuml/tim/expression/TokenStack.java +++ b/src/net/sourceforge/plantuml/tim/expression/TokenStack.java @@ -42,6 +42,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.Eater; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; @@ -210,9 +211,9 @@ public class TokenStack { return new InternalIterator(); } - public TValue getResult(LineLocation location, TContext context, TMemory memory) + public TValue getResult(StringLocated location, TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { - final Knowledge knowledge = context.asKnowledge(memory, location); + final Knowledge knowledge = context.asKnowledge(memory, location.getLocation()); final TokenStack tmp = withoutSpace(); tmp.guessFunctions(); final TokenIterator it = tmp.tokenIterator(); diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorWhile.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorWhile.java index 037c33200..84f201e6a 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorWhile.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorWhile.java @@ -90,10 +90,10 @@ public class CodeIteratorWhile extends AbstractCodeIterator { continue; } else if (result.getType() == TLineType.ENDWHILE) { logs.add(result); - if (currentWhile == null) { + if (currentWhile == null) throw EaterException.located("No while related to this endwhile"); - } - final TValue value = currentWhile.conditionValue(result.getLocation(), context, memory); + + final TValue value = currentWhile.conditionValue(result, context, memory); if (value.toBoolean()) { source.jumpToCodePosition(currentWhile.getStartWhile()); } else { @@ -113,10 +113,10 @@ public class CodeIteratorWhile extends AbstractCodeIterator { final TokenStack whileExpression = condition.getWhileExpression(); final ExecutionContextWhile theWhile = ExecutionContextWhile.fromValue(whileExpression, source.getCodePosition()); - final TValue value = theWhile.conditionValue(s.getLocation(), context, memory); - if (value.toBoolean() == false) { + final TValue value = theWhile.conditionValue(s, context, memory); + if (value.toBoolean() == false) theWhile.skipMe(); - } + memory.addWhile(theWhile); } diff --git a/src/net/sourceforge/plantuml/tim/package-info.java b/src/net/sourceforge/plantuml/tim/package-info.java index d185cc4bd..7aa0e198b 100644 --- a/src/net/sourceforge/plantuml/tim/package-info.java +++ b/src/net/sourceforge/plantuml/tim/package-info.java @@ -1,7 +1,7 @@ /** - * Provides classes used to manage - *
- * Preprocessing of PlantUML input. + * Provides classes used to manage + * Preprocessing + * of PlantUML input. * * @see net.sourceforge.plantuml.text.TLineType * @see net.sourceforge.plantuml.preproc diff --git a/src/net/sourceforge/plantuml/tim/stdlib/AlwaysFalse.java b/src/net/sourceforge/plantuml/tim/stdlib/AlwaysFalse.java index 0c73b754a..6d13ce01e 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/AlwaysFalse.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/AlwaysFalse.java @@ -38,13 +38,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class AlwaysFalse extends SimpleReturnFunction { @@ -56,9 +56,9 @@ public class AlwaysFalse extends SimpleReturnFunction { public boolean canCover(int nbArg, Set namedArgument) { return nbArg == 0; } - + @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { return TValue.fromBoolean(false); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/AlwaysTrue.java b/src/net/sourceforge/plantuml/tim/stdlib/AlwaysTrue.java index 66ec893af..e9a1362b6 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/AlwaysTrue.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/AlwaysTrue.java @@ -38,13 +38,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class AlwaysTrue extends SimpleReturnFunction { @@ -58,7 +58,7 @@ public class AlwaysTrue extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { return TValue.fromBoolean(true); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/CallUserFunction.java b/src/net/sourceforge/plantuml/tim/stdlib/CallUserFunction.java index 5d9107a92..0bc47532a 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/CallUserFunction.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/CallUserFunction.java @@ -38,6 +38,7 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; @@ -45,7 +46,6 @@ import net.sourceforge.plantuml.tim.TFunction; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class CallUserFunction extends SimpleReturnFunction { @@ -59,7 +59,7 @@ public class CallUserFunction extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final String fname = values.get(0).toString(); final List args = values.subList(1, values.size()); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Chr.java b/src/net/sourceforge/plantuml/tim/stdlib/Chr.java index cdd7e139a..aa7daa6cb 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Chr.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Chr.java @@ -38,13 +38,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class Chr extends SimpleReturnFunction { @@ -58,7 +58,7 @@ public class Chr extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { try { final String value = String.valueOf(Character.toChars(values.get(0).toInt())); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Darken.java b/src/net/sourceforge/plantuml/tim/stdlib/Darken.java index e053ac6c7..4a282d150 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Darken.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Darken.java @@ -41,13 +41,13 @@ import java.util.Set; import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.HColorSet; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class Darken extends SimpleReturnFunction { @@ -62,7 +62,7 @@ public class Darken extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final String colorString = values.get(0).toString(); final int ratio = values.get(1).toInt(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/DateFunction.java b/src/net/sourceforge/plantuml/tim/stdlib/DateFunction.java index 1c18155d9..e596ef4b7 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/DateFunction.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/DateFunction.java @@ -40,13 +40,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class DateFunction extends SimpleReturnFunction { @@ -60,7 +60,7 @@ public class DateFunction extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { if (values.size() == 0) return TValue.fromString(new Date().toString()); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Dec2hex.java b/src/net/sourceforge/plantuml/tim/stdlib/Dec2hex.java index 3dc6f7b63..668f618da 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Dec2hex.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Dec2hex.java @@ -38,13 +38,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class Dec2hex extends SimpleReturnFunction { @@ -58,7 +58,7 @@ public class Dec2hex extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { try { return TValue.fromString("" + Integer.toHexString(values.get(0).toInt())); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Dirpath.java b/src/net/sourceforge/plantuml/tim/stdlib/Dirpath.java index 1c918c4e8..a3a0b4e9e 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Dirpath.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Dirpath.java @@ -39,13 +39,13 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.preproc.Defines; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class Dirpath extends SimpleReturnFunction { @@ -65,11 +65,11 @@ public class Dirpath extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { - if (value == null) { + if (value == null) return TValue.fromString(""); - } + return TValue.fromString(value); } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Eval.java b/src/net/sourceforge/plantuml/tim/stdlib/Eval.java index ee7ad6e46..d08e45363 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Eval.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Eval.java @@ -38,6 +38,7 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.StringEater; @@ -45,7 +46,6 @@ import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class Eval extends SimpleReturnFunction { @@ -59,7 +59,7 @@ public class Eval extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final String exp = values.get(0).toString(); final StringEater eater = new StringEater(exp); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Feature.java b/src/net/sourceforge/plantuml/tim/stdlib/Feature.java index f79b4ed4d..042bfee0b 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Feature.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Feature.java @@ -38,13 +38,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class Feature extends SimpleReturnFunction { @@ -58,15 +58,15 @@ public class Feature extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final String arg = values.get(0).toString(); - if ("style".equalsIgnoreCase(arg)) { + if ("style".equalsIgnoreCase(arg)) return TValue.fromInt(1); - } - if ("theme".equalsIgnoreCase(arg)) { + + if ("theme".equalsIgnoreCase(arg)) return TValue.fromInt(1); - } + return TValue.fromInt(0); } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/FileExists.java b/src/net/sourceforge/plantuml/tim/stdlib/FileExists.java index d7b68e423..f43b345a1 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/FileExists.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/FileExists.java @@ -39,13 +39,13 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.security.SFile; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class FileExists extends SimpleReturnFunction { @@ -59,7 +59,7 @@ public class FileExists extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { // ::comment when __CORE__ final String path = values.get(0).toString(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Filename.java b/src/net/sourceforge/plantuml/tim/stdlib/Filename.java index 49fd6b6c8..fd6089946 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Filename.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Filename.java @@ -39,13 +39,13 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.preproc.Defines; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class Filename extends SimpleReturnFunction { @@ -65,7 +65,7 @@ public class Filename extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { if (value == null) { return TValue.fromString(""); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/FunctionExists.java b/src/net/sourceforge/plantuml/tim/stdlib/FunctionExists.java index 43442f82e..f72dae133 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/FunctionExists.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/FunctionExists.java @@ -38,16 +38,16 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class FunctionExists extends SimpleReturnFunction { - // ::remove folder when __HAXE__ + // ::remove folder when __HAXE__ public TFunctionSignature getSignature() { return new TFunctionSignature("%function_exists", 1); @@ -59,7 +59,7 @@ public class FunctionExists extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final String name = values.get(0).toString(); return TValue.fromBoolean(context.doesFunctionExist(name)); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetAllStdlib.java b/src/net/sourceforge/plantuml/tim/stdlib/GetAllStdlib.java index 6a84fd84e..4bac0865e 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetAllStdlib.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetAllStdlib.java @@ -39,18 +39,18 @@ import java.util.List; import java.util.Map; import java.util.Set; -import net.sourceforge.plantuml.log.Logme; import net.sourceforge.plantuml.json.Json; import net.sourceforge.plantuml.json.JsonArray; import net.sourceforge.plantuml.json.JsonObject; +import net.sourceforge.plantuml.log.Logme; import net.sourceforge.plantuml.preproc.Stdlib; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class GetAllStdlib extends SimpleReturnFunction { @@ -64,42 +64,42 @@ public class GetAllStdlib extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { switch (values.size()) { - case 0: - final JsonArray result = new JsonArray(); - try { - for (String name : Stdlib.getAll()) { - result.add(name); - } - return TValue.fromJson(result); - } catch (IOException e) { - Logme.error(e); - return TValue.fromJson(result); + case 0: + final JsonArray result = new JsonArray(); + try { + for (String name : Stdlib.getAll()) { + result.add(name); } + return TValue.fromJson(result); + } catch (IOException e) { + Logme.error(e); + return TValue.fromJson(result); + } - case 1: - final JsonObject res = new JsonObject(); - try { - // Inspired by Stdlib.addInfoVersion - for (String name : Stdlib.getAll()) { - final Stdlib folder = Stdlib.retrieve(name); - final JsonObject object = Json.object() // - .add("name", name) // - .add("version", folder.getVersion()) // - .add("source", folder.getSource()); - res.add(name, object); - } - return TValue.fromJson(res); - } catch (IOException e) { - Logme.error(e); - return TValue.fromJson(res); + case 1: + final JsonObject res = new JsonObject(); + try { + // Inspired by Stdlib.addInfoVersion + for (String name : Stdlib.getAll()) { + final Stdlib folder = Stdlib.retrieve(name); + final JsonObject object = Json.object() // + .add("name", name) // + .add("version", folder.getVersion()) // + .add("source", folder.getSource()); + res.add(name, object); } + return TValue.fromJson(res); + } catch (IOException e) { + Logme.error(e); + return TValue.fromJson(res); + } - default: - throw EaterException.located("Error on get_all_stdlib: Too many arguments"); + default: + throw EaterException.located("Error on get_all_stdlib: Too many arguments"); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetAllTheme.java b/src/net/sourceforge/plantuml/tim/stdlib/GetAllTheme.java index e0b2d0281..f26379843 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetAllTheme.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetAllTheme.java @@ -39,8 +39,9 @@ import java.util.List; import java.util.Map; import java.util.Set; -import net.sourceforge.plantuml.log.Logme; import net.sourceforge.plantuml.json.JsonArray; +import net.sourceforge.plantuml.log.Logme; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.theme.ThemeUtils; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; @@ -48,7 +49,6 @@ import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class GetAllTheme extends SimpleReturnFunction { @@ -62,7 +62,7 @@ public class GetAllTheme extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final JsonArray result = new JsonArray(); try { diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java b/src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java index 244824ee3..0bd617053 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java @@ -41,13 +41,13 @@ import java.util.Set; import net.sourceforge.plantuml.json.JsonArray; import net.sourceforge.plantuml.json.JsonObject; import net.sourceforge.plantuml.json.JsonValue; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class GetJsonKey extends SimpleReturnFunction { @@ -61,7 +61,7 @@ public class GetJsonKey extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final TValue data = values.get(0); if (data.isJson() == false) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetJsonType.java b/src/net/sourceforge/plantuml/tim/stdlib/GetJsonType.java index 33d3b5b64..17a2f164a 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetJsonType.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetJsonType.java @@ -39,13 +39,13 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.json.JsonValue; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class GetJsonType extends SimpleReturnFunction { @@ -59,7 +59,7 @@ public class GetJsonType extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final TValue data = values.get(0); if (data.isString()) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetVariableValue.java b/src/net/sourceforge/plantuml/tim/stdlib/GetVariableValue.java index 082921acb..c950f7c7b 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetVariableValue.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetVariableValue.java @@ -38,13 +38,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class GetVariableValue extends SimpleReturnFunction { @@ -58,13 +58,13 @@ public class GetVariableValue extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final String name = values.get(0).toString(); final TValue variable = memory.getVariable(name); - if (variable == null) { + if (variable == null) return TValue.fromString(""); - } + return variable; } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetVersion.java b/src/net/sourceforge/plantuml/tim/stdlib/GetVersion.java index c206538cb..68e66ec23 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetVersion.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetVersion.java @@ -38,13 +38,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; import net.sourceforge.plantuml.version.Version; public class GetVersion extends SimpleReturnFunction { @@ -59,7 +59,7 @@ public class GetVersion extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { return TValue.fromString(Version.versionString()); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Getenv.java b/src/net/sourceforge/plantuml/tim/stdlib/Getenv.java index 88fd8a638..380448942 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Getenv.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Getenv.java @@ -39,13 +39,13 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.security.SecurityUtils; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class Getenv extends SimpleReturnFunction { @@ -59,7 +59,7 @@ public class Getenv extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { // ::comment when __CORE__ final String value = getenv(values.get(0).toString()); @@ -82,7 +82,7 @@ public class Getenv extends SimpleReturnFunction { // also stop here in other deployments. if (SecurityUtils.getSecurityProfile().canWeReadThisEnvironmentVariable(name) == false) return null; - + final String env = System.getProperty(name); if (env != null) return env; diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Hex2dec.java b/src/net/sourceforge/plantuml/tim/stdlib/Hex2dec.java index 27f510248..0cc471567 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Hex2dec.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Hex2dec.java @@ -38,13 +38,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class Hex2dec extends SimpleReturnFunction { @@ -58,7 +58,7 @@ public class Hex2dec extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { try { return TValue.fromInt(Integer.parseInt(values.get(0).toString(), 16)); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/HslColor.java b/src/net/sourceforge/plantuml/tim/stdlib/HslColor.java index cc1173882..2618bfbf6 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/HslColor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/HslColor.java @@ -41,13 +41,13 @@ import java.util.Set; import net.sourceforge.plantuml.klimt.color.HColors; import net.sourceforge.plantuml.klimt.color.HSLColor; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class HslColor extends SimpleReturnFunction { @@ -61,7 +61,7 @@ public class HslColor extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final int h = values.get(0).toInt(); final int s = values.get(1).toInt(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/IntVal.java b/src/net/sourceforge/plantuml/tim/stdlib/IntVal.java index 27e19db7a..b412cad9d 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/IntVal.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/IntVal.java @@ -38,13 +38,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; import net.sourceforge.plantuml.utils.Log; public class IntVal extends SimpleReturnFunction { @@ -59,7 +59,7 @@ public class IntVal extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final String s = values.get(0).toString(); try { diff --git a/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java b/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java index 5331f7b2e..64503ed11 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java @@ -38,6 +38,7 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; @@ -46,7 +47,6 @@ import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TFunctionType; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class InvokeProcedure implements TFunction { @@ -64,20 +64,20 @@ public class InvokeProcedure implements TFunction { } @Override - public void executeProcedureInternal(TContext context, TMemory memory, List args, Map named) - throws EaterException, EaterExceptionLocated { + public void executeProcedureInternal(TContext context, TMemory memory, StringLocated location, List args, + Map named) throws EaterException, EaterExceptionLocated { final String fname = args.get(0).toString(); final List sublist = args.subList(1, args.size()); final TFunctionSignature signature = new TFunctionSignature(fname, sublist.size()); final TFunction func = context.getFunctionSmart(signature); - if (func == null) { + if (func == null) throw EaterException.located("Cannot find void function " + fname); - } - func.executeProcedureInternal(context, memory, sublist, named); + + func.executeProcedureInternal(context, memory, location, sublist, named); } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) { throw new UnsupportedOperationException(); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/IsDark.java b/src/net/sourceforge/plantuml/tim/stdlib/IsDark.java index efc4299da..d8f337bf5 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/IsDark.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/IsDark.java @@ -41,13 +41,13 @@ import java.util.Set; import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.HColorSet; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class IsDark extends SimpleReturnFunction { @@ -62,7 +62,7 @@ public class IsDark extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final String colorString = values.get(0).toString(); try { diff --git a/src/net/sourceforge/plantuml/tim/stdlib/IsLight.java b/src/net/sourceforge/plantuml/tim/stdlib/IsLight.java index deff7b24d..e298e1baa 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/IsLight.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/IsLight.java @@ -41,13 +41,13 @@ import java.util.Set; import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.HColorSet; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class IsLight extends SimpleReturnFunction { @@ -62,7 +62,7 @@ public class IsLight extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final String colorString = values.get(0).toString(); try { diff --git a/src/net/sourceforge/plantuml/tim/stdlib/JsonKeyExists.java b/src/net/sourceforge/plantuml/tim/stdlib/JsonKeyExists.java index 85eafc540..71d6eaed8 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/JsonKeyExists.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/JsonKeyExists.java @@ -40,13 +40,13 @@ import java.util.Set; import net.sourceforge.plantuml.json.JsonObject; import net.sourceforge.plantuml.json.JsonValue; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class JsonKeyExists extends SimpleReturnFunction { @@ -60,7 +60,7 @@ public class JsonKeyExists extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final TValue arg0 = values.get(0); if (arg0.isJson() == false) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Lighten.java b/src/net/sourceforge/plantuml/tim/stdlib/Lighten.java index e4de200fe..ac69bf9e4 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Lighten.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Lighten.java @@ -41,13 +41,13 @@ import java.util.Set; import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.HColorSet; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class Lighten extends SimpleReturnFunction { @@ -62,7 +62,7 @@ public class Lighten extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final String colorString = values.get(0).toString(); final int ratio = values.get(1).toInt(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java b/src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java index a5021562c..58e6a74bf 100755 --- a/src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java @@ -49,13 +49,13 @@ import net.sourceforge.plantuml.json.ParseException; import net.sourceforge.plantuml.log.Logme; import net.sourceforge.plantuml.security.SFile; import net.sourceforge.plantuml.security.SURL; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; /** * Loads JSON data from file or URL source. @@ -108,7 +108,7 @@ public class LoadJson extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final String path = values.get(0).toString(); try { diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalAnd.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalAnd.java index 4fe2d2a14..3770e1b05 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalAnd.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalAnd.java @@ -38,13 +38,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class LogicalAnd extends SimpleReturnFunction { @@ -58,7 +58,7 @@ public class LogicalAnd extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { for (TValue v : values) if (v.toBoolean() == false) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNand.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNand.java index 9b018d3c0..7d655c92f 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNand.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNand.java @@ -38,13 +38,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class LogicalNand extends SimpleReturnFunction { @@ -58,7 +58,7 @@ public class LogicalNand extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { for (TValue v : values) if (v.toBoolean() == false) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNor.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNor.java index 95c4e3c6d..12b003616 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNor.java @@ -38,13 +38,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class LogicalNor extends SimpleReturnFunction { @@ -58,7 +58,7 @@ public class LogicalNor extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { for (TValue v : values) if (v.toBoolean() == true) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNot.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNot.java index ca6d5ab3a..7ffb3689e 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNot.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNot.java @@ -38,13 +38,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class LogicalNot extends SimpleReturnFunction { @@ -58,7 +58,7 @@ public class LogicalNot extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final boolean arg = values.get(0).toBoolean(); return TValue.fromBoolean(!arg); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNxor.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNxor.java index e83c05b1e..a5ed319e3 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNxor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNxor.java @@ -38,13 +38,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class LogicalNxor extends SimpleReturnFunction { @@ -58,7 +58,7 @@ public class LogicalNxor extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { int cpt = 0; for (TValue v : values) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalOr.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalOr.java index 41026ac89..e78dcc546 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalOr.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalOr.java @@ -38,13 +38,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class LogicalOr extends SimpleReturnFunction { @@ -58,7 +58,7 @@ public class LogicalOr extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { for (TValue v : values) if (v.toBoolean() == true) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalXor.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalXor.java index 14ad07a5e..da04addf5 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalXor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalXor.java @@ -38,13 +38,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class LogicalXor extends SimpleReturnFunction { @@ -58,7 +58,7 @@ public class LogicalXor extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { int cpt = 0; for (TValue v : values) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Lower.java b/src/net/sourceforge/plantuml/tim/stdlib/Lower.java index d0dbcb731..721a521b8 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Lower.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Lower.java @@ -38,11 +38,11 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class Lower extends SimpleReturnFunction { @@ -56,7 +56,7 @@ public class Lower extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) { return TValue.fromString(values.get(0).toString().toLowerCase()); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Newline.java b/src/net/sourceforge/plantuml/tim/stdlib/Newline.java index 2f5c7abb7..d3b4b8768 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Newline.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Newline.java @@ -38,11 +38,11 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class Newline extends SimpleReturnFunction { @@ -56,7 +56,7 @@ public class Newline extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) { return TValue.fromString("\n"); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Now.java b/src/net/sourceforge/plantuml/tim/stdlib/Now.java index c90eb25d1..f827d6e9f 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Now.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Now.java @@ -38,13 +38,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class Now extends SimpleReturnFunction { @@ -58,7 +58,7 @@ public class Now extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final long now = System.currentTimeMillis() / 1000L; return TValue.fromInt((int) now); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Ord.java b/src/net/sourceforge/plantuml/tim/stdlib/Ord.java index bf0f7d767..8ae31e5c4 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Ord.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Ord.java @@ -38,13 +38,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class Ord extends SimpleReturnFunction { @@ -58,7 +58,7 @@ public class Ord extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { try { final int codePoint = values.get(0).toString().codePointAt(0); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java b/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java index a165f00a4..bf7786f5c 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java @@ -39,13 +39,13 @@ import java.util.Map; import java.util.Random; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class RandomFunction extends SimpleReturnFunction { @@ -59,25 +59,25 @@ public class RandomFunction extends SimpleReturnFunction { } private final Random random = new Random(); - + @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { switch (values.size()) { - case 0: - return TValue.fromInt(random.nextInt(2)); + case 0: + return TValue.fromInt(random.nextInt(2)); - case 1: - final Integer mx = values.get(0).toInt(); - return TValue.fromInt(random.nextInt(mx)); + case 1: + final Integer mx = values.get(0).toInt(); + return TValue.fromInt(random.nextInt(mx)); - case 2: - final Integer min = values.get(0).toInt(); - final Integer max = values.get(1).toInt(); - return TValue.fromInt(random.nextInt(max - min) + min); + case 2: + final Integer min = values.get(0).toInt(); + final Integer max = values.get(1).toInt(); + return TValue.fromInt(random.nextInt(max - min) + min); - default: - throw EaterException.located("Error on Random: Too many argument"); + default: + throw EaterException.located("Error on Random: Too many argument"); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/RetrieveProcedure.java b/src/net/sourceforge/plantuml/tim/stdlib/RetrieveProcedure.java index fa75ab946..8c31c3520 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/RetrieveProcedure.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/RetrieveProcedure.java @@ -39,6 +39,7 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; @@ -46,7 +47,6 @@ import net.sourceforge.plantuml.tim.TFunction; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class RetrieveProcedure extends SimpleReturnFunction { @@ -60,14 +60,14 @@ public class RetrieveProcedure extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final String fname = values.get(0).toString(); final List args = values.subList(1, values.size()); final TFunctionSignature signature = new TFunctionSignature(fname, args.size()); final TFunction func = context.getFunctionSmart(signature); final int n1 = context.getResultList().size(); - func.executeProcedureInternal(context, memory, args, Collections.emptyMap()); + func.executeProcedureInternal(context, memory, location, args, Collections.emptyMap()); final String extracted = context.extractFromResultList(n1); return TValue.fromString(extracted); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/ReverseColor.java b/src/net/sourceforge/plantuml/tim/stdlib/ReverseColor.java index 6084e16d1..43521f070 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/ReverseColor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/ReverseColor.java @@ -41,13 +41,13 @@ import java.util.Set; import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.HColorSet; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class ReverseColor extends SimpleReturnFunction { @@ -61,7 +61,7 @@ public class ReverseColor extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final String colorString = values.get(0).toString(); try { diff --git a/src/net/sourceforge/plantuml/tim/stdlib/ReverseHsluvColor.java b/src/net/sourceforge/plantuml/tim/stdlib/ReverseHsluvColor.java index 6a42843f7..bcfaa72b9 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/ReverseHsluvColor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/ReverseHsluvColor.java @@ -41,13 +41,13 @@ import java.util.Set; import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.HColorSet; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class ReverseHsluvColor extends SimpleReturnFunction { @@ -61,7 +61,7 @@ public class ReverseHsluvColor extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final String colorString = values.get(0).toString(); try { diff --git a/src/net/sourceforge/plantuml/tim/stdlib/SetVariableValue.java b/src/net/sourceforge/plantuml/tim/stdlib/SetVariableValue.java index a35ec7786..1dd202157 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/SetVariableValue.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/SetVariableValue.java @@ -38,6 +38,7 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; @@ -45,7 +46,6 @@ import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.TVariableScope; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class SetVariableValue extends SimpleReturnFunction { @@ -59,7 +59,7 @@ public class SetVariableValue extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { // if (memory instanceof TMemoryLocal) { // memory = ((TMemoryLocal) memory).getGlobalForInternalUseOnly(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/SimpleReturnFunction.java b/src/net/sourceforge/plantuml/tim/stdlib/SimpleReturnFunction.java index f276bcbdd..c649a86a4 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/SimpleReturnFunction.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/SimpleReturnFunction.java @@ -37,13 +37,13 @@ package net.sourceforge.plantuml.tim.stdlib; import java.util.List; import java.util.Map; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunction; import net.sourceforge.plantuml.tim.TFunctionType; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public abstract class SimpleReturnFunction implements TFunction { @@ -52,8 +52,8 @@ public abstract class SimpleReturnFunction implements TFunction { } @Override - final public void executeProcedureInternal(TContext context, TMemory memory, List args, - Map named) throws EaterException { + final public void executeProcedureInternal(TContext context, TMemory memory, StringLocated location, + List args, Map named) throws EaterException { throw new UnsupportedOperationException(); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Size.java b/src/net/sourceforge/plantuml/tim/stdlib/Size.java index 0794bca42..0bf62d6d6 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Size.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Size.java @@ -41,13 +41,13 @@ import java.util.Set; import net.sourceforge.plantuml.json.JsonArray; import net.sourceforge.plantuml.json.JsonObject; import net.sourceforge.plantuml.json.JsonValue; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class Size extends SimpleReturnFunction { @@ -61,7 +61,7 @@ public class Size extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final TValue value = values.get(0); if (value.isNumber()) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/SplitStr.java b/src/net/sourceforge/plantuml/tim/stdlib/SplitStr.java index d9aa2fded..5e181ffca 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/SplitStr.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/SplitStr.java @@ -40,13 +40,13 @@ import java.util.Set; import java.util.StringTokenizer; import net.sourceforge.plantuml.json.JsonArray; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class SplitStr extends SimpleReturnFunction { @@ -60,7 +60,7 @@ public class SplitStr extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final JsonArray result = new JsonArray(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/StringFunction.java b/src/net/sourceforge/plantuml/tim/stdlib/StringFunction.java index f2b972a80..de63add20 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/StringFunction.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/StringFunction.java @@ -38,11 +38,11 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class StringFunction extends SimpleReturnFunction { @@ -56,7 +56,7 @@ public class StringFunction extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) { return TValue.fromString(values.get(0).toString()); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Strlen.java b/src/net/sourceforge/plantuml/tim/stdlib/Strlen.java index 3e1578fba..3aeb5b609 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Strlen.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Strlen.java @@ -38,13 +38,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class Strlen extends SimpleReturnFunction { @@ -58,7 +58,7 @@ public class Strlen extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { return TValue.fromInt(values.get(0).toString().length()); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Strpos.java b/src/net/sourceforge/plantuml/tim/stdlib/Strpos.java index 09a5c43a9..8db94424f 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Strpos.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Strpos.java @@ -38,13 +38,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class Strpos extends SimpleReturnFunction { @@ -58,7 +58,7 @@ public class Strpos extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final String full = values.get(0).toString(); final String searched = values.get(1).toString(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Substr.java b/src/net/sourceforge/plantuml/tim/stdlib/Substr.java index ba0c0e8ce..ec254565b 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Substr.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Substr.java @@ -38,13 +38,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class Substr extends SimpleReturnFunction { @@ -58,7 +58,7 @@ public class Substr extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final String full = values.get(0).toString(); final int pos = values.get(1).toInt(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Upper.java b/src/net/sourceforge/plantuml/tim/stdlib/Upper.java index 98caf89ff..71ebe587e 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Upper.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Upper.java @@ -38,11 +38,11 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class Upper extends SimpleReturnFunction { @@ -56,7 +56,7 @@ public class Upper extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) { return TValue.fromString(values.get(0).toString().toUpperCase()); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/VariableExists.java b/src/net/sourceforge/plantuml/tim/stdlib/VariableExists.java index a63730447..3f06d5e62 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/VariableExists.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/VariableExists.java @@ -38,13 +38,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class VariableExists extends SimpleReturnFunction { @@ -58,7 +58,7 @@ public class VariableExists extends SimpleReturnFunction { } @Override - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, + public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, Map named) throws EaterException, EaterExceptionLocated { final String name = values.get(0).toString(); return TValue.fromBoolean(memory.getVariable(name) != null); diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index 50dd4b24e..77f7aa10b 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -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.2024.4beta1"; + private static final String version = "1.2024.4beta2"; public static String versionString() { return version; From 6329d9a8d5cf69cec80e3aefe0c74f9f3204c133 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Thu, 22 Feb 2024 19:32:38 +0100 Subject: [PATCH 87/95] refactor: prepare preprocessor error improvement (in progress) https://github.com/plantuml/plantuml/pull/1668 --- gradle.properties | 2 +- src/net/sourceforge/plantuml/BlockUml.java | 2 +- .../sourceforge/plantuml/preproc/Defines.java | 43 ++++++----- .../sourceforge/plantuml/preproc/Truth.java | 1 + .../plantuml/preproc2/PreprocessorUtils.java | 10 +-- src/net/sourceforge/plantuml/tim/Eater.java | 28 ++++---- .../plantuml/tim/EaterAffectation.java | 4 +- .../plantuml/tim/EaterAffectationDefine.java | 2 +- .../sourceforge/plantuml/tim/EaterAssert.java | 4 +- .../plantuml/tim/EaterDeclareProcedure.java | 5 +- .../tim/EaterDeclareReturnFunction.java | 5 +- .../plantuml/tim/EaterException.java | 10 +-- .../plantuml/tim/EaterFunctionCall.java | 8 +-- .../plantuml/tim/EaterInclude.java | 8 +-- .../plantuml/tim/EaterIncludesub.java | 8 +-- .../plantuml/tim/EaterLegacyDefine.java | 2 +- .../plantuml/tim/EaterLegacyDefineLong.java | 2 +- .../plantuml/tim/EaterStartsub.java | 6 +- .../sourceforge/plantuml/tim/EaterTheme.java | 14 ++-- .../plantuml/tim/FunctionsSet.java | 72 +++++++++---------- .../sourceforge/plantuml/tim/TContext.java | 54 +++++++------- .../plantuml/tim/TFunctionImpl.java | 4 +- src/net/sourceforge/plantuml/tim/TMemory.java | 4 +- .../plantuml/tim/TMemoryGlobal.java | 18 +++-- .../plantuml/tim/TMemoryLocal.java | 43 ++++++----- .../sourceforge/plantuml/tim/TimLoader.java | 4 +- .../plantuml/tim/VariableManager.java | 44 ++++++------ .../expression/ReversePolishInterpretor.java | 44 +++++------- .../plantuml/tim/expression/ShuntingYard.java | 6 +- .../plantuml/tim/expression/TokenStack.java | 23 +++--- .../tim/iterator/AbstractCodeIterator.java | 8 ++- .../plantuml/tim/iterator/CodeIterator.java | 4 +- .../tim/iterator/CodeIteratorAffectation.java | 7 +- .../tim/iterator/CodeIteratorForeach.java | 19 +++-- .../plantuml/tim/iterator/CodeIteratorIf.java | 21 +++--- .../tim/iterator/CodeIteratorImpl.java | 24 ++++--- .../tim/iterator/CodeIteratorSub.java | 18 ++--- .../tim/iterator/CodeIteratorWhile.java | 13 ++-- .../plantuml/tim/stdlib/CallUserFunction.java | 6 +- .../plantuml/tim/stdlib/Darken.java | 2 +- .../plantuml/tim/stdlib/DateFunction.java | 3 +- .../plantuml/tim/stdlib/GetAllStdlib.java | 3 +- .../plantuml/tim/stdlib/GetJsonKey.java | 5 +- .../plantuml/tim/stdlib/InvokeProcedure.java | 2 +- .../plantuml/tim/stdlib/IsDark.java | 2 +- .../plantuml/tim/stdlib/IsLight.java | 2 +- .../plantuml/tim/stdlib/Lighten.java | 2 +- .../plantuml/tim/stdlib/LoadJson.java | 5 +- .../plantuml/tim/stdlib/RandomFunction.java | 3 +- .../plantuml/tim/stdlib/ReverseColor.java | 2 +- .../tim/stdlib/ReverseHsluvColor.java | 2 +- .../plantuml/tim/stdlib/SetVariableValue.java | 2 +- .../sourceforge/plantuml/version/Version.java | 2 +- 53 files changed, 331 insertions(+), 306 deletions(-) diff --git a/gradle.properties b/gradle.properties index 4336095e9..acb37ac5e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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.2024.4beta2 +version = 1.2024.4beta3 org.gradle.workers.max = 3 \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/BlockUml.java b/src/net/sourceforge/plantuml/BlockUml.java index 9a4229bad..b5c6b76c7 100644 --- a/src/net/sourceforge/plantuml/BlockUml.java +++ b/src/net/sourceforge/plantuml/BlockUml.java @@ -143,7 +143,7 @@ public class BlockUml { this.data = new ArrayList<>(strings); } else { final TimLoader timLoader = new TimLoader(mode.getImportedFiles(), defines, charset, - (DefinitionsContainer) mode); + (DefinitionsContainer) mode, strings.get(0)); this.included.addAll(timLoader.load(strings)); this.data = timLoader.getResultList(); this.debug = timLoader.getDebug(); diff --git a/src/net/sourceforge/plantuml/preproc/Defines.java b/src/net/sourceforge/plantuml/preproc/Defines.java index ed1478741..14ec49a0e 100644 --- a/src/net/sourceforge/plantuml/preproc/Defines.java +++ b/src/net/sourceforge/plantuml/preproc/Defines.java @@ -55,6 +55,7 @@ import net.sourceforge.plantuml.file.AParentFolder; import net.sourceforge.plantuml.security.SFile; import net.sourceforge.plantuml.security.SecurityProfile; import net.sourceforge.plantuml.security.SecurityUtils; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.TVariableScope; @@ -81,11 +82,11 @@ public class Defines implements Truth { return new Defines(); } - public void copyTo(TMemory memory) throws EaterException { + public void copyTo(TMemory memory, StringLocated location) throws EaterException { for (Entry ent : values.entrySet()) { final String name = ent.getKey(); final Define def = ent.getValue(); - memory.putVariable(name, def.asTVariable(), TVariableScope.GLOBAL); + memory.putVariable(name, def.asTVariable(), TVariableScope.GLOBAL, location); } } @@ -114,10 +115,10 @@ public class Defines implements Truth { final Defines result = createEmpty(); result.overrideFilename(file.getName()); result.environment.put("filedate", new Date(file.lastModified()).toString()); - if (SecurityUtils.getSecurityProfile() == SecurityProfile.UNSECURE) { + if (SecurityUtils.getSecurityProfile() == SecurityProfile.UNSECURE) result.environment.put("dirpath", file.getAbsoluteFile().getParentFile().getAbsolutePath().replace('\\', '/')); - } + return result; } @@ -126,10 +127,10 @@ public class Defines implements Truth { final Defines result = createEmpty(); result.overrideFilename(file.getName()); result.environment.put("filedate", new Date(file.lastModified()).toString()); - if (SecurityUtils.getSecurityProfile() == SecurityProfile.UNSECURE) { + if (SecurityUtils.getSecurityProfile() == SecurityProfile.UNSECURE) result.environment.put("dirpath", file.getAbsoluteFile().getParentFile().getAbsolutePath().replace('\\', '/')); - } + return result; } @@ -147,9 +148,9 @@ public class Defines implements Truth { private static String nameNoExtension(String name) { final int x = name.lastIndexOf('.'); - if (x == -1) { + if (x == -1) return name; - } + return name.substring(0, x); } @@ -169,11 +170,10 @@ public class Defines implements Truth { } public boolean isTrue(String name) { - for (String key : values.keySet()) { - if (key.equals(name) || key.startsWith(name + "(")) { + for (String key : values.keySet()) + if (key.equals(name) || key.startsWith(name + "(")) return true; - } - } + return false; } @@ -192,9 +192,9 @@ public class Defines implements Truth { } private String method1(String line) { - for (Define def : values.values()) { + for (Define def : values.values()) line = def.apply(line); - } + return line; } @@ -215,18 +215,17 @@ public class Defines implements Truth { private String method2(String line) { final Set words = words(line); - if (magic == null) { + if (magic == null) magic = getAll(); - } for (String w : words) { Collection tmp = magic.get(w); - if (tmp == null) { + if (tmp == null) continue; - } - for (Define def : tmp) { + + for (Define def : tmp) line = def.apply(line); - } + } return line; } @@ -236,9 +235,9 @@ public class Defines implements Truth { Pattern p = Pattern.compile(ID); Matcher m = p.matcher(line); final Set words = new HashSet<>(); - while (m.find()) { + while (m.find()) words.add(m.group(0)); - } + return words; } diff --git a/src/net/sourceforge/plantuml/preproc/Truth.java b/src/net/sourceforge/plantuml/preproc/Truth.java index 7a33da793..1ec283d02 100644 --- a/src/net/sourceforge/plantuml/preproc/Truth.java +++ b/src/net/sourceforge/plantuml/preproc/Truth.java @@ -36,6 +36,7 @@ package net.sourceforge.plantuml.preproc; public interface Truth { + public boolean isTrue(String name); } diff --git a/src/net/sourceforge/plantuml/preproc2/PreprocessorUtils.java b/src/net/sourceforge/plantuml/preproc2/PreprocessorUtils.java index ee238c99c..4ed855154 100644 --- a/src/net/sourceforge/plantuml/preproc2/PreprocessorUtils.java +++ b/src/net/sourceforge/plantuml/preproc2/PreprocessorUtils.java @@ -139,21 +139,21 @@ public class PreprocessorUtils { if (StartDiagramExtractReader.containsStartDiagram(url, s, charset)) return StartDiagramExtractReader.build(url, s, suf, charset); - return getReaderInclude(url, s.getLocation(), charset); + return getReaderInclude(url, s, charset); } catch (IOException e) { Logme.error(e); - throw EaterException.located("Cannot open URL " + e.getMessage()); + throw EaterException.located("Cannot open URL " + e.getMessage(), s); } } - public static ReadLine getReaderInclude(SURL url, LineLocation lineLocation, Charset charset) + public static ReadLine getReaderInclude(SURL url, StringLocated s, Charset charset) throws EaterException, UnsupportedEncodingException { final InputStream is = url.openStream(); if (is == null) - throw EaterException.located("Cannot open URL"); + throw EaterException.located("Cannot open URL", s); - return ReadLineReader.create(new InputStreamReader(is, charset), url.toString(), lineLocation); + return ReadLineReader.create(new InputStreamReader(is, charset), url.toString(), s.getLocation()); } } diff --git a/src/net/sourceforge/plantuml/tim/Eater.java b/src/net/sourceforge/plantuml/tim/Eater.java index 193a62c5f..3ccc10440 100644 --- a/src/net/sourceforge/plantuml/tim/Eater.java +++ b/src/net/sourceforge/plantuml/tim/Eater.java @@ -93,7 +93,7 @@ public abstract class Eater { final TokenStack tokenStack = new TokenStack(); addIntoTokenStack(tokenStack, false); if (tokenStack.size() == 0) - throw EaterException.located("Missing expression"); + throw EaterException.located("Missing expression", stringLocated); return tokenStack; } @@ -121,7 +121,7 @@ public abstract class Eater { final public String eatAndGetQuotedString() throws EaterException { final char separator = peekChar(); if (TLineType.isQuote(separator) == false) - throw EaterException.located("quote10"); + throw EaterException.located("quote10", stringLocated); checkAndEatChar(separator); final StringBuilder value = new StringBuilder(); @@ -142,7 +142,7 @@ public abstract class Eater { while (true) { char ch = peekChar(); if (ch == 0) - throw EaterException.located("until001"); + throw EaterException.located("until001", stringLocated); if (level == 0 && (ch == ',' || ch == ')')) return value.toString().trim(); @@ -190,7 +190,7 @@ public abstract class Eater { final protected String eatAndGetVarname() throws EaterException { final StringBuilder varname = new StringBuilder("" + eatOneChar()); if (TLineType.isLetterOrUnderscoreOrDollar(varname.charAt(0)) == false) - throw EaterException.located("a002"); + throw EaterException.located("a002", stringLocated); addUpToLastLetterOrUnderscoreOrDigit(varname); return varname.toString(); @@ -199,7 +199,7 @@ public abstract class Eater { final protected String eatAndGetFunctionName() throws EaterException { final StringBuilder varname = new StringBuilder("" + eatOneChar()); if (TLineType.isLetterOrUnderscoreOrDollar(varname.charAt(0)) == false) - throw EaterException.located("a003"); + throw EaterException.located("a003", stringLocated); addUpToLastLetterOrUnderscoreOrDigit(varname); return varname.toString(); @@ -249,7 +249,7 @@ public abstract class Eater { final protected void checkAndEatChar(char ch) throws EaterException { if (i >= stringLocated.length() || stringLocated.charAt(i) != ch) - throw EaterException.located("a001"); + throw EaterException.located("a001", stringLocated); i++; } @@ -299,7 +299,7 @@ public abstract class Eater { } final protected TFunctionImpl eatDeclareFunction(TContext context, TMemory memory, boolean unquoted, - LineLocation location, boolean allowNoParenthesis, TFunctionType type) + StringLocated location, boolean allowNoParenthesis, TFunctionType type) throws EaterException, EaterExceptionLocated { final List args = new ArrayList<>(); final String functionName = eatAndGetFunctionName(); @@ -308,7 +308,7 @@ public abstract class Eater { if (allowNoParenthesis) return new TFunctionImpl(functionName, args, unquoted, type); - throw EaterException.located("Missing opening parenthesis"); + throw EaterException.located("Missing opening parenthesis", stringLocated); } while (true) { skipSpaces(); @@ -320,7 +320,7 @@ public abstract class Eater { if (peekChar() == '=') { eatOneChar(); final TokenStack def = TokenStack.eatUntilCloseParenthesisOrComma(this); - def.guessFunctions(); + def.guessFunctions(location); defValue = def.getResult(getStringLocated(), context, memory); // System.err.println("result=" + defValue); } else { @@ -333,7 +333,7 @@ public abstract class Eater { checkAndEatChar(")"); break; } else { - throw EaterException.located("Error in function definition"); + throw EaterException.located("Error in function definition", stringLocated); } } skipSpaces(); @@ -341,25 +341,25 @@ public abstract class Eater { } final protected TFunctionImpl eatDeclareReturnFunctionWithOptionalReturn(TContext context, TMemory memory, - boolean unquoted, LineLocation location) throws EaterException, EaterExceptionLocated { + boolean unquoted, StringLocated location) throws EaterException, EaterExceptionLocated { final TFunctionImpl result = eatDeclareFunction(context, memory, unquoted, location, false, TFunctionType.RETURN_FUNCTION); if (peekChar() == 'r') { checkAndEatChar("return"); skipSpaces(); final String line = "!return " + eatAllToEnd(); - result.addBody(new StringLocated(line, location)); + result.addBody(new StringLocated(line, location.getLocation())); } else if (peekChar() == '!') { checkAndEatChar("!return"); skipSpaces(); final String line = "!return " + eatAllToEnd(); - result.addBody(new StringLocated(line, location)); + result.addBody(new StringLocated(line, location.getLocation())); } return result; } final protected TFunctionImpl eatDeclareProcedure(TContext context, TMemory memory, boolean unquoted, - LineLocation location) throws EaterException, EaterExceptionLocated { + StringLocated location) throws EaterException, EaterExceptionLocated { final TFunctionImpl result = eatDeclareFunction(context, memory, unquoted, location, false, TFunctionType.PROCEDURE); return result; diff --git a/src/net/sourceforge/plantuml/tim/EaterAffectation.java b/src/net/sourceforge/plantuml/tim/EaterAffectation.java index 99d25e20f..726ef28f8 100644 --- a/src/net/sourceforge/plantuml/tim/EaterAffectation.java +++ b/src/net/sourceforge/plantuml/tim/EaterAffectation.java @@ -53,7 +53,7 @@ public class EaterAffectation extends Eater { if (scope != null) { skipSpaces(); if (peekChar() == '?' || peekChar() == '=') { - // The variable itself is "local" or "glocal", which is not a good idea by the + // The variable itself is "local" or "global", which is not a good idea by the // way scope = null; } else @@ -72,7 +72,7 @@ public class EaterAffectation extends Eater { skipSpaces(); final TValue value = eatExpression(context, memory); - memory.putVariable(varname, value, scope); + memory.putVariable(varname, value, scope, getStringLocated()); } } diff --git a/src/net/sourceforge/plantuml/tim/EaterAffectationDefine.java b/src/net/sourceforge/plantuml/tim/EaterAffectationDefine.java index c6cb3fbd2..aa689aeab 100644 --- a/src/net/sourceforge/plantuml/tim/EaterAffectationDefine.java +++ b/src/net/sourceforge/plantuml/tim/EaterAffectationDefine.java @@ -56,7 +56,7 @@ public class EaterAffectationDefine extends Eater { // if (memory instanceof TMemoryLocal) { // memory = ((TMemoryLocal) memory).getGlobalForInternalUseOnly(); // } - memory.putVariable(varname, value, TVariableScope.GLOBAL); + memory.putVariable(varname, value, TVariableScope.GLOBAL, getStringLocated()); } } diff --git a/src/net/sourceforge/plantuml/tim/EaterAssert.java b/src/net/sourceforge/plantuml/tim/EaterAssert.java index 1858579ee..e854c06ad 100644 --- a/src/net/sourceforge/plantuml/tim/EaterAssert.java +++ b/src/net/sourceforge/plantuml/tim/EaterAssert.java @@ -55,9 +55,9 @@ public class EaterAssert extends Eater { if (ch == ':') { checkAndEatChar(':'); final TValue message = eatExpression(context, memory); - throw EaterException.located("Assertion error : " + message.toString()); + throw EaterException.located("Assertion error : " + message.toString(), getStringLocated()); } - throw EaterException.located("Assertion error"); + throw EaterException.located("Assertion error", getStringLocated()); } } diff --git a/src/net/sourceforge/plantuml/tim/EaterDeclareProcedure.java b/src/net/sourceforge/plantuml/tim/EaterDeclareProcedure.java index 43dc732c3..9c155df18 100644 --- a/src/net/sourceforge/plantuml/tim/EaterDeclareProcedure.java +++ b/src/net/sourceforge/plantuml/tim/EaterDeclareProcedure.java @@ -35,17 +35,16 @@ package net.sourceforge.plantuml.tim; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.utils.LineLocation; public class EaterDeclareProcedure extends Eater { private TFunctionImpl function; - private final LineLocation location; + private final StringLocated location; private boolean finalFlag; public EaterDeclareProcedure(StringLocated s) { super(s.getTrimmed()); - this.location = s.getLocation(); + this.location = s; } @Override diff --git a/src/net/sourceforge/plantuml/tim/EaterDeclareReturnFunction.java b/src/net/sourceforge/plantuml/tim/EaterDeclareReturnFunction.java index e02ad1e30..8c6415d1a 100644 --- a/src/net/sourceforge/plantuml/tim/EaterDeclareReturnFunction.java +++ b/src/net/sourceforge/plantuml/tim/EaterDeclareReturnFunction.java @@ -35,17 +35,16 @@ package net.sourceforge.plantuml.tim; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.utils.LineLocation; public class EaterDeclareReturnFunction extends Eater { private TFunctionImpl function; - private final LineLocation location; + private final StringLocated location; private boolean finalFlag; public EaterDeclareReturnFunction(StringLocated s) { super(s.getTrimmed()); - this.location = s.getLocation(); + this.location = s; } @Override diff --git a/src/net/sourceforge/plantuml/tim/EaterException.java b/src/net/sourceforge/plantuml/tim/EaterException.java index 94cf2a604..ee3439e13 100644 --- a/src/net/sourceforge/plantuml/tim/EaterException.java +++ b/src/net/sourceforge/plantuml/tim/EaterException.java @@ -40,16 +40,16 @@ public class EaterException extends Exception { private final String message; - private EaterException(String message) { + private EaterException(String message, StringLocated location) { this.message = message; } - public static EaterException unlocated(String message) { - return new EaterException(message); + public static EaterException unlocated(String message, StringLocated location) { + return new EaterException(message, location); } - public static EaterException located(String message) { - return unlocated(message); + public static EaterException located(String message, StringLocated location) { + return unlocated(message, location); } public final String getMessage() { diff --git a/src/net/sourceforge/plantuml/tim/EaterFunctionCall.java b/src/net/sourceforge/plantuml/tim/EaterFunctionCall.java index 1c116eab0..8e703fde8 100644 --- a/src/net/sourceforge/plantuml/tim/EaterFunctionCall.java +++ b/src/net/sourceforge/plantuml/tim/EaterFunctionCall.java @@ -100,12 +100,12 @@ public class EaterFunctionCall extends Eater { checkAndEatChar('='); skipSpaces(); final TokenStack tokens = TokenStack.eatUntilCloseParenthesisOrComma(this).withoutSpace(); - tokens.guessFunctions(); + tokens.guessFunctions(getStringLocated()); final TValue result = tokens.getResult(getStringLocated(), context, memory); namedArguments.put(varname, result); } else { final TokenStack tokens = TokenStack.eatUntilCloseParenthesisOrComma(this).withoutSpace(); - tokens.guessFunctions(); + tokens.guessFunctions(getStringLocated()); final TValue result = tokens.getResult(getStringLocated(), context, memory); values.add(result); } @@ -119,9 +119,9 @@ public class EaterFunctionCall extends Eater { break; } if (unquoted) { - throw EaterException.located("unquoted function/procedure cannot use expression."); + throw EaterException.located("unquoted function/procedure cannot use expression.", getStringLocated()); } - throw EaterException.located("call001"); + throw EaterException.located("call001", getStringLocated()); } } diff --git a/src/net/sourceforge/plantuml/tim/EaterInclude.java b/src/net/sourceforge/plantuml/tim/EaterInclude.java index dd16097f9..5366d8a4a 100644 --- a/src/net/sourceforge/plantuml/tim/EaterInclude.java +++ b/src/net/sourceforge/plantuml/tim/EaterInclude.java @@ -39,7 +39,7 @@ import net.sourceforge.plantuml.text.StringLocated; public class EaterInclude extends Eater { - private String location; + private String what; private PreprocessorIncludeStrategy strategy = PreprocessorIncludeStrategy.DEFAULT; public EaterInclude(StringLocated s) { @@ -65,15 +65,15 @@ public class EaterInclude extends Eater { } } skipSpaces(); - this.location = context.applyFunctionsAndVariables(memory, + this.what = context.applyFunctionsAndVariables(memory, new StringLocated(this.eatAllToEnd(), getLineLocation())); // final TValue value = eatExpression(context, memory); // this.location = value.toString(); } - public final String getLocation() { - return location; + public final String getWhat() { + return what; } public final PreprocessorIncludeStrategy getPreprocessorIncludeStrategy() { diff --git a/src/net/sourceforge/plantuml/tim/EaterIncludesub.java b/src/net/sourceforge/plantuml/tim/EaterIncludesub.java index cfd9da7dc..bd93e2e1e 100644 --- a/src/net/sourceforge/plantuml/tim/EaterIncludesub.java +++ b/src/net/sourceforge/plantuml/tim/EaterIncludesub.java @@ -38,7 +38,7 @@ import net.sourceforge.plantuml.text.StringLocated; public class EaterIncludesub extends Eater { - private String location; + private String what; public EaterIncludesub(StringLocated s) { super(s); @@ -49,13 +49,13 @@ public class EaterIncludesub extends Eater { skipSpaces(); checkAndEatChar("!includesub"); skipSpaces(); - this.location = context.applyFunctionsAndVariables(memory, + this.what = context.applyFunctionsAndVariables(memory, new StringLocated(this.eatAllToEnd(), getLineLocation())); } - public final String getLocation() { - return location; + public final String getWhat() { + return what; } } diff --git a/src/net/sourceforge/plantuml/tim/EaterLegacyDefine.java b/src/net/sourceforge/plantuml/tim/EaterLegacyDefine.java index bd82decbe..532470560 100644 --- a/src/net/sourceforge/plantuml/tim/EaterLegacyDefine.java +++ b/src/net/sourceforge/plantuml/tim/EaterLegacyDefine.java @@ -49,7 +49,7 @@ public class EaterLegacyDefine extends Eater { skipSpaces(); checkAndEatChar("!define"); skipSpaces(); - function = eatDeclareFunction(context, memory, true, getLineLocation(), false, TFunctionType.LEGACY_DEFINE); + function = eatDeclareFunction(context, memory, true, getStringLocated(), false, TFunctionType.LEGACY_DEFINE); final String def = this.eatAllToEnd(); // function.setFunctionType(TFunctionType.LEGACY_DEFINE); function.setLegacyDefinition(def); diff --git a/src/net/sourceforge/plantuml/tim/EaterLegacyDefineLong.java b/src/net/sourceforge/plantuml/tim/EaterLegacyDefineLong.java index 56a10e488..54a782553 100644 --- a/src/net/sourceforge/plantuml/tim/EaterLegacyDefineLong.java +++ b/src/net/sourceforge/plantuml/tim/EaterLegacyDefineLong.java @@ -49,7 +49,7 @@ public class EaterLegacyDefineLong extends Eater { skipSpaces(); checkAndEatChar("!definelong"); skipSpaces(); - function = eatDeclareFunction(context, memory, true, getLineLocation(), true, TFunctionType.LEGACY_DEFINELONG); + function = eatDeclareFunction(context, memory, true, getStringLocated(), true, TFunctionType.LEGACY_DEFINELONG); // function.setFunctionType(TFunctionType.LEGACY_DEFINELONG); } diff --git a/src/net/sourceforge/plantuml/tim/EaterStartsub.java b/src/net/sourceforge/plantuml/tim/EaterStartsub.java index 44a1ba175..9bb1a02c9 100644 --- a/src/net/sourceforge/plantuml/tim/EaterStartsub.java +++ b/src/net/sourceforge/plantuml/tim/EaterStartsub.java @@ -50,9 +50,9 @@ public class EaterStartsub extends Eater { checkAndEatChar("!startsub"); skipSpaces(); this.subname = eatAllToEnd(); - if (this.subname.matches("\\w+") == false) { - throw EaterException.located("Bad sub name"); - } + if (this.subname.matches("\\w+") == false) + throw EaterException.located("Bad sub name", getStringLocated()); + } public final String getSubname() { diff --git a/src/net/sourceforge/plantuml/tim/EaterTheme.java b/src/net/sourceforge/plantuml/tim/EaterTheme.java index 09e292785..c43fdc33f 100644 --- a/src/net/sourceforge/plantuml/tim/EaterTheme.java +++ b/src/net/sourceforge/plantuml/tim/EaterTheme.java @@ -101,24 +101,24 @@ public class EaterTheme extends Eater { } catch (IOException e) { Logme.error(e); } - throw EaterException.located("Cannot load " + realName); + throw EaterException.located("Cannot load " + realName, getStringLocated()); } if (from.startsWith("<") && from.endsWith(">")) { final ReadLine reader = ThemeUtils.getReaderTheme(realName, from); if (reader == null) - throw EaterException.located("No such theme " + realName + " in " + from); + throw EaterException.located("No such theme " + realName + " in " + from, getStringLocated()); return reader; } else if (from.startsWith("http://") || from.startsWith("https://")) { final SURL url = SURL.create(ThemeUtils.getFullPath(from, realName)); if (url == null) - throw EaterException.located("Cannot open URL"); + throw EaterException.located("Cannot open URL", getStringLocated()); try { - return PreprocessorUtils.getReaderInclude(url, getLineLocation(), UTF_8); + return PreprocessorUtils.getReaderInclude(url, getStringLocated(), UTF_8); } catch (UnsupportedEncodingException e) { Logme.error(e); - throw EaterException.located("Cannot decode charset"); + throw EaterException.located("Cannot decode charset", getStringLocated()); } } @@ -126,12 +126,12 @@ public class EaterTheme extends Eater { final FileWithSuffix file = context.getFileWithSuffix(from, realName); final Reader tmp = file.getReader(UTF_8); if (tmp == null) - throw EaterException.located("No such theme " + realName); + throw EaterException.located("No such theme " + realName, getStringLocated()); return ReadLineReader.create(tmp, "theme " + realName); } catch (IOException e) { Logme.error(e); - throw EaterException.located("Cannot load " + realName); + throw EaterException.located("Cannot load " + realName, getStringLocated()); } } diff --git a/src/net/sourceforge/plantuml/tim/FunctionsSet.java b/src/net/sourceforge/plantuml/tim/FunctionsSet.java index ee9d21019..0f910fb66 100644 --- a/src/net/sourceforge/plantuml/tim/FunctionsSet.java +++ b/src/net/sourceforge/plantuml/tim/FunctionsSet.java @@ -51,16 +51,16 @@ public class FunctionsSet { public TFunction getFunctionSmart(TFunctionSignature searched) { final TFunction func = this.functions.get(searched); - if (func != null) { + if (func != null) return func; - } + for (TFunction candidate : this.functions.values()) { - if (candidate.getSignature().sameFunctionNameAs(searched) == false) { + if (candidate.getSignature().sameFunctionNameAs(searched) == false) continue; - } - if (candidate.canCover(searched.getNbArg(), searched.getNamedArguments())) { + + if (candidate.canCover(searched.getNbArg(), searched.getNamedArguments())) return candidate; - } + } return null; } @@ -82,9 +82,9 @@ public class FunctionsSet { } public void addFunction(TFunction func) { - if (func.getFunctionType() == TFunctionType.LEGACY_DEFINELONG) { + if (func.getFunctionType() == TFunctionType.LEGACY_DEFINELONG) ((TFunctionImpl) func).finalizeEnddefinelong(); - } + this.functions.put(func.getSignature(), func); this.functions3.add(func.getSignature().getFunctionName() + "("); } @@ -96,9 +96,9 @@ public class FunctionsSet { public void executeLegacyDefine(TContext context, TMemory memory, StringLocated s) throws EaterException, EaterExceptionLocated { - if (this.pendingFunction != null) { - throw EaterException.located("already0048"); - } + if (this.pendingFunction != null) + throw EaterException.located("already0048", s); + final EaterLegacyDefine legacyDefine = new EaterLegacyDefine(s); legacyDefine.analyze(context, memory); final TFunction function = legacyDefine.getFunction(); @@ -108,9 +108,9 @@ public class FunctionsSet { public void executeLegacyDefineLong(TContext context, TMemory memory, StringLocated s) throws EaterException, EaterExceptionLocated { - if (this.pendingFunction != null) { - throw EaterException.located("already0068"); - } + if (this.pendingFunction != null) + throw EaterException.located("already0068", s); + final EaterLegacyDefineLong legacyDefineLong = new EaterLegacyDefineLong(s); legacyDefineLong.analyze(context, memory); this.pendingFunction = legacyDefineLong.getFunction(); @@ -118,48 +118,48 @@ public class FunctionsSet { public void executeDeclareReturnFunction(TContext context, TMemory memory, StringLocated s) throws EaterException, EaterExceptionLocated { - if (this.pendingFunction != null) { - throw EaterException.located("already0068"); - } + if (this.pendingFunction != null) + throw EaterException.located("already0068", s); + final EaterDeclareReturnFunction declareFunction = new EaterDeclareReturnFunction(s); declareFunction.analyze(context, memory); final boolean finalFlag = declareFunction.getFinalFlag(); final TFunctionSignature declaredSignature = declareFunction.getFunction().getSignature(); final TFunction previous = this.functions.get(declaredSignature); - if (previous != null && (finalFlag || this.functionsFinal.contains(declaredSignature))) { - throw EaterException.located("This function is already defined"); - } - if (finalFlag) { + if (previous != null && (finalFlag || this.functionsFinal.contains(declaredSignature))) + throw EaterException.located("This function is already defined", s); + + if (finalFlag) this.functionsFinal.add(declaredSignature); - } - if (declareFunction.getFunction().hasBody()) { + + if (declareFunction.getFunction().hasBody()) this.addFunction(declareFunction.getFunction()); - } else { + else this.pendingFunction = declareFunction.getFunction(); - } + } public void executeDeclareProcedure(TContext context, TMemory memory, StringLocated s) throws EaterException, EaterExceptionLocated { - if (this.pendingFunction != null) { - throw EaterException.located("already0068"); - } + if (this.pendingFunction != null) + throw EaterException.located("already0068", s); + final EaterDeclareProcedure declareFunction = new EaterDeclareProcedure(s); declareFunction.analyze(context, memory); final boolean finalFlag = declareFunction.getFinalFlag(); final TFunctionSignature declaredSignature = declareFunction.getFunction().getSignature(); final TFunction previous = this.functions.get(declaredSignature); - if (previous != null && (finalFlag || this.functionsFinal.contains(declaredSignature))) { - throw EaterException.located("This function is already defined"); - } - if (finalFlag) { + if (previous != null && (finalFlag || this.functionsFinal.contains(declaredSignature))) + throw EaterException.located("This function is already defined", s); + + if (finalFlag) this.functionsFinal.add(declaredSignature); - } - if (declareFunction.getFunction().hasBody()) { + + if (declareFunction.getFunction().hasBody()) this.addFunction(declareFunction.getFunction()); - } else { + else this.pendingFunction = declareFunction.getFunction(); - } + } } diff --git a/src/net/sourceforge/plantuml/tim/TContext.java b/src/net/sourceforge/plantuml/tim/TContext.java index 6a79011f4..547313c90 100644 --- a/src/net/sourceforge/plantuml/tim/TContext.java +++ b/src/net/sourceforge/plantuml/tim/TContext.java @@ -322,7 +322,7 @@ public class TContext { if (e instanceof EaterExceptionLocated) throw (EaterExceptionLocated) e; Logme.error(e); - throw EaterException.located("Fatal parsing error"); + throw EaterException.located("Fatal parsing error", s); } } @@ -382,7 +382,7 @@ public class TContext { } else if (s.getString().matches("^\\s+$")) { return null; } else { - throw EaterException.located("Compile Error " + ftype + " " + type); + throw EaterException.located("Compile Error " + ftype + " " + type, s); } } @@ -465,7 +465,7 @@ public class TContext { call.getNamedArguments().keySet()); final TFunction function = functionsSet.getFunctionSmart(signature); if (function == null) - throw EaterException.located("Function not found " + presentFunction); + throw EaterException.located("Function not found " + presentFunction, str); if (function.getFunctionType() == TFunctionType.PROCEDURE) { this.pendingAdd = result.toString(); @@ -488,8 +488,8 @@ public class TContext { call.getNamedArguments()); result.append(functionReturn.toString()); i += call.getCurrentPosition() - 1; - } else if (new VariableManager(this, memory, str.getLocation()).getVarnameAt(str.getString(), i) != null) { - i = new VariableManager(this, memory, str.getLocation()).replaceVariables(str.getString(), i, result); + } else if (new VariableManager(this, memory, str).getVarnameAt(str.getString(), i) != null) { + i = new VariableManager(this, memory, str).replaceVariables(str.getString(), i, result); } else { result.append(c); } @@ -512,18 +512,18 @@ public class TContext { _import.analyze(this, memory); try { - final SFile file = FileSystem.getInstance().getFile( - applyFunctionsAndVariables(memory, new StringLocated(_import.getWhat(), s.getLocation()))); + final SFile file = FileSystem.getInstance() + .getFile(applyFunctionsAndVariables(memory, new StringLocated(_import.getWhat(), s.getLocation()))); if (file.exists() && file.isDirectory() == false) { importedFiles.add(file); return; } } catch (IOException e) { Logme.error(e); - throw EaterException.located("Cannot import " + e.getMessage()); + throw EaterException.located("Cannot import " + e.getMessage(), s); } - throw EaterException.located("Cannot import"); + throw EaterException.located("Cannot import", s); } private void executeLog(TMemory memory, StringLocated s) throws EaterException, EaterExceptionLocated { @@ -543,12 +543,12 @@ public class TContext { try { final EaterIncludesub include = new EaterIncludesub(s.getTrimmed()); include.analyze(this, memory); - final String location = include.getLocation(); - final int idx = location.indexOf('!'); + final String what = include.getWhat(); + final int idx = what.indexOf('!'); Sub sub = null; if (idx != -1) { - final String filename = location.substring(0, idx); - final String blocname = location.substring(idx + 1); + final String filename = what.substring(0, idx); + final String blocname = what.substring(idx + 1); try { final FileWithSuffix f2 = importedFiles.getFile(filename, null); if (f2.fileOk()) { @@ -556,10 +556,10 @@ public class TContext { this.importedFiles = this.importedFiles.withCurrentDir(f2.getParentFile()); final Reader reader = f2.getReader(charset); if (reader == null) - throw EaterException.located("cannot include " + location); + throw EaterException.located("cannot include " + what, s); try { - ReadLine readerline = ReadLineReader.create(reader, location, s.getLocation()); + ReadLine readerline = ReadLineReader.create(reader, what, s.getLocation()); readerline = new UncommentReadLine(readerline); sub = Sub.fromFile(readerline, blocname, this, memory); } finally { @@ -568,14 +568,14 @@ public class TContext { } } catch (IOException e) { Logme.error(e); - throw EaterException.located("cannot include " + location); + throw EaterException.located("cannot include " + what, s); } } if (sub == null) - sub = subs.get(location); + sub = subs.get(what); if (sub == null) - throw EaterException.located("cannot include " + location); + throw EaterException.located("cannot include " + what, s); executeLinesInternal(memory, sub.lines(), null); } finally { @@ -604,7 +604,7 @@ public class TContext { } while (true); } catch (IOException e) { Logme.error(e); - throw EaterException.located("" + e); + throw EaterException.located("" + e, s); } finally { try { reader2.close(); @@ -619,7 +619,7 @@ public class TContext { eater.analyze(this, memory); final ReadLine reader = eater.getTheme(); if (reader == null) - throw EaterException.located("No such theme " + eater.getName()); + throw EaterException.located("No such theme " + eater.getName(), s); try { final List body = new ArrayList<>(); @@ -633,7 +633,7 @@ public class TContext { } while (true); } catch (IOException e) { Logme.error(e); - throw EaterException.located("Error reading theme " + e); + throw EaterException.located("Error reading theme " + e, s); } finally { try { reader.close(); @@ -646,7 +646,7 @@ public class TContext { private void executeInclude(TMemory memory, StringLocated s) throws EaterException, EaterExceptionLocated { final EaterInclude include = new EaterInclude(s.getTrimmed()); include.analyze(this, memory); - String location = include.getLocation(); + String location = include.getWhat(); final PreprocessorIncludeStrategy strategy = include.getPreprocessorIncludeStrategy(); final int idx = location.lastIndexOf('!'); String suf = null; @@ -661,7 +661,7 @@ public class TContext { if (location.startsWith("http://") || location.startsWith("https://")) { final SURL url = SURL.create(location); if (url == null) - throw EaterException.located("Cannot open URL"); + throw EaterException.located("Cannot open URL", s); reader = PreprocessorUtils.getReaderIncludeUrl(url, s, suf, charset); } else if (location.startsWith("<") && location.endsWith(">")) { @@ -677,14 +677,14 @@ public class TContext { return; if (strategy == PreprocessorIncludeStrategy.ONCE && filesUsedCurrent.contains(f2)) - throw EaterException.located("This file has already been included"); + throw EaterException.located("This file has already been included", s); if (StartDiagramExtractReader.containsStartDiagram(f2, s, charset)) { reader = StartDiagramExtractReader.build(f2, s, charset); } else { final Reader tmp = f2.getReader(charset); if (tmp == null) - throw EaterException.located("Cannot include file"); + throw EaterException.located("Cannot include file", s); reader = ReadLineReader.create(tmp, location, s.getLocation()); } @@ -713,7 +713,7 @@ public class TContext { } } catch (IOException e) { Logme.error(e); - throw EaterException.located("cannot include " + e); + throw EaterException.located("cannot include " + e, s); } finally { if (reader != null) { try { @@ -724,7 +724,7 @@ public class TContext { } } - throw EaterException.located("cannot include " + location); + throw EaterException.located("cannot include " + location, s); } public boolean isLegacyDefine(String functionName) { diff --git a/src/net/sourceforge/plantuml/tim/TFunctionImpl.java b/src/net/sourceforge/plantuml/tim/TFunctionImpl.java index 4d1237feb..506dc465d 100644 --- a/src/net/sourceforge/plantuml/tim/TFunctionImpl.java +++ b/src/net/sourceforge/plantuml/tim/TFunctionImpl.java @@ -148,12 +148,12 @@ public class TFunctionImpl implements TFunction { return executeReturnLegacyDefine(location.getLocation(), context, memory, args); if (functionType != TFunctionType.RETURN_FUNCTION) - throw EaterException.unlocated("Illegal call here. Is there a return directive in your function?"); + throw EaterException.unlocated("Illegal call here. Is there a return directive in your function?", location); final TMemory copy = getNewMemory(memory, args, named); final TValue result = context.executeLines(copy, body, TFunctionType.RETURN_FUNCTION, true); if (result == null) - throw EaterException.unlocated("No return directive found in your function"); + throw EaterException.unlocated("No return directive found in your function", location); return result; } diff --git a/src/net/sourceforge/plantuml/tim/TMemory.java b/src/net/sourceforge/plantuml/tim/TMemory.java index a1f830e79..466b5951b 100644 --- a/src/net/sourceforge/plantuml/tim/TMemory.java +++ b/src/net/sourceforge/plantuml/tim/TMemory.java @@ -37,13 +37,15 @@ package net.sourceforge.plantuml.tim; import java.util.Map; import java.util.Set; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.expression.TValue; public interface TMemory { public TValue getVariable(String varname); - public void putVariable(String varname, TValue value, TVariableScope scope) throws EaterException; + public void putVariable(String varname, TValue value, TVariableScope scope, StringLocated location) + throws EaterException; public void removeVariable(String varname); diff --git a/src/net/sourceforge/plantuml/tim/TMemoryGlobal.java b/src/net/sourceforge/plantuml/tim/TMemoryGlobal.java index 9b10805a4..f5587df1b 100644 --- a/src/net/sourceforge/plantuml/tim/TMemoryGlobal.java +++ b/src/net/sourceforge/plantuml/tim/TMemoryGlobal.java @@ -41,6 +41,7 @@ import java.util.Map.Entry; import java.util.Set; import java.util.TreeMap; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.expression.TValue; import net.sourceforge.plantuml.utils.Log; @@ -49,10 +50,12 @@ public class TMemoryGlobal extends ExecutionContexts implements TMemory { private final Map globalVariables = new HashMap(); private final TrieImpl variables = new TrieImpl(); + @Override public TValue getVariable(String varname) { return this.globalVariables.get(varname); } + @Override public void dumpDebug(String message) { Log.error("[MemGlobal] Start of memory_dump " + message); dumpMemoryInternal(); @@ -68,32 +71,39 @@ public class TMemoryGlobal extends ExecutionContexts implements TMemory { } } - public void putVariable(String varname, TValue value, TVariableScope scope) throws EaterException { + @Override + public void putVariable(String varname, TValue value, TVariableScope scope, StringLocated location) + throws EaterException { Log.info("[MemGlobal] Setting " + varname); - if (scope == TVariableScope.LOCAL) { - throw EaterException.unlocated("Cannot use local variable here"); - } + if (scope == TVariableScope.LOCAL) + throw EaterException.unlocated("Cannot use local variable here", location); + this.globalVariables.put(varname, value); this.variables.add(varname); } + @Override public void removeVariable(String varname) { this.globalVariables.remove(varname); this.variables.remove(varname); } + @Override public boolean isEmpty() { return globalVariables.isEmpty(); } + @Override public Set variablesNames() { return Collections.unmodifiableSet(globalVariables.keySet()); } + @Override public Trie variablesNames3() { return variables; } + @Override public TMemory forkFromGlobal(Map input) { return new TMemoryLocal(this, input); } diff --git a/src/net/sourceforge/plantuml/tim/TMemoryLocal.java b/src/net/sourceforge/plantuml/tim/TMemoryLocal.java index 4d9b7da33..2603e1d0d 100644 --- a/src/net/sourceforge/plantuml/tim/TMemoryLocal.java +++ b/src/net/sourceforge/plantuml/tim/TMemoryLocal.java @@ -40,6 +40,7 @@ import java.util.Map.Entry; import java.util.Set; import java.util.TreeMap; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.expression.TValue; import net.sourceforge.plantuml.utils.Log; @@ -76,19 +77,21 @@ public class TMemoryLocal extends ExecutionContexts implements TMemory { Log.error("[MemGlobal] End of memory_dump"); } - public void putVariable(String varname, TValue value, TVariableScope scope) throws EaterException { + @Override + public void putVariable(String varname, TValue value, TVariableScope scope, StringLocated location) + throws EaterException { if (scope == TVariableScope.GLOBAL) { - memoryGlobal.putVariable(varname, value, scope); + memoryGlobal.putVariable(varname, value, scope, location); return; } if (scope == TVariableScope.LOCAL || overridenVariables01.containsKey(varname)) { this.overridenVariables01.put(varname, value); - if (this.overridenVariables00 != null) { + if (this.overridenVariables00 != null) this.overridenVariables00.add(varname); - } + Log.info("[MemLocal/overrriden] Setting " + varname); } else if (memoryGlobal.getVariable(varname) != null) { - memoryGlobal.putVariable(varname, value, scope); + memoryGlobal.putVariable(varname, value, scope, location); } else { this.localVariables01.put(varname, value); this.localVariables00.add(varname); @@ -96,12 +99,13 @@ public class TMemoryLocal extends ExecutionContexts implements TMemory { } } + @Override public void removeVariable(String varname) { if (overridenVariables01.containsKey(varname)) { this.overridenVariables01.remove(varname); - if (this.overridenVariables00 != null) { + if (this.overridenVariables00 != null) this.overridenVariables00.remove(varname); - } + } else if (memoryGlobal.getVariable(varname) != null) { memoryGlobal.removeVariable(varname); } else { @@ -110,25 +114,27 @@ public class TMemoryLocal extends ExecutionContexts implements TMemory { } } + @Override public TValue getVariable(String varname) { TValue result = overridenVariables01.get(varname); - if (result != null) { + if (result != null) return result; - } + result = memoryGlobal.getVariable(varname); - if (result != null) { + if (result != null) return result; - } + result = localVariables01.get(varname); return result; } + @Override public Trie variablesNames3() { if (overridenVariables00 == null) { overridenVariables00 = new TrieImpl(); - for (String name : overridenVariables01.keySet()) { + for (String name : overridenVariables01.keySet()) overridenVariables00.add(name); - } + } return new Trie() { public void add(String s) { @@ -140,12 +146,12 @@ public class TMemoryLocal extends ExecutionContexts implements TMemory { final String s2 = overridenVariables00.getLonguestMatchStartingIn(s); final String s3 = localVariables00.getLonguestMatchStartingIn(s); - if (s1.length() >= s2.length() && s1.length() >= s3.length()) { + if (s1.length() >= s2.length() && s1.length() >= s3.length()) return s1; - } - if (s2.length() >= s3.length() && s2.length() >= s1.length()) { + + if (s2.length() >= s3.length() && s2.length() >= s1.length()) return s2; - } + return s3; } }; @@ -162,14 +168,17 @@ public class TMemoryLocal extends ExecutionContexts implements TMemory { // return result; } + @Override public boolean isEmpty() { return memoryGlobal.isEmpty() && localVariables01.isEmpty() && overridenVariables01.isEmpty(); } + @Override public Set variablesNames() { throw new UnsupportedOperationException(); } + @Override public TMemory forkFromGlobal(Map input) { return new TMemoryLocal(memoryGlobal, input); } diff --git a/src/net/sourceforge/plantuml/tim/TimLoader.java b/src/net/sourceforge/plantuml/tim/TimLoader.java index de15c55f9..7d8bd5c93 100644 --- a/src/net/sourceforge/plantuml/tim/TimLoader.java +++ b/src/net/sourceforge/plantuml/tim/TimLoader.java @@ -53,10 +53,10 @@ public class TimLoader { private List resultList; public TimLoader(ImportedFiles importedFiles, Defines defines, Charset charset, - DefinitionsContainer definitionsContainer) { + DefinitionsContainer definitionsContainer, StringLocated location) { this.context = new TContext(importedFiles, defines, charset, definitionsContainer); try { - defines.copyTo(global); + defines.copyTo(global, location); } catch (EaterException e) { Logme.error(e); } diff --git a/src/net/sourceforge/plantuml/tim/VariableManager.java b/src/net/sourceforge/plantuml/tim/VariableManager.java index 88332ac3d..1f9a66dc4 100644 --- a/src/net/sourceforge/plantuml/tim/VariableManager.java +++ b/src/net/sourceforge/plantuml/tim/VariableManager.java @@ -46,9 +46,9 @@ public class VariableManager { private final TMemory memory; private final TContext context; - private final LineLocation location; + private final StringLocated location; - public VariableManager(TContext context, TMemory memory, LineLocation location) { + public VariableManager(TContext context, TMemory memory, StringLocated location) { this.memory = memory; this.context = context; this.location = location; @@ -56,9 +56,9 @@ public class VariableManager { public int replaceVariables(String str, int i, StringBuilder result) throws EaterException, EaterExceptionLocated { final String presentVariable = getVarnameAt(str, i); - if (result.toString().endsWith("##")) { + if (result.toString().endsWith("##")) result.setLength(result.length() - 2); - } + final TValue value = memory.getVariable(presentVariable); i += presentVariable.length() - 1; if (value.isJson()) { @@ -75,9 +75,9 @@ public class VariableManager { } else { result.append(value.toString()); } - if (i + 2 < str.length() && str.charAt(i + 1) == '#' && str.charAt(i + 2) == '#') { + if (i + 2 < str.length() && str.charAt(i + 1) == '#' && str.charAt(i + 2) == '#') i += 2; - } + return i; } @@ -89,9 +89,9 @@ public class VariableManager { i++; final StringBuilder fieldName = new StringBuilder(); while (i < str.length()) { - if (Character.isJavaIdentifierPart(str.charAt(i)) == false) { + if (Character.isJavaIdentifierPart(str.charAt(i)) == false) break; - } + fieldName.append(str.charAt(i)); i++; } @@ -101,9 +101,9 @@ public class VariableManager { final StringBuilder inBracket = new StringBuilder(); int level = 0; while (true) { - if (str.charAt(i) == '[') { + if (str.charAt(i) == '[') level++; - } + if (str.charAt(i) == ']') { if (level == 0) break; @@ -113,29 +113,29 @@ public class VariableManager { i++; } final String nbString = context.applyFunctionsAndVariables(memory, - new StringLocated(inBracket.toString(), location)); + new StringLocated(inBracket.toString(), location.getLocation())); if (jsonValue instanceof JsonArray) { final int nb = Integer.parseInt(nbString); jsonValue = ((JsonArray) jsonValue).get(nb); } else if (jsonValue instanceof JsonObject) { jsonValue = ((JsonObject) jsonValue).get(nbString); } else { - throw EaterException.unlocated("Major parsing error"); - } - if (jsonValue == null) { - throw EaterException.unlocated("Data parsing error"); + throw EaterException.unlocated("Major parsing error", location); } + + if (jsonValue == null) + throw EaterException.unlocated("Data parsing error", location); + i++; } else { break; } } if (jsonValue != null) { - if (jsonValue.isString()) { + if (jsonValue.isString()) result.append(jsonValue.asString()); - } else { + else result.append(jsonValue.toString()); - } } return i; } @@ -146,13 +146,13 @@ public class VariableManager { return null; } final String varname = memory.variablesNames3().getLonguestMatchStartingIn(s.substring(pos)); - if (varname.length() == 0) { + if (varname.length() == 0) return null; - } + if (pos + varname.length() == s.length() - || TLineType.isLetterOrUnderscoreOrDigit(s.charAt(pos + varname.length())) == false) { + || TLineType.isLetterOrUnderscoreOrDigit(s.charAt(pos + varname.length())) == false) return varname; - } + return null; } diff --git a/src/net/sourceforge/plantuml/tim/expression/ReversePolishInterpretor.java b/src/net/sourceforge/plantuml/tim/expression/ReversePolishInterpretor.java index 4d19e7642..5ef785efd 100644 --- a/src/net/sourceforge/plantuml/tim/expression/ReversePolishInterpretor.java +++ b/src/net/sourceforge/plantuml/tim/expression/ReversePolishInterpretor.java @@ -47,18 +47,12 @@ import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunction; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; -import net.sourceforge.plantuml.utils.LineLocation; public class ReversePolishInterpretor { private final TValue result; private final boolean trace = false; - public ReversePolishInterpretor(TokenStack queue, Knowledge knowledge, TMemory memory, TContext context) - throws EaterException, EaterExceptionLocated { - this(null, queue, knowledge, memory, context); - } - public ReversePolishInterpretor(StringLocated location, TokenStack queue, Knowledge knowledge, TMemory memory, TContext context) throws EaterException, EaterExceptionLocated { @@ -79,45 +73,45 @@ public class ReversePolishInterpretor { final TValue v2 = stack.removeFirst(); final TValue v1 = stack.removeFirst(); final TokenOperator op = token.getTokenOperator(); - if (op == null) { - throw EaterException.unlocated("bad op"); - } + if (op == null) + throw EaterException.unlocated("bad op", location); + final TValue tmp = op.operate(v1, v2); stack.addFirst(tmp); } else if (token.getTokenType() == TokenType.OPEN_PAREN_FUNC) { final int nb = Integer.parseInt(token.getSurface()); final Token token2 = it.nextToken(); - if (token2.getTokenType() != TokenType.FUNCTION_NAME) { - throw EaterException.unlocated("rpn43"); - } + if (token2.getTokenType() != TokenType.FUNCTION_NAME) + throw EaterException.unlocated("rpn43", location); + if (trace) System.err.println("token2=" + token2); final TFunction function = knowledge.getFunction(new TFunctionSignature(token2.getSurface(), nb)); if (trace) System.err.println("function=" + function); - if (function == null) { - throw EaterException.unlocated("Unknown built-in function " + token2.getSurface()); - } - if (function.canCover(nb, Collections.emptySet()) == false) { - throw EaterException - .unlocated("Bad number of arguments for " + function.getSignature().getFunctionName()); - } + if (function == null) + throw EaterException.unlocated("Unknown built-in function " + token2.getSurface(), location); + + if (function.canCover(nb, Collections.emptySet()) == false) + throw EaterException.unlocated( + "Bad number of arguments for " + function.getSignature().getFunctionName(), location); + final List args = new ArrayList<>(); - for (int i = 0; i < nb; i++) { + for (int i = 0; i < nb; i++) args.add(0, stack.removeFirst()); - } + if (trace) System.err.println("args=" + args); - if (location == null) { - throw EaterException.unlocated("rpn44"); - } + if (location == null) + throw EaterException.unlocated("rpn44", location); + final TValue r = function.executeReturnFunction(context, memory, location, args, Collections.emptyMap()); if (trace) System.err.println("r=" + r); stack.addFirst(r); } else { - throw EaterException.unlocated("rpn41"); + throw EaterException.unlocated("rpn41", location); } } result = stack.removeFirst(); diff --git a/src/net/sourceforge/plantuml/tim/expression/ShuntingYard.java b/src/net/sourceforge/plantuml/tim/expression/ShuntingYard.java index c6366f6bd..4b40aab8f 100644 --- a/src/net/sourceforge/plantuml/tim/expression/ShuntingYard.java +++ b/src/net/sourceforge/plantuml/tim/expression/ShuntingYard.java @@ -37,6 +37,7 @@ package net.sourceforge.plantuml.tim.expression; import java.util.ArrayDeque; import java.util.Deque; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; @@ -58,7 +59,8 @@ public class ShuntingYard { System.err.println(""); } - public ShuntingYard(TokenIterator it, Knowledge knowledge) throws EaterException, EaterExceptionLocated { + public ShuntingYard(TokenIterator it, Knowledge knowledge, StringLocated location) + throws EaterException, EaterExceptionLocated { while (it.hasMoreTokens()) { final Token token = it.nextToken(); @@ -74,7 +76,7 @@ public class ShuntingYard { final TValue variable = knowledge.getVariable(name); if (variable == null) { if (isVariableName(name) == false) - throw EaterException.unlocated("Parsing syntax error about " + name); + throw EaterException.unlocated("Parsing syntax error about " + name, location); ouputQueue.add(new Token(name, TokenType.QUOTED_STRING, null)); } else { diff --git a/src/net/sourceforge/plantuml/tim/expression/TokenStack.java b/src/net/sourceforge/plantuml/tim/expression/TokenStack.java index 61eeebae6..b25c96f6c 100644 --- a/src/net/sourceforge/plantuml/tim/expression/TokenStack.java +++ b/src/net/sourceforge/plantuml/tim/expression/TokenStack.java @@ -48,7 +48,6 @@ import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TMemory; -import net.sourceforge.plantuml.utils.LineLocation; public class TokenStack { @@ -96,7 +95,7 @@ public class TokenStack { eater.skipSpaces(); final char ch = eater.peekChar(); if (ch == 0) - throw EaterException.unlocated("until001"); + throw EaterException.unlocated("until001", eater.getStringLocated()); if (level == 0 && (ch == ',' || ch == ')')) return result; @@ -114,12 +113,12 @@ public class TokenStack { } } - static public void eatUntilCloseParenthesisOrComma(TokenIterator it) throws EaterException { + static public void eatUntilCloseParenthesisOrComma(TokenIterator it, StringLocated location) throws EaterException { int level = 0; while (true) { final Token ch = it.peekToken(); if (ch == null) - throw EaterException.unlocated("until002"); + throw EaterException.unlocated("until002", location); final TokenType typech = ch.getTokenType(); if (level == 0 && (typech == TokenType.COMMA || typech == TokenType.CLOSE_PAREN_MATH) @@ -136,7 +135,7 @@ public class TokenStack { } } - private int countFunctionArg(TokenIterator it) throws EaterException { + private int countFunctionArg(TokenIterator it, StringLocated location) throws EaterException { // return 42; final TokenType type1 = it.peekToken().getTokenType(); if (type1 == TokenType.CLOSE_PAREN_MATH || type1 == TokenType.CLOSE_PAREN_FUNC) @@ -144,7 +143,7 @@ public class TokenStack { int result = 1; while (it.hasMoreTokens()) { - eatUntilCloseParenthesisOrComma(it); + eatUntilCloseParenthesisOrComma(it, location); final Token token = it.nextToken(); final TokenType type = token.getTokenType(); if (type == TokenType.CLOSE_PAREN_MATH || type == TokenType.CLOSE_PAREN_FUNC) @@ -152,13 +151,13 @@ public class TokenStack { else if (type == TokenType.COMMA) result++; else - throw EaterException.unlocated("count13"); + throw EaterException.unlocated("count13", location); } - throw EaterException.unlocated("count12"); + throw EaterException.unlocated("count12", location); } - public void guessFunctions() throws EaterException { + public void guessFunctions(StringLocated location) throws EaterException { final Deque open = new ArrayDeque<>(); final Map parens = new HashMap(); for (int i = 0; i < tokens.size(); i++) { @@ -178,7 +177,7 @@ public class TokenStack { assert tokens.get(iclose).getTokenType() == TokenType.CLOSE_PAREN_MATH; if (iopen > 0 && tokens.get(iopen - 1).getTokenType() == TokenType.PLAIN_TEXT) { tokens.set(iopen - 1, new Token(tokens.get(iopen - 1).getSurface(), TokenType.FUNCTION_NAME, null)); - final int nbArg = countFunctionArg(subTokenStack(iopen + 1).tokenIterator()); + final int nbArg = countFunctionArg(subTokenStack(iopen + 1).tokenIterator(), location); tokens.set(iopen, new Token("" + nbArg, TokenType.OPEN_PAREN_FUNC, null)); tokens.set(iclose, new Token(")", TokenType.CLOSE_PAREN_FUNC, null)); } @@ -215,9 +214,9 @@ public class TokenStack { throws EaterException, EaterExceptionLocated { final Knowledge knowledge = context.asKnowledge(memory, location.getLocation()); final TokenStack tmp = withoutSpace(); - tmp.guessFunctions(); + tmp.guessFunctions(location); final TokenIterator it = tmp.tokenIterator(); - final ShuntingYard shuntingYard = new ShuntingYard(it, knowledge); + final ShuntingYard shuntingYard = new ShuntingYard(it, knowledge, location); final ReversePolishInterpretor rpn = new ReversePolishInterpretor(location, shuntingYard.getQueue(), knowledge, memory, context); return rpn.getResult(); diff --git a/src/net/sourceforge/plantuml/tim/iterator/AbstractCodeIterator.java b/src/net/sourceforge/plantuml/tim/iterator/AbstractCodeIterator.java index 83165b8ee..a4e9a62aa 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/AbstractCodeIterator.java +++ b/src/net/sourceforge/plantuml/tim/iterator/AbstractCodeIterator.java @@ -34,6 +34,7 @@ */ package net.sourceforge.plantuml.tim.iterator; +import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; @@ -45,16 +46,19 @@ public abstract class AbstractCodeIterator implements CodeIterator { this.source = source; } + @Override public void next() throws EaterException, EaterExceptionLocated { source.next(); } + @Override final public CodePosition getCodePosition() { return source.getCodePosition(); } - final public void jumpToCodePosition(CodePosition newPosition) throws EaterException { - source.jumpToCodePosition(newPosition); + @Override + final public void jumpToCodePosition(CodePosition newPosition, StringLocated location) throws EaterException { + source.jumpToCodePosition(newPosition, location); } } diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIterator.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIterator.java index c0b59f04d..48698ab5c 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIterator.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIterator.java @@ -39,7 +39,7 @@ import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; public interface CodeIterator { - // ::remove folder when __HAXE__ + // ::remove folder when __HAXE__ public StringLocated peek() throws EaterException, EaterExceptionLocated; @@ -47,6 +47,6 @@ public interface CodeIterator { public CodePosition getCodePosition(); - public void jumpToCodePosition(CodePosition newPosition) throws EaterException; + public void jumpToCodePosition(CodePosition newPosition, StringLocated location) throws EaterException; } diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorAffectation.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorAffectation.java index e2a5fc5e9..0d380a436 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorAffectation.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorAffectation.java @@ -58,6 +58,7 @@ public class CodeIteratorAffectation extends AbstractCodeIterator { this.logs = log; } + @Override public StringLocated peek() throws EaterException, EaterExceptionLocated { while (true) { final StringLocated result = source.peek(); @@ -81,9 +82,9 @@ public class CodeIteratorAffectation extends AbstractCodeIterator { this.executeAffectation(context, memory, result); return; } catch (ParseException e) { - if (e.getColumn() <= lastLocation) { - throw EaterException.located("Error in JSON format"); - } + if (e.getColumn() <= lastLocation) + throw EaterException.located("Error in JSON format", result); + lastLocation = e.getColumn(); next(); final StringLocated forward = source.peek(); diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorForeach.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorForeach.java index 540b1e1be..87a783882 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorForeach.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorForeach.java @@ -65,9 +65,8 @@ public class CodeIteratorForeach extends AbstractCodeIterator { int level = 0; while (true) { final StringLocated result = source.peek(); - if (result == null) { + if (result == null) return null; - } final ExecutionContextForeach foreach = memory.peekForeach(); if (foreach != null && foreach.isSkipMe()) { @@ -91,15 +90,15 @@ public class CodeIteratorForeach extends AbstractCodeIterator { continue; } else if (result.getType() == TLineType.ENDFOREACH) { logs.add(result); - if (foreach == null) { - throw EaterException.located("No foreach related to this endforeach"); - } + if (foreach == null) + throw EaterException.located("No foreach related to this endforeach", result); + foreach.inc(); if (foreach.isSkipMe()) { memory.pollForeach(); } else { setLoopVariable(memory, foreach, result); - source.jumpToCodePosition(foreach.getStartForeach()); + source.jumpToCodePosition(foreach.getStartForeach(), result); } next(); continue; @@ -114,18 +113,18 @@ public class CodeIteratorForeach extends AbstractCodeIterator { condition.analyze(context, memory); final ExecutionContextForeach foreach = ExecutionContextForeach.fromValue(condition.getVarname(), condition.getJsonArray(), source.getCodePosition()); - if (condition.isSkip()) { + if (condition.isSkip()) foreach.skipMeNow(); - } else { + else setLoopVariable(memory, foreach, s); - } + memory.addForeach(foreach); } private void setLoopVariable(TMemory memory, ExecutionContextForeach foreach, StringLocated position) throws EaterException { final JsonValue first = foreach.getJsonArray().get(foreach.currentIndex()); - memory.putVariable(foreach.getVarname(), TValue.fromJson(first), TVariableScope.GLOBAL); + memory.putVariable(foreach.getVarname(), TValue.fromJson(first), TVariableScope.GLOBAL, position); } } diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorIf.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorIf.java index 8ee1d08a1..43ae09658 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorIf.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorIf.java @@ -118,18 +118,17 @@ public class CodeIteratorIf extends AbstractCodeIterator { private void executeElseIf(TContext context, TMemory memory, StringLocated s) throws EaterException, EaterExceptionLocated { final ExecutionContextIf poll = (ExecutionContextIf) memory.peekIf(); - if (poll == null) { - throw EaterException.located("No if related to this else"); - } + if (poll == null) + throw EaterException.located("No if related to this else", s); poll.enteringElseIf(); if (poll.hasBeenBurn() == false) { final EaterElseIf condition = new EaterElseIf(s); condition.analyze(context, memory); final boolean isTrue = condition.isTrue(); - if (isTrue) { + if (isTrue) poll.nowInSomeElseIf(); - } + } } @@ -149,17 +148,17 @@ public class CodeIteratorIf extends AbstractCodeIterator { private void executeElse(TContext context, TMemory memory, StringLocated s) throws EaterException { final ExecutionContextIf poll = (ExecutionContextIf) memory.peekIf(); - if (poll == null) { - throw EaterException.located("No if related to this else"); - } + if (poll == null) + throw EaterException.located("No if related to this else", s); + poll.nowInElse(); } private void executeEndif(TContext context, TMemory memory, StringLocated s) throws EaterException { final ExecutionContextIf poll = (ExecutionContextIf) memory.pollIf(); - if (poll == null) { - throw EaterException.located("No if related to this endif"); - } + if (poll == null) + throw EaterException.located("No if related to this endif", s); + } } diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorImpl.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorImpl.java index e00986810..985fcd398 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorImpl.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorImpl.java @@ -62,34 +62,38 @@ public class CodeIteratorImpl implements CodeIterator { this.list = list; } + @Override public StringLocated peek() { - if (current == list.size()) { + if (current == list.size()) return null; - } - if (current > list.size()) { + + if (current > list.size()) throw new IllegalStateException(); - } + return list.get(current); } + @Override public void next() { - if (current >= list.size()) { + if (current >= list.size()) throw new IllegalStateException(); - } + assert current < list.size(); current++; assert current <= list.size(); } + @Override public CodePosition getCodePosition() { return new Position(current); } - public void jumpToCodePosition(CodePosition newPosition) throws EaterException { + @Override + public void jumpToCodePosition(CodePosition newPosition, StringLocated location) throws EaterException { this.countJump++; - if (this.countJump > 999) { - throw EaterException.unlocated("Infinite loop?"); - } + if (this.countJump > 999) + throw EaterException.unlocated("Infinite loop?", location); + final Position pos = (Position) newPosition; this.current = pos.pos; diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorSub.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorSub.java index 6a7aaa876..2c15a7b3e 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorSub.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorSub.java @@ -67,13 +67,13 @@ public class CodeIteratorSub extends AbstractCodeIterator { } public StringLocated peek() throws EaterException, EaterExceptionLocated { - if (readingInProgress != null) { + if (readingInProgress != null) return readingInProgress.peek(); - } + StringLocated result = source.peek(); - if (result == null) { + if (result == null) return null; - } + if (result.getType() == TLineType.STARTSUB) { final EaterStartsub eater = new EaterStartsub(result.getTrimmed()); eater.analyze(context, memory); @@ -83,7 +83,7 @@ public class CodeIteratorSub extends AbstractCodeIterator { StringLocated s = null; while ((s = source.peek()) != null) { if (s.getType() == TLineType.STARTSUB) { - throw EaterException.located("Cannot nest sub"); + throw EaterException.located("Cannot nest sub", result); } else if (s.getType() == TLineType.ENDSUB) { source.next(); readingInProgress = new CodeIteratorImpl(created.lines()); @@ -94,9 +94,9 @@ public class CodeIteratorSub extends AbstractCodeIterator { } } } - if (readingInProgress != null) { + if (readingInProgress != null) return readingInProgress.peek(); - } + return result; } @@ -107,9 +107,9 @@ public class CodeIteratorSub extends AbstractCodeIterator { return; } readingInProgress.next(); - if (readingInProgress.peek() == null) { + if (readingInProgress.peek() == null) readingInProgress = null; - } + } } diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorWhile.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorWhile.java index 84f201e6a..01b445898 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorWhile.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorWhile.java @@ -64,9 +64,8 @@ public class CodeIteratorWhile extends AbstractCodeIterator { int level = 0; while (true) { final StringLocated result = source.peek(); - if (result == null) { + if (result == null) return null; - } final ExecutionContextWhile currentWhile = memory.peekWhile(); if (currentWhile != null && currentWhile.isSkipMe()) { @@ -91,14 +90,14 @@ public class CodeIteratorWhile extends AbstractCodeIterator { } else if (result.getType() == TLineType.ENDWHILE) { logs.add(result); if (currentWhile == null) - throw EaterException.located("No while related to this endwhile"); + throw EaterException.located("No while related to this endwhile", result); final TValue value = currentWhile.conditionValue(result, context, memory); - if (value.toBoolean()) { - source.jumpToCodePosition(currentWhile.getStartWhile()); - } else { + if (value.toBoolean()) + source.jumpToCodePosition(currentWhile.getStartWhile(), result); + else memory.pollWhile(); - } + next(); continue; } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/CallUserFunction.java b/src/net/sourceforge/plantuml/tim/stdlib/CallUserFunction.java index 0bc47532a..830f5bf25 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/CallUserFunction.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/CallUserFunction.java @@ -65,9 +65,9 @@ public class CallUserFunction extends SimpleReturnFunction { final List args = values.subList(1, values.size()); final TFunctionSignature signature = new TFunctionSignature(fname, args.size()); final TFunction func = context.getFunctionSmart(signature); - if (func == null) { - throw EaterException.unlocated("Cannot find void function " + fname); - } + if (func == null) + throw EaterException.unlocated("Cannot find void function " + fname, location); + return func.executeReturnFunction(context, memory, location, args, named); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Darken.java b/src/net/sourceforge/plantuml/tim/stdlib/Darken.java index 4a282d150..1365c7614 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Darken.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Darken.java @@ -71,7 +71,7 @@ public class Darken extends SimpleReturnFunction { color = color.darken(ratio); return TValue.fromString(color.asString()); } catch (NoSuchColorException e) { - throw EaterException.located("No such color"); + throw EaterException.located("No such color", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/DateFunction.java b/src/net/sourceforge/plantuml/tim/stdlib/DateFunction.java index e596ef4b7..0db1db510 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/DateFunction.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/DateFunction.java @@ -71,10 +71,11 @@ public class DateFunction extends SimpleReturnFunction { now = 1000L * values.get(1).toInt(); else now = System.currentTimeMillis(); + try { return TValue.fromString(new SimpleDateFormat(format).format(now)); } catch (Exception e) { - throw EaterException.unlocated("Bad date pattern"); + throw EaterException.unlocated("Bad date pattern", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetAllStdlib.java b/src/net/sourceforge/plantuml/tim/stdlib/GetAllStdlib.java index 4bac0865e..2bc32f045 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetAllStdlib.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetAllStdlib.java @@ -99,7 +99,8 @@ public class GetAllStdlib extends SimpleReturnFunction { } default: - throw EaterException.located("Error on get_all_stdlib: Too many arguments"); + assert false; // Should not append because of canCover() + throw EaterException.located("Error on get_all_stdlib: Too many arguments", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java b/src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java index 0bd617053..5b48e27c4 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java @@ -65,7 +65,8 @@ public class GetJsonKey extends SimpleReturnFunction { Map named) throws EaterException, EaterExceptionLocated { final TValue data = values.get(0); if (data.isJson() == false) - throw EaterException.unlocated("Not JSON data"); + throw EaterException.unlocated("Not JSON data", location); + final JsonValue json = data.toJson(); if (json.isObject()) { final JsonObject object = (JsonObject) json; @@ -87,7 +88,7 @@ public class GetJsonKey extends SimpleReturnFunction { return TValue.fromJson(result); } - throw EaterException.unlocated("Bad JSON type"); + throw EaterException.unlocated("Bad JSON type", location); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java b/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java index 64503ed11..01e4f2036 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java @@ -71,7 +71,7 @@ public class InvokeProcedure implements TFunction { final TFunctionSignature signature = new TFunctionSignature(fname, sublist.size()); final TFunction func = context.getFunctionSmart(signature); if (func == null) - throw EaterException.located("Cannot find void function " + fname); + throw EaterException.located("Cannot find void function " + fname, location); func.executeProcedureInternal(context, memory, location, sublist, named); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/IsDark.java b/src/net/sourceforge/plantuml/tim/stdlib/IsDark.java index d8f337bf5..f8fa6c394 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/IsDark.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/IsDark.java @@ -69,7 +69,7 @@ public class IsDark extends SimpleReturnFunction { final HColor color = HColorSet.instance().getColorLEGACY(colorString); return TValue.fromBoolean(color.isDark()); } catch (NoSuchColorException e) { - throw EaterException.located("No such color"); + throw EaterException.located("No such color", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/IsLight.java b/src/net/sourceforge/plantuml/tim/stdlib/IsLight.java index e298e1baa..771425750 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/IsLight.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/IsLight.java @@ -69,7 +69,7 @@ public class IsLight extends SimpleReturnFunction { final HColor color = HColorSet.instance().getColorLEGACY(colorString); return TValue.fromBoolean(!color.isDark()); } catch (NoSuchColorException e) { - throw EaterException.located("No such color"); + throw EaterException.located("No such color", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Lighten.java b/src/net/sourceforge/plantuml/tim/stdlib/Lighten.java index ac69bf9e4..1ec5b593b 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Lighten.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Lighten.java @@ -71,7 +71,7 @@ public class Lighten extends SimpleReturnFunction { color = color.lighten(ratio); return TValue.fromString(color.asString()); } catch (NoSuchColorException e) { - throw EaterException.located("No such color"); + throw EaterException.located("No such color", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java b/src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java index 58e6a74bf..a03972239 100755 --- a/src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java @@ -120,10 +120,11 @@ public class LoadJson extends SimpleReturnFunction { return TValue.fromJson(jsonValue); } catch (ParseException pe) { Logme.error(pe); - throw EaterException.unlocated("JSON parse issue in source " + path + " on location " + pe.getLocation()); + throw EaterException.unlocated("JSON parse issue in source " + path + " on location " + pe.getLocation(), + location); } catch (UnsupportedEncodingException e) { Logme.error(e); - throw EaterException.unlocated("JSON encoding issue in source " + path + ": " + e.getMessage()); + throw EaterException.unlocated("JSON encoding issue in source " + path + ": " + e.getMessage(), location); } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java b/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java index bf7786f5c..d284045a6 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java @@ -77,7 +77,8 @@ public class RandomFunction extends SimpleReturnFunction { return TValue.fromInt(random.nextInt(max - min) + min); default: - throw EaterException.located("Error on Random: Too many argument"); + assert false; // Should not append because of canCover() + throw EaterException.located("Error on Random: Too many argument", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/ReverseColor.java b/src/net/sourceforge/plantuml/tim/stdlib/ReverseColor.java index 43521f070..ef1d94ff3 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/ReverseColor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/ReverseColor.java @@ -69,7 +69,7 @@ public class ReverseColor extends SimpleReturnFunction { color = color.reverse(); return TValue.fromString(color.asString()); } catch (NoSuchColorException e) { - throw EaterException.located("No such color"); + throw EaterException.located("No such color", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/ReverseHsluvColor.java b/src/net/sourceforge/plantuml/tim/stdlib/ReverseHsluvColor.java index bcfaa72b9..041fe5cab 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/ReverseHsluvColor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/ReverseHsluvColor.java @@ -69,7 +69,7 @@ public class ReverseHsluvColor extends SimpleReturnFunction { color = color.reverseHsluv(); return TValue.fromString(color.asString()); } catch (NoSuchColorException e) { - throw EaterException.located("No such color"); + throw EaterException.located("No such color", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/SetVariableValue.java b/src/net/sourceforge/plantuml/tim/stdlib/SetVariableValue.java index 1dd202157..18123b644 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/SetVariableValue.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/SetVariableValue.java @@ -66,7 +66,7 @@ public class SetVariableValue extends SimpleReturnFunction { // } final String name = values.get(0).toString(); final TValue value = values.get(1); - memory.putVariable(name, value, TVariableScope.GLOBAL); + memory.putVariable(name, value, TVariableScope.GLOBAL, location); return TValue.fromString(""); } diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index 77f7aa10b..80dec5df6 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -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.2024.4beta2"; + private static final String version = "1.2024.4beta3"; public static String versionString() { return version; From a48dd52d9ffc19b576ae4a75041c9575ada80fbf Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Thu, 22 Feb 2024 20:06:59 +0100 Subject: [PATCH 88/95] refactor: prepare preprocessor error improvement (almost finished :-) https://github.com/plantuml/plantuml/pull/1668 --- gradle.properties | 2 +- .../sourceforge/plantuml/preproc/Defines.java | 4 +- src/net/sourceforge/plantuml/preproc/Sub.java | 6 +- .../plantuml/preproc2/PreprocessorUtils.java | 11 +-- src/net/sourceforge/plantuml/tim/Eater.java | 56 ++++++----- .../plantuml/tim/EaterAffectation.java | 2 +- .../plantuml/tim/EaterAffectationDefine.java | 2 +- .../sourceforge/plantuml/tim/EaterAssert.java | 6 +- .../plantuml/tim/EaterDeclareProcedure.java | 2 +- .../tim/EaterDeclareReturnFunction.java | 2 +- .../plantuml/tim/EaterDumpMemory.java | 2 +- .../sourceforge/plantuml/tim/EaterElseIf.java | 2 +- .../plantuml/tim/EaterException.java | 63 ------------- .../plantuml/tim/EaterExceptionLocated.java | 4 + .../plantuml/tim/EaterForeach.java | 2 +- .../plantuml/tim/EaterFunctionCall.java | 9 +- src/net/sourceforge/plantuml/tim/EaterIf.java | 2 +- .../sourceforge/plantuml/tim/EaterIfdef.java | 2 +- .../sourceforge/plantuml/tim/EaterIfndef.java | 2 +- .../sourceforge/plantuml/tim/EaterImport.java | 2 +- .../plantuml/tim/EaterInclude.java | 2 +- .../plantuml/tim/EaterIncludeDef.java | 2 +- .../plantuml/tim/EaterIncludesub.java | 2 +- .../plantuml/tim/EaterLegacyDefine.java | 2 +- .../plantuml/tim/EaterLegacyDefineLong.java | 2 +- .../sourceforge/plantuml/tim/EaterLog.java | 2 +- .../sourceforge/plantuml/tim/EaterReturn.java | 2 +- .../plantuml/tim/EaterStartsub.java | 4 +- .../sourceforge/plantuml/tim/EaterTheme.java | 16 ++-- .../sourceforge/plantuml/tim/EaterUndef.java | 2 +- .../sourceforge/plantuml/tim/EaterWhile.java | 2 +- .../plantuml/tim/ExecutionContextWhile.java | 2 +- .../plantuml/tim/ExecutionContexts.java | 10 +- .../plantuml/tim/FunctionsSet.java | 20 ++-- .../sourceforge/plantuml/tim/StringEater.java | 2 +- .../sourceforge/plantuml/tim/TContext.java | 93 +++++++++---------- .../sourceforge/plantuml/tim/TFunction.java | 4 +- .../plantuml/tim/TFunctionImpl.java | 11 ++- src/net/sourceforge/plantuml/tim/TMemory.java | 4 +- .../plantuml/tim/TMemoryGlobal.java | 4 +- .../plantuml/tim/TMemoryLocal.java | 2 +- .../sourceforge/plantuml/tim/TimLoader.java | 2 +- .../plantuml/tim/VariableManager.java | 10 +- .../plantuml/tim/expression/Knowledge.java | 3 +- .../expression/ReversePolishInterpretor.java | 39 ++++---- .../plantuml/tim/expression/ShuntingYard.java | 6 +- .../plantuml/tim/expression/TokenStack.java | 21 ++--- .../plantuml/tim/expression/TokenType.java | 9 +- .../tim/iterator/AbstractCodeIterator.java | 6 +- .../plantuml/tim/iterator/CodeIterator.java | 7 +- .../tim/iterator/CodeIteratorAffectation.java | 13 ++- .../tim/iterator/CodeIteratorForeach.java | 9 +- .../plantuml/tim/iterator/CodeIteratorIf.java | 23 ++--- .../tim/iterator/CodeIteratorImpl.java | 6 +- .../iterator/CodeIteratorInnerComment.java | 3 +- .../iterator/CodeIteratorLegacyDefine.java | 3 +- .../tim/iterator/CodeIteratorLongComment.java | 3 +- .../tim/iterator/CodeIteratorProcedure.java | 3 +- .../iterator/CodeIteratorReturnFunction.java | 3 +- .../iterator/CodeIteratorShortComment.java | 3 +- .../tim/iterator/CodeIteratorSub.java | 7 +- .../tim/iterator/CodeIteratorWhile.java | 7 +- .../plantuml/tim/stdlib/AlwaysFalse.java | 3 +- .../plantuml/tim/stdlib/AlwaysTrue.java | 3 +- .../plantuml/tim/stdlib/CallUserFunction.java | 5 +- .../sourceforge/plantuml/tim/stdlib/Chr.java | 3 +- .../plantuml/tim/stdlib/Darken.java | 5 +- .../plantuml/tim/stdlib/DateFunction.java | 7 +- .../plantuml/tim/stdlib/Dec2hex.java | 3 +- .../plantuml/tim/stdlib/Dirpath.java | 3 +- .../sourceforge/plantuml/tim/stdlib/Eval.java | 3 +- .../plantuml/tim/stdlib/Feature.java | 3 +- .../plantuml/tim/stdlib/FileExists.java | 3 +- .../plantuml/tim/stdlib/Filename.java | 3 +- .../plantuml/tim/stdlib/FunctionExists.java | 3 +- .../plantuml/tim/stdlib/GetAllStdlib.java | 5 +- .../plantuml/tim/stdlib/GetAllTheme.java | 3 +- .../plantuml/tim/stdlib/GetJsonKey.java | 9 +- .../plantuml/tim/stdlib/GetJsonType.java | 3 +- .../plantuml/tim/stdlib/GetVariableValue.java | 3 +- .../plantuml/tim/stdlib/GetVersion.java | 3 +- .../plantuml/tim/stdlib/Getenv.java | 3 +- .../plantuml/tim/stdlib/Hex2dec.java | 3 +- .../plantuml/tim/stdlib/HslColor.java | 3 +- .../plantuml/tim/stdlib/IntVal.java | 3 +- .../plantuml/tim/stdlib/InvokeProcedure.java | 5 +- .../plantuml/tim/stdlib/IsDark.java | 5 +- .../plantuml/tim/stdlib/IsLight.java | 5 +- .../plantuml/tim/stdlib/JsonKeyExists.java | 3 +- .../plantuml/tim/stdlib/Lighten.java | 5 +- .../plantuml/tim/stdlib/LoadJson.java | 13 +-- .../plantuml/tim/stdlib/LogicalAnd.java | 3 +- .../plantuml/tim/stdlib/LogicalNand.java | 3 +- .../plantuml/tim/stdlib/LogicalNor.java | 3 +- .../plantuml/tim/stdlib/LogicalNot.java | 3 +- .../plantuml/tim/stdlib/LogicalNxor.java | 3 +- .../plantuml/tim/stdlib/LogicalOr.java | 3 +- .../plantuml/tim/stdlib/LogicalXor.java | 3 +- .../sourceforge/plantuml/tim/stdlib/Now.java | 3 +- .../sourceforge/plantuml/tim/stdlib/Ord.java | 3 +- .../plantuml/tim/stdlib/RandomFunction.java | 5 +- .../tim/stdlib/RetrieveProcedure.java | 3 +- .../plantuml/tim/stdlib/ReverseColor.java | 5 +- .../tim/stdlib/ReverseHsluvColor.java | 5 +- .../plantuml/tim/stdlib/SetVariableValue.java | 3 +- .../tim/stdlib/SimpleReturnFunction.java | 4 +- .../sourceforge/plantuml/tim/stdlib/Size.java | 3 +- .../plantuml/tim/stdlib/SplitStr.java | 3 +- .../plantuml/tim/stdlib/Strlen.java | 3 +- .../plantuml/tim/stdlib/Strpos.java | 3 +- .../plantuml/tim/stdlib/Substr.java | 3 +- .../plantuml/tim/stdlib/VariableExists.java | 3 +- .../sourceforge/plantuml/version/Version.java | 2 +- .../plantuml/tim/TimTestUtils.java | 8 +- .../plantuml/tim/stdlib/AlwaysFalseTest.java | 8 +- .../plantuml/tim/stdlib/AlwaysTrueTest.java | 8 +- .../plantuml/tim/stdlib/ChrTest.java | 3 +- .../plantuml/tim/stdlib/Dec2hexTest.java | 8 +- .../plantuml/tim/stdlib/FeatureTest.java | 13 ++- .../plantuml/tim/stdlib/GetAllStdlibTest.java | 11 ++- .../plantuml/tim/stdlib/GetAllThemeTest.java | 9 +- .../plantuml/tim/stdlib/GetJsonKeyTest.java | 13 ++- .../plantuml/tim/stdlib/GetJsonTypeTest.java | 13 ++- .../plantuml/tim/stdlib/GetenvTest.java | 5 +- .../plantuml/tim/stdlib/Hex2decTest.java | 8 +- .../plantuml/tim/stdlib/LowerTest.java | 13 ++- .../plantuml/tim/stdlib/OrdTest.java | 3 +- .../tim/stdlib/RandomFuntionTest.java | 27 +++--- .../plantuml/tim/stdlib/SizeTest.java | 13 ++- .../plantuml/tim/stdlib/UpperTest.java | 13 ++- 130 files changed, 390 insertions(+), 538 deletions(-) delete mode 100644 src/net/sourceforge/plantuml/tim/EaterException.java diff --git a/gradle.properties b/gradle.properties index acb37ac5e..159ed6443 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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.2024.4beta3 +version = 1.2024.4beta4 org.gradle.workers.max = 3 \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/preproc/Defines.java b/src/net/sourceforge/plantuml/preproc/Defines.java index 14ec49a0e..eb2a1550f 100644 --- a/src/net/sourceforge/plantuml/preproc/Defines.java +++ b/src/net/sourceforge/plantuml/preproc/Defines.java @@ -56,7 +56,7 @@ import net.sourceforge.plantuml.security.SFile; import net.sourceforge.plantuml.security.SecurityProfile; import net.sourceforge.plantuml.security.SecurityUtils; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; +import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.TVariableScope; import net.sourceforge.plantuml.utils.Log; @@ -82,7 +82,7 @@ public class Defines implements Truth { return new Defines(); } - public void copyTo(TMemory memory, StringLocated location) throws EaterException { + public void copyTo(TMemory memory, StringLocated location) throws EaterExceptionLocated { for (Entry ent : values.entrySet()) { final String name = ent.getKey(); final Define def = ent.getValue(); diff --git a/src/net/sourceforge/plantuml/preproc/Sub.java b/src/net/sourceforge/plantuml/preproc/Sub.java index 00b7bddcd..e14e5e746 100644 --- a/src/net/sourceforge/plantuml/preproc/Sub.java +++ b/src/net/sourceforge/plantuml/preproc/Sub.java @@ -42,13 +42,13 @@ import java.util.List; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.text.TLineType; -import net.sourceforge.plantuml.tim.EaterException; +import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.EaterStartsub; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TMemory; public class Sub { - // ::remove folder when __HAXE__ + // ::remove folder when __HAXE__ private final String name; private final List lines = new ArrayList<>(); @@ -79,7 +79,7 @@ public class Sub { } public static Sub fromFile(ReadLine reader, String blocname, TContext context, TMemory memory) - throws IOException, EaterException { + throws IOException, EaterExceptionLocated { Sub result = null; StringLocated s = null; boolean skip = false; diff --git a/src/net/sourceforge/plantuml/preproc2/PreprocessorUtils.java b/src/net/sourceforge/plantuml/preproc2/PreprocessorUtils.java index 4ed855154..4fc609f49 100644 --- a/src/net/sourceforge/plantuml/preproc2/PreprocessorUtils.java +++ b/src/net/sourceforge/plantuml/preproc2/PreprocessorUtils.java @@ -53,8 +53,7 @@ import net.sourceforge.plantuml.preproc.StartDiagramExtractReader; import net.sourceforge.plantuml.preproc.Stdlib; import net.sourceforge.plantuml.security.SURL; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; -import net.sourceforge.plantuml.utils.LineLocation; +import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.utils.Log; public class PreprocessorUtils { @@ -134,7 +133,7 @@ public class PreprocessorUtils { } public static ReadLine getReaderIncludeUrl(final SURL url, StringLocated s, String suf, Charset charset) - throws EaterException { + throws EaterExceptionLocated { try { if (StartDiagramExtractReader.containsStartDiagram(url, s, charset)) return StartDiagramExtractReader.build(url, s, suf, charset); @@ -142,16 +141,16 @@ public class PreprocessorUtils { return getReaderInclude(url, s, charset); } catch (IOException e) { Logme.error(e); - throw EaterException.located("Cannot open URL " + e.getMessage(), s); + throw EaterExceptionLocated.located("Cannot open URL " + e.getMessage(), s); } } public static ReadLine getReaderInclude(SURL url, StringLocated s, Charset charset) - throws EaterException, UnsupportedEncodingException { + throws EaterExceptionLocated, UnsupportedEncodingException { final InputStream is = url.openStream(); if (is == null) - throw EaterException.located("Cannot open URL", s); + throw EaterExceptionLocated.located("Cannot open URL", s); return ReadLineReader.create(new InputStreamReader(is, charset), url.toString(), s.getLocation()); } diff --git a/src/net/sourceforge/plantuml/tim/Eater.java b/src/net/sourceforge/plantuml/tim/Eater.java index 3ccc10440..20d123720 100644 --- a/src/net/sourceforge/plantuml/tim/Eater.java +++ b/src/net/sourceforge/plantuml/tim/Eater.java @@ -64,19 +64,19 @@ public abstract class Eater { return stringLocated; } - public abstract void analyze(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated; + public abstract void analyze(TContext context, TMemory memory) throws EaterExceptionLocated; public int getCurrentPosition() { return i; } - final protected String eatAllToEnd() throws EaterException { + final protected String eatAllToEnd() throws EaterExceptionLocated { final String result = stringLocated.getString().substring(i); i = stringLocated.length(); return result; } - final public TValue eatExpression(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { + final public TValue eatExpression(TContext context, TMemory memory) throws EaterExceptionLocated { final char ch = peekChar(); if (ch == '{' || ch == '[') { final String data = eatAllToEnd(); @@ -89,23 +89,22 @@ public abstract class Eater { return tokenStack.getResult(getStringLocated(), context, memory); } - final protected TokenStack eatTokenStack() throws EaterException { + final protected TokenStack eatTokenStack() throws EaterExceptionLocated { final TokenStack tokenStack = new TokenStack(); addIntoTokenStack(tokenStack, false); if (tokenStack.size() == 0) - throw EaterException.located("Missing expression", stringLocated); + throw EaterExceptionLocated.located("Missing expression", stringLocated); return tokenStack; } - final protected TValue eatExpressionStopAtColon(TContext context, TMemory memory) - throws EaterException, EaterExceptionLocated { + final protected TValue eatExpressionStopAtColon(TContext context, TMemory memory) throws EaterExceptionLocated { final TokenStack tokenStack = new TokenStack(); addIntoTokenStack(tokenStack, true); return tokenStack.getResult(getStringLocated(), context, memory); } - final protected void addIntoTokenStack(TokenStack tokenStack, boolean stopAtColon) throws EaterException { + final protected void addIntoTokenStack(TokenStack tokenStack, boolean stopAtColon) throws EaterExceptionLocated { Token lastToken = null; while (true) { final Token token = TokenType.eatOneToken(lastToken, this, stopAtColon); @@ -118,10 +117,10 @@ public abstract class Eater { } } - final public String eatAndGetQuotedString() throws EaterException { + final public String eatAndGetQuotedString() throws EaterExceptionLocated { final char separator = peekChar(); if (TLineType.isQuote(separator) == false) - throw EaterException.located("quote10", stringLocated); + throw EaterExceptionLocated.located("quote10", stringLocated); checkAndEatChar(separator); final StringBuilder value = new StringBuilder(); @@ -130,7 +129,7 @@ public abstract class Eater { return value.toString(); } - final protected String eatAndGetOptionalQuotedString() throws EaterException { + final protected String eatAndGetOptionalQuotedString() throws EaterExceptionLocated { final char quote = peekChar(); if (TLineType.isQuote(quote)) return eatAndGetQuotedString(); @@ -142,7 +141,7 @@ public abstract class Eater { while (true) { char ch = peekChar(); if (ch == 0) - throw EaterException.located("until001", stringLocated); + throw EaterExceptionLocated.located("until001", stringLocated); if (level == 0 && (ch == ',' || ch == ')')) return value.toString().trim(); @@ -160,7 +159,7 @@ public abstract class Eater { // return value.toString(); } - final public String eatAndGetNumber() throws EaterException { + final public String eatAndGetNumber() throws EaterExceptionLocated { final StringBuilder result = new StringBuilder(); while (true) { final char ch = peekChar(); @@ -176,7 +175,7 @@ public abstract class Eater { } } - final public String eatAndGetSpaces() throws EaterException { + final public String eatAndGetSpaces() throws EaterExceptionLocated { final StringBuilder result = new StringBuilder(); while (true) { final char ch = peekChar(); @@ -187,19 +186,19 @@ public abstract class Eater { } } - final protected String eatAndGetVarname() throws EaterException { + final protected String eatAndGetVarname() throws EaterExceptionLocated { final StringBuilder varname = new StringBuilder("" + eatOneChar()); if (TLineType.isLetterOrUnderscoreOrDollar(varname.charAt(0)) == false) - throw EaterException.located("a002", stringLocated); + throw EaterExceptionLocated.located("a002", stringLocated); addUpToLastLetterOrUnderscoreOrDigit(varname); return varname.toString(); } - final protected String eatAndGetFunctionName() throws EaterException { + final protected String eatAndGetFunctionName() throws EaterExceptionLocated { final StringBuilder varname = new StringBuilder("" + eatOneChar()); if (TLineType.isLetterOrUnderscoreOrDollar(varname.charAt(0)) == false) - throw EaterException.located("a003", stringLocated); + throw EaterExceptionLocated.located("a003", stringLocated); addUpToLastLetterOrUnderscoreOrDigit(varname); return varname.toString(); @@ -247,14 +246,14 @@ public abstract class Eater { return ch; } - final protected void checkAndEatChar(char ch) throws EaterException { + final protected void checkAndEatChar(char ch) throws EaterExceptionLocated { if (i >= stringLocated.length() || stringLocated.charAt(i) != ch) - throw EaterException.located("a001", stringLocated); + throw EaterExceptionLocated.located("a001", stringLocated); i++; } - final protected boolean safeCheckAndEatChar(char ch) throws EaterException { + final protected boolean safeCheckAndEatChar(char ch) throws EaterExceptionLocated { if (i >= stringLocated.length() || stringLocated.charAt(i) != ch) return false; @@ -262,7 +261,7 @@ public abstract class Eater { return true; } - final protected void optionallyEatChar(char ch) throws EaterException { + final protected void optionallyEatChar(char ch) throws EaterExceptionLocated { if (i >= stringLocated.length() || stringLocated.charAt(i) != ch) return; @@ -270,7 +269,7 @@ public abstract class Eater { i++; } - final protected void checkAndEatChar(String s) throws EaterException { + final protected void checkAndEatChar(String s) throws EaterExceptionLocated { for (int j = 0; j < s.length(); j++) checkAndEatChar(s.charAt(j)); @@ -299,8 +298,7 @@ public abstract class Eater { } final protected TFunctionImpl eatDeclareFunction(TContext context, TMemory memory, boolean unquoted, - StringLocated location, boolean allowNoParenthesis, TFunctionType type) - throws EaterException, EaterExceptionLocated { + StringLocated location, boolean allowNoParenthesis, TFunctionType type) throws EaterExceptionLocated { final List args = new ArrayList<>(); final String functionName = eatAndGetFunctionName(); skipSpaces(); @@ -308,7 +306,7 @@ public abstract class Eater { if (allowNoParenthesis) return new TFunctionImpl(functionName, args, unquoted, type); - throw EaterException.located("Missing opening parenthesis", stringLocated); + throw EaterExceptionLocated.located("Missing opening parenthesis", stringLocated); } while (true) { skipSpaces(); @@ -333,7 +331,7 @@ public abstract class Eater { checkAndEatChar(")"); break; } else { - throw EaterException.located("Error in function definition", stringLocated); + throw EaterExceptionLocated.located("Error in function definition", stringLocated); } } skipSpaces(); @@ -341,7 +339,7 @@ public abstract class Eater { } final protected TFunctionImpl eatDeclareReturnFunctionWithOptionalReturn(TContext context, TMemory memory, - boolean unquoted, StringLocated location) throws EaterException, EaterExceptionLocated { + boolean unquoted, StringLocated location) throws EaterExceptionLocated { final TFunctionImpl result = eatDeclareFunction(context, memory, unquoted, location, false, TFunctionType.RETURN_FUNCTION); if (peekChar() == 'r') { @@ -359,7 +357,7 @@ public abstract class Eater { } final protected TFunctionImpl eatDeclareProcedure(TContext context, TMemory memory, boolean unquoted, - StringLocated location) throws EaterException, EaterExceptionLocated { + StringLocated location) throws EaterExceptionLocated { final TFunctionImpl result = eatDeclareFunction(context, memory, unquoted, location, false, TFunctionType.PROCEDURE); return result; diff --git a/src/net/sourceforge/plantuml/tim/EaterAffectation.java b/src/net/sourceforge/plantuml/tim/EaterAffectation.java index 726ef28f8..efe99b76f 100644 --- a/src/net/sourceforge/plantuml/tim/EaterAffectation.java +++ b/src/net/sourceforge/plantuml/tim/EaterAffectation.java @@ -44,7 +44,7 @@ public class EaterAffectation extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { skipSpaces(); checkAndEatChar("!"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterAffectationDefine.java b/src/net/sourceforge/plantuml/tim/EaterAffectationDefine.java index aa689aeab..863f3d91f 100644 --- a/src/net/sourceforge/plantuml/tim/EaterAffectationDefine.java +++ b/src/net/sourceforge/plantuml/tim/EaterAffectationDefine.java @@ -44,7 +44,7 @@ public class EaterAffectationDefine extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { skipSpaces(); checkAndEatChar("!define"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterAssert.java b/src/net/sourceforge/plantuml/tim/EaterAssert.java index e854c06ad..3c34cacb1 100644 --- a/src/net/sourceforge/plantuml/tim/EaterAssert.java +++ b/src/net/sourceforge/plantuml/tim/EaterAssert.java @@ -44,7 +44,7 @@ public class EaterAssert extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { skipSpaces(); checkAndEatChar("!assert"); skipSpaces(); @@ -55,9 +55,9 @@ public class EaterAssert extends Eater { if (ch == ':') { checkAndEatChar(':'); final TValue message = eatExpression(context, memory); - throw EaterException.located("Assertion error : " + message.toString(), getStringLocated()); + throw EaterExceptionLocated.located("Assertion error : " + message.toString(), getStringLocated()); } - throw EaterException.located("Assertion error", getStringLocated()); + throw EaterExceptionLocated.located("Assertion error", getStringLocated()); } } diff --git a/src/net/sourceforge/plantuml/tim/EaterDeclareProcedure.java b/src/net/sourceforge/plantuml/tim/EaterDeclareProcedure.java index 9c155df18..d0cdbdd16 100644 --- a/src/net/sourceforge/plantuml/tim/EaterDeclareProcedure.java +++ b/src/net/sourceforge/plantuml/tim/EaterDeclareProcedure.java @@ -48,7 +48,7 @@ public class EaterDeclareProcedure extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { skipSpaces(); checkAndEatChar("!"); boolean unquoted = false; diff --git a/src/net/sourceforge/plantuml/tim/EaterDeclareReturnFunction.java b/src/net/sourceforge/plantuml/tim/EaterDeclareReturnFunction.java index 8c6415d1a..84bf4c5c2 100644 --- a/src/net/sourceforge/plantuml/tim/EaterDeclareReturnFunction.java +++ b/src/net/sourceforge/plantuml/tim/EaterDeclareReturnFunction.java @@ -48,7 +48,7 @@ public class EaterDeclareReturnFunction extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { skipSpaces(); checkAndEatChar("!"); boolean unquoted = false; diff --git a/src/net/sourceforge/plantuml/tim/EaterDumpMemory.java b/src/net/sourceforge/plantuml/tim/EaterDumpMemory.java index 33315178b..fcf4eac86 100644 --- a/src/net/sourceforge/plantuml/tim/EaterDumpMemory.java +++ b/src/net/sourceforge/plantuml/tim/EaterDumpMemory.java @@ -43,7 +43,7 @@ public class EaterDumpMemory extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { skipSpaces(); checkAndEatChar("!dump_memory"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterElseIf.java b/src/net/sourceforge/plantuml/tim/EaterElseIf.java index 8ddc5e35a..e83bbbf5a 100644 --- a/src/net/sourceforge/plantuml/tim/EaterElseIf.java +++ b/src/net/sourceforge/plantuml/tim/EaterElseIf.java @@ -46,7 +46,7 @@ public class EaterElseIf extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { skipSpaces(); checkAndEatChar("!elseif"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterException.java b/src/net/sourceforge/plantuml/tim/EaterException.java deleted file mode 100644 index ee3439e13..000000000 --- a/src/net/sourceforge/plantuml/tim/EaterException.java +++ /dev/null @@ -1,63 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2024, Arnaud Roques - * - * Project Info: https://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * https://plantuml.com/patreon (only 1$ per month!) - * https://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.tim; - -import net.sourceforge.plantuml.text.StringLocated; - -public class EaterException extends Exception { - - private final String message; - - private EaterException(String message, StringLocated location) { - this.message = message; - } - - public static EaterException unlocated(String message, StringLocated location) { - return new EaterException(message, location); - } - - public static EaterException located(String message, StringLocated location) { - return unlocated(message, location); - } - - public final String getMessage() { - return message; - } - - public EaterExceptionLocated withLocation(StringLocated sl) { - return EaterExceptionLocated.located(message, sl); - } - -} diff --git a/src/net/sourceforge/plantuml/tim/EaterExceptionLocated.java b/src/net/sourceforge/plantuml/tim/EaterExceptionLocated.java index 36ee62187..4aeb0a0da 100644 --- a/src/net/sourceforge/plantuml/tim/EaterExceptionLocated.java +++ b/src/net/sourceforge/plantuml/tim/EaterExceptionLocated.java @@ -52,6 +52,10 @@ public class EaterExceptionLocated extends Exception { return new EaterExceptionLocated(message, Objects.requireNonNull(location)); } + public static EaterExceptionLocated unlocated(String message, StringLocated location) { + return new EaterExceptionLocated(message, Objects.requireNonNull(location)); + } + public final String getMessage() { return message; } diff --git a/src/net/sourceforge/plantuml/tim/EaterForeach.java b/src/net/sourceforge/plantuml/tim/EaterForeach.java index b7be391da..c631ed8f7 100644 --- a/src/net/sourceforge/plantuml/tim/EaterForeach.java +++ b/src/net/sourceforge/plantuml/tim/EaterForeach.java @@ -48,7 +48,7 @@ public class EaterForeach extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { skipSpaces(); checkAndEatChar("!foreach"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterFunctionCall.java b/src/net/sourceforge/plantuml/tim/EaterFunctionCall.java index 8e703fde8..767671aed 100644 --- a/src/net/sourceforge/plantuml/tim/EaterFunctionCall.java +++ b/src/net/sourceforge/plantuml/tim/EaterFunctionCall.java @@ -58,7 +58,7 @@ public class EaterFunctionCall extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { skipUntilChar('('); checkAndEatChar('('); skipSpaces(); @@ -119,9 +119,10 @@ public class EaterFunctionCall extends Eater { break; } if (unquoted) { - throw EaterException.located("unquoted function/procedure cannot use expression.", getStringLocated()); + throw EaterExceptionLocated.located("unquoted function/procedure cannot use expression.", + getStringLocated()); } - throw EaterException.located("call001", getStringLocated()); + throw EaterExceptionLocated.located("call001", getStringLocated()); } } @@ -133,7 +134,7 @@ public class EaterFunctionCall extends Eater { return Collections.unmodifiableMap(namedArguments); } - public final String getEndOfLine() throws EaterException { + public final String getEndOfLine() throws EaterExceptionLocated { return this.eatAllToEnd(); } diff --git a/src/net/sourceforge/plantuml/tim/EaterIf.java b/src/net/sourceforge/plantuml/tim/EaterIf.java index 50ad453da..ed544cba9 100644 --- a/src/net/sourceforge/plantuml/tim/EaterIf.java +++ b/src/net/sourceforge/plantuml/tim/EaterIf.java @@ -46,7 +46,7 @@ public class EaterIf extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { skipSpaces(); checkAndEatChar("!if"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterIfdef.java b/src/net/sourceforge/plantuml/tim/EaterIfdef.java index b197abc20..7173965df 100644 --- a/src/net/sourceforge/plantuml/tim/EaterIfdef.java +++ b/src/net/sourceforge/plantuml/tim/EaterIfdef.java @@ -48,7 +48,7 @@ public class EaterIfdef extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { skipSpaces(); checkAndEatChar("!ifdef"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterIfndef.java b/src/net/sourceforge/plantuml/tim/EaterIfndef.java index ae9d7478f..a79da59a6 100644 --- a/src/net/sourceforge/plantuml/tim/EaterIfndef.java +++ b/src/net/sourceforge/plantuml/tim/EaterIfndef.java @@ -46,7 +46,7 @@ public class EaterIfndef extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { skipSpaces(); checkAndEatChar("!ifndef"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterImport.java b/src/net/sourceforge/plantuml/tim/EaterImport.java index 6784a01f2..c292af610 100644 --- a/src/net/sourceforge/plantuml/tim/EaterImport.java +++ b/src/net/sourceforge/plantuml/tim/EaterImport.java @@ -45,7 +45,7 @@ public class EaterImport extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { skipSpaces(); checkAndEatChar("!import"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterInclude.java b/src/net/sourceforge/plantuml/tim/EaterInclude.java index 5366d8a4a..fac2806ff 100644 --- a/src/net/sourceforge/plantuml/tim/EaterInclude.java +++ b/src/net/sourceforge/plantuml/tim/EaterInclude.java @@ -47,7 +47,7 @@ public class EaterInclude extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { skipSpaces(); checkAndEatChar("!include"); final char peekChar = peekChar(); diff --git a/src/net/sourceforge/plantuml/tim/EaterIncludeDef.java b/src/net/sourceforge/plantuml/tim/EaterIncludeDef.java index f0ffecce5..b275c1169 100644 --- a/src/net/sourceforge/plantuml/tim/EaterIncludeDef.java +++ b/src/net/sourceforge/plantuml/tim/EaterIncludeDef.java @@ -45,7 +45,7 @@ public class EaterIncludeDef extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { skipSpaces(); checkAndEatChar("!includedef"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterIncludesub.java b/src/net/sourceforge/plantuml/tim/EaterIncludesub.java index bd93e2e1e..53778e2e1 100644 --- a/src/net/sourceforge/plantuml/tim/EaterIncludesub.java +++ b/src/net/sourceforge/plantuml/tim/EaterIncludesub.java @@ -45,7 +45,7 @@ public class EaterIncludesub extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { skipSpaces(); checkAndEatChar("!includesub"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterLegacyDefine.java b/src/net/sourceforge/plantuml/tim/EaterLegacyDefine.java index 532470560..bb0257003 100644 --- a/src/net/sourceforge/plantuml/tim/EaterLegacyDefine.java +++ b/src/net/sourceforge/plantuml/tim/EaterLegacyDefine.java @@ -45,7 +45,7 @@ public class EaterLegacyDefine extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { skipSpaces(); checkAndEatChar("!define"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterLegacyDefineLong.java b/src/net/sourceforge/plantuml/tim/EaterLegacyDefineLong.java index 54a782553..3b93fbfd1 100644 --- a/src/net/sourceforge/plantuml/tim/EaterLegacyDefineLong.java +++ b/src/net/sourceforge/plantuml/tim/EaterLegacyDefineLong.java @@ -45,7 +45,7 @@ public class EaterLegacyDefineLong extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { skipSpaces(); checkAndEatChar("!definelong"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterLog.java b/src/net/sourceforge/plantuml/tim/EaterLog.java index 805a64306..53f938091 100644 --- a/src/net/sourceforge/plantuml/tim/EaterLog.java +++ b/src/net/sourceforge/plantuml/tim/EaterLog.java @@ -44,7 +44,7 @@ public class EaterLog extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { skipSpaces(); checkAndEatChar("!log"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterReturn.java b/src/net/sourceforge/plantuml/tim/EaterReturn.java index 99ed3dd21..58ade8267 100644 --- a/src/net/sourceforge/plantuml/tim/EaterReturn.java +++ b/src/net/sourceforge/plantuml/tim/EaterReturn.java @@ -46,7 +46,7 @@ public class EaterReturn extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { skipSpaces(); checkAndEatChar("!return"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterStartsub.java b/src/net/sourceforge/plantuml/tim/EaterStartsub.java index 9bb1a02c9..ca67a6574 100644 --- a/src/net/sourceforge/plantuml/tim/EaterStartsub.java +++ b/src/net/sourceforge/plantuml/tim/EaterStartsub.java @@ -45,13 +45,13 @@ public class EaterStartsub extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { skipSpaces(); checkAndEatChar("!startsub"); skipSpaces(); this.subname = eatAllToEnd(); if (this.subname.matches("\\w+") == false) - throw EaterException.located("Bad sub name", getStringLocated()); + throw EaterExceptionLocated.located("Bad sub name", getStringLocated()); } diff --git a/src/net/sourceforge/plantuml/tim/EaterTheme.java b/src/net/sourceforge/plantuml/tim/EaterTheme.java index c43fdc33f..891b101a0 100644 --- a/src/net/sourceforge/plantuml/tim/EaterTheme.java +++ b/src/net/sourceforge/plantuml/tim/EaterTheme.java @@ -67,7 +67,7 @@ public class EaterTheme extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { skipSpaces(); checkAndEatChar("!theme"); skipSpaces(); @@ -85,7 +85,7 @@ public class EaterTheme extends Eater { } - public final ReadLine getTheme() throws EaterException { + public final ReadLine getTheme() throws EaterExceptionLocated { if (from == null) { try { final ReadLine reader = ThemeUtils.getReaderTheme(realName); @@ -101,24 +101,24 @@ public class EaterTheme extends Eater { } catch (IOException e) { Logme.error(e); } - throw EaterException.located("Cannot load " + realName, getStringLocated()); + throw EaterExceptionLocated.located("Cannot load " + realName, getStringLocated()); } if (from.startsWith("<") && from.endsWith(">")) { final ReadLine reader = ThemeUtils.getReaderTheme(realName, from); if (reader == null) - throw EaterException.located("No such theme " + realName + " in " + from, getStringLocated()); + throw EaterExceptionLocated.located("No such theme " + realName + " in " + from, getStringLocated()); return reader; } else if (from.startsWith("http://") || from.startsWith("https://")) { final SURL url = SURL.create(ThemeUtils.getFullPath(from, realName)); if (url == null) - throw EaterException.located("Cannot open URL", getStringLocated()); + throw EaterExceptionLocated.located("Cannot open URL", getStringLocated()); try { return PreprocessorUtils.getReaderInclude(url, getStringLocated(), UTF_8); } catch (UnsupportedEncodingException e) { Logme.error(e); - throw EaterException.located("Cannot decode charset", getStringLocated()); + throw EaterExceptionLocated.located("Cannot decode charset", getStringLocated()); } } @@ -126,12 +126,12 @@ public class EaterTheme extends Eater { final FileWithSuffix file = context.getFileWithSuffix(from, realName); final Reader tmp = file.getReader(UTF_8); if (tmp == null) - throw EaterException.located("No such theme " + realName, getStringLocated()); + throw EaterExceptionLocated.located("No such theme " + realName, getStringLocated()); return ReadLineReader.create(tmp, "theme " + realName); } catch (IOException e) { Logme.error(e); - throw EaterException.located("Cannot load " + realName, getStringLocated()); + throw EaterExceptionLocated.located("Cannot load " + realName, getStringLocated()); } } diff --git a/src/net/sourceforge/plantuml/tim/EaterUndef.java b/src/net/sourceforge/plantuml/tim/EaterUndef.java index 01e48c910..525644758 100644 --- a/src/net/sourceforge/plantuml/tim/EaterUndef.java +++ b/src/net/sourceforge/plantuml/tim/EaterUndef.java @@ -43,7 +43,7 @@ public class EaterUndef extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { skipSpaces(); checkAndEatChar("!undef"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterWhile.java b/src/net/sourceforge/plantuml/tim/EaterWhile.java index 8538d6978..4b3844b87 100644 --- a/src/net/sourceforge/plantuml/tim/EaterWhile.java +++ b/src/net/sourceforge/plantuml/tim/EaterWhile.java @@ -46,7 +46,7 @@ public class EaterWhile extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { skipSpaces(); checkAndEatChar("!while"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/ExecutionContextWhile.java b/src/net/sourceforge/plantuml/tim/ExecutionContextWhile.java index cc65cc222..c1c6b6898 100644 --- a/src/net/sourceforge/plantuml/tim/ExecutionContextWhile.java +++ b/src/net/sourceforge/plantuml/tim/ExecutionContextWhile.java @@ -61,7 +61,7 @@ public class ExecutionContextWhile { } public TValue conditionValue(StringLocated location, TContext context, TMemory memory) - throws EaterException, EaterExceptionLocated { + throws EaterExceptionLocated { return whileExpression.getResult(location, context, memory); } diff --git a/src/net/sourceforge/plantuml/tim/ExecutionContexts.java b/src/net/sourceforge/plantuml/tim/ExecutionContexts.java index 8a3cb8518..33ab5821b 100644 --- a/src/net/sourceforge/plantuml/tim/ExecutionContexts.java +++ b/src/net/sourceforge/plantuml/tim/ExecutionContexts.java @@ -79,12 +79,12 @@ public abstract class ExecutionContexts { return allForeachs.pollLast(); } - public boolean areAllIfOk(TContext context, TMemory memory) throws EaterException { - for (ExecutionContextIf conditionalContext : allIfs) { - if (conditionalContext.conditionIsOkHere() == false) { + public boolean areAllIfOk(TContext context, TMemory memory) throws EaterExceptionLocated { + for (ExecutionContextIf conditionalContext : allIfs) + if (conditionalContext.conditionIsOkHere() == false) return false; - } - } + + return true; } diff --git a/src/net/sourceforge/plantuml/tim/FunctionsSet.java b/src/net/sourceforge/plantuml/tim/FunctionsSet.java index 0f910fb66..b5702c62d 100644 --- a/src/net/sourceforge/plantuml/tim/FunctionsSet.java +++ b/src/net/sourceforge/plantuml/tim/FunctionsSet.java @@ -95,9 +95,9 @@ public class FunctionsSet { } public void executeLegacyDefine(TContext context, TMemory memory, StringLocated s) - throws EaterException, EaterExceptionLocated { + throws EaterExceptionLocated { if (this.pendingFunction != null) - throw EaterException.located("already0048", s); + throw EaterExceptionLocated.located("already0048", s); final EaterLegacyDefine legacyDefine = new EaterLegacyDefine(s); legacyDefine.analyze(context, memory); @@ -107,9 +107,9 @@ public class FunctionsSet { } public void executeLegacyDefineLong(TContext context, TMemory memory, StringLocated s) - throws EaterException, EaterExceptionLocated { + throws EaterExceptionLocated { if (this.pendingFunction != null) - throw EaterException.located("already0068", s); + throw EaterExceptionLocated.located("already0068", s); final EaterLegacyDefineLong legacyDefineLong = new EaterLegacyDefineLong(s); legacyDefineLong.analyze(context, memory); @@ -117,9 +117,9 @@ public class FunctionsSet { } public void executeDeclareReturnFunction(TContext context, TMemory memory, StringLocated s) - throws EaterException, EaterExceptionLocated { + throws EaterExceptionLocated { if (this.pendingFunction != null) - throw EaterException.located("already0068", s); + throw EaterExceptionLocated.located("already0068", s); final EaterDeclareReturnFunction declareFunction = new EaterDeclareReturnFunction(s); declareFunction.analyze(context, memory); @@ -127,7 +127,7 @@ public class FunctionsSet { final TFunctionSignature declaredSignature = declareFunction.getFunction().getSignature(); final TFunction previous = this.functions.get(declaredSignature); if (previous != null && (finalFlag || this.functionsFinal.contains(declaredSignature))) - throw EaterException.located("This function is already defined", s); + throw EaterExceptionLocated.located("This function is already defined", s); if (finalFlag) this.functionsFinal.add(declaredSignature); @@ -140,9 +140,9 @@ public class FunctionsSet { } public void executeDeclareProcedure(TContext context, TMemory memory, StringLocated s) - throws EaterException, EaterExceptionLocated { + throws EaterExceptionLocated { if (this.pendingFunction != null) - throw EaterException.located("already0068", s); + throw EaterExceptionLocated.located("already0068", s); final EaterDeclareProcedure declareFunction = new EaterDeclareProcedure(s); declareFunction.analyze(context, memory); @@ -150,7 +150,7 @@ public class FunctionsSet { final TFunctionSignature declaredSignature = declareFunction.getFunction().getSignature(); final TFunction previous = this.functions.get(declaredSignature); if (previous != null && (finalFlag || this.functionsFinal.contains(declaredSignature))) - throw EaterException.located("This function is already defined", s); + throw EaterExceptionLocated.located("This function is already defined", s); if (finalFlag) this.functionsFinal.add(declaredSignature); diff --git a/src/net/sourceforge/plantuml/tim/StringEater.java b/src/net/sourceforge/plantuml/tim/StringEater.java index 85ca881c9..e8b2825e2 100644 --- a/src/net/sourceforge/plantuml/tim/StringEater.java +++ b/src/net/sourceforge/plantuml/tim/StringEater.java @@ -43,7 +43,7 @@ public class StringEater extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterException, EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { throw new UnsupportedOperationException(); } diff --git a/src/net/sourceforge/plantuml/tim/TContext.java b/src/net/sourceforge/plantuml/tim/TContext.java index 547313c90..86a3bb0b1 100644 --- a/src/net/sourceforge/plantuml/tim/TContext.java +++ b/src/net/sourceforge/plantuml/tim/TContext.java @@ -236,7 +236,7 @@ public class TContext { public Knowledge asKnowledge(final TMemory memory, final LineLocation location) { return new Knowledge() { - public TValue getVariable(String name) throws EaterException, EaterExceptionLocated { + public TValue getVariable(String name) throws EaterExceptionLocated { if (name.contains(".") || name.contains("[")) { final TValue result = fromJson(memory, name, location); return result; @@ -250,8 +250,7 @@ public class TContext { }; } - private TValue fromJson(TMemory memory, String name, LineLocation location) - throws EaterException, EaterExceptionLocated { + private TValue fromJson(TMemory memory, String name, LineLocation location) throws EaterExceptionLocated { final String result = applyFunctionsAndVariables(memory, new StringLocated(name, location)); try { final JsonValue json = Json.parse(result); @@ -284,23 +283,19 @@ public class TContext { final CodeIterator it = buildCodeIterator(memory, body); StringLocated s = null; - try { - while ((s = it.peek()) != null) { - final TValue result = executeOneLineSafe(memory, s, ftype, modeSpecial); - if (result != null) - return result; + while ((s = it.peek()) != null) { + final TValue result = executeOneLineSafe(memory, s, ftype, modeSpecial); + if (result != null) + return result; - it.next(); - } - return null; - } catch (EaterException e) { - throw e.withLocation(s); + it.next(); } + return null; } private void executeLinesInternal(TMemory memory, List body, TFunctionType ftype) - throws EaterExceptionLocated, EaterException { + throws EaterExceptionLocated { final CodeIterator it = buildCodeIterator(memory, body); StringLocated s = null; @@ -312,22 +307,20 @@ public class TContext { } private TValue executeOneLineSafe(TMemory memory, StringLocated s, TFunctionType ftype, boolean modeSpecial) - throws EaterException, EaterExceptionLocated { + throws EaterExceptionLocated { try { this.debug.add(s); return executeOneLineNotSafe(memory, s, ftype, modeSpecial); } catch (Exception e) { - if (e instanceof EaterException) - throw (EaterException) e; if (e instanceof EaterExceptionLocated) throw (EaterExceptionLocated) e; Logme.error(e); - throw EaterException.located("Fatal parsing error", s); + throw EaterExceptionLocated.located("Fatal parsing error", s); } } private TValue executeOneLineNotSafe(TMemory memory, StringLocated s, TFunctionType ftype, boolean modeSpecial) - throws EaterException, EaterExceptionLocated { + throws EaterExceptionLocated { final TLineType type = s.getType(); if (type == TLineType.INCLUDESUB) { @@ -382,11 +375,11 @@ public class TContext { } else if (s.getString().matches("^\\s+$")) { return null; } else { - throw EaterException.located("Compile Error " + ftype + " " + type, s); + throw EaterExceptionLocated.located("Compile Error " + ftype + " " + type, s); } } - private void addPlain(TMemory memory, StringLocated s) throws EaterException, EaterExceptionLocated { + private void addPlain(TMemory memory, StringLocated s) throws EaterExceptionLocated { final StringLocated tmp[] = applyFunctionsAndVariablesInternal(memory, s); if (tmp != null) { if (pendingAdd != null) { @@ -399,32 +392,31 @@ public class TContext { } } - private void simulatePlain(TMemory memory, StringLocated s) throws EaterException, EaterExceptionLocated { + private void simulatePlain(TMemory memory, StringLocated s) throws EaterExceptionLocated { final StringLocated ignored[] = applyFunctionsAndVariablesInternal(memory, s); } - private void executeAffectationDefine(TMemory memory, StringLocated s) - throws EaterException, EaterExceptionLocated { + private void executeAffectationDefine(TMemory memory, StringLocated s) throws EaterExceptionLocated { new EaterAffectationDefine(s).analyze(this, memory); } - private void executeDumpMemory(TMemory memory, StringLocated s) throws EaterException { + private void executeDumpMemory(TMemory memory, StringLocated s) throws EaterExceptionLocated { final EaterDumpMemory condition = new EaterDumpMemory(s); condition.analyze(this, memory); } - private void executeAssert(TMemory memory, StringLocated s) throws EaterException, EaterExceptionLocated { + private void executeAssert(TMemory memory, StringLocated s) throws EaterExceptionLocated { final EaterAssert condition = new EaterAssert(s); condition.analyze(this, memory); } - private void executeUndef(TMemory memory, StringLocated s) throws EaterException { + private void executeUndef(TMemory memory, StringLocated s) throws EaterExceptionLocated { final EaterUndef undef = new EaterUndef(s); undef.analyze(this, memory); } private StringLocated[] applyFunctionsAndVariablesInternal(TMemory memory, StringLocated located) - throws EaterException, EaterExceptionLocated { + throws EaterExceptionLocated { if (memory.isEmpty() && functionsSet.size() == 0) return new StringLocated[] { located }; @@ -442,8 +434,7 @@ public class TContext { private String pendingAdd = null; - public String applyFunctionsAndVariables(TMemory memory, final StringLocated str) - throws EaterException, EaterExceptionLocated { + public String applyFunctionsAndVariables(TMemory memory, final StringLocated str) throws EaterExceptionLocated { // https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore%E2%80%93Horspool_algorithm // https://stackoverflow.com/questions/1326682/java-replacing-multiple-different-substring-in-a-string-at-once-or-in-the-most // https://en.wikipedia.org/wiki/String-searching_algorithm @@ -465,7 +456,7 @@ public class TContext { call.getNamedArguments().keySet()); final TFunction function = functionsSet.getFunctionSmart(signature); if (function == null) - throw EaterException.located("Function not found " + presentFunction, str); + throw EaterExceptionLocated.located("Function not found " + presentFunction, str); if (function.getFunctionType() == TFunctionType.PROCEDURE) { this.pendingAdd = result.toString(); @@ -503,11 +494,11 @@ public class TContext { } private void executeVoid3(StringLocated location, TMemory memory, TFunction function, EaterFunctionCall call) - throws EaterException, EaterExceptionLocated { + throws EaterExceptionLocated { function.executeProcedureInternal(this, memory, location, call.getValues(), call.getNamedArguments()); } - private void executeImport(TMemory memory, StringLocated s) throws EaterException, EaterExceptionLocated { + private void executeImport(TMemory memory, StringLocated s) throws EaterExceptionLocated { final EaterImport _import = new EaterImport(s.getTrimmed()); _import.analyze(this, memory); @@ -520,13 +511,13 @@ public class TContext { } } catch (IOException e) { Logme.error(e); - throw EaterException.located("Cannot import " + e.getMessage(), s); + throw EaterExceptionLocated.located("Cannot import " + e.getMessage(), s); } - throw EaterException.located("Cannot import", s); + throw EaterExceptionLocated.located("Cannot import", s); } - private void executeLog(TMemory memory, StringLocated s) throws EaterException, EaterExceptionLocated { + private void executeLog(TMemory memory, StringLocated s) throws EaterExceptionLocated { final EaterLog log = new EaterLog(s.getTrimmed()); log.analyze(this, memory); } @@ -538,7 +529,7 @@ public class TContext { } - private void executeIncludesub(TMemory memory, StringLocated s) throws EaterException, EaterExceptionLocated { + private void executeIncludesub(TMemory memory, StringLocated s) throws EaterExceptionLocated { ImportedFiles saveImportedFiles = null; try { final EaterIncludesub include = new EaterIncludesub(s.getTrimmed()); @@ -556,7 +547,7 @@ public class TContext { this.importedFiles = this.importedFiles.withCurrentDir(f2.getParentFile()); final Reader reader = f2.getReader(charset); if (reader == null) - throw EaterException.located("cannot include " + what, s); + throw EaterExceptionLocated.located("cannot include " + what, s); try { ReadLine readerline = ReadLineReader.create(reader, what, s.getLocation()); @@ -568,14 +559,14 @@ public class TContext { } } catch (IOException e) { Logme.error(e); - throw EaterException.located("cannot include " + what, s); + throw EaterExceptionLocated.located("cannot include " + what, s); } } if (sub == null) sub = subs.get(what); if (sub == null) - throw EaterException.located("cannot include " + what, s); + throw EaterExceptionLocated.located("cannot include " + what, s); executeLinesInternal(memory, sub.lines(), null); } finally { @@ -585,7 +576,7 @@ public class TContext { } } - private void executeIncludeDef(TMemory memory, StringLocated s) throws EaterException, EaterExceptionLocated { + private void executeIncludeDef(TMemory memory, StringLocated s) throws EaterExceptionLocated { final EaterIncludeDef include = new EaterIncludeDef(s.getTrimmed()); include.analyze(this, memory); final String definitionName = include.getLocation(); @@ -604,7 +595,7 @@ public class TContext { } while (true); } catch (IOException e) { Logme.error(e); - throw EaterException.located("" + e, s); + throw EaterExceptionLocated.located("" + e, s); } finally { try { reader2.close(); @@ -614,12 +605,12 @@ public class TContext { } } - private void executeTheme(TMemory memory, StringLocated s) throws EaterException, EaterExceptionLocated { + private void executeTheme(TMemory memory, StringLocated s) throws EaterExceptionLocated { final EaterTheme eater = new EaterTheme(s.getTrimmed(), importedFiles); eater.analyze(this, memory); final ReadLine reader = eater.getTheme(); if (reader == null) - throw EaterException.located("No such theme " + eater.getName(), s); + throw EaterExceptionLocated.located("No such theme " + eater.getName(), s); try { final List body = new ArrayList<>(); @@ -633,7 +624,7 @@ public class TContext { } while (true); } catch (IOException e) { Logme.error(e); - throw EaterException.located("Error reading theme " + e, s); + throw EaterExceptionLocated.located("Error reading theme " + e, s); } finally { try { reader.close(); @@ -643,7 +634,7 @@ public class TContext { } } - private void executeInclude(TMemory memory, StringLocated s) throws EaterException, EaterExceptionLocated { + private void executeInclude(TMemory memory, StringLocated s) throws EaterExceptionLocated { final EaterInclude include = new EaterInclude(s.getTrimmed()); include.analyze(this, memory); String location = include.getWhat(); @@ -661,7 +652,7 @@ public class TContext { if (location.startsWith("http://") || location.startsWith("https://")) { final SURL url = SURL.create(location); if (url == null) - throw EaterException.located("Cannot open URL", s); + throw EaterExceptionLocated.located("Cannot open URL", s); reader = PreprocessorUtils.getReaderIncludeUrl(url, s, suf, charset); } else if (location.startsWith("<") && location.endsWith(">")) { @@ -677,14 +668,14 @@ public class TContext { return; if (strategy == PreprocessorIncludeStrategy.ONCE && filesUsedCurrent.contains(f2)) - throw EaterException.located("This file has already been included", s); + throw EaterExceptionLocated.located("This file has already been included", s); if (StartDiagramExtractReader.containsStartDiagram(f2, s, charset)) { reader = StartDiagramExtractReader.build(f2, s, charset); } else { final Reader tmp = f2.getReader(charset); if (tmp == null) - throw EaterException.located("Cannot include file", s); + throw EaterExceptionLocated.located("Cannot include file", s); reader = ReadLineReader.create(tmp, location, s.getLocation()); } @@ -713,7 +704,7 @@ public class TContext { } } catch (IOException e) { Logme.error(e); - throw EaterException.located("cannot include " + e, s); + throw EaterExceptionLocated.located("cannot include " + e, s); } finally { if (reader != null) { try { @@ -724,7 +715,7 @@ public class TContext { } } - throw EaterException.located("cannot include " + location, s); + throw EaterExceptionLocated.located("cannot include " + location, s); } public boolean isLegacyDefine(String functionName) { diff --git a/src/net/sourceforge/plantuml/tim/TFunction.java b/src/net/sourceforge/plantuml/tim/TFunction.java index d6572f378..f8032a23e 100644 --- a/src/net/sourceforge/plantuml/tim/TFunction.java +++ b/src/net/sourceforge/plantuml/tim/TFunction.java @@ -50,10 +50,10 @@ public interface TFunction { public TFunctionType getFunctionType(); public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List args, - Map named) throws EaterException, EaterExceptionLocated; + Map named) throws EaterExceptionLocated; public void executeProcedureInternal(TContext context, TMemory memory, StringLocated location, List args, - Map named) throws EaterException, EaterExceptionLocated; + Map named) throws EaterExceptionLocated; public boolean isUnquoted(); diff --git a/src/net/sourceforge/plantuml/tim/TFunctionImpl.java b/src/net/sourceforge/plantuml/tim/TFunctionImpl.java index 506dc465d..eb36bbb3e 100644 --- a/src/net/sourceforge/plantuml/tim/TFunctionImpl.java +++ b/src/net/sourceforge/plantuml/tim/TFunctionImpl.java @@ -133,7 +133,7 @@ public class TFunctionImpl implements TFunction { @Override public void executeProcedureInternal(TContext context, TMemory memory, StringLocated location, List args, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { if (functionType != TFunctionType.PROCEDURE && functionType != TFunctionType.LEGACY_DEFINELONG) throw new IllegalStateException(); @@ -143,23 +143,24 @@ public class TFunctionImpl implements TFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List args, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { if (functionType == TFunctionType.LEGACY_DEFINE) return executeReturnLegacyDefine(location.getLocation(), context, memory, args); if (functionType != TFunctionType.RETURN_FUNCTION) - throw EaterException.unlocated("Illegal call here. Is there a return directive in your function?", location); + throw EaterExceptionLocated.unlocated("Illegal call here. Is there a return directive in your function?", + location); final TMemory copy = getNewMemory(memory, args, named); final TValue result = context.executeLines(copy, body, TFunctionType.RETURN_FUNCTION, true); if (result == null) - throw EaterException.unlocated("No return directive found in your function", location); + throw EaterExceptionLocated.unlocated("No return directive found in your function", location); return result; } private TValue executeReturnLegacyDefine(LineLocation location, TContext context, TMemory memory, List args) - throws EaterException, EaterExceptionLocated { + throws EaterExceptionLocated { if (legacyDefinition == null) throw new IllegalStateException(); diff --git a/src/net/sourceforge/plantuml/tim/TMemory.java b/src/net/sourceforge/plantuml/tim/TMemory.java index 466b5951b..cf89df812 100644 --- a/src/net/sourceforge/plantuml/tim/TMemory.java +++ b/src/net/sourceforge/plantuml/tim/TMemory.java @@ -45,7 +45,7 @@ public interface TMemory { public TValue getVariable(String varname); public void putVariable(String varname, TValue value, TVariableScope scope, StringLocated location) - throws EaterException; + throws EaterExceptionLocated; public void removeVariable(String varname); @@ -59,7 +59,7 @@ public interface TMemory { public ExecutionContextIf peekIf(); - public boolean areAllIfOk(TContext context, TMemory memory) throws EaterException; + public boolean areAllIfOk(TContext context, TMemory memory) throws EaterExceptionLocated; public void addIf(ExecutionContextIf context); diff --git a/src/net/sourceforge/plantuml/tim/TMemoryGlobal.java b/src/net/sourceforge/plantuml/tim/TMemoryGlobal.java index f5587df1b..f8d5aaec3 100644 --- a/src/net/sourceforge/plantuml/tim/TMemoryGlobal.java +++ b/src/net/sourceforge/plantuml/tim/TMemoryGlobal.java @@ -73,10 +73,10 @@ public class TMemoryGlobal extends ExecutionContexts implements TMemory { @Override public void putVariable(String varname, TValue value, TVariableScope scope, StringLocated location) - throws EaterException { + throws EaterExceptionLocated { Log.info("[MemGlobal] Setting " + varname); if (scope == TVariableScope.LOCAL) - throw EaterException.unlocated("Cannot use local variable here", location); + throw EaterExceptionLocated.unlocated("Cannot use local variable here", location); this.globalVariables.put(varname, value); this.variables.add(varname); diff --git a/src/net/sourceforge/plantuml/tim/TMemoryLocal.java b/src/net/sourceforge/plantuml/tim/TMemoryLocal.java index 2603e1d0d..4271d6e36 100644 --- a/src/net/sourceforge/plantuml/tim/TMemoryLocal.java +++ b/src/net/sourceforge/plantuml/tim/TMemoryLocal.java @@ -79,7 +79,7 @@ public class TMemoryLocal extends ExecutionContexts implements TMemory { @Override public void putVariable(String varname, TValue value, TVariableScope scope, StringLocated location) - throws EaterException { + throws EaterExceptionLocated { if (scope == TVariableScope.GLOBAL) { memoryGlobal.putVariable(varname, value, scope, location); return; diff --git a/src/net/sourceforge/plantuml/tim/TimLoader.java b/src/net/sourceforge/plantuml/tim/TimLoader.java index 7d8bd5c93..09962e007 100644 --- a/src/net/sourceforge/plantuml/tim/TimLoader.java +++ b/src/net/sourceforge/plantuml/tim/TimLoader.java @@ -57,7 +57,7 @@ public class TimLoader { this.context = new TContext(importedFiles, defines, charset, definitionsContainer); try { defines.copyTo(global, location); - } catch (EaterException e) { + } catch (EaterExceptionLocated e) { Logme.error(e); } } diff --git a/src/net/sourceforge/plantuml/tim/VariableManager.java b/src/net/sourceforge/plantuml/tim/VariableManager.java index 1f9a66dc4..d8fc019ac 100644 --- a/src/net/sourceforge/plantuml/tim/VariableManager.java +++ b/src/net/sourceforge/plantuml/tim/VariableManager.java @@ -40,7 +40,6 @@ import net.sourceforge.plantuml.json.JsonValue; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.text.TLineType; import net.sourceforge.plantuml.tim.expression.TValue; -import net.sourceforge.plantuml.utils.LineLocation; public class VariableManager { @@ -54,7 +53,7 @@ public class VariableManager { this.location = location; } - public int replaceVariables(String str, int i, StringBuilder result) throws EaterException, EaterExceptionLocated { + public int replaceVariables(String str, int i, StringBuilder result) throws EaterExceptionLocated { final String presentVariable = getVarnameAt(str, i); if (result.toString().endsWith("##")) result.setLength(result.length() - 2); @@ -81,8 +80,7 @@ public class VariableManager { return i; } - private int replaceJson(JsonValue jsonValue, String str, int i, StringBuilder result) - throws EaterException, EaterExceptionLocated { + private int replaceJson(JsonValue jsonValue, String str, int i, StringBuilder result) throws EaterExceptionLocated { while (i < str.length()) { final char n = str.charAt(i); if (n == '.') { @@ -120,11 +118,11 @@ public class VariableManager { } else if (jsonValue instanceof JsonObject) { jsonValue = ((JsonObject) jsonValue).get(nbString); } else { - throw EaterException.unlocated("Major parsing error", location); + throw EaterExceptionLocated.unlocated("Major parsing error", location); } if (jsonValue == null) - throw EaterException.unlocated("Data parsing error", location); + throw EaterExceptionLocated.unlocated("Data parsing error", location); i++; } else { diff --git a/src/net/sourceforge/plantuml/tim/expression/Knowledge.java b/src/net/sourceforge/plantuml/tim/expression/Knowledge.java index 60723a615..b2fdb753d 100644 --- a/src/net/sourceforge/plantuml/tim/expression/Knowledge.java +++ b/src/net/sourceforge/plantuml/tim/expression/Knowledge.java @@ -34,14 +34,13 @@ */ package net.sourceforge.plantuml.tim.expression; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TFunction; import net.sourceforge.plantuml.tim.TFunctionSignature; public interface Knowledge { - public TValue getVariable(String name) throws EaterException, EaterExceptionLocated; + public TValue getVariable(String name) throws EaterExceptionLocated; public TFunction getFunction(TFunctionSignature signature); diff --git a/src/net/sourceforge/plantuml/tim/expression/ReversePolishInterpretor.java b/src/net/sourceforge/plantuml/tim/expression/ReversePolishInterpretor.java index 5ef785efd..67996cc69 100644 --- a/src/net/sourceforge/plantuml/tim/expression/ReversePolishInterpretor.java +++ b/src/net/sourceforge/plantuml/tim/expression/ReversePolishInterpretor.java @@ -41,7 +41,6 @@ import java.util.Deque; import java.util.List; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunction; @@ -54,7 +53,7 @@ public class ReversePolishInterpretor { private final boolean trace = false; public ReversePolishInterpretor(StringLocated location, TokenStack queue, Knowledge knowledge, TMemory memory, - TContext context) throws EaterException, EaterExceptionLocated { + TContext context) throws EaterExceptionLocated { final Deque stack = new ArrayDeque<>(); if (trace) @@ -73,45 +72,45 @@ public class ReversePolishInterpretor { final TValue v2 = stack.removeFirst(); final TValue v1 = stack.removeFirst(); final TokenOperator op = token.getTokenOperator(); - if (op == null) - throw EaterException.unlocated("bad op", location); - + if (op == null) + throw EaterExceptionLocated.unlocated("bad op", location); + final TValue tmp = op.operate(v1, v2); stack.addFirst(tmp); } else if (token.getTokenType() == TokenType.OPEN_PAREN_FUNC) { final int nb = Integer.parseInt(token.getSurface()); final Token token2 = it.nextToken(); - if (token2.getTokenType() != TokenType.FUNCTION_NAME) - throw EaterException.unlocated("rpn43", location); - + if (token2.getTokenType() != TokenType.FUNCTION_NAME) + throw EaterExceptionLocated.unlocated("rpn43", location); + if (trace) System.err.println("token2=" + token2); final TFunction function = knowledge.getFunction(new TFunctionSignature(token2.getSurface(), nb)); if (trace) System.err.println("function=" + function); - if (function == null) - throw EaterException.unlocated("Unknown built-in function " + token2.getSurface(), location); - - if (function.canCover(nb, Collections.emptySet()) == false) - throw EaterException.unlocated( + if (function == null) + throw EaterExceptionLocated.unlocated("Unknown built-in function " + token2.getSurface(), location); + + if (function.canCover(nb, Collections.emptySet()) == false) + throw EaterExceptionLocated.unlocated( "Bad number of arguments for " + function.getSignature().getFunctionName(), location); - + final List args = new ArrayList<>(); - for (int i = 0; i < nb; i++) + for (int i = 0; i < nb; i++) args.add(0, stack.removeFirst()); - + if (trace) System.err.println("args=" + args); - if (location == null) - throw EaterException.unlocated("rpn44", location); - + if (location == null) + throw EaterExceptionLocated.unlocated("rpn44", location); + final TValue r = function.executeReturnFunction(context, memory, location, args, Collections.emptyMap()); if (trace) System.err.println("r=" + r); stack.addFirst(r); } else { - throw EaterException.unlocated("rpn41", location); + throw EaterExceptionLocated.unlocated("rpn41", location); } } result = stack.removeFirst(); diff --git a/src/net/sourceforge/plantuml/tim/expression/ShuntingYard.java b/src/net/sourceforge/plantuml/tim/expression/ShuntingYard.java index 4b40aab8f..45ee8e008 100644 --- a/src/net/sourceforge/plantuml/tim/expression/ShuntingYard.java +++ b/src/net/sourceforge/plantuml/tim/expression/ShuntingYard.java @@ -38,7 +38,6 @@ import java.util.ArrayDeque; import java.util.Deque; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; // https://en.wikipedia.org/wiki/Shunting-yard_algorithm @@ -59,8 +58,7 @@ public class ShuntingYard { System.err.println(""); } - public ShuntingYard(TokenIterator it, Knowledge knowledge, StringLocated location) - throws EaterException, EaterExceptionLocated { + public ShuntingYard(TokenIterator it, Knowledge knowledge, StringLocated location) throws EaterExceptionLocated { while (it.hasMoreTokens()) { final Token token = it.nextToken(); @@ -76,7 +74,7 @@ public class ShuntingYard { final TValue variable = knowledge.getVariable(name); if (variable == null) { if (isVariableName(name) == false) - throw EaterException.unlocated("Parsing syntax error about " + name, location); + throw EaterExceptionLocated.unlocated("Parsing syntax error about " + name, location); ouputQueue.add(new Token(name, TokenType.QUOTED_STRING, null)); } else { diff --git a/src/net/sourceforge/plantuml/tim/expression/TokenStack.java b/src/net/sourceforge/plantuml/tim/expression/TokenStack.java index b25c96f6c..bed0e451d 100644 --- a/src/net/sourceforge/plantuml/tim/expression/TokenStack.java +++ b/src/net/sourceforge/plantuml/tim/expression/TokenStack.java @@ -44,7 +44,6 @@ import java.util.Map; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.Eater; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TMemory; @@ -87,7 +86,7 @@ public class TokenStack { return result; } - static public TokenStack eatUntilCloseParenthesisOrComma(Eater eater) throws EaterException { + static public TokenStack eatUntilCloseParenthesisOrComma(Eater eater) throws EaterExceptionLocated { final TokenStack result = new TokenStack(); int level = 0; Token lastToken = null; @@ -95,7 +94,7 @@ public class TokenStack { eater.skipSpaces(); final char ch = eater.peekChar(); if (ch == 0) - throw EaterException.unlocated("until001", eater.getStringLocated()); + throw EaterExceptionLocated.unlocated("until001", eater.getStringLocated()); if (level == 0 && (ch == ',' || ch == ')')) return result; @@ -113,12 +112,13 @@ public class TokenStack { } } - static public void eatUntilCloseParenthesisOrComma(TokenIterator it, StringLocated location) throws EaterException { + static public void eatUntilCloseParenthesisOrComma(TokenIterator it, StringLocated location) + throws EaterExceptionLocated { int level = 0; while (true) { final Token ch = it.peekToken(); if (ch == null) - throw EaterException.unlocated("until002", location); + throw EaterExceptionLocated.unlocated("until002", location); final TokenType typech = ch.getTokenType(); if (level == 0 && (typech == TokenType.COMMA || typech == TokenType.CLOSE_PAREN_MATH) @@ -135,7 +135,7 @@ public class TokenStack { } } - private int countFunctionArg(TokenIterator it, StringLocated location) throws EaterException { + private int countFunctionArg(TokenIterator it, StringLocated location) throws EaterExceptionLocated { // return 42; final TokenType type1 = it.peekToken().getTokenType(); if (type1 == TokenType.CLOSE_PAREN_MATH || type1 == TokenType.CLOSE_PAREN_FUNC) @@ -151,13 +151,13 @@ public class TokenStack { else if (type == TokenType.COMMA) result++; else - throw EaterException.unlocated("count13", location); + throw EaterExceptionLocated.unlocated("count13", location); } - throw EaterException.unlocated("count12", location); + throw EaterExceptionLocated.unlocated("count12", location); } - public void guessFunctions(StringLocated location) throws EaterException { + public void guessFunctions(StringLocated location) throws EaterExceptionLocated { final Deque open = new ArrayDeque<>(); final Map parens = new HashMap(); for (int i = 0; i < tokens.size(); i++) { @@ -210,8 +210,7 @@ public class TokenStack { return new InternalIterator(); } - public TValue getResult(StringLocated location, TContext context, TMemory memory) - throws EaterException, EaterExceptionLocated { + public TValue getResult(StringLocated location, TContext context, TMemory memory) throws EaterExceptionLocated { final Knowledge knowledge = context.asKnowledge(memory, location.getLocation()); final TokenStack tmp = withoutSpace(); tmp.guessFunctions(location); diff --git a/src/net/sourceforge/plantuml/tim/expression/TokenType.java b/src/net/sourceforge/plantuml/tim/expression/TokenType.java index a72a65bef..bdb7c445f 100644 --- a/src/net/sourceforge/plantuml/tim/expression/TokenType.java +++ b/src/net/sourceforge/plantuml/tim/expression/TokenType.java @@ -36,10 +36,10 @@ package net.sourceforge.plantuml.tim.expression; import net.sourceforge.plantuml.text.TLineType; import net.sourceforge.plantuml.tim.Eater; -import net.sourceforge.plantuml.tim.EaterException; +import net.sourceforge.plantuml.tim.EaterExceptionLocated; public enum TokenType { - // ::remove folder when __HAXE__ + // ::remove folder when __HAXE__ QUOTED_STRING, JSON_DATA, OPERATOR, OPEN_PAREN_MATH, COMMA, CLOSE_PAREN_MATH, NUMBER, PLAIN_TEXT, SPACES, FUNCTION_NAME, OPEN_PAREN_FUNC, CLOSE_PAREN_FUNC; @@ -77,7 +77,8 @@ public enum TokenType { return result; } - final static public Token eatOneToken(Token lastToken, Eater eater, boolean manageColon) throws EaterException { + final static public Token eatOneToken(Token lastToken, Eater eater, boolean manageColon) + throws EaterExceptionLocated { char ch = eater.peekChar(); if (ch == 0) return null; @@ -121,7 +122,7 @@ public enum TokenType { return true; } - static private String eatAndGetTokenPlainText(Eater eater) throws EaterException { + static private String eatAndGetTokenPlainText(Eater eater) throws EaterExceptionLocated { final StringBuilder result = new StringBuilder(); while (true) { final char ch = eater.peekChar(); diff --git a/src/net/sourceforge/plantuml/tim/iterator/AbstractCodeIterator.java b/src/net/sourceforge/plantuml/tim/iterator/AbstractCodeIterator.java index a4e9a62aa..e01a9707c 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/AbstractCodeIterator.java +++ b/src/net/sourceforge/plantuml/tim/iterator/AbstractCodeIterator.java @@ -35,7 +35,6 @@ package net.sourceforge.plantuml.tim.iterator; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; public abstract class AbstractCodeIterator implements CodeIterator { @@ -47,7 +46,7 @@ public abstract class AbstractCodeIterator implements CodeIterator { } @Override - public void next() throws EaterException, EaterExceptionLocated { + public void next() throws EaterExceptionLocated { source.next(); } @@ -57,7 +56,8 @@ public abstract class AbstractCodeIterator implements CodeIterator { } @Override - final public void jumpToCodePosition(CodePosition newPosition, StringLocated location) throws EaterException { + final public void jumpToCodePosition(CodePosition newPosition, StringLocated location) + throws EaterExceptionLocated { source.jumpToCodePosition(newPosition, location); } diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIterator.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIterator.java index 48698ab5c..f6c613a00 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIterator.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIterator.java @@ -35,18 +35,17 @@ package net.sourceforge.plantuml.tim.iterator; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; public interface CodeIterator { // ::remove folder when __HAXE__ - public StringLocated peek() throws EaterException, EaterExceptionLocated; + public StringLocated peek() throws EaterExceptionLocated; - public void next() throws EaterException, EaterExceptionLocated; + public void next() throws EaterExceptionLocated; public CodePosition getCodePosition(); - public void jumpToCodePosition(CodePosition newPosition, StringLocated location) throws EaterException; + public void jumpToCodePosition(CodePosition newPosition, StringLocated location) throws EaterExceptionLocated; } diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorAffectation.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorAffectation.java index 0d380a436..bb341c11e 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorAffectation.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorAffectation.java @@ -40,7 +40,6 @@ import net.sourceforge.plantuml.json.ParseException; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.text.TLineType; import net.sourceforge.plantuml.tim.EaterAffectation; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TMemory; @@ -59,7 +58,7 @@ public class CodeIteratorAffectation extends AbstractCodeIterator { } @Override - public StringLocated peek() throws EaterException, EaterExceptionLocated { + public StringLocated peek() throws EaterExceptionLocated { while (true) { final StringLocated result = source.peek(); if (result == null) { @@ -75,16 +74,16 @@ public class CodeIteratorAffectation extends AbstractCodeIterator { } } - private void doAffectation(StringLocated result) throws EaterException, EaterExceptionLocated { + private void doAffectation(StringLocated result) throws EaterExceptionLocated { int lastLocation = -1; for (int i = 0; i < 9999; i++) try { this.executeAffectation(context, memory, result); return; } catch (ParseException e) { - if (e.getColumn() <= lastLocation) - throw EaterException.located("Error in JSON format", result); - + if (e.getColumn() <= lastLocation) + throw EaterExceptionLocated.located("Error in JSON format", result); + lastLocation = e.getColumn(); next(); final StringLocated forward = source.peek(); @@ -93,7 +92,7 @@ public class CodeIteratorAffectation extends AbstractCodeIterator { } private void executeAffectation(TContext context, TMemory memory, StringLocated s) - throws EaterException, EaterExceptionLocated { + throws EaterExceptionLocated { new EaterAffectation(s).analyze(context, memory); } diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorForeach.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorForeach.java index 87a783882..d6cb73027 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorForeach.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorForeach.java @@ -39,7 +39,6 @@ import java.util.List; import net.sourceforge.plantuml.json.JsonValue; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.text.TLineType; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.EaterForeach; import net.sourceforge.plantuml.tim.ExecutionContextForeach; @@ -61,7 +60,7 @@ public class CodeIteratorForeach extends AbstractCodeIterator { this.logs = logs; } - public StringLocated peek() throws EaterException, EaterExceptionLocated { + public StringLocated peek() throws EaterExceptionLocated { int level = 0; while (true) { final StringLocated result = source.peek(); @@ -91,7 +90,7 @@ public class CodeIteratorForeach extends AbstractCodeIterator { } else if (result.getType() == TLineType.ENDFOREACH) { logs.add(result); if (foreach == null) - throw EaterException.located("No foreach related to this endforeach", result); + throw EaterExceptionLocated.located("No foreach related to this endforeach", result); foreach.inc(); if (foreach.isSkipMe()) { @@ -108,7 +107,7 @@ public class CodeIteratorForeach extends AbstractCodeIterator { } } - private void executeForeach(TMemory memory, StringLocated s) throws EaterException, EaterExceptionLocated { + private void executeForeach(TMemory memory, StringLocated s) throws EaterExceptionLocated { final EaterForeach condition = new EaterForeach(s); condition.analyze(context, memory); final ExecutionContextForeach foreach = ExecutionContextForeach.fromValue(condition.getVarname(), @@ -122,7 +121,7 @@ public class CodeIteratorForeach extends AbstractCodeIterator { } private void setLoopVariable(TMemory memory, ExecutionContextForeach foreach, StringLocated position) - throws EaterException { + throws EaterExceptionLocated { final JsonValue first = foreach.getJsonArray().get(foreach.currentIndex()); memory.putVariable(foreach.getVarname(), TValue.fromJson(first), TVariableScope.GLOBAL, position); } diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorIf.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorIf.java index 43ae09658..f36954d28 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorIf.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorIf.java @@ -39,7 +39,6 @@ import java.util.List; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.text.TLineType; import net.sourceforge.plantuml.tim.EaterElseIf; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.EaterIf; import net.sourceforge.plantuml.tim.EaterIfdef; @@ -61,7 +60,7 @@ public class CodeIteratorIf extends AbstractCodeIterator { this.logs = logs; } - public StringLocated peek() throws EaterException, EaterExceptionLocated { + public StringLocated peek() throws EaterExceptionLocated { while (true) { final StringLocated result = source.peek(); if (result == null) { @@ -107,19 +106,17 @@ public class CodeIteratorIf extends AbstractCodeIterator { } } - private void executeIf(TContext context, TMemory memory, StringLocated s) - throws EaterException, EaterExceptionLocated { + private void executeIf(TContext context, TMemory memory, StringLocated s) throws EaterExceptionLocated { final EaterIf condition = new EaterIf(s); condition.analyze(context, memory); final boolean isTrue = condition.isTrue(); memory.addIf(ExecutionContextIf.fromValue(isTrue)); } - private void executeElseIf(TContext context, TMemory memory, StringLocated s) - throws EaterException, EaterExceptionLocated { + private void executeElseIf(TContext context, TMemory memory, StringLocated s) throws EaterExceptionLocated { final ExecutionContextIf poll = (ExecutionContextIf) memory.peekIf(); if (poll == null) - throw EaterException.located("No if related to this else", s); + throw EaterExceptionLocated.located("No if related to this else", s); poll.enteringElseIf(); if (poll.hasBeenBurn() == false) { @@ -132,32 +129,32 @@ public class CodeIteratorIf extends AbstractCodeIterator { } } - private void executeIfdef(TContext context, TMemory memory, StringLocated s) throws EaterException { + private void executeIfdef(TContext context, TMemory memory, StringLocated s) throws EaterExceptionLocated { final EaterIfdef condition = new EaterIfdef(s); condition.analyze(context, memory); final boolean isTrue = condition.isTrue(context, memory); memory.addIf(ExecutionContextIf.fromValue(isTrue)); } - private void executeIfndef(TContext context, TMemory memory, StringLocated s) throws EaterException { + private void executeIfndef(TContext context, TMemory memory, StringLocated s) throws EaterExceptionLocated { final EaterIfndef condition = new EaterIfndef(s); condition.analyze(context, memory); final boolean isTrue = condition.isTrue(context, memory); memory.addIf(ExecutionContextIf.fromValue(isTrue)); } - private void executeElse(TContext context, TMemory memory, StringLocated s) throws EaterException { + private void executeElse(TContext context, TMemory memory, StringLocated s) throws EaterExceptionLocated { final ExecutionContextIf poll = (ExecutionContextIf) memory.peekIf(); if (poll == null) - throw EaterException.located("No if related to this else", s); + throw EaterExceptionLocated.located("No if related to this else", s); poll.nowInElse(); } - private void executeEndif(TContext context, TMemory memory, StringLocated s) throws EaterException { + private void executeEndif(TContext context, TMemory memory, StringLocated s) throws EaterExceptionLocated { final ExecutionContextIf poll = (ExecutionContextIf) memory.pollIf(); if (poll == null) - throw EaterException.located("No if related to this endif", s); + throw EaterExceptionLocated.located("No if related to this endif", s); } diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorImpl.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorImpl.java index 985fcd398..c1bbd51a7 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorImpl.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorImpl.java @@ -37,7 +37,7 @@ package net.sourceforge.plantuml.tim.iterator; import java.util.List; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; +import net.sourceforge.plantuml.tim.EaterExceptionLocated; public class CodeIteratorImpl implements CodeIterator { @@ -89,10 +89,10 @@ public class CodeIteratorImpl implements CodeIterator { } @Override - public void jumpToCodePosition(CodePosition newPosition, StringLocated location) throws EaterException { + public void jumpToCodePosition(CodePosition newPosition, StringLocated location) throws EaterExceptionLocated { this.countJump++; if (this.countJump > 999) - throw EaterException.unlocated("Infinite loop?", location); + throw EaterExceptionLocated.unlocated("Infinite loop?", location); final Position pos = (Position) newPosition; this.current = pos.pos; diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorInnerComment.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorInnerComment.java index f7baab3e8..fe5a2d094 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorInnerComment.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorInnerComment.java @@ -35,7 +35,6 @@ package net.sourceforge.plantuml.tim.iterator; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; public class CodeIteratorInnerComment extends AbstractCodeIterator { @@ -44,7 +43,7 @@ public class CodeIteratorInnerComment extends AbstractCodeIterator { super(source); } - public StringLocated peek() throws EaterException, EaterExceptionLocated { + public StringLocated peek() throws EaterExceptionLocated { final StringLocated result = source.peek(); if (result == null) { return null; diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorLegacyDefine.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorLegacyDefine.java index 51670f20e..13709df73 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorLegacyDefine.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorLegacyDefine.java @@ -38,7 +38,6 @@ import java.util.List; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.text.TLineType; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.FunctionsSet; import net.sourceforge.plantuml.tim.TContext; @@ -61,7 +60,7 @@ public class CodeIteratorLegacyDefine extends AbstractCodeIterator { this.memory = memory; } - public StringLocated peek() throws EaterException, EaterExceptionLocated { + public StringLocated peek() throws EaterExceptionLocated { while (true) { final StringLocated result = source.peek(); if (result == null) { diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorLongComment.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorLongComment.java index 3f2cc2e0b..cc92cf384 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorLongComment.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorLongComment.java @@ -38,7 +38,6 @@ import java.util.List; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.text.TLineType; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; public class CodeIteratorLongComment extends AbstractCodeIterator { @@ -50,7 +49,7 @@ public class CodeIteratorLongComment extends AbstractCodeIterator { this.logs = logs; } - public StringLocated peek() throws EaterException, EaterExceptionLocated { + public StringLocated peek() throws EaterExceptionLocated { while (true) { if (source.peek() == null) { return null; diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorProcedure.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorProcedure.java index d03dfcc00..1b4be2503 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorProcedure.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorProcedure.java @@ -38,7 +38,6 @@ import java.util.List; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.text.TLineType; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.FunctionsSet; import net.sourceforge.plantuml.tim.TContext; @@ -62,7 +61,7 @@ public class CodeIteratorProcedure extends AbstractCodeIterator { this.memory = memory; } - public StringLocated peek() throws EaterException, EaterExceptionLocated { + public StringLocated peek() throws EaterExceptionLocated { while (true) { final StringLocated result = source.peek(); if (result == null) { diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorReturnFunction.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorReturnFunction.java index 8ff1feea5..791abad71 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorReturnFunction.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorReturnFunction.java @@ -38,7 +38,6 @@ import java.util.List; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.text.TLineType; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.FunctionsSet; import net.sourceforge.plantuml.tim.TContext; @@ -62,7 +61,7 @@ public class CodeIteratorReturnFunction extends AbstractCodeIterator { this.memory = memory; } - public StringLocated peek() throws EaterException, EaterExceptionLocated { + public StringLocated peek() throws EaterExceptionLocated { while (true) { final StringLocated result = source.peek(); if (result == null) { diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorShortComment.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorShortComment.java index b70c45584..f57bcab66 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorShortComment.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorShortComment.java @@ -38,7 +38,6 @@ import java.util.List; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.text.TLineType; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; public class CodeIteratorShortComment extends AbstractCodeIterator { @@ -50,7 +49,7 @@ public class CodeIteratorShortComment extends AbstractCodeIterator { this.logs = logs; } - public StringLocated peek() throws EaterException, EaterExceptionLocated { + public StringLocated peek() throws EaterExceptionLocated { while (true) { final StringLocated result = source.peek(); if (result == null) { diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorSub.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorSub.java index 2c15a7b3e..1c28d1199 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorSub.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorSub.java @@ -40,7 +40,6 @@ import java.util.Map; import net.sourceforge.plantuml.preproc.Sub; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.text.TLineType; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.EaterStartsub; import net.sourceforge.plantuml.tim.TContext; @@ -66,7 +65,7 @@ public class CodeIteratorSub extends AbstractCodeIterator { return Collections.unmodifiableMap(subs); } - public StringLocated peek() throws EaterException, EaterExceptionLocated { + public StringLocated peek() throws EaterExceptionLocated { if (readingInProgress != null) return readingInProgress.peek(); @@ -83,7 +82,7 @@ public class CodeIteratorSub extends AbstractCodeIterator { StringLocated s = null; while ((s = source.peek()) != null) { if (s.getType() == TLineType.STARTSUB) { - throw EaterException.located("Cannot nest sub", result); + throw EaterExceptionLocated.located("Cannot nest sub", result); } else if (s.getType() == TLineType.ENDSUB) { source.next(); readingInProgress = new CodeIteratorImpl(created.lines()); @@ -101,7 +100,7 @@ public class CodeIteratorSub extends AbstractCodeIterator { } @Override - public void next() throws EaterException, EaterExceptionLocated { + public void next() throws EaterExceptionLocated { if (readingInProgress == null) { source.next(); return; diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorWhile.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorWhile.java index 01b445898..db912021e 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorWhile.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorWhile.java @@ -38,7 +38,6 @@ import java.util.List; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.text.TLineType; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.EaterWhile; import net.sourceforge.plantuml.tim.ExecutionContextWhile; @@ -60,7 +59,7 @@ public class CodeIteratorWhile extends AbstractCodeIterator { this.logs = logs; } - public StringLocated peek() throws EaterException, EaterExceptionLocated { + public StringLocated peek() throws EaterExceptionLocated { int level = 0; while (true) { final StringLocated result = source.peek(); @@ -90,7 +89,7 @@ public class CodeIteratorWhile extends AbstractCodeIterator { } else if (result.getType() == TLineType.ENDWHILE) { logs.add(result); if (currentWhile == null) - throw EaterException.located("No while related to this endwhile", result); + throw EaterExceptionLocated.located("No while related to this endwhile", result); final TValue value = currentWhile.conditionValue(result, context, memory); if (value.toBoolean()) @@ -106,7 +105,7 @@ public class CodeIteratorWhile extends AbstractCodeIterator { } } - private void executeWhile(TMemory memory, StringLocated s) throws EaterException, EaterExceptionLocated { + private void executeWhile(TMemory memory, StringLocated s) throws EaterExceptionLocated { final EaterWhile condition = new EaterWhile(s); condition.analyze(context, memory); final TokenStack whileExpression = condition.getWhileExpression(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/AlwaysFalse.java b/src/net/sourceforge/plantuml/tim/stdlib/AlwaysFalse.java index 6d13ce01e..5991d486e 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/AlwaysFalse.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/AlwaysFalse.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -59,7 +58,7 @@ public class AlwaysFalse extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { return TValue.fromBoolean(false); } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/AlwaysTrue.java b/src/net/sourceforge/plantuml/tim/stdlib/AlwaysTrue.java index e9a1362b6..d9cf561e0 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/AlwaysTrue.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/AlwaysTrue.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -59,7 +58,7 @@ public class AlwaysTrue extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { return TValue.fromBoolean(true); } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/CallUserFunction.java b/src/net/sourceforge/plantuml/tim/stdlib/CallUserFunction.java index 830f5bf25..6268cf54e 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/CallUserFunction.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/CallUserFunction.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunction; @@ -60,13 +59,13 @@ public class CallUserFunction extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final String fname = values.get(0).toString(); final List args = values.subList(1, values.size()); final TFunctionSignature signature = new TFunctionSignature(fname, args.size()); final TFunction func = context.getFunctionSmart(signature); if (func == null) - throw EaterException.unlocated("Cannot find void function " + fname, location); + throw EaterExceptionLocated.unlocated("Cannot find void function " + fname, location); return func.executeReturnFunction(context, memory, location, args, named); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Chr.java b/src/net/sourceforge/plantuml/tim/stdlib/Chr.java index aa7daa6cb..3dcbfc7d9 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Chr.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Chr.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -59,7 +58,7 @@ public class Chr extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { try { final String value = String.valueOf(Character.toChars(values.get(0).toInt())); return TValue.fromString(value); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Darken.java b/src/net/sourceforge/plantuml/tim/stdlib/Darken.java index 1365c7614..bef84da7d 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Darken.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Darken.java @@ -42,7 +42,6 @@ import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.HColorSet; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -63,7 +62,7 @@ public class Darken extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final String colorString = values.get(0).toString(); final int ratio = values.get(1).toInt(); try { @@ -71,7 +70,7 @@ public class Darken extends SimpleReturnFunction { color = color.darken(ratio); return TValue.fromString(color.asString()); } catch (NoSuchColorException e) { - throw EaterException.located("No such color", location); + throw EaterExceptionLocated.located("No such color", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/DateFunction.java b/src/net/sourceforge/plantuml/tim/stdlib/DateFunction.java index 0db1db510..1b77104eb 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/DateFunction.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/DateFunction.java @@ -41,7 +41,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -61,7 +60,7 @@ public class DateFunction extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { if (values.size() == 0) return TValue.fromString(new Date().toString()); @@ -71,11 +70,11 @@ public class DateFunction extends SimpleReturnFunction { now = 1000L * values.get(1).toInt(); else now = System.currentTimeMillis(); - + try { return TValue.fromString(new SimpleDateFormat(format).format(now)); } catch (Exception e) { - throw EaterException.unlocated("Bad date pattern", location); + throw EaterExceptionLocated.unlocated("Bad date pattern", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Dec2hex.java b/src/net/sourceforge/plantuml/tim/stdlib/Dec2hex.java index 668f618da..b274f3a7c 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Dec2hex.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Dec2hex.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -59,7 +58,7 @@ public class Dec2hex extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { try { return TValue.fromString("" + Integer.toHexString(values.get(0).toInt())); } catch (Throwable t) { diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Dirpath.java b/src/net/sourceforge/plantuml/tim/stdlib/Dirpath.java index a3a0b4e9e..0eef6ddb9 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Dirpath.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Dirpath.java @@ -40,7 +40,6 @@ import java.util.Set; import net.sourceforge.plantuml.preproc.Defines; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -66,7 +65,7 @@ public class Dirpath extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { if (value == null) return TValue.fromString(""); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Eval.java b/src/net/sourceforge/plantuml/tim/stdlib/Eval.java index d08e45363..b08d6b263 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Eval.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Eval.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.StringEater; import net.sourceforge.plantuml.tim.TContext; @@ -60,7 +59,7 @@ public class Eval extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final String exp = values.get(0).toString(); final StringEater eater = new StringEater(exp); final TValue value = eater.eatExpression(context, memory); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Feature.java b/src/net/sourceforge/plantuml/tim/stdlib/Feature.java index 042bfee0b..89ef049eb 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Feature.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Feature.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -59,7 +58,7 @@ public class Feature extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final String arg = values.get(0).toString(); if ("style".equalsIgnoreCase(arg)) return TValue.fromInt(1); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/FileExists.java b/src/net/sourceforge/plantuml/tim/stdlib/FileExists.java index f43b345a1..bef8b2246 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/FileExists.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/FileExists.java @@ -40,7 +40,6 @@ import java.util.Set; import net.sourceforge.plantuml.security.SFile; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -60,7 +59,7 @@ public class FileExists extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { // ::comment when __CORE__ final String path = values.get(0).toString(); return TValue.fromBoolean(new SFile(path).exists()); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Filename.java b/src/net/sourceforge/plantuml/tim/stdlib/Filename.java index fd6089946..812a0033e 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Filename.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Filename.java @@ -40,7 +40,6 @@ import java.util.Set; import net.sourceforge.plantuml.preproc.Defines; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -66,7 +65,7 @@ public class Filename extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { if (value == null) { return TValue.fromString(""); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/FunctionExists.java b/src/net/sourceforge/plantuml/tim/stdlib/FunctionExists.java index f72dae133..1d72755cb 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/FunctionExists.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/FunctionExists.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -60,7 +59,7 @@ public class FunctionExists extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final String name = values.get(0).toString(); return TValue.fromBoolean(context.doesFunctionExist(name)); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetAllStdlib.java b/src/net/sourceforge/plantuml/tim/stdlib/GetAllStdlib.java index 2bc32f045..f03178410 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetAllStdlib.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetAllStdlib.java @@ -45,7 +45,6 @@ import net.sourceforge.plantuml.json.JsonObject; import net.sourceforge.plantuml.log.Logme; import net.sourceforge.plantuml.preproc.Stdlib; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -65,7 +64,7 @@ public class GetAllStdlib extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { switch (values.size()) { case 0: @@ -100,7 +99,7 @@ public class GetAllStdlib extends SimpleReturnFunction { default: assert false; // Should not append because of canCover() - throw EaterException.located("Error on get_all_stdlib: Too many arguments", location); + throw EaterExceptionLocated.located("Error on get_all_stdlib: Too many arguments", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetAllTheme.java b/src/net/sourceforge/plantuml/tim/stdlib/GetAllTheme.java index f26379843..9404e09d9 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetAllTheme.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetAllTheme.java @@ -43,7 +43,6 @@ import net.sourceforge.plantuml.json.JsonArray; import net.sourceforge.plantuml.log.Logme; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.theme.ThemeUtils; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -63,7 +62,7 @@ public class GetAllTheme extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final JsonArray result = new JsonArray(); try { for (String theme : ThemeUtils.getAllThemeNames()) { diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java b/src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java index 5b48e27c4..3067496d0 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java @@ -42,7 +42,6 @@ import net.sourceforge.plantuml.json.JsonArray; import net.sourceforge.plantuml.json.JsonObject; import net.sourceforge.plantuml.json.JsonValue; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -62,11 +61,11 @@ public class GetJsonKey extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final TValue data = values.get(0); if (data.isJson() == false) - throw EaterException.unlocated("Not JSON data", location); - + throw EaterExceptionLocated.unlocated("Not JSON data", location); + final JsonValue json = data.toJson(); if (json.isObject()) { final JsonObject object = (JsonObject) json; @@ -88,7 +87,7 @@ public class GetJsonKey extends SimpleReturnFunction { return TValue.fromJson(result); } - throw EaterException.unlocated("Bad JSON type", location); + throw EaterExceptionLocated.unlocated("Bad JSON type", location); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetJsonType.java b/src/net/sourceforge/plantuml/tim/stdlib/GetJsonType.java index 17a2f164a..b27b68f90 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetJsonType.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetJsonType.java @@ -40,7 +40,6 @@ import java.util.Set; import net.sourceforge.plantuml.json.JsonValue; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -60,7 +59,7 @@ public class GetJsonType extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final TValue data = values.get(0); if (data.isString()) return TValue.fromString("string"); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetVariableValue.java b/src/net/sourceforge/plantuml/tim/stdlib/GetVariableValue.java index c950f7c7b..f7ffb4555 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetVariableValue.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetVariableValue.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -59,7 +58,7 @@ public class GetVariableValue extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final String name = values.get(0).toString(); final TValue variable = memory.getVariable(name); if (variable == null) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetVersion.java b/src/net/sourceforge/plantuml/tim/stdlib/GetVersion.java index 68e66ec23..b6d5e61c2 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetVersion.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetVersion.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -60,7 +59,7 @@ public class GetVersion extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { return TValue.fromString(Version.versionString()); } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Getenv.java b/src/net/sourceforge/plantuml/tim/stdlib/Getenv.java index 380448942..28a10472f 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Getenv.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Getenv.java @@ -40,7 +40,6 @@ import java.util.Set; import net.sourceforge.plantuml.security.SecurityUtils; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -60,7 +59,7 @@ public class Getenv extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { // ::comment when __CORE__ final String value = getenv(values.get(0).toString()); if (value == null) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Hex2dec.java b/src/net/sourceforge/plantuml/tim/stdlib/Hex2dec.java index 0cc471567..f7c45b0ef 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Hex2dec.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Hex2dec.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -59,7 +58,7 @@ public class Hex2dec extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { try { return TValue.fromInt(Integer.parseInt(values.get(0).toString(), 16)); } catch (Throwable t) { diff --git a/src/net/sourceforge/plantuml/tim/stdlib/HslColor.java b/src/net/sourceforge/plantuml/tim/stdlib/HslColor.java index 2618bfbf6..34496e629 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/HslColor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/HslColor.java @@ -42,7 +42,6 @@ import java.util.Set; import net.sourceforge.plantuml.klimt.color.HColors; import net.sourceforge.plantuml.klimt.color.HSLColor; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -62,7 +61,7 @@ public class HslColor extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final int h = values.get(0).toInt(); final int s = values.get(1).toInt(); final int l = values.get(2).toInt(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/IntVal.java b/src/net/sourceforge/plantuml/tim/stdlib/IntVal.java index b412cad9d..2b54cc99b 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/IntVal.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/IntVal.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -60,7 +59,7 @@ public class IntVal extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final String s = values.get(0).toString(); try { return TValue.fromInt(Integer.parseInt(s)); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java b/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java index 01e4f2036..6328e88f6 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunction; @@ -65,13 +64,13 @@ public class InvokeProcedure implements TFunction { @Override public void executeProcedureInternal(TContext context, TMemory memory, StringLocated location, List args, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final String fname = args.get(0).toString(); final List sublist = args.subList(1, args.size()); final TFunctionSignature signature = new TFunctionSignature(fname, sublist.size()); final TFunction func = context.getFunctionSmart(signature); if (func == null) - throw EaterException.located("Cannot find void function " + fname, location); + throw EaterExceptionLocated.located("Cannot find void function " + fname, location); func.executeProcedureInternal(context, memory, location, sublist, named); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/IsDark.java b/src/net/sourceforge/plantuml/tim/stdlib/IsDark.java index f8fa6c394..f481264d2 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/IsDark.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/IsDark.java @@ -42,7 +42,6 @@ import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.HColorSet; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -63,13 +62,13 @@ public class IsDark extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final String colorString = values.get(0).toString(); try { final HColor color = HColorSet.instance().getColorLEGACY(colorString); return TValue.fromBoolean(color.isDark()); } catch (NoSuchColorException e) { - throw EaterException.located("No such color", location); + throw EaterExceptionLocated.located("No such color", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/IsLight.java b/src/net/sourceforge/plantuml/tim/stdlib/IsLight.java index 771425750..1528ea8fe 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/IsLight.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/IsLight.java @@ -42,7 +42,6 @@ import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.HColorSet; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -63,13 +62,13 @@ public class IsLight extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final String colorString = values.get(0).toString(); try { final HColor color = HColorSet.instance().getColorLEGACY(colorString); return TValue.fromBoolean(!color.isDark()); } catch (NoSuchColorException e) { - throw EaterException.located("No such color", location); + throw EaterExceptionLocated.located("No such color", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/JsonKeyExists.java b/src/net/sourceforge/plantuml/tim/stdlib/JsonKeyExists.java index 71d6eaed8..bc22ce9a7 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/JsonKeyExists.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/JsonKeyExists.java @@ -41,7 +41,6 @@ import java.util.Set; import net.sourceforge.plantuml.json.JsonObject; import net.sourceforge.plantuml.json.JsonValue; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -61,7 +60,7 @@ public class JsonKeyExists extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final TValue arg0 = values.get(0); if (arg0.isJson() == false) return TValue.fromBoolean(false); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Lighten.java b/src/net/sourceforge/plantuml/tim/stdlib/Lighten.java index 1ec5b593b..41d9a31d2 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Lighten.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Lighten.java @@ -42,7 +42,6 @@ import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.HColorSet; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -63,7 +62,7 @@ public class Lighten extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final String colorString = values.get(0).toString(); final int ratio = values.get(1).toInt(); try { @@ -71,7 +70,7 @@ public class Lighten extends SimpleReturnFunction { color = color.lighten(ratio); return TValue.fromString(color.asString()); } catch (NoSuchColorException e) { - throw EaterException.located("No such color", location); + throw EaterExceptionLocated.located("No such color", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java b/src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java index a03972239..40e5746c6 100755 --- a/src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java @@ -50,7 +50,6 @@ import net.sourceforge.plantuml.log.Logme; import net.sourceforge.plantuml.security.SFile; import net.sourceforge.plantuml.security.SURL; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -109,7 +108,7 @@ public class LoadJson extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final String path = values.get(0).toString(); try { String data = loadStringData(path, getCharset(values)); @@ -120,11 +119,12 @@ public class LoadJson extends SimpleReturnFunction { return TValue.fromJson(jsonValue); } catch (ParseException pe) { Logme.error(pe); - throw EaterException.unlocated("JSON parse issue in source " + path + " on location " + pe.getLocation(), - location); + throw EaterExceptionLocated + .unlocated("JSON parse issue in source " + path + " on location " + pe.getLocation(), location); } catch (UnsupportedEncodingException e) { Logme.error(e); - throw EaterException.unlocated("JSON encoding issue in source " + path + ": " + e.getMessage(), location); + throw EaterExceptionLocated.unlocated("JSON encoding issue in source " + path + ": " + e.getMessage(), + location); } } @@ -163,7 +163,8 @@ public class LoadJson extends SimpleReturnFunction { * @return the decoded String from the data source * @throws EaterException if something went wrong on reading data */ - private String loadStringData(String path, String charset) throws EaterException, UnsupportedEncodingException { + private String loadStringData(String path, String charset) + throws EaterExceptionLocated, UnsupportedEncodingException { byte[] byteData = null; if (path.startsWith("http://") || path.startsWith("https://")) { diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalAnd.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalAnd.java index 3770e1b05..1bea47ee2 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalAnd.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalAnd.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -59,7 +58,7 @@ public class LogicalAnd extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { for (TValue v : values) if (v.toBoolean() == false) return TValue.fromBoolean(false); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNand.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNand.java index 7d655c92f..52345b792 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNand.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNand.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -59,7 +58,7 @@ public class LogicalNand extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { for (TValue v : values) if (v.toBoolean() == false) return TValue.fromBoolean(!false); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNor.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNor.java index 12b003616..fe59542cf 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNor.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -59,7 +58,7 @@ public class LogicalNor extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { for (TValue v : values) if (v.toBoolean() == true) return TValue.fromBoolean(!true); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNot.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNot.java index 7ffb3689e..0dbd650f5 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNot.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNot.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -59,7 +58,7 @@ public class LogicalNot extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final boolean arg = values.get(0).toBoolean(); return TValue.fromBoolean(!arg); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNxor.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNxor.java index a5ed319e3..3abd60263 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNxor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNxor.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -59,7 +58,7 @@ public class LogicalNxor extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { int cpt = 0; for (TValue v : values) if (v.toBoolean() == true) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalOr.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalOr.java index e78dcc546..0d2e5ded2 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalOr.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalOr.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -59,7 +58,7 @@ public class LogicalOr extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { for (TValue v : values) if (v.toBoolean() == true) return TValue.fromBoolean(true); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalXor.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalXor.java index da04addf5..9b9a66cbb 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalXor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalXor.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -59,7 +58,7 @@ public class LogicalXor extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { int cpt = 0; for (TValue v : values) if (v.toBoolean() == true) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Now.java b/src/net/sourceforge/plantuml/tim/stdlib/Now.java index f827d6e9f..f24f75093 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Now.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Now.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -59,7 +58,7 @@ public class Now extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final long now = System.currentTimeMillis() / 1000L; return TValue.fromInt((int) now); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Ord.java b/src/net/sourceforge/plantuml/tim/stdlib/Ord.java index 8ae31e5c4..1c509686a 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Ord.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Ord.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -59,7 +58,7 @@ public class Ord extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { try { final int codePoint = values.get(0).toString().codePointAt(0); return TValue.fromInt(codePoint); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java b/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java index d284045a6..f2c8c885f 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java @@ -40,7 +40,6 @@ import java.util.Random; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -62,7 +61,7 @@ public class RandomFunction extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { switch (values.size()) { case 0: return TValue.fromInt(random.nextInt(2)); @@ -78,7 +77,7 @@ public class RandomFunction extends SimpleReturnFunction { default: assert false; // Should not append because of canCover() - throw EaterException.located("Error on Random: Too many argument", location); + throw EaterExceptionLocated.located("Error on Random: Too many argument", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/RetrieveProcedure.java b/src/net/sourceforge/plantuml/tim/stdlib/RetrieveProcedure.java index 8c31c3520..5e5590ddf 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/RetrieveProcedure.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/RetrieveProcedure.java @@ -40,7 +40,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunction; @@ -61,7 +60,7 @@ public class RetrieveProcedure extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final String fname = values.get(0).toString(); final List args = values.subList(1, values.size()); final TFunctionSignature signature = new TFunctionSignature(fname, args.size()); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/ReverseColor.java b/src/net/sourceforge/plantuml/tim/stdlib/ReverseColor.java index ef1d94ff3..e19fe4a30 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/ReverseColor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/ReverseColor.java @@ -42,7 +42,6 @@ import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.HColorSet; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -62,14 +61,14 @@ public class ReverseColor extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final String colorString = values.get(0).toString(); try { HColor color = HColorSet.instance().getColorLEGACY(colorString); color = color.reverse(); return TValue.fromString(color.asString()); } catch (NoSuchColorException e) { - throw EaterException.located("No such color", location); + throw EaterExceptionLocated.located("No such color", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/ReverseHsluvColor.java b/src/net/sourceforge/plantuml/tim/stdlib/ReverseHsluvColor.java index 041fe5cab..75a60e8ac 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/ReverseHsluvColor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/ReverseHsluvColor.java @@ -42,7 +42,6 @@ import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.HColorSet; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -62,14 +61,14 @@ public class ReverseHsluvColor extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final String colorString = values.get(0).toString(); try { HColor color = HColorSet.instance().getColorLEGACY(colorString); color = color.reverseHsluv(); return TValue.fromString(color.asString()); } catch (NoSuchColorException e) { - throw EaterException.located("No such color", location); + throw EaterExceptionLocated.located("No such color", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/SetVariableValue.java b/src/net/sourceforge/plantuml/tim/stdlib/SetVariableValue.java index 18123b644..fcc12260c 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/SetVariableValue.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/SetVariableValue.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -60,7 +59,7 @@ public class SetVariableValue extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { // if (memory instanceof TMemoryLocal) { // memory = ((TMemoryLocal) memory).getGlobalForInternalUseOnly(); // } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/SimpleReturnFunction.java b/src/net/sourceforge/plantuml/tim/stdlib/SimpleReturnFunction.java index c649a86a4..5276d495e 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/SimpleReturnFunction.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/SimpleReturnFunction.java @@ -38,7 +38,7 @@ import java.util.List; import java.util.Map; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; +import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunction; import net.sourceforge.plantuml.tim.TFunctionType; @@ -53,7 +53,7 @@ public abstract class SimpleReturnFunction implements TFunction { @Override final public void executeProcedureInternal(TContext context, TMemory memory, StringLocated location, - List args, Map named) throws EaterException { + List args, Map named) throws EaterExceptionLocated { throw new UnsupportedOperationException(); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Size.java b/src/net/sourceforge/plantuml/tim/stdlib/Size.java index 0bf62d6d6..82a72c5ab 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Size.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Size.java @@ -42,7 +42,6 @@ import net.sourceforge.plantuml.json.JsonArray; import net.sourceforge.plantuml.json.JsonObject; import net.sourceforge.plantuml.json.JsonValue; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -62,7 +61,7 @@ public class Size extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final TValue value = values.get(0); if (value.isNumber()) return TValue.fromInt(0); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/SplitStr.java b/src/net/sourceforge/plantuml/tim/stdlib/SplitStr.java index 5e181ffca..f3e17784a 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/SplitStr.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/SplitStr.java @@ -41,7 +41,6 @@ import java.util.StringTokenizer; import net.sourceforge.plantuml.json.JsonArray; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -61,7 +60,7 @@ public class SplitStr extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final JsonArray result = new JsonArray(); final String str = values.get(0).toString(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Strlen.java b/src/net/sourceforge/plantuml/tim/stdlib/Strlen.java index 3aeb5b609..f97aad0de 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Strlen.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Strlen.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -59,7 +58,7 @@ public class Strlen extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { return TValue.fromInt(values.get(0).toString().length()); } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Strpos.java b/src/net/sourceforge/plantuml/tim/stdlib/Strpos.java index 8db94424f..b27796e0e 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Strpos.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Strpos.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -59,7 +58,7 @@ public class Strpos extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final String full = values.get(0).toString(); final String searched = values.get(1).toString(); return TValue.fromInt(full.indexOf(searched)); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Substr.java b/src/net/sourceforge/plantuml/tim/stdlib/Substr.java index ec254565b..7f06da48f 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Substr.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Substr.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -59,7 +58,7 @@ public class Substr extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final String full = values.get(0).toString(); final int pos = values.get(1).toInt(); if (pos >= full.length()) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/VariableExists.java b/src/net/sourceforge/plantuml/tim/stdlib/VariableExists.java index 3f06d5e62..2e024b025 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/VariableExists.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/VariableExists.java @@ -39,7 +39,6 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -59,7 +58,7 @@ public class VariableExists extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterException, EaterExceptionLocated { + Map named) throws EaterExceptionLocated { final String name = values.get(0).toString(); return TValue.fromBoolean(memory.getVariable(name) != null); } diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index 80dec5df6..fd32fba24 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -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.2024.4beta3"; + private static final String version = "1.2024.4beta4"; public static String versionString() { return version; diff --git a/test/net/sourceforge/plantuml/tim/TimTestUtils.java b/test/net/sourceforge/plantuml/tim/TimTestUtils.java index 81993d3a2..724e227be 100644 --- a/test/net/sourceforge/plantuml/tim/TimTestUtils.java +++ b/test/net/sourceforge/plantuml/tim/TimTestUtils.java @@ -14,27 +14,27 @@ import net.sourceforge.plantuml.json.JsonValue; public class TimTestUtils { // Tfunc: () -> (String) - public static void assertTimExpectedOutput(TFunction func, String expected) throws EaterException, EaterExceptionLocated { + public static void assertTimExpectedOutput(TFunction func, String expected) throws EaterExceptionLocated { TValue tValue = func.executeReturnFunction(null, null, null, null, null); assertEquals(expected, tValue.toString()); } // Tfunc: (Integer) -> (String) - public static void assertTimExpectedOutputFromInput(TFunction func, Integer input, String expected) throws EaterException, EaterExceptionLocated { + public static void assertTimExpectedOutputFromInput(TFunction func, Integer input, String expected) throws EaterExceptionLocated { List values = Collections.singletonList(TValue.fromInt(input)); TValue tValue = func.executeReturnFunction(null, null, null, values, null); assertEquals(expected, tValue.toString()); } // Tfunc: (String) -> (String) - public static void assertTimExpectedOutputFromInput(TFunction func, String input, String expected) throws EaterException, EaterExceptionLocated { + public static void assertTimExpectedOutputFromInput(TFunction func, String input, String expected) throws EaterExceptionLocated { List values = Collections.singletonList(TValue.fromString(input)); TValue tValue = func.executeReturnFunction(null, null, null, values, null); assertEquals(expected, tValue.toString()); } // Tfunc: (JsonValue) -> (String) - public static void assertTimExpectedOutputFromInput(TFunction func, JsonValue input, String expected) throws EaterException, EaterExceptionLocated { + public static void assertTimExpectedOutputFromInput(TFunction func, JsonValue input, String expected) throws EaterExceptionLocated { List values = Collections.singletonList(TValue.fromJson(input)); TValue tValue = func.executeReturnFunction(null, null, null, values, null); assertEquals(expected, tValue.toString()); diff --git a/test/net/sourceforge/plantuml/tim/stdlib/AlwaysFalseTest.java b/test/net/sourceforge/plantuml/tim/stdlib/AlwaysFalseTest.java index addb2050c..595781c47 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/AlwaysFalseTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/AlwaysFalseTest.java @@ -6,11 +6,9 @@ import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputF import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; import org.junit.jupiter.api.IndicativeSentencesGeneration; import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.converter.ConvertWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TFunction; @@ -24,7 +22,7 @@ class AlwaysFalseTest { final String cutName = "AlwaysFalse"; @Test - void Test_without_Param() throws EaterException, EaterExceptionLocated { + void Test_without_Param() throws EaterExceptionLocated { assertTimExpectedOutput(cut, "0"); } @@ -34,7 +32,7 @@ class AlwaysFalseTest { " 1 , 0 ", " 'a' , 0 ", }) - void Test_with_String(String input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_String(String input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -44,7 +42,7 @@ class AlwaysFalseTest { " 1 , 0 ", " 123 , 0 ", }) - void Test_with_Integer(Integer input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_Integer(Integer input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/AlwaysTrueTest.java b/test/net/sourceforge/plantuml/tim/stdlib/AlwaysTrueTest.java index 439bde93d..cb9de4910 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/AlwaysTrueTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/AlwaysTrueTest.java @@ -6,11 +6,9 @@ import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputF import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; import org.junit.jupiter.api.IndicativeSentencesGeneration; import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.converter.ConvertWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TFunction; @@ -24,7 +22,7 @@ class AlwaysTrueTest { final String cutName = "AlwaysTrue"; @Test - void Test_without_Param() throws EaterException, EaterExceptionLocated { + void Test_without_Param() throws EaterExceptionLocated { assertTimExpectedOutput(cut, "1"); } @@ -34,7 +32,7 @@ class AlwaysTrueTest { " 1 , 1 ", " 'a' , 1 ", }) - void Test_with_String(String input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_String(String input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -44,7 +42,7 @@ class AlwaysTrueTest { " 1 , 1 ", " 123 , 1 ", }) - void Test_with_Integer(Integer input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_Integer(Integer input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/ChrTest.java b/test/net/sourceforge/plantuml/tim/stdlib/ChrTest.java index 6659ecd95..0294507fc 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/ChrTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/ChrTest.java @@ -7,7 +7,6 @@ import org.junit.jupiter.api.IndicativeSentencesGeneration; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TFunction; @@ -38,7 +37,7 @@ class ChrTest { " 128512 , 😀 ", " 128512 , \uD83D\uDE00 ", }) - void Test_with_Integer(Integer input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_Integer(Integer input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } } \ No newline at end of file diff --git a/test/net/sourceforge/plantuml/tim/stdlib/Dec2hexTest.java b/test/net/sourceforge/plantuml/tim/stdlib/Dec2hexTest.java index 1134c293d..1603adbe6 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/Dec2hexTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/Dec2hexTest.java @@ -6,11 +6,9 @@ import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputF import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; import org.junit.jupiter.api.IndicativeSentencesGeneration; import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.converter.ConvertWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TFunction; @@ -24,7 +22,7 @@ class Dec2hexTest { final String cutName = "Dec2hex"; @Test - void Test_without_Param() throws EaterException, EaterExceptionLocated { + void Test_without_Param() throws EaterExceptionLocated { assertTimExpectedOutput(cut, ""); } @@ -38,7 +36,7 @@ class Dec2hexTest { " 255 , 0 ", " 65535 , 0 ", }) - void Test_with_String(String input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_String(String input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -52,7 +50,7 @@ class Dec2hexTest { " 255 , ff ", " 65535 , ffff ", }) - void Test_with_Integer(Integer input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_Integer(Integer input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/FeatureTest.java b/test/net/sourceforge/plantuml/tim/stdlib/FeatureTest.java index 52507fb51..f8a8603aa 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/FeatureTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/FeatureTest.java @@ -2,20 +2,19 @@ package net.sourceforge.plantuml.tim.stdlib; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput; -import static test.utils.JunitUtils.StringJsonConverter; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; import org.junit.jupiter.api.IndicativeSentencesGeneration; import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.converter.ConvertWith; import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.converter.ConvertWith; import org.junit.jupiter.params.provider.CsvSource; import net.sourceforge.plantuml.json.JsonValue; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TFunction; +import test.utils.JunitUtils.StringJsonConverter; /** * Tests the builtin function. @@ -28,7 +27,7 @@ class FeatureTest { @Disabled @Test - void Test_without_Param() throws EaterException, EaterExceptionLocated { + void Test_without_Param() throws EaterExceptionLocated { assertTimExpectedOutput(cut, "0"); } @@ -43,7 +42,7 @@ class FeatureTest { " abc , 0", }) - void Test_with_String(String input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_String(String input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -52,7 +51,7 @@ class FeatureTest { " 0, 0", " 10, 0", }) - void Test_with_Integer(Integer input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_Integer(Integer input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -62,7 +61,7 @@ class FeatureTest { " \"theme\", 1", " 0, 0", }) - void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/GetAllStdlibTest.java b/test/net/sourceforge/plantuml/tim/stdlib/GetAllStdlibTest.java index f274f52e7..16e3f8eed 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/GetAllStdlibTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/GetAllStdlibTest.java @@ -2,14 +2,14 @@ package net.sourceforge.plantuml.tim.stdlib; import static org.assertj.core.api.Assertions.assertThat; +import java.util.ArrayList; import java.util.Arrays; -import java.util.Collections; +import java.util.List; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; import org.junit.jupiter.api.IndicativeSentencesGeneration; import org.junit.jupiter.api.Test; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TFunction; import net.sourceforge.plantuml.tim.expression.TValue; @@ -24,13 +24,14 @@ class GetAllStdlibTest { final String cutName = "GetAllStdlib"; @Test - void Test_without_Param() throws EaterException, EaterExceptionLocated { - final TValue tValue = cut.executeReturnFunction(null, null, null, Collections.emptyList(), null); + void Test_without_Param() throws EaterExceptionLocated { + final List empty = new ArrayList<>(); + final TValue tValue = cut.executeReturnFunction(null, null, null, empty, null); assertThat(tValue.toString()).contains("archimate", "aws", "tupadr3"); } @Test - void Test_with_one_argument() throws EaterException, EaterExceptionLocated { + void Test_with_one_argument() throws EaterExceptionLocated { final TValue tValue = cut.executeReturnFunction(null, null, null, Arrays.asList(TValue.fromInt(0)), null); assertThat(tValue.toString()).contains("archimate", "https://github.com/plantuml-stdlib/Archimate-PlantUML"); } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/GetAllThemeTest.java b/test/net/sourceforge/plantuml/tim/stdlib/GetAllThemeTest.java index c17bc33d2..9201c2d99 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/GetAllThemeTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/GetAllThemeTest.java @@ -2,13 +2,13 @@ package net.sourceforge.plantuml.tim.stdlib; import static org.assertj.core.api.Assertions.assertThat; -import java.util.Collections; +import java.util.ArrayList; +import java.util.List; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; import org.junit.jupiter.api.IndicativeSentencesGeneration; import org.junit.jupiter.api.Test; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TFunction; import net.sourceforge.plantuml.tim.expression.TValue; @@ -23,8 +23,9 @@ class GetAllThemeTest { final String cutName = "GetAllTheme"; @Test - void Test_without_Param() throws EaterException, EaterExceptionLocated { - final TValue tValue = cut.executeReturnFunction(null, null, null, Collections.emptyList(), null); + void Test_without_Param() throws EaterExceptionLocated { + final List empty = new ArrayList<>(); + final TValue tValue = cut.executeReturnFunction(null, null, null, empty, null); assertThat(tValue.toString()).contains("_none_", "amiga", "vibrant"); } } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/GetJsonKeyTest.java b/test/net/sourceforge/plantuml/tim/stdlib/GetJsonKeyTest.java index 80635e456..2f19ed62e 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/GetJsonKeyTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/GetJsonKeyTest.java @@ -2,20 +2,19 @@ package net.sourceforge.plantuml.tim.stdlib; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput; -import static test.utils.JunitUtils.StringJsonConverter; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; import org.junit.jupiter.api.IndicativeSentencesGeneration; import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.converter.ConvertWith; import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.converter.ConvertWith; import org.junit.jupiter.params.provider.CsvSource; import net.sourceforge.plantuml.json.JsonValue; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TFunction; +import test.utils.JunitUtils.StringJsonConverter; /** * Tests the builtin function. @@ -28,7 +27,7 @@ class GetJsonKeyTest { @Disabled @Test - void Test_without_Param() throws EaterException, EaterExceptionLocated { + void Test_without_Param() throws EaterExceptionLocated { assertTimExpectedOutput(cut, "0"); } @@ -39,7 +38,7 @@ class GetJsonKeyTest { " a, Not JSON data", " -1, Not JSON data", }) - void Test_with_String(String input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_String(String input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -49,7 +48,7 @@ class GetJsonKeyTest { " 0, Not JSON data", " -1, Not JSON data", }) - void Test_with_Integer(Integer input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_Integer(Integer input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -67,7 +66,7 @@ class GetJsonKeyTest { // - https://json-schema.org/understanding-json-schema/reference/array.html " '[3, \"different\", { \"types\" : \"of values\" }]', [\"types\"]", }) - void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/GetJsonTypeTest.java b/test/net/sourceforge/plantuml/tim/stdlib/GetJsonTypeTest.java index 0fe35543c..80f5b90eb 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/GetJsonTypeTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/GetJsonTypeTest.java @@ -2,20 +2,19 @@ package net.sourceforge.plantuml.tim.stdlib; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput; -import static test.utils.JunitUtils.StringJsonConverter; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; import org.junit.jupiter.api.IndicativeSentencesGeneration; import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.converter.ConvertWith; import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.converter.ConvertWith; import org.junit.jupiter.params.provider.CsvSource; import net.sourceforge.plantuml.json.JsonValue; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TFunction; +import test.utils.JunitUtils.StringJsonConverter; /** * Tests the builtin function. @@ -28,7 +27,7 @@ class GetJsonTypeTest { @Disabled @Test - void Test_without_Param() throws EaterException, EaterExceptionLocated { + void Test_without_Param() throws EaterExceptionLocated { assertTimExpectedOutput(cut, "0"); } @@ -38,7 +37,7 @@ class GetJsonTypeTest { " a, string", " -1, string", }) - void Test_with_String(String input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_String(String input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -47,7 +46,7 @@ class GetJsonTypeTest { " 0, number", " -1, number", }) - void Test_with_Integer(Integer input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_Integer(Integer input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -67,7 +66,7 @@ class GetJsonTypeTest { " null , json ", " '{\"a\":[1, 2], \"b\":\"abc\", \"b\":true}' , object", }) - void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/GetenvTest.java b/test/net/sourceforge/plantuml/tim/stdlib/GetenvTest.java index aea38a745..4bbfc443c 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/GetenvTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/GetenvTest.java @@ -8,7 +8,6 @@ import java.util.List; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.expression.TValue; @@ -29,7 +28,7 @@ class GetenvTest { "plantuml.SECURITY.blabla", "plantuml.security.credentials.path", }) - void executeReturnFunctionSecurityTest(String name) throws EaterException, EaterExceptionLocated { + void executeReturnFunctionSecurityTest(String name) throws EaterExceptionLocated { System.setProperty("plantuml.security.blabla", "example"); Getenv cut = new Getenv(); @@ -49,7 +48,7 @@ class GetenvTest { "path.separator", "line.separator", }) - void executeReturnFunctionTest(String name) throws EaterException, EaterExceptionLocated { + void executeReturnFunctionTest(String name) throws EaterExceptionLocated { Getenv cut = new Getenv(); List values = Collections.singletonList(TValue.fromString(name)); diff --git a/test/net/sourceforge/plantuml/tim/stdlib/Hex2decTest.java b/test/net/sourceforge/plantuml/tim/stdlib/Hex2decTest.java index 329347b79..e11e52469 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/Hex2decTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/Hex2decTest.java @@ -6,11 +6,9 @@ import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputF import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; import org.junit.jupiter.api.IndicativeSentencesGeneration; import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.converter.ConvertWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TFunction; @@ -24,7 +22,7 @@ class Hex2decTest { final String cutName = "Hex2dec"; @Test - void Test_without_Param() throws EaterException, EaterExceptionLocated { + void Test_without_Param() throws EaterExceptionLocated { assertTimExpectedOutput(cut, "0"); } @@ -44,7 +42,7 @@ class Hex2decTest { " -1 , -1 ", " -a , -10 ", }) - void Test_with_String(String input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_String(String input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -55,7 +53,7 @@ class Hex2decTest { " 10 , 16 ", " -1 , -1 ", }) - void Test_with_Integer(Integer input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_Integer(Integer input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/LowerTest.java b/test/net/sourceforge/plantuml/tim/stdlib/LowerTest.java index 3b50a2d30..57910d42f 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/LowerTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/LowerTest.java @@ -2,20 +2,19 @@ package net.sourceforge.plantuml.tim.stdlib; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput; -import static test.utils.JunitUtils.StringJsonConverter; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; import org.junit.jupiter.api.IndicativeSentencesGeneration; import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.converter.ConvertWith; import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.converter.ConvertWith; import org.junit.jupiter.params.provider.CsvSource; import net.sourceforge.plantuml.json.JsonValue; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TFunction; +import test.utils.JunitUtils.StringJsonConverter; /** * Tests the builtin function. @@ -29,7 +28,7 @@ class LowerTest { // TODO: Manage Lower function without param. (today: we observe `Function not found %lower`) @Disabled @Test - void Test_without_Param() throws EaterException, EaterExceptionLocated { + void Test_without_Param() throws EaterExceptionLocated { assertTimExpectedOutput(cut, ""); } @@ -44,7 +43,7 @@ class LowerTest { " É , é ", " 😀 , 😀 ", }) - void Test_with_String(String input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_String(String input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -55,7 +54,7 @@ class LowerTest { " 10 , 10 ", " -1 , -1 ", }) - void Test_with_Integer(Integer input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_Integer(Integer input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -70,7 +69,7 @@ class LowerTest { // TODO: See JSON management of TRUE/FALSE //" TRUE , true ", }) - void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/OrdTest.java b/test/net/sourceforge/plantuml/tim/stdlib/OrdTest.java index 4fd0411ab..9ae869b52 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/OrdTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/OrdTest.java @@ -7,7 +7,6 @@ import org.junit.jupiter.api.IndicativeSentencesGeneration; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TFunction; @@ -41,7 +40,7 @@ class OrdTest { " 😀 , 128512 ", " \uD83D\uDE00 , 128512 ", }) - void Test_with_String(String input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_String(String input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } } \ No newline at end of file diff --git a/test/net/sourceforge/plantuml/tim/stdlib/RandomFuntionTest.java b/test/net/sourceforge/plantuml/tim/stdlib/RandomFuntionTest.java index c8505449e..226ddde52 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/RandomFuntionTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/RandomFuntionTest.java @@ -2,14 +2,14 @@ package net.sourceforge.plantuml.tim.stdlib; import static org.assertj.core.api.Assertions.assertThat; +import java.util.ArrayList; import java.util.Arrays; -import java.util.Collections; +import java.util.List; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; import org.junit.jupiter.api.IndicativeSentencesGeneration; import org.junit.jupiter.api.RepeatedTest; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TFunction; import net.sourceforge.plantuml.tim.expression.TValue; @@ -25,26 +25,29 @@ class RandomFunctionTest { final String repetitionLabel = "[{currentRepetition}/{totalRepetitions}] "; @RepeatedTest(value = 10, name = repetitionLabel + cutName + "()") - void test_with_no_argument() throws EaterException, EaterExceptionLocated { - final TValue tValue = cut.executeReturnFunction(null, null, null, Collections.emptyList(), null); + void test_with_no_argument() throws EaterExceptionLocated { + final List empty = new ArrayList<>(); + final TValue tValue = cut.executeReturnFunction(null, null, null, empty, null); assertThat(tValue.toInt()).isIn(0, 1); } @RepeatedTest(value = 10, name = repetitionLabel + cutName + "(7)") - void test_with_one_argument() throws EaterException, EaterExceptionLocated { + void test_with_one_argument() throws EaterExceptionLocated { final TValue tValue = cut.executeReturnFunction(null, null, null, Arrays.asList(TValue.fromInt(7)), null); - assertThat(tValue.toInt()).isBetween(0, 7-1); + assertThat(tValue.toInt()).isBetween(0, 7 - 1); } @RepeatedTest(value = 10, name = repetitionLabel + cutName + "(0, 7)") - void test_with_two_argument_first_zero() throws EaterException, EaterExceptionLocated { - final TValue tValue = cut.executeReturnFunction(null, null, null, Arrays.asList(TValue.fromInt(0), TValue.fromInt(7)), null); - assertThat(tValue.toInt()).isBetween(0, 7-1); + void test_with_two_argument_first_zero() throws EaterExceptionLocated { + final TValue tValue = cut.executeReturnFunction(null, null, null, + Arrays.asList(TValue.fromInt(0), TValue.fromInt(7)), null); + assertThat(tValue.toInt()).isBetween(0, 7 - 1); } @RepeatedTest(value = 10, name = repetitionLabel + cutName + "(3, 7)") - void test_with_two_argument() throws EaterException, EaterExceptionLocated { - final TValue tValue = cut.executeReturnFunction(null, null, null, Arrays.asList(TValue.fromInt(3), TValue.fromInt(7)), null); - assertThat(tValue.toInt()).isBetween(3, 7-1); + void test_with_two_argument() throws EaterExceptionLocated { + final TValue tValue = cut.executeReturnFunction(null, null, null, + Arrays.asList(TValue.fromInt(3), TValue.fromInt(7)), null); + assertThat(tValue.toInt()).isBetween(3, 7 - 1); } } \ No newline at end of file diff --git a/test/net/sourceforge/plantuml/tim/stdlib/SizeTest.java b/test/net/sourceforge/plantuml/tim/stdlib/SizeTest.java index 6bcfd105e..a8c3c5218 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/SizeTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/SizeTest.java @@ -2,20 +2,19 @@ package net.sourceforge.plantuml.tim.stdlib; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput; -import static test.utils.JunitUtils.StringJsonConverter; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; import org.junit.jupiter.api.IndicativeSentencesGeneration; import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.converter.ConvertWith; import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.converter.ConvertWith; import org.junit.jupiter.params.provider.CsvSource; import net.sourceforge.plantuml.json.JsonValue; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TFunction; +import test.utils.JunitUtils.StringJsonConverter; /** * Tests the builtin function. @@ -29,7 +28,7 @@ class SizeTest { // TODO: Manage `Size` function without param. (today: we observe `Function not found`) @Disabled @Test - void Test_without_Param() throws EaterException, EaterExceptionLocated { + void Test_without_Param() throws EaterExceptionLocated { assertTimExpectedOutput(cut, "0"); } @@ -48,7 +47,7 @@ class SizeTest { // " 😀 , 1 ", // " \uD83D\uDE00 , 1", }) - void Test_with_String(String input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_String(String input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -58,7 +57,7 @@ class SizeTest { " 1 , 0 ", " 10 , 0 ", }) - void Test_with_Integer(Integer input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_Integer(Integer input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -75,7 +74,7 @@ class SizeTest { " 1, 0 ", " null, 0 ", }) - void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/UpperTest.java b/test/net/sourceforge/plantuml/tim/stdlib/UpperTest.java index 35c1e2e87..8a78cbb96 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/UpperTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/UpperTest.java @@ -2,20 +2,19 @@ package net.sourceforge.plantuml.tim.stdlib; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutput; import static net.sourceforge.plantuml.tim.TimTestUtils.assertTimExpectedOutputFromInput; -import static test.utils.JunitUtils.StringJsonConverter; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; import org.junit.jupiter.api.IndicativeSentencesGeneration; import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.converter.ConvertWith; import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.converter.ConvertWith; import org.junit.jupiter.params.provider.CsvSource; import net.sourceforge.plantuml.json.JsonValue; -import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterExceptionLocated; import net.sourceforge.plantuml.tim.TFunction; +import test.utils.JunitUtils.StringJsonConverter; /** * Tests the builtin function. @@ -29,7 +28,7 @@ class UpperTest { // TODO: Manage Upper function without param. (today: we observe `Function not found %upper`) @Disabled @Test - void Test_without_Param() throws EaterException, EaterExceptionLocated { + void Test_without_Param() throws EaterExceptionLocated { assertTimExpectedOutput(cut, ""); } @@ -44,7 +43,7 @@ class UpperTest { " é , É ", " 😀 , 😀 ", }) - void Test_with_String(String input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_String(String input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -55,7 +54,7 @@ class UpperTest { " 10 , 10 ", " -1 , -1 ", }) - void Test_with_Integer(Integer input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_Integer(Integer input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -66,7 +65,7 @@ class UpperTest { " '{\"a\":[1, 2], \"b\":\"abc\", \"b\":true}' , '{\"A\":[1,2],\"B\":\"ABC\",\"B\":TRUE}'", " true , TRUE ", }) - void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterException, EaterExceptionLocated { + void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterExceptionLocated { assertTimExpectedOutputFromInput(cut, input, expected); } } From 3cc68235ddf4dd0f9491bc4a3e649b3da14425e8 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Thu, 22 Feb 2024 20:28:03 +0100 Subject: [PATCH 89/95] refactor: prepare preprocessor error improvement --- gradle.properties | 2 +- .../sourceforge/plantuml/preproc/Defines.java | 4 +- src/net/sourceforge/plantuml/preproc/Sub.java | 4 +- .../plantuml/preproc2/PreprocessorUtils.java | 10 +-- src/net/sourceforge/plantuml/tim/Eater.java | 54 ++++++------- .../plantuml/tim/EaterAffectation.java | 2 +- .../plantuml/tim/EaterAffectationDefine.java | 2 +- .../sourceforge/plantuml/tim/EaterAssert.java | 6 +- .../plantuml/tim/EaterDeclareProcedure.java | 2 +- .../tim/EaterDeclareReturnFunction.java | 2 +- .../plantuml/tim/EaterDumpMemory.java | 2 +- .../sourceforge/plantuml/tim/EaterElseIf.java | 2 +- ...eptionLocated.java => EaterException.java} | 16 +--- .../plantuml/tim/EaterForeach.java | 2 +- .../plantuml/tim/EaterFunctionCall.java | 9 +-- src/net/sourceforge/plantuml/tim/EaterIf.java | 2 +- .../sourceforge/plantuml/tim/EaterIfdef.java | 2 +- .../sourceforge/plantuml/tim/EaterIfndef.java | 2 +- .../sourceforge/plantuml/tim/EaterImport.java | 2 +- .../plantuml/tim/EaterInclude.java | 2 +- .../plantuml/tim/EaterIncludeDef.java | 2 +- .../plantuml/tim/EaterIncludesub.java | 2 +- .../plantuml/tim/EaterLegacyDefine.java | 2 +- .../plantuml/tim/EaterLegacyDefineLong.java | 2 +- .../sourceforge/plantuml/tim/EaterLog.java | 2 +- .../sourceforge/plantuml/tim/EaterReturn.java | 2 +- .../plantuml/tim/EaterStartsub.java | 4 +- .../sourceforge/plantuml/tim/EaterTheme.java | 16 ++-- .../sourceforge/plantuml/tim/EaterUndef.java | 2 +- .../sourceforge/plantuml/tim/EaterWhile.java | 2 +- .../plantuml/tim/ExecutionContextWhile.java | 2 +- .../plantuml/tim/ExecutionContexts.java | 2 +- .../plantuml/tim/FunctionsSet.java | 20 ++--- .../sourceforge/plantuml/tim/StringEater.java | 2 +- .../sourceforge/plantuml/tim/TContext.java | 78 +++++++++---------- .../sourceforge/plantuml/tim/TFunction.java | 4 +- .../plantuml/tim/TFunctionImpl.java | 16 ++-- src/net/sourceforge/plantuml/tim/TMemory.java | 4 +- .../plantuml/tim/TMemoryGlobal.java | 4 +- .../plantuml/tim/TMemoryLocal.java | 2 +- .../sourceforge/plantuml/tim/TimLoader.java | 4 +- .../plantuml/tim/VariableManager.java | 8 +- .../plantuml/tim/expression/Knowledge.java | 4 +- .../expression/ReversePolishInterpretor.java | 17 ++-- .../plantuml/tim/expression/ShuntingYard.java | 6 +- .../plantuml/tim/expression/TokenStack.java | 20 ++--- .../plantuml/tim/expression/TokenType.java | 6 +- .../tim/iterator/AbstractCodeIterator.java | 6 +- .../plantuml/tim/iterator/CodeIterator.java | 8 +- .../tim/iterator/CodeIteratorAffectation.java | 10 +-- .../tim/iterator/CodeIteratorForeach.java | 10 +-- .../plantuml/tim/iterator/CodeIteratorIf.java | 22 +++--- .../tim/iterator/CodeIteratorImpl.java | 6 +- .../iterator/CodeIteratorInnerComment.java | 4 +- .../iterator/CodeIteratorLegacyDefine.java | 4 +- .../tim/iterator/CodeIteratorLongComment.java | 4 +- .../tim/iterator/CodeIteratorProcedure.java | 4 +- .../iterator/CodeIteratorReturnFunction.java | 8 +- .../iterator/CodeIteratorShortComment.java | 4 +- .../tim/iterator/CodeIteratorSub.java | 8 +- .../tim/iterator/CodeIteratorWhile.java | 8 +- .../plantuml/tim/stdlib/AlwaysFalse.java | 4 +- .../plantuml/tim/stdlib/AlwaysTrue.java | 4 +- .../plantuml/tim/stdlib/CallUserFunction.java | 6 +- .../sourceforge/plantuml/tim/stdlib/Chr.java | 4 +- .../plantuml/tim/stdlib/Darken.java | 6 +- .../plantuml/tim/stdlib/DateFunction.java | 6 +- .../plantuml/tim/stdlib/Dec2hex.java | 4 +- .../plantuml/tim/stdlib/Dirpath.java | 4 +- .../sourceforge/plantuml/tim/stdlib/Eval.java | 4 +- .../plantuml/tim/stdlib/Feature.java | 4 +- .../plantuml/tim/stdlib/FileExists.java | 4 +- .../plantuml/tim/stdlib/Filename.java | 4 +- .../plantuml/tim/stdlib/FunctionExists.java | 4 +- .../plantuml/tim/stdlib/GetAllStdlib.java | 6 +- .../plantuml/tim/stdlib/GetAllTheme.java | 4 +- .../plantuml/tim/stdlib/GetJsonKey.java | 8 +- .../plantuml/tim/stdlib/GetJsonType.java | 4 +- .../plantuml/tim/stdlib/GetVariableValue.java | 4 +- .../plantuml/tim/stdlib/GetVersion.java | 4 +- .../plantuml/tim/stdlib/Getenv.java | 4 +- .../plantuml/tim/stdlib/Hex2dec.java | 4 +- .../plantuml/tim/stdlib/HslColor.java | 4 +- .../plantuml/tim/stdlib/IntVal.java | 4 +- .../plantuml/tim/stdlib/InvokeProcedure.java | 6 +- .../plantuml/tim/stdlib/IsDark.java | 6 +- .../plantuml/tim/stdlib/IsLight.java | 6 +- .../plantuml/tim/stdlib/JsonKeyExists.java | 4 +- .../plantuml/tim/stdlib/Lighten.java | 6 +- .../plantuml/tim/stdlib/LoadJson.java | 12 ++- .../plantuml/tim/stdlib/LogicalAnd.java | 4 +- .../plantuml/tim/stdlib/LogicalNand.java | 4 +- .../plantuml/tim/stdlib/LogicalNor.java | 4 +- .../plantuml/tim/stdlib/LogicalNot.java | 4 +- .../plantuml/tim/stdlib/LogicalNxor.java | 4 +- .../plantuml/tim/stdlib/LogicalOr.java | 4 +- .../plantuml/tim/stdlib/LogicalXor.java | 4 +- .../sourceforge/plantuml/tim/stdlib/Now.java | 4 +- .../sourceforge/plantuml/tim/stdlib/Ord.java | 4 +- .../plantuml/tim/stdlib/RandomFunction.java | 6 +- .../tim/stdlib/RetrieveProcedure.java | 4 +- .../plantuml/tim/stdlib/ReverseColor.java | 6 +- .../tim/stdlib/ReverseHsluvColor.java | 6 +- .../plantuml/tim/stdlib/SetVariableValue.java | 4 +- .../tim/stdlib/SimpleReturnFunction.java | 4 +- .../sourceforge/plantuml/tim/stdlib/Size.java | 4 +- .../plantuml/tim/stdlib/SplitStr.java | 4 +- .../plantuml/tim/stdlib/Strlen.java | 4 +- .../plantuml/tim/stdlib/Strpos.java | 4 +- .../plantuml/tim/stdlib/Substr.java | 4 +- .../plantuml/tim/stdlib/VariableExists.java | 4 +- .../sourceforge/plantuml/version/Version.java | 2 +- .../plantuml/tim/TimTestUtils.java | 8 +- .../plantuml/tim/stdlib/AlwaysFalseTest.java | 8 +- .../plantuml/tim/stdlib/AlwaysTrueTest.java | 8 +- .../plantuml/tim/stdlib/ChrTest.java | 5 +- .../plantuml/tim/stdlib/Dec2hexTest.java | 8 +- .../plantuml/tim/stdlib/FeatureTest.java | 10 +-- .../plantuml/tim/stdlib/GetAllStdlibTest.java | 6 +- .../plantuml/tim/stdlib/GetAllThemeTest.java | 4 +- .../plantuml/tim/stdlib/GetJsonKeyTest.java | 10 +-- .../plantuml/tim/stdlib/GetJsonTypeTest.java | 10 +-- .../plantuml/tim/stdlib/GetenvTest.java | 8 +- .../plantuml/tim/stdlib/Hex2decTest.java | 8 +- .../plantuml/tim/stdlib/LowerTest.java | 10 +-- .../plantuml/tim/stdlib/OrdTest.java | 5 +- .../tim/stdlib/RandomFuntionTest.java | 10 +-- .../plantuml/tim/stdlib/SizeTest.java | 10 +-- .../plantuml/tim/stdlib/UpperTest.java | 10 +-- 129 files changed, 412 insertions(+), 432 deletions(-) rename src/net/sourceforge/plantuml/tim/{EaterExceptionLocated.java => EaterException.java} (75%) diff --git a/gradle.properties b/gradle.properties index 159ed6443..ddbe9ba1d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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.2024.4beta4 +version = 1.2024.4beta5 org.gradle.workers.max = 3 \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/preproc/Defines.java b/src/net/sourceforge/plantuml/preproc/Defines.java index eb2a1550f..14ec49a0e 100644 --- a/src/net/sourceforge/plantuml/preproc/Defines.java +++ b/src/net/sourceforge/plantuml/preproc/Defines.java @@ -56,7 +56,7 @@ import net.sourceforge.plantuml.security.SFile; import net.sourceforge.plantuml.security.SecurityProfile; import net.sourceforge.plantuml.security.SecurityUtils; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TMemory; import net.sourceforge.plantuml.tim.TVariableScope; import net.sourceforge.plantuml.utils.Log; @@ -82,7 +82,7 @@ public class Defines implements Truth { return new Defines(); } - public void copyTo(TMemory memory, StringLocated location) throws EaterExceptionLocated { + public void copyTo(TMemory memory, StringLocated location) throws EaterException { for (Entry ent : values.entrySet()) { final String name = ent.getKey(); final Define def = ent.getValue(); diff --git a/src/net/sourceforge/plantuml/preproc/Sub.java b/src/net/sourceforge/plantuml/preproc/Sub.java index e14e5e746..b39e8d4d0 100644 --- a/src/net/sourceforge/plantuml/preproc/Sub.java +++ b/src/net/sourceforge/plantuml/preproc/Sub.java @@ -42,7 +42,7 @@ import java.util.List; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.text.TLineType; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterStartsub; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TMemory; @@ -79,7 +79,7 @@ public class Sub { } public static Sub fromFile(ReadLine reader, String blocname, TContext context, TMemory memory) - throws IOException, EaterExceptionLocated { + throws IOException, EaterException { Sub result = null; StringLocated s = null; boolean skip = false; diff --git a/src/net/sourceforge/plantuml/preproc2/PreprocessorUtils.java b/src/net/sourceforge/plantuml/preproc2/PreprocessorUtils.java index 4fc609f49..8132faab8 100644 --- a/src/net/sourceforge/plantuml/preproc2/PreprocessorUtils.java +++ b/src/net/sourceforge/plantuml/preproc2/PreprocessorUtils.java @@ -53,7 +53,7 @@ import net.sourceforge.plantuml.preproc.StartDiagramExtractReader; import net.sourceforge.plantuml.preproc.Stdlib; import net.sourceforge.plantuml.security.SURL; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.utils.Log; public class PreprocessorUtils { @@ -133,7 +133,7 @@ public class PreprocessorUtils { } public static ReadLine getReaderIncludeUrl(final SURL url, StringLocated s, String suf, Charset charset) - throws EaterExceptionLocated { + throws EaterException { try { if (StartDiagramExtractReader.containsStartDiagram(url, s, charset)) return StartDiagramExtractReader.build(url, s, suf, charset); @@ -141,16 +141,16 @@ public class PreprocessorUtils { return getReaderInclude(url, s, charset); } catch (IOException e) { Logme.error(e); - throw EaterExceptionLocated.located("Cannot open URL " + e.getMessage(), s); + throw new EaterException("Cannot open URL " + e.getMessage(), s); } } public static ReadLine getReaderInclude(SURL url, StringLocated s, Charset charset) - throws EaterExceptionLocated, UnsupportedEncodingException { + throws EaterException, UnsupportedEncodingException { final InputStream is = url.openStream(); if (is == null) - throw EaterExceptionLocated.located("Cannot open URL", s); + throw new EaterException("Cannot open URL", s); return ReadLineReader.create(new InputStreamReader(is, charset), url.toString(), s.getLocation()); } diff --git a/src/net/sourceforge/plantuml/tim/Eater.java b/src/net/sourceforge/plantuml/tim/Eater.java index 20d123720..2f5287555 100644 --- a/src/net/sourceforge/plantuml/tim/Eater.java +++ b/src/net/sourceforge/plantuml/tim/Eater.java @@ -64,19 +64,19 @@ public abstract class Eater { return stringLocated; } - public abstract void analyze(TContext context, TMemory memory) throws EaterExceptionLocated; + public abstract void analyze(TContext context, TMemory memory) throws EaterException; public int getCurrentPosition() { return i; } - final protected String eatAllToEnd() throws EaterExceptionLocated { + final protected String eatAllToEnd() throws EaterException { final String result = stringLocated.getString().substring(i); i = stringLocated.length(); return result; } - final public TValue eatExpression(TContext context, TMemory memory) throws EaterExceptionLocated { + final public TValue eatExpression(TContext context, TMemory memory) throws EaterException { final char ch = peekChar(); if (ch == '{' || ch == '[') { final String data = eatAllToEnd(); @@ -89,22 +89,22 @@ public abstract class Eater { return tokenStack.getResult(getStringLocated(), context, memory); } - final protected TokenStack eatTokenStack() throws EaterExceptionLocated { + final protected TokenStack eatTokenStack() throws EaterException { final TokenStack tokenStack = new TokenStack(); addIntoTokenStack(tokenStack, false); if (tokenStack.size() == 0) - throw EaterExceptionLocated.located("Missing expression", stringLocated); + throw new EaterException("Missing expression", stringLocated); return tokenStack; } - final protected TValue eatExpressionStopAtColon(TContext context, TMemory memory) throws EaterExceptionLocated { + final protected TValue eatExpressionStopAtColon(TContext context, TMemory memory) throws EaterException { final TokenStack tokenStack = new TokenStack(); addIntoTokenStack(tokenStack, true); return tokenStack.getResult(getStringLocated(), context, memory); } - final protected void addIntoTokenStack(TokenStack tokenStack, boolean stopAtColon) throws EaterExceptionLocated { + final protected void addIntoTokenStack(TokenStack tokenStack, boolean stopAtColon) throws EaterException { Token lastToken = null; while (true) { final Token token = TokenType.eatOneToken(lastToken, this, stopAtColon); @@ -117,10 +117,10 @@ public abstract class Eater { } } - final public String eatAndGetQuotedString() throws EaterExceptionLocated { + final public String eatAndGetQuotedString() throws EaterException { final char separator = peekChar(); if (TLineType.isQuote(separator) == false) - throw EaterExceptionLocated.located("quote10", stringLocated); + throw new EaterException("quote10", stringLocated); checkAndEatChar(separator); final StringBuilder value = new StringBuilder(); @@ -129,7 +129,7 @@ public abstract class Eater { return value.toString(); } - final protected String eatAndGetOptionalQuotedString() throws EaterExceptionLocated { + final protected String eatAndGetOptionalQuotedString() throws EaterException { final char quote = peekChar(); if (TLineType.isQuote(quote)) return eatAndGetQuotedString(); @@ -141,7 +141,7 @@ public abstract class Eater { while (true) { char ch = peekChar(); if (ch == 0) - throw EaterExceptionLocated.located("until001", stringLocated); + throw new EaterException("until001", stringLocated); if (level == 0 && (ch == ',' || ch == ')')) return value.toString().trim(); @@ -159,7 +159,7 @@ public abstract class Eater { // return value.toString(); } - final public String eatAndGetNumber() throws EaterExceptionLocated { + final public String eatAndGetNumber() throws EaterException { final StringBuilder result = new StringBuilder(); while (true) { final char ch = peekChar(); @@ -175,7 +175,7 @@ public abstract class Eater { } } - final public String eatAndGetSpaces() throws EaterExceptionLocated { + final public String eatAndGetSpaces() throws EaterException { final StringBuilder result = new StringBuilder(); while (true) { final char ch = peekChar(); @@ -186,19 +186,19 @@ public abstract class Eater { } } - final protected String eatAndGetVarname() throws EaterExceptionLocated { + final protected String eatAndGetVarname() throws EaterException { final StringBuilder varname = new StringBuilder("" + eatOneChar()); if (TLineType.isLetterOrUnderscoreOrDollar(varname.charAt(0)) == false) - throw EaterExceptionLocated.located("a002", stringLocated); + throw new EaterException("a002", stringLocated); addUpToLastLetterOrUnderscoreOrDigit(varname); return varname.toString(); } - final protected String eatAndGetFunctionName() throws EaterExceptionLocated { + final protected String eatAndGetFunctionName() throws EaterException { final StringBuilder varname = new StringBuilder("" + eatOneChar()); if (TLineType.isLetterOrUnderscoreOrDollar(varname.charAt(0)) == false) - throw EaterExceptionLocated.located("a003", stringLocated); + throw new EaterException("a003", stringLocated); addUpToLastLetterOrUnderscoreOrDigit(varname); return varname.toString(); @@ -246,14 +246,14 @@ public abstract class Eater { return ch; } - final protected void checkAndEatChar(char ch) throws EaterExceptionLocated { + final protected void checkAndEatChar(char ch) throws EaterException { if (i >= stringLocated.length() || stringLocated.charAt(i) != ch) - throw EaterExceptionLocated.located("a001", stringLocated); + throw new EaterException("a001", stringLocated); i++; } - final protected boolean safeCheckAndEatChar(char ch) throws EaterExceptionLocated { + final protected boolean safeCheckAndEatChar(char ch) throws EaterException { if (i >= stringLocated.length() || stringLocated.charAt(i) != ch) return false; @@ -261,7 +261,7 @@ public abstract class Eater { return true; } - final protected void optionallyEatChar(char ch) throws EaterExceptionLocated { + final protected void optionallyEatChar(char ch) throws EaterException { if (i >= stringLocated.length() || stringLocated.charAt(i) != ch) return; @@ -269,7 +269,7 @@ public abstract class Eater { i++; } - final protected void checkAndEatChar(String s) throws EaterExceptionLocated { + final protected void checkAndEatChar(String s) throws EaterException { for (int j = 0; j < s.length(); j++) checkAndEatChar(s.charAt(j)); @@ -298,7 +298,7 @@ public abstract class Eater { } final protected TFunctionImpl eatDeclareFunction(TContext context, TMemory memory, boolean unquoted, - StringLocated location, boolean allowNoParenthesis, TFunctionType type) throws EaterExceptionLocated { + StringLocated location, boolean allowNoParenthesis, TFunctionType type) throws EaterException { final List args = new ArrayList<>(); final String functionName = eatAndGetFunctionName(); skipSpaces(); @@ -306,7 +306,7 @@ public abstract class Eater { if (allowNoParenthesis) return new TFunctionImpl(functionName, args, unquoted, type); - throw EaterExceptionLocated.located("Missing opening parenthesis", stringLocated); + throw new EaterException("Missing opening parenthesis", stringLocated); } while (true) { skipSpaces(); @@ -331,7 +331,7 @@ public abstract class Eater { checkAndEatChar(")"); break; } else { - throw EaterExceptionLocated.located("Error in function definition", stringLocated); + throw new EaterException("Error in function definition", stringLocated); } } skipSpaces(); @@ -339,7 +339,7 @@ public abstract class Eater { } final protected TFunctionImpl eatDeclareReturnFunctionWithOptionalReturn(TContext context, TMemory memory, - boolean unquoted, StringLocated location) throws EaterExceptionLocated { + boolean unquoted, StringLocated location) throws EaterException { final TFunctionImpl result = eatDeclareFunction(context, memory, unquoted, location, false, TFunctionType.RETURN_FUNCTION); if (peekChar() == 'r') { @@ -357,7 +357,7 @@ public abstract class Eater { } final protected TFunctionImpl eatDeclareProcedure(TContext context, TMemory memory, boolean unquoted, - StringLocated location) throws EaterExceptionLocated { + StringLocated location) throws EaterException { final TFunctionImpl result = eatDeclareFunction(context, memory, unquoted, location, false, TFunctionType.PROCEDURE); return result; diff --git a/src/net/sourceforge/plantuml/tim/EaterAffectation.java b/src/net/sourceforge/plantuml/tim/EaterAffectation.java index efe99b76f..cad5ded5e 100644 --- a/src/net/sourceforge/plantuml/tim/EaterAffectation.java +++ b/src/net/sourceforge/plantuml/tim/EaterAffectation.java @@ -44,7 +44,7 @@ public class EaterAffectation extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { skipSpaces(); checkAndEatChar("!"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterAffectationDefine.java b/src/net/sourceforge/plantuml/tim/EaterAffectationDefine.java index 863f3d91f..3db77f96c 100644 --- a/src/net/sourceforge/plantuml/tim/EaterAffectationDefine.java +++ b/src/net/sourceforge/plantuml/tim/EaterAffectationDefine.java @@ -44,7 +44,7 @@ public class EaterAffectationDefine extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { skipSpaces(); checkAndEatChar("!define"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterAssert.java b/src/net/sourceforge/plantuml/tim/EaterAssert.java index 3c34cacb1..00603e675 100644 --- a/src/net/sourceforge/plantuml/tim/EaterAssert.java +++ b/src/net/sourceforge/plantuml/tim/EaterAssert.java @@ -44,7 +44,7 @@ public class EaterAssert extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { skipSpaces(); checkAndEatChar("!assert"); skipSpaces(); @@ -55,9 +55,9 @@ public class EaterAssert extends Eater { if (ch == ':') { checkAndEatChar(':'); final TValue message = eatExpression(context, memory); - throw EaterExceptionLocated.located("Assertion error : " + message.toString(), getStringLocated()); + throw new EaterException("Assertion error : " + message.toString(), getStringLocated()); } - throw EaterExceptionLocated.located("Assertion error", getStringLocated()); + throw new EaterException("Assertion error", getStringLocated()); } } diff --git a/src/net/sourceforge/plantuml/tim/EaterDeclareProcedure.java b/src/net/sourceforge/plantuml/tim/EaterDeclareProcedure.java index d0cdbdd16..b26b2b425 100644 --- a/src/net/sourceforge/plantuml/tim/EaterDeclareProcedure.java +++ b/src/net/sourceforge/plantuml/tim/EaterDeclareProcedure.java @@ -48,7 +48,7 @@ public class EaterDeclareProcedure extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { skipSpaces(); checkAndEatChar("!"); boolean unquoted = false; diff --git a/src/net/sourceforge/plantuml/tim/EaterDeclareReturnFunction.java b/src/net/sourceforge/plantuml/tim/EaterDeclareReturnFunction.java index 84bf4c5c2..139130ed6 100644 --- a/src/net/sourceforge/plantuml/tim/EaterDeclareReturnFunction.java +++ b/src/net/sourceforge/plantuml/tim/EaterDeclareReturnFunction.java @@ -48,7 +48,7 @@ public class EaterDeclareReturnFunction extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { skipSpaces(); checkAndEatChar("!"); boolean unquoted = false; diff --git a/src/net/sourceforge/plantuml/tim/EaterDumpMemory.java b/src/net/sourceforge/plantuml/tim/EaterDumpMemory.java index fcf4eac86..33315178b 100644 --- a/src/net/sourceforge/plantuml/tim/EaterDumpMemory.java +++ b/src/net/sourceforge/plantuml/tim/EaterDumpMemory.java @@ -43,7 +43,7 @@ public class EaterDumpMemory extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { skipSpaces(); checkAndEatChar("!dump_memory"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterElseIf.java b/src/net/sourceforge/plantuml/tim/EaterElseIf.java index e83bbbf5a..85f8a1ae8 100644 --- a/src/net/sourceforge/plantuml/tim/EaterElseIf.java +++ b/src/net/sourceforge/plantuml/tim/EaterElseIf.java @@ -46,7 +46,7 @@ public class EaterElseIf extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { skipSpaces(); checkAndEatChar("!elseif"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterExceptionLocated.java b/src/net/sourceforge/plantuml/tim/EaterException.java similarity index 75% rename from src/net/sourceforge/plantuml/tim/EaterExceptionLocated.java rename to src/net/sourceforge/plantuml/tim/EaterException.java index 4aeb0a0da..4de83e32b 100644 --- a/src/net/sourceforge/plantuml/tim/EaterExceptionLocated.java +++ b/src/net/sourceforge/plantuml/tim/EaterException.java @@ -38,22 +38,14 @@ import java.util.Objects; import net.sourceforge.plantuml.text.StringLocated; -public class EaterExceptionLocated extends Exception { +public class EaterException extends Exception { private final String message; private final StringLocated location; - private EaterExceptionLocated(String message, StringLocated location) { - this.message = message; - this.location = location; - } - - public static EaterExceptionLocated located(String message, StringLocated location) { - return new EaterExceptionLocated(message, Objects.requireNonNull(location)); - } - - public static EaterExceptionLocated unlocated(String message, StringLocated location) { - return new EaterExceptionLocated(message, Objects.requireNonNull(location)); + public EaterException(String message, StringLocated location) { + this.message = Objects.requireNonNull(message); + this.location = Objects.requireNonNull(location); } public final String getMessage() { diff --git a/src/net/sourceforge/plantuml/tim/EaterForeach.java b/src/net/sourceforge/plantuml/tim/EaterForeach.java index c631ed8f7..37be05afc 100644 --- a/src/net/sourceforge/plantuml/tim/EaterForeach.java +++ b/src/net/sourceforge/plantuml/tim/EaterForeach.java @@ -48,7 +48,7 @@ public class EaterForeach extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { skipSpaces(); checkAndEatChar("!foreach"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterFunctionCall.java b/src/net/sourceforge/plantuml/tim/EaterFunctionCall.java index 767671aed..b5cc4204b 100644 --- a/src/net/sourceforge/plantuml/tim/EaterFunctionCall.java +++ b/src/net/sourceforge/plantuml/tim/EaterFunctionCall.java @@ -58,7 +58,7 @@ public class EaterFunctionCall extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { skipUntilChar('('); checkAndEatChar('('); skipSpaces(); @@ -119,10 +119,9 @@ public class EaterFunctionCall extends Eater { break; } if (unquoted) { - throw EaterExceptionLocated.located("unquoted function/procedure cannot use expression.", - getStringLocated()); + throw new EaterException("unquoted function/procedure cannot use expression.", getStringLocated()); } - throw EaterExceptionLocated.located("call001", getStringLocated()); + throw new EaterException("call001", getStringLocated()); } } @@ -134,7 +133,7 @@ public class EaterFunctionCall extends Eater { return Collections.unmodifiableMap(namedArguments); } - public final String getEndOfLine() throws EaterExceptionLocated { + public final String getEndOfLine() throws EaterException { return this.eatAllToEnd(); } diff --git a/src/net/sourceforge/plantuml/tim/EaterIf.java b/src/net/sourceforge/plantuml/tim/EaterIf.java index ed544cba9..f44772c48 100644 --- a/src/net/sourceforge/plantuml/tim/EaterIf.java +++ b/src/net/sourceforge/plantuml/tim/EaterIf.java @@ -46,7 +46,7 @@ public class EaterIf extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { skipSpaces(); checkAndEatChar("!if"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterIfdef.java b/src/net/sourceforge/plantuml/tim/EaterIfdef.java index 7173965df..b197abc20 100644 --- a/src/net/sourceforge/plantuml/tim/EaterIfdef.java +++ b/src/net/sourceforge/plantuml/tim/EaterIfdef.java @@ -48,7 +48,7 @@ public class EaterIfdef extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { skipSpaces(); checkAndEatChar("!ifdef"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterIfndef.java b/src/net/sourceforge/plantuml/tim/EaterIfndef.java index a79da59a6..ae9d7478f 100644 --- a/src/net/sourceforge/plantuml/tim/EaterIfndef.java +++ b/src/net/sourceforge/plantuml/tim/EaterIfndef.java @@ -46,7 +46,7 @@ public class EaterIfndef extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { skipSpaces(); checkAndEatChar("!ifndef"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterImport.java b/src/net/sourceforge/plantuml/tim/EaterImport.java index c292af610..3f1296de6 100644 --- a/src/net/sourceforge/plantuml/tim/EaterImport.java +++ b/src/net/sourceforge/plantuml/tim/EaterImport.java @@ -45,7 +45,7 @@ public class EaterImport extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { skipSpaces(); checkAndEatChar("!import"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterInclude.java b/src/net/sourceforge/plantuml/tim/EaterInclude.java index fac2806ff..cf6eb3975 100644 --- a/src/net/sourceforge/plantuml/tim/EaterInclude.java +++ b/src/net/sourceforge/plantuml/tim/EaterInclude.java @@ -47,7 +47,7 @@ public class EaterInclude extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { skipSpaces(); checkAndEatChar("!include"); final char peekChar = peekChar(); diff --git a/src/net/sourceforge/plantuml/tim/EaterIncludeDef.java b/src/net/sourceforge/plantuml/tim/EaterIncludeDef.java index b275c1169..6e3ce76c5 100644 --- a/src/net/sourceforge/plantuml/tim/EaterIncludeDef.java +++ b/src/net/sourceforge/plantuml/tim/EaterIncludeDef.java @@ -45,7 +45,7 @@ public class EaterIncludeDef extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { skipSpaces(); checkAndEatChar("!includedef"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterIncludesub.java b/src/net/sourceforge/plantuml/tim/EaterIncludesub.java index 53778e2e1..5cdb7f5c6 100644 --- a/src/net/sourceforge/plantuml/tim/EaterIncludesub.java +++ b/src/net/sourceforge/plantuml/tim/EaterIncludesub.java @@ -45,7 +45,7 @@ public class EaterIncludesub extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { skipSpaces(); checkAndEatChar("!includesub"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterLegacyDefine.java b/src/net/sourceforge/plantuml/tim/EaterLegacyDefine.java index bb0257003..6035a7ed6 100644 --- a/src/net/sourceforge/plantuml/tim/EaterLegacyDefine.java +++ b/src/net/sourceforge/plantuml/tim/EaterLegacyDefine.java @@ -45,7 +45,7 @@ public class EaterLegacyDefine extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { skipSpaces(); checkAndEatChar("!define"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterLegacyDefineLong.java b/src/net/sourceforge/plantuml/tim/EaterLegacyDefineLong.java index 3b93fbfd1..3fccd619c 100644 --- a/src/net/sourceforge/plantuml/tim/EaterLegacyDefineLong.java +++ b/src/net/sourceforge/plantuml/tim/EaterLegacyDefineLong.java @@ -45,7 +45,7 @@ public class EaterLegacyDefineLong extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { skipSpaces(); checkAndEatChar("!definelong"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterLog.java b/src/net/sourceforge/plantuml/tim/EaterLog.java index 53f938091..3e31b00f7 100644 --- a/src/net/sourceforge/plantuml/tim/EaterLog.java +++ b/src/net/sourceforge/plantuml/tim/EaterLog.java @@ -44,7 +44,7 @@ public class EaterLog extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { skipSpaces(); checkAndEatChar("!log"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterReturn.java b/src/net/sourceforge/plantuml/tim/EaterReturn.java index 58ade8267..327940207 100644 --- a/src/net/sourceforge/plantuml/tim/EaterReturn.java +++ b/src/net/sourceforge/plantuml/tim/EaterReturn.java @@ -46,7 +46,7 @@ public class EaterReturn extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { skipSpaces(); checkAndEatChar("!return"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterStartsub.java b/src/net/sourceforge/plantuml/tim/EaterStartsub.java index ca67a6574..5cd8207b2 100644 --- a/src/net/sourceforge/plantuml/tim/EaterStartsub.java +++ b/src/net/sourceforge/plantuml/tim/EaterStartsub.java @@ -45,13 +45,13 @@ public class EaterStartsub extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { skipSpaces(); checkAndEatChar("!startsub"); skipSpaces(); this.subname = eatAllToEnd(); if (this.subname.matches("\\w+") == false) - throw EaterExceptionLocated.located("Bad sub name", getStringLocated()); + throw new EaterException("Bad sub name", getStringLocated()); } diff --git a/src/net/sourceforge/plantuml/tim/EaterTheme.java b/src/net/sourceforge/plantuml/tim/EaterTheme.java index 891b101a0..7203c5521 100644 --- a/src/net/sourceforge/plantuml/tim/EaterTheme.java +++ b/src/net/sourceforge/plantuml/tim/EaterTheme.java @@ -67,7 +67,7 @@ public class EaterTheme extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { skipSpaces(); checkAndEatChar("!theme"); skipSpaces(); @@ -85,7 +85,7 @@ public class EaterTheme extends Eater { } - public final ReadLine getTheme() throws EaterExceptionLocated { + public final ReadLine getTheme() throws EaterException { if (from == null) { try { final ReadLine reader = ThemeUtils.getReaderTheme(realName); @@ -101,24 +101,24 @@ public class EaterTheme extends Eater { } catch (IOException e) { Logme.error(e); } - throw EaterExceptionLocated.located("Cannot load " + realName, getStringLocated()); + throw new EaterException("Cannot load " + realName, getStringLocated()); } if (from.startsWith("<") && from.endsWith(">")) { final ReadLine reader = ThemeUtils.getReaderTheme(realName, from); if (reader == null) - throw EaterExceptionLocated.located("No such theme " + realName + " in " + from, getStringLocated()); + throw new EaterException("No such theme " + realName + " in " + from, getStringLocated()); return reader; } else if (from.startsWith("http://") || from.startsWith("https://")) { final SURL url = SURL.create(ThemeUtils.getFullPath(from, realName)); if (url == null) - throw EaterExceptionLocated.located("Cannot open URL", getStringLocated()); + throw new EaterException("Cannot open URL", getStringLocated()); try { return PreprocessorUtils.getReaderInclude(url, getStringLocated(), UTF_8); } catch (UnsupportedEncodingException e) { Logme.error(e); - throw EaterExceptionLocated.located("Cannot decode charset", getStringLocated()); + throw new EaterException("Cannot decode charset", getStringLocated()); } } @@ -126,12 +126,12 @@ public class EaterTheme extends Eater { final FileWithSuffix file = context.getFileWithSuffix(from, realName); final Reader tmp = file.getReader(UTF_8); if (tmp == null) - throw EaterExceptionLocated.located("No such theme " + realName, getStringLocated()); + throw new EaterException("No such theme " + realName, getStringLocated()); return ReadLineReader.create(tmp, "theme " + realName); } catch (IOException e) { Logme.error(e); - throw EaterExceptionLocated.located("Cannot load " + realName, getStringLocated()); + throw new EaterException("Cannot load " + realName, getStringLocated()); } } diff --git a/src/net/sourceforge/plantuml/tim/EaterUndef.java b/src/net/sourceforge/plantuml/tim/EaterUndef.java index 525644758..01e48c910 100644 --- a/src/net/sourceforge/plantuml/tim/EaterUndef.java +++ b/src/net/sourceforge/plantuml/tim/EaterUndef.java @@ -43,7 +43,7 @@ public class EaterUndef extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { skipSpaces(); checkAndEatChar("!undef"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/EaterWhile.java b/src/net/sourceforge/plantuml/tim/EaterWhile.java index 4b3844b87..8538d6978 100644 --- a/src/net/sourceforge/plantuml/tim/EaterWhile.java +++ b/src/net/sourceforge/plantuml/tim/EaterWhile.java @@ -46,7 +46,7 @@ public class EaterWhile extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { skipSpaces(); checkAndEatChar("!while"); skipSpaces(); diff --git a/src/net/sourceforge/plantuml/tim/ExecutionContextWhile.java b/src/net/sourceforge/plantuml/tim/ExecutionContextWhile.java index c1c6b6898..9e406e185 100644 --- a/src/net/sourceforge/plantuml/tim/ExecutionContextWhile.java +++ b/src/net/sourceforge/plantuml/tim/ExecutionContextWhile.java @@ -61,7 +61,7 @@ public class ExecutionContextWhile { } public TValue conditionValue(StringLocated location, TContext context, TMemory memory) - throws EaterExceptionLocated { + throws EaterException { return whileExpression.getResult(location, context, memory); } diff --git a/src/net/sourceforge/plantuml/tim/ExecutionContexts.java b/src/net/sourceforge/plantuml/tim/ExecutionContexts.java index 33ab5821b..f42116e1a 100644 --- a/src/net/sourceforge/plantuml/tim/ExecutionContexts.java +++ b/src/net/sourceforge/plantuml/tim/ExecutionContexts.java @@ -79,7 +79,7 @@ public abstract class ExecutionContexts { return allForeachs.pollLast(); } - public boolean areAllIfOk(TContext context, TMemory memory) throws EaterExceptionLocated { + public boolean areAllIfOk(TContext context, TMemory memory) throws EaterException { for (ExecutionContextIf conditionalContext : allIfs) if (conditionalContext.conditionIsOkHere() == false) return false; diff --git a/src/net/sourceforge/plantuml/tim/FunctionsSet.java b/src/net/sourceforge/plantuml/tim/FunctionsSet.java index b5702c62d..683d0d7fa 100644 --- a/src/net/sourceforge/plantuml/tim/FunctionsSet.java +++ b/src/net/sourceforge/plantuml/tim/FunctionsSet.java @@ -95,9 +95,9 @@ public class FunctionsSet { } public void executeLegacyDefine(TContext context, TMemory memory, StringLocated s) - throws EaterExceptionLocated { + throws EaterException { if (this.pendingFunction != null) - throw EaterExceptionLocated.located("already0048", s); + throw new EaterException("already0048", s); final EaterLegacyDefine legacyDefine = new EaterLegacyDefine(s); legacyDefine.analyze(context, memory); @@ -107,9 +107,9 @@ public class FunctionsSet { } public void executeLegacyDefineLong(TContext context, TMemory memory, StringLocated s) - throws EaterExceptionLocated { + throws EaterException { if (this.pendingFunction != null) - throw EaterExceptionLocated.located("already0068", s); + throw new EaterException("already0068", s); final EaterLegacyDefineLong legacyDefineLong = new EaterLegacyDefineLong(s); legacyDefineLong.analyze(context, memory); @@ -117,9 +117,9 @@ public class FunctionsSet { } public void executeDeclareReturnFunction(TContext context, TMemory memory, StringLocated s) - throws EaterExceptionLocated { + throws EaterException { if (this.pendingFunction != null) - throw EaterExceptionLocated.located("already0068", s); + throw new EaterException("already0068", s); final EaterDeclareReturnFunction declareFunction = new EaterDeclareReturnFunction(s); declareFunction.analyze(context, memory); @@ -127,7 +127,7 @@ public class FunctionsSet { final TFunctionSignature declaredSignature = declareFunction.getFunction().getSignature(); final TFunction previous = this.functions.get(declaredSignature); if (previous != null && (finalFlag || this.functionsFinal.contains(declaredSignature))) - throw EaterExceptionLocated.located("This function is already defined", s); + throw new EaterException("This function is already defined", s); if (finalFlag) this.functionsFinal.add(declaredSignature); @@ -140,9 +140,9 @@ public class FunctionsSet { } public void executeDeclareProcedure(TContext context, TMemory memory, StringLocated s) - throws EaterExceptionLocated { + throws EaterException { if (this.pendingFunction != null) - throw EaterExceptionLocated.located("already0068", s); + throw new EaterException("already0068", s); final EaterDeclareProcedure declareFunction = new EaterDeclareProcedure(s); declareFunction.analyze(context, memory); @@ -150,7 +150,7 @@ public class FunctionsSet { final TFunctionSignature declaredSignature = declareFunction.getFunction().getSignature(); final TFunction previous = this.functions.get(declaredSignature); if (previous != null && (finalFlag || this.functionsFinal.contains(declaredSignature))) - throw EaterExceptionLocated.located("This function is already defined", s); + throw new EaterException("This function is already defined", s); if (finalFlag) this.functionsFinal.add(declaredSignature); diff --git a/src/net/sourceforge/plantuml/tim/StringEater.java b/src/net/sourceforge/plantuml/tim/StringEater.java index e8b2825e2..818a7856d 100644 --- a/src/net/sourceforge/plantuml/tim/StringEater.java +++ b/src/net/sourceforge/plantuml/tim/StringEater.java @@ -43,7 +43,7 @@ public class StringEater extends Eater { } @Override - public void analyze(TContext context, TMemory memory) throws EaterExceptionLocated { + public void analyze(TContext context, TMemory memory) throws EaterException { throw new UnsupportedOperationException(); } diff --git a/src/net/sourceforge/plantuml/tim/TContext.java b/src/net/sourceforge/plantuml/tim/TContext.java index 86a3bb0b1..79188e5ca 100644 --- a/src/net/sourceforge/plantuml/tim/TContext.java +++ b/src/net/sourceforge/plantuml/tim/TContext.java @@ -236,7 +236,7 @@ public class TContext { public Knowledge asKnowledge(final TMemory memory, final LineLocation location) { return new Knowledge() { - public TValue getVariable(String name) throws EaterExceptionLocated { + public TValue getVariable(String name) throws EaterException { if (name.contains(".") || name.contains("[")) { final TValue result = fromJson(memory, name, location); return result; @@ -250,7 +250,7 @@ public class TContext { }; } - private TValue fromJson(TMemory memory, String name, LineLocation location) throws EaterExceptionLocated { + private TValue fromJson(TMemory memory, String name, LineLocation location) throws EaterException { final String result = applyFunctionsAndVariables(memory, new StringLocated(name, location)); try { final JsonValue json = Json.parse(result); @@ -279,7 +279,7 @@ public class TContext { } public TValue executeLines(TMemory memory, List body, TFunctionType ftype, boolean modeSpecial) - throws EaterExceptionLocated { + throws EaterException { final CodeIterator it = buildCodeIterator(memory, body); StringLocated s = null; @@ -295,7 +295,7 @@ public class TContext { } private void executeLinesInternal(TMemory memory, List body, TFunctionType ftype) - throws EaterExceptionLocated { + throws EaterException { final CodeIterator it = buildCodeIterator(memory, body); StringLocated s = null; @@ -307,20 +307,20 @@ public class TContext { } private TValue executeOneLineSafe(TMemory memory, StringLocated s, TFunctionType ftype, boolean modeSpecial) - throws EaterExceptionLocated { + throws EaterException { try { this.debug.add(s); return executeOneLineNotSafe(memory, s, ftype, modeSpecial); } catch (Exception e) { - if (e instanceof EaterExceptionLocated) - throw (EaterExceptionLocated) e; + if (e instanceof EaterException) + throw (EaterException) e; Logme.error(e); - throw EaterExceptionLocated.located("Fatal parsing error", s); + throw new EaterException("Fatal parsing error", s); } } private TValue executeOneLineNotSafe(TMemory memory, StringLocated s, TFunctionType ftype, boolean modeSpecial) - throws EaterExceptionLocated { + throws EaterException { final TLineType type = s.getType(); if (type == TLineType.INCLUDESUB) { @@ -375,11 +375,11 @@ public class TContext { } else if (s.getString().matches("^\\s+$")) { return null; } else { - throw EaterExceptionLocated.located("Compile Error " + ftype + " " + type, s); + throw new EaterException("Compile Error " + ftype + " " + type, s); } } - private void addPlain(TMemory memory, StringLocated s) throws EaterExceptionLocated { + private void addPlain(TMemory memory, StringLocated s) throws EaterException { final StringLocated tmp[] = applyFunctionsAndVariablesInternal(memory, s); if (tmp != null) { if (pendingAdd != null) { @@ -392,31 +392,31 @@ public class TContext { } } - private void simulatePlain(TMemory memory, StringLocated s) throws EaterExceptionLocated { + private void simulatePlain(TMemory memory, StringLocated s) throws EaterException { final StringLocated ignored[] = applyFunctionsAndVariablesInternal(memory, s); } - private void executeAffectationDefine(TMemory memory, StringLocated s) throws EaterExceptionLocated { + private void executeAffectationDefine(TMemory memory, StringLocated s) throws EaterException { new EaterAffectationDefine(s).analyze(this, memory); } - private void executeDumpMemory(TMemory memory, StringLocated s) throws EaterExceptionLocated { + private void executeDumpMemory(TMemory memory, StringLocated s) throws EaterException { final EaterDumpMemory condition = new EaterDumpMemory(s); condition.analyze(this, memory); } - private void executeAssert(TMemory memory, StringLocated s) throws EaterExceptionLocated { + private void executeAssert(TMemory memory, StringLocated s) throws EaterException { final EaterAssert condition = new EaterAssert(s); condition.analyze(this, memory); } - private void executeUndef(TMemory memory, StringLocated s) throws EaterExceptionLocated { + private void executeUndef(TMemory memory, StringLocated s) throws EaterException { final EaterUndef undef = new EaterUndef(s); undef.analyze(this, memory); } private StringLocated[] applyFunctionsAndVariablesInternal(TMemory memory, StringLocated located) - throws EaterExceptionLocated { + throws EaterException { if (memory.isEmpty() && functionsSet.size() == 0) return new StringLocated[] { located }; @@ -434,7 +434,7 @@ public class TContext { private String pendingAdd = null; - public String applyFunctionsAndVariables(TMemory memory, final StringLocated str) throws EaterExceptionLocated { + public String applyFunctionsAndVariables(TMemory memory, final StringLocated str) throws EaterException { // https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore%E2%80%93Horspool_algorithm // https://stackoverflow.com/questions/1326682/java-replacing-multiple-different-substring-in-a-string-at-once-or-in-the-most // https://en.wikipedia.org/wiki/String-searching_algorithm @@ -456,7 +456,7 @@ public class TContext { call.getNamedArguments().keySet()); final TFunction function = functionsSet.getFunctionSmart(signature); if (function == null) - throw EaterExceptionLocated.located("Function not found " + presentFunction, str); + throw new EaterException("Function not found " + presentFunction, str); if (function.getFunctionType() == TFunctionType.PROCEDURE) { this.pendingAdd = result.toString(); @@ -494,11 +494,11 @@ public class TContext { } private void executeVoid3(StringLocated location, TMemory memory, TFunction function, EaterFunctionCall call) - throws EaterExceptionLocated { + throws EaterException { function.executeProcedureInternal(this, memory, location, call.getValues(), call.getNamedArguments()); } - private void executeImport(TMemory memory, StringLocated s) throws EaterExceptionLocated { + private void executeImport(TMemory memory, StringLocated s) throws EaterException { final EaterImport _import = new EaterImport(s.getTrimmed()); _import.analyze(this, memory); @@ -511,13 +511,13 @@ public class TContext { } } catch (IOException e) { Logme.error(e); - throw EaterExceptionLocated.located("Cannot import " + e.getMessage(), s); + throw new EaterException("Cannot import " + e.getMessage(), s); } - throw EaterExceptionLocated.located("Cannot import", s); + throw new EaterException("Cannot import", s); } - private void executeLog(TMemory memory, StringLocated s) throws EaterExceptionLocated { + private void executeLog(TMemory memory, StringLocated s) throws EaterException { final EaterLog log = new EaterLog(s.getTrimmed()); log.analyze(this, memory); } @@ -529,7 +529,7 @@ public class TContext { } - private void executeIncludesub(TMemory memory, StringLocated s) throws EaterExceptionLocated { + private void executeIncludesub(TMemory memory, StringLocated s) throws EaterException { ImportedFiles saveImportedFiles = null; try { final EaterIncludesub include = new EaterIncludesub(s.getTrimmed()); @@ -547,7 +547,7 @@ public class TContext { this.importedFiles = this.importedFiles.withCurrentDir(f2.getParentFile()); final Reader reader = f2.getReader(charset); if (reader == null) - throw EaterExceptionLocated.located("cannot include " + what, s); + throw new EaterException("cannot include " + what, s); try { ReadLine readerline = ReadLineReader.create(reader, what, s.getLocation()); @@ -559,14 +559,14 @@ public class TContext { } } catch (IOException e) { Logme.error(e); - throw EaterExceptionLocated.located("cannot include " + what, s); + throw new EaterException("cannot include " + what, s); } } if (sub == null) sub = subs.get(what); if (sub == null) - throw EaterExceptionLocated.located("cannot include " + what, s); + throw new EaterException("cannot include " + what, s); executeLinesInternal(memory, sub.lines(), null); } finally { @@ -576,7 +576,7 @@ public class TContext { } } - private void executeIncludeDef(TMemory memory, StringLocated s) throws EaterExceptionLocated { + private void executeIncludeDef(TMemory memory, StringLocated s) throws EaterException { final EaterIncludeDef include = new EaterIncludeDef(s.getTrimmed()); include.analyze(this, memory); final String definitionName = include.getLocation(); @@ -595,7 +595,7 @@ public class TContext { } while (true); } catch (IOException e) { Logme.error(e); - throw EaterExceptionLocated.located("" + e, s); + throw new EaterException("" + e, s); } finally { try { reader2.close(); @@ -605,12 +605,12 @@ public class TContext { } } - private void executeTheme(TMemory memory, StringLocated s) throws EaterExceptionLocated { + private void executeTheme(TMemory memory, StringLocated s) throws EaterException { final EaterTheme eater = new EaterTheme(s.getTrimmed(), importedFiles); eater.analyze(this, memory); final ReadLine reader = eater.getTheme(); if (reader == null) - throw EaterExceptionLocated.located("No such theme " + eater.getName(), s); + throw new EaterException("No such theme " + eater.getName(), s); try { final List body = new ArrayList<>(); @@ -624,7 +624,7 @@ public class TContext { } while (true); } catch (IOException e) { Logme.error(e); - throw EaterExceptionLocated.located("Error reading theme " + e, s); + throw new EaterException("Error reading theme " + e, s); } finally { try { reader.close(); @@ -634,7 +634,7 @@ public class TContext { } } - private void executeInclude(TMemory memory, StringLocated s) throws EaterExceptionLocated { + private void executeInclude(TMemory memory, StringLocated s) throws EaterException { final EaterInclude include = new EaterInclude(s.getTrimmed()); include.analyze(this, memory); String location = include.getWhat(); @@ -652,7 +652,7 @@ public class TContext { if (location.startsWith("http://") || location.startsWith("https://")) { final SURL url = SURL.create(location); if (url == null) - throw EaterExceptionLocated.located("Cannot open URL", s); + throw new EaterException("Cannot open URL", s); reader = PreprocessorUtils.getReaderIncludeUrl(url, s, suf, charset); } else if (location.startsWith("<") && location.endsWith(">")) { @@ -668,14 +668,14 @@ public class TContext { return; if (strategy == PreprocessorIncludeStrategy.ONCE && filesUsedCurrent.contains(f2)) - throw EaterExceptionLocated.located("This file has already been included", s); + throw new EaterException("This file has already been included", s); if (StartDiagramExtractReader.containsStartDiagram(f2, s, charset)) { reader = StartDiagramExtractReader.build(f2, s, charset); } else { final Reader tmp = f2.getReader(charset); if (tmp == null) - throw EaterExceptionLocated.located("Cannot include file", s); + throw new EaterException("Cannot include file", s); reader = ReadLineReader.create(tmp, location, s.getLocation()); } @@ -704,7 +704,7 @@ public class TContext { } } catch (IOException e) { Logme.error(e); - throw EaterExceptionLocated.located("cannot include " + e, s); + throw new EaterException("cannot include " + e, s); } finally { if (reader != null) { try { @@ -715,7 +715,7 @@ public class TContext { } } - throw EaterExceptionLocated.located("cannot include " + location, s); + throw new EaterException("cannot include " + location, s); } public boolean isLegacyDefine(String functionName) { diff --git a/src/net/sourceforge/plantuml/tim/TFunction.java b/src/net/sourceforge/plantuml/tim/TFunction.java index f8032a23e..3570bfbea 100644 --- a/src/net/sourceforge/plantuml/tim/TFunction.java +++ b/src/net/sourceforge/plantuml/tim/TFunction.java @@ -50,10 +50,10 @@ public interface TFunction { public TFunctionType getFunctionType(); public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List args, - Map named) throws EaterExceptionLocated; + Map named) throws EaterException; public void executeProcedureInternal(TContext context, TMemory memory, StringLocated location, List args, - Map named) throws EaterExceptionLocated; + Map named) throws EaterException; public boolean isUnquoted(); diff --git a/src/net/sourceforge/plantuml/tim/TFunctionImpl.java b/src/net/sourceforge/plantuml/tim/TFunctionImpl.java index eb36bbb3e..bf51f7064 100644 --- a/src/net/sourceforge/plantuml/tim/TFunctionImpl.java +++ b/src/net/sourceforge/plantuml/tim/TFunctionImpl.java @@ -121,19 +121,18 @@ public class TFunctionImpl implements TFunction { return "FUNCTION " + signature + " " + args; } - public void addBody(StringLocated s) throws EaterExceptionLocated { + public void addBody(StringLocated s) throws EaterException { body.add(s); if (s.getType() == TLineType.RETURN) { this.containsReturn = true; if (functionType == TFunctionType.PROCEDURE) - throw EaterExceptionLocated - .located("A procedure cannot have !return directive. Declare it as a function instead ?", s); + throw new EaterException("A procedure cannot have !return directive. Declare it as a function instead ?", s); } } @Override public void executeProcedureInternal(TContext context, TMemory memory, StringLocated location, List args, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { if (functionType != TFunctionType.PROCEDURE && functionType != TFunctionType.LEGACY_DEFINELONG) throw new IllegalStateException(); @@ -143,24 +142,23 @@ public class TFunctionImpl implements TFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List args, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { if (functionType == TFunctionType.LEGACY_DEFINE) return executeReturnLegacyDefine(location.getLocation(), context, memory, args); if (functionType != TFunctionType.RETURN_FUNCTION) - throw EaterExceptionLocated.unlocated("Illegal call here. Is there a return directive in your function?", - location); + throw new EaterException("Illegal call here. Is there a return directive in your function?", location); final TMemory copy = getNewMemory(memory, args, named); final TValue result = context.executeLines(copy, body, TFunctionType.RETURN_FUNCTION, true); if (result == null) - throw EaterExceptionLocated.unlocated("No return directive found in your function", location); + throw new EaterException("No return directive found in your function", location); return result; } private TValue executeReturnLegacyDefine(LineLocation location, TContext context, TMemory memory, List args) - throws EaterExceptionLocated { + throws EaterException { if (legacyDefinition == null) throw new IllegalStateException(); diff --git a/src/net/sourceforge/plantuml/tim/TMemory.java b/src/net/sourceforge/plantuml/tim/TMemory.java index cf89df812..466b5951b 100644 --- a/src/net/sourceforge/plantuml/tim/TMemory.java +++ b/src/net/sourceforge/plantuml/tim/TMemory.java @@ -45,7 +45,7 @@ public interface TMemory { public TValue getVariable(String varname); public void putVariable(String varname, TValue value, TVariableScope scope, StringLocated location) - throws EaterExceptionLocated; + throws EaterException; public void removeVariable(String varname); @@ -59,7 +59,7 @@ public interface TMemory { public ExecutionContextIf peekIf(); - public boolean areAllIfOk(TContext context, TMemory memory) throws EaterExceptionLocated; + public boolean areAllIfOk(TContext context, TMemory memory) throws EaterException; public void addIf(ExecutionContextIf context); diff --git a/src/net/sourceforge/plantuml/tim/TMemoryGlobal.java b/src/net/sourceforge/plantuml/tim/TMemoryGlobal.java index f8d5aaec3..86629e910 100644 --- a/src/net/sourceforge/plantuml/tim/TMemoryGlobal.java +++ b/src/net/sourceforge/plantuml/tim/TMemoryGlobal.java @@ -73,10 +73,10 @@ public class TMemoryGlobal extends ExecutionContexts implements TMemory { @Override public void putVariable(String varname, TValue value, TVariableScope scope, StringLocated location) - throws EaterExceptionLocated { + throws EaterException { Log.info("[MemGlobal] Setting " + varname); if (scope == TVariableScope.LOCAL) - throw EaterExceptionLocated.unlocated("Cannot use local variable here", location); + throw new EaterException("Cannot use local variable here", location); this.globalVariables.put(varname, value); this.variables.add(varname); diff --git a/src/net/sourceforge/plantuml/tim/TMemoryLocal.java b/src/net/sourceforge/plantuml/tim/TMemoryLocal.java index 4271d6e36..2603e1d0d 100644 --- a/src/net/sourceforge/plantuml/tim/TMemoryLocal.java +++ b/src/net/sourceforge/plantuml/tim/TMemoryLocal.java @@ -79,7 +79,7 @@ public class TMemoryLocal extends ExecutionContexts implements TMemory { @Override public void putVariable(String varname, TValue value, TVariableScope scope, StringLocated location) - throws EaterExceptionLocated { + throws EaterException { if (scope == TVariableScope.GLOBAL) { memoryGlobal.putVariable(varname, value, scope, location); return; diff --git a/src/net/sourceforge/plantuml/tim/TimLoader.java b/src/net/sourceforge/plantuml/tim/TimLoader.java index 09962e007..1dcdd9670 100644 --- a/src/net/sourceforge/plantuml/tim/TimLoader.java +++ b/src/net/sourceforge/plantuml/tim/TimLoader.java @@ -57,7 +57,7 @@ public class TimLoader { this.context = new TContext(importedFiles, defines, charset, definitionsContainer); try { defines.copyTo(global, location); - } catch (EaterExceptionLocated e) { + } catch (EaterException e) { Logme.error(e); } } @@ -66,7 +66,7 @@ public class TimLoader { // CodeIteratorImpl.indentNow(list); try { context.executeLines(global, list, null, false); - } catch (EaterExceptionLocated e) { + } catch (EaterException e) { context.getResultList().add(e.getLocation().withErrorPreprocessor(e.getMessage())); changeLastLine(context.getDebug(), e.getMessage()); this.preprocessorError = true; diff --git a/src/net/sourceforge/plantuml/tim/VariableManager.java b/src/net/sourceforge/plantuml/tim/VariableManager.java index d8fc019ac..c2a7aed7c 100644 --- a/src/net/sourceforge/plantuml/tim/VariableManager.java +++ b/src/net/sourceforge/plantuml/tim/VariableManager.java @@ -53,7 +53,7 @@ public class VariableManager { this.location = location; } - public int replaceVariables(String str, int i, StringBuilder result) throws EaterExceptionLocated { + public int replaceVariables(String str, int i, StringBuilder result) throws EaterException { final String presentVariable = getVarnameAt(str, i); if (result.toString().endsWith("##")) result.setLength(result.length() - 2); @@ -80,7 +80,7 @@ public class VariableManager { return i; } - private int replaceJson(JsonValue jsonValue, String str, int i, StringBuilder result) throws EaterExceptionLocated { + private int replaceJson(JsonValue jsonValue, String str, int i, StringBuilder result) throws EaterException { while (i < str.length()) { final char n = str.charAt(i); if (n == '.') { @@ -118,11 +118,11 @@ public class VariableManager { } else if (jsonValue instanceof JsonObject) { jsonValue = ((JsonObject) jsonValue).get(nbString); } else { - throw EaterExceptionLocated.unlocated("Major parsing error", location); + throw new EaterException("Major parsing error", location); } if (jsonValue == null) - throw EaterExceptionLocated.unlocated("Data parsing error", location); + throw new EaterException("Data parsing error", location); i++; } else { diff --git a/src/net/sourceforge/plantuml/tim/expression/Knowledge.java b/src/net/sourceforge/plantuml/tim/expression/Knowledge.java index b2fdb753d..1ca3fba7b 100644 --- a/src/net/sourceforge/plantuml/tim/expression/Knowledge.java +++ b/src/net/sourceforge/plantuml/tim/expression/Knowledge.java @@ -34,13 +34,13 @@ */ package net.sourceforge.plantuml.tim.expression; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TFunction; import net.sourceforge.plantuml.tim.TFunctionSignature; public interface Knowledge { - public TValue getVariable(String name) throws EaterExceptionLocated; + public TValue getVariable(String name) throws EaterException; public TFunction getFunction(TFunctionSignature signature); diff --git a/src/net/sourceforge/plantuml/tim/expression/ReversePolishInterpretor.java b/src/net/sourceforge/plantuml/tim/expression/ReversePolishInterpretor.java index 67996cc69..7d4aff50f 100644 --- a/src/net/sourceforge/plantuml/tim/expression/ReversePolishInterpretor.java +++ b/src/net/sourceforge/plantuml/tim/expression/ReversePolishInterpretor.java @@ -41,7 +41,7 @@ import java.util.Deque; import java.util.List; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunction; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -53,7 +53,7 @@ public class ReversePolishInterpretor { private final boolean trace = false; public ReversePolishInterpretor(StringLocated location, TokenStack queue, Knowledge knowledge, TMemory memory, - TContext context) throws EaterExceptionLocated { + TContext context) throws EaterException { final Deque stack = new ArrayDeque<>(); if (trace) @@ -73,7 +73,7 @@ public class ReversePolishInterpretor { final TValue v1 = stack.removeFirst(); final TokenOperator op = token.getTokenOperator(); if (op == null) - throw EaterExceptionLocated.unlocated("bad op", location); + throw new EaterException("bad op", location); final TValue tmp = op.operate(v1, v2); stack.addFirst(tmp); @@ -81,7 +81,7 @@ public class ReversePolishInterpretor { final int nb = Integer.parseInt(token.getSurface()); final Token token2 = it.nextToken(); if (token2.getTokenType() != TokenType.FUNCTION_NAME) - throw EaterExceptionLocated.unlocated("rpn43", location); + throw new EaterException("rpn43", location); if (trace) System.err.println("token2=" + token2); @@ -89,11 +89,10 @@ public class ReversePolishInterpretor { if (trace) System.err.println("function=" + function); if (function == null) - throw EaterExceptionLocated.unlocated("Unknown built-in function " + token2.getSurface(), location); + throw new EaterException("Unknown built-in function " + token2.getSurface(), location); if (function.canCover(nb, Collections.emptySet()) == false) - throw EaterExceptionLocated.unlocated( - "Bad number of arguments for " + function.getSignature().getFunctionName(), location); + throw new EaterException("Bad number of arguments for " + function.getSignature().getFunctionName(), location); final List args = new ArrayList<>(); for (int i = 0; i < nb; i++) @@ -102,7 +101,7 @@ public class ReversePolishInterpretor { if (trace) System.err.println("args=" + args); if (location == null) - throw EaterExceptionLocated.unlocated("rpn44", location); + throw new EaterException("rpn44", location); final TValue r = function.executeReturnFunction(context, memory, location, args, Collections.emptyMap()); @@ -110,7 +109,7 @@ public class ReversePolishInterpretor { System.err.println("r=" + r); stack.addFirst(r); } else { - throw EaterExceptionLocated.unlocated("rpn41", location); + throw new EaterException("rpn41", location); } } result = stack.removeFirst(); diff --git a/src/net/sourceforge/plantuml/tim/expression/ShuntingYard.java b/src/net/sourceforge/plantuml/tim/expression/ShuntingYard.java index 45ee8e008..fb75931c5 100644 --- a/src/net/sourceforge/plantuml/tim/expression/ShuntingYard.java +++ b/src/net/sourceforge/plantuml/tim/expression/ShuntingYard.java @@ -38,7 +38,7 @@ import java.util.ArrayDeque; import java.util.Deque; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; // https://en.wikipedia.org/wiki/Shunting-yard_algorithm // https://en.cppreference.com/w/c/language/operator_precedence @@ -58,7 +58,7 @@ public class ShuntingYard { System.err.println(""); } - public ShuntingYard(TokenIterator it, Knowledge knowledge, StringLocated location) throws EaterExceptionLocated { + public ShuntingYard(TokenIterator it, Knowledge knowledge, StringLocated location) throws EaterException { while (it.hasMoreTokens()) { final Token token = it.nextToken(); @@ -74,7 +74,7 @@ public class ShuntingYard { final TValue variable = knowledge.getVariable(name); if (variable == null) { if (isVariableName(name) == false) - throw EaterExceptionLocated.unlocated("Parsing syntax error about " + name, location); + throw new EaterException("Parsing syntax error about " + name, location); ouputQueue.add(new Token(name, TokenType.QUOTED_STRING, null)); } else { diff --git a/src/net/sourceforge/plantuml/tim/expression/TokenStack.java b/src/net/sourceforge/plantuml/tim/expression/TokenStack.java index bed0e451d..e94574dab 100644 --- a/src/net/sourceforge/plantuml/tim/expression/TokenStack.java +++ b/src/net/sourceforge/plantuml/tim/expression/TokenStack.java @@ -44,7 +44,7 @@ import java.util.Map; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.tim.Eater; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TMemory; @@ -86,7 +86,7 @@ public class TokenStack { return result; } - static public TokenStack eatUntilCloseParenthesisOrComma(Eater eater) throws EaterExceptionLocated { + static public TokenStack eatUntilCloseParenthesisOrComma(Eater eater) throws EaterException { final TokenStack result = new TokenStack(); int level = 0; Token lastToken = null; @@ -94,7 +94,7 @@ public class TokenStack { eater.skipSpaces(); final char ch = eater.peekChar(); if (ch == 0) - throw EaterExceptionLocated.unlocated("until001", eater.getStringLocated()); + throw new EaterException("until001", eater.getStringLocated()); if (level == 0 && (ch == ',' || ch == ')')) return result; @@ -113,12 +113,12 @@ public class TokenStack { } static public void eatUntilCloseParenthesisOrComma(TokenIterator it, StringLocated location) - throws EaterExceptionLocated { + throws EaterException { int level = 0; while (true) { final Token ch = it.peekToken(); if (ch == null) - throw EaterExceptionLocated.unlocated("until002", location); + throw new EaterException("until002", location); final TokenType typech = ch.getTokenType(); if (level == 0 && (typech == TokenType.COMMA || typech == TokenType.CLOSE_PAREN_MATH) @@ -135,7 +135,7 @@ public class TokenStack { } } - private int countFunctionArg(TokenIterator it, StringLocated location) throws EaterExceptionLocated { + private int countFunctionArg(TokenIterator it, StringLocated location) throws EaterException { // return 42; final TokenType type1 = it.peekToken().getTokenType(); if (type1 == TokenType.CLOSE_PAREN_MATH || type1 == TokenType.CLOSE_PAREN_FUNC) @@ -151,13 +151,13 @@ public class TokenStack { else if (type == TokenType.COMMA) result++; else - throw EaterExceptionLocated.unlocated("count13", location); + throw new EaterException("count13", location); } - throw EaterExceptionLocated.unlocated("count12", location); + throw new EaterException("count12", location); } - public void guessFunctions(StringLocated location) throws EaterExceptionLocated { + public void guessFunctions(StringLocated location) throws EaterException { final Deque open = new ArrayDeque<>(); final Map parens = new HashMap(); for (int i = 0; i < tokens.size(); i++) { @@ -210,7 +210,7 @@ public class TokenStack { return new InternalIterator(); } - public TValue getResult(StringLocated location, TContext context, TMemory memory) throws EaterExceptionLocated { + public TValue getResult(StringLocated location, TContext context, TMemory memory) throws EaterException { final Knowledge knowledge = context.asKnowledge(memory, location.getLocation()); final TokenStack tmp = withoutSpace(); tmp.guessFunctions(location); diff --git a/src/net/sourceforge/plantuml/tim/expression/TokenType.java b/src/net/sourceforge/plantuml/tim/expression/TokenType.java index bdb7c445f..41c0fc7ef 100644 --- a/src/net/sourceforge/plantuml/tim/expression/TokenType.java +++ b/src/net/sourceforge/plantuml/tim/expression/TokenType.java @@ -36,7 +36,7 @@ package net.sourceforge.plantuml.tim.expression; import net.sourceforge.plantuml.text.TLineType; import net.sourceforge.plantuml.tim.Eater; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; public enum TokenType { // ::remove folder when __HAXE__ @@ -78,7 +78,7 @@ public enum TokenType { } final static public Token eatOneToken(Token lastToken, Eater eater, boolean manageColon) - throws EaterExceptionLocated { + throws EaterException { char ch = eater.peekChar(); if (ch == 0) return null; @@ -122,7 +122,7 @@ public enum TokenType { return true; } - static private String eatAndGetTokenPlainText(Eater eater) throws EaterExceptionLocated { + static private String eatAndGetTokenPlainText(Eater eater) throws EaterException { final StringBuilder result = new StringBuilder(); while (true) { final char ch = eater.peekChar(); diff --git a/src/net/sourceforge/plantuml/tim/iterator/AbstractCodeIterator.java b/src/net/sourceforge/plantuml/tim/iterator/AbstractCodeIterator.java index e01a9707c..51fbdfad5 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/AbstractCodeIterator.java +++ b/src/net/sourceforge/plantuml/tim/iterator/AbstractCodeIterator.java @@ -35,7 +35,7 @@ package net.sourceforge.plantuml.tim.iterator; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; public abstract class AbstractCodeIterator implements CodeIterator { @@ -46,7 +46,7 @@ public abstract class AbstractCodeIterator implements CodeIterator { } @Override - public void next() throws EaterExceptionLocated { + public void next() throws EaterException { source.next(); } @@ -57,7 +57,7 @@ public abstract class AbstractCodeIterator implements CodeIterator { @Override final public void jumpToCodePosition(CodePosition newPosition, StringLocated location) - throws EaterExceptionLocated { + throws EaterException { source.jumpToCodePosition(newPosition, location); } diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIterator.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIterator.java index f6c613a00..401102893 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIterator.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIterator.java @@ -35,17 +35,17 @@ package net.sourceforge.plantuml.tim.iterator; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; public interface CodeIterator { // ::remove folder when __HAXE__ - public StringLocated peek() throws EaterExceptionLocated; + public StringLocated peek() throws EaterException; - public void next() throws EaterExceptionLocated; + public void next() throws EaterException; public CodePosition getCodePosition(); - public void jumpToCodePosition(CodePosition newPosition, StringLocated location) throws EaterExceptionLocated; + public void jumpToCodePosition(CodePosition newPosition, StringLocated location) throws EaterException; } diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorAffectation.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorAffectation.java index bb341c11e..8bd3a2b4f 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorAffectation.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorAffectation.java @@ -40,7 +40,7 @@ import net.sourceforge.plantuml.json.ParseException; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.text.TLineType; import net.sourceforge.plantuml.tim.EaterAffectation; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TMemory; @@ -58,7 +58,7 @@ public class CodeIteratorAffectation extends AbstractCodeIterator { } @Override - public StringLocated peek() throws EaterExceptionLocated { + public StringLocated peek() throws EaterException { while (true) { final StringLocated result = source.peek(); if (result == null) { @@ -74,7 +74,7 @@ public class CodeIteratorAffectation extends AbstractCodeIterator { } } - private void doAffectation(StringLocated result) throws EaterExceptionLocated { + private void doAffectation(StringLocated result) throws EaterException { int lastLocation = -1; for (int i = 0; i < 9999; i++) try { @@ -82,7 +82,7 @@ public class CodeIteratorAffectation extends AbstractCodeIterator { return; } catch (ParseException e) { if (e.getColumn() <= lastLocation) - throw EaterExceptionLocated.located("Error in JSON format", result); + throw new EaterException("Error in JSON format", result); lastLocation = e.getColumn(); next(); @@ -92,7 +92,7 @@ public class CodeIteratorAffectation extends AbstractCodeIterator { } private void executeAffectation(TContext context, TMemory memory, StringLocated s) - throws EaterExceptionLocated { + throws EaterException { new EaterAffectation(s).analyze(context, memory); } diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorForeach.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorForeach.java index d6cb73027..2ea2ef990 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorForeach.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorForeach.java @@ -39,7 +39,7 @@ import java.util.List; import net.sourceforge.plantuml.json.JsonValue; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.text.TLineType; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterForeach; import net.sourceforge.plantuml.tim.ExecutionContextForeach; import net.sourceforge.plantuml.tim.TContext; @@ -60,7 +60,7 @@ public class CodeIteratorForeach extends AbstractCodeIterator { this.logs = logs; } - public StringLocated peek() throws EaterExceptionLocated { + public StringLocated peek() throws EaterException { int level = 0; while (true) { final StringLocated result = source.peek(); @@ -90,7 +90,7 @@ public class CodeIteratorForeach extends AbstractCodeIterator { } else if (result.getType() == TLineType.ENDFOREACH) { logs.add(result); if (foreach == null) - throw EaterExceptionLocated.located("No foreach related to this endforeach", result); + throw new EaterException("No foreach related to this endforeach", result); foreach.inc(); if (foreach.isSkipMe()) { @@ -107,7 +107,7 @@ public class CodeIteratorForeach extends AbstractCodeIterator { } } - private void executeForeach(TMemory memory, StringLocated s) throws EaterExceptionLocated { + private void executeForeach(TMemory memory, StringLocated s) throws EaterException { final EaterForeach condition = new EaterForeach(s); condition.analyze(context, memory); final ExecutionContextForeach foreach = ExecutionContextForeach.fromValue(condition.getVarname(), @@ -121,7 +121,7 @@ public class CodeIteratorForeach extends AbstractCodeIterator { } private void setLoopVariable(TMemory memory, ExecutionContextForeach foreach, StringLocated position) - throws EaterExceptionLocated { + throws EaterException { final JsonValue first = foreach.getJsonArray().get(foreach.currentIndex()); memory.putVariable(foreach.getVarname(), TValue.fromJson(first), TVariableScope.GLOBAL, position); } diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorIf.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorIf.java index f36954d28..831726ecc 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorIf.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorIf.java @@ -39,7 +39,7 @@ import java.util.List; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.text.TLineType; import net.sourceforge.plantuml.tim.EaterElseIf; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterIf; import net.sourceforge.plantuml.tim.EaterIfdef; import net.sourceforge.plantuml.tim.EaterIfndef; @@ -60,7 +60,7 @@ public class CodeIteratorIf extends AbstractCodeIterator { this.logs = logs; } - public StringLocated peek() throws EaterExceptionLocated { + public StringLocated peek() throws EaterException { while (true) { final StringLocated result = source.peek(); if (result == null) { @@ -106,17 +106,17 @@ public class CodeIteratorIf extends AbstractCodeIterator { } } - private void executeIf(TContext context, TMemory memory, StringLocated s) throws EaterExceptionLocated { + private void executeIf(TContext context, TMemory memory, StringLocated s) throws EaterException { final EaterIf condition = new EaterIf(s); condition.analyze(context, memory); final boolean isTrue = condition.isTrue(); memory.addIf(ExecutionContextIf.fromValue(isTrue)); } - private void executeElseIf(TContext context, TMemory memory, StringLocated s) throws EaterExceptionLocated { + private void executeElseIf(TContext context, TMemory memory, StringLocated s) throws EaterException { final ExecutionContextIf poll = (ExecutionContextIf) memory.peekIf(); if (poll == null) - throw EaterExceptionLocated.located("No if related to this else", s); + throw new EaterException("No if related to this else", s); poll.enteringElseIf(); if (poll.hasBeenBurn() == false) { @@ -129,32 +129,32 @@ public class CodeIteratorIf extends AbstractCodeIterator { } } - private void executeIfdef(TContext context, TMemory memory, StringLocated s) throws EaterExceptionLocated { + private void executeIfdef(TContext context, TMemory memory, StringLocated s) throws EaterException { final EaterIfdef condition = new EaterIfdef(s); condition.analyze(context, memory); final boolean isTrue = condition.isTrue(context, memory); memory.addIf(ExecutionContextIf.fromValue(isTrue)); } - private void executeIfndef(TContext context, TMemory memory, StringLocated s) throws EaterExceptionLocated { + private void executeIfndef(TContext context, TMemory memory, StringLocated s) throws EaterException { final EaterIfndef condition = new EaterIfndef(s); condition.analyze(context, memory); final boolean isTrue = condition.isTrue(context, memory); memory.addIf(ExecutionContextIf.fromValue(isTrue)); } - private void executeElse(TContext context, TMemory memory, StringLocated s) throws EaterExceptionLocated { + private void executeElse(TContext context, TMemory memory, StringLocated s) throws EaterException { final ExecutionContextIf poll = (ExecutionContextIf) memory.peekIf(); if (poll == null) - throw EaterExceptionLocated.located("No if related to this else", s); + throw new EaterException("No if related to this else", s); poll.nowInElse(); } - private void executeEndif(TContext context, TMemory memory, StringLocated s) throws EaterExceptionLocated { + private void executeEndif(TContext context, TMemory memory, StringLocated s) throws EaterException { final ExecutionContextIf poll = (ExecutionContextIf) memory.pollIf(); if (poll == null) - throw EaterExceptionLocated.located("No if related to this endif", s); + throw new EaterException("No if related to this endif", s); } diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorImpl.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorImpl.java index c1bbd51a7..07dead5aa 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorImpl.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorImpl.java @@ -37,7 +37,7 @@ package net.sourceforge.plantuml.tim.iterator; import java.util.List; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; public class CodeIteratorImpl implements CodeIterator { @@ -89,10 +89,10 @@ public class CodeIteratorImpl implements CodeIterator { } @Override - public void jumpToCodePosition(CodePosition newPosition, StringLocated location) throws EaterExceptionLocated { + public void jumpToCodePosition(CodePosition newPosition, StringLocated location) throws EaterException { this.countJump++; if (this.countJump > 999) - throw EaterExceptionLocated.unlocated("Infinite loop?", location); + throw new EaterException("Infinite loop?", location); final Position pos = (Position) newPosition; this.current = pos.pos; diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorInnerComment.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorInnerComment.java index fe5a2d094..501bd9b4e 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorInnerComment.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorInnerComment.java @@ -35,7 +35,7 @@ package net.sourceforge.plantuml.tim.iterator; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; public class CodeIteratorInnerComment extends AbstractCodeIterator { @@ -43,7 +43,7 @@ public class CodeIteratorInnerComment extends AbstractCodeIterator { super(source); } - public StringLocated peek() throws EaterExceptionLocated { + public StringLocated peek() throws EaterException { final StringLocated result = source.peek(); if (result == null) { return null; diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorLegacyDefine.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorLegacyDefine.java index 13709df73..fb4a99f75 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorLegacyDefine.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorLegacyDefine.java @@ -38,7 +38,7 @@ import java.util.List; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.text.TLineType; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.FunctionsSet; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TMemory; @@ -60,7 +60,7 @@ public class CodeIteratorLegacyDefine extends AbstractCodeIterator { this.memory = memory; } - public StringLocated peek() throws EaterExceptionLocated { + public StringLocated peek() throws EaterException { while (true) { final StringLocated result = source.peek(); if (result == null) { diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorLongComment.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorLongComment.java index cc92cf384..656cf882d 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorLongComment.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorLongComment.java @@ -38,7 +38,7 @@ import java.util.List; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.text.TLineType; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; public class CodeIteratorLongComment extends AbstractCodeIterator { @@ -49,7 +49,7 @@ public class CodeIteratorLongComment extends AbstractCodeIterator { this.logs = logs; } - public StringLocated peek() throws EaterExceptionLocated { + public StringLocated peek() throws EaterException { while (true) { if (source.peek() == null) { return null; diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorProcedure.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorProcedure.java index 1b4be2503..ba88da272 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorProcedure.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorProcedure.java @@ -38,7 +38,7 @@ import java.util.List; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.text.TLineType; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.FunctionsSet; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionType; @@ -61,7 +61,7 @@ public class CodeIteratorProcedure extends AbstractCodeIterator { this.memory = memory; } - public StringLocated peek() throws EaterExceptionLocated { + public StringLocated peek() throws EaterException { while (true) { final StringLocated result = source.peek(); if (result == null) { diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorReturnFunction.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorReturnFunction.java index 791abad71..b3c628fa1 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorReturnFunction.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorReturnFunction.java @@ -38,7 +38,7 @@ import java.util.List; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.text.TLineType; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.FunctionsSet; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionType; @@ -61,7 +61,7 @@ public class CodeIteratorReturnFunction extends AbstractCodeIterator { this.memory = memory; } - public StringLocated peek() throws EaterExceptionLocated { + public StringLocated peek() throws EaterException { while (true) { final StringLocated result = source.peek(); if (result == null) { @@ -73,9 +73,7 @@ public class CodeIteratorReturnFunction extends AbstractCodeIterator { logs.add(result); if (result.getType() == TLineType.END_FUNCTION) { if (functionsSet.pendingFunction().doesContainReturn() == false) { - throw EaterExceptionLocated.located( - "This function does not have any !return directive. Declare it as a procedure instead ?", - result); + throw new EaterException("This function does not have any !return directive. Declare it as a procedure instead ?", result); } functionsSet.executeEndfunction(); } else { diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorShortComment.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorShortComment.java index f57bcab66..0b36e2374 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorShortComment.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorShortComment.java @@ -38,7 +38,7 @@ import java.util.List; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.text.TLineType; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; public class CodeIteratorShortComment extends AbstractCodeIterator { @@ -49,7 +49,7 @@ public class CodeIteratorShortComment extends AbstractCodeIterator { this.logs = logs; } - public StringLocated peek() throws EaterExceptionLocated { + public StringLocated peek() throws EaterException { while (true) { final StringLocated result = source.peek(); if (result == null) { diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorSub.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorSub.java index 1c28d1199..248f200f8 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorSub.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorSub.java @@ -40,7 +40,7 @@ import java.util.Map; import net.sourceforge.plantuml.preproc.Sub; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.text.TLineType; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterStartsub; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TMemory; @@ -65,7 +65,7 @@ public class CodeIteratorSub extends AbstractCodeIterator { return Collections.unmodifiableMap(subs); } - public StringLocated peek() throws EaterExceptionLocated { + public StringLocated peek() throws EaterException { if (readingInProgress != null) return readingInProgress.peek(); @@ -82,7 +82,7 @@ public class CodeIteratorSub extends AbstractCodeIterator { StringLocated s = null; while ((s = source.peek()) != null) { if (s.getType() == TLineType.STARTSUB) { - throw EaterExceptionLocated.located("Cannot nest sub", result); + throw new EaterException("Cannot nest sub", result); } else if (s.getType() == TLineType.ENDSUB) { source.next(); readingInProgress = new CodeIteratorImpl(created.lines()); @@ -100,7 +100,7 @@ public class CodeIteratorSub extends AbstractCodeIterator { } @Override - public void next() throws EaterExceptionLocated { + public void next() throws EaterException { if (readingInProgress == null) { source.next(); return; diff --git a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorWhile.java b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorWhile.java index db912021e..68679b1d3 100644 --- a/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorWhile.java +++ b/src/net/sourceforge/plantuml/tim/iterator/CodeIteratorWhile.java @@ -38,7 +38,7 @@ import java.util.List; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.text.TLineType; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.EaterWhile; import net.sourceforge.plantuml.tim.ExecutionContextWhile; import net.sourceforge.plantuml.tim.TContext; @@ -59,7 +59,7 @@ public class CodeIteratorWhile extends AbstractCodeIterator { this.logs = logs; } - public StringLocated peek() throws EaterExceptionLocated { + public StringLocated peek() throws EaterException { int level = 0; while (true) { final StringLocated result = source.peek(); @@ -89,7 +89,7 @@ public class CodeIteratorWhile extends AbstractCodeIterator { } else if (result.getType() == TLineType.ENDWHILE) { logs.add(result); if (currentWhile == null) - throw EaterExceptionLocated.located("No while related to this endwhile", result); + throw new EaterException("No while related to this endwhile", result); final TValue value = currentWhile.conditionValue(result, context, memory); if (value.toBoolean()) @@ -105,7 +105,7 @@ public class CodeIteratorWhile extends AbstractCodeIterator { } } - private void executeWhile(TMemory memory, StringLocated s) throws EaterExceptionLocated { + private void executeWhile(TMemory memory, StringLocated s) throws EaterException { final EaterWhile condition = new EaterWhile(s); condition.analyze(context, memory); final TokenStack whileExpression = condition.getWhileExpression(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/AlwaysFalse.java b/src/net/sourceforge/plantuml/tim/stdlib/AlwaysFalse.java index 5991d486e..29b116da7 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/AlwaysFalse.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/AlwaysFalse.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -58,7 +58,7 @@ public class AlwaysFalse extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { return TValue.fromBoolean(false); } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/AlwaysTrue.java b/src/net/sourceforge/plantuml/tim/stdlib/AlwaysTrue.java index d9cf561e0..e59c5e0f6 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/AlwaysTrue.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/AlwaysTrue.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -58,7 +58,7 @@ public class AlwaysTrue extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { return TValue.fromBoolean(true); } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/CallUserFunction.java b/src/net/sourceforge/plantuml/tim/stdlib/CallUserFunction.java index 6268cf54e..36bbdf7c1 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/CallUserFunction.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/CallUserFunction.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunction; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -59,13 +59,13 @@ public class CallUserFunction extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final String fname = values.get(0).toString(); final List args = values.subList(1, values.size()); final TFunctionSignature signature = new TFunctionSignature(fname, args.size()); final TFunction func = context.getFunctionSmart(signature); if (func == null) - throw EaterExceptionLocated.unlocated("Cannot find void function " + fname, location); + throw new EaterException("Cannot find void function " + fname, location); return func.executeReturnFunction(context, memory, location, args, named); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Chr.java b/src/net/sourceforge/plantuml/tim/stdlib/Chr.java index 3dcbfc7d9..fb55e335a 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Chr.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Chr.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -58,7 +58,7 @@ public class Chr extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { try { final String value = String.valueOf(Character.toChars(values.get(0).toInt())); return TValue.fromString(value); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Darken.java b/src/net/sourceforge/plantuml/tim/stdlib/Darken.java index bef84da7d..924f24be1 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Darken.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Darken.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.HColorSet; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -62,7 +62,7 @@ public class Darken extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final String colorString = values.get(0).toString(); final int ratio = values.get(1).toInt(); try { @@ -70,7 +70,7 @@ public class Darken extends SimpleReturnFunction { color = color.darken(ratio); return TValue.fromString(color.asString()); } catch (NoSuchColorException e) { - throw EaterExceptionLocated.located("No such color", location); + throw new EaterException("No such color", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/DateFunction.java b/src/net/sourceforge/plantuml/tim/stdlib/DateFunction.java index 1b77104eb..6f8efa2ea 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/DateFunction.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/DateFunction.java @@ -41,7 +41,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -60,7 +60,7 @@ public class DateFunction extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { if (values.size() == 0) return TValue.fromString(new Date().toString()); @@ -74,7 +74,7 @@ public class DateFunction extends SimpleReturnFunction { try { return TValue.fromString(new SimpleDateFormat(format).format(now)); } catch (Exception e) { - throw EaterExceptionLocated.unlocated("Bad date pattern", location); + throw new EaterException("Bad date pattern", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Dec2hex.java b/src/net/sourceforge/plantuml/tim/stdlib/Dec2hex.java index b274f3a7c..9bbc29e4c 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Dec2hex.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Dec2hex.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -58,7 +58,7 @@ public class Dec2hex extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { try { return TValue.fromString("" + Integer.toHexString(values.get(0).toInt())); } catch (Throwable t) { diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Dirpath.java b/src/net/sourceforge/plantuml/tim/stdlib/Dirpath.java index 0eef6ddb9..ef08879cc 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Dirpath.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Dirpath.java @@ -40,7 +40,7 @@ import java.util.Set; import net.sourceforge.plantuml.preproc.Defines; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -65,7 +65,7 @@ public class Dirpath extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { if (value == null) return TValue.fromString(""); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Eval.java b/src/net/sourceforge/plantuml/tim/stdlib/Eval.java index b08d6b263..311404c17 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Eval.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Eval.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.StringEater; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -59,7 +59,7 @@ public class Eval extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final String exp = values.get(0).toString(); final StringEater eater = new StringEater(exp); final TValue value = eater.eatExpression(context, memory); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Feature.java b/src/net/sourceforge/plantuml/tim/stdlib/Feature.java index 89ef049eb..0f789f30c 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Feature.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Feature.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -58,7 +58,7 @@ public class Feature extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final String arg = values.get(0).toString(); if ("style".equalsIgnoreCase(arg)) return TValue.fromInt(1); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/FileExists.java b/src/net/sourceforge/plantuml/tim/stdlib/FileExists.java index bef8b2246..cee70de58 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/FileExists.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/FileExists.java @@ -40,7 +40,7 @@ import java.util.Set; import net.sourceforge.plantuml.security.SFile; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -59,7 +59,7 @@ public class FileExists extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { // ::comment when __CORE__ final String path = values.get(0).toString(); return TValue.fromBoolean(new SFile(path).exists()); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Filename.java b/src/net/sourceforge/plantuml/tim/stdlib/Filename.java index 812a0033e..9a4223d45 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Filename.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Filename.java @@ -40,7 +40,7 @@ import java.util.Set; import net.sourceforge.plantuml.preproc.Defines; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -65,7 +65,7 @@ public class Filename extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { if (value == null) { return TValue.fromString(""); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/FunctionExists.java b/src/net/sourceforge/plantuml/tim/stdlib/FunctionExists.java index 1d72755cb..d2bd9d1b2 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/FunctionExists.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/FunctionExists.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -59,7 +59,7 @@ public class FunctionExists extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final String name = values.get(0).toString(); return TValue.fromBoolean(context.doesFunctionExist(name)); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetAllStdlib.java b/src/net/sourceforge/plantuml/tim/stdlib/GetAllStdlib.java index f03178410..d1b0bff9d 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetAllStdlib.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetAllStdlib.java @@ -45,7 +45,7 @@ import net.sourceforge.plantuml.json.JsonObject; import net.sourceforge.plantuml.log.Logme; import net.sourceforge.plantuml.preproc.Stdlib; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -64,7 +64,7 @@ public class GetAllStdlib extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { switch (values.size()) { case 0: @@ -99,7 +99,7 @@ public class GetAllStdlib extends SimpleReturnFunction { default: assert false; // Should not append because of canCover() - throw EaterExceptionLocated.located("Error on get_all_stdlib: Too many arguments", location); + throw new EaterException("Error on get_all_stdlib: Too many arguments", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetAllTheme.java b/src/net/sourceforge/plantuml/tim/stdlib/GetAllTheme.java index 9404e09d9..2512d26f1 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetAllTheme.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetAllTheme.java @@ -43,7 +43,7 @@ import net.sourceforge.plantuml.json.JsonArray; import net.sourceforge.plantuml.log.Logme; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.theme.ThemeUtils; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -62,7 +62,7 @@ public class GetAllTheme extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final JsonArray result = new JsonArray(); try { for (String theme : ThemeUtils.getAllThemeNames()) { diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java b/src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java index 3067496d0..6e7df046c 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetJsonKey.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.json.JsonArray; import net.sourceforge.plantuml.json.JsonObject; import net.sourceforge.plantuml.json.JsonValue; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -61,10 +61,10 @@ public class GetJsonKey extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final TValue data = values.get(0); if (data.isJson() == false) - throw EaterExceptionLocated.unlocated("Not JSON data", location); + throw new EaterException("Not JSON data", location); final JsonValue json = data.toJson(); if (json.isObject()) { @@ -87,7 +87,7 @@ public class GetJsonKey extends SimpleReturnFunction { return TValue.fromJson(result); } - throw EaterExceptionLocated.unlocated("Bad JSON type", location); + throw new EaterException("Bad JSON type", location); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetJsonType.java b/src/net/sourceforge/plantuml/tim/stdlib/GetJsonType.java index b27b68f90..0c09b9e84 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetJsonType.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetJsonType.java @@ -40,7 +40,7 @@ import java.util.Set; import net.sourceforge.plantuml.json.JsonValue; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -59,7 +59,7 @@ public class GetJsonType extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final TValue data = values.get(0); if (data.isString()) return TValue.fromString("string"); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetVariableValue.java b/src/net/sourceforge/plantuml/tim/stdlib/GetVariableValue.java index f7ffb4555..b99e3478a 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetVariableValue.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetVariableValue.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -58,7 +58,7 @@ public class GetVariableValue extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final String name = values.get(0).toString(); final TValue variable = memory.getVariable(name); if (variable == null) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/GetVersion.java b/src/net/sourceforge/plantuml/tim/stdlib/GetVersion.java index b6d5e61c2..df0218cea 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/GetVersion.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/GetVersion.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -59,7 +59,7 @@ public class GetVersion extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { return TValue.fromString(Version.versionString()); } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Getenv.java b/src/net/sourceforge/plantuml/tim/stdlib/Getenv.java index 28a10472f..4c93f23f5 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Getenv.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Getenv.java @@ -40,7 +40,7 @@ import java.util.Set; import net.sourceforge.plantuml.security.SecurityUtils; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -59,7 +59,7 @@ public class Getenv extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { // ::comment when __CORE__ final String value = getenv(values.get(0).toString()); if (value == null) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Hex2dec.java b/src/net/sourceforge/plantuml/tim/stdlib/Hex2dec.java index f7c45b0ef..964a6cfb0 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Hex2dec.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Hex2dec.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -58,7 +58,7 @@ public class Hex2dec extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { try { return TValue.fromInt(Integer.parseInt(values.get(0).toString(), 16)); } catch (Throwable t) { diff --git a/src/net/sourceforge/plantuml/tim/stdlib/HslColor.java b/src/net/sourceforge/plantuml/tim/stdlib/HslColor.java index 34496e629..2113908d2 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/HslColor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/HslColor.java @@ -42,7 +42,7 @@ import java.util.Set; import net.sourceforge.plantuml.klimt.color.HColors; import net.sourceforge.plantuml.klimt.color.HSLColor; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -61,7 +61,7 @@ public class HslColor extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final int h = values.get(0).toInt(); final int s = values.get(1).toInt(); final int l = values.get(2).toInt(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/IntVal.java b/src/net/sourceforge/plantuml/tim/stdlib/IntVal.java index 2b54cc99b..bda216b4c 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/IntVal.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/IntVal.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -59,7 +59,7 @@ public class IntVal extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final String s = values.get(0).toString(); try { return TValue.fromInt(Integer.parseInt(s)); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java b/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java index 6328e88f6..4eab28dde 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunction; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -64,13 +64,13 @@ public class InvokeProcedure implements TFunction { @Override public void executeProcedureInternal(TContext context, TMemory memory, StringLocated location, List args, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final String fname = args.get(0).toString(); final List sublist = args.subList(1, args.size()); final TFunctionSignature signature = new TFunctionSignature(fname, sublist.size()); final TFunction func = context.getFunctionSmart(signature); if (func == null) - throw EaterExceptionLocated.located("Cannot find void function " + fname, location); + throw new EaterException("Cannot find void function " + fname, location); func.executeProcedureInternal(context, memory, location, sublist, named); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/IsDark.java b/src/net/sourceforge/plantuml/tim/stdlib/IsDark.java index f481264d2..cf9449122 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/IsDark.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/IsDark.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.HColorSet; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -62,13 +62,13 @@ public class IsDark extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final String colorString = values.get(0).toString(); try { final HColor color = HColorSet.instance().getColorLEGACY(colorString); return TValue.fromBoolean(color.isDark()); } catch (NoSuchColorException e) { - throw EaterExceptionLocated.located("No such color", location); + throw new EaterException("No such color", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/IsLight.java b/src/net/sourceforge/plantuml/tim/stdlib/IsLight.java index 1528ea8fe..b717e419a 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/IsLight.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/IsLight.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.HColorSet; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -62,13 +62,13 @@ public class IsLight extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final String colorString = values.get(0).toString(); try { final HColor color = HColorSet.instance().getColorLEGACY(colorString); return TValue.fromBoolean(!color.isDark()); } catch (NoSuchColorException e) { - throw EaterExceptionLocated.located("No such color", location); + throw new EaterException("No such color", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/JsonKeyExists.java b/src/net/sourceforge/plantuml/tim/stdlib/JsonKeyExists.java index bc22ce9a7..35238cc5b 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/JsonKeyExists.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/JsonKeyExists.java @@ -41,7 +41,7 @@ import java.util.Set; import net.sourceforge.plantuml.json.JsonObject; import net.sourceforge.plantuml.json.JsonValue; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -60,7 +60,7 @@ public class JsonKeyExists extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final TValue arg0 = values.get(0); if (arg0.isJson() == false) return TValue.fromBoolean(false); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Lighten.java b/src/net/sourceforge/plantuml/tim/stdlib/Lighten.java index 41d9a31d2..e309859b3 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Lighten.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Lighten.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.HColorSet; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -62,7 +62,7 @@ public class Lighten extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final String colorString = values.get(0).toString(); final int ratio = values.get(1).toInt(); try { @@ -70,7 +70,7 @@ public class Lighten extends SimpleReturnFunction { color = color.lighten(ratio); return TValue.fromString(color.asString()); } catch (NoSuchColorException e) { - throw EaterExceptionLocated.located("No such color", location); + throw new EaterException("No such color", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java b/src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java index 40e5746c6..5f8e30b00 100755 --- a/src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java @@ -50,7 +50,7 @@ import net.sourceforge.plantuml.log.Logme; import net.sourceforge.plantuml.security.SFile; import net.sourceforge.plantuml.security.SURL; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -108,7 +108,7 @@ public class LoadJson extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final String path = values.get(0).toString(); try { String data = loadStringData(path, getCharset(values)); @@ -119,12 +119,10 @@ public class LoadJson extends SimpleReturnFunction { return TValue.fromJson(jsonValue); } catch (ParseException pe) { Logme.error(pe); - throw EaterExceptionLocated - .unlocated("JSON parse issue in source " + path + " on location " + pe.getLocation(), location); + throw new EaterException("JSON parse issue in source " + path + " on location " + pe.getLocation(), location); } catch (UnsupportedEncodingException e) { Logme.error(e); - throw EaterExceptionLocated.unlocated("JSON encoding issue in source " + path + ": " + e.getMessage(), - location); + throw new EaterException("JSON encoding issue in source " + path + ": " + e.getMessage(), location); } } @@ -164,7 +162,7 @@ public class LoadJson extends SimpleReturnFunction { * @throws EaterException if something went wrong on reading data */ private String loadStringData(String path, String charset) - throws EaterExceptionLocated, UnsupportedEncodingException { + throws EaterException, UnsupportedEncodingException { byte[] byteData = null; if (path.startsWith("http://") || path.startsWith("https://")) { diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalAnd.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalAnd.java index 1bea47ee2..ede165c22 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalAnd.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalAnd.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -58,7 +58,7 @@ public class LogicalAnd extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { for (TValue v : values) if (v.toBoolean() == false) return TValue.fromBoolean(false); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNand.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNand.java index 52345b792..0740118e5 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNand.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNand.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -58,7 +58,7 @@ public class LogicalNand extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { for (TValue v : values) if (v.toBoolean() == false) return TValue.fromBoolean(!false); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNor.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNor.java index fe59542cf..d0fcb1e14 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNor.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -58,7 +58,7 @@ public class LogicalNor extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { for (TValue v : values) if (v.toBoolean() == true) return TValue.fromBoolean(!true); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNot.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNot.java index 0dbd650f5..071620862 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNot.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNot.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -58,7 +58,7 @@ public class LogicalNot extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final boolean arg = values.get(0).toBoolean(); return TValue.fromBoolean(!arg); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNxor.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNxor.java index 3abd60263..8403263c7 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalNxor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalNxor.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -58,7 +58,7 @@ public class LogicalNxor extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { int cpt = 0; for (TValue v : values) if (v.toBoolean() == true) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalOr.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalOr.java index 0d2e5ded2..de58b384a 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalOr.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalOr.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -58,7 +58,7 @@ public class LogicalOr extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { for (TValue v : values) if (v.toBoolean() == true) return TValue.fromBoolean(true); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/LogicalXor.java b/src/net/sourceforge/plantuml/tim/stdlib/LogicalXor.java index 9b9a66cbb..3a5e24eab 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/LogicalXor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/LogicalXor.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -58,7 +58,7 @@ public class LogicalXor extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { int cpt = 0; for (TValue v : values) if (v.toBoolean() == true) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Now.java b/src/net/sourceforge/plantuml/tim/stdlib/Now.java index f24f75093..de2c7bb71 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Now.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Now.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -58,7 +58,7 @@ public class Now extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final long now = System.currentTimeMillis() / 1000L; return TValue.fromInt((int) now); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Ord.java b/src/net/sourceforge/plantuml/tim/stdlib/Ord.java index 1c509686a..9b1c87d5d 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Ord.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Ord.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -58,7 +58,7 @@ public class Ord extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { try { final int codePoint = values.get(0).toString().codePointAt(0); return TValue.fromInt(codePoint); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java b/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java index f2c8c885f..1b4de5ac9 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/RandomFunction.java @@ -40,7 +40,7 @@ import java.util.Random; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -61,7 +61,7 @@ public class RandomFunction extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { switch (values.size()) { case 0: return TValue.fromInt(random.nextInt(2)); @@ -77,7 +77,7 @@ public class RandomFunction extends SimpleReturnFunction { default: assert false; // Should not append because of canCover() - throw EaterExceptionLocated.located("Error on Random: Too many argument", location); + throw new EaterException("Error on Random: Too many argument", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/RetrieveProcedure.java b/src/net/sourceforge/plantuml/tim/stdlib/RetrieveProcedure.java index 5e5590ddf..a9b51e5f3 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/RetrieveProcedure.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/RetrieveProcedure.java @@ -40,7 +40,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunction; import net.sourceforge.plantuml.tim.TFunctionSignature; @@ -60,7 +60,7 @@ public class RetrieveProcedure extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final String fname = values.get(0).toString(); final List args = values.subList(1, values.size()); final TFunctionSignature signature = new TFunctionSignature(fname, args.size()); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/ReverseColor.java b/src/net/sourceforge/plantuml/tim/stdlib/ReverseColor.java index e19fe4a30..a46c9695f 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/ReverseColor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/ReverseColor.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.HColorSet; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -61,14 +61,14 @@ public class ReverseColor extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final String colorString = values.get(0).toString(); try { HColor color = HColorSet.instance().getColorLEGACY(colorString); color = color.reverse(); return TValue.fromString(color.asString()); } catch (NoSuchColorException e) { - throw EaterExceptionLocated.located("No such color", location); + throw new EaterException("No such color", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/ReverseHsluvColor.java b/src/net/sourceforge/plantuml/tim/stdlib/ReverseHsluvColor.java index 75a60e8ac..8fd8422e3 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/ReverseHsluvColor.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/ReverseHsluvColor.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.HColorSet; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -61,14 +61,14 @@ public class ReverseHsluvColor extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final String colorString = values.get(0).toString(); try { HColor color = HColorSet.instance().getColorLEGACY(colorString); color = color.reverseHsluv(); return TValue.fromString(color.asString()); } catch (NoSuchColorException e) { - throw EaterExceptionLocated.located("No such color", location); + throw new EaterException("No such color", location); } } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/SetVariableValue.java b/src/net/sourceforge/plantuml/tim/stdlib/SetVariableValue.java index fcc12260c..631037c45 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/SetVariableValue.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/SetVariableValue.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -59,7 +59,7 @@ public class SetVariableValue extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { // if (memory instanceof TMemoryLocal) { // memory = ((TMemoryLocal) memory).getGlobalForInternalUseOnly(); // } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/SimpleReturnFunction.java b/src/net/sourceforge/plantuml/tim/stdlib/SimpleReturnFunction.java index 5276d495e..c649a86a4 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/SimpleReturnFunction.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/SimpleReturnFunction.java @@ -38,7 +38,7 @@ import java.util.List; import java.util.Map; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunction; import net.sourceforge.plantuml.tim.TFunctionType; @@ -53,7 +53,7 @@ public abstract class SimpleReturnFunction implements TFunction { @Override final public void executeProcedureInternal(TContext context, TMemory memory, StringLocated location, - List args, Map named) throws EaterExceptionLocated { + List args, Map named) throws EaterException { throw new UnsupportedOperationException(); } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Size.java b/src/net/sourceforge/plantuml/tim/stdlib/Size.java index 82a72c5ab..b2e176504 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Size.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Size.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.json.JsonArray; import net.sourceforge.plantuml.json.JsonObject; import net.sourceforge.plantuml.json.JsonValue; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -61,7 +61,7 @@ public class Size extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final TValue value = values.get(0); if (value.isNumber()) return TValue.fromInt(0); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/SplitStr.java b/src/net/sourceforge/plantuml/tim/stdlib/SplitStr.java index f3e17784a..536ee9ba0 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/SplitStr.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/SplitStr.java @@ -41,7 +41,7 @@ import java.util.StringTokenizer; import net.sourceforge.plantuml.json.JsonArray; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -60,7 +60,7 @@ public class SplitStr extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final JsonArray result = new JsonArray(); final String str = values.get(0).toString(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Strlen.java b/src/net/sourceforge/plantuml/tim/stdlib/Strlen.java index f97aad0de..2a91bd05d 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Strlen.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Strlen.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -58,7 +58,7 @@ public class Strlen extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { return TValue.fromInt(values.get(0).toString().length()); } } diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Strpos.java b/src/net/sourceforge/plantuml/tim/stdlib/Strpos.java index b27796e0e..2f7c32c7c 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Strpos.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Strpos.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -58,7 +58,7 @@ public class Strpos extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final String full = values.get(0).toString(); final String searched = values.get(1).toString(); return TValue.fromInt(full.indexOf(searched)); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Substr.java b/src/net/sourceforge/plantuml/tim/stdlib/Substr.java index 7f06da48f..76e7751f9 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Substr.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Substr.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -58,7 +58,7 @@ public class Substr extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final String full = values.get(0).toString(); final int pos = values.get(1).toInt(); if (pos >= full.length()) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/VariableExists.java b/src/net/sourceforge/plantuml/tim/stdlib/VariableExists.java index 2e024b025..db3c39f1b 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/VariableExists.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/VariableExists.java @@ -39,7 +39,7 @@ import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.text.StringLocated; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TContext; import net.sourceforge.plantuml.tim.TFunctionSignature; import net.sourceforge.plantuml.tim.TMemory; @@ -58,7 +58,7 @@ public class VariableExists extends SimpleReturnFunction { @Override public TValue executeReturnFunction(TContext context, TMemory memory, StringLocated location, List values, - Map named) throws EaterExceptionLocated { + Map named) throws EaterException { final String name = values.get(0).toString(); return TValue.fromBoolean(memory.getVariable(name) != null); } diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index fd32fba24..61bcf7971 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -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.2024.4beta4"; + private static final String version = "1.2024.4beta5"; public static String versionString() { return version; diff --git a/test/net/sourceforge/plantuml/tim/TimTestUtils.java b/test/net/sourceforge/plantuml/tim/TimTestUtils.java index 724e227be..c71b7d8a3 100644 --- a/test/net/sourceforge/plantuml/tim/TimTestUtils.java +++ b/test/net/sourceforge/plantuml/tim/TimTestUtils.java @@ -14,27 +14,27 @@ import net.sourceforge.plantuml.json.JsonValue; public class TimTestUtils { // Tfunc: () -> (String) - public static void assertTimExpectedOutput(TFunction func, String expected) throws EaterExceptionLocated { + public static void assertTimExpectedOutput(TFunction func, String expected) throws EaterException { TValue tValue = func.executeReturnFunction(null, null, null, null, null); assertEquals(expected, tValue.toString()); } // Tfunc: (Integer) -> (String) - public static void assertTimExpectedOutputFromInput(TFunction func, Integer input, String expected) throws EaterExceptionLocated { + public static void assertTimExpectedOutputFromInput(TFunction func, Integer input, String expected) throws EaterException { List values = Collections.singletonList(TValue.fromInt(input)); TValue tValue = func.executeReturnFunction(null, null, null, values, null); assertEquals(expected, tValue.toString()); } // Tfunc: (String) -> (String) - public static void assertTimExpectedOutputFromInput(TFunction func, String input, String expected) throws EaterExceptionLocated { + public static void assertTimExpectedOutputFromInput(TFunction func, String input, String expected) throws EaterException { List values = Collections.singletonList(TValue.fromString(input)); TValue tValue = func.executeReturnFunction(null, null, null, values, null); assertEquals(expected, tValue.toString()); } // Tfunc: (JsonValue) -> (String) - public static void assertTimExpectedOutputFromInput(TFunction func, JsonValue input, String expected) throws EaterExceptionLocated { + public static void assertTimExpectedOutputFromInput(TFunction func, JsonValue input, String expected) throws EaterException { List values = Collections.singletonList(TValue.fromJson(input)); TValue tValue = func.executeReturnFunction(null, null, null, values, null); assertEquals(expected, tValue.toString()); diff --git a/test/net/sourceforge/plantuml/tim/stdlib/AlwaysFalseTest.java b/test/net/sourceforge/plantuml/tim/stdlib/AlwaysFalseTest.java index 595781c47..1ff9e68ff 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/AlwaysFalseTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/AlwaysFalseTest.java @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TFunction; /** @@ -22,7 +22,7 @@ class AlwaysFalseTest { final String cutName = "AlwaysFalse"; @Test - void Test_without_Param() throws EaterExceptionLocated { + void Test_without_Param() throws EaterException { assertTimExpectedOutput(cut, "0"); } @@ -32,7 +32,7 @@ class AlwaysFalseTest { " 1 , 0 ", " 'a' , 0 ", }) - void Test_with_String(String input, String expected) throws EaterExceptionLocated { + void Test_with_String(String input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -42,7 +42,7 @@ class AlwaysFalseTest { " 1 , 0 ", " 123 , 0 ", }) - void Test_with_Integer(Integer input, String expected) throws EaterExceptionLocated { + void Test_with_Integer(Integer input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/AlwaysTrueTest.java b/test/net/sourceforge/plantuml/tim/stdlib/AlwaysTrueTest.java index cb9de4910..d1e910b84 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/AlwaysTrueTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/AlwaysTrueTest.java @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TFunction; /** @@ -22,7 +22,7 @@ class AlwaysTrueTest { final String cutName = "AlwaysTrue"; @Test - void Test_without_Param() throws EaterExceptionLocated { + void Test_without_Param() throws EaterException { assertTimExpectedOutput(cut, "1"); } @@ -32,7 +32,7 @@ class AlwaysTrueTest { " 1 , 1 ", " 'a' , 1 ", }) - void Test_with_String(String input, String expected) throws EaterExceptionLocated { + void Test_with_String(String input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -42,7 +42,7 @@ class AlwaysTrueTest { " 1 , 1 ", " 123 , 1 ", }) - void Test_with_Integer(Integer input, String expected) throws EaterExceptionLocated { + void Test_with_Integer(Integer input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/ChrTest.java b/test/net/sourceforge/plantuml/tim/stdlib/ChrTest.java index 0294507fc..58cba9f04 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/ChrTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/ChrTest.java @@ -7,7 +7,7 @@ import org.junit.jupiter.api.IndicativeSentencesGeneration; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TFunction; /** @@ -22,7 +22,6 @@ class ChrTest { * Tests chr according to a list of input / expected output * * @throws EaterException should not - * @throws EaterExceptionLocated should not */ @ParameterizedTest(name = "[{index}] " + cutName + "({0}) = ''{1}''") @CsvSource(nullValues = "null", value = { @@ -37,7 +36,7 @@ class ChrTest { " 128512 , 😀 ", " 128512 , \uD83D\uDE00 ", }) - void Test_with_Integer(Integer input, String expected) throws EaterExceptionLocated { + void Test_with_Integer(Integer input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } } \ No newline at end of file diff --git a/test/net/sourceforge/plantuml/tim/stdlib/Dec2hexTest.java b/test/net/sourceforge/plantuml/tim/stdlib/Dec2hexTest.java index 1603adbe6..ff05ebff7 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/Dec2hexTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/Dec2hexTest.java @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TFunction; /** @@ -22,7 +22,7 @@ class Dec2hexTest { final String cutName = "Dec2hex"; @Test - void Test_without_Param() throws EaterExceptionLocated { + void Test_without_Param() throws EaterException { assertTimExpectedOutput(cut, ""); } @@ -36,7 +36,7 @@ class Dec2hexTest { " 255 , 0 ", " 65535 , 0 ", }) - void Test_with_String(String input, String expected) throws EaterExceptionLocated { + void Test_with_String(String input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -50,7 +50,7 @@ class Dec2hexTest { " 255 , ff ", " 65535 , ffff ", }) - void Test_with_Integer(Integer input, String expected) throws EaterExceptionLocated { + void Test_with_Integer(Integer input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/FeatureTest.java b/test/net/sourceforge/plantuml/tim/stdlib/FeatureTest.java index f8a8603aa..d5ea79e3f 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/FeatureTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/FeatureTest.java @@ -12,7 +12,7 @@ import org.junit.jupiter.params.converter.ConvertWith; import org.junit.jupiter.params.provider.CsvSource; import net.sourceforge.plantuml.json.JsonValue; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TFunction; import test.utils.JunitUtils.StringJsonConverter; @@ -27,7 +27,7 @@ class FeatureTest { @Disabled @Test - void Test_without_Param() throws EaterExceptionLocated { + void Test_without_Param() throws EaterException { assertTimExpectedOutput(cut, "0"); } @@ -42,7 +42,7 @@ class FeatureTest { " abc , 0", }) - void Test_with_String(String input, String expected) throws EaterExceptionLocated { + void Test_with_String(String input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -51,7 +51,7 @@ class FeatureTest { " 0, 0", " 10, 0", }) - void Test_with_Integer(Integer input, String expected) throws EaterExceptionLocated { + void Test_with_Integer(Integer input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -61,7 +61,7 @@ class FeatureTest { " \"theme\", 1", " 0, 0", }) - void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterExceptionLocated { + void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/GetAllStdlibTest.java b/test/net/sourceforge/plantuml/tim/stdlib/GetAllStdlibTest.java index 16e3f8eed..e22ebbc20 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/GetAllStdlibTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/GetAllStdlibTest.java @@ -10,7 +10,7 @@ import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; import org.junit.jupiter.api.IndicativeSentencesGeneration; import org.junit.jupiter.api.Test; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TFunction; import net.sourceforge.plantuml.tim.expression.TValue; @@ -24,14 +24,14 @@ class GetAllStdlibTest { final String cutName = "GetAllStdlib"; @Test - void Test_without_Param() throws EaterExceptionLocated { + void Test_without_Param() throws EaterException { final List empty = new ArrayList<>(); final TValue tValue = cut.executeReturnFunction(null, null, null, empty, null); assertThat(tValue.toString()).contains("archimate", "aws", "tupadr3"); } @Test - void Test_with_one_argument() throws EaterExceptionLocated { + void Test_with_one_argument() throws EaterException { final TValue tValue = cut.executeReturnFunction(null, null, null, Arrays.asList(TValue.fromInt(0)), null); assertThat(tValue.toString()).contains("archimate", "https://github.com/plantuml-stdlib/Archimate-PlantUML"); } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/GetAllThemeTest.java b/test/net/sourceforge/plantuml/tim/stdlib/GetAllThemeTest.java index 9201c2d99..0c6d65ae8 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/GetAllThemeTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/GetAllThemeTest.java @@ -9,7 +9,7 @@ import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; import org.junit.jupiter.api.IndicativeSentencesGeneration; import org.junit.jupiter.api.Test; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TFunction; import net.sourceforge.plantuml.tim.expression.TValue; @@ -23,7 +23,7 @@ class GetAllThemeTest { final String cutName = "GetAllTheme"; @Test - void Test_without_Param() throws EaterExceptionLocated { + void Test_without_Param() throws EaterException { final List empty = new ArrayList<>(); final TValue tValue = cut.executeReturnFunction(null, null, null, empty, null); assertThat(tValue.toString()).contains("_none_", "amiga", "vibrant"); diff --git a/test/net/sourceforge/plantuml/tim/stdlib/GetJsonKeyTest.java b/test/net/sourceforge/plantuml/tim/stdlib/GetJsonKeyTest.java index 2f19ed62e..269a3aaf3 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/GetJsonKeyTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/GetJsonKeyTest.java @@ -12,7 +12,7 @@ import org.junit.jupiter.params.converter.ConvertWith; import org.junit.jupiter.params.provider.CsvSource; import net.sourceforge.plantuml.json.JsonValue; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TFunction; import test.utils.JunitUtils.StringJsonConverter; @@ -27,7 +27,7 @@ class GetJsonKeyTest { @Disabled @Test - void Test_without_Param() throws EaterExceptionLocated { + void Test_without_Param() throws EaterException { assertTimExpectedOutput(cut, "0"); } @@ -38,7 +38,7 @@ class GetJsonKeyTest { " a, Not JSON data", " -1, Not JSON data", }) - void Test_with_String(String input, String expected) throws EaterExceptionLocated { + void Test_with_String(String input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -48,7 +48,7 @@ class GetJsonKeyTest { " 0, Not JSON data", " -1, Not JSON data", }) - void Test_with_Integer(Integer input, String expected) throws EaterExceptionLocated { + void Test_with_Integer(Integer input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -66,7 +66,7 @@ class GetJsonKeyTest { // - https://json-schema.org/understanding-json-schema/reference/array.html " '[3, \"different\", { \"types\" : \"of values\" }]', [\"types\"]", }) - void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterExceptionLocated { + void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/GetJsonTypeTest.java b/test/net/sourceforge/plantuml/tim/stdlib/GetJsonTypeTest.java index 80f5b90eb..6422fd8de 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/GetJsonTypeTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/GetJsonTypeTest.java @@ -12,7 +12,7 @@ import org.junit.jupiter.params.converter.ConvertWith; import org.junit.jupiter.params.provider.CsvSource; import net.sourceforge.plantuml.json.JsonValue; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TFunction; import test.utils.JunitUtils.StringJsonConverter; @@ -27,7 +27,7 @@ class GetJsonTypeTest { @Disabled @Test - void Test_without_Param() throws EaterExceptionLocated { + void Test_without_Param() throws EaterException { assertTimExpectedOutput(cut, "0"); } @@ -37,7 +37,7 @@ class GetJsonTypeTest { " a, string", " -1, string", }) - void Test_with_String(String input, String expected) throws EaterExceptionLocated { + void Test_with_String(String input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -46,7 +46,7 @@ class GetJsonTypeTest { " 0, number", " -1, number", }) - void Test_with_Integer(Integer input, String expected) throws EaterExceptionLocated { + void Test_with_Integer(Integer input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -66,7 +66,7 @@ class GetJsonTypeTest { " null , json ", " '{\"a\":[1, 2], \"b\":\"abc\", \"b\":true}' , object", }) - void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterExceptionLocated { + void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/GetenvTest.java b/test/net/sourceforge/plantuml/tim/stdlib/GetenvTest.java index 4bbfc443c..883fa0090 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/GetenvTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/GetenvTest.java @@ -8,7 +8,7 @@ import java.util.List; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.expression.TValue; /** @@ -20,7 +20,6 @@ class GetenvTest { * Tests getenv should not publish plantuml.security.* environment variables. * * @throws EaterException should not - * @throws EaterExceptionLocated should not */ @ParameterizedTest @ValueSource(strings = { @@ -28,7 +27,7 @@ class GetenvTest { "plantuml.SECURITY.blabla", "plantuml.security.credentials.path", }) - void executeReturnFunctionSecurityTest(String name) throws EaterExceptionLocated { + void executeReturnFunctionSecurityTest(String name) throws EaterException { System.setProperty("plantuml.security.blabla", "example"); Getenv cut = new Getenv(); @@ -41,14 +40,13 @@ class GetenvTest { * Tests getenv still returns 'good' variables. * * @throws EaterException should not - * @throws EaterExceptionLocated should not */ @ParameterizedTest @ValueSource(strings = { "path.separator", "line.separator", }) - void executeReturnFunctionTest(String name) throws EaterExceptionLocated { + void executeReturnFunctionTest(String name) throws EaterException { Getenv cut = new Getenv(); List values = Collections.singletonList(TValue.fromString(name)); diff --git a/test/net/sourceforge/plantuml/tim/stdlib/Hex2decTest.java b/test/net/sourceforge/plantuml/tim/stdlib/Hex2decTest.java index e11e52469..08a33c4c7 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/Hex2decTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/Hex2decTest.java @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TFunction; /** @@ -22,7 +22,7 @@ class Hex2decTest { final String cutName = "Hex2dec"; @Test - void Test_without_Param() throws EaterExceptionLocated { + void Test_without_Param() throws EaterException { assertTimExpectedOutput(cut, "0"); } @@ -42,7 +42,7 @@ class Hex2decTest { " -1 , -1 ", " -a , -10 ", }) - void Test_with_String(String input, String expected) throws EaterExceptionLocated { + void Test_with_String(String input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -53,7 +53,7 @@ class Hex2decTest { " 10 , 16 ", " -1 , -1 ", }) - void Test_with_Integer(Integer input, String expected) throws EaterExceptionLocated { + void Test_with_Integer(Integer input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/LowerTest.java b/test/net/sourceforge/plantuml/tim/stdlib/LowerTest.java index 57910d42f..1488eb641 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/LowerTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/LowerTest.java @@ -12,7 +12,7 @@ import org.junit.jupiter.params.converter.ConvertWith; import org.junit.jupiter.params.provider.CsvSource; import net.sourceforge.plantuml.json.JsonValue; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TFunction; import test.utils.JunitUtils.StringJsonConverter; @@ -28,7 +28,7 @@ class LowerTest { // TODO: Manage Lower function without param. (today: we observe `Function not found %lower`) @Disabled @Test - void Test_without_Param() throws EaterExceptionLocated { + void Test_without_Param() throws EaterException { assertTimExpectedOutput(cut, ""); } @@ -43,7 +43,7 @@ class LowerTest { " É , é ", " 😀 , 😀 ", }) - void Test_with_String(String input, String expected) throws EaterExceptionLocated { + void Test_with_String(String input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -54,7 +54,7 @@ class LowerTest { " 10 , 10 ", " -1 , -1 ", }) - void Test_with_Integer(Integer input, String expected) throws EaterExceptionLocated { + void Test_with_Integer(Integer input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -69,7 +69,7 @@ class LowerTest { // TODO: See JSON management of TRUE/FALSE //" TRUE , true ", }) - void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterExceptionLocated { + void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/OrdTest.java b/test/net/sourceforge/plantuml/tim/stdlib/OrdTest.java index 9ae869b52..ae2cfcd14 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/OrdTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/OrdTest.java @@ -7,7 +7,7 @@ import org.junit.jupiter.api.IndicativeSentencesGeneration; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TFunction; /** @@ -22,7 +22,6 @@ class OrdTest { * Tests ord according to a list of input / expected output * * @throws EaterException should not - * @throws EaterExceptionLocated should not */ @ParameterizedTest(name = "[{index}] " + cutName + "(''{0}'') = {1}") @CsvSource(nullValues = "null", value = { @@ -40,7 +39,7 @@ class OrdTest { " 😀 , 128512 ", " \uD83D\uDE00 , 128512 ", }) - void Test_with_String(String input, String expected) throws EaterExceptionLocated { + void Test_with_String(String input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } } \ No newline at end of file diff --git a/test/net/sourceforge/plantuml/tim/stdlib/RandomFuntionTest.java b/test/net/sourceforge/plantuml/tim/stdlib/RandomFuntionTest.java index 226ddde52..f7b61cfdf 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/RandomFuntionTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/RandomFuntionTest.java @@ -10,7 +10,7 @@ import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; import org.junit.jupiter.api.IndicativeSentencesGeneration; import org.junit.jupiter.api.RepeatedTest; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TFunction; import net.sourceforge.plantuml.tim.expression.TValue; @@ -25,27 +25,27 @@ class RandomFunctionTest { final String repetitionLabel = "[{currentRepetition}/{totalRepetitions}] "; @RepeatedTest(value = 10, name = repetitionLabel + cutName + "()") - void test_with_no_argument() throws EaterExceptionLocated { + void test_with_no_argument() throws EaterException { final List empty = new ArrayList<>(); final TValue tValue = cut.executeReturnFunction(null, null, null, empty, null); assertThat(tValue.toInt()).isIn(0, 1); } @RepeatedTest(value = 10, name = repetitionLabel + cutName + "(7)") - void test_with_one_argument() throws EaterExceptionLocated { + void test_with_one_argument() throws EaterException { final TValue tValue = cut.executeReturnFunction(null, null, null, Arrays.asList(TValue.fromInt(7)), null); assertThat(tValue.toInt()).isBetween(0, 7 - 1); } @RepeatedTest(value = 10, name = repetitionLabel + cutName + "(0, 7)") - void test_with_two_argument_first_zero() throws EaterExceptionLocated { + void test_with_two_argument_first_zero() throws EaterException { final TValue tValue = cut.executeReturnFunction(null, null, null, Arrays.asList(TValue.fromInt(0), TValue.fromInt(7)), null); assertThat(tValue.toInt()).isBetween(0, 7 - 1); } @RepeatedTest(value = 10, name = repetitionLabel + cutName + "(3, 7)") - void test_with_two_argument() throws EaterExceptionLocated { + void test_with_two_argument() throws EaterException { final TValue tValue = cut.executeReturnFunction(null, null, null, Arrays.asList(TValue.fromInt(3), TValue.fromInt(7)), null); assertThat(tValue.toInt()).isBetween(3, 7 - 1); diff --git a/test/net/sourceforge/plantuml/tim/stdlib/SizeTest.java b/test/net/sourceforge/plantuml/tim/stdlib/SizeTest.java index a8c3c5218..1763537ba 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/SizeTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/SizeTest.java @@ -12,7 +12,7 @@ import org.junit.jupiter.params.converter.ConvertWith; import org.junit.jupiter.params.provider.CsvSource; import net.sourceforge.plantuml.json.JsonValue; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TFunction; import test.utils.JunitUtils.StringJsonConverter; @@ -28,7 +28,7 @@ class SizeTest { // TODO: Manage `Size` function without param. (today: we observe `Function not found`) @Disabled @Test - void Test_without_Param() throws EaterExceptionLocated { + void Test_without_Param() throws EaterException { assertTimExpectedOutput(cut, "0"); } @@ -47,7 +47,7 @@ class SizeTest { // " 😀 , 1 ", // " \uD83D\uDE00 , 1", }) - void Test_with_String(String input, String expected) throws EaterExceptionLocated { + void Test_with_String(String input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -57,7 +57,7 @@ class SizeTest { " 1 , 0 ", " 10 , 0 ", }) - void Test_with_Integer(Integer input, String expected) throws EaterExceptionLocated { + void Test_with_Integer(Integer input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -74,7 +74,7 @@ class SizeTest { " 1, 0 ", " null, 0 ", }) - void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterExceptionLocated { + void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/UpperTest.java b/test/net/sourceforge/plantuml/tim/stdlib/UpperTest.java index 8a78cbb96..5db56f0e9 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/UpperTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/UpperTest.java @@ -12,7 +12,7 @@ import org.junit.jupiter.params.converter.ConvertWith; import org.junit.jupiter.params.provider.CsvSource; import net.sourceforge.plantuml.json.JsonValue; -import net.sourceforge.plantuml.tim.EaterExceptionLocated; +import net.sourceforge.plantuml.tim.EaterException; import net.sourceforge.plantuml.tim.TFunction; import test.utils.JunitUtils.StringJsonConverter; @@ -28,7 +28,7 @@ class UpperTest { // TODO: Manage Upper function without param. (today: we observe `Function not found %upper`) @Disabled @Test - void Test_without_Param() throws EaterExceptionLocated { + void Test_without_Param() throws EaterException { assertTimExpectedOutput(cut, ""); } @@ -43,7 +43,7 @@ class UpperTest { " é , É ", " 😀 , 😀 ", }) - void Test_with_String(String input, String expected) throws EaterExceptionLocated { + void Test_with_String(String input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -54,7 +54,7 @@ class UpperTest { " 10 , 10 ", " -1 , -1 ", }) - void Test_with_Integer(Integer input, String expected) throws EaterExceptionLocated { + void Test_with_Integer(Integer input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } @@ -65,7 +65,7 @@ class UpperTest { " '{\"a\":[1, 2], \"b\":\"abc\", \"b\":true}' , '{\"A\":[1,2],\"B\":\"ABC\",\"B\":TRUE}'", " true , TRUE ", }) - void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterExceptionLocated { + void Test_with_Json(@ConvertWith(StringJsonConverter.class) JsonValue input, String expected) throws EaterException { assertTimExpectedOutputFromInput(cut, input, expected); } } From f385bc0dbaff0b8e28c05c8709f6f7c943ee67ec Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Sat, 24 Feb 2024 12:03:21 +0100 Subject: [PATCH 90/95] chore: use Collections.emptyList() instead of new ArrayList() --- .../net/sourceforge/plantuml/tim/stdlib/GetAllStdlibTest.java | 4 ++-- test/net/sourceforge/plantuml/tim/stdlib/GetAllThemeTest.java | 3 ++- .../sourceforge/plantuml/tim/stdlib/RandomFuntionTest.java | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/test/net/sourceforge/plantuml/tim/stdlib/GetAllStdlibTest.java b/test/net/sourceforge/plantuml/tim/stdlib/GetAllStdlibTest.java index e22ebbc20..ab8c23fd3 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/GetAllStdlibTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/GetAllStdlibTest.java @@ -2,8 +2,8 @@ package net.sourceforge.plantuml.tim.stdlib; import static org.assertj.core.api.Assertions.assertThat; -import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.List; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; @@ -25,7 +25,7 @@ class GetAllStdlibTest { @Test void Test_without_Param() throws EaterException { - final List empty = new ArrayList<>(); + final List empty = Collections.emptyList(); final TValue tValue = cut.executeReturnFunction(null, null, null, empty, null); assertThat(tValue.toString()).contains("archimate", "aws", "tupadr3"); } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/GetAllThemeTest.java b/test/net/sourceforge/plantuml/tim/stdlib/GetAllThemeTest.java index 0c6d65ae8..1f79076b4 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/GetAllThemeTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/GetAllThemeTest.java @@ -3,6 +3,7 @@ package net.sourceforge.plantuml.tim.stdlib; import static org.assertj.core.api.Assertions.assertThat; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; @@ -24,7 +25,7 @@ class GetAllThemeTest { @Test void Test_without_Param() throws EaterException { - final List empty = new ArrayList<>(); + final List empty = Collections.emptyList(); final TValue tValue = cut.executeReturnFunction(null, null, null, empty, null); assertThat(tValue.toString()).contains("_none_", "amiga", "vibrant"); } diff --git a/test/net/sourceforge/plantuml/tim/stdlib/RandomFuntionTest.java b/test/net/sourceforge/plantuml/tim/stdlib/RandomFuntionTest.java index f7b61cfdf..fd8033793 100644 --- a/test/net/sourceforge/plantuml/tim/stdlib/RandomFuntionTest.java +++ b/test/net/sourceforge/plantuml/tim/stdlib/RandomFuntionTest.java @@ -4,6 +4,7 @@ import static org.assertj.core.api.Assertions.assertThat; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.List; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; @@ -26,7 +27,7 @@ class RandomFunctionTest { @RepeatedTest(value = 10, name = repetitionLabel + cutName + "()") void test_with_no_argument() throws EaterException { - final List empty = new ArrayList<>(); + final List empty = Collections.emptyList(); final TValue tValue = cut.executeReturnFunction(null, null, null, empty, null); assertThat(tValue.toInt()).isIn(0, 1); } From 6c945e2508936d710789e4d6071ffb6122b953bc Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Mon, 26 Feb 2024 22:50:31 +0100 Subject: [PATCH 91/95] fix: Activity Diagram: Style of multiline Box https://github.com/plantuml/plantuml/issues/1697 --- .../activitydiagram3/command/CommandActivityLong3.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivityLong3.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivityLong3.java index 397f6f977..530e1f43e 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivityLong3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivityLong3.java @@ -49,6 +49,7 @@ import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; +import net.sourceforge.plantuml.stereo.Stereotype; import net.sourceforge.plantuml.utils.BlocLines; public class CommandActivityLong3 extends CommandMultilines3 { @@ -84,10 +85,16 @@ public class CommandActivityLong3 extends CommandMultilines3 { final Colors colors = color().getColor(line0, diagram.getSkinParam().getIHtmlColorSet()); final RegexResult lineLast = getPatternEnd2().matcher(lines.getLast().getString()); + final String end = lineLast.get("END", 0); + Stereotype stereotype = null; + String stereo = lineLast.get("END", 1); + if (stereo != null) + stereotype = Stereotype.build(stereo); + final BoxStyle style = BoxStyle.fromString(end); lines = lines.removeStartingAndEnding(line0.get("DATA", 0), end.length()); - return diagram.addActivity(lines.toDisplay(), style, null, colors, null); + return diagram.addActivity(lines.toDisplay(), style, null, colors, stereotype); } } From 2a49ef06da44f8465dfa59cea920347e076f14ea Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Tue, 27 Feb 2024 19:42:44 +0100 Subject: [PATCH 92/95] fix negative values causing syntax error in robust "has" list https://forum.plantuml.net/18701/negative-values-causing-syntax-error-in-robust-has-list?show=18705 --- .../timingdiagram/command/CommandDefineStateShort.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/net/sourceforge/plantuml/timingdiagram/command/CommandDefineStateShort.java b/src/net/sourceforge/plantuml/timingdiagram/command/CommandDefineStateShort.java index 671074038..c18d064d3 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/command/CommandDefineStateShort.java +++ b/src/net/sourceforge/plantuml/timingdiagram/command/CommandDefineStateShort.java @@ -59,8 +59,9 @@ public class CommandDefineStateShort extends SingleLineCommand2 { RegexLeaf.spaceOneOrMore(), // new RegexLeaf("has"), // RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("STATE", "([%pLN_.@]+)"), // - new RegexLeaf("STATES", "((,([%pLN_.@]+))*)"), RegexLeaf.end()); + new RegexLeaf("STATE", "([-%pLN_.@]+)"), // + new RegexLeaf("STATES", "((,([-%pLN_.@]+))*)"), // + RegexLeaf.end()); } @Override From a0be1ed677c45b3f21ba7aebd8173789df1f6bd4 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Tue, 27 Feb 2024 20:39:02 +0100 Subject: [PATCH 93/95] feat: timing set background color of concise https://forum.plantuml.net/18682/timing-set-background-color-of-concise https://forum.plantuml.net/18676/supporting-markdown-syntax --- gradle.properties | 2 +- .../command/CommandCreateClassMultilines.java | 10 ++++++++-- .../mindmap/CommandMindMapDirection.java | 6 +++--- .../mindmap/CommandMindMapOrgmode.java | 2 +- .../CommandMindMapOrgmodeMultiline.java | 2 +- .../plantuml/timingdiagram/Player.java | 9 ++++++++- .../plantuml/timingdiagram/PlayerAnalog.java | 2 +- .../plantuml/timingdiagram/PlayerBinary.java | 2 +- .../plantuml/timingdiagram/PlayerClock.java | 2 +- .../timingdiagram/PlayerRobustConcise.java | 6 ++++-- .../plantuml/timingdiagram/TimingDiagram.java | 16 ++++++++++++++-- .../command/CommandRobustConcise.java | 19 +++++++++++++++++-- .../sourceforge/plantuml/version/Version.java | 2 +- 13 files changed, 61 insertions(+), 19 deletions(-) diff --git a/gradle.properties b/gradle.properties index ddbe9ba1d..4b0a74673 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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.2024.4beta5 +version = 1.2024.4beta6 org.gradle.workers.max = 3 \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClassMultilines.java b/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClassMultilines.java index dc1719990..ac36c3685 100644 --- a/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClassMultilines.java +++ b/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClassMultilines.java @@ -127,10 +127,16 @@ public class CommandCreateClassMultilines extends CommandMultilines2"))) // + )), // new RegexOptional(new RegexConcat(RegexLeaf.spaceOneOrMore(), new RegexLeaf("IMPLEMENTS", - "(implements)[%s]+(" + CommandCreateClassMultilines.CODES + "|[%g]([^%g]+)[%g])"))), // + "(implements)[%s]+(" + CommandCreateClassMultilines.CODES + "|[%g]([^%g]+)[%g])"), + new RegexOptional(new RegexConcat(RegexLeaf.spaceZeroOrMore(), + new RegexLeaf("\\<(" + GenericRegexProducer.PATTERN + ")\\>"))) // + )), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("\\{"), // RegexLeaf.spaceZeroOrMore(), // diff --git a/src/net/sourceforge/plantuml/mindmap/CommandMindMapDirection.java b/src/net/sourceforge/plantuml/mindmap/CommandMindMapDirection.java index 27f658495..d23e8f8ea 100644 --- a/src/net/sourceforge/plantuml/mindmap/CommandMindMapDirection.java +++ b/src/net/sourceforge/plantuml/mindmap/CommandMindMapDirection.java @@ -53,13 +53,13 @@ public class CommandMindMapDirection extends SingleLineCommand2 static IRegex getRegexConcat() { return RegexConcat.build(CommandMindMapDirection.class.getName(), RegexLeaf.start(), // - new RegexLeaf("[^*]*"), // + new RegexLeaf("[^*#]*"), // new RegexLeaf("\\b"), // new RegexLeaf("DIRECTION", "(left|right|top|bottom)"), // new RegexLeaf("\\b"), // - new RegexLeaf("[^*]*"), // + new RegexLeaf("[^*#]*"), // new RegexLeaf("(side|direction)"), // - new RegexLeaf("[^*]*"), // + new RegexLeaf("[^*#]*"), // RegexLeaf.end()); } diff --git a/src/net/sourceforge/plantuml/mindmap/CommandMindMapOrgmode.java b/src/net/sourceforge/plantuml/mindmap/CommandMindMapOrgmode.java index 8c53a6853..e46204474 100644 --- a/src/net/sourceforge/plantuml/mindmap/CommandMindMapOrgmode.java +++ b/src/net/sourceforge/plantuml/mindmap/CommandMindMapOrgmode.java @@ -55,7 +55,7 @@ public class CommandMindMapOrgmode extends SingleLineCommand2 { static IRegex getRegexConcat() { return RegexConcat.build(CommandMindMapOrgmode.class.getName(), RegexLeaf.start(), // - new RegexLeaf("TYPE", "([ \t]*\\*+)"), // + new RegexLeaf("TYPE", "([ \t]*[*#]+)"), // new RegexOptional(new RegexLeaf("BACKCOLOR", "\\[(#\\w+)\\]")), // new RegexLeaf("SHAPE", "(_)?"), // RegexLeaf.spaceOneOrMore(), // diff --git a/src/net/sourceforge/plantuml/mindmap/CommandMindMapOrgmodeMultiline.java b/src/net/sourceforge/plantuml/mindmap/CommandMindMapOrgmodeMultiline.java index 79fd1936a..7d03529bc 100644 --- a/src/net/sourceforge/plantuml/mindmap/CommandMindMapOrgmodeMultiline.java +++ b/src/net/sourceforge/plantuml/mindmap/CommandMindMapOrgmodeMultiline.java @@ -60,7 +60,7 @@ public class CommandMindMapOrgmodeMultiline extends CommandMultilines2 notes = new ArrayList<>(); public PlayerBinary(String code, ISkinParam skinParam, TimingRuler ruler, boolean compact, Stereotype stereotype) { - super(code, skinParam, ruler, compact, stereotype); + super(code, skinParam, ruler, compact, stereotype, null); this.suggestedHeight = 30; } diff --git a/src/net/sourceforge/plantuml/timingdiagram/PlayerClock.java b/src/net/sourceforge/plantuml/timingdiagram/PlayerClock.java index ac5a31880..134e67620 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/PlayerClock.java +++ b/src/net/sourceforge/plantuml/timingdiagram/PlayerClock.java @@ -65,7 +65,7 @@ public class PlayerClock extends Player { public PlayerClock(String title, ISkinParam skinParam, TimingRuler ruler, int period, int pulse, int offset, boolean compact) { - super(title, skinParam, ruler, compact, null); + super(title, skinParam, ruler, compact, null, null); this.displayTitle = title.length() > 0; this.period = period; this.pulse = pulse; diff --git a/src/net/sourceforge/plantuml/timingdiagram/PlayerRobustConcise.java b/src/net/sourceforge/plantuml/timingdiagram/PlayerRobustConcise.java index 194e9dfe3..3f97badd1 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/PlayerRobustConcise.java +++ b/src/net/sourceforge/plantuml/timingdiagram/PlayerRobustConcise.java @@ -43,6 +43,7 @@ import java.util.TreeSet; import net.sourceforge.plantuml.klimt.UTranslate; import net.sourceforge.plantuml.klimt.color.Colors; +import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.creole.Display; import net.sourceforge.plantuml.klimt.drawing.UGraphic; import net.sourceforge.plantuml.klimt.font.StringBounder; @@ -50,6 +51,7 @@ import net.sourceforge.plantuml.klimt.geom.XDimension2D; import net.sourceforge.plantuml.klimt.shape.AbstractTextBlock; import net.sourceforge.plantuml.klimt.shape.TextBlock; import net.sourceforge.plantuml.klimt.shape.UDrawable; +import net.sourceforge.plantuml.klimt.shape.URectangle; import net.sourceforge.plantuml.skin.ArrowConfiguration; import net.sourceforge.plantuml.stereo.Stereotype; import net.sourceforge.plantuml.style.ISkinParam; @@ -77,8 +79,8 @@ public final class PlayerRobustConcise extends Player { private Colors initialColors; public PlayerRobustConcise(TimingStyle type, String full, ISkinParam skinParam, TimingRuler ruler, boolean compact, - Stereotype stereotype) { - super(full, skinParam, ruler, compact, stereotype); + Stereotype stereotype, HColor generalBackgroundColor) { + super(full, skinParam, ruler, compact, stereotype, generalBackgroundColor); this.type = type; this.suggestedHeight = 0; } diff --git a/src/net/sourceforge/plantuml/timingdiagram/TimingDiagram.java b/src/net/sourceforge/plantuml/timingdiagram/TimingDiagram.java index 03d10d127..4edc5cd04 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/TimingDiagram.java +++ b/src/net/sourceforge/plantuml/timingdiagram/TimingDiagram.java @@ -55,6 +55,7 @@ import net.sourceforge.plantuml.klimt.UStroke; import net.sourceforge.plantuml.klimt.UTranslate; import net.sourceforge.plantuml.klimt.color.Colors; import net.sourceforge.plantuml.klimt.color.HColor; +import net.sourceforge.plantuml.klimt.color.HColors; import net.sourceforge.plantuml.klimt.creole.Display; import net.sourceforge.plantuml.klimt.drawing.UGraphic; import net.sourceforge.plantuml.klimt.font.StringBounder; @@ -62,6 +63,7 @@ import net.sourceforge.plantuml.klimt.geom.XDimension2D; import net.sourceforge.plantuml.klimt.shape.AbstractTextBlock; import net.sourceforge.plantuml.klimt.shape.TextBlock; import net.sourceforge.plantuml.klimt.shape.ULine; +import net.sourceforge.plantuml.klimt.shape.URectangle; import net.sourceforge.plantuml.skin.UmlDiagramType; import net.sourceforge.plantuml.stereo.Stereotype; import net.sourceforge.plantuml.style.PName; @@ -133,6 +135,15 @@ public class TimingDiagram extends UmlDiagram implements Clocks { ruler.ensureNotEmpty(); final StringBounder stringBounder = ug.getStringBounder(); final double part1MaxWidth = getPart1MaxWidth(stringBounder); + + for (Player player : players.values()) { + final UGraphic ugPlayer = ug.apply(getUTranslateForPlayer(player, stringBounder)); + final HColor generalBackgroundColor = player.getGeneralBackgroundColor(); + if (generalBackgroundColor != null) + ugPlayer.apply(generalBackgroundColor).apply(generalBackgroundColor.bg()) + .draw(URectangle.build(getWidthTotal(stringBounder), player.getFullHeight(stringBounder))); + } + final UTranslate widthPart1 = UTranslate.dx(part1MaxWidth); if (compactByDefault == false) drawBorder(ug); @@ -146,6 +157,7 @@ public class TimingDiagram extends UmlDiagram implements Clocks { for (Player player : players.values()) { final UGraphic ugPlayer = ug.apply(getUTranslateForPlayer(player, stringBounder)); final double caption = getHeightForCaptions(stringBounder); + if (first) { if (player.isCompact() == false) drawHorizontalSeparator(ugPlayer); @@ -279,9 +291,9 @@ public class TimingDiagram extends UmlDiagram implements Clocks { } public CommandExecutionResult createRobustConcise(String code, String full, TimingStyle type, boolean compact, - Stereotype stereotype) { + Stereotype stereotype, HColor backColor) { final Player player = new PlayerRobustConcise(type, full, getSkinParam(), ruler, compactByDefault || compact, - stereotype); + stereotype, backColor); players.put(code, player); lastPlayer = player; return CommandExecutionResult.ok(); diff --git a/src/net/sourceforge/plantuml/timingdiagram/command/CommandRobustConcise.java b/src/net/sourceforge/plantuml/timingdiagram/command/CommandRobustConcise.java index 51716350c..159ad26ff 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/command/CommandRobustConcise.java +++ b/src/net/sourceforge/plantuml/timingdiagram/command/CommandRobustConcise.java @@ -37,10 +37,15 @@ package net.sourceforge.plantuml.timingdiagram.command; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; +import net.sourceforge.plantuml.klimt.color.ColorParser; +import net.sourceforge.plantuml.klimt.color.ColorType; +import net.sourceforge.plantuml.klimt.color.Colors; +import net.sourceforge.plantuml.klimt.color.NoSuchColorException; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexOptional; +import net.sourceforge.plantuml.regex.RegexOr; import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.stereo.Stereotype; import net.sourceforge.plantuml.stereo.StereotypePattern; @@ -70,11 +75,18 @@ public class CommandRobustConcise extends SingleLineCommand2 { RegexLeaf.spaceOneOrMore())), // new RegexLeaf("CODE", "([%pLN_.@]+)"), // StereotypePattern.optional("STEREOTYPE2"), // + RegexLeaf.spaceZeroOrMore(), // + new RegexOr(color().getRegex()), // RegexLeaf.end()); } + private static ColorParser color() { + return ColorParser.simpleColor(ColorType.BACK); + } + @Override - final protected CommandExecutionResult executeArg(TimingDiagram diagram, LineLocation location, RegexResult arg) { + final protected CommandExecutionResult executeArg(TimingDiagram diagram, LineLocation location, RegexResult arg) + throws NoSuchColorException { final String compact = arg.get("COMPACT", 0); final String code = arg.get("CODE", 0); String full = arg.get("FULL", 0); @@ -88,7 +100,10 @@ public class CommandRobustConcise extends SingleLineCommand2 { stereotype = Stereotype.build(arg.get("STEREOTYPE2", 0)); final TimingStyle type = TimingStyle.valueOf(arg.get("TYPE", 0).toUpperCase()); - return diagram.createRobustConcise(code, full, type, compact != null, stereotype); + final Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); + + return diagram.createRobustConcise(code, full, type, compact != null, stereotype, + colors.getColor(ColorType.BACK)); } } diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index 61bcf7971..700fba39c 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -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.2024.4beta5"; + private static final String version = "1.2024.4beta6"; public static String versionString() { return version; From d85f96256ecf622a581ee663d75e6dd501808f0e Mon Sep 17 00:00:00 2001 From: BOUDJENIBA Oussama <41930319+ouss1002@users.noreply.github.com> Date: Mon, 4 Mar 2024 09:58:29 +0100 Subject: [PATCH 94/95] Prevent IndexOutOfBoundsException in equation rendering by checking non-empty 'texsymbol' strings This commit introduces a check before accessing the first character of 'texsymbol' strings in equation rendering, preventing IndexOutOfBoundsException when custom functions names are used which can lead to an empty string. This change ensures that equations custom variables names ending with standard function strings are handled gracefully without errors --- src/net/sourceforge/plantuml/math/ASCIIMathTeXImg.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net/sourceforge/plantuml/math/ASCIIMathTeXImg.java b/src/net/sourceforge/plantuml/math/ASCIIMathTeXImg.java index 6aec5694c..7a23f2667 100644 --- a/src/net/sourceforge/plantuml/math/ASCIIMathTeXImg.java +++ b/src/net/sourceforge/plantuml/math/ASCIIMathTeXImg.java @@ -602,7 +602,7 @@ public class ASCIIMathTeXImg { case CONST: str = AMremoveCharsAndBlanks(str, symbol.input.length()); String texsymbol = AMTgetTeXsymbol(symbol); - if (texsymbol.charAt(0) == '\\' || symbol.tag.equals("mo")) + if (texsymbol.isEmpty() || texsymbol.charAt(0) == '\\' || symbol.tag.equals("mo")) return new String[] { texsymbol, str }; else { return new String[] { "{" + texsymbol + "}", str }; @@ -676,7 +676,7 @@ public class ASCIIMathTeXImg { if (result[0] == null) return new String[] { "{" + AMTgetTeXsymbol(symbol) + "}", str }; if (symbol.hasFlag("func")) { // functions hack - st = "" + str.charAt(0); + st = "" + (str.isEmpty() ? "" : str.charAt(0)); if (st.equals("^") || st.equals("_") || st.equals("/") || st.equals("|") || st.equals(",") || (symbol.input.length() == 1 && symbol.input.matches("\\w") && !st.equals("("))) { return new String[] { "{" + AMTgetTeXsymbol(symbol) + "}", str }; From f82f1a9a76b138168f7ad4f8f9015a570def285d Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Sun, 10 Mar 2024 17:09:12 +0000 Subject: [PATCH 95/95] fix: math two-dimensional matrices and add test Report of https://github.com/The-Lum/ASCIIMathTeXImg/commit/6f3bb01d That fixes #1706 Regards, Th. --- src/net/sourceforge/plantuml/math/ASCIIMathTeXImg.java | 4 ++-- test/net/sourceforge/plantuml/math/MathTest.java | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/net/sourceforge/plantuml/math/ASCIIMathTeXImg.java b/src/net/sourceforge/plantuml/math/ASCIIMathTeXImg.java index 7a23f2667..d4d32969b 100644 --- a/src/net/sourceforge/plantuml/math/ASCIIMathTeXImg.java +++ b/src/net/sourceforge/plantuml/math/ASCIIMathTeXImg.java @@ -905,8 +905,8 @@ public class ASCIIMathTeXImg { subarr = new ArrayList(Arrays.asList( newFrag.substring(pos.get(i) + 8, subpos.get(pos.get(i)).get(1)))); for (int j = 2; j < subpos.get(pos.get(i)).size(); j++) { - subarr.add(newFrag.substring(subpos.get(i).get(j - 1) + 1, - subpos.get(i).get(j))); + subarr.add(newFrag.substring(subpos.get(pos.get(i)).get(j - 1) + 1, + subpos.get(pos.get(i)).get(j))); } subarr.add(newFrag.substring( subpos.get(pos.get(i)).get(subpos.get(pos.get(i)).size() - 1) + 1, diff --git a/test/net/sourceforge/plantuml/math/MathTest.java b/test/net/sourceforge/plantuml/math/MathTest.java index d649d9c77..391ff41d6 100644 --- a/test/net/sourceforge/plantuml/math/MathTest.java +++ b/test/net/sourceforge/plantuml/math/MathTest.java @@ -17,6 +17,9 @@ class MathTest { " '[[a,b],[c,d]]', {\\left[\\begin{matrix}{a}&{b}\\\\{c}&{d}\\end{matrix}\\right]} ", " color(red)(x), {\\textcolor{red}{{x}}} ", " color(red)(t)=color(blue)(x), {\\textcolor{red}{{t}}}={\\textcolor{blue}{{x}}} ", + " f, {f} ", + " f_g, {{f}_{{g}}} ", + " '[[1,2,3],[4,5,6]]', {\\left[\\begin{matrix}{1}&{2}&{3}\\\\{4}&{5}&{6}\\end{matrix}\\right]} ", }) public void testMath(String input, String expected) { final String res = new ASCIIMathTeXImg().getTeX(input);