diff --git a/.github/actions/configure-workflow/package-lock.json b/.github/actions/configure-workflow/package-lock.json index 1b8f7fa4c..44a2cdbce 100644 --- a/.github/actions/configure-workflow/package-lock.json +++ b/.github/actions/configure-workflow/package-lock.json @@ -125,28 +125,20 @@ } }, "node_modules/@babel/generator": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.8.tgz", - "integrity": "sha512-ECmAKstXbp1cvpTTZciZCgfOt6iN64lR0d+euv3UZisU5awfRawOvg07Utn/qBGuH4bRIEZKrA/4LzZyXhZr8g==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "dependencies": { - "@babel/types": "^7.15.6", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" + "@babel/types": "^7.23.0", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/generator/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@babel/helper-compilation-targets": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.4.tgz", @@ -165,39 +157,35 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-function-name": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.15.4.tgz", - "integrity": "sha512-Z91cOMM4DseLIGOnog+Z8OI6YseR9bua+HpvLAQ2XayUGU+neTtX+97caALaLdyu53I/fjhbeCnWnRH1O3jFOw==", + "node_modules/@babel/helper-environment-visitor": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, - "dependencies": { - "@babel/helper-get-function-arity": "^7.15.4", - "@babel/template": "^7.15.4", - "@babel/types": "^7.15.4" - }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-get-function-arity": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.15.4.tgz", - "integrity": "sha512-1/AlxSF92CmGZzHnC515hm4SirTxtpDnLEJ0UyEMgTMZN+6bxXKg04dKhiRx5Enel+SUA1G1t5Ed/yQia0efrA==", + "node_modules/@babel/helper-function-name": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/types": "^7.15.4" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.15.4.tgz", - "integrity": "sha512-VTy085egb3jUGVK9ycIxQiPbquesq0HUQ+tPO0uv5mPEBZipk+5FkRKiWq5apuyTE9FUrjENB0rCf8y+n+UuhA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "dependencies": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -246,15 +234,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-module-transforms/node_modules/@babel/helper-validator-identifier": { - "version": "7.15.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", - "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-optimise-call-expression": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.15.4.tgz", @@ -304,21 +283,30 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.15.4.tgz", - "integrity": "sha512-HsFqhLDZ08DxCpBdEVtKmywj6PQbwnF6HHybur0MAnkAKnlS6uHkwnmRIkElB2Owpfb4xL4NwDmDLFubueDXsw==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "dependencies": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz", - "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" @@ -348,13 +336,13 @@ } }, "node_modules/@babel/highlight": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", - "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.14.5", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -362,9 +350,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.8.tgz", - "integrity": "sha512-BRYa3wcQnjS/nqI8Ac94pYYpJfojHVvVXJ97+IDCImX4Jc8W8Xv1+47enbruk+q1etOpsQNwnfFcNGw+gtPGxA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -536,44 +524,46 @@ } }, "node_modules/@babel/template": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.15.4.tgz", - "integrity": "sha512-UgBAfEa1oGuYgDIPM2G+aHa4Nlo9Lh6mGD2bDBGMTbYnc38vulXPuC1MGjYILIEmlwl6Rd+BPR9ee3gm20CBtg==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.14.5", - "@babel/parser": "^7.15.4", - "@babel/types": "^7.15.4" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/template/node_modules/@babel/code-frame": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.15.8.tgz", - "integrity": "sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "dependencies": { - "@babel/highlight": "^7.14.5" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.4.tgz", - "integrity": "sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.15.4", - "@babel/helper-function-name": "^7.15.4", - "@babel/helper-hoist-variables": "^7.15.4", - "@babel/helper-split-export-declaration": "^7.15.4", - "@babel/parser": "^7.15.4", - "@babel/types": "^7.15.4", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -582,39 +572,32 @@ } }, "node_modules/@babel/traverse/node_modules/@babel/code-frame": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.15.8.tgz", - "integrity": "sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "dependencies": { - "@babel/highlight": "^7.14.5" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/types": { - "version": "7.15.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.6.tgz", - "integrity": "sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.14.9", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/types/node_modules/@babel/helper-validator-identifier": { - "version": "7.15.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", - "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@bcoe/v8-coverage": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", @@ -1414,6 +1397,54 @@ "node": ">=8" } }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", + "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", @@ -7279,6 +7310,12 @@ "node": ">=6" } }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true + }, "node_modules/react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", @@ -7315,6 +7352,12 @@ "node": ">=0.10.0" } }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true + }, "node_modules/resolve": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", @@ -7880,14 +7923,15 @@ } }, "node_modules/tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", "dev": true, "dependencies": { "psl": "^1.1.33", "punycode": "^2.1.1", - "universalify": "^0.1.2" + "universalify": "^0.2.0", + "url-parse": "^1.5.3" }, "engines": { "node": ">=6" @@ -8093,9 +8137,9 @@ "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" }, "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", "dev": true, "engines": { "node": ">= 4.0.0" @@ -8110,6 +8154,16 @@ "punycode": "^2.1.0" } }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -8483,22 +8537,15 @@ } }, "@babel/generator": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.8.tgz", - "integrity": "sha512-ECmAKstXbp1cvpTTZciZCgfOt6iN64lR0d+euv3UZisU5awfRawOvg07Utn/qBGuH4bRIEZKrA/4LzZyXhZr8g==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "requires": { - "@babel/types": "^7.15.6", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } + "@babel/types": "^7.23.0", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" } }, "@babel/helper-compilation-targets": { @@ -8513,33 +8560,29 @@ "semver": "^6.3.0" } }, - "@babel/helper-function-name": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.15.4.tgz", - "integrity": "sha512-Z91cOMM4DseLIGOnog+Z8OI6YseR9bua+HpvLAQ2XayUGU+neTtX+97caALaLdyu53I/fjhbeCnWnRH1O3jFOw==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.15.4", - "@babel/template": "^7.15.4", - "@babel/types": "^7.15.4" - } + "@babel/helper-environment-visitor": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "dev": true }, - "@babel/helper-get-function-arity": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.15.4.tgz", - "integrity": "sha512-1/AlxSF92CmGZzHnC515hm4SirTxtpDnLEJ0UyEMgTMZN+6bxXKg04dKhiRx5Enel+SUA1G1t5Ed/yQia0efrA==", + "@babel/helper-function-name": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "requires": { - "@babel/types": "^7.15.4" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" } }, "@babel/helper-hoist-variables": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.15.4.tgz", - "integrity": "sha512-VTy085egb3jUGVK9ycIxQiPbquesq0HUQ+tPO0uv5mPEBZipk+5FkRKiWq5apuyTE9FUrjENB0rCf8y+n+UuhA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "requires": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.22.5" } }, "@babel/helper-member-expression-to-functions": { @@ -8574,14 +8617,6 @@ "@babel/template": "^7.15.4", "@babel/traverse": "^7.15.4", "@babel/types": "^7.15.6" - }, - "dependencies": { - "@babel/helper-validator-identifier": { - "version": "7.15.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", - "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", - "dev": true - } } }, "@babel/helper-optimise-call-expression": { @@ -8621,18 +8656,24 @@ } }, "@babel/helper-split-export-declaration": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.15.4.tgz", - "integrity": "sha512-HsFqhLDZ08DxCpBdEVtKmywj6PQbwnF6HHybur0MAnkAKnlS6uHkwnmRIkElB2Owpfb4xL4NwDmDLFubueDXsw==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "requires": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.22.5" } }, + "@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "dev": true + }, "@babel/helper-validator-identifier": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz", - "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true }, "@babel/helper-validator-option": { @@ -8653,20 +8694,20 @@ } }, "@babel/highlight": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", - "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.14.5", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.8.tgz", - "integrity": "sha512-BRYa3wcQnjS/nqI8Ac94pYYpJfojHVvVXJ97+IDCImX4Jc8W8Xv1+47enbruk+q1etOpsQNwnfFcNGw+gtPGxA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true }, "@babel/plugin-syntax-async-generators": { @@ -8787,71 +8828,67 @@ } }, "@babel/template": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.15.4.tgz", - "integrity": "sha512-UgBAfEa1oGuYgDIPM2G+aHa4Nlo9Lh6mGD2bDBGMTbYnc38vulXPuC1MGjYILIEmlwl6Rd+BPR9ee3gm20CBtg==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "requires": { - "@babel/code-frame": "^7.14.5", - "@babel/parser": "^7.15.4", - "@babel/types": "^7.15.4" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "dependencies": { "@babel/code-frame": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.15.8.tgz", - "integrity": "sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "requires": { - "@babel/highlight": "^7.14.5" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" } } } }, "@babel/traverse": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.4.tgz", - "integrity": "sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dev": true, "requires": { - "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.15.4", - "@babel/helper-function-name": "^7.15.4", - "@babel/helper-hoist-variables": "^7.15.4", - "@babel/helper-split-export-declaration": "^7.15.4", - "@babel/parser": "^7.15.4", - "@babel/types": "^7.15.4", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, "dependencies": { "@babel/code-frame": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.15.8.tgz", - "integrity": "sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "requires": { - "@babel/highlight": "^7.14.5" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" } } } }, "@babel/types": { - "version": "7.15.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.6.tgz", - "integrity": "sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.14.9", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" - }, - "dependencies": { - "@babel/helper-validator-identifier": { - "version": "7.15.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", - "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", - "dev": true - } } }, "@bcoe/v8-coverage": { @@ -9465,6 +9502,45 @@ } } }, + "@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", + "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "@nodelib/fs.scandir": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", @@ -13821,6 +13897,12 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, + "querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true + }, "react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", @@ -13845,6 +13927,12 @@ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true + }, "resolve": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", @@ -14271,14 +14359,15 @@ } }, "tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", "dev": true, "requires": { "psl": "^1.1.33", "punycode": "^2.1.1", - "universalify": "^0.1.2" + "universalify": "^0.2.0", + "url-parse": "^1.5.3" } }, "tr46": { @@ -14414,9 +14503,9 @@ "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" }, "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", "dev": true }, "uri-js": { @@ -14428,6 +14517,16 @@ "punycode": "^2.1.0" } }, + "url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "requires": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", diff --git a/.github/labeler.yml b/.github/labeler.yml index 328440e4e..4f260b7ec 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -21,10 +21,15 @@ - 'src/**/*' - 'stdlib/**/*' - 'svg/**/*' -- 'test/**/*' - 'themes/**/*' - 'manifest.txt' +'m:test': +- 'test/**/*' + +'m:license': +- '**/*license.txt' + 'm:docker': - Dockerfile diff --git a/.github/scripts/release-snapshot.sh b/.github/scripts/release-snapshot.sh index 118926458..db0e2f715 100755 --- a/.github/scripts/release-snapshot.sh +++ b/.github/scripts/release-snapshot.sh @@ -36,6 +36,9 @@ cp "plantuml-lgpl/build/libs/plantuml-lgpl-${RELEASE_VERSION}-sources.jar" "gith cp "plantuml-mit/build/libs/plantuml-mit-${RELEASE_VERSION}.jar" "github_release/plantuml-mit-SNAPSHOT.jar" cp "plantuml-mit/build/libs/plantuml-mit-${RELEASE_VERSION}-javadoc.jar" "github_release/plantuml-mit-SNAPSHOT-javadoc.jar" cp "plantuml-mit/build/libs/plantuml-mit-${RELEASE_VERSION}-sources.jar" "github_release/plantuml-mit-SNAPSHOT-sources.jar" +cp "plantuml-gplv2/build/libs/plantuml-gplv2-${RELEASE_VERSION}.jar" "github_release/plantuml-gplv2-SNAPSHOT.jar" +cp "plantuml-gplv2/build/libs/plantuml-gplv2-${RELEASE_VERSION}-javadoc.jar" "github_release/plantuml-gplv2-SNAPSHOT-javadoc.jar" +cp "plantuml-gplv2/build/libs/plantuml-gplv2-${RELEASE_VERSION}-sources.jar" "github_release/plantuml-gplv2-SNAPSHOT-sources.jar" if [[ -e "build/publications/maven/module.json.asc" ]]; then # signatures are optional so that forked repos can release snapshots without needing a gpg signing key @@ -60,6 +63,9 @@ if [[ -e "build/publications/maven/module.json.asc" ]]; then cp "plantuml-mit/build/libs/plantuml-mit-${RELEASE_VERSION}.jar.asc" "github_release/plantuml-mit-SNAPSHOT.jar.asc" cp "plantuml-mit/build/libs/plantuml-mit-${RELEASE_VERSION}-javadoc.jar.asc" "github_release/plantuml-mit-SNAPSHOT-javadoc.jar.asc" cp "plantuml-mit/build/libs/plantuml-mit-${RELEASE_VERSION}-sources.jar.asc" "github_release/plantuml-mit-SNAPSHOT-sources.jar.asc" + cp "plantuml-gplv2/build/libs/plantuml-gplv2-${RELEASE_VERSION}.jar.asc" "github_release/plantuml-gplv2-SNAPSHOT.jar.asc" + cp "plantuml-gplv2/build/libs/plantuml-gplv2-${RELEASE_VERSION}-javadoc.jar.asc" "github_release/plantuml-gplv2-SNAPSHOT-javadoc.jar.asc" + cp "plantuml-gplv2/build/libs/plantuml-gplv2-${RELEASE_VERSION}-sources.jar.asc" "github_release/plantuml-gplv2-SNAPSHOT-sources.jar.asc" fi echo -n "${DATE_TIME_UTC}" > "github_release/plantuml-SNAPSHOT.timestamp" diff --git a/.github/scripts/release.sh b/.github/scripts/release.sh index f382096b6..1f89f9ce4 100755 --- a/.github/scripts/release.sh +++ b/.github/scripts/release.sh @@ -29,6 +29,9 @@ cp "plantuml-lgpl/build/libs/plantuml-lgpl-${RELEASE_VERSION}-sources.jar" "gith cp "plantuml-mit/build/libs/plantuml-mit-${RELEASE_VERSION}.jar" "github_release/plantuml-mit-${RELEASE_VERSION}.jar" cp "plantuml-mit/build/libs/plantuml-mit-${RELEASE_VERSION}-javadoc.jar" "github_release/plantuml-mit-${RELEASE_VERSION}-javadoc.jar" cp "plantuml-mit/build/libs/plantuml-mit-${RELEASE_VERSION}-sources.jar" "github_release/plantuml-mit-${RELEASE_VERSION}-sources.jar" +cp "plantuml-gplv2/build/libs/plantuml-gplv2-${RELEASE_VERSION}.jar" "github_release/plantuml-gplv2-${RELEASE_VERSION}.jar" +cp "plantuml-gplv2/build/libs/plantuml-gplv2-${RELEASE_VERSION}-javadoc.jar" "github_release/plantuml-gplv2-${RELEASE_VERSION}-javadoc.jar" +cp "plantuml-gplv2/build/libs/plantuml-gplv2-${RELEASE_VERSION}-sources.jar" "github_release/plantuml-gplv2-${RELEASE_VERSION}-sources.jar" if [[ -e "build/publications/maven/module.json.asc" ]]; then # signatures are optional so that forked repos can release snapshots without needing a gpg signing key @@ -52,6 +55,9 @@ if [[ -e "build/publications/maven/module.json.asc" ]]; then cp "plantuml-mit/build/libs/plantuml-mit-${RELEASE_VERSION}.jar.asc" "github_release/plantuml-mit-${RELEASE_VERSION}.jar.asc" cp "plantuml-mit/build/libs/plantuml-mit-${RELEASE_VERSION}-javadoc.jar.asc" "github_release/plantuml-mit-${RELEASE_VERSION}-javadoc.jar.asc" cp "plantuml-mit/build/libs/plantuml-mit-${RELEASE_VERSION}-sources.jar.asc" "github_release/plantuml-mit-${RELEASE_VERSION}-sources.jar.asc" + cp "plantuml-gplv2/build/libs/plantuml-gplv2-${RELEASE_VERSION}.jar.asc" "github_release/plantuml-gplv2-${RELEASE_VERSION}.jar.asc" + cp "plantuml-gplv2/build/libs/plantuml-gplv2-${RELEASE_VERSION}-javadoc.jar.asc" "github_release/plantuml-gplv2-${RELEASE_VERSION}-javadoc.jar.asc" + cp "plantuml-gplv2/build/libs/plantuml-gplv2-${RELEASE_VERSION}-sources.jar.asc" "github_release/plantuml-gplv2-${RELEASE_VERSION}-sources.jar.asc" fi gh release create \ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9eff82d08..1bc3effb2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,11 +26,12 @@ jobs: do_release: ${{ steps.config.outputs.do_release }} do_snapshot_release: ${{ steps.config.outputs.do_snapshot_release }} pom_version: ${{ steps.config.outputs.pom_version }} + do_javadoc: ${{ steps.config.outputs.do_javadoc }} do_test_linux: ${{ steps.config.outputs.do_test_linux }} do_test_windows: ${{ steps.config.outputs.do_test_windows }} steps: - name: Checkout the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Configure workflow id: config @@ -53,7 +54,6 @@ jobs: # Do a release when a git tag starting with 'v' has been created by a suitable user. # (We match against github.repository_owner as a kludge so that forked repos can release themselves when testing the workflow) - if [[ "${GITHUB_EVENT_NAME}" == "create" && "${REF_TYPE}" == "tag" && "${REF}" == v* && \ ( "${ACTOR}" == "arnaudroques" || "${ACTOR}" == "${GITHUB_REPOSITORY_OWNER}" ) \ ]]; then @@ -61,6 +61,8 @@ jobs: echo "do_release=true" >> $GITHUB_OUTPUT echo "pom_version=${REF#v}" echo "pom_version=${REF#v}" >> $GITHUB_OUTPUT # pom_version is the tag without the 'v' prefix + echo "do_javadoc=true" >> $GITHUB_OUTPUT + echo "This run will update the Javadoc" elif [[ "${GITHUB_EVENT_NAME}" =~ push|workflow_dispatch && "${REF}" == "refs/heads/master" && "${ACTOR}" == "arnaudroques" ]]; then echo "::notice title=::This run will release a snapshot" @@ -68,9 +70,13 @@ jobs: V=$(perl -ne 'if (/return (\d{6,7});/) {$v=$1} if (/final int beta = (\d+);/) {$b=$1} END{print(substr($v, 0, 1),".", substr($v, 1, 4),"."); if ($b) {print(int(substr($v+1, 5)), "beta", $b);} else {print(int(substr($v, 5)))}}' src/net/sourceforge/plantuml/version/Version.java) echo "pom_version=$V-SNAPSHOT" echo "pom_version=$V-SNAPSHOT" >> $GITHUB_OUTPUT # pom_version is taken from Version.java + echo "do_javadoc=true" >> $GITHUB_OUTPUT + echo "This run will update the Javadoc" else echo "This run will NOT make a release" + echo "do_javadoc=false" >> $GITHUB_OUTPUT + echo "This run will NOT update the Javadoc" fi echo "do_test_linux=true" >> $GITHUB_OUTPUT echo "do_test_windows=false" >> $GITHUB_OUTPUT @@ -89,7 +95,7 @@ jobs: steps: - name: Checkout the repository if: needs.workflow_config.outputs.do_test_linux == 'true' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up java if: needs.workflow_config.outputs.do_test_linux == 'true' @@ -116,43 +122,6 @@ jobs: name: ${{ github.run_number }}-${{ matrix.os }}-java-${{ matrix.java_version }}-test-reports path: build/reports/tests/ - test_windows: - needs: workflow_config - strategy: - fail-fast: false - matrix: - java_version: [ 8 ] - os: [ windows-latest ] - runs-on: ${{ matrix.os }} - steps: - - name: Checkout the repository - if: needs.workflow_config.outputs.do_test_windows == 'true' - uses: actions/checkout@v3 - - - name: Set up java - if: needs.workflow_config.outputs.do_test_windows == 'true' - uses: actions/setup-java@v3 - with: - java-version: ${{ matrix.java_version }} - distribution: temurin - cache: gradle - - # Compile / Test / Package are separate steps so the reason for any failure is more obvious in GitHub UI - - name: Compile - if: needs.workflow_config.outputs.do_test_windows == 'true' - run: gradle -q compileJava --no-daemon - - - name: Test - if: needs.workflow_config.outputs.do_test_windows == 'true' - run: gradle test --no-daemon -i - - - name: Upload test reports - uses: actions/upload-artifact@v3 - if: needs.workflow_config.outputs.do_test_windows == 'true' - with: - # Using github.run_number here to reduce confusion when downloading & comparing from several builds - name: ${{ github.run_number }}-${{ matrix.os }}-java-${{ matrix.java_version }}-test-reports - path: build/reports/tests/ build_artifacts: needs: [ workflow_config ] @@ -161,7 +130,7 @@ jobs: release_version: ${{ steps.version.outputs.release_version }} steps: - name: Checkout the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up java uses: actions/setup-java@v3 with: @@ -197,6 +166,7 @@ jobs: ls -l plantuml-epl/build/libs ls -l plantuml-lgpl/build/libs ls -l plantuml-mit/build/libs + ls -l plantuml-gplv2/build/libs - name: Get release version id: version run: | @@ -212,9 +182,34 @@ jobs: plantuml-epl/build/libs plantuml-lgpl/build/libs plantuml-mit/build/libs + plantuml-gplv2/build/libs key: "libs-${{ github.run_id }}" enableCrossOsArchive: true + deploy_javadoc: + needs: [ build_artifacts, test_linux ] + if: needs.workflow_config.outputs.do_javadoc == 'true' + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v4 + + - name: Set up java + uses: actions/setup-java@v3 + with: + java-version: 17 + distribution: temurin + + - name: Build Javadoc + run: gradle javadoc + + - name: Deploy Javadoc to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build/docs/javadoc + + upload: if: | needs.workflow_config.outputs.do_release == 'true' || @@ -223,7 +218,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up java uses: actions/setup-java@v3 @@ -243,6 +238,7 @@ jobs: plantuml-epl/build/libs plantuml-lgpl/build/libs plantuml-mit/build/libs + plantuml-gplv2/build/libs key: "libs-${{ github.run_id }}" fail-on-cache-miss: true enableCrossOsArchive: true @@ -260,6 +256,7 @@ jobs: plantuml-epl/build/libs plantuml-lgpl/build/libs plantuml-mit/build/libs + plantuml-gplv2/build/libs - name: Create snapshot if: needs.workflow_config.outputs.do_snapshot_release == 'true' @@ -296,19 +293,19 @@ jobs: gradle --debug publish push_to_docker_registry: - needs: [ workflow_config, upload, test_linux, test_windows ] + needs: [ workflow_config, upload, test_linux ] if: needs.workflow_config.outputs.do_release == 'true' runs-on: ubuntu-latest steps: - name: Check out the repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: # list of Docker images to use as base name for tags images: | @@ -321,18 +318,18 @@ jobs: type=semver,pattern={{major}} type=sha - name: Log into Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Log in to GitHub Docker Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build/push container image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . push: true diff --git a/.github/workflows/close-and-put-in-backlog.yml b/.github/workflows/close-and-put-in-backlog.yml index dd9aca5fb..26afa923d 100644 --- a/.github/workflows/close-and-put-in-backlog.yml +++ b/.github/workflows/close-and-put-in-backlog.yml @@ -24,8 +24,8 @@ jobs: repo: context.repo.repo, body: welcomeMessage }) - - uses: peter-evans/close-issue@v2 - - uses: actions/add-to-project@v0.4.1 + - uses: peter-evans/close-issue@v3 + - uses: actions/add-to-project@v0.5.0 with: project-url: https://github.com/orgs/plantuml/projects/4 github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} \ No newline at end of file diff --git a/.github/workflows/native-image.yml b/.github/workflows/native-image.yml index 6d016db76..de3990925 100644 --- a/.github/workflows/native-image.yml +++ b/.github/workflows/native-image.yml @@ -23,7 +23,7 @@ jobs: runs-on: ${{matrix.os}} steps: - name: Checkout the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - uses: graalvm/setup-graalvm@v1 with: @@ -42,6 +42,7 @@ jobs: plantuml-epl/build/libs plantuml-lgpl/build/libs plantuml-mit/build/libs + plantuml-gplv2/build/libs key: "libs-${{ github.run_id }}" fail-on-cache-miss: true enableCrossOsArchive: true diff --git a/.github/workflows/testing-workflow-config.yml b/.github/workflows/testing-workflow-config.yml index 4394eed0c..d77d00c2e 100644 --- a/.github/workflows/testing-workflow-config.yml +++ b/.github/workflows/testing-workflow-config.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: configure workflow uses: ./.github/actions/configure-workflow id: config diff --git a/BUILDING.md b/BUILDING.md new file mode 100644 index 000000000..3c436bdb5 --- /dev/null +++ b/BUILDING.md @@ -0,0 +1,143 @@ +# 🚧 Building PlantUML + +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. + +## β˜• Java Compatibility and Development Notes + +### PlantUML & Java 8 Compatibility + +We understand the ubiquity and prevalence of Java 8 in numerous environments and infrastructures. Thus, **PlantUML remains steadfastly compatible with Java 8**. Despite the version’s age and the availability of newer releases, we recognize that a substantial number of users and enterprises still depend on Java 8. Therefore, you can confidently run PlantUML in environments where Java 8 is installed, ensuring accessibility and functionality for a wide array of users. + +### Unitary Tests & Dependency Management + +PlantUML consistently retains compatibility with Java 8 in its main library, ensuring a broad usability spectrum. However, the perspective slightly shifts when it comes to our development and testing environments, especially concerning dependency management and Java version utilization. + +In the unitary testing environment: +- **Additional Dependencies**: To streamline and simplify unitary tests, we are open to incorporating dependencies on other libraries, ensuring that our testing is thorough, simplified, and efficient. + +This means: +- **For Users**: PlantUML is crafted to compile and operate flawlessly with Java 8, offering a stable experience without the imperative of upgrading your Java environment. + +- **For Contributors/Developers**: When engaging in unitary testing, be mindful that it involves additional dependencies for efficient testing processes. However, rest assured that the main library of PlantUML consciously avoids external dependencies to maintain its lightweight and easy-to-integrate nature, while still ensuring compatibility with Java 8. + +### Your Contribution Matters + +Whether you're using an old or a new version of Java, your feedback, contributions, and insights are valuable in enhancing PlantUML. We strive to maintain a balance between adopting new technology and ensuring accessibility for all users, and your experiences aid us in striking this balance effectively. + +## πŸŽ“ Building PlantUML with Gradle + +### Prerequisites + +Ensure that you have the following installed on your system: + +- [Java Development Kit (JDK)](https://jdk.java.net/) - version 8 or newer +- [Gradle](https://gradle.org/install/) - version 7.0 or newer +- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - to clone the repository and manage the version control + +### Getting the Source Code + +Clone the PlantUML repository to your local system. You can clone the repository by running the following command in your terminal or command prompt: + +```sh +git clone https://github.com/plantuml/plantuml.git +``` + +Navigate to the project root directory: + +```sh +cd plantuml +``` + +### Building the Project + +To build the project, run the following command from the project root directory: + +```sh +gradle build +``` + +This command will build the project and create the necessary output files in the `build` directory. + +### Running Tests + +To run the tests included with the project, use the following command: + +```sh +gradle test +``` + +### Creating a JAR File + +To create a JAR file of the PlantUML project, run the following command: + +```sh +gradle jar +``` + +The JAR file will be created in the `build/libs` directory. + +### Contributing + +After successfully building the project, you are ready to start contributing to PlantUML! If you have any changes to contribute, please submit a pull request through the [PlantUML GitHub repository](https://github.com/plantuml/plantuml). + +### Additional Resources + +- [PlantUML Official Website](https://plantuml.com/) +- [Gradle User Guide](https://docs.gradle.org/current/userguide/userguide.html) +- [Java Development Kit (JDK) Documentation](https://docs.oracle.com/javase/11/) + +### Getting Help + +If you encounter any issues while building the project, feel free to ask for help on the [PlantUML Community Forum](https://forum.plantuml.net/) or open an issue on the [GitHub repository](https://github.com/plantuml/plantuml/issues). + +Thank you for contributing to PlantUML! + +## 🐜 Building PlantUML with Ant (Alternative Method) + +For those who prefer using Ant, or only have access to Ant, we provide a `build.xml` Ant build script as a fallback option to build PlantUML. + +### Prerequisites + +Ensure that you have the following installed on your system: + +- [Java Development Kit (JDK)](https://jdk.java.net/) - version 8 or newer +- [Apache Ant](https://ant.apache.org/bindownload.cgi) - to run the build script +- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - to clone the repository and manage the version control + +### Getting the Source Code + +Clone the PlantUML repository to your local system. You can clone the repository by running the following command in your terminal or command prompt: + +```sh +git clone https://github.com/plantuml/plantuml.git +``` + +Navigate to the directory containing the `build.xml`: + +```sh +cd plantuml +``` + +### Building the Project + +To build the project using Ant, run the following command: + +```sh +ant +``` + +If you have Ant set up correctly and the prerequisites are met, the build process should start, and the project will be built based on the instructions in the `build.xml`. + + +## πŸ“¦ About the `graphviz.dat` file + +Within certain PlantUML releases, we've incorporated an embedded, compiled version of GraphViz specifically tailored for Windows. This initiative was taken to streamline the user experience for our Windows users, eliminating the need for them to undertake separate installations or configurations. + +This version of GraphViz is a product of the [graphviz-distributions project](https://github.com/plantuml/graphviz-distributions). For efficient distribution, it is compressed using Brotli and subsequently stored within the [graphviz.dat file](https://github.com/plantuml/plantuml/tree/master/src/net/sourceforge/plantuml/windowsdot). + +If you're not on a Windows platform (e.g., Linux users), you can safely remove this file. However, for Windows users, removing it implies you'd need to install GraphViz independently. + +To streamline our distribution process and given the existing six PlantUML versions resulting from varied licensing, we chose not to double this count to 12 with a dichotomy of versions containing the embedded GraphViz and those without. Instead, all our distributions, barring the LGPL one, come with the embedded GraphViz. For those who prefer a version without the embedded GraphViz, the LGPL distribution would be the go-to choice. + diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 000000000..446074192 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,7 @@ +cff-version: 1.2.0 +authors: +- family-names: "Roques" + given-names: "Arnaud" +- family-names: "PlantUML Contributors" +title: "PlantUML Software" +url: "https://github.com/plantuml/plantuml" diff --git a/README.md b/README.md index 8b6228eb8..94a914390 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ -PlantUML -======== +# 🌱 PlantUML + +Generate UML diagrams from textual descriptions. [![Discord server](https://img.shields.io/discord/1083727021328306236?color=5865F2&logo=discord&logoColor=white)](https://discord.gg/sXhzexAQGh) [![GitHub Sponsors](https://img.shields.io/github/sponsors/plantuml?logo=github)](https://github.com/sponsors/plantuml/) @@ -16,49 +17,89 @@ PlantUML [![Release (latest by date)](https://img.shields.io/github/v/release/plantuml/plantuml)](https://github.com/plantuml/plantuml/releases/latest) [![Release Date](https://img.shields.io/github/release-date/plantuml/plantuml?color=blue)](https://github.com/plantuml/plantuml/releases/latest) [![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/plantuml/plantuml/latest)](https://github.com/plantuml/plantuml/commits/) +[![javadoc](https://javadoc.io/badge2/net.sourceforge.plantuml/plantuml-gplv2/javadoc.svg)](https://javadoc.io/doc/net.sourceforge.plantuml/plantuml-gplv2) [![Pre-release (latest by date)](https://img.shields.io/github/v/release/plantuml/plantuml?color=chocolate&include_prereleases)](https://github.com/plantuml/plantuml/releases/tag/snapshot) [![Pre-release Date](https://img.shields.io/github/release-date-pre/plantuml/plantuml?color=chocolate)](https://github.com/plantuml/plantuml/releases/tag/snapshot) [![GitHub last commit](https://img.shields.io/github/last-commit/plantuml/plantuml?color=chocolate)](https://github.com/plantuml/plantuml/commits/) [![CI](https://github.com/plantuml/plantuml/actions/workflows/ci.yml/badge.svg?color=chocolate)](https://github.com/plantuml/plantuml/actions/workflows/ci.yml) +[![snapshot javadoc](https://img.shields.io/badge/javadoc-snapshot-chocolate.svg?logo=github)](https://plantuml.github.io/plantuml/) -Generate UML diagram from textual description +> [!IMPORTANT] +> [PlantUML is **not** affected by the log4j vulnerability.](https://github.com/plantuml/plantuml/issues/826) -[PlantUML is **not** affected by the log4j vulnerability.](https://github.com/plantuml/plantuml/issues/826) +## ℹ️ About -PlantUML is a component that allows to quickly write: +PlantUML is a component that allows you to create various UML diagrams through simple textual descriptions. From sequence diagrams to deployment diagrams and beyond, PlantUML provides an easy way to create visual representations of complex systems. - * [Sequence diagram](http://plantuml.com/sequence-diagram), - * [Use case diagram](http://plantuml.com/use-case-diagram), - * [Class diagram](http://plantuml.com/class-diagram), - * [Object diagram](http://plantuml.com/object-diagram), - * [Activity diagram](http://plantuml.com/activity-diagram-beta) (here is [the legacy syntax](http://plantuml.com/activity-diagram-legacy)), - * [Component diagram](http://plantuml.com/component-diagram), - * [Deployment diagram](http://plantuml.com/deployment-diagram), - * [State diagram](http://plantuml.com/state-diagram), - * [Timing diagram](http://plantuml.com/timing-diagram). - -The following non-UML diagrams are also supported: - * [JSON data](http://plantuml.com/json) - * [YAML data](http://plantuml.com/yaml) - * [Extended Backus-Naur Form (EBNF) diagram](http://plantuml.com/ebnf) - * [Regular Expression (regex) diagram](http://plantuml.com/regex) - * [Network diagram (nwdiag)](http://plantuml.com/nwdiag) - * [Wireframe graphical interface or UI mockups (salt)](http://plantuml.com/salt) - * [Archimate diagram](http://plantuml.com/archimate-diagram) - * [Specification and Description Language (SDL)](http://plantuml.com/activity-diagram-beta#sdl) - * [Ditaa diagram](http://plantuml.com/ditaa) - * [Gantt diagram](http://plantuml.com/gantt-diagram) - * [MindMap diagram](http://plantuml.com/mindmap-diagram) - * [Work Breakdown Structure diagram (WBS)](http://plantuml.com/wbs-diagram) - * [Mathematic with AsciiMath or JLaTeXMath notation](http://plantuml.com/ascii-math) - * [Entity Relationship diagram (IE/ER)](http://plantuml.com/ie-diagram) +### πŸ—ƒοΈ Supported Diagram Types -Furthermore: - * [Hyperlinks and tooltips](http://plantuml.com/link) - * [Creole](http://plantuml.com/creole): rich text, emoticons, unicode, icons - * [OpenIconic icons](http://plantuml.com/openiconic) - * [Sprite icons](http://plantuml.com/sprite) - * [AsciiMath mathematical expressions](http://plantuml.com/ascii-math) +- 🧩 UML Diagrams + - [Sequence diagram](http://plantuml.com/sequence-diagram) + - [Use case diagram](http://plantuml.com/use-case-diagram) + - [Class diagram](http://plantuml.com/class-diagram) + - [Object diagram](http://plantuml.com/object-diagram) + - [Activity diagram](http://plantuml.com/activity-diagram-beta) + - [Legacy syntax](http://plantuml.com/activity-diagram-legacy) + - [Component diagram](http://plantuml.com/component-diagram) + - [Deployment diagram](http://plantuml.com/deployment-diagram) + - [State diagram](http://plantuml.com/state-diagram) + - [Timing diagram](http://plantuml.com/timing-diagram) +- πŸ“ˆ Non-UML Diagrams + - [JSON data](http://plantuml.com/json) + - [YAML data](http://plantuml.com/yaml) + - [EBNF (Extended Backus-Naur Form)](http://plantuml.com/ebnf) + - [Regex (Regular Expression)](http://plantuml.com/regex) + - [Network diagram (nwdiag)](http://plantuml.com/nwdiag) + - [Salt (Wireframe graphical interface or UI Mockups)](http://plantuml.com/salt) + - [Archimate diagram](http://plantuml.com/archimate-diagram) + - [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) + - [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) + - [IE/ER (Information Engineering/Entity Relationship)](http://plantuml.com/ie-diagram) + +### πŸ“£ Additional Features + +- [Hyperlinks and tooltips](http://plantuml.com/link) +- [Rich text (Creole) with emoticons, unicode, and icons](http://plantuml.com/creole) +- [OpenIconic icons](http://plantuml.com/openiconic) +- [Sprite icons](http://plantuml.com/sprite) + +### πŸ“– Learn More + +For a more detailed overview, visit [PlantUML Official Website](https://plantuml.com/). + +## πŸš€ Getting Started + +Whether you're looking to use PlantUML as a standalone application or as a component in your own project, getting started is simple. Check out the official [PlantUML setup guide](https://plantuml.com/starting) for instructions on how to set up PlantUML on your system. + +## βš™οΈ Building from Source + +To build PlantUML from source, you'll need to have certain prerequisites installed and follow a series of steps outlined in our build guide. Find detailed instructions in our [BUILDING.md](https://github.com/plantuml/plantuml/blob/master/BUILDING.md) file. + +## 🧱 Contributing + +PlantUML is an open-source project, and we welcome contributions of all kinds. Whether you're helping us fix bugs, improve the docs, or spread the word, we appreciate your support. See our [contributing guide](CONTRIBUTING.md) for more information on how to get started. + +For comprehensive and detailed documentation on using PlantUML, refer to the [official Javadoc, available here](https://plantuml.github.io/plantuml/). Please note that this documentation is a work in progress and may not be complete. + +## πŸ§‘β€πŸ€β€πŸ§‘ Support and Community + +- [GitHub issues](https://github.com/plantuml/plantuml/issues/) +- [Community Forum](https://forum.plantuml.net/) + +## πŸ“ƒ License + +PlantUML is licensed under several licenses; you can choose the one that suits you best: + +- [GPL license](https://www.gnu.org/licenses/gpl-3.0.html) +- [LGPL license](https://www.gnu.org/licenses/lgpl-3.0.html) +- [Apache license](https://www.apache.org/licenses/LICENSE-2.0) +- [Eclipse Public license](https://www.eclipse.org/legal/epl-2.0/) +- [MIT license](https://opensource.org/licenses/MIT) + +For more information, please refer to the [PlantUML license FAQ](https://plantuml.com/en/faq#ddbc9d04378ee462) to help determine which license is appropriate for your use case. -To know more about PlantUML, please visit https://plantuml.com/ diff --git a/attic.md b/attic.md new file mode 100644 index 000000000..2dae29f1c --- /dev/null +++ b/attic.md @@ -0,0 +1,12 @@ +# Historical Code Archive + +This document catalogs code that was previously part of PlantUML but has since been deprecated and removed due to its lack of use. +It serves as a historical reference to ensure we remember and understand past decisions. + +- [logo language](https://github.com/plantuml/plantuml/tree/v1.2023.12/src/net/sourceforge/plantuml/logo) +- [basic language](https://github.com/plantuml/plantuml/tree/v1.2023.12/src/net/sourceforge/plantuml/jasic) +- [mjpeg export](https://github.com/plantuml/plantuml/tree/v1.2023.12/src/net/sourceforge/plantuml/mjpeg) +- [animation](https://github.com/plantuml/plantuml/tree/v1.2023.12/src/net/sourceforge/plantuml/anim) +- [ditherer quantization](https://github.com/plantuml/plantuml/tree/v1.2023.12/src/net/sourceforge/plantuml/quantization) +- [syntax suggestion](https://github.com/plantuml/plantuml/blob/v1.2023.12/src/net/sourceforge/plantuml/syntax/SyntaxChecker.java) +- [a first try of GraphViz abstraction](https://github.com/plantuml/plantuml/blob/v1.2023.12/src/net/sourceforge/plantuml/posimo) diff --git a/build.gradle.kts b/build.gradle.kts index a168a372c..72fb2d760 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,6 +13,7 @@ plugins { java `maven-publish` signing +// id("com.adarshr.test-logger") version "3.2.0" } group = "net.sourceforge.plantuml" @@ -27,12 +28,22 @@ java { } dependencies { - compileOnly("org.apache.ant:ant:1.10.13") + 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.junit.jupiter:junit-jupiter:5.9.2") + testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") + if (JavaVersion.current().isJava8) { + testImplementation("org.mockito:mockito-core:4.+") + testImplementation("org.mockito:mockito-junit-jupiter:4.+") + } else { + testImplementation("org.mockito:mockito-core:5.+") + testImplementation("org.mockito:mockito-junit-jupiter:5.+") + } testImplementation("org.scilab.forge:jlatexmath:1.0.7") - "pdfRuntimeOnly"("org.apache.xmlgraphics:fop:2.8") - "pdfRuntimeOnly"("org.apache.xmlgraphics:batik-all:1.16") + + "pdfRuntimeOnly"("org.apache.xmlgraphics:fop:2.9") + "pdfRuntimeOnly"("org.apache.xmlgraphics:batik-all:1.17") } repositories { @@ -147,6 +158,10 @@ tasks.withType().configureEach { } tasks.test { + doFirst { + println("Java Home:" + System.getProperty("java.home")); + println("Java Version: " + System.getProperty("java.version")); + } useJUnitPlatform() testLogging.showStandardStreams = true } diff --git a/build.xml b/build.xml new file mode 100644 index 000000000..24b663c7c --- /dev/null +++ b/build.xml @@ -0,0 +1,137 @@ + + + + PlantUML Build File + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/TESTING.md b/docs/TESTING.md new file mode 100644 index 000000000..26bc90e7b --- /dev/null +++ b/docs/TESTING.md @@ -0,0 +1,81 @@ +# Testing PlantUML + +## Prerequisites + +See the [Building page](../BUILDING.md) and especilay the paragraph [Building PlantUML with Gradle](../BUILDING.md#building-plantuml-with-gradle). + +## Running Tests + +### Run all tests, for all licences + +To run the tests included with the project, use the following command: + +```sh +gradle test +``` + +### Run a specific test, for only one licence + +Comment those lines on [`settings.gradle.kts`](../settings.gradle.kts): + +https://github.com/plantuml/plantuml/blob/a327d636a7fcc7f05a88b796a2838da16e2ba3e3/settings.gradle.kts#L12-L16 + +Then you can run a specific test _(e.g. the `aTestClass` Class)_: +```sh +gradle test --tests aTestClass +``` + +## Contributing + +After successfully building and testing the project, you are ready to start [contributing](../CONTRIBUTING.md) to PlantUML! +If you have any changes to contribute, please submit a pull request through the [PlantUML GitHub repository](https://github.com/plantuml/plantuml). + + +## Test Directory Architecture + +- [test/](../test) + - [com/plantuml/wasm](../test/com/plantuml/wasm) + - [net/sourceforge/plantuml](../test/net/sourceforge/plantuml) + - [nonreg](../test/nonreg) + +```mermaid +%%{ init : { "flowchart" : { "curve" : "stepBefore" }}}%% +graph LR +T["test/"] +T -->|"Unit Test\n(of src/com/plantuml/api/cheerpj)"| W["com/plantuml/wasm"] +T -->|"Unit Test\n(of src/net/sourceforge/plantuml)"| U["net/sourceforge/plantuml"] +T -->|"Non-regression Test"| N[nonreg] +``` + +## Additional Resources + +### Gradle +- site: [Gradle](https://gradle.org) +- doc: [Gradle User Guide](https://docs.gradle.org/current/userguide/userguide.html) +- src: [:octocat:Gradle](https://github.com/gradle/gradle) + +### Gradle Plugins +- site: [Gradle Plugins Search](https://plugins.gradle.org) +- A "gradle test logger plugin" + - src: [:octocat:radarsh/gradle-test-logger-plugin](https://github.com/radarsh/gradle-test-logger-plugin) + +### JUnit +- site: [JUnit5](https://junit.org/junit5/) +- doc: [JUnit User Guide](https://junit.org/junit5/docs/current/user-guide/) +- src: [:octocat:JUnit-team](https://github.com/junit-team) + +### JUnit extensions +- doc: [JUnit extensions](https://junit.org/junit5/docs/current/user-guide/#extensions) +- The "Glytching" JUnit extensions + - doc: [Glytching JUnit extensions](https://glytching.github.io/junit-extensions/) + - doc: [`randomBeans` doc](https://glytching.github.io/junit-extensions/randomBeans) + - src: [:octocat:glytching/junit-extensions](https://github.com/glytching/junit-extensions) + +### AssertJ +- doc: [AssertJ](https://assertj.github.io/doc/) +- src: [:octocat:AssertJ](https://github.com/assertj/assertj) + +### Mockito +- site: [Mockito](https://site.mockito.org) +- doc: [Mockito doc.](https://javadoc.io/doc/org.mockito/mockito-core/latest/org/mockito/Mockito.html) +- src: [:octocat:Mockito](https://github.com/mockito/mockito) diff --git a/gradle.properties b/gradle.properties index cc1f647af..39994fd2b 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.11beta2 +version = 1.2023.13beta1 org.gradle.workers.max = 3 \ No newline at end of file diff --git a/plantuml-asl/build.gradle.kts b/plantuml-asl/build.gradle.kts index 9832a7912..79ebca686 100644 --- a/plantuml-asl/build.gradle.kts +++ b/plantuml-asl/build.gradle.kts @@ -24,9 +24,9 @@ java { } dependencies { - compileOnly("org.apache.ant:ant:1.10.13") + compileOnly("org.apache.ant:ant:1.10.14") testImplementation("org.assertj:assertj-core:3.24.2") - testImplementation("org.junit.jupiter:junit-jupiter:5.9.2") + testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") testImplementation("org.scilab.forge:jlatexmath:1.0.7") } @@ -41,7 +41,8 @@ sourceSets { srcDirs("build/generated/sjpp") } resources { - srcDirs("build/generated/sjpp") + srcDirs("build/sources/sjpp/java") + include("**/graphviz.dat") include("**/*.png") include("**/*.svg") include("**/*.txt") diff --git a/plantuml-bsd/build.gradle.kts b/plantuml-bsd/build.gradle.kts index b0ea6582c..f57ec2fe1 100644 --- a/plantuml-bsd/build.gradle.kts +++ b/plantuml-bsd/build.gradle.kts @@ -24,9 +24,9 @@ java { } dependencies { - compileOnly("org.apache.ant:ant:1.10.13") + compileOnly("org.apache.ant:ant:1.10.14") testImplementation("org.assertj:assertj-core:3.24.2") - testImplementation("org.junit.jupiter:junit-jupiter:5.9.2") + testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") testImplementation("org.scilab.forge:jlatexmath:1.0.7") } @@ -41,7 +41,8 @@ sourceSets { srcDirs("build/generated/sjpp") } resources { - srcDirs("build/generated/sjpp") + srcDirs("build/sources/sjpp/java") + include("**/graphviz.dat") include("**/*.png") include("**/*.svg") include("**/*.txt") diff --git a/plantuml-epl/build.gradle.kts b/plantuml-epl/build.gradle.kts index 5d9bcc819..0c94e1a85 100644 --- a/plantuml-epl/build.gradle.kts +++ b/plantuml-epl/build.gradle.kts @@ -24,9 +24,9 @@ java { } dependencies { - compileOnly("org.apache.ant:ant:1.10.13") + compileOnly("org.apache.ant:ant:1.10.14") testImplementation("org.assertj:assertj-core:3.24.2") - testImplementation("org.junit.jupiter:junit-jupiter:5.9.2") + testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") testImplementation("org.scilab.forge:jlatexmath:1.0.7") } @@ -41,7 +41,8 @@ sourceSets { srcDirs("build/generated/sjpp") } resources { - srcDirs("build/generated/sjpp") + srcDirs("build/sources/sjpp/java") + include("**/graphviz.dat") include("**/*.png") include("**/*.svg") include("**/*.txt") @@ -124,7 +125,6 @@ tasks.named("sourcesJar"){ dependsOn(preprocessLicenceAntTask) } - publishing { publications.create("maven") { from(components["java"]) diff --git a/plantuml-gplv2/build.gradle.kts b/plantuml-gplv2/build.gradle.kts new file mode 100644 index 000000000..740d97e91 --- /dev/null +++ b/plantuml-gplv2/build.gradle.kts @@ -0,0 +1,183 @@ +// permits to start the build setting the javac release parameter, no parameter means build for java8: +// gradle clean build -x javaDoc -PjavacRelease=8 +// gradle clean build -x javaDoc -PjavacRelease=17 +// also supported is to build first, with java17, then switch the java version, and run the test with java8: +// gradle clean build -x javaDoc -x test +// gradle test +val javacRelease = (project.findProperty("javacRelease") ?: "8") as String + +plugins { + java + `maven-publish` + signing +} + +group = "net.sourceforge.plantuml" +description = "PlantUML" + +java { + withSourcesJar() + withJavadocJar() + registerFeature("pdf") { + usingSourceSet(sourceSets["main"]) + } +} + +dependencies { + compileOnly("org.apache.ant:ant:1.10.14") + 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") +} + +repositories { + mavenLocal() + mavenCentral() +} + +sourceSets { + main { + java { + srcDirs("build/generated/sjpp") + } + resources { + srcDirs("build/sources/sjpp/java") + include("**/graphviz.dat") + include("**/*.png") + include("**/*.svg") + include("**/*.txt") + } + } +} + +tasks.compileJava { + if (JavaVersion.current().isJava8) { + java.targetCompatibility = JavaVersion.VERSION_1_8 + } else { + options.release.set(Integer.parseInt(javacRelease)) + } +} + +tasks.withType().configureEach { + manifest { + attributes["Main-Class"] = "net.sourceforge.plantuml.Run" + attributes["Implementation-Version"] = archiveVersion + attributes["Build-Jdk-Spec"] = System.getProperty("java.specification.version") + from("../manifest.txt") + } + from("../skin") { into("skin") } + from("../stdlib") { into("stdlib") } + from("../svg") { into("svg") } + from("../themes") { into("themes") } + // source sets for java and resources are on "src", only put once into the jar + duplicatesStrategy = DuplicatesStrategy.EXCLUDE +} + +tasks.withType().configureEach { + options.encoding = "UTF-8" +} + +tasks.withType().configureEach { + options { + this as StandardJavadocDocletOptions + addBooleanOption("Xdoclint:none", true) + addStringOption("Xmaxwarns", "1") + encoding = "UTF-8" + isUse = true + } +} + +val syncSources by tasks.registering(Sync::class) { + from(rootProject.layout.projectDirectory.dir("src")) + into(project.layout.buildDirectory.dir("sources/sjpp/java")) +} + +val preprocessLicenceAntTask by tasks.registering() { + dependsOn(syncSources) + inputs.dir(project.layout.buildDirectory.dir("sources/sjpp/java")) + outputs.dir(project.layout.buildDirectory.dir("generated/sjpp")) + doLast { + ant.withGroovyBuilder { + "taskdef"( + "name" to "sjpp", + "classname" to "sjpp.SjppAntTask", + "classpath" to rootProject.layout.projectDirectory.files("sjpp.jar").asPath + ) + "sjpp"( + "src" to project.layout.buildDirectory.dir("sources/sjpp/java").get().asFile.absolutePath, + "dest" to project.layout.buildDirectory.dir("generated/sjpp").get().asFile.absolutePath, + "define" to "__GPLV2__", + "header" to project.layout.buildDirectory.file("../gplv2-license.txt").get().asFile.absolutePath + ) + } + } +} + +tasks.processResources{ + dependsOn(preprocessLicenceAntTask) +} + +tasks.compileJava{ + dependsOn(preprocessLicenceAntTask) +} + +tasks.named("sourcesJar"){ + dependsOn(preprocessLicenceAntTask) +} + +publishing { + publications.create("maven") { + from(components["java"]) + pom { + name.set("PlantUML") + description.set("PlantUML is a component that allows to quickly write diagrams from text.") + groupId = project.group as String + artifactId = project.name + version = project.version as String + url.set("https://plantuml.com/") + licenses { + license { + name.set("GPLv2 License") + url.set("https://www.gnu.org/licenses/old-licenses/gpl-2.0.html") + } + } + developers { + developer { + id.set("arnaud.roques") + name.set("Arnaud Roques") + email.set("plantuml@gmail.com") + } + } + scm { + connection.set("scm:git:git://github.com:plantuml/plantuml.git") + developerConnection.set("scm:git:ssh://git@github.com:plantuml/plantuml.git") + url.set("https://github.com/plantuml/plantuml") + } + } + } + repositories { + maven { + name = "OSSRH" + val releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" + val snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/" + url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl) + credentials { + username = System.getenv("OSSRH_USERNAME") + password = System.getenv("OSSRH_PASSWORD") + } + } + } +} + +signing { + if (hasProperty("signing.gnupg.keyName") && hasProperty("signing.gnupg.passphrase")) { + useGpgCmd() + } else if (hasProperty("signingKey") && hasProperty("signingPassword")) { + val signingKey: String? by project + val signingPassword: String? by project + useInMemoryPgpKeys(signingKey, signingPassword) + } + if (hasProperty("signing.gnupg.passphrase") || hasProperty("signingPassword")) { + sign(publishing.publications["maven"]) + } +} diff --git a/plantuml-gplv2/gplv2-license.txt b/plantuml-gplv2/gplv2-license.txt new file mode 100644 index 000000000..583dafb5a --- /dev/null +++ b/plantuml-gplv2/gplv2-license.txt @@ -0,0 +1,70 @@ +/* +======================================================================= + * | + * | 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/liberapay (only 1€ per month!) + * https://plantuml.com/paypal + * + * + * PlantUML is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License V2. + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [GNU General Public License V2] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * + * 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. + * + * PlantUML can occasionally display sponsored or advertising messages. Those + * messages are usually generated on welcome or error images and never on + * functional diagrams. + * See https://plantuml.com/professional if you want to remove them + * + * Images (whatever their format : PNG, SVG, EPS...) generated by running PlantUML + * are owned by the author of their corresponding sources code (that is, their + * textual description in PlantUML language). Those images are not covered by + * this GPL v2 license. + * + * The generated images can then be used without any reference to the GPL v2 license. + * It is not even necessary to stipulate that they have been generated with PlantUML, + * although this will be appreciated by the PlantUML team. + * + * There is an exception : if the textual description in PlantUML language is also covered + * by any license, then the generated images are logically covered + * by the very same license. + * + * This is the IGY distribution (Install GraphViz by Yourself). + * You have to install GraphViz and to setup the GRAPHVIZ_DOT environment variable + * (see https://plantuml.com/graphviz-dot ) + * + * Icons provided by OpenIconic : https://useiconic.com/open + * Archimate sprites provided by Archi : http://www.archimatetool.com + * Stdlib AWS provided by https://github.com/milo-minderbinder/AWS-PlantUML + * Stdlib Icons provided https://github.com/tupadr3/plantuml-icon-font-sprites + * ASCIIMathML (c) Peter Jipsen http://www.chapman.edu/~jipsen + * ASCIIMathML (c) David Lippman http://www.pierce.ctc.edu/dlippman + * CafeUndZopfli ported by Eugene Klyuchnikov https://github.com/eustas/CafeUndZopfli + * Brotli (c) by the Brotli Authors https://github.com/google/brotli + * Themes (c) by Brett Schwarz https://github.com/bschwarz/puml-themes + * Twemoji (c) by Twitter at https://twemoji.twitter.com/ + * + */ \ No newline at end of file diff --git a/plantuml-lgpl/build.gradle.kts b/plantuml-lgpl/build.gradle.kts index 98fce577b..f110030e0 100644 --- a/plantuml-lgpl/build.gradle.kts +++ b/plantuml-lgpl/build.gradle.kts @@ -24,9 +24,9 @@ java { } dependencies { - compileOnly("org.apache.ant:ant:1.10.13") + compileOnly("org.apache.ant:ant:1.10.14") testImplementation("org.assertj:assertj-core:3.24.2") - testImplementation("org.junit.jupiter:junit-jupiter:5.9.2") + testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") testImplementation("org.scilab.forge:jlatexmath:1.0.7") } @@ -41,7 +41,7 @@ sourceSets { srcDirs("build/generated/sjpp") } resources { - srcDirs("build/generated/sjpp") + srcDirs("build/sources/sjpp/java") include("**/*.png") include("**/*.svg") include("**/*.txt") diff --git a/plantuml-mit/build.gradle.kts b/plantuml-mit/build.gradle.kts index b5279c149..995be47c3 100644 --- a/plantuml-mit/build.gradle.kts +++ b/plantuml-mit/build.gradle.kts @@ -24,9 +24,9 @@ java { } dependencies { - compileOnly("org.apache.ant:ant:1.10.13") + compileOnly("org.apache.ant:ant:1.10.14") testImplementation("org.assertj:assertj-core:3.24.2") - testImplementation("org.junit.jupiter:junit-jupiter:5.9.2") + testImplementation("org.junit.jupiter:junit-jupiter:5.10.1") testImplementation("org.scilab.forge:jlatexmath:1.0.7") } @@ -41,7 +41,8 @@ sourceSets { srcDirs("build/generated/sjpp") } resources { - srcDirs("build/generated/sjpp") + srcDirs("build/sources/sjpp/java") + include("**/graphviz.dat") include("**/*.png") include("**/*.svg") include("**/*.txt") diff --git a/settings.gradle.kts b/settings.gradle.kts index 9c11c02ca..94dcb095c 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -14,4 +14,6 @@ include("plantuml-bsd") include("plantuml-epl") include("plantuml-lgpl") include("plantuml-mit") +include("plantuml-gplv2") + diff --git a/skin/plantuml.skin b/skin/plantuml.skin index b48a58394..9f7920474 100644 --- a/skin/plantuml.skin +++ b/skin/plantuml.skin @@ -248,6 +248,12 @@ stateDiagram { header { FontSize 12 } + circle { + start, stop, end { + LineColor #2 + BackgroundColor #2 + } + } } @@ -326,18 +332,10 @@ activityDiagram { LineThickness 1 } circle { - start { + start, stop, end { LineColor #2 BackgroundColor #2 } - stop { - LineColor #2 - BackgroundColor transparent - } - end { - LineColor #2 - BackgroundColor transparent - } } activityBar { BackgroundColor #5 @@ -610,18 +608,10 @@ activityDiagram { LineColor white } circle { - start { + start, stop, end { LineColor #d BackgroundColor #d } - stop { - LineColor #d - BackgroundColor transparent - } - end { - LineColor #d - BackgroundColor transparent - } } activityBar { BackgroundColor #a diff --git a/skin/rose.skin b/skin/rose.skin index 420e84933..beb7ee289 100644 --- a/skin/rose.skin +++ b/skin/rose.skin @@ -262,6 +262,12 @@ stateDiagram { FontStyle plain } } + circle { + start, stop, end { + LineColor black + BackgroundColor black + } + } } @@ -382,18 +388,10 @@ activityDiagram { FontSize 11 } circle { - start { + start, stop, end { LineColor black BackgroundColor black } - stop { - LineColor black - BackgroundColor white - } - end { - LineColor black - BackgroundColor white - } } activityBar { Shadowing 3.0 diff --git a/src/com/plantuml/api/cheerpj/package-info.java b/src/com/plantuml/api/cheerpj/package-info.java new file mode 100644 index 000000000..9aac61d05 --- /dev/null +++ b/src/com/plantuml/api/cheerpj/package-info.java @@ -0,0 +1,7 @@ +/** + * Provides classes used to manage PlantUML with the + * + * CheerpJ API. + * + */ +package com.plantuml.api.cheerpj; diff --git a/src/com/plantuml/api/cheerpj/readme.md b/src/com/plantuml/api/cheerpj/readme.md new file mode 100644 index 000000000..b2e105d15 --- /dev/null +++ b/src/com/plantuml/api/cheerpj/readme.md @@ -0,0 +1,16 @@ +# Directory Documentation for `cheerpj` + +## Description +This package provides classes used to manage [CheerpJ](https://labs.leaningtech.com/cheerpj3) API. + +## Reference +- [CheerpJ](https://labs.leaningtech.com/cheerpj3) + +## Use by +- :octocat: [plantuml/plantuml-core](https://github.com/plantuml/plantuml-core) + - on [`/plantuml-core/src/main/java`](https://github.com/plantuml/plantuml-core/tree/main/plantuml-core/src/main/java) +- :octocat: [plantuml/plantuml.js](https://github.com/plantuml/plantuml.js) + +## Demonstration +- [`plantuml-core/raw.html`](https://plantuml.github.io/plantuml-core/raw.html) +- [`plantuml.js`](https://plantuml.github.io/plantuml.js/) diff --git a/src/gen/annotation/package-info.java b/src/gen/annotation/package-info.java new file mode 100644 index 000000000..dc20670c9 --- /dev/null +++ b/src/gen/annotation/package-info.java @@ -0,0 +1,12 @@ +/** + * This package is part of Smetana: + * the internal port (from C to Java) + * of GraphViz/Dot + * in plantuml. + * + * @see h + * @see smetana.core + * @see net.sourceforge.plantuml.sdot + * + */ +package gen.annotation; diff --git a/src/gen/package-info.java b/src/gen/package-info.java new file mode 100644 index 000000000..b281c4a80 --- /dev/null +++ b/src/gen/package-info.java @@ -0,0 +1,12 @@ +/** + * This package is part of Smetana: + * the internal port (from C to Java) + * of GraphViz/Dot + * in plantuml. + * + * @see h + * @see smetana.core + * @see net.sourceforge.plantuml.sdot + * + */ +package gen; diff --git a/src/gen/readme.md b/src/gen/readme.md new file mode 100644 index 000000000..fa8a1f9de --- /dev/null +++ b/src/gen/readme.md @@ -0,0 +1,28 @@ +# Directory Documentation for `gen` + +## Description +This package is part of Smetana: the internal port (from `C` to `Java`) of [GraphViz/Dot](https://graphviz.org) in [plantuml](https://plantuml.com/smetana02). + +## Link +- [Smetana](https://plantuml.com/smetana02) and :octocat: [plantuml/smetana](https://github.com/plantuml/smetana) + - [`src/h`](../h) + - [`src/gen`](../gen) + - [`src/smetana/core`](../smetana/core) + +## Reference +- [Graphviz](https://graphviz.org) +- [Graphviz DOT Language](https://www.graphviz.org/doc/info/lang.html) +- [Graphviz _(on GitLab)_](https://gitlab.com/graphviz/graphviz/) +- [Graphviz _(on Wikipedia)_](https://en.wikipedia.org/wiki/Graphviz) + +## Credit +- :octocat: [plantuml/smetana](https://github.com/plantuml/smetana) + +## Internaly use by +- [`plantuml/sdot`](../net/sourceforge/plantuml/sdot) +- [`plantuml/gitlog/SmetanaForGit.java`](../net/sourceforge/plantuml/gitlog/SmetanaForGit.java) +- [`plantuml/jsondiagram/SmetanaForJson.java`](../net/sourceforge/plantuml/jsondiagram/SmetanaForJson.java) + +## Misc. +- [BedΕ™ich Smetana _(on Wikipedia)_](https://en.wikipedia.org/wiki/Bed%C5%99ich_Smetana) +- [Smetana _(on Wikipedia)_](https://en.wikipedia.org/wiki/Smetana_(disambiguation)) diff --git a/src/h/package-info.java b/src/h/package-info.java new file mode 100644 index 000000000..dff6c2a46 --- /dev/null +++ b/src/h/package-info.java @@ -0,0 +1,23 @@ +/** + * This package is part of Smetana: + * the internal port (from C to Java) + * of GraphViz/Dot + * in plantuml. + * + *

+ * Port of the C header (.h) of Graphviz on Java: + *

    + *
  • EN for enumeration or enum
  • + *
  • ST for structure
  • + *
+ *

+ * + * @see gen + * @see gen.annotation + * @see gen.lib + * @see gen.plugin.dot_layout + * @see smetana.core + * @see net.sourceforge.plantuml.sdot + * + */ +package h; diff --git a/src/h/readme.md b/src/h/readme.md new file mode 100644 index 000000000..473884ccb --- /dev/null +++ b/src/h/readme.md @@ -0,0 +1,32 @@ +# Directory Documentation for `h` + +## Description +This package is part of Smetana: the internal port (from `C` to `Java`) of [GraphViz/Dot](https://graphviz.org) in [plantuml](https://plantuml.com/smetana02). + +Port of the `C header` (`.h`) of Graphviz on Java: +- `EN` for `enumeration` or `enum` +- `ST` for `structure` + +## Link +- [Smetana](https://plantuml.com/smetana02) and :octocat: [plantuml/smetana](https://github.com/plantuml/smetana) + - [`src/h`](../h) + - [`src/gen`](../gen) + - [`src/smetana/core`](../smetana/core) + +## Reference +- [Graphviz](https://graphviz.org) +- [Graphviz DOT Language](https://www.graphviz.org/doc/info/lang.html) +- [Graphviz _(on GitLab)_](https://gitlab.com/graphviz/graphviz/) +- [Graphviz _(on Wikipedia)_](https://en.wikipedia.org/wiki/Graphviz) + +## Credit +- :octocat: [plantuml/smetana](https://github.com/plantuml/smetana) + +## Internaly use by +- [`plantuml/sdot`](../net/sourceforge/plantuml/sdot) +- [`plantuml/gitlog/SmetanaForGit.java`](../net/sourceforge/plantuml/gitlog/SmetanaForGit.java) +- [`plantuml/jsondiagram/SmetanaForJson.java`](../net/sourceforge/plantuml/jsondiagram/SmetanaForJson.java) + +## Misc. +- [BedΕ™ich Smetana _(on Wikipedia)_](https://en.wikipedia.org/wiki/Bed%C5%99ich_Smetana) +- [Smetana _(on Wikipedia)_](https://en.wikipedia.org/wiki/Smetana_(disambiguation)) diff --git a/src/net/atmp/CucaDiagram.java b/src/net/atmp/CucaDiagram.java index 39cd59929..d13c5fda3 100644 --- a/src/net/atmp/CucaDiagram.java +++ b/src/net/atmp/CucaDiagram.java @@ -84,10 +84,12 @@ import net.sourceforge.plantuml.security.SecurityUtils; import net.sourceforge.plantuml.skin.UmlDiagramType; import net.sourceforge.plantuml.skin.VisibilityModifier; import net.sourceforge.plantuml.statediagram.StateDiagram; +import net.sourceforge.plantuml.stereo.Stereotype; import net.sourceforge.plantuml.style.ClockwiseTopRightBottomLeft; import net.sourceforge.plantuml.svek.CucaDiagramFileMaker; import net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek; import net.sourceforge.plantuml.text.BackSlash; +import net.sourceforge.plantuml.text.Guillemet; import net.sourceforge.plantuml.xmi.CucaDiagramXmiMaker; import net.sourceforge.plantuml.xmlsc.StateDiagramScxmlMaker; @@ -523,6 +525,41 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, return result; } + @Override + public List getVisibleStereotypeLabels(Entity entity) { + Stereotype stereotype = entity.getStereotype(); + + if (stereotype == null) { + return null; + } + + List commands = new ArrayList<>(); + for (EntityHideOrShow hideOrShowEntry : hideOrShows) { + if (hideOrShowEntry.portion == EntityPortion.STEREOTYPE) { + commands.add(hideOrShowEntry); + } + } + + List visibleStereotypeLabels = new ArrayList<>(); + for (String stereoTypeLabel : entity.getStereotype().getLabels(Guillemet.DOUBLE_COMPARATOR)) { + if (isHiddenStereotypeLabel(stereoTypeLabel, commands)) { + visibleStereotypeLabels.add(stereoTypeLabel); + } + } + + return visibleStereotypeLabels; + } + + private boolean isHiddenStereotypeLabel(String stereoTypeLabel, List commands) { + for (EntityHideOrShow cmd : commands) { + String gender = cmd.gender.getGender(); + if (gender != null && gender.equals(stereoTypeLabel)) { + return false; + } + } + return true; + } + public final void hideOrShow(EntityGender gender, EntityPortion portions, boolean show) { for (EntityPortion portion : portions.asSet()) this.hideOrShows.add(new EntityHideOrShow(gender, portion, show)); diff --git a/src/net/atmp/ImageBuilder.java b/src/net/atmp/ImageBuilder.java index 3ce84f890..078a00562 100644 --- a/src/net/atmp/ImageBuilder.java +++ b/src/net/atmp/ImageBuilder.java @@ -37,8 +37,6 @@ package net.atmp; import java.awt.Color; import java.awt.Graphics2D; -import java.awt.Image; -import java.awt.geom.AffineTransform; import java.awt.image.BufferedImage; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -46,22 +44,16 @@ import java.io.OutputStream; import java.util.Random; import java.util.Set; -import javax.swing.ImageIcon; - import com.plantuml.api.cheerpj.WasmLog; -import net.sourceforge.plantuml.AnimatedGifEncoder; import net.sourceforge.plantuml.AnnotatedBuilder; import net.sourceforge.plantuml.AnnotatedWorker; import net.sourceforge.plantuml.EmptyImageBuilder; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormatOption; -import net.sourceforge.plantuml.FileUtils; import net.sourceforge.plantuml.OptionFlags; import net.sourceforge.plantuml.Scale; import net.sourceforge.plantuml.TitledDiagram; -import net.sourceforge.plantuml.anim.AffineTransformation; -import net.sourceforge.plantuml.anim.Animation; import net.sourceforge.plantuml.api.ImageDataComplex; import net.sourceforge.plantuml.api.ImageDataSimple; import net.sourceforge.plantuml.braille.UGraphicBraille; @@ -87,14 +79,10 @@ import net.sourceforge.plantuml.klimt.drawing.tikz.UGraphicTikz; import net.sourceforge.plantuml.klimt.drawing.txt.UGraphicTxt; import net.sourceforge.plantuml.klimt.drawing.visio.UGraphicVdx; import net.sourceforge.plantuml.klimt.font.StringBounder; -import net.sourceforge.plantuml.klimt.geom.MinMax; import net.sourceforge.plantuml.klimt.geom.XDimension2D; 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.mjpeg.MJPEGGenerator; -import net.sourceforge.plantuml.security.SFile; -import net.sourceforge.plantuml.security.SImageIO; import net.sourceforge.plantuml.skin.ColorParam; import net.sourceforge.plantuml.skin.CornerParam; import net.sourceforge.plantuml.skin.LineParam; @@ -113,9 +101,6 @@ import net.sourceforge.plantuml.url.Url; public class ImageBuilder { - // ::comment when __CORE__ - private Animation animation; - // ::done private boolean annotations; private HColor backcolor = getDefaultHBackColor(); @@ -223,9 +208,6 @@ public class ImageBuilder { public ImageBuilder styled(TitledDiagram diagram) { skinParam = diagram.getSkinParam(); stringBounder = fileFormatOption.getDefaultStringBounder(skinParam); - // ::comment when __CORE__ - animation = diagram.getAnimation(); - // ::done annotations = true; backcolor = diagram.calculateBackColor(); margin = calculateMargin(diagram); @@ -246,21 +228,7 @@ public class ImageBuilder { udrawable = annotatedWorker.addAdd((TextBlock) udrawable); } - // ::comment when __CORE__ - switch (fileFormatOption.getFileFormat()) { - case MJPEG: - return writeImageMjpeg(os); - case ANIMATED_GIF: - return writeImageAnimatedGif(os); - default: - return writeImageInternal(os, animation); - // ::done - // ::uncomment when __CORE__ - // return writeImageInternal(os); - // ::done - // ::comment when __CORE__ - } - // ::done + return writeImageInternal(os); } public byte[] writeByteArray() throws IOException { @@ -270,34 +238,16 @@ public class ImageBuilder { } } - // ::revert when __CORE__ - private ImageData writeImageInternal(OutputStream os, Animation animationArg) throws IOException { - // private ImageData writeImageInternal(OutputStream os) throws IOException { - // ::done + private ImageData writeImageInternal(OutputStream os) throws IOException { XDimension2D dim = getFinalDimension(); - double dx = 0; - double dy = 0; - // ::comment when __CORE__ - if (animationArg != null) { - final MinMax minmax = animationArg.getMinMax(dim); - animationArg.setDimension(dim); - dim = minmax.getDimension(); - dx = -minmax.getMinX(); - dy = -minmax.getMinY(); - } - // ::done final Scale scale = titledDiagram == null ? null : titledDiagram.getScale(); final double scaleFactor = (scale == null ? 1 : scale.getScale(dim.getWidth(), dim.getHeight())) * getDpi() / 96.0; if (scaleFactor <= 0) throw new IllegalStateException("Bad scaleFactor"); WasmLog.log("...image drawing..."); - // ::revert when __CORE__ - UGraphic ug = createUGraphic(dim, animationArg, dx, dy, scaleFactor, + UGraphic ug = createUGraphic(dim, scaleFactor, titledDiagram == null ? new Pragma() : titledDiagram.getPragma()); - // UGraphic ug = createUGraphic(dim, dx, dy, scaleFactor, - // titledDiagram == null ? new Pragma() : titledDiagram.getPragma()); - // ::done maybeDrawBorder(ug, dim); if (randomPixel) drawRandomPoint(ug); @@ -330,9 +280,9 @@ public class ImageBuilder { if (stroke == null) return; - final URectangle rectangle = URectangle.build(dim.getWidth() - stroke.getThickness(), - dim.getHeight() - stroke.getThickness()) - .rounded(skinParam.getRoundCorner(CornerParam.diagramBorder, null)); + final URectangle rectangle = URectangle + .build(dim.getWidth() - stroke.getThickness(), dim.getHeight() - stroke.getThickness()) + .rounded(skinParam.getRoundCorner(CornerParam.diagramBorder, null)); ug.apply(color == null ? HColors.BLACK : color).apply(stroke).draw(rectangle); } @@ -364,83 +314,13 @@ public class ImageBuilder { return ug; } - // ::comment when __CORE__ - private ImageData writeImageMjpeg(OutputStream os) throws IOException { - - final XDimension2D dim = getFinalDimension(); - - final SFile f = new SFile("c:/tmp.avi"); - - final int nbframe = 100; - - final MJPEGGenerator m = new MJPEGGenerator(f, getAviImage(null).getWidth(null), - getAviImage(null).getHeight(null), 12.0, nbframe); - for (int i = 0; i < nbframe; i++) { - // AffineTransform at = AffineTransform.getRotateInstance(1.0); - AffineTransform at = AffineTransform.getTranslateInstance(dim.getWidth() / 2, dim.getHeight() / 2); - at.rotate(90.0 * Math.PI / 180.0 * i / 100); - at.translate(-dim.getWidth() / 2, -dim.getHeight() / 2); - // final AffineTransform at = AffineTransform.getTranslateInstance(i, 0); - // final ImageIcon ii = new ImageIcon(getAviImage(at)); - // m.addImage(ii.getImage()); - throw new UnsupportedOperationException(); - } - m.finishAVI(); - - FileUtils.copyToStream(f, os); - - return createImageData(dim); - } - - private ImageData writeImageAnimatedGif(OutputStream os) throws IOException { - - final XDimension2D dim = getFinalDimension(); - - final MinMax minmax = animation.getMinMax(dim); - - final AnimatedGifEncoder e = new AnimatedGifEncoder(); - // e.setQuality(1); - e.setRepeat(0); - e.start(os); - // e.setDelay(1000); // 1 frame per sec - // e.setDelay(100); // 10 frame per sec - e.setDelay(60); // 16 frame per sec - // e.setDelay(50); // 20 frame per sec - - for (AffineTransformation at : animation.getAll()) { - final ImageIcon ii = new ImageIcon(getAviImage(at)); - e.addFrame((BufferedImage) ii.getImage()); - } - e.finish(); - return createImageData(dim); - } - - private Image getAviImage(AffineTransformation affineTransform) throws IOException { - final ByteArrayOutputStream baos = new ByteArrayOutputStream(); - writeImageInternal(baos, Animation.singleton(affineTransform)); - baos.close(); - return SImageIO.read(baos.toByteArray()); - } - // ::done - - // ::revert when __CORE__ - private UGraphic createUGraphic(final XDimension2D dim, Animation animationArg, double dx, double dy, - double scaleFactor, Pragma pragma) { - // private UGraphic createUGraphic(final XDimension2D dim, double dx, double dy, - // double scaleFactor, Pragma pragma) { - // ::done + private UGraphic createUGraphic(final XDimension2D dim, double scaleFactor, Pragma pragma) { final ColorMapper colorMapper = fileFormatOption.getColorMapper(); switch (fileFormatOption.getFileFormat()) { case PNG: case RAW: - // ::comment when __CORE__ - return createUGraphicPNG(scaleFactor, dim, animationArg, dx, dy, fileFormatOption.getWatermark(), + return createUGraphicPNG(scaleFactor, dim, fileFormatOption.getWatermark(), fileFormatOption.getFileFormat()); - // ::done - // ::uncomment when __CORE__ - // return createUGraphicPNG(scaleFactor, dim, dx, dy, - // fileFormatOption.getWatermark(), fileFormatOption.getFileFormat()); - // ::done case SVG: return createUGraphicSVG(scaleFactor, dim, pragma); // ::comment when __CORE__ @@ -492,14 +372,8 @@ public class ImageBuilder { } - // ::uncomment when __CORE__ - // private UGraphic createUGraphicPNG(double scaleFactor, final XDimension2D - // dim, double dx, double dy, String watermark, FileFormat format) { - // ::done - // ::comment when __CORE__ - private UGraphic createUGraphicPNG(double scaleFactor, final XDimension2D dim, Animation affineTransforms, - double dx, double dy, String watermark, FileFormat format) { - // ::done + private UGraphic createUGraphicPNG(double scaleFactor, final XDimension2D dim, String watermark, + FileFormat format) { Color pngBackColor = new Color(0, 0, 0, 0); if (this.backcolor instanceof HColorSimple) @@ -513,15 +387,9 @@ public class ImageBuilder { (int) (dim.getHeight() * scaleFactor), pngBackColor, stringBounder); final Graphics2D graphics2D = builder.getGraphics2D(); - // ::comment when __CORE__ final UGraphicG2d ug = new UGraphicG2d(backcolor, fileFormatOption.getColorMapper(), stringBounder, graphics2D, - scaleFactor, dx, dy, format, affineTransforms == null ? null : affineTransforms.getFirst()); - // ::done - // ::uncomment when __CORE__ - // final UGraphicG2d ug = new UGraphicG2d(backcolor, - // fileFormatOption.getColorMapper(), stringBounder, graphics2D, - // scaleFactor, dx, dy, format); - // ::done + scaleFactor, format); + ug.setBufferedImage(builder.getBufferedImage()); final BufferedImage im = ug.getBufferedImage(); if (this.backcolor instanceof HColorGradient) diff --git a/src/net/sourceforge/plantuml/AbstractPSystem.java b/src/net/sourceforge/plantuml/AbstractPSystem.java index bce725466..abebc8b07 100644 --- a/src/net/sourceforge/plantuml/AbstractPSystem.java +++ b/src/net/sourceforge/plantuml/AbstractPSystem.java @@ -67,6 +67,15 @@ import net.sourceforge.plantuml.utils.BlocLines; import net.sourceforge.plantuml.version.License; import net.sourceforge.plantuml.version.Version; +/** + * An abstract class for all diagram classes. + * + *

+ * Short for "{@link net.sourceforge.plantuml.plasma plasma} system", although + * most newer diagram types do not use entities stored in a plasma. + * + * @see PSystemBuilder + */ public abstract class AbstractPSystem implements Diagram { // ::remove file when __HAXE__ diff --git a/src/net/sourceforge/plantuml/FileFormat.java b/src/net/sourceforge/plantuml/FileFormat.java index 2de98c84e..bff8ddeb9 100644 --- a/src/net/sourceforge/plantuml/FileFormat.java +++ b/src/net/sourceforge/plantuml/FileFormat.java @@ -76,8 +76,6 @@ public enum FileFormat { SCXML("application/scxml+xml"), // GRAPHML("application/graphml+xml"), // PDF("application/pdf"), // - MJPEG("video/x-msvideo"), // - ANIMATED_GIF("image/gif"), // HTML("text/html"), // HTML5("text/html"), // VDX("application/vnd.visio.xml"), // @@ -112,15 +110,9 @@ public enum FileFormat { if (name().startsWith("XMI")) return ".xmi"; - if (this == MJPEG) - return ".avi"; - if (this == LATEX || this == LATEX_NO_PREAMBLE) return ".tex"; - if (this == ANIMATED_GIF) - return ".gif"; - if (this == BRAILLE_PNG) return ".braille.png"; diff --git a/src/net/sourceforge/plantuml/OptionFlags.java b/src/net/sourceforge/plantuml/OptionFlags.java index 6c2bf5bac..bd0e912f4 100644 --- a/src/net/sourceforge/plantuml/OptionFlags.java +++ b/src/net/sourceforge/plantuml/OptionFlags.java @@ -83,7 +83,7 @@ public class OptionFlags { static public void setMaxPixel(int max) { } - static public final boolean USE_HECTOR = false; + // static public final boolean USE_HECTOR = false; static public boolean ADD_NICE_FOR_DOT = false; // static public final boolean USE_IF_VERTICAL = true; diff --git a/src/net/sourceforge/plantuml/PSystemBuilder.java b/src/net/sourceforge/plantuml/PSystemBuilder.java index 8faf8df5d..4838270f2 100644 --- a/src/net/sourceforge/plantuml/PSystemBuilder.java +++ b/src/net/sourceforge/plantuml/PSystemBuilder.java @@ -71,6 +71,7 @@ import net.sourceforge.plantuml.eggs.PSystemWelcomeFactory; import net.sourceforge.plantuml.emoji.PSystemListEmojiFactory; import net.sourceforge.plantuml.error.PSystemError; import net.sourceforge.plantuml.error.PSystemErrorUtils; +import net.sourceforge.plantuml.error.PSystemUnsupported; import net.sourceforge.plantuml.filesdiagram.FilesDiagramFactory; import net.sourceforge.plantuml.flowdiagram.FlowDiagramFactory; import net.sourceforge.plantuml.font.PSystemListFontsFactory; @@ -109,6 +110,15 @@ import net.sourceforge.plantuml.wbs.WBSDiagramFactory; import net.sourceforge.plantuml.wire.WireDiagramFactory; import net.sourceforge.plantuml.yaml.YamlDiagramFactory; +/** + * Builds a diagram from pre-processed PlantUML source. + * + *

+ * Tries each of the factories (enumerated in the static block below) until one + * succeeds. + * + * @see AbstractPSystem + */ public class PSystemBuilder { // ::remove file when __HAXE__ @@ -138,6 +148,9 @@ public class PSystemBuilder { } final DiagramType diagramType = umlSource.getDiagramType(); + if (diagramType == DiagramType.UNKNOWN) + return new PSystemUnsupported(umlSource); + final List errors = new ArrayList<>(); for (PSystemFactory systemFactory : factories) { if (diagramType != systemFactory.getDiagramType()) @@ -151,6 +164,8 @@ public class PSystemBuilder { } errors.add((PSystemError) sys); } + if (errors.size() == 0) + return new PSystemUnsupported(umlSource); result = PSystemErrorUtils.merge(errors); return result; @@ -210,10 +225,12 @@ public class PSystemBuilder { // ::done // ::comment when __CORE__ or __MIT__ or __EPL__ or __BSD__ or __ASL__ or __LGPL__ - factories.add(new PSystemDitaaFactory()); factories.add(new PSystemJcckitFactory()); factories.add(new PSystemSudokuFactory()); // ::done + // ::comment when __CORE__ or __MIT__ or __EPL__ or __BSD__ or __ASL__ + factories.add(new PSystemDitaaFactory()); + // ::done // ::comment when __CORE__ factories.add(new PSystemDefinitionFactory()); diff --git a/src/net/sourceforge/plantuml/Pipe.java b/src/net/sourceforge/plantuml/Pipe.java index 3e4b84ac1..21aa7dfef 100644 --- a/src/net/sourceforge/plantuml/Pipe.java +++ b/src/net/sourceforge/plantuml/Pipe.java @@ -47,13 +47,14 @@ import java.io.PrintStream; import java.io.UnsupportedEncodingException; import java.nio.charset.Charset; import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.error.PSystemError; import net.sourceforge.plantuml.preproc.Defines; import net.sourceforge.plantuml.security.SFile; -import net.sourceforge.plantuml.url.CMapData; public class Pipe { // ::remove file when __CORE__ @@ -190,7 +191,12 @@ public class Pipe { if (state == State.START_MARK_NOT_FOUND && line.startsWith("@start")) { sb.setLength(0); // discard any previous input state = State.START_MARK_FOUND; - expectedEnd = "@end" + line.substring(6).split("^[A-Za-z]")[0]; + final Matcher m = Pattern.compile("@start([A-Za-z]*)").matcher(line); + if (m.matches()) + expectedEnd = "@end" + m.group(1); + else + expectedEnd = "@end"; + } else if (state == State.START_MARK_FOUND && line.startsWith(expectedEnd)) { state = State.COMPLETE; } diff --git a/src/net/sourceforge/plantuml/SourceStringReader.java b/src/net/sourceforge/plantuml/SourceStringReader.java index 9ed71af7a..32e7f5ace 100644 --- a/src/net/sourceforge/plantuml/SourceStringReader.java +++ b/src/net/sourceforge/plantuml/SourceStringReader.java @@ -154,7 +154,7 @@ public class SourceStringReader { public DiagramDescription outputImage(OutputStream os, int numImage, FileFormatOption fileFormatOption) throws IOException { if (blocks.size() == 0) { - noStartumlFound(os, fileFormatOption); + noValidStartFound(os, fileFormatOption); return null; } for (BlockUml b : blocks) { @@ -230,8 +230,8 @@ public class SourceStringReader { } - public ImageData noStartumlFound(OutputStream os, FileFormatOption fileFormatOption) throws IOException { - final TextBlock error = GraphicStrings.createForError(Arrays.asList("No @startuml/@enduml found"), + 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"), 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 380bf6f4f..f5faeba59 100644 --- a/src/net/sourceforge/plantuml/TitledDiagram.java +++ b/src/net/sourceforge/plantuml/TitledDiagram.java @@ -42,8 +42,6 @@ import java.util.Map; import net.atmp.ImageBuilder; import net.sourceforge.plantuml.abel.DisplayPositioned; import net.sourceforge.plantuml.abel.DisplayPositionned; -import net.sourceforge.plantuml.anim.Animation; -import net.sourceforge.plantuml.anim.AnimationDecoder; import net.sourceforge.plantuml.api.ApiStable; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.core.Diagram; @@ -88,10 +86,6 @@ public abstract class TitledDiagram extends AbstractPSystem implements Diagram, private final SkinParam skinParam; - // ::comment when __CORE__ - private Animation animation; - // ::done - private final Pragma pragma = new Pragma(); public Pragma getPragma() { @@ -218,21 +212,6 @@ public abstract class TitledDiagram extends AbstractPSystem implements Diagram, return ClockwiseTopRightBottomLeft.same(10); } - // ::comment when __CORE__ - final public void setAnimation(Iterable animationData) { -// try { - final AnimationDecoder animationDecoder = new AnimationDecoder(animationData); - this.animation = Animation.create(animationDecoder.decode()); -// } catch (ScriptException e) { -// Logme.error(e); -// } - } - - final public Animation getAnimation() { - return animation; - } - // ::done - @Override public ImageBuilder createImageBuilder(FileFormatOption fileFormatOption) throws IOException { return super.createImageBuilder(fileFormatOption).styled(this); diff --git a/src/net/sourceforge/plantuml/UmlDiagram.java b/src/net/sourceforge/plantuml/UmlDiagram.java index 67860d2cb..0025f7843 100644 --- a/src/net/sourceforge/plantuml/UmlDiagram.java +++ b/src/net/sourceforge/plantuml/UmlDiagram.java @@ -38,10 +38,8 @@ package net.sourceforge.plantuml; import static net.atmp.ImageBuilder.plainImageBuilder; import java.awt.Color; -import java.awt.geom.AffineTransform; import java.awt.image.BufferedImage; import java.io.BufferedOutputStream; -import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; @@ -74,10 +72,8 @@ import net.sourceforge.plantuml.klimt.shape.TextBlock; import net.sourceforge.plantuml.klimt.shape.UDrawable; import net.sourceforge.plantuml.klimt.shape.UImage; import net.sourceforge.plantuml.log.Logme; -import net.sourceforge.plantuml.mjpeg.MJPEGGenerator; import net.sourceforge.plantuml.pdf.PdfConverter; import net.sourceforge.plantuml.security.SFile; -import net.sourceforge.plantuml.security.SImageIO; import net.sourceforge.plantuml.security.SecurityUtils; import net.sourceforge.plantuml.skin.UmlDiagramType; import net.sourceforge.plantuml.style.NoStyleAvailableException; @@ -258,27 +254,6 @@ public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annot } // ::comment when __CORE__ - private void exportDiagramInternalMjpeg(OutputStream os) throws IOException { - final SFile f = new SFile("c:/test.avi"); - final int nb = 150; - final double framerate = 30; - final MJPEGGenerator m = new MJPEGGenerator(f, 640, 480, framerate, nb); - - for (int i = 0; i < nb; i++) { - final AffineTransform at = new AffineTransform(); - final double coef = (nb - 1 - i) * 1.0 / nb; - at.setToShear(coef, coef); - final ByteArrayOutputStream baos = new ByteArrayOutputStream(); - // exportDiagramTOxxBEREMOVED(baos, null, 0, new - // FileFormatOption(FileFormat.PNG, at)); - baos.close(); - final BufferedImage im = SImageIO.read(baos.toByteArray()); - m.addImage(im); - } - m.finishAVI(); - - } - private ImageData exportDiagramInternalPdf(OutputStream os, int index) throws IOException { final File svg = FileUtils.createTempFileLegacy("pdf", ".svf"); final File pdfFile = FileUtils.createTempFileLegacy("pdf", ".pdf"); diff --git a/src/net/sourceforge/plantuml/abel/EntityGender.java b/src/net/sourceforge/plantuml/abel/EntityGender.java index 52fbfcf2f..fcfd43f2a 100644 --- a/src/net/sourceforge/plantuml/abel/EntityGender.java +++ b/src/net/sourceforge/plantuml/abel/EntityGender.java @@ -37,4 +37,6 @@ package net.sourceforge.plantuml.abel; public interface EntityGender { public boolean contains(Entity test); + + public String getGender(); } diff --git a/src/net/sourceforge/plantuml/abel/EntityGenderUtils.java b/src/net/sourceforge/plantuml/abel/EntityGenderUtils.java index cea3074a3..86417a1a0 100644 --- a/src/net/sourceforge/plantuml/abel/EntityGenderUtils.java +++ b/src/net/sourceforge/plantuml/abel/EntityGenderUtils.java @@ -44,6 +44,11 @@ public class EntityGenderUtils { public boolean contains(Entity test) { return test.getLeafType() == type; } + + @Override + public String getGender() { + return type.name(); + } }; } @@ -52,6 +57,11 @@ public class EntityGenderUtils { public boolean contains(Entity test) { return test.getUid().equals(entity.getUid()); } + + @Override + public String getGender() { + return entity.getUid(); + } }; } @@ -61,7 +71,19 @@ public class EntityGenderUtils { if (test.getStereotype() == null) { return false; } - return stereotype.equals(test.getStereotype().getLabel(Guillemet.DOUBLE_COMPARATOR)); + + for (String label : test.getStereotype().getLabels(Guillemet.DOUBLE_COMPARATOR)) { + if (label.equals(stereotype)) { + return true; + } + } + + return false; + } + + @Override + public String getGender() { + return stereotype; } }; } @@ -80,6 +102,11 @@ public class EntityGenderUtils { } return false; } + + @Override + public String getGender() { + return null; + } }; } @@ -88,6 +115,11 @@ public class EntityGenderUtils { public boolean contains(Entity test) { return g1.contains(test) && g2.contains(test); } + + @Override + public String getGender() { + return null; + } }; } @@ -96,6 +128,11 @@ public class EntityGenderUtils { public boolean contains(Entity test) { return true; } + + @Override + public String getGender() { + return null; + } }; } @@ -104,6 +141,11 @@ public class EntityGenderUtils { public boolean contains(Entity test) { return test.getBodier().getMethodsToDisplay().size() == 0; } + + @Override + public String getGender() { + return null; + } }; } @@ -112,7 +154,26 @@ public class EntityGenderUtils { public boolean contains(Entity test) { return test.getBodier().getFieldsToDisplay().size() == 0; } + + @Override + public String getGender() { + return null; + } + }; } + static public EntityGender byClassName(final String className) { + return new EntityGender() { + @Override + public boolean contains(Entity test) { + return className.equals(test.getName()); + } + + @Override + public String getGender() { + return className; + } + }; + } } diff --git a/src/net/sourceforge/plantuml/abel/package-info.java b/src/net/sourceforge/plantuml/abel/package-info.java new file mode 100644 index 000000000..d19894ec5 --- /dev/null +++ b/src/net/sourceforge/plantuml/abel/package-info.java @@ -0,0 +1,6 @@ +/** + * Provides classes used to manage {@link Entity}. + * + * @see net.sourceforge.plantuml.plasma + */ +package net.sourceforge.plantuml.abel; diff --git a/src/net/sourceforge/plantuml/abel/readme.md b/src/net/sourceforge/plantuml/abel/readme.md new file mode 100644 index 000000000..c3e87d7c9 --- /dev/null +++ b/src/net/sourceforge/plantuml/abel/readme.md @@ -0,0 +1,14 @@ +# Directory Documentation for `abel` + +## Description +This package provides classes used to manage [`Entity`](./Entity.java). + +## Link + +## Reference + +## Credit + +## Misc. +- [Abel _(on Wikipedia)_](https://en.wikipedia.org/wiki/Abel_(disambiguation)) +- [Niels Henrik Abel](https://en.wikipedia.org/wiki/Niels_Henrik_Abel) diff --git a/src/net/sourceforge/plantuml/acearth/package-info.java b/src/net/sourceforge/plantuml/acearth/package-info.java new file mode 100644 index 000000000..ff8536d87 --- /dev/null +++ b/src/net/sourceforge/plantuml/acearth/package-info.java @@ -0,0 +1,8 @@ +/** + * Provides classes used to generate + * + * XEarth Image. + * + * @see ext.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 new file mode 100644 index 000000000..a369bb7a5 --- /dev/null +++ b/src/net/sourceforge/plantuml/acearth/readme.md @@ -0,0 +1,20 @@ +# Directory Documentation for `acearth` + +## 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/). + +## Link +- [XEarth Image _(on `PlantUML`)_](https://plantuml.com/xearth) + +## Reference +- [`xearth` of Kirk Lauritz Johnson](https://hewgill.com/xearth/original/) +- [`xearth` for Windows of Greg Hewgill](https://hewgill.com/xearth/) + +## Credit +- [`AC.earth` of Christian Treber](../../../../ext/plantuml/com/ctreber/acearth/) +- [AC Earth _(on Web Archive)_](https://web.archive.org/web/20180428011447/http://www.acproductions.de/acearth) + +## Misc. +- [Earth Day _(on Wikipedia)_](https://en.wikipedia.org/wiki/Earth_Day) diff --git a/src/net/sourceforge/plantuml/activitydiagram/package-info.java b/src/net/sourceforge/plantuml/activitydiagram/package-info.java new file mode 100644 index 000000000..430c2b776 --- /dev/null +++ b/src/net/sourceforge/plantuml/activitydiagram/package-info.java @@ -0,0 +1,12 @@ +/** + * Provides classes used to manage + * + * Activity Diagram (legacy). + * + *

+ * For new syntax see {@link net.sourceforge.plantuml.activitydiagram3} + * and + * + * Activity Diagram (New Syntax). + */ +package net.sourceforge.plantuml.activitydiagram; diff --git a/src/net/sourceforge/plantuml/activitydiagram/readme.md b/src/net/sourceforge/plantuml/activitydiagram/readme.md new file mode 100644 index 000000000..90b7ac262 --- /dev/null +++ b/src/net/sourceforge/plantuml/activitydiagram/readme.md @@ -0,0 +1,18 @@ +# Directory Documentation for `activitydiagram` + +## Description +This package provides classes used to manage [Activity Diagram (legacy)](https://plantuml.com/activity-diagram-legacy). + +For new syntax see [`activitydiagram3`](../activitydiagram3) +and [Activity Diagram (New Syntax)](https://plantuml.com/activity-diagram-beta). + +## Link +- [Activity Diagram (legacy)](https://plantuml.com/activity-diagram-legacy) +- [Activity Diagram (New Syntax)](https://plantuml.com/activity-diagram-beta) + +## Reference + +## Credit + +## Misc. + diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java b/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java index ae5efd596..009bed4dc 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java @@ -388,11 +388,11 @@ public class ActivityDiagram3 extends UmlDiagram { } public CommandExecutionResult backward(Display label, BoxStyle boxStyle, LinkRendering incoming1, - LinkRendering incoming2) { + LinkRendering incoming2, Stereotype stereotype) { manageSwimlaneStrategy(); if (current() instanceof InstructionRepeat) { final InstructionRepeat instructionRepeat = (InstructionRepeat) current(); - instructionRepeat.setBackward(label, swinlanes.getCurrentSwimlane(), boxStyle, incoming1, incoming2); + instructionRepeat.setBackward(label, swinlanes.getCurrentSwimlane(), boxStyle, incoming1, incoming2, stereotype); return CommandExecutionResult.ok(); } if (current() instanceof InstructionWhile) { diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionRepeat.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionRepeat.java index 8b90f7221..287b84a21 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionRepeat.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionRepeat.java @@ -57,6 +57,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; public class InstructionRepeat extends AbstractInstruction implements Instruction { @@ -74,6 +75,7 @@ public class InstructionRepeat extends AbstractInstruction implements Instructio private Display backward = Display.NULL; + private Stereotype stereotype; private LinkRendering incoming1 = LinkRendering.none(); private LinkRendering incoming2 = LinkRendering.none(); private List backwardNotes = new ArrayList<>(); @@ -110,12 +112,13 @@ public class InstructionRepeat extends AbstractInstruction implements Instructio } public void setBackward(Display label, Swimlane swimlaneBackward, BoxStyle boxStyle, LinkRendering incoming1, - LinkRendering incoming2) { + LinkRendering incoming2, Stereotype stereotype) { this.backward = label; this.swimlaneBackward = swimlaneBackward; this.boxStyle = boxStyle; this.incoming1 = incoming1; this.incoming2 = incoming2; + this.stereotype = stereotype; } public boolean hasBackward() { @@ -166,7 +169,7 @@ public class InstructionRepeat extends AbstractInstruction implements Instructio if (Display.isNull(backward)) return null; - Ftile result = factory.activity(backward, swimlaneBackward, boxStyle, Colors.empty(), null); + Ftile result = factory.activity(backward, swimlaneBackward, boxStyle, Colors.empty(), stereotype); if (backwardNotes.size() > 0) result = factory.addNote(result, swimlaneBackward, backwardNotes, VerticalAlignment.CENTER); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandBackward3.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandBackward3.java index ad32a6968..9171e1515 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandBackward3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandBackward3.java @@ -50,6 +50,7 @@ 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.utils.LineLocation; public class CommandBackward3 extends SingleLineCommand2 { @@ -96,12 +97,18 @@ public class CommandBackward3 extends SingleLineCommand2 { else boxStyle = BoxStyle.fromString(styleString); + final String stereo = arg.get("STYLE", 1); + + Stereotype stereotype = null; + if (stereo != null) + stereotype = Stereotype.build(stereo); + final Display label = Display.getWithNewlines(arg.get("LABEL", 0)); final LinkRendering in = getBackRendering(diagram, arg, "INCOMING"); final LinkRendering out = getBackRendering(diagram, arg, "OUTCOMING"); - return diagram.backward(label, boxStyle, in, out); + return diagram.backward(label, boxStyle, in, out, stereotype); } static public LinkRendering getBackRendering(ActivityDiagram3 diagram, RegexResult arg, String name) diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandBackwardLong3.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandBackwardLong3.java index bc602b3be..15b4babc4 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandBackwardLong3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandBackwardLong3.java @@ -47,6 +47,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 CommandBackwardLong3 extends CommandMultilines3 { @@ -86,6 +87,11 @@ public class CommandBackwardLong3 extends CommandMultilines3 { final RegexResult line0 = getStartingPattern().matcher(lines.getFirst().getTrimmed().getString()); final RegexResult lineLast = getPatternEnd2().matcher(lines.getLast().getString()); final String end = lineLast.get("END", 0); + final String stereo = lineLast.get("END", 1); + + Stereotype stereotype = null; + if (stereo != null) + stereotype = Stereotype.build(stereo); final BoxStyle style = BoxStyle.fromString(end); lines = lines.removeStartingAndEnding(line0.get("DATA", 0), end.length()); @@ -93,6 +99,6 @@ public class CommandBackwardLong3 extends CommandMultilines3 { final LinkRendering in = LinkRendering.none(); final LinkRendering out = LinkRendering.none(); - return diagram.backward(lines.toDisplay(), style, in, out); + return diagram.backward(lines.toDisplay(), style, in, out, stereotype); } } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java index 5de156079..267511711 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java @@ -50,7 +50,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.FtileAssemblySimple; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileBox; -import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileCircleEnd; +import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileCircleEndCross; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileCircleSpot; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileCircleStart; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileCircleStop; @@ -66,7 +66,6 @@ import net.sourceforge.plantuml.klimt.font.UFont; import net.sourceforge.plantuml.klimt.geom.VerticalAlignment; import net.sourceforge.plantuml.stereo.Stereotype; 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; @@ -111,17 +110,13 @@ public class VCompactFactory implements FtileFactory { @Override public Ftile start(Swimlane swimlane) { final Style style = getSignatureCircleStart().getMergedStyle(skinParam.getCurrentStyleBuilder()); - final HColor color = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); - - return new FtileCircleStart(skinParam(), color, swimlane, style); + return new FtileCircleStart(skinParam(), swimlane, style); } @Override public Ftile stop(Swimlane swimlane) { final Style style = getSignatureCircleStop().getMergedStyle(skinParam.getCurrentStyleBuilder()); - final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); - final HColor backgroundColor = skinParam.getBackgroundColor(); - return new FtileCircleStop(skinParam(), backgroundColor, borderColor, swimlane, style); + return new FtileCircleStop(skinParam(), swimlane, style); } @Override @@ -134,10 +129,7 @@ public class VCompactFactory implements FtileFactory { @Override public Ftile end(Swimlane swimlane) { final Style style = getSignatureCircleEnd().getMergedStyle(skinParam.getCurrentStyleBuilder()); - final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); - final HColor backgroundColor = skinParam.getBackgroundColor(); - - return new FtileCircleEnd(skinParam(), backgroundColor, borderColor, swimlane, style); + return new FtileCircleEndCross(skinParam(), swimlane, style); } @Override diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleEnd.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleEndCross.java similarity index 86% rename from src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleEnd.java rename to src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleEndCross.java index 4421ed6b3..7d60c4337 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleEnd.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleEndCross.java @@ -46,6 +46,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; 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.HColors; import net.sourceforge.plantuml.klimt.drawing.UGraphic; import net.sourceforge.plantuml.klimt.font.StringBounder; import net.sourceforge.plantuml.klimt.shape.UEllipse; @@ -54,12 +55,12 @@ import net.sourceforge.plantuml.style.ISkinParam; import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.Style; -public class FtileCircleEnd extends AbstractFtile { +public class FtileCircleEndCross extends AbstractFtile { private static final int SIZE = 20; - private HColor borderColor; - private HColor backColor; + private final HColor lineColor; + private final HColor backColor; private final Swimlane swimlane; private double shadowing; @@ -68,14 +69,12 @@ public class FtileCircleEnd extends AbstractFtile { return Collections.emptyList(); } - public FtileCircleEnd(ISkinParam skinParam, HColor backColor, HColor borderColor, Swimlane swimlane, Style style) { + public FtileCircleEndCross(ISkinParam skinParam, Swimlane swimlane, Style style) { super(skinParam); - this.borderColor = borderColor; - this.backColor = backColor; this.swimlane = swimlane; this.shadowing = style.value(PName.Shadowing).asDouble(); this.backColor = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet()); - this.borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet()); + this.lineColor = style.value(PName.LineColor).asColor(getIHtmlColorSet()); } @@ -102,10 +101,11 @@ public class FtileCircleEnd extends AbstractFtile { final UEllipse circle = UEllipse.build(SIZE, SIZE); circle.setDeltaShadow(shadowing); - ug = ug.apply(borderColor); + ug = ug.apply(lineColor).apply(HColors.transparent().bg()); final double thickness = 2.5; - ug.apply(backColor.bg()).apply(UStroke.withThickness(1.5)).apply(new UTranslate(xTheoricalPosition, yTheoricalPosition)) - .draw(circle); + ug.apply(UStroke.withThickness(1.5)).apply(new UTranslate(xTheoricalPosition, yTheoricalPosition)).draw(circle); + + ug = ug.apply(backColor.bg()); final double size2 = (SIZE - thickness) / Math.sqrt(2); final double delta = (SIZE - size2) / 2; diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStart.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStart.java index 316c3a4eb..25e0c89ac 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStart.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStart.java @@ -43,32 +43,22 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; -import net.sourceforge.plantuml.klimt.color.HColor; -import net.sourceforge.plantuml.klimt.color.HColors; +import net.sourceforge.plantuml.klimt.color.Colors; import net.sourceforge.plantuml.klimt.drawing.UGraphic; import net.sourceforge.plantuml.klimt.font.StringBounder; -import net.sourceforge.plantuml.klimt.shape.UEllipse; import net.sourceforge.plantuml.style.ISkinParam; -import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.Style; +import net.sourceforge.plantuml.svek.image.CircleStart; public class FtileCircleStart extends AbstractFtile { - private static final int SIZE = 20; - - private HColor backColor; - private HColor borderColor; + private final CircleStart circle; private final Swimlane swimlane; - private double shadowing; - public FtileCircleStart(ISkinParam skinParam, HColor backColor, Swimlane swimlane, Style style) { + public FtileCircleStart(ISkinParam skinParam, Swimlane swimlane, Style style) { super(skinParam); this.swimlane = swimlane; - this.backColor = backColor; - this.borderColor = HColors.none(); - this.shadowing = style.value(PName.Shadowing).asDouble(); - this.backColor = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet()); - this.borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet()); + this.circle = new CircleStart(skinParam, style, Colors.empty()); } @Override @@ -92,14 +82,13 @@ public class FtileCircleStart extends AbstractFtile { } public void drawU(UGraphic ug) { - final UEllipse circle = UEllipse.build(SIZE, SIZE); - circle.setDeltaShadow(shadowing); - ug.apply(borderColor).apply(backColor.bg()).draw(circle); + circle.drawU(ug); } @Override protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { - return new FtileGeometry(SIZE, SIZE, SIZE / 2, 0, SIZE); + final double size = circle.calculateDimension(stringBounder).getWidth(); + return new FtileGeometry(size, size, size / 2, 0, size); } } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStop.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStop.java index 2d1d5a079..97b2743c8 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStop.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStop.java @@ -43,38 +43,29 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; -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.color.Colors; import net.sourceforge.plantuml.klimt.drawing.UGraphic; import net.sourceforge.plantuml.klimt.font.StringBounder; -import net.sourceforge.plantuml.klimt.shape.UEllipse; import net.sourceforge.plantuml.style.ISkinParam; -import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.Style; +import net.sourceforge.plantuml.svek.image.CircleEnd; public class FtileCircleStop extends AbstractFtile { private static final int SIZE = 22; - private HColor borderColor; - private HColor backColor; private final Swimlane swimlane; - private double shadowing; + private final CircleEnd circle; @Override public Collection getMyChildren() { return Collections.emptyList(); } - public FtileCircleStop(ISkinParam skinParam, HColor backColor, HColor borderColor, Swimlane swimlane, Style style) { + public FtileCircleStop(ISkinParam skinParam, Swimlane swimlane, Style style) { super(skinParam); - this.borderColor = borderColor; - this.backColor = backColor; this.swimlane = swimlane; - this.shadowing = style.value(PName.Shadowing).asDouble(); - this.backColor = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet()); - this.borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet()); + this.circle = new CircleEnd(skinParam, style, Colors.empty()); } @@ -94,18 +85,7 @@ public class FtileCircleStop extends AbstractFtile { } public void drawU(UGraphic ug) { - final UEllipse circle = UEllipse.build(SIZE, SIZE); - circle.setDeltaShadow(shadowing); - - ug.apply(borderColor).apply(backColor.bg()).draw(circle); - - final double delta = 5; - final UEllipse circleSmall = UEllipse.build(SIZE - delta * 2, SIZE - delta * 2); - // if (skinParam().shadowing(null)) { - // circleSmall.setDeltaShadow(3); - // } - final HColor middle = HColors.middle(borderColor, backColor); - ug.apply(middle).apply(borderColor.bg()).apply(new UTranslate(delta, delta)).draw(circleSmall); + circle.drawU(ug); } @Override diff --git a/src/net/sourceforge/plantuml/activitydiagram3/package-info.java b/src/net/sourceforge/plantuml/activitydiagram3/package-info.java new file mode 100644 index 000000000..715b4c146 --- /dev/null +++ b/src/net/sourceforge/plantuml/activitydiagram3/package-info.java @@ -0,0 +1,6 @@ +/** + * Provides classes used to manage + * + * Activity Diagram (New Syntax). + */ +package net.sourceforge.plantuml.activitydiagram3; diff --git a/src/net/sourceforge/plantuml/activitydiagram3/readme.md b/src/net/sourceforge/plantuml/activitydiagram3/readme.md new file mode 100644 index 000000000..10675561b --- /dev/null +++ b/src/net/sourceforge/plantuml/activitydiagram3/readme.md @@ -0,0 +1,13 @@ +# Directory Documentation for `activitydiagram3` + +## Description +This package provides classes used to manage [Activity Diagram (New Syntax)](https://plantuml.com/activity-diagram-beta). + +## Link +- [Activity Diagram (New Syntax)](https://plantuml.com/activity-diagram-beta) + +## Reference + +## Credit + +## Misc. diff --git a/src/net/sourceforge/plantuml/anim/AffineTransformation.java b/src/net/sourceforge/plantuml/anim/AffineTransformation.java deleted file mode 100644 index beda401ea..000000000 --- a/src/net/sourceforge/plantuml/anim/AffineTransformation.java +++ /dev/null @@ -1,157 +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.anim; - -import java.awt.geom.AffineTransform; -import java.util.Objects; -import java.util.StringTokenizer; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import net.sourceforge.plantuml.StringUtils; -import net.sourceforge.plantuml.klimt.geom.MinMax; -import net.sourceforge.plantuml.klimt.geom.XDimension2D; -import net.sourceforge.plantuml.klimt.geom.XPoint2D; - -public class AffineTransformation { - // ::remove folder when __HAXE__ - // ::remove folder when __CORE__ - - static private final Pattern rotate = Pattern.compile("rotate\\s+(-?\\d+\\.?\\d*)"); - static private final Pattern shear = Pattern.compile("shear\\s+(-?\\d+\\.?\\d*)\\s+(-?\\d+\\.?\\d*)"); - static private final Pattern translate = Pattern.compile("translate\\s+(-?\\d+\\.?\\d*)\\s+(-?\\d+\\.?\\d*)"); - static private final Pattern scale = Pattern.compile("scale\\s+(-?\\d+\\.?\\d*)\\s+(-?\\d+\\.?\\d*)"); - static private final Pattern color = Pattern.compile("color\\s+.*"); - - private final AffineTransform affineTransform; - private XDimension2D dimension; - - private AffineTransformation(AffineTransform affineTransform) { - this.affineTransform = Objects.requireNonNull(affineTransform); - } - - private AffineTransformation compose(AffineTransformation other) { - final AffineTransform tmp = new AffineTransform(this.affineTransform); - tmp.concatenate(other.affineTransform); - return new AffineTransformation(tmp); - } - - public static AffineTransformation from(AffineTransform affineTransform) { - return new AffineTransformation(affineTransform); - } - - static AffineTransformation create(String value) { - final StringTokenizer st = new StringTokenizer(value, "|"); - AffineTransformation result = null; - while (st.hasMoreTokens()) { - final String s = st.nextToken(); - final AffineTransformation tmp = createSimple(s); - if (tmp != null) { - if (result == null) { - result = tmp; - } else { - result = result.compose(tmp); - } - } - } - return result; - } - - private static AffineTransformation createSimple(String value) { - Matcher m = rotate.matcher(StringUtils.trin(value)); - if (m.find()) { - final double angle = Double.parseDouble(m.group(1)); - return new AffineTransformation(AffineTransform.getRotateInstance(angle * Math.PI / 180.0)); - } - m = shear.matcher(value); - if (m.find()) { - final double shx = Double.parseDouble(m.group(1)); - final double shy = Double.parseDouble(m.group(2)); - return new AffineTransformation(AffineTransform.getShearInstance(shx, shy)); - } - m = translate.matcher(value); - if (m.find()) { - final double tx = Double.parseDouble(m.group(1)); - final double ty = Double.parseDouble(m.group(2)); - return new AffineTransformation(AffineTransform.getTranslateInstance(tx, ty)); - } - m = scale.matcher(value); - if (m.find()) { - final double scalex = Double.parseDouble(m.group(1)); - final double scaley = Double.parseDouble(m.group(2)); - return new AffineTransformation(AffineTransform.getScaleInstance(scalex, scaley)); - } - m = color.matcher(value); - if (m.find()) { - return new AffineTransformation(new AffineTransform()); - } - return null; - } - - public final AffineTransform getAffineTransform() { - return getAffineTransform(dimension); - } - - private AffineTransform getAffineTransform(XDimension2D dimension) { - if (dimension == null) { - throw new IllegalStateException(); - } - final AffineTransform at = AffineTransform.getTranslateInstance(dimension.getWidth() / 2, - dimension.getHeight() / 2); - at.concatenate(affineTransform); - at.translate(-dimension.getWidth() / 2, -dimension.getHeight() / 2); - - return at; - } - - public void setDimension(XDimension2D dim) { - this.dimension = dim; - - } - - public MinMax getMinMax(XDimension2D rect) { - MinMax result = MinMax.getEmpty(false); - final AffineTransform tmp = getAffineTransform(rect); - - result = result.addPoint(new XPoint2D(0, 0).transform(tmp)); - result = result.addPoint(new XPoint2D(0, rect.getHeight()).transform(tmp)); - result = result.addPoint(new XPoint2D(rect.getWidth(), 0).transform(tmp)); - result = result.addPoint(new XPoint2D(rect.getWidth(), rect.getHeight()).transform(tmp)); - - return result; - } - -} diff --git a/src/net/sourceforge/plantuml/anim/Animation.java b/src/net/sourceforge/plantuml/anim/Animation.java deleted file mode 100644 index 77165f891..000000000 --- a/src/net/sourceforge/plantuml/anim/Animation.java +++ /dev/null @@ -1,99 +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.anim; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.List; - -import net.sourceforge.plantuml.klimt.geom.MinMax; -import net.sourceforge.plantuml.klimt.geom.XDimension2D; - -public class Animation { - - private final List all; - - private Animation(List all) { - if (all.size() == 0) { - throw new IllegalArgumentException(); - } - this.all = all; - } - - public static Animation singleton(AffineTransformation affineTransformation) { - if (affineTransformation == null) { - return null; - } - return new Animation(Collections.singletonList(affineTransformation)); - } - - public static Animation create(List descriptions) { - final List all = new ArrayList<>(); - for (String s : descriptions) { - final AffineTransformation tmp = AffineTransformation.create(s); - if (tmp != null) { - all.add(tmp); - } - } - return new Animation(all); - } - - public Collection getAll() { - return Collections.unmodifiableCollection(all); - } - - public void setDimension(XDimension2D dim) { - for (AffineTransformation affineTransform : all) { - affineTransform.setDimension(dim); - } - - } - - public AffineTransformation getFirst() { - return all.get(0); - } - - public MinMax getMinMax(XDimension2D dim) { - MinMax result = MinMax.getEmpty(false); - for (AffineTransformation affineTransform : all) { - final MinMax m = affineTransform.getMinMax(dim); - result = result.addMinMax(m); - } - return result; - } - -} diff --git a/src/net/sourceforge/plantuml/anim/AnimationScript.java b/src/net/sourceforge/plantuml/anim/AnimationScript.java deleted file mode 100644 index 610120639..000000000 --- a/src/net/sourceforge/plantuml/anim/AnimationScript.java +++ /dev/null @@ -1,71 +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.anim; - -public class AnimationScript { - -// private final ScriptEngine engine; - - public AnimationScript() { - -// final ScriptEngineManager manager = new ScriptEngineManager(); -// engine = manager.getEngineByName("js"); - - // ScriptEngineManager manager = new ScriptEngineManager(); - // List factories = manager.getEngineFactories(); - // for (ScriptEngineFactory factory : factories) { - // System.out.println("Name : " + factory.getEngineName()); - // System.out.println("Version : " + factory.getEngineVersion()); - // System.out.println("Language name : " + factory.getLanguageName()); - // System.out.println("Language version : " + factory.getLanguageVersion()); - // System.out.println("Extensions : " + factory.getExtensions()); - // System.out.println("Mime types : " + factory.getMimeTypes()); - // System.out.println("Names : " + factory.getNames()); - // - // } - - } - - public String eval(String line) { - throw new UnsupportedOperationException(); -// final ScriptContext context = engine.getContext(); -// final StringWriter sw = new StringWriter(); -// context.setWriter(new PrintWriter(sw)); -// engine.eval(line, context); -// final String result = sw.toString(); -// return result; - } -} diff --git a/src/net/sourceforge/plantuml/annotation/DeadCode.java b/src/net/sourceforge/plantuml/annotation/DeadCode.java new file mode 100644 index 000000000..97f5a8e4c --- /dev/null +++ b/src/net/sourceforge/plantuml/annotation/DeadCode.java @@ -0,0 +1,13 @@ +package net.sourceforge.plantuml.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.SOURCE) +@Target({ ElementType.CONSTRUCTOR, ElementType.METHOD, ElementType.TYPE }) +public @interface DeadCode { + + String comment() default ""; +} diff --git a/src/net/sourceforge/plantuml/annotation/package-info.java b/src/net/sourceforge/plantuml/annotation/package-info.java new file mode 100644 index 000000000..d4f4e9ad5 --- /dev/null +++ b/src/net/sourceforge/plantuml/annotation/package-info.java @@ -0,0 +1,5 @@ +/** + * Provides classes used to manage Java User Annotation on PlantUML. + * + */ +package net.sourceforge.plantuml.annotation; diff --git a/src/net/sourceforge/plantuml/annotation/readme.md b/src/net/sourceforge/plantuml/annotation/readme.md new file mode 100644 index 000000000..ae958c4c6 --- /dev/null +++ b/src/net/sourceforge/plantuml/annotation/readme.md @@ -0,0 +1,6 @@ +# Directory Documentation for `annotation` + +## Description +This package provides classes used to manage Java User Annotation on PlantUML. + +Currently use to identify 'DeadCode' with the `@DeadCode` Annotation. \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/ant/package-info.java b/src/net/sourceforge/plantuml/ant/package-info.java new file mode 100644 index 000000000..13c4b6bba --- /dev/null +++ b/src/net/sourceforge/plantuml/ant/package-info.java @@ -0,0 +1,7 @@ +/** + * Provides classes used to manage + * + * PlantUML Ant task. + * + */ +package net.sourceforge.plantuml.ant; diff --git a/src/net/sourceforge/plantuml/ant/readme.md b/src/net/sourceforge/plantuml/ant/readme.md new file mode 100644 index 000000000..cdc863943 --- /dev/null +++ b/src/net/sourceforge/plantuml/ant/readme.md @@ -0,0 +1,11 @@ +# Directory Documentation for `ant` + +## Description +This package provides classes used to manage [PlantUML Ant task](https://plantuml.com/ant-task). + +## Link +- [PlantUML Ant task](https://plantuml.com/ant-task) + +## Reference +- [Apache Ant](https://ant.apache.org) +- [Apache Ant _(on Wikipedia)_](https://en.wikipedia.org/wiki/Apache_Ant) diff --git a/src/net/sourceforge/plantuml/argon2/package-info.java b/src/net/sourceforge/plantuml/argon2/package-info.java new file mode 100644 index 000000000..605e879c7 --- /dev/null +++ b/src/net/sourceforge/plantuml/argon2/package-info.java @@ -0,0 +1,28 @@ +/** + * Provides classes used to manage the Password-Hashing Function nammed + * + * Argon2. + * + *

+ * The code is taken from: + *

+ *

+ *

+ * Ref.: + *

+ *

+ * + * @see net.sourceforge.plantuml.argon2.blake2 + * + */ +package net.sourceforge.plantuml.argon2; diff --git a/src/net/sourceforge/plantuml/argon2/readme.md b/src/net/sourceforge/plantuml/argon2/readme.md new file mode 100644 index 000000000..d52410a02 --- /dev/null +++ b/src/net/sourceforge/plantuml/argon2/readme.md @@ -0,0 +1,22 @@ +# Directory Documentation for `argon2` + +## Description +This package provides classes used to manage the password-hashing function nammed [Argon2](https://github.com/andreas1327250/argon2-java). + +## Link +- :octocat: [Andreas1327250/Argon2-java](https://github.com/andreas1327250/argon2-java) + +## Reference +- [Argon2 _(on Wikipedia)_](https://en.wikipedia.org/wiki/Argon2) +- [RFC 9106 (Argon2)](https://datatracker.ietf.org/doc/html/rfc9106) +- :octocat: [P-H-C/PHC-winner-argon2](https://github.com/P-H-C/phc-winner-argon2) +- [Password Hashing Competition (PHC)](https://www.password-hashing.net) +- [BLAKE2](https://www.blake2.net) +- [RFC 7693 (BLAKE2)](https://datatracker.ietf.org/doc/html/rfc7693) + +## Credit +- :octocat: [Andreas1327250/Argon2-java](https://github.com/andreas1327250/argon2-java) +- :octocat: [Alphazero/Blake2b](https://github.com/alphazero/Blake2b/) + +## Misc. + diff --git a/src/net/sourceforge/plantuml/asciiart/package-info.java b/src/net/sourceforge/plantuml/asciiart/package-info.java new file mode 100644 index 000000000..b2a812ff3 --- /dev/null +++ b/src/net/sourceforge/plantuml/asciiart/package-info.java @@ -0,0 +1,7 @@ +/** + * Provides classes used to manage + * + * ASCII Art output format. + * + */ +package net.sourceforge.plantuml.asciiart; diff --git a/src/net/sourceforge/plantuml/asciiart/readme.md b/src/net/sourceforge/plantuml/asciiart/readme.md new file mode 100644 index 000000000..40bf00c90 --- /dev/null +++ b/src/net/sourceforge/plantuml/asciiart/readme.md @@ -0,0 +1,11 @@ +# Directory Documentation for `asciiart` + +## Description +This package provides classes used to export diagram to an [ASCII Art](https://plantuml.com/ascii-art) output format. + +## Link +- [ASCII Art Output Format](https://plantuml.com/ascii-art) +- [ASCII Art _(on Wikipedia)_](https://en.wikipedia.org/wiki/ASCII_art) + +## Reference + diff --git a/src/net/sourceforge/plantuml/board/package-info.java b/src/net/sourceforge/plantuml/board/package-info.java new file mode 100644 index 000000000..27c585a94 --- /dev/null +++ b/src/net/sourceforge/plantuml/board/package-info.java @@ -0,0 +1,7 @@ +/** + * Provides classes used to manage + * + * Board Diagram. + * + */ +package net.sourceforge.plantuml.board; diff --git a/src/net/sourceforge/plantuml/board/readme.md b/src/net/sourceforge/plantuml/board/readme.md new file mode 100644 index 000000000..0dad7ba78 --- /dev/null +++ b/src/net/sourceforge/plantuml/board/readme.md @@ -0,0 +1,11 @@ +# Directory Documentation for `board` + +## Description +This package provides classes used to manage [PlantUML Board Diagram](http://alphadoc.plantuml.com/doc/markdown/en/board-diagram). + +## Link +- [Board Diagram _(on Alpha-doc)_](http://alphadoc.plantuml.com/doc/markdown/en/board-diagram) + +## Reference +- [GH-423](https://github.com/plantuml/plantuml/issues/423) + diff --git a/src/net/sourceforge/plantuml/bpm/BpmElement.java b/src/net/sourceforge/plantuml/bpm/BpmElement.java index 9a8652fb7..1e713879d 100644 --- a/src/net/sourceforge/plantuml/bpm/BpmElement.java +++ b/src/net/sourceforge/plantuml/bpm/BpmElement.java @@ -148,7 +148,7 @@ public class BpmElement extends AbstractConnectorPuzzle implements ConnectorPuzz public TextBlock toTextBlockInternal(ISkinParam skinParam) { if (type == BpmElementType.START) { - return new FtileCircleStart(skinParam, HColors.BLACK, null, getStyle(skinParam)); + return new FtileCircleStart(skinParam, null, getStyle(skinParam)); } if (type == BpmElementType.MERGE) { final HColor borderColor = SkinParamUtils.getColor(skinParam, null, ColorParam.activityBorder); diff --git a/src/net/sourceforge/plantuml/bpm/package-info.java b/src/net/sourceforge/plantuml/bpm/package-info.java new file mode 100644 index 000000000..ec737d116 --- /dev/null +++ b/src/net/sourceforge/plantuml/bpm/package-info.java @@ -0,0 +1,7 @@ +/** + * Provides classes used to manage + * + * BPMN (Business Process Model and Notation) Diagram. + * + */ +package net.sourceforge.plantuml.bpm; diff --git a/src/net/sourceforge/plantuml/bpm/readme.md b/src/net/sourceforge/plantuml/bpm/readme.md new file mode 100644 index 000000000..ca4b43137 --- /dev/null +++ b/src/net/sourceforge/plantuml/bpm/readme.md @@ -0,0 +1,16 @@ +# Directory Documentation for `bpm` + +## Description +This package provides classes used to manage [PlantUML BPMN diagram](http://alphadoc.plantuml.com/doc/markdown/en/bpmn). + +## Link +- [BPMN Diagram _(on Alpha-doc)_](http://alphadoc.plantuml.com/doc/markdown/en/bpmn) +- [BPMN _(on Wikipedia)_](https://en.wikipedia.org/wiki/Business_Process_Model_and_Notation) + +## Reference +- [QA-5647](https://forum.plantuml.net/5647/plans-for-bpmn-support) + +## Credit + +## Misc. + diff --git a/src/net/sourceforge/plantuml/braille/package-info.java b/src/net/sourceforge/plantuml/braille/package-info.java new file mode 100644 index 000000000..ce161668a --- /dev/null +++ b/src/net/sourceforge/plantuml/braille/package-info.java @@ -0,0 +1,7 @@ +/** + * Provides classes used to manage + * + * Braille output format. + * + */ +package net.sourceforge.plantuml.braille; diff --git a/src/net/sourceforge/plantuml/braille/readme.md b/src/net/sourceforge/plantuml/braille/readme.md new file mode 100644 index 000000000..5cea22da8 --- /dev/null +++ b/src/net/sourceforge/plantuml/braille/readme.md @@ -0,0 +1,11 @@ +# Directory Documentation for `braille` + +## Description +This package provides classes used to export diagram to a [Braille](https://plantuml.com/en/command-line#458de91d76a8569c) output format. + +## Link +- [PlantUML Braille Output Format](https://plantuml.com/en/command-line#458de91d76a8569c) + +## Reference +- [QA-4752](https://forum.plantuml.net/4752/translate-class-diagram-to-braille) + diff --git a/src/net/sourceforge/plantuml/brotli/package-info.java b/src/net/sourceforge/plantuml/brotli/package-info.java new file mode 100644 index 000000000..c976ce34e --- /dev/null +++ b/src/net/sourceforge/plantuml/brotli/package-info.java @@ -0,0 +1,18 @@ +/** + * Provides classes used to manage + * + * Brotli Compression Algorithm. + * + *

+ * The code is taken from: + *

+ *

+ * + * @see net.sourceforge.plantuml.code.deflate + * @see net.sourceforge.plantuml.zopfli + * + */ +package net.sourceforge.plantuml.brotli; diff --git a/src/net/sourceforge/plantuml/brotli/readme.md b/src/net/sourceforge/plantuml/brotli/readme.md new file mode 100644 index 000000000..176c1fceb --- /dev/null +++ b/src/net/sourceforge/plantuml/brotli/readme.md @@ -0,0 +1,18 @@ +# Directory Documentation for `brotli` + +## Description +This package provides classes used to manage [Brotli Compression Algorithm](https://github.com/google/brotli). + +## Link +- :octocat: [Google/Brotli](https://github.com/google/brotli) + +## Reference +- [Brotli _(on Wikipedia)_](https://en.wikipedia.org/wiki/Brotli) +- [RFC 7932](https://datatracker.ietf.org/doc/html/rfc7932) + +## Credit +- :octocat: [Google/Brotli](https://github.com/google/brotli) + +## Misc. +- [BrΓΆtchen _(on Wikipedia)_](https://de.wikipedia.org/wiki/Br%C3%B6tchen) +- [Bread roll _(on Wikipedia)_](https://en.wikipedia.org/wiki/Bread_roll) diff --git a/src/net/sourceforge/plantuml/classdiagram/command/CommandHideShowByGender.java b/src/net/sourceforge/plantuml/classdiagram/command/CommandHideShowByGender.java index 6e9e22219..a986f95e1 100644 --- a/src/net/sourceforge/plantuml/classdiagram/command/CommandHideShowByGender.java +++ b/src/net/sourceforge/plantuml/classdiagram/command/CommandHideShowByGender.java @@ -190,30 +190,36 @@ public class CommandHideShowByGender extends SingleLineCommand2 { } else { arg1 = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg1); final Quark quark = diagram.quarkInContext(true, diagram.cleanId(arg1)); - Entity entity = quark.getData(); - if (entity == null) - return CommandExecutionResult.error("No such element " + quark.getName()); - gender = EntityGenderUtils.byEntityAlone(entity); - } - if (gender != null) { - final boolean empty = arg.get("EMPTY", 0) != null; - final boolean emptyMembers = empty && portion == EntityPortion.MEMBER; - if (empty == true && emptyMembers == false) - gender = EntityGenderUtils.and(gender, emptyByGender(portion)); - - if (diagram.getCurrentGroup().isRoot() == false) - gender = EntityGenderUtils.and(gender, EntityGenderUtils.byPackage(diagram.getCurrentGroup())); - - if (emptyMembers) { - diagram.hideOrShow(EntityGenderUtils.and(gender, emptyByGender(EntityPortion.FIELD)), - EntityPortion.FIELD, arg.get("COMMAND", 0).equalsIgnoreCase("show")); - diagram.hideOrShow(EntityGenderUtils.and(gender, emptyByGender(EntityPortion.METHOD)), - EntityPortion.METHOD, arg.get("COMMAND", 0).equalsIgnoreCase("show")); + if (quark == null) { + // Not sure it could really happens... to be checked + return CommandExecutionResult.error("No such quark " + arg1); + } + if (portion == EntityPortion.METHOD) { + gender = EntityGenderUtils.byClassName(arg1); } else { - diagram.hideOrShow(gender, portion, arg.get("COMMAND", 0).equalsIgnoreCase("show")); + Entity entity = quark.getData(); + if (entity == null) + return CommandExecutionResult.error("No such element " + quark.getName()); + gender = EntityGenderUtils.byEntityAlone(entity); } } - return CommandExecutionResult.ok(); + final boolean empty = arg.get("EMPTY", 0) != null; + final boolean emptyMembers = empty && portion == EntityPortion.MEMBER; + if (empty && !emptyMembers) + gender = EntityGenderUtils.and(gender, emptyByGender(portion)); + + if (!diagram.getCurrentGroup().isRoot()) + gender = EntityGenderUtils.and(gender, EntityGenderUtils.byPackage(diagram.getCurrentGroup())); + + if (emptyMembers) { + diagram.hideOrShow(EntityGenderUtils.and(gender, emptyByGender(EntityPortion.FIELD)), + EntityPortion.FIELD, arg.get("COMMAND", 0).equalsIgnoreCase("show")); + diagram.hideOrShow(EntityGenderUtils.and(gender, emptyByGender(EntityPortion.METHOD)), + EntityPortion.METHOD, arg.get("COMMAND", 0).equalsIgnoreCase("show")); + } else { + diagram.hideOrShow(gender, portion, arg.get("COMMAND", 0).equalsIgnoreCase("show")); + } + return CommandExecutionResult.ok(); } private EntityPortion getEntityPortion(String s) { diff --git a/src/net/sourceforge/plantuml/classdiagram/package-info.java b/src/net/sourceforge/plantuml/classdiagram/package-info.java new file mode 100644 index 000000000..1e6f4621e --- /dev/null +++ b/src/net/sourceforge/plantuml/classdiagram/package-info.java @@ -0,0 +1,7 @@ +/** + * Provides classes used to manage + * + * Class Diagram. + * + */ +package net.sourceforge.plantuml.classdiagram; diff --git a/src/net/sourceforge/plantuml/classdiagram/readme.md b/src/net/sourceforge/plantuml/classdiagram/readme.md new file mode 100644 index 000000000..2d61f5688 --- /dev/null +++ b/src/net/sourceforge/plantuml/classdiagram/readme.md @@ -0,0 +1,14 @@ +# Directory Documentation for `classdiagram` + +## Description +This package provides classes used to manage [PlantUML Class Diagram](https://plantuml.com/class-diagram). + +## Link +- [Class Diagram](https://plantuml.com/class-diagram) + +## Reference + +## Credit + +## Misc. + diff --git a/src/net/sourceforge/plantuml/code/Tokens.java b/src/net/sourceforge/plantuml/code/Tokens.java index 8d034b945..57d3bcbe9 100644 --- a/src/net/sourceforge/plantuml/code/Tokens.java +++ b/src/net/sourceforge/plantuml/code/Tokens.java @@ -40,6 +40,9 @@ import java.util.List; import java.util.Set; import java.util.TreeSet; +import net.sourceforge.plantuml.annotation.DeadCode; + +@DeadCode(comment = "try for text diagram compression") public class Tokens { // ::remove file when __CORE__ diff --git a/src/net/sourceforge/plantuml/code/package-info.java b/src/net/sourceforge/plantuml/code/package-info.java new file mode 100644 index 000000000..184c04950 --- /dev/null +++ b/src/net/sourceforge/plantuml/code/package-info.java @@ -0,0 +1,9 @@ +/** + * Provides classes used to manage Coding and Compression. + * + * @see net.sourceforge.plantuml.brotli + * @see net.sourceforge.plantuml.code.deflate + * @see net.sourceforge.plantuml.zopfli + * + */ +package net.sourceforge.plantuml.code; diff --git a/src/net/sourceforge/plantuml/code/readme.md b/src/net/sourceforge/plantuml/code/readme.md new file mode 100644 index 000000000..786a357dd --- /dev/null +++ b/src/net/sourceforge/plantuml/code/readme.md @@ -0,0 +1,19 @@ +# Directory Documentation for `code` + +## Description +This package provides classes used to manage Coding and Compression. + +## Link +- [`brotli`](../brotli/) +- [`code.deflate`](./deflate/) +- [`zopfli`](../zopfli/) + +## Reference +- [Simple DEFLATE decompressor](https://www.nayuki.io/page/simple-deflate-decompressor) +- [RFC 1951 (DEFLATE)](https://datatracker.ietf.org/doc/html/rfc1951) + +## Credit +- :octocat: [Nayuki/Simple-DEFLATE-decompressor](https://github.com/nayuki/Simple-DEFLATE-decompressor) + +## Misc. + diff --git a/src/net/sourceforge/plantuml/command/CommandAffineTransform.java b/src/net/sourceforge/plantuml/command/CommandAffineTransform.java deleted file mode 100644 index 210639cd8..000000000 --- a/src/net/sourceforge/plantuml/command/CommandAffineTransform.java +++ /dev/null @@ -1,71 +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.command; - -import java.util.Collections; - -import net.sourceforge.plantuml.UmlDiagram; -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.utils.LineLocation; - -public class CommandAffineTransform extends SingleLineCommand2 { - - public static final CommandAffineTransform ME = new CommandAffineTransform(); - - private CommandAffineTransform() { - super(getRegexConcat()); - } - - static IRegex getRegexConcat() { - return RegexConcat.build(CommandAffineTransform.class.getName(), RegexLeaf.start(), // - new RegexLeaf("!transformation"), // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("ANIMATION", "([^{}]*)"), RegexLeaf.end()); // - } - - @Override - protected CommandExecutionResult executeArg(UmlDiagram diagram, LineLocation location, RegexResult arg) { - final CharSequence value = arg.get("ANIMATION", 0); - // ::comment when __CORE__ - diagram.setAnimation(Collections.singletonList(value)); - // ::done - return CommandExecutionResult.ok(); - } - -} diff --git a/src/net/sourceforge/plantuml/command/CommonCommands.java b/src/net/sourceforge/plantuml/command/CommonCommands.java index 707dd49b3..0f569dea3 100644 --- a/src/net/sourceforge/plantuml/command/CommonCommands.java +++ b/src/net/sourceforge/plantuml/command/CommonCommands.java @@ -73,8 +73,6 @@ public final class CommonCommands { cmds.add(CommandScaleMaxWidth.ME); cmds.add(CommandScaleMaxHeight.ME); cmds.add(CommandScaleMaxWidthAndHeight.ME); - cmds.add(CommandAffineTransform.ME); - cmds.add(CommandAffineTransformMultiline.ME); final CommandFactorySprite factorySpriteCommand = new CommandFactorySprite(); cmds.add(factorySpriteCommand.createMultiLine(false)); cmds.add(factorySpriteCommand.createSingleLine()); diff --git a/src/net/sourceforge/plantuml/command/package-info.java b/src/net/sourceforge/plantuml/command/package-info.java new file mode 100644 index 000000000..0e7d145c0 --- /dev/null +++ b/src/net/sourceforge/plantuml/command/package-info.java @@ -0,0 +1,9 @@ +/** + * Provides classes used to manage + * + * PlantUML End User Common Commands. + * + * @see net.sourceforge.plantuml.regex + * + */ +package net.sourceforge.plantuml.command; diff --git a/src/net/sourceforge/plantuml/command/readme.md b/src/net/sourceforge/plantuml/command/readme.md new file mode 100644 index 000000000..0ab92bdc4 --- /dev/null +++ b/src/net/sourceforge/plantuml/command/readme.md @@ -0,0 +1,14 @@ +# Directory Documentation for `command` + +## Description +This package provides classes used to manage [PlantUML End User Common Commands](https://plantuml.com/commons). + +## Link +- [Common Commands in PlantUML](https://plantuml.com/commons) + +## Reference + +## Credit + +## Misc. + diff --git a/src/net/sourceforge/plantuml/core/DiagramType.java b/src/net/sourceforge/plantuml/core/DiagramType.java index 463f70b28..3b6ae6270 100644 --- a/src/net/sourceforge/plantuml/core/DiagramType.java +++ b/src/net/sourceforge/plantuml/core/DiagramType.java @@ -39,7 +39,7 @@ import net.sourceforge.plantuml.utils.StartUtils; public enum DiagramType { // ::remove folder when __HAXE__ - UML, BPM, DITAA, DOT, PROJECT, JCCKIT, SALT, FLOW, CREOLE, JUNGLE, CUTE, MATH, LATEX, DEFINITION, GANTT, NW, + 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, CHEN_EER, UNKNOWN; static public DiagramType getTypeFromArobaseStart(String s) { @@ -59,11 +59,15 @@ public enum DiagramType { if (StartUtils.startsWithSymbolAnd("startdot", s)) return DOT; + // ::comment when __CORE__ or __MIT__ or __EPL__ or __BSD__ or __ASL__ or __LGPL__ if (StartUtils.startsWithSymbolAnd("startjcckit", s)) return JCCKIT; + // ::done + // ::comment when __CORE__ or __MIT__ or __EPL__ or __BSD__ or __ASL__ if (StartUtils.startsWithSymbolAnd("startditaa", s)) return DITAA; + // ::done if (StartUtils.startsWithSymbolAnd("startproject", s)) return PROJECT; @@ -77,12 +81,6 @@ public enum DiagramType { if (StartUtils.startsWithSymbolAnd("startcreole", s)) return CREOLE; - if (StartUtils.startsWithSymbolAnd("starttree", s)) - return JUNGLE; - - if (StartUtils.startsWithSymbolAnd("startcute", s)) - return CUTE; - if (StartUtils.startsWithSymbolAnd("startmath", s)) return MATH; diff --git a/src/net/sourceforge/plantuml/core/UmlSource.java b/src/net/sourceforge/plantuml/core/UmlSource.java index bda5c52e2..97b5ccc7b 100755 --- a/src/net/sourceforge/plantuml/core/UmlSource.java +++ b/src/net/sourceforge/plantuml/core/UmlSource.java @@ -45,7 +45,6 @@ import net.sourceforge.plantuml.klimt.creole.Display; import net.sourceforge.plantuml.regex.Matcher2; import net.sourceforge.plantuml.regex.MyPattern; import net.sourceforge.plantuml.regex.Pattern2; -import net.sourceforge.plantuml.text.BackSlash; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.utils.LineLocation; import net.sourceforge.plantuml.utils.StartUtils; diff --git a/src/net/sourceforge/plantuml/cucadiagram/PortionShower.java b/src/net/sourceforge/plantuml/cucadiagram/PortionShower.java index c3d2a375e..0cb7cb926 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/PortionShower.java +++ b/src/net/sourceforge/plantuml/cucadiagram/PortionShower.java @@ -38,7 +38,11 @@ package net.sourceforge.plantuml.cucadiagram; import net.sourceforge.plantuml.abel.Entity; import net.sourceforge.plantuml.abel.EntityPortion; +import java.util.List; + public interface PortionShower { boolean showPortion(EntityPortion portion, Entity entity); + + List getVisibleStereotypeLabels(Entity entity); } diff --git a/src/net/sourceforge/plantuml/cucadiagram/package-info.java b/src/net/sourceforge/plantuml/cucadiagram/package-info.java new file mode 100644 index 000000000..ac23d43cc --- /dev/null +++ b/src/net/sourceforge/plantuml/cucadiagram/package-info.java @@ -0,0 +1,16 @@ +/** + * Provides classes used to manage PlantUML Class-UseCase-Activity (CUCA) Diagram. + * + *

+ * The PlantUML CUCA Diagrams are: + *

+ *

+ */ +package net.sourceforge.plantuml.cucadiagram; diff --git a/src/net/sourceforge/plantuml/cucadiagram/readme.md b/src/net/sourceforge/plantuml/cucadiagram/readme.md new file mode 100644 index 000000000..f53cc653a --- /dev/null +++ b/src/net/sourceforge/plantuml/cucadiagram/readme.md @@ -0,0 +1,8 @@ +# Directory Documentation for `cucadiagram` + +## Description +This package provides classes used to manage PlantUML Class-UseCase-Activity (CUCA) Diagram: +- [Class Diagram](https://plantuml.com/class-diagram) +- [Use Case Diagram](https://plantuml.com/use-case-diagram) +- [Activity Diagram (legacy)](https://plantuml.com/activity-diagram-legacy) + diff --git a/src/net/sourceforge/plantuml/dedication/package-info.java b/src/net/sourceforge/plantuml/dedication/package-info.java new file mode 100644 index 000000000..4514abb49 --- /dev/null +++ b/src/net/sourceforge/plantuml/dedication/package-info.java @@ -0,0 +1,7 @@ +/** + * Provides classes used to manage + * + * Dedication. + * + */ +package net.sourceforge.plantuml.dedication; diff --git a/src/net/sourceforge/plantuml/dedication/readme.md b/src/net/sourceforge/plantuml/dedication/readme.md new file mode 100644 index 000000000..88f9ddca6 --- /dev/null +++ b/src/net/sourceforge/plantuml/dedication/readme.md @@ -0,0 +1,13 @@ +# Directory Documentation for `dedication` + +## Description +This package provides classes used to manage [PlantUML Dedication](https://plantuml.com/dedication). + +## Link +- [Dedication](https://plantuml.com/dedication) + +## Reference + +## Credit + +## Misc. diff --git a/src/net/sourceforge/plantuml/definition/package-info.java b/src/net/sourceforge/plantuml/definition/package-info.java new file mode 100644 index 000000000..55b1b49df --- /dev/null +++ b/src/net/sourceforge/plantuml/definition/package-info.java @@ -0,0 +1,7 @@ +/** + * Provides classes used to manage + * + * Definition Diagram. + * + */ +package net.sourceforge.plantuml.definition; diff --git a/src/net/sourceforge/plantuml/definition/readme.md b/src/net/sourceforge/plantuml/definition/readme.md new file mode 100644 index 000000000..59ed98b42 --- /dev/null +++ b/src/net/sourceforge/plantuml/definition/readme.md @@ -0,0 +1,14 @@ +# Directory Documentation for `definition` + +## Description +This package provides classes used to manage [PlantUML Definition Diagram](https://plantuml.com/en/sources#dd263f8f99d9d776). + +## Link + +## Reference +- [QA-5769](https://forum.plantuml.net/5769/please-provide-way-include-blocks-code-from-file-into-itself) + +## Credit + +## Misc. + diff --git a/src/net/sourceforge/plantuml/descdiagram/command/CommandPackageWithUSymbol.java b/src/net/sourceforge/plantuml/descdiagram/command/CommandPackageWithUSymbol.java index 77710a5e7..92a2e931a 100644 --- a/src/net/sourceforge/plantuml/descdiagram/command/CommandPackageWithUSymbol.java +++ b/src/net/sourceforge/plantuml/descdiagram/command/CommandPackageWithUSymbol.java @@ -134,28 +134,25 @@ public class CommandPackageWithUSymbol extends SingleLineCommand2 ident = diagram.quarkInContext(false, + diagram.cleanId(codeArg.length() == 0 ? diagram.getUniqueSequence("##") : codeArg)); + + final String displayArg = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg.getLazzy("DISPLAY", 0)); final String display; - final String idShort; - if (codeRaw.length() == 0) { - idShort = diagram.getUniqueSequence("##"); + + if (codeArg.length() == 0) display = null; - } else { - idShort = codeRaw; - if (displayRaw == null) - display = idShort; - else - display = displayRaw; - - } - - final Quark ident = diagram.quarkInContext(false, diagram.cleanId(idShort)); + else if (displayArg == null) + display = ident.getName(); + else + display = displayArg; final CommandExecutionResult status = diagram.gotoGroup(ident, Display.getWithNewlines(display), GroupType.PACKAGE); if (status.isOk() == false) return status; + final Entity p = diagram.getCurrentGroup(); final String symbol = arg.get("SYMBOL", 0); diff --git a/src/net/sourceforge/plantuml/descdiagram/package-info.java b/src/net/sourceforge/plantuml/descdiagram/package-info.java new file mode 100644 index 000000000..b423becc1 --- /dev/null +++ b/src/net/sourceforge/plantuml/descdiagram/package-info.java @@ -0,0 +1,22 @@ +/** + * Provides classes used to manage PlantUML Description Diagram. + * + *

+ * The PlantUML Description Diagrams are: + *

+ *

+ */ +package net.sourceforge.plantuml.descdiagram; diff --git a/src/net/sourceforge/plantuml/descdiagram/readme.md b/src/net/sourceforge/plantuml/descdiagram/readme.md new file mode 100644 index 000000000..af435ec67 --- /dev/null +++ b/src/net/sourceforge/plantuml/descdiagram/readme.md @@ -0,0 +1,19 @@ +# Directory Documentation for `descdiagram` + +## Description +This package provides classes used to manage PlantUML Description Diagram: +- [Use Case Diagram](https://plantuml.com/use-case-diagram) +- [Component Diagram](https://plantuml.com/component-diagram) +- [Deployment Diagram](https://plantuml.com/deployment-diagram) +- [Archimate Diagram](https://plantuml.com/archimate-diagram) +- [Problem Diagram](http://alphadoc.plantuml.com/doc/markdown/en/problem-diagram) +- [Object Diagram](https://plantuml.com/object-diagram) + +## Reference +- [Architecture description language _(on Wikipedia)_](https://en.wikipedia.org/wiki/Architecture_description_language) +- [Software architecture description _(on Wikipedia)_](https://en.wikipedia.org/wiki/Software_architecture_description) + +## Credit + +## Misc. + diff --git a/src/net/sourceforge/plantuml/directdot/package-info.java b/src/net/sourceforge/plantuml/directdot/package-info.java new file mode 100644 index 000000000..fa2a7cef1 --- /dev/null +++ b/src/net/sourceforge/plantuml/directdot/package-info.java @@ -0,0 +1,7 @@ +/** + * Provides classes used to manage + * + * Dot Diagram. + * + */ +package net.sourceforge.plantuml.directdot; diff --git a/src/net/sourceforge/plantuml/directdot/readme.md b/src/net/sourceforge/plantuml/directdot/readme.md new file mode 100644 index 000000000..b446d9bf0 --- /dev/null +++ b/src/net/sourceforge/plantuml/directdot/readme.md @@ -0,0 +1,15 @@ +# Directory Documentation for `directdot` + +## Description +This package provides classes used to manage [PlantUML Dot Diagram](https://plantuml.com/dot). + +## Link +- [Dot Diagram](https://plantuml.com/dot) + +## Reference +- [Graphviz DOT Language](https://www.graphviz.org/doc/info/lang.html) + +## Credit + +## Misc. + diff --git a/src/net/sourceforge/plantuml/ditaa/package-info.java b/src/net/sourceforge/plantuml/ditaa/package-info.java new file mode 100644 index 000000000..c2cbdbd4c --- /dev/null +++ b/src/net/sourceforge/plantuml/ditaa/package-info.java @@ -0,0 +1,9 @@ +/** + * Provides classes used to manage + * + * Ditaa Diagram. + * + * @see org.stathissideris.ascii2image.graphics + * + */ +package net.sourceforge.plantuml.ditaa; diff --git a/src/net/sourceforge/plantuml/ditaa/readme.md b/src/net/sourceforge/plantuml/ditaa/readme.md new file mode 100644 index 000000000..1288661f2 --- /dev/null +++ b/src/net/sourceforge/plantuml/ditaa/readme.md @@ -0,0 +1,16 @@ +# Directory Documentation for `ditaa` + +## Description +This package provides classes used to manage [PlantUML Ditaa Diagram](https://plantuml.com/ditaa). + +## Link +- [Ditaa Diagram](https://plantuml.com/ditaa) + +## Reference + +## Credit +- [`org.stathissideris.ascii2image`](../../../../org/stathissideris/ascii2image) _(included in PlantUML)_ +- :octocat: [stathissideris/ditaa](https://github.com/stathissideris/ditaa) + +## Misc. + diff --git a/src/net/sourceforge/plantuml/donors/package-info.java b/src/net/sourceforge/plantuml/donors/package-info.java new file mode 100644 index 000000000..8514f7180 --- /dev/null +++ b/src/net/sourceforge/plantuml/donors/package-info.java @@ -0,0 +1,9 @@ +/** + * Provides classes used to manage + * + * Donors and + * + * Skinparameter Lists. + * + */ +package net.sourceforge.plantuml.donors; diff --git a/src/net/sourceforge/plantuml/donors/readme.md b/src/net/sourceforge/plantuml/donors/readme.md new file mode 100644 index 000000000..4f8e72b75 --- /dev/null +++ b/src/net/sourceforge/plantuml/donors/readme.md @@ -0,0 +1,17 @@ +# Directory Documentation for `donors` + +## Description +This package provides classes used to manage: +- [PlantUML Donors List](https://plantuml.com/donors) +- [PlantUML Skinparameter List](https://plantuml.com/skinparam) + +## Link +- [PlantUML Donors](https://plantuml.com/donors) +- [PlantUML Skinparameter](https://plantuml.com/skinparam) + +## Reference + +## Credit + +## Misc. + diff --git a/src/net/sourceforge/plantuml/dot/DotData.java b/src/net/sourceforge/plantuml/dot/DotData.java index 5b35c7ad0..95a30aaab 100644 --- a/src/net/sourceforge/plantuml/dot/DotData.java +++ b/src/net/sourceforge/plantuml/dot/DotData.java @@ -37,6 +37,7 @@ package net.sourceforge.plantuml.dot; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -101,6 +102,11 @@ final public class DotData implements PortionShower { public boolean showPortion(EntityPortion portion, Entity entity) { return true; } + + public List getVisibleStereotypeLabels(Entity entity) { + return Collections.emptyList(); + } + }, entityFactory, isHideEmptyDescriptionForState, dotMode, namespaceSeparator, pragma); } @@ -136,6 +142,10 @@ final public class DotData implements PortionShower { return portionShower.showPortion(portion, entity); } + public List getVisibleStereotypeLabels(Entity entity) { + return portionShower.getVisibleStereotypeLabels(entity); + } + public Entity getRootGroup() { return entityFactory.getRootGroup(); } diff --git a/src/net/sourceforge/plantuml/dot/GraphvizLinux.java b/src/net/sourceforge/plantuml/dot/GraphvizLinux.java index a1db5a1bd..c3282131d 100644 --- a/src/net/sourceforge/plantuml/dot/GraphvizLinux.java +++ b/src/net/sourceforge/plantuml/dot/GraphvizLinux.java @@ -48,10 +48,10 @@ class GraphvizLinux extends AbstractGraphviz { @Override protected File specificDotExe() { - final File all[] = new File[] { new File("/usr/local/bin/dot"), new File("/usr/bin/dot"), - new File("/opt/homebrew/bin/dot") }; + final File all[] = new File[] { new File("/usr/local/bin/dot"), new File("/opt/homebrew/bin/dot"), + new File("/opt/homebrew/opt/graphviz/bin/dot"), new File("/usr/bin/dot") }; for (File f : all) - if (f.exists()) + if (f.exists() && f.canRead() && f.canExecute()) return f; return new File("/opt/local/bin/dot"); } diff --git a/src/net/sourceforge/plantuml/dot/package-info.java b/src/net/sourceforge/plantuml/dot/package-info.java new file mode 100644 index 000000000..8ca4ea6a7 --- /dev/null +++ b/src/net/sourceforge/plantuml/dot/package-info.java @@ -0,0 +1,11 @@ +/** + * Provides classes used to manage + * + * Graphviz dot for layout engine. + * + * @see net.sourceforge.plantuml.elk + * @see net.sourceforge.plantuml.sdot + * @see net.sourceforge.plantuml.vizjs + * + */ +package net.sourceforge.plantuml.dot; diff --git a/src/net/sourceforge/plantuml/dot/readme.md b/src/net/sourceforge/plantuml/dot/readme.md new file mode 100644 index 000000000..9f10d71c1 --- /dev/null +++ b/src/net/sourceforge/plantuml/dot/readme.md @@ -0,0 +1,23 @@ +# Directory Documentation for `dot` + +## Description +This package provides classes used to export diagram with the [Graphviz dot](https://plantuml.com/graphviz-dot) layout engine. + +## Link +- [Graphviz dot](https://plantuml.com/graphviz-dot) + +## Reference +- [Graphviz](https://graphviz.org) +- [Graphviz _(on GitLab)_](https://gitlab.com/graphviz/graphviz/) + +## See also other engines +- [PlantUML 'Eclipse Layout Kernel (ELK)' Engine](https://plantuml.com/elk) + - [`elk/proxy`](./proxy/) _(included in PlantUML)_ +- [Smetana _(internal port of GraphViz in plantuml)_](https://plantuml.com/smetana02) and :octocat: [plantuml/smetana](https://github.com/plantuml/smetana) + - [`plantuml/sdot`](../sdot/) + - [`src/gen`](../../../../gen) + - [`src/smetana/core`](../../../../smetana/core) + - [`src/h`](../../../../h) +- [PlantUML Vizjs _(a port to Javascript of GraphViz)_](https://plantuml.com/vizjs) + - [`plantuml/vizjs`](../vizjs/) _(included in PlantUML)_ + - :octocat: [Plantuml/Vizjs](https://github.com/plantuml/vizjs) _(not included in `plantuml/plantuml`)_ \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/ebnf/package-info.java b/src/net/sourceforge/plantuml/ebnf/package-info.java new file mode 100644 index 000000000..1a575b81f --- /dev/null +++ b/src/net/sourceforge/plantuml/ebnf/package-info.java @@ -0,0 +1,9 @@ +/** + * Provides classes used to manage + * + * EBNF (Extended Backus–Naur Form) Diagram. + * + * @see net.sourceforge.plantuml.regexdiagram + * + */ +package net.sourceforge.plantuml.ebnf; diff --git a/src/net/sourceforge/plantuml/ebnf/readme.md b/src/net/sourceforge/plantuml/ebnf/readme.md new file mode 100644 index 000000000..467522f50 --- /dev/null +++ b/src/net/sourceforge/plantuml/ebnf/readme.md @@ -0,0 +1,23 @@ +# Directory Documentation for `ebnf` + +## Description +This package provides classes used to manage [Extended Backus–Naur Form (EBNF) Diagram](https://plantuml.com/ebnf). + +## Link +- [Extended Backus–Naur Form (EBNF) Diagram](https://plantuml.com/ebnf) + +## Reference +### Internal Reference +- [QA-16529](https://forum.plantuml.net/16529/could-we-add-syntax-diagrams) + +### External Reference +- [Syntax diagram _(on Wikipedia)_](https://en.wikipedia.org/wiki/Syntax_diagram) +- [Extended Backus–Naur Form (EBNF) _(on Wikipedia)_](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form) +- [ISO/IEC 14977 : 1996(E)](http://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf) + +## See also +- [PlantUML Regular expression (Regex) Diagram](https://plantuml.com/regex) +- [`regexdiagram`](../regexdiagram/) _(directory on plantuml)_ + +## Misc. +- [Shunting yard algorithm](https://en.wikipedia.org/wiki/Shunting_yard_algorithm) diff --git a/src/net/sourceforge/plantuml/eggs/QuoteUtils.java b/src/net/sourceforge/plantuml/eggs/QuoteUtils.java index 7dc539982..8e79ef5de 100644 --- a/src/net/sourceforge/plantuml/eggs/QuoteUtils.java +++ b/src/net/sourceforge/plantuml/eggs/QuoteUtils.java @@ -58,6 +58,7 @@ public class QuoteUtils { "Qba'g Cnavp!", "Jung qb lbh zrna? Na Nsevpna be Rhebcrna fjnyybj?", "V arrq lbhe obbgf lbhe pybgurf naq lbhe zbgbeplpyr", "Lbh sbetbg gb fnl cyrnfr...", "Lbh unir qvrq bs qlfragrel.", "Jbhyqa'g lbh cersre n avpr tnzr bs purff?", + "Ubj nobhg n avpr tnzr bs purff?", "Jura lbh unir ryvzvangrq gur vzcbffvoyr, jungrire erznvaf, ubjrire vzcebonoyr, zhfg or gur gehgu.", "V xabj abj jul lbh pel. Ohg vg'f fbzrguvat V pna arire qb.", "Erfvfgnapr vf shgvyr. Lbh jvyy or nffvzvyngrq.", "Nalguvat qvssrerag vf tbbq.", @@ -318,7 +319,11 @@ public class QuoteUtils { "cynaghzy: qvntenzf sbe pbashfvat crbcyr zber", "Ha zbeprnh dhv onynapr qh gbaareer?", "Pnhtug hc va pvepyrf, pbashfvba vf abguvat arj", "N pbzcyrk flfgrz qrfvtarq sebz fpengpu arire jbexf naq pnaabg or cngpurq hc gb znxr vg jbex.", - "Gur vagrearg vf pbzvat", "Qba'g lbh xabj guvatf unccra sbe n ernfba"); + "Gur vagrearg vf pbzvat", "Qba'g lbh xabj guvatf unccra sbe n ernfba", + "V qba'g ernyyl srry yvxr Oneovr nalzber", "P'rfg gba abz dhr wr cbfr fhe yrf zhef qr Cnevf", + "Lbh qba'g arrq zbarl, qba'g gnxr snzr", + "V qba'g nyjnlf grfg zl pbqr, ohg jura V qb, V qb vg va cebqhpgvba.", "Npgvingr gur Bzrtn Guvegrra.", + "V xabj vg'f Jrqarfqnl, ohg jung n jrrx, uhu?", "Vs Vg Pbzcvyrf, Vg Jbexf", "Unzfgre ng irybpvgl crnx"); private QuoteUtils() { } diff --git a/src/net/sourceforge/plantuml/eggs/package-info.java b/src/net/sourceforge/plantuml/eggs/package-info.java new file mode 100644 index 000000000..4b918d842 --- /dev/null +++ b/src/net/sourceforge/plantuml/eggs/package-info.java @@ -0,0 +1,5 @@ +/** + * Provides classes used to manage PlantUML Easter Eggs. + * + */ +package net.sourceforge.plantuml.eggs; diff --git a/src/net/sourceforge/plantuml/eggs/readme.md b/src/net/sourceforge/plantuml/eggs/readme.md new file mode 100644 index 000000000..ca82cb317 --- /dev/null +++ b/src/net/sourceforge/plantuml/eggs/readme.md @@ -0,0 +1,14 @@ +# Directory Documentation for `eggs` + +## Description +This package provides classes used to manage PlantUML Easter Eggs. + +## Link + +## Reference +- [Easter egg _(on Wikipedia)_](https://en.wikipedia.org/wiki/Easter_egg_(media)) + +## Credit + +## Misc. + diff --git a/src/net/sourceforge/plantuml/elk/package-info.java b/src/net/sourceforge/plantuml/elk/package-info.java new file mode 100644 index 000000000..a9bbe414a --- /dev/null +++ b/src/net/sourceforge/plantuml/elk/package-info.java @@ -0,0 +1,12 @@ +/** + * Provides classes used to manage + * + * Eclipse Layout Kernel (ELK) for layout engine. + * + * @see net.sourceforge.plantuml.elk.proxy + * @see net.sourceforge.plantuml.dot + * @see net.sourceforge.plantuml.sdot + * @see net.sourceforge.plantuml.vizjs + * + */ +package net.sourceforge.plantuml.elk; diff --git a/src/net/sourceforge/plantuml/elk/readme.md b/src/net/sourceforge/plantuml/elk/readme.md new file mode 100644 index 000000000..8c9c4361f --- /dev/null +++ b/src/net/sourceforge/plantuml/elk/readme.md @@ -0,0 +1,27 @@ +# Directory Documentation for `elk` + +## Description +This package provides classes used to export diagram with the [Eclipse Layout Kernel (ELK)](https://plantuml.com/elk) layout engine. + +## Link +- [PlantUML 'Eclipse Layout Kernel (ELK)' Engine](https://plantuml.com/elk) + +## Reference +- [Eclipse Layout Kernel (ELK)](https://eclipse.dev/elk/) +- [ELK Documentation](https://eclipse.dev/elk/documentation.html) + +## Credit +- [`elk/proxy`](./proxy/) _(included in PlantUML)_ +- :octocat: [eclipse/elk](https://github.com/eclipse/elk) + +## See also other engines +- [GraphViz dot](https://plantuml.com/graphviz-dot) + - [`plantuml/dot`](../dot/) +- [Smetana _(internal port of GraphViz in plantuml)_](https://plantuml.com/smetana02) and :octocat: [plantuml/smetana](https://github.com/plantuml/smetana) + - [`plantuml/sdot`](../sdot/) + - [`src/gen`](../../../../gen) + - [`src/smetana/core`](../../../../smetana/core) + - [`src/h`](../../../../h) +- [PlantUML Vizjs _(a port to Javascript of GraphViz)_](https://plantuml.com/vizjs) + - [`plantuml/vizjs`](../vizjs/) _(included in PlantUML)_ + - :octocat: [Plantuml/Vizjs](https://github.com/plantuml/vizjs) _(not included in `plantuml/plantuml`)_ \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/emoji/package-info.java b/src/net/sourceforge/plantuml/emoji/package-info.java new file mode 100644 index 000000000..c8de08cdc --- /dev/null +++ b/src/net/sourceforge/plantuml/emoji/package-info.java @@ -0,0 +1,9 @@ +/** + * Provides classes used to manage + * + * PlantUML Emoji icon set. + * + * @see net.sourceforge.plantuml.openiconic + * + */ +package net.sourceforge.plantuml.emoji; diff --git a/src/net/sourceforge/plantuml/emoji/readme.md b/src/net/sourceforge/plantuml/emoji/readme.md new file mode 100644 index 000000000..8de541223 --- /dev/null +++ b/src/net/sourceforge/plantuml/emoji/readme.md @@ -0,0 +1,10 @@ +# Directory Documentation for `emoji` + +## Description +This package provides classes used to manage [PlantUML Emoji](https://plantuml.com/en/creole#68305e25f5788db0) icon set. + +## Link +- [PlantUML Emoji](https://plantuml.com/en/creole#68305e25f5788db0) icon set + +## Credit +- :octocat: [EmojiTwo/emojitwo](https://github.com/EmojiTwo/emojitwo) diff --git a/src/net/sourceforge/plantuml/anim/AnimationDecoder.java b/src/net/sourceforge/plantuml/error/PSystemUnsupported.java similarity index 51% rename from src/net/sourceforge/plantuml/anim/AnimationDecoder.java rename to src/net/sourceforge/plantuml/error/PSystemUnsupported.java index 9328169e5..a75a587ac 100644 --- a/src/net/sourceforge/plantuml/anim/AnimationDecoder.java +++ b/src/net/sourceforge/plantuml/error/PSystemUnsupported.java @@ -5,12 +5,12 @@ * (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 @@ -33,46 +33,44 @@ * * */ -package net.sourceforge.plantuml.anim; +package net.sourceforge.plantuml.error; +import java.io.IOException; import java.util.ArrayList; -import java.util.Collections; -import java.util.Iterator; import java.util.List; -import java.util.StringTokenizer; -public class AnimationDecoder { +import net.sourceforge.plantuml.FileFormatOption; +import net.sourceforge.plantuml.PlainDiagram; +import net.sourceforge.plantuml.core.DiagramDescription; +import net.sourceforge.plantuml.core.UmlSource; +import net.sourceforge.plantuml.klimt.shape.GraphicStrings; +import net.sourceforge.plantuml.klimt.shape.TextBlock; +import net.sourceforge.plantuml.klimt.shape.UDrawable; +import net.sourceforge.plantuml.version.License; +import net.sourceforge.plantuml.version.Version; - private final List result = new ArrayList<>(); +public class PSystemUnsupported extends PlainDiagram { - public AnimationDecoder(Iterable data) { + private final List strings = new ArrayList<>(); - for (final Iterator it = data.iterator(); it.hasNext();) { - String line = it.next().toString(); - if (line.matches("^\\s*\\[script\\]\\s*$")) { - final StringBuilder scriptText = new StringBuilder(); - while (true) { - line = it.next().toString(); - if (line.matches("^\\s*\\[/script\\]\\s*$")) { - final AnimationScript script = new AnimationScript(); - final String out = script.eval(scriptText.toString()); - for (final StringTokenizer st = new StringTokenizer(out, "\n"); st.hasMoreTokens();) { - result.add(st.nextToken()); - } - break; - } else { - scriptText.append(line); - scriptText.append("\n"); - } - } - } else { - result.add(line); - } - } + public PSystemUnsupported(UmlSource source) { + super(source); + strings.add("Diagram not supported by this release of PlantUML"); + strings.add(Version.fullDescription()); + strings.add("License " + new License().toString()); } - public List decode() { - return Collections.unmodifiableList(result); + @Override + protected UDrawable getRootDrawable(FileFormatOption fileFormatOption) throws IOException { + return getGraphicStrings(); + } + + public TextBlock getGraphicStrings() { + return GraphicStrings.createBlackOnWhite(strings); + } + + public DiagramDescription getDescription() { + return new DiagramDescription("(Unsupported)"); } } diff --git a/src/net/sourceforge/plantuml/error/package-info.java b/src/net/sourceforge/plantuml/error/package-info.java new file mode 100644 index 000000000..22c6aa558 --- /dev/null +++ b/src/net/sourceforge/plantuml/error/package-info.java @@ -0,0 +1,5 @@ +/** + * Provides classes used to manage Error. + * + */ +package net.sourceforge.plantuml.error; diff --git a/src/net/sourceforge/plantuml/error/readme.md b/src/net/sourceforge/plantuml/error/readme.md new file mode 100644 index 000000000..6ccef460f --- /dev/null +++ b/src/net/sourceforge/plantuml/error/readme.md @@ -0,0 +1,4 @@ +# Directory Documentation for `error` + +## Description +This package provides classes used to manage Error. diff --git a/src/net/sourceforge/plantuml/file/package-info.java b/src/net/sourceforge/plantuml/file/package-info.java new file mode 100644 index 000000000..db17bd331 --- /dev/null +++ b/src/net/sourceforge/plantuml/file/package-info.java @@ -0,0 +1,7 @@ +/** + * Provides classes used to manage Folder and File. + * + * @see net.sourceforge.plantuml.security.SFile + * + */ +package net.sourceforge.plantuml.file; diff --git a/src/net/sourceforge/plantuml/file/readme.md b/src/net/sourceforge/plantuml/file/readme.md new file mode 100644 index 000000000..401e0cb39 --- /dev/null +++ b/src/net/sourceforge/plantuml/file/readme.md @@ -0,0 +1,4 @@ +# Directory Documentation for `file` + +## Description +This package provides classes used to manage Folder and File. diff --git a/src/net/sourceforge/plantuml/filesdiagram/package-info.java b/src/net/sourceforge/plantuml/filesdiagram/package-info.java new file mode 100644 index 000000000..64dbd8b7a --- /dev/null +++ b/src/net/sourceforge/plantuml/filesdiagram/package-info.java @@ -0,0 +1,7 @@ +/** + * Provides classes used to manage + * + * [Tree] Files diagram. + * + */ +package net.sourceforge.plantuml.filesdiagram; diff --git a/src/net/sourceforge/plantuml/filesdiagram/readme.md b/src/net/sourceforge/plantuml/filesdiagram/readme.md new file mode 100644 index 000000000..158fce745 --- /dev/null +++ b/src/net/sourceforge/plantuml/filesdiagram/readme.md @@ -0,0 +1,15 @@ +# Directory Documentation for `filesdiagram` + +## Description +This package provides classes used to manage [[Tree] Files diagram](http://alphadoc.plantuml.com/doc/markdown/en/files-diagram). + +## Link +- [[Tree] Files diagram _(on alpha-doc)_](http://alphadoc.plantuml.com/doc/markdown/en/files-diagram) + +## Reference +- [GH-1448](https://github.com/plantuml/plantuml/issues/1448) + +## Credit + +## Misc. + diff --git a/src/net/sourceforge/plantuml/flashcode/package-info.java b/src/net/sourceforge/plantuml/flashcode/package-info.java new file mode 100644 index 000000000..e016dc1c9 --- /dev/null +++ b/src/net/sourceforge/plantuml/flashcode/package-info.java @@ -0,0 +1,8 @@ +/** + * Provides classes used to manage + * Flashcode especially QR Code (on PlantUML). + * + * @see ext.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 new file mode 100644 index 000000000..5d49c3123 --- /dev/null +++ b/src/net/sourceforge/plantuml/flashcode/readme.md @@ -0,0 +1,15 @@ +# Directory Documentation for `flashcode` + +## Description +This package provides classes used to manage Flashcode especially QR Code (on PlantUML). + +## Reference +- [Barcode _(on Wikipedia)_](https://en.wikipedia.org/wiki/Barcode) +- [QR code _(on Wikipedia)_](https://en.wikipedia.org/wiki/QR_code) + +## Credit +- [`com.google.zxing`](../../../../ext/plantuml/com/google/zxing/) _(included in PlantUML)_ +- :octocat: [zxing/zxing](https://github.com/zxing/zxing) + +## Misc. +- [Flashcode _(on Wikipedia)_](https://fr.wikipedia.org/wiki/Flashcode) [fr] diff --git a/src/net/sourceforge/plantuml/font/package-info.java b/src/net/sourceforge/plantuml/font/package-info.java new file mode 100644 index 000000000..53bdbcd07 --- /dev/null +++ b/src/net/sourceforge/plantuml/font/package-info.java @@ -0,0 +1,7 @@ +/** + * Provides classes used to manage + * + * Font list. + * + */ +package net.sourceforge.plantuml.font; diff --git a/src/net/sourceforge/plantuml/font/readme.md b/src/net/sourceforge/plantuml/font/readme.md new file mode 100644 index 000000000..b5a80bfe7 --- /dev/null +++ b/src/net/sourceforge/plantuml/font/readme.md @@ -0,0 +1,4 @@ +# Directory Documentation for `font` + +## Description +This package provides classes used to manage [Font List](https://plantuml.com/font). diff --git a/src/net/sourceforge/plantuml/ftp/package-info.java b/src/net/sourceforge/plantuml/ftp/package-info.java new file mode 100644 index 000000000..8ca5be51d --- /dev/null +++ b/src/net/sourceforge/plantuml/ftp/package-info.java @@ -0,0 +1,7 @@ +/** + * Provides classes used to manage + * + * FTP server. + * + */ +package net.sourceforge.plantuml.ftp; diff --git a/src/net/sourceforge/plantuml/ftp/readme.md b/src/net/sourceforge/plantuml/ftp/readme.md new file mode 100644 index 000000000..c93d7bccb --- /dev/null +++ b/src/net/sourceforge/plantuml/ftp/readme.md @@ -0,0 +1,13 @@ +# Directory Documentation for `ftp` + +## Description +This package provides classes used to manage a [FTP](https://plantuml.com/ftp) server. + +## Link +- [PlantUML FTP server](https://plantuml.com/ftp) + +## Reference +- [QA-9235](https://forum.plantuml.net/9235/unexpected-ftp-session) + +## Reference +- [File Transfer Protocol _(on Wikipedia)_](https://en.wikipedia.org/wiki/File_Transfer_Protocol) diff --git a/src/net/sourceforge/plantuml/fun/package-info.java b/src/net/sourceforge/plantuml/fun/package-info.java new file mode 100644 index 000000000..791aedc74 --- /dev/null +++ b/src/net/sourceforge/plantuml/fun/package-info.java @@ -0,0 +1,6 @@ +/** + * Provides classes used to manage + * PlantUML Fun icon set. + * + */ +package net.sourceforge.plantuml.fun; diff --git a/src/net/sourceforge/plantuml/fun/readme.md b/src/net/sourceforge/plantuml/fun/readme.md new file mode 100644 index 000000000..57fc099e1 --- /dev/null +++ b/src/net/sourceforge/plantuml/fun/readme.md @@ -0,0 +1,4 @@ +# Directory Documentation for `fun` + +## Description +This package provides classes used to manage Fun icon or sprite set. diff --git a/src/net/sourceforge/plantuml/gitlog/package-info.java b/src/net/sourceforge/plantuml/gitlog/package-info.java new file mode 100644 index 000000000..4f8c7465d --- /dev/null +++ b/src/net/sourceforge/plantuml/gitlog/package-info.java @@ -0,0 +1,7 @@ +/** + * Provides classes used to manage + * + * Commits Git Log Diagram. + * + */ +package net.sourceforge.plantuml.gitlog; diff --git a/src/net/sourceforge/plantuml/gitlog/readme.md b/src/net/sourceforge/plantuml/gitlog/readme.md new file mode 100644 index 000000000..d924e612d --- /dev/null +++ b/src/net/sourceforge/plantuml/gitlog/readme.md @@ -0,0 +1,12 @@ +# Directory Documentation for `gitlog` + +## Description +This package provides classes used to manage [PlantUML Commits Git Log Diagram Diagram](http://alphadoc.plantuml.com/doc/markdown/en/git-diagram). + +## Link +- [PlantUML Commits Git Log Diagram Diagram _(on Alpha-doc)_](http://alphadoc.plantuml.com/doc/markdown/en/git-diagram) + +## Reference +- [QA-13557](https://forum.plantuml.net/13557/support-for-the-different-%40start-commands) +- [GH-493](https://github.com/plantuml/plantuml/pull/493) + diff --git a/src/net/sourceforge/plantuml/graphml/package-info.java b/src/net/sourceforge/plantuml/graphml/package-info.java new file mode 100644 index 000000000..2732cbe4e --- /dev/null +++ b/src/net/sourceforge/plantuml/graphml/package-info.java @@ -0,0 +1,5 @@ +/** + * Provides classes used to manage Graphml output format. + * + */ +package net.sourceforge.plantuml.graphml; diff --git a/src/net/sourceforge/plantuml/graphml/readme.md b/src/net/sourceforge/plantuml/graphml/readme.md new file mode 100644 index 000000000..4572cd1da --- /dev/null +++ b/src/net/sourceforge/plantuml/graphml/readme.md @@ -0,0 +1,16 @@ +# Directory Documentation for `graphml` + +## Description +This package provides classes used to export diagram to a Graphml output format. + +## Link +- https://github.com/plantuml/plantuml/commit/a195b4e842b6775ea80a79f43218a0e9c905e406 +- [`graphml` search results on `plantuml/plantuml`](https://github.com/search?q=repo%3Aplantuml%2Fplantuml+graphml&type=code) +- [QA-5307](https://forum.plantuml.net/5307/export-to-graphml) + +## Reference +- [GraphML _(on Wikipedia)_](https://en.wikipedia.org/wiki/GraphML) + + +## See also +- ["Generic Model Export" on `graphml` branch](https://github.com/plantuml/plantuml/blob/graphml/src/net/sourceforge/plantuml/graphml/docs/overview.md) \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/hcl/package-info.java b/src/net/sourceforge/plantuml/hcl/package-info.java new file mode 100644 index 000000000..7fe2a12e1 --- /dev/null +++ b/src/net/sourceforge/plantuml/hcl/package-info.java @@ -0,0 +1,7 @@ +/** + * Provides classes used to manage + * + * HCL diagram. + * + */ +package net.sourceforge.plantuml.hcl; diff --git a/src/net/sourceforge/plantuml/hcl/readme.md b/src/net/sourceforge/plantuml/hcl/readme.md new file mode 100644 index 000000000..d1d522898 --- /dev/null +++ b/src/net/sourceforge/plantuml/hcl/readme.md @@ -0,0 +1,15 @@ +# Directory Documentation for `hcl` + +## Description +This package provides classes used to manage [PlantUML HCL Diagram](http://alphadoc.plantuml.com/doc/markdown/en/hcl). + +## Link +- [HCL Diagram _(on alpha-doc)_](http://alphadoc.plantuml.com/doc/markdown/en/hcl) + +## Reference +- [QA-17357](https://forum.plantuml.net/17357/documentation-of-hcl-and-regex) + +## Credit + +## Misc. + diff --git a/src/net/sourceforge/plantuml/help/package-info.java b/src/net/sourceforge/plantuml/help/package-info.java new file mode 100644 index 000000000..a4dd0f108 --- /dev/null +++ b/src/net/sourceforge/plantuml/help/package-info.java @@ -0,0 +1,5 @@ +/** + * Provides classes used to manage Help list. + * + */ +package net.sourceforge.plantuml.help; diff --git a/src/net/sourceforge/plantuml/help/readme.md b/src/net/sourceforge/plantuml/help/readme.md new file mode 100644 index 000000000..ac4ca1174 --- /dev/null +++ b/src/net/sourceforge/plantuml/help/readme.md @@ -0,0 +1,18 @@ +# Directory Documentation for `help` + +## Description +This package provides classes used to manage: +- `help color` +- `help font` +- `help keyword` +- `help theme` +- `help type` + +## Link + +## Reference + +## Credit + +## Misc. + diff --git a/src/net/sourceforge/plantuml/html/package-info.java b/src/net/sourceforge/plantuml/html/package-info.java new file mode 100644 index 000000000..e461f1694 --- /dev/null +++ b/src/net/sourceforge/plantuml/html/package-info.java @@ -0,0 +1,7 @@ +/** + * Provides classes used to manage + * + * HTML output format. + * + */ +package net.sourceforge.plantuml.html; diff --git a/src/net/sourceforge/plantuml/html/readme.md b/src/net/sourceforge/plantuml/html/readme.md new file mode 100644 index 000000000..876704f5e --- /dev/null +++ b/src/net/sourceforge/plantuml/html/readme.md @@ -0,0 +1,9 @@ +# Directory Documentation for `html` + +## Description +This package provides classes used to export diagram to a [HTML](https://plantuml.com/en/command-line#458de91d76a8569c) output format. + +## Link +- [PlantUML HTML Output Format](https://plantuml.com/en/command-line#458de91d76a8569c) + +## Reference diff --git a/src/net/sourceforge/plantuml/jasic/Jasic.java b/src/net/sourceforge/plantuml/jasic/Jasic.java deleted file mode 100644 index 3bc1b359d..000000000 --- a/src/net/sourceforge/plantuml/jasic/Jasic.java +++ /dev/null @@ -1,829 +0,0 @@ -package net.sourceforge.plantuml.jasic; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/* - Jasic uses the MIT License: - - Copyright (c) 2010 Robert Nystrom - - Permission is hereby granted, free of charge, to any person obtaining a copy of - this software and associated documentation files (the "Software"), to deal in - the Software without restriction, including without limitation the rights to - use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - the Software, and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ -/* - * This defines a single class that contains an entire interpreter for a language very similar to the original BASIC. - * Everything is here (albeit in very simplified form): tokenizing, parsing, and interpretation. The file is organized - * in phases, with each appearing roughly in the order that they occur when a program is run. You should be able to read - * this top-down to walk through the entire process of loading and running a program. - * - * Jasic language syntax --------------------- - * - * Comments start with ' and proceed to the end of the line: - * - * print "hi there" ' this is a comment - * - * Numbers and strings are supported. Strings should be in "double quotes", and only positive integers can be parsed - * (though numbers are double internally). - * - * Variables are identified by name which must start with a letter and can contain letters or numbers. Case is - * significant for names and keywords. - * - * Each statement is on its own line. Optionally, a line may have a label before the statement. A label is a name that - * ends with a colon: - * - * foo: - * - * - * The following statements are supported: - * - * = Evaluates the expression and assigns the result to the given named variable. All variables are - * globally scoped. - * - * pi = (314159 / 10000) - * - * print Evaluates the expression and prints the result. - * - * print "hello, " + "world" - * - * input Reads in a line of input from the user and stores it in the variable with the given name. - * - * input guess - * - * goto