From 678949b44c0f9867cf06327bd9565b006d8c397f Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Mon, 6 Feb 2023 22:04:53 +0100 Subject: [PATCH] Wip --- src/com/plantuml/wasm/Canvas.java | 33 +- src/com/plantuml/wasm/WasmLog.java | 4 +- .../plantuml/com/ctreber/acearth/ACearth.java | 2 +- .../com/ctreber/aclib/gui/MOBoolean.java | 2 +- .../com/ctreber/aclib/sort/CTSort.java | 2 +- .../com/google/zxing/BarcodeFormat.java | 2 +- src/jcckit/GraphicsPlotCanvas.java | 2 +- .../sourceforge/plantuml/AbstractPSystem.java | 4 +- src/net/sourceforge/plantuml/DirWatcher.java | 2 +- src/net/sourceforge/plantuml/DirWatcher2.java | 2 +- .../plantuml/EmptyImageBuilder.java | 2 +- src/net/sourceforge/plantuml/FileFormat.java | 8 +- src/net/sourceforge/plantuml/FileSystem.java | 8 +- .../plantuml/ISourceFileReader.java | 2 +- src/net/sourceforge/plantuml/Option.java | 4 +- src/net/sourceforge/plantuml/OptionFlags.java | 6 +- src/net/sourceforge/plantuml/OptionPrint.java | 2 +- .../sourceforge/plantuml/PSystemBuilder.java | 22 +- .../sourceforge/plantuml/PSystemUtils.java | 6 +- src/net/sourceforge/plantuml/Run.java | 2 +- .../plantuml/SourceFileReader.java | 2 +- .../plantuml/SourceFileReaderAbstract.java | 2 +- .../plantuml/SourceFileReaderCopyCat.java | 2 +- .../plantuml/SourceFileReaderHardFile.java | 2 +- src/net/sourceforge/plantuml/StdrptV1.java | 2 +- src/net/sourceforge/plantuml/StdrptV2.java | 2 +- src/net/sourceforge/plantuml/StringUtils.java | 2 +- .../sourceforge/plantuml/SuggestedFile.java | 2 +- .../sourceforge/plantuml/TitledDiagram.java | 4 +- src/net/sourceforge/plantuml/UmlDiagram.java | 10 +- .../plantuml/acearth/PSystemXearth.java | 2 +- .../activitydiagram/ActivityDiagram.java | 61 +- .../activitydiagram/ConditionalContext.java | 8 +- .../activitydiagram/command/CommandElse.java | 4 +- .../activitydiagram/command/CommandIf.java | 6 +- .../command/CommandInnerConcurrent.java | 2 +- .../command/CommandLinkActivity.java | 18 +- .../command/CommandLinkLongActivity.java | 8 +- .../command/CommandPartition.java | 6 +- .../activitydiagram3/AbstractInstruction.java | 2 +- .../plantuml/activitydiagram3/Branch.java | 8 +- .../activitydiagram3/Instruction.java | 2 +- .../activitydiagram3/InstructionBreak.java | 2 +- .../activitydiagram3/InstructionEnd.java | 2 +- .../activitydiagram3/InstructionFork.java | 2 +- .../activitydiagram3/InstructionGoto.java | 2 +- .../activitydiagram3/InstructionGroup.java | 2 +- .../activitydiagram3/InstructionIf.java | 2 +- .../activitydiagram3/InstructionLabel.java | 2 +- .../activitydiagram3/InstructionList.java | 2 +- .../activitydiagram3/InstructionRepeat.java | 2 +- .../activitydiagram3/InstructionSimple.java | 2 +- .../activitydiagram3/InstructionSplit.java | 2 +- .../activitydiagram3/InstructionSpot.java | 2 +- .../activitydiagram3/InstructionStart.java | 2 +- .../activitydiagram3/InstructionStop.java | 2 +- .../activitydiagram3/InstructionSwitch.java | 2 +- .../activitydiagram3/InstructionWhile.java | 2 +- .../activitydiagram3/ftile/Swimlanes.java | 6 +- .../ftile/UGraphicInterceptorUDrawable2.java | 2 +- .../UGraphicInterceptorOneSwimlane.java | 2 +- .../activitydiagram3/gtile/Gtile.java | 2 +- .../plantuml/anim/AffineTransformation.java | 2 +- .../plantuml/ant/CheckZipTask.java | 2 +- .../plantuml/api/mda/option2/MDADiagram.java | 2 +- .../plantuml/api/mda/option3/MDAVisitor.java | 2 +- .../sourceforge/plantuml/argon2/Argon2.java | 2 +- .../asciiart/AbstractComponentText.java | 2 +- .../plantuml/baraye/CucaDiagram.java | 155 ++-- .../plantuml/baraye/EntityFactory.java | 95 +-- .../plantuml/baraye/EntityImp.java | 732 ------------------ .../plantuml/baraye/EntityUtils.java | 54 +- .../sourceforge/plantuml/baraye/Plasma.java | 173 ----- .../sourceforge/plantuml/baraye/Quark.java | 180 ----- .../plantuml/board/BoardDiagramFactory.java | 2 +- .../sourceforge/plantuml/bpm/BpmDiagram.java | 2 +- .../plantuml/braille/BrailleChar.java | 2 +- .../plantuml/brotli/BitReader.java | 2 +- .../classdiagram/AbstractEntityDiagram.java | 2 +- .../plantuml/classdiagram/ClassDiagram.java | 6 +- .../command/CommandAddMethod.java | 6 +- .../command/CommandCreateClass.java | 49 +- .../command/CommandCreateClassMultilines.java | 16 +- .../command/CommandCreateElementFull2.java | 6 +- .../command/CommandDiamondAssociation.java | 2 +- .../command/CommandHideShowByGender.java | 10 +- .../command/CommandLinkClass.java | 36 +- .../command/CommandLinkLollipop.java | 14 +- .../command/CommandStereotype.java | 6 +- .../classdiagram/command/CommandUrl.java | 6 +- .../plantuml/code/CompressionBrotli.java | 2 +- .../plantuml/code/CompressionZlib.java | 4 +- .../plantuml/code/CompressionZlibAttic.java | 2 +- .../plantuml/code/CompressionZopfliZlib.java | 2 +- .../command/CommandAffineTransform.java | 2 +- .../plantuml/command/CommandNamespace.java | 12 +- .../plantuml/command/CommandNamespace2.java | 6 +- .../command/CommandNamespaceEmpty.java | 6 +- .../plantuml/command/CommandPackage.java | 12 +- .../plantuml/command/CommandPackageEmpty.java | 6 +- .../plantuml/command/CommandPragma.java | 2 +- .../command/note/CommandFactoryNote.java | 6 +- .../note/CommandFactoryNoteActivity.java | 12 +- .../note/CommandFactoryNoteOnEntity.java | 10 +- .../note/CommandFactoryTipOnEntity.java | 12 +- .../command/CommandCreateBlock.java | 6 +- .../command/CommandCreatePackageBlock.java | 2 +- .../command/CommandLinkBlock.java | 8 +- .../plantuml/creole/atom/AtomImg.java | 2 +- .../plantuml/creole/atom/AtomMath.java | 2 +- .../creole/command/CommandCreoleLatex.java | 2 +- .../creole/command/CommandCreoleMath.java | 2 +- .../plantuml/creole/legacy/CreoleParser.java | 2 +- .../plantuml/creole/legacy/PSystemCreole.java | 2 +- .../creole/legacy/PSystemCreoleFactory.java | 2 +- .../plantuml/creole/legacy/StripeLatex.java | 2 +- .../plantuml/creole/legacy/StripeSimple.java | 6 +- .../plantuml/cucadiagram/Bodier.java | 4 +- .../plantuml/cucadiagram/BodierJSon.java | 6 +- .../cucadiagram/BodierLikeClassOrObject.java | 6 +- .../plantuml/cucadiagram/BodierMap.java | 6 +- .../plantuml/cucadiagram/BodierSimple.java | 6 +- .../plantuml/cucadiagram/BodyEnhanced1.java | 8 +- .../plantuml/cucadiagram/BodyFactory.java | 6 +- .../plantuml/cucadiagram/Display.java | 2 +- .../plantuml/cucadiagram/EntityGender.java | 4 +- .../cucadiagram/EntityGenderUtils.java | 26 +- .../plantuml/cucadiagram/GroupHierarchy.java | 8 +- .../plantuml/cucadiagram/GroupPrinter.java | 20 +- .../plantuml/cucadiagram/HideOrShow2.java | 12 +- .../plantuml/cucadiagram/ICucaDiagram.java | 8 +- .../plantuml/cucadiagram/Link.java | 46 +- .../plantuml/cucadiagram/Magma.java | 28 +- .../plantuml/cucadiagram/MagmaList.java | 4 +- .../cucadiagram/MethodsOrFieldsArea.java | 8 +- .../plantuml/cucadiagram/PortionShower.java | 4 +- .../cucadiagram/dot/AbstractGraphviz.java | 2 +- .../dot/CucaDiagramSimplifierActivity.java | 11 +- .../dot/CucaDiagramSimplifierState.java | 30 +- .../cucadiagram/dot/CucaDiagramTxtMaker.java | 18 +- .../plantuml/cucadiagram/dot/DebugTrace.java | 2 +- .../plantuml/cucadiagram/dot/DotData.java | 30 +- .../plantuml/cucadiagram/dot/ExeState.java | 2 +- .../plantuml/cucadiagram/dot/Graphviz.java | 2 +- .../cucadiagram/dot/GraphvizLinux.java | 2 +- .../cucadiagram/dot/GraphvizUtils.java | 2 +- .../cucadiagram/dot/GraphvizVersion.java | 2 +- .../dot/GraphvizVersionFinder.java | 2 +- .../cucadiagram/dot/GraphvizVersions.java | 2 +- .../cucadiagram/dot/GraphvizWindowsLite.java | 2 +- .../cucadiagram/dot/GraphvizWindowsOld.java | 2 +- .../cucadiagram/dot/Neighborhood.java | 6 +- .../cucadiagram/dot/ProcessRunner.java | 2 +- .../cucadiagram/dot/ProcessState.java | 2 +- .../cucadiagram/entity/IEntityFactory.java | 4 +- .../plantuml/dedication/BlumBlumShub.java | 2 +- .../definition/PSystemDefinition.java | 2 +- .../descdiagram/CommandCreateDomain.java | 8 +- .../descdiagram/DescriptionDiagram.java | 65 +- .../EntityImageDesignedDomain.java | 4 +- .../descdiagram/EntityImageDomain.java | 4 +- .../descdiagram/EntityImageMachine.java | 4 +- .../descdiagram/EntityImageRequirement.java | 4 +- .../descdiagram/command/CommandArchimate.java | 6 +- .../command/CommandArchimateMultilines.java | 6 +- .../command/CommandCreateElementFull.java | 10 +- .../CommandCreateElementMultilines.java | 6 +- .../CommandCreateElementParenthesis.java | 6 +- .../command/CommandLinkElement.java | 24 +- .../command/CommandPackageWithUSymbol.java | 6 +- .../plantuml/directdot/PSystemDot.java | 2 +- .../plantuml/ditaa/PSystemDitaa.java | 2 +- .../plantuml/donors/PSystemDonors.java | 2 +- .../donors/PSystemSkinparameterList.java | 2 +- .../PSystemSkinparameterListFactory.java | 2 +- .../sourceforge/plantuml/eggs/EggUtils.java | 2 +- .../plantuml/eggs/GraphicsPath.java | 2 +- .../plantuml/eggs/PSystemAppleTwo.java | 2 +- .../plantuml/eggs/PSystemAppleTwoFactory.java | 2 +- .../sourceforge/plantuml/eggs/PSystemEgg.java | 2 +- .../plantuml/eggs/PSystemEggFactory.java | 2 +- .../plantuml/eggs/PSystemLost.java | 2 +- .../plantuml/eggs/PSystemLostFactory.java | 2 +- .../plantuml/eggs/PSystemPath.java | 2 +- .../plantuml/eggs/PSystemPathFactory.java | 2 +- .../sourceforge/plantuml/eggs/PSystemRIP.java | 2 +- .../plantuml/eggs/PSystemRIPFactory.java | 2 +- .../plantuml/eggs/SentenceDecoder.java | 2 +- .../plantuml/eggs/SentenceProducer.java | 2 +- .../plantuml/elk/CucaDiagramFileMakerElk.java | 49 +- src/net/sourceforge/plantuml/emoji/Emoji.java | 6 +- .../plantuml/emoji/PSystemListEmoji.java | 2 +- .../emoji/PSystemListEmojiFactory.java | 2 +- .../sourceforge/plantuml/eps/EpsGraphics.java | 2 +- .../plantuml/error/PSystemError.java | 38 +- .../plantuml/flashcode/FlashCodeFactory.java | 2 +- .../plantuml/font/PSystemListFonts.java | 2 +- .../plantuml/ftp/FtpConnexion.java | 2 +- .../graphml/CucaDiagramGraphmlMaker.java | 2 +- .../graphml/GraphmlDescriptionDiagram.java | 12 +- .../plantuml/help/CommandHelp.java | 2 +- .../plantuml/html/CucaDiagramHtmlMaker.java | 22 +- .../plantuml/html/LinkHtmlPrinter.java | 18 +- src/net/sourceforge/plantuml/jasic/Jasic.java | 2 +- .../plantuml/jcckit/PSystemJcckit.java | 2 +- .../plantuml/logo/LogoScanner.java | 2 +- .../sourceforge/plantuml/math/AsciiMath.java | 2 +- .../plantuml/mda/MDADiagramImpl.java | 6 +- .../plantuml/mda/MDAEntityImpl.java | 8 +- .../plantuml/mda/MDAPackageImpl.java | 12 +- .../plantuml/mjpeg/MJPEGGenerator.java | 2 +- .../AbstractClassOrObjectDiagram.java | 50 +- .../objectdiagram/command/CommandAddData.java | 6 +- .../command/CommandCreateEntityObject.java | 6 +- .../CommandCreateEntityObjectMultilines.java | 10 +- .../command/CommandCreateJson.java | 10 +- .../command/CommandCreateJsonSingleLine.java | 10 +- .../command/CommandCreateMap.java | 12 +- .../openiconic/PSystemListOpenIconic.java | 2 +- .../PSystemListOpenIconicFactory.java | 2 +- .../openiconic/PSystemOpenIconic.java | 2 +- .../openiconic/PSystemOpenIconicFactory.java | 2 +- .../plantuml/oregon/BasicGame.java | 2 +- .../plantuml/pdf/PdfConverter.java | 2 +- .../plantuml/picoweb/PicoWebServer.java | 2 +- .../sourceforge/plantuml/png/Metadata.java | 2 +- .../sourceforge/plantuml/png/MetadataTag.java | 2 +- .../plantuml/png/PngFlashcoder.java | 2 +- src/net/sourceforge/plantuml/png/PngIO.java | 6 +- .../sourceforge/plantuml/png/PngRotation.java | 2 +- .../sourceforge/plantuml/png/PngSplitter.java | 2 +- .../plantuml/posimo/GraphvizSolverB.java | 2 +- .../plantuml/preproc/ImportedFiles.java | 8 +- .../sourceforge/plantuml/preproc/Stdlib.java | 6 +- .../plantuml/quantization/Quantizer.java | 2 +- .../sdot/CucaDiagramFileMakerSmetana.java | 79 +- .../sourceforge/plantuml/security/SFile.java | 8 +- .../sourceforge/plantuml/security/SURL.java | 12 +- .../plantuml/security/SecurityProfile.java | 4 +- .../plantuml/security/SecurityUtils.java | 6 +- .../SecurityAccessInterceptor.java | 2 +- .../sequencediagram/SequenceDiagram.java | 6 +- .../sequencediagram/graphic/DrawableSet.java | 4 +- .../graphic/SequenceDiagramTxtMaker.java | 2 +- .../plantuml/sprite/CommandStdlib.java | 2 +- .../plantuml/sprite/ListSpriteDiagram.java | 2 +- .../sprite/ListSpriteDiagramFactory.java | 2 +- .../sprite/PSystemListInternalSprites.java | 2 +- .../PSystemListInternalSpritesFactory.java | 2 +- .../plantuml/sprite/SpriteGrayLevel.java | 2 +- .../plantuml/sprite/StdlibDiagram.java | 2 +- .../plantuml/sprite/StdlibDiagramFactory.java | 2 +- .../plantuml/statediagram/StateDiagram.java | 116 ++- .../statediagram/command/CommandAddField.java | 6 +- .../command/CommandCreatePackage2.java | 6 +- .../command/CommandCreatePackageState.java | 6 +- .../command/CommandCreateState.java | 6 +- .../statediagram/command/CommandEndState.java | 4 +- .../command/CommandLinkStateCommon.java | 20 +- .../plantuml/stats/CreoleConverter.java | 2 +- .../plantuml/style/StyleLoader.java | 4 +- .../plantuml/sudoku/GraphicsSudoku.java | 2 +- .../plantuml/sudoku/PSystemSudoku.java | 2 +- .../plantuml/svek/AbstractEntityImage.java | 8 +- .../plantuml/svek/Bibliotekon.java | 42 +- .../sourceforge/plantuml/svek/Cluster.java | 28 +- .../plantuml/svek/ClusterDotString.java | 2 +- .../plantuml/svek/ClusterDotStringKermor.java | 2 +- .../plantuml/svek/ClusterHeader.java | 12 +- .../svek/CucaDiagramFileMakerSvek.java | 6 +- .../plantuml/svek/DotStringFactory.java | 10 +- .../plantuml/svek/GeneralImageBuilder.java | 57 +- .../plantuml/svek/GraphvizCrash.java | 12 +- .../plantuml/svek/GroupPngMakerActivity.java | 28 +- .../plantuml/svek/GroupPngMakerState.java | 28 +- src/net/sourceforge/plantuml/svek/Kal.java | 6 +- .../sourceforge/plantuml/svek/SvekLine.java | 26 +- .../sourceforge/plantuml/svek/SvekNode.java | 22 +- .../sourceforge/plantuml/svek/SvekResult.java | 2 +- .../svek/image/AbstractEntityImageBorder.java | 8 +- .../svek/image/EntityImageActivity.java | 4 +- .../svek/image/EntityImageArcCircle.java | 4 +- .../svek/image/EntityImageAssociation.java | 4 +- .../image/EntityImageAssociationPoint.java | 4 +- .../svek/image/EntityImageBranch.java | 8 +- .../svek/image/EntityImageCircleEnd.java | 4 +- .../svek/image/EntityImageCircleStart.java | 4 +- .../plantuml/svek/image/EntityImageClass.java | 20 +- .../svek/image/EntityImageClassHeader.java | 8 +- .../svek/image/EntityImageDeepHistory.java | 4 +- .../svek/image/EntityImageDescription.java | 30 +- .../svek/image/EntityImageEmptyPackage.java | 6 +- .../plantuml/svek/image/EntityImageGroup.java | 4 +- .../plantuml/svek/image/EntityImageJson.java | 4 +- .../image/EntityImageLollipopInterface.java | 8 +- .../EntityImageLollipopInterfaceEye1.java | 4 +- .../EntityImageLollipopInterfaceEye2.java | 4 +- .../plantuml/svek/image/EntityImageMap.java | 8 +- .../plantuml/svek/image/EntityImageNote.java | 12 +- .../svek/image/EntityImageObject.java | 12 +- .../plantuml/svek/image/EntityImagePort.java | 4 +- .../svek/image/EntityImagePseudoState.java | 6 +- .../plantuml/svek/image/EntityImageState.java | 4 +- .../svek/image/EntityImageState2.java | 4 +- .../svek/image/EntityImageStateBorder.java | 4 +- .../svek/image/EntityImageStateCommon.java | 12 +- .../EntityImageStateEmptyDescription.java | 4 +- .../svek/image/EntityImageSynchroBar.java | 4 +- .../plantuml/svek/image/EntityImageTips.java | 8 +- .../svek/image/EntityImageUseCase.java | 8 +- .../plantuml/swing/AboutWindow.java | 2 +- .../plantuml/telnet/TelnetServer.java | 2 +- .../plantuml/theme/ThemeUtils.java | 6 +- .../plantuml/tikz/TikzGraphics.java | 2 +- .../plantuml/tim/stdlib/Getenv.java | 6 +- .../plantuml/ugraphic/ImageBuilder.java | 40 +- .../ugraphic/debug/StringBounderDebug.java | 2 +- .../eps/DriverCenteredCharacterEps.java | 2 +- .../plantuml/ugraphic/g2d/UGraphicG2d.java | 14 +- .../ugraphic/html5/DriverLineHtml5.java | 2 +- .../ugraphic/tikz/DriverAtomTextTikz.java | 2 +- .../plantuml/ugraphic/txt/UGraphicTxt.java | 2 +- .../ugraphic/visio/DriverDotPathVdx.java | 2 +- src/net/sourceforge/plantuml/url/Check.java | 2 +- src/net/sourceforge/plantuml/url/Url.java | 2 +- .../sourceforge/plantuml/version/License.java | 14 +- .../plantuml/version/LicenseInfo.java | 2 +- .../plantuml/version/LicenseType.java | 2 +- .../plantuml/version/PLSSignature.java | 2 +- .../plantuml/version/PSystemKeycheck.java | 2 +- .../plantuml/version/PSystemKeygen.java | 2 +- .../plantuml/version/PSystemLicense.java | 6 +- .../plantuml/version/PSystemVersion.java | 12 +- .../version/PSystemVersionFactory.java | 2 +- .../sourceforge/plantuml/version/Version.java | 4 +- .../plantuml/vizjs/GraphvizJs.java | 2 +- .../plantuml/webp/BoolDecoder.java | 2 +- .../windowsdot/WindowsDotArchive.java | 2 +- src/net/sourceforge/plantuml/wire/Block.java | 2 +- .../plantuml/xmi/CucaDiagramXmiMaker.java | 2 +- .../plantuml/xmi/XmiClassDiagramAbstract.java | 16 +- .../plantuml/xmi/XmiClassDiagramArgo.java | 6 +- .../plantuml/xmi/XmiClassDiagramStandard.java | 4 +- .../plantuml/xmi/XmiClassDiagramStar.java | 4 +- .../plantuml/xmi/XmiDescriptionDiagram.java | 18 +- .../plantuml/xmi/XmiStateDiagram.java | 63 +- .../xmlsc/ScxmlStateDiagramStandard.java | 30 +- .../plantuml/zopfli/BlockSplitter.java | 2 +- .../ascii2image/core/ConfigurationParser.java | 2 +- .../ascii2image/graphics/BitmapRenderer.java | 2 +- .../ascii2image/text/AbstractCell.java | 2 +- 351 files changed, 1357 insertions(+), 2665 deletions(-) delete mode 100644 src/net/sourceforge/plantuml/baraye/EntityImp.java delete mode 100644 src/net/sourceforge/plantuml/baraye/Plasma.java delete mode 100644 src/net/sourceforge/plantuml/baraye/Quark.java diff --git a/src/com/plantuml/wasm/Canvas.java b/src/com/plantuml/wasm/Canvas.java index 779088b26..c8a1ff70a 100644 --- a/src/com/plantuml/wasm/Canvas.java +++ b/src/com/plantuml/wasm/Canvas.java @@ -66,7 +66,7 @@ public class Canvas { private static int frameWidth; private static int frameHeight; - public static int initCanvas(int width, int height) throws IOException { + public static int initCanvas(int width, int height) { WasmLog.start = System.currentTimeMillis(); WasmLog.log("initCanvas"); if (g2d == null) { @@ -85,6 +85,37 @@ public class Canvas { return 47; } + public static int convert(String text) throws IOException { + WasmLog.start = System.currentTimeMillis(); + final BlockUmlBuilder builder = new BlockUmlBuilder(Collections.emptyList(), UTF_8, + Defines.createEmpty(), new StringReader(text), null, "string"); + List blocks = builder.getBlockUmls(); + + WasmLog.log("...loading data..."); + + final Diagram system = blocks.get(0).getDiagram(); + + if (system instanceof PSystemError) { + final ErrorUml error = ((PSystemError) system).getFirstError(); + WasmLog.log("[" + error.getPosition() + "] " + error.getError()); + return -242; + } + WasmLog.log("...processing..."); + + final HColor back = HColors.simple(Color.WHITE); + final StringBounder stringBounder = new StringBounderCanvas(g2d); + final UGraphicG2d ug = new UGraphicG2d(back, ColorMapper.IDENTITY, stringBounder, g2d, 1.0); + // ug.apply(back).apply(back.bg()).draw(new URectangle(frameWidth, + // frameHeight)); + ug.apply(HColors.RED).apply(back.bg()).draw(new URectangle(frameWidth, frameHeight)); + WasmLog.log("system= " + system.getClass().getName()); + + system.exportDiagramGraphic(ug); + + return 45; + + } + public static int convertCanvas(int width, int height, String text) throws IOException { WasmLog.start = System.currentTimeMillis(); diff --git a/src/com/plantuml/wasm/WasmLog.java b/src/com/plantuml/wasm/WasmLog.java index 27440de66..76c5a6150 100644 --- a/src/com/plantuml/wasm/WasmLog.java +++ b/src/com/plantuml/wasm/WasmLog.java @@ -35,7 +35,7 @@ */ package com.plantuml.wasm; -//::uncomment when WASM +//::uncomment when CORE //import com.leaningtech.client.Document; //import com.leaningtech.client.Element; //import com.leaningtech.client.Global; @@ -46,7 +46,7 @@ public class WasmLog { public static long start; public static void log(String message) { - // ::uncomment when WASM + // ::uncomment when CORE // if (start > 0) { // final long duration = System.currentTimeMillis() - start; // message = "(" + duration + " ms) " + message; diff --git a/src/ext/plantuml/com/ctreber/acearth/ACearth.java b/src/ext/plantuml/com/ctreber/acearth/ACearth.java index cc0b2c738..f69cb1eaf 100644 --- a/src/ext/plantuml/com/ctreber/acearth/ACearth.java +++ b/src/ext/plantuml/com/ctreber/acearth/ACearth.java @@ -97,7 +97,7 @@ import ext.plantuml.com.ctreber.aclib.sort.QuickSort; * @author Christian Treber, ct@ctreber.com */ public class ACearth { - // :: remove folder when WASM + // :: remove folder when CORE public static final String VERSION = "1.1"; public static final String BUILD = "22.11.2002 004"; diff --git a/src/ext/plantuml/com/ctreber/aclib/gui/MOBoolean.java b/src/ext/plantuml/com/ctreber/aclib/gui/MOBoolean.java index d06e22066..0cff7ce5c 100644 --- a/src/ext/plantuml/com/ctreber/aclib/gui/MOBoolean.java +++ b/src/ext/plantuml/com/ctreber/aclib/gui/MOBoolean.java @@ -9,7 +9,7 @@ package ext.plantuml.com.ctreber.aclib.gui; */ public class MOBoolean extends MonitoredObject { - // :: remove folder when WASM + // :: remove folder when CORE private boolean fBoolean; public MOBoolean() diff --git a/src/ext/plantuml/com/ctreber/aclib/sort/CTSort.java b/src/ext/plantuml/com/ctreber/aclib/sort/CTSort.java index c87497bc1..4f3a83184 100644 --- a/src/ext/plantuml/com/ctreber/aclib/sort/CTSort.java +++ b/src/ext/plantuml/com/ctreber/aclib/sort/CTSort.java @@ -11,7 +11,7 @@ import java.util.Comparator; */ abstract public class CTSort { - // :: remove folder when WASM + // :: remove folder when CORE public void sort(Object[] items) { sort(items, new DefaultComparator()); diff --git a/src/ext/plantuml/com/google/zxing/BarcodeFormat.java b/src/ext/plantuml/com/google/zxing/BarcodeFormat.java index 35a649542..c9eabb753 100644 --- a/src/ext/plantuml/com/google/zxing/BarcodeFormat.java +++ b/src/ext/plantuml/com/google/zxing/BarcodeFormat.java @@ -24,7 +24,7 @@ import java.util.Hashtable; * @author Sean Owen */ public final class BarcodeFormat { - // :: remove folder when WASM + // :: remove folder when CORE // No, we can't use an enum here. J2ME doesn't support it. diff --git a/src/jcckit/GraphicsPlotCanvas.java b/src/jcckit/GraphicsPlotCanvas.java index 687bce1e8..23241e082 100644 --- a/src/jcckit/GraphicsPlotCanvas.java +++ b/src/jcckit/GraphicsPlotCanvas.java @@ -48,7 +48,7 @@ import jcckit.util.Factory; * @author Franz-Josef Elmer */ public class GraphicsPlotCanvas extends PlotCanvas { - // ::remove folder when WASM + // ::remove folder when CORE /** Key of a configuration parameter. */ public static final String BACKGROUND_KEY = "background"; public static final String FOREGROUND_KEY = "foreground"; diff --git a/src/net/sourceforge/plantuml/AbstractPSystem.java b/src/net/sourceforge/plantuml/AbstractPSystem.java index 80fc9c100..4f8a2e91a 100644 --- a/src/net/sourceforge/plantuml/AbstractPSystem.java +++ b/src/net/sourceforge/plantuml/AbstractPSystem.java @@ -85,7 +85,7 @@ public abstract class AbstractPSystem implements Diagram { toAppend.append(Version.versionString()); toAppend.append("(" + Version.compileTimeString() + ")\n"); toAppend.append("(" + License.getCurrent() + " source distribution)\n"); - // ::comment when WASM + // ::comment when CORE for (String name : OptionPrint.interestingProperties()) { toAppend.append(name); toAppend.append(BackSlash.CHAR_NEWLINE); @@ -187,7 +187,7 @@ public abstract class AbstractPSystem implements Diagram { // } return exportDiagramNow(os, index, fileFormatOption); } finally { - // ::comment when WASM + // ::comment when CORE if (OptionFlags.getInstance().isEnableStats()) StatsUtilsIncrement.onceMoreGenerate(System.currentTimeMillis() - now, getClass(), fileFormatOption.getFileFormat()); diff --git a/src/net/sourceforge/plantuml/DirWatcher.java b/src/net/sourceforge/plantuml/DirWatcher.java index 6877e1783..af7639a4f 100644 --- a/src/net/sourceforge/plantuml/DirWatcher.java +++ b/src/net/sourceforge/plantuml/DirWatcher.java @@ -49,7 +49,7 @@ import net.sourceforge.plantuml.preproc.FileWithSuffix; @Deprecated public class DirWatcher { - // ::remove file when WASM + // ::remove file when CORE final private File dir; final private Option option; diff --git a/src/net/sourceforge/plantuml/DirWatcher2.java b/src/net/sourceforge/plantuml/DirWatcher2.java index d849574ac..4e4fcac32 100644 --- a/src/net/sourceforge/plantuml/DirWatcher2.java +++ b/src/net/sourceforge/plantuml/DirWatcher2.java @@ -53,7 +53,7 @@ import net.sourceforge.plantuml.log.Logme; import net.sourceforge.plantuml.preproc.FileWithSuffix; public class DirWatcher2 { - // ::remove file when WASM + // ::remove file when CORE final private File dir; final private Option option; diff --git a/src/net/sourceforge/plantuml/EmptyImageBuilder.java b/src/net/sourceforge/plantuml/EmptyImageBuilder.java index b007ecb75..449cd5dae 100644 --- a/src/net/sourceforge/plantuml/EmptyImageBuilder.java +++ b/src/net/sourceforge/plantuml/EmptyImageBuilder.java @@ -74,7 +74,7 @@ public class EmptyImageBuilder { if (width <= 0 || height <= 0) throw new IllegalArgumentException("width and height must be positive"); - // ::comment when WASM + // ::comment when CORE if (width > GraphvizUtils.getenvImageLimit()) { Log.info("Width too large " + width + ". You should set PLANTUML_LIMIT_SIZE"); width = GraphvizUtils.getenvImageLimit(); diff --git a/src/net/sourceforge/plantuml/FileFormat.java b/src/net/sourceforge/plantuml/FileFormat.java index fa497259b..26eac4ac1 100644 --- a/src/net/sourceforge/plantuml/FileFormat.java +++ b/src/net/sourceforge/plantuml/FileFormat.java @@ -64,7 +64,7 @@ import net.sourceforge.plantuml.ugraphic.debug.StringBounderDebug; */ public enum FileFormat { - // ::comment when WASM + // ::comment when CORE EPS("application/postscript"), // EPS_TEXT("application/postscript"), // ATXT("text/plain"), // @@ -106,7 +106,7 @@ public enum FileFormat { * @return a string starting by a point. */ public String getFileSuffix() { - // ::comment when WASM + // ::comment when CORE if (name().startsWith("XMI")) return ".xmi"; @@ -141,7 +141,7 @@ public enum FileFormat { } public StringBounder getDefaultStringBounder(TikzFontDistortion tikzFontDistortion, SvgCharSizeHack charSizeHack) { - // ::comment when WASM + // ::comment when CORE if (this == LATEX || this == LATEX_NO_PREAMBLE) return getTikzStringBounder(tikzFontDistortion); @@ -200,7 +200,7 @@ public enum FileFormat { return new XDimension2D(rect.getWidth(), rect.getHeight()); } - // ::comment when WASM + // ::comment when CORE private StringBounder getBrailleStringBounder() { return new StringBounderRaw(FileFormat.gg.getFontRenderContext()) { public String toString() { diff --git a/src/net/sourceforge/plantuml/FileSystem.java b/src/net/sourceforge/plantuml/FileSystem.java index 725c4fbd7..33d4eafe0 100644 --- a/src/net/sourceforge/plantuml/FileSystem.java +++ b/src/net/sourceforge/plantuml/FileSystem.java @@ -65,7 +65,7 @@ public class FileSystem { } public SFile getCurrentDir() { - // ::comment when WASM + // ::comment when CORE final String path = this.currentDir.get(); if (path != null) return new SFile(path); @@ -75,11 +75,11 @@ public class FileSystem { } public SFile getFile(String nameOrPath) throws IOException { - // ::uncomment when WASM + // ::uncomment when CORE // return null; // ::done - // ::comment when WASM + // ::comment when CORE if (isAbsolute(nameOrPath)) { final SFile result = new SFile(nameOrPath); Log.info("Trying " + result.getAbsolutePath()); @@ -117,7 +117,7 @@ public class FileSystem { // ::done } - // ::comment when WASM + // ::comment when CORE private boolean isAbsolute(String nameOrPath) { final SFile f = new SFile(nameOrPath); return f.isAbsolute(); diff --git a/src/net/sourceforge/plantuml/ISourceFileReader.java b/src/net/sourceforge/plantuml/ISourceFileReader.java index 2aa1fdbb7..0f04ce3ef 100644 --- a/src/net/sourceforge/plantuml/ISourceFileReader.java +++ b/src/net/sourceforge/plantuml/ISourceFileReader.java @@ -39,7 +39,7 @@ import java.io.IOException; import java.util.List; public interface ISourceFileReader { - // ::remove file when WASM + // ::remove file when CORE public List getGeneratedImages() throws IOException; diff --git a/src/net/sourceforge/plantuml/Option.java b/src/net/sourceforge/plantuml/Option.java index 28abb71a9..7d75601c9 100644 --- a/src/net/sourceforge/plantuml/Option.java +++ b/src/net/sourceforge/plantuml/Option.java @@ -115,7 +115,7 @@ public class Option { this.fileFormatOption = newFormat; } - // ::comment when WASM + // ::comment when CORE public Option(String... arg) throws InterruptedException, IOException { if (arg.length == 0) OptionFlags.getInstance().setGui(true); @@ -407,7 +407,7 @@ public class Option { // ::done public Stdrpt getStdrpt() { - // ::comment when WASM + // ::comment when CORE if (stdrpt == 1) return new StdrptV1(); diff --git a/src/net/sourceforge/plantuml/OptionFlags.java b/src/net/sourceforge/plantuml/OptionFlags.java index 4437ba00e..5682df01f 100644 --- a/src/net/sourceforge/plantuml/OptionFlags.java +++ b/src/net/sourceforge/plantuml/OptionFlags.java @@ -77,7 +77,7 @@ public class OptionFlags { // static public final boolean LINK_BETWEEN_FIELDS = true; - // ::comment when WASM + // ::comment when CORE public void reset() { reset(false); GraphvizUtils.setDotExecutable(null); @@ -197,7 +197,7 @@ public class OptionFlags { private final AtomicBoolean logDataInitized = new AtomicBoolean(false); public void logData(final SFile file, Diagram system) { - // ::comment when WASM + // ::comment when CORE final String warnOrError = system.getWarningOrError(); if (warnOrError == null) { return; @@ -228,7 +228,7 @@ public class OptionFlags { // ::done } - // ::comment when WASM + // ::comment when CORE public final void setLogData(SFile logData) { this.logData = logData; logData.delete(); diff --git a/src/net/sourceforge/plantuml/OptionPrint.java b/src/net/sourceforge/plantuml/OptionPrint.java index 740c2efe2..c5ab5c2a0 100644 --- a/src/net/sourceforge/plantuml/OptionPrint.java +++ b/src/net/sourceforge/plantuml/OptionPrint.java @@ -56,7 +56,7 @@ import net.sourceforge.plantuml.version.PSystemVersion; import net.sourceforge.plantuml.version.Version; public class OptionPrint { - //::remove file when WASM + //::remove file when CORE static public void printTestDot() throws InterruptedException { final List result = new ArrayList<>(); diff --git a/src/net/sourceforge/plantuml/PSystemBuilder.java b/src/net/sourceforge/plantuml/PSystemBuilder.java index e9676303b..9717ff4d0 100644 --- a/src/net/sourceforge/plantuml/PSystemBuilder.java +++ b/src/net/sourceforge/plantuml/PSystemBuilder.java @@ -153,7 +153,7 @@ public class PSystemBuilder { result = PSystemErrorUtils.merge(errors); return result; } finally { - // ::comment when WASM + // ::comment when CORE if (result != null && OptionFlags.getInstance().isEnableStats()) { StatsUtilsIncrement.onceMoreParse(System.currentTimeMillis() - now, result.getClass()); } @@ -175,7 +175,7 @@ public class PSystemBuilder { factories.add(new StateDiagramFactory()); factories.add(new ActivityDiagramFactory3()); - // ::comment when WASM + // ::comment when CORE factories.add(new BpmDiagramFactory(DiagramType.BPM)); // ::done @@ -183,7 +183,7 @@ public class PSystemBuilder { factories.add(new PSystemLicenseFactory()); factories.add(new PSystemVersionFactory()); factories.add(new PSystemDonorsFactory()); - // ::comment when WASM + // ::comment when CORE factories.add(new PSystemSkinparameterListFactory()); factories.add(new PSystemListFontsFactory()); factories.add(new PSystemListEmojiFactory()); @@ -193,7 +193,7 @@ public class PSystemBuilder { // ::done factories.add(new PSystemSaltFactory(DiagramType.UML)); factories.add(new PSystemSaltFactory(DiagramType.SALT)); - // ::comment when WASM + // ::comment when CORE factories.add(new PSystemDotFactory(DiagramType.DOT)); factories.add(new PSystemDotFactory(DiagramType.UML)); // ::done @@ -201,17 +201,17 @@ public class PSystemBuilder { factories.add(new NwDiagramFactory(DiagramType.NW)); factories.add(new MindMapDiagramFactory()); factories.add(new WBSDiagramFactory()); - // ::comment when WASM + // ::comment when CORE factories.add(new PSystemDitaaFactory()); // ::done if (License.getCurrent() == License.GPL || License.getCurrent() == License.GPLV2) { - // ::comment when WASM + // ::comment when CORE factories.add(new PSystemJcckitFactory()); // ::done // factories.add(new PSystemLogoFactory()); factories.add(new PSystemSudokuFactory()); } - // ::comment when WASM + // ::comment when CORE factories.add(new PSystemDefinitionFactory()); factories.add(new ListSpriteDiagramFactory()); factories.add(new StdlibDiagramFactory()); @@ -228,7 +228,7 @@ public class PSystemBuilder { factories.add(new PSystemOregonFactory()); // ::done factories.add(new PSystemCharlieFactory()); - // ::comment when WASM + // ::comment when CORE if (License.getCurrent() == License.GPL || License.getCurrent() == License.GPLV2) { factories.add(new PSystemXearthFactory()); } @@ -237,17 +237,17 @@ public class PSystemBuilder { factories.add(new FlowDiagramFactory()); // factories.add(new PSystemTreeFactory(DiagramType.JUNGLE)); // factories.add(new PSystemCuteFactory(DiagramType.CUTE)); - // ::comment when WASM + // ::comment when CORE factories.add(new PSystemDedicationFactory()); // ::done factories.add(new TimingDiagramFactory()); - // ::comment when WASM + // ::comment when CORE factories.add(new HelpFactory()); factories.add(new WireDiagramFactory()); // ::done factories.add(new JsonDiagramFactory()); factories.add(new GitDiagramFactory()); - // ::comment when WASM + // ::comment when CORE factories.add(new BoardDiagramFactory()); // ::done factories.add(new YamlDiagramFactory()); diff --git a/src/net/sourceforge/plantuml/PSystemUtils.java b/src/net/sourceforge/plantuml/PSystemUtils.java index 0e20fb43e..d51835ccf 100644 --- a/src/net/sourceforge/plantuml/PSystemUtils.java +++ b/src/net/sourceforge/plantuml/PSystemUtils.java @@ -56,7 +56,7 @@ import net.sourceforge.plantuml.sequencediagram.SequenceDiagram; import net.sourceforge.plantuml.utils.Log; public class PSystemUtils { - // :: remove file when WASM + // :: remove file when CORE public static List exportDiagrams(Diagram system, SuggestedFile suggested, FileFormatOption fileFormatOption) throws IOException { @@ -66,7 +66,7 @@ public class PSystemUtils { public static List exportDiagrams(Diagram system, SuggestedFile suggestedFile, FileFormatOption fileFormatOption, boolean checkMetadata) throws IOException { - // ::comment when WASM + // ::comment when CORE final SFile existingFile = suggestedFile.getFile(0); if (checkMetadata && fileFormatOption.getFileFormat().doesSupportMetadata() && existingFile.exists()) { // && system.getNbImages() == 1) { @@ -85,7 +85,7 @@ public class PSystemUtils { if (system instanceof SequenceDiagram) return exportDiagramsSequence((SequenceDiagram) system, suggestedFile, fileFormatOption); - // ::comment when WASM + // ::comment when CORE if (system instanceof CucaDiagram && fileFormatOption.getFileFormat() == FileFormat.HTML) return createFilesHtml((CucaDiagram) system, suggestedFile); // ::done diff --git a/src/net/sourceforge/plantuml/Run.java b/src/net/sourceforge/plantuml/Run.java index 2f5d1c64c..8f771092b 100644 --- a/src/net/sourceforge/plantuml/Run.java +++ b/src/net/sourceforge/plantuml/Run.java @@ -75,7 +75,7 @@ import net.sourceforge.plantuml.utils.Log; import net.sourceforge.plantuml.version.Version; public class Run { - // ::remove file when WASM + // ::remove file when CORE private static Cypher cypher; diff --git a/src/net/sourceforge/plantuml/SourceFileReader.java b/src/net/sourceforge/plantuml/SourceFileReader.java index 6b404567c..7158765ee 100644 --- a/src/net/sourceforge/plantuml/SourceFileReader.java +++ b/src/net/sourceforge/plantuml/SourceFileReader.java @@ -48,7 +48,7 @@ import net.sourceforge.plantuml.utils.Log; public class SourceFileReader extends SourceFileReaderAbstract implements ISourceFileReader { - // ::remove file when WASM + // ::remove file when CORE private File outputDirectory; diff --git a/src/net/sourceforge/plantuml/SourceFileReaderAbstract.java b/src/net/sourceforge/plantuml/SourceFileReaderAbstract.java index 3bf229cf5..a4c4ac3b4 100644 --- a/src/net/sourceforge/plantuml/SourceFileReaderAbstract.java +++ b/src/net/sourceforge/plantuml/SourceFileReaderAbstract.java @@ -65,7 +65,7 @@ import net.sourceforge.plantuml.security.SecurityUtils; import net.sourceforge.plantuml.utils.Log; public abstract class SourceFileReaderAbstract implements ISourceFileReader { - // ::remove file when WASM + // ::remove file when CORE final private File file; diff --git a/src/net/sourceforge/plantuml/SourceFileReaderCopyCat.java b/src/net/sourceforge/plantuml/SourceFileReaderCopyCat.java index 5cd923cef..b3110273e 100644 --- a/src/net/sourceforge/plantuml/SourceFileReaderCopyCat.java +++ b/src/net/sourceforge/plantuml/SourceFileReaderCopyCat.java @@ -42,7 +42,7 @@ import java.util.List; import net.sourceforge.plantuml.preproc.Defines; public class SourceFileReaderCopyCat extends SourceFileReaderAbstract implements ISourceFileReader { - // ::remove file when WASM + // ::remove file when CORE private final File outputDirectory; diff --git a/src/net/sourceforge/plantuml/SourceFileReaderHardFile.java b/src/net/sourceforge/plantuml/SourceFileReaderHardFile.java index 095f09c22..38f790e90 100644 --- a/src/net/sourceforge/plantuml/SourceFileReaderHardFile.java +++ b/src/net/sourceforge/plantuml/SourceFileReaderHardFile.java @@ -43,7 +43,7 @@ import net.sourceforge.plantuml.preproc.Defines; import net.sourceforge.plantuml.security.SFile; public class SourceFileReaderHardFile extends SourceFileReaderAbstract implements ISourceFileReader { - // ::remove file when WASM + // ::remove file when CORE private final File outputFile; diff --git a/src/net/sourceforge/plantuml/StdrptV1.java b/src/net/sourceforge/plantuml/StdrptV1.java index 83b257aa1..3d6965b0a 100644 --- a/src/net/sourceforge/plantuml/StdrptV1.java +++ b/src/net/sourceforge/plantuml/StdrptV1.java @@ -45,7 +45,7 @@ import net.sourceforge.plantuml.error.PSystemError; import net.sourceforge.plantuml.utils.Log; public class StdrptV1 implements Stdrpt { - // ::remove file when WASM + // ::remove file when CORE public void printInfo(final PrintStream output, Diagram sys) { if (sys instanceof PSystemWelcome) { diff --git a/src/net/sourceforge/plantuml/StdrptV2.java b/src/net/sourceforge/plantuml/StdrptV2.java index cd62d7607..ba54976a8 100644 --- a/src/net/sourceforge/plantuml/StdrptV2.java +++ b/src/net/sourceforge/plantuml/StdrptV2.java @@ -44,7 +44,7 @@ import net.sourceforge.plantuml.eggs.PSystemWelcome; import net.sourceforge.plantuml.error.PSystemError; public class StdrptV2 implements Stdrpt { - // ::remove file when WASM + // ::remove file when CORE public void finalMessage() { } diff --git a/src/net/sourceforge/plantuml/StringUtils.java b/src/net/sourceforge/plantuml/StringUtils.java index 365d96a1b..8c46ca99b 100644 --- a/src/net/sourceforge/plantuml/StringUtils.java +++ b/src/net/sourceforge/plantuml/StringUtils.java @@ -353,7 +353,7 @@ public class StringUtils { return result; } - // ::comment when WASM + // ::comment when CORE public static int getWcWidth(Display stringsToDisplay) { int result = 1; for (CharSequence s : stringsToDisplay) { diff --git a/src/net/sourceforge/plantuml/SuggestedFile.java b/src/net/sourceforge/plantuml/SuggestedFile.java index 82d6bae28..e8c9481d3 100644 --- a/src/net/sourceforge/plantuml/SuggestedFile.java +++ b/src/net/sourceforge/plantuml/SuggestedFile.java @@ -38,7 +38,7 @@ package net.sourceforge.plantuml; import net.sourceforge.plantuml.security.SFile; public class SuggestedFile { - // ::remove file when WASM + // ::remove file when CORE private final FileFormat fileFormat; private final int initialCpt; diff --git a/src/net/sourceforge/plantuml/TitledDiagram.java b/src/net/sourceforge/plantuml/TitledDiagram.java index 39a037be2..bd9607229 100644 --- a/src/net/sourceforge/plantuml/TitledDiagram.java +++ b/src/net/sourceforge/plantuml/TitledDiagram.java @@ -81,7 +81,7 @@ public abstract class TitledDiagram extends AbstractPSystem implements Diagram, private final SkinParam skinParam; - // ::comment when WASM + // ::comment when CORE private Animation animation; // ::done @@ -254,7 +254,7 @@ public abstract class TitledDiagram extends AbstractPSystem implements Diagram, return ClockwiseTopRightBottomLeft.same(10); } - // ::comment when WASM + // ::comment when CORE final public void setAnimation(Iterable animationData) { // try { final AnimationDecoder animationDecoder = new AnimationDecoder(animationData); diff --git a/src/net/sourceforge/plantuml/UmlDiagram.java b/src/net/sourceforge/plantuml/UmlDiagram.java index 9c2ab02bb..d72796c0b 100644 --- a/src/net/sourceforge/plantuml/UmlDiagram.java +++ b/src/net/sourceforge/plantuml/UmlDiagram.java @@ -130,7 +130,7 @@ public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annot fileFormatOption = fileFormatOption.withTikzFontDistortion(getSkinParam().getTikzFontDistortion()); - // ::comment when WASM + // ::comment when CORE if (fileFormatOption.getFileFormat() == FileFormat.PDF) return exportDiagramInternalPdf(os, index); // ::done @@ -161,7 +161,7 @@ public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annot public static void exportDiagramError(OutputStream os, Throwable exception, FileFormatOption fileFormat, long seed, String metadata, String flash, List strings) throws IOException { - // ::comment when WASM + // ::comment when CORE if (fileFormat.getFileFormat() == FileFormat.ATXT || fileFormat.getFileFormat() == FileFormat.UTXT) { exportDiagramErrorText(os, exception, strings); return; @@ -171,7 +171,7 @@ public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annot strings.addAll(CommandExecutionResult.getStackTrace(exception)); BufferedImage im2 = null; - // ::comment when WASM + // ::comment when CORE if (flash != null) { final FlashCodeUtils utils = FlashCodeFactory.getFlashCodeUtils(); try { @@ -201,7 +201,7 @@ public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annot plainImageBuilder(drawable, fileFormat).metadata(metadata).seed(seed).write(os); } - // ::comment when WASM + // ::comment when CORE private static void exportDiagramErrorText(OutputStream os, Throwable exception, List strings) { final PrintWriter pw = SecurityUtils.createPrintWriter(os); exception.printStackTrace(pw); @@ -254,7 +254,7 @@ public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annot return strings; } - // ::comment when WASM + // ::comment when CORE private void exportDiagramInternalMjpeg(OutputStream os) throws IOException { final SFile f = new SFile("c:/test.avi"); final int nb = 150; diff --git a/src/net/sourceforge/plantuml/acearth/PSystemXearth.java b/src/net/sourceforge/plantuml/acearth/PSystemXearth.java index 4b47169f8..1afb0ab33 100644 --- a/src/net/sourceforge/plantuml/acearth/PSystemXearth.java +++ b/src/net/sourceforge/plantuml/acearth/PSystemXearth.java @@ -58,7 +58,7 @@ import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.core.UmlSource; public class PSystemXearth extends AbstractPSystem { - // :: remove folder when WASM + // :: remove folder when CORE final private int width; final private int height; diff --git a/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagram.java b/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagram.java index 77fdd3017..dbc86a4f2 100644 --- a/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagram.java +++ b/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagram.java @@ -42,19 +42,19 @@ import java.util.Objects; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.baraye.CucaDiagram; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.GroupType; import net.sourceforge.plantuml.cucadiagram.LeafType; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.utils.Direction; public class ActivityDiagram extends CucaDiagram { - private EntityImp lastEntityConsulted; - private EntityImp lastEntityBrancheConsulted; + private Entity lastEntityConsulted; + private Entity lastEntityBrancheConsulted; private ConditionalContext currentContext; public ActivityDiagram(UmlSource source, Map skinParam) { @@ -66,29 +66,10 @@ public class ActivityDiagram extends CucaDiagram { return "#" + this.getUniqueSequence(); } -// public final IEntity getOrCreateInActivity(Quark idNewLong, String codeString, Display display, LeafType type) { -// final Quark code = buildFromFullPath(codeString); -// final IEntity result; -// if (code.getData() == null) { -// final Quark quark = getPlasma().getIfExistsFromName(code.getName()); -// if (quark != null && quark.getData() != null) -// result = getFromName(code.getName()); -// else -// result = reallyCreateLeaf(idNewLong, display, type, null); -// } else { -// result = (ILeaf) code.getData(); -// if (result.getLeafType() != type) -// return null; -// } -// updateLasts(result); -// return result; -// } - public void startIf(String optionalCodeString) { final String idShort = optionalCodeString == null ? getAutoBranch() : optionalCodeString; final Quark quark = quarkInContext(cleanIdForQuark(idShort), false); - // final Quark code = buildCode(idShort); - final EntityImp br = reallyCreateLeaf(quark, Display.create(""), LeafType.BRANCH, null); + final Entity br = reallyCreateLeaf(quark, Display.create(""), LeafType.BRANCH, null); currentContext = new ConditionalContext(currentContext, br, Direction.DOWN); } @@ -96,25 +77,25 @@ public class ActivityDiagram extends CucaDiagram { currentContext = currentContext.getParent(); } - public EntityImp getStart() { + public Entity getStart() { final Quark quark = quarkInContext("start", false); - if (quark.getData() == null) { + if (quark.getData() == null) quark.setData(reallyCreateLeaf(quark, Display.getWithNewlines("start"), LeafType.CIRCLE_START, null)); - } - return (EntityImp) quark.getData(); + + return (Entity) quark.getData(); } - public EntityImp getEnd(String suppId) { + public Entity getEnd(String suppId) { final String tmp = suppId == null ? "end" : "end$" + suppId; final Quark quark = quarkInContext(tmp, false); - if (quark.getData() == null) { + if (quark.getData() == null) quark.setData(reallyCreateLeaf(quark, Display.getWithNewlines("end"), LeafType.CIRCLE_END, null)); - } - return (EntityImp) quark.getData(); + + return (Entity) quark.getData(); } @Override - protected void updateLasts(EntityImp result) { + protected void updateLasts(Entity result) { if (result == null || result.getLeafType() == LeafType.NOTE) return; @@ -125,7 +106,7 @@ public class ActivityDiagram extends CucaDiagram { } - public EntityImp createNote(Quark idNewLong, String code__, Display display) { + public Entity createNote(Quark idNewLong, String code__, Display display) { return reallyCreateLeaf(Objects.requireNonNull(idNewLong), display, LeafType.NOTE, null); } @@ -135,15 +116,15 @@ public class ActivityDiagram extends CucaDiagram { } public DiagramDescription getDescription() { - return new DiagramDescription("(" + getLeafssize() + " activities)"); + return new DiagramDescription("(" + getEntityFactory().leafs().size() + " activities)"); } - public EntityImp getLastEntityConsulted() { + public Entity getLastEntityConsulted() { return lastEntityConsulted; } @Deprecated - public EntityImp getLastEntityBrancheConsulted() { + public Entity getLastEntityBrancheConsulted() { return lastEntityBrancheConsulted; } @@ -151,18 +132,18 @@ public class ActivityDiagram extends CucaDiagram { return currentContext; } - public final void setLastEntityConsulted(EntityImp lastEntityConsulted) { + public final void setLastEntityConsulted(Entity lastEntityConsulted) { // System.err.println("setLastEntityConsulted " + lastEntityConsulted); this.lastEntityConsulted = lastEntityConsulted; } - public EntityImp createInnerActivity() { + public Entity createInnerActivity() { final String idShort = "##" + this.getUniqueSequence(); final Quark quark = quarkInContext(idShort, false); gotoGroup(quark, Display.getWithNewlines(quark.getName()), GroupType.INNER_ACTIVITY); - final EntityImp g = getCurrentGroup(); + final Entity g = getCurrentGroup(); lastEntityConsulted = null; lastEntityBrancheConsulted = null; diff --git a/src/net/sourceforge/plantuml/activitydiagram/ConditionalContext.java b/src/net/sourceforge/plantuml/activitydiagram/ConditionalContext.java index 06f7c394b..16fcada55 100644 --- a/src/net/sourceforge/plantuml/activitydiagram/ConditionalContext.java +++ b/src/net/sourceforge/plantuml/activitydiagram/ConditionalContext.java @@ -37,17 +37,17 @@ package net.sourceforge.plantuml.activitydiagram; import java.util.Objects; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.utils.Direction; public class ConditionalContext { - private final EntityImp branch; + private final Entity branch; private final Direction direction; private final ConditionalContext parent; - public ConditionalContext(ConditionalContext parent, EntityImp branch, Direction direction) { + public ConditionalContext(ConditionalContext parent, Entity branch, Direction direction) { this.branch = Objects.requireNonNull(branch); if (branch.getLeafType() != LeafType.BRANCH) { throw new IllegalArgumentException(); @@ -64,7 +64,7 @@ public class ConditionalContext { return parent; } - public final EntityImp getBranch() { + public final Entity getBranch() { return branch; } diff --git a/src/net/sourceforge/plantuml/activitydiagram/command/CommandElse.java b/src/net/sourceforge/plantuml/activitydiagram/command/CommandElse.java index 8c9133cf0..1025f5212 100644 --- a/src/net/sourceforge/plantuml/activitydiagram/command/CommandElse.java +++ b/src/net/sourceforge/plantuml/activitydiagram/command/CommandElse.java @@ -36,7 +36,7 @@ package net.sourceforge.plantuml.activitydiagram.command; import net.sourceforge.plantuml.activitydiagram.ActivityDiagram; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.regex.IRegex; @@ -66,7 +66,7 @@ public class CommandElse extends SingleLineCommand2 { if (system.getCurrentContext() == null) { return CommandExecutionResult.error("No if for this else"); } - final EntityImp branch = system.getCurrentContext().getBranch(); + final Entity branch = system.getCurrentContext().getBranch(); system.setLastEntityConsulted(branch); diff --git a/src/net/sourceforge/plantuml/activitydiagram/command/CommandIf.java b/src/net/sourceforge/plantuml/activitydiagram/command/CommandIf.java index 9fabc3a23..69ce55829 100644 --- a/src/net/sourceforge/plantuml/activitydiagram/command/CommandIf.java +++ b/src/net/sourceforge/plantuml/activitydiagram/command/CommandIf.java @@ -37,7 +37,7 @@ package net.sourceforge.plantuml.activitydiagram.command; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.activitydiagram.ActivityDiagram; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.command.CommandLinkClass; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; @@ -94,7 +94,7 @@ public class CommandIf extends SingleLineCommand2 { @Override protected CommandExecutionResult executeArg(ActivityDiagram diagram, LineLocation location, RegexResult arg) { - final EntityImp entity1 = CommandLinkActivity.getEntity(diagram, arg, true); + final Entity entity1 = CommandLinkActivity.getEntity(diagram, arg, true); if (entity1 == null) return CommandExecutionResult.error("No if possible at this point"); @@ -122,7 +122,7 @@ public class CommandIf extends SingleLineCommand2 { lenght = arrow.length() - 1; } - final EntityImp branch = diagram.getCurrentContext().getBranch(); + final Entity branch = diagram.getCurrentContext().getBranch(); final LinkArg linkArg = LinkArg.build(Display.getWithNewlines(arg.get("BRACKET", 0)), lenght); Link link = new Link(diagram.getEntityFactory(), diagram.getSkinParam().getCurrentStyleBuilder(), entity1, diff --git a/src/net/sourceforge/plantuml/activitydiagram/command/CommandInnerConcurrent.java b/src/net/sourceforge/plantuml/activitydiagram/command/CommandInnerConcurrent.java index 2f75c3d6b..df74057cc 100644 --- a/src/net/sourceforge/plantuml/activitydiagram/command/CommandInnerConcurrent.java +++ b/src/net/sourceforge/plantuml/activitydiagram/command/CommandInnerConcurrent.java @@ -61,7 +61,7 @@ public class CommandInnerConcurrent extends SingleLineCommand2 @Override protected CommandExecutionResult executeArg(ActivityDiagram diagram, LineLocation location, RegexResult arg) { - if (diagram.getCurrentGroup().getQuark().isRoot()) { + if (diagram.getCurrentGroup().isRoot()) { return CommandExecutionResult.error("No inner activity"); } diagram.concurrentActivity(arg.get("NAME", 0)); diff --git a/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkActivity.java b/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkActivity.java index 4888dc8f4..d52197d3c 100644 --- a/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkActivity.java +++ b/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkActivity.java @@ -37,8 +37,7 @@ package net.sourceforge.plantuml.activitydiagram.command; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.activitydiagram.ActivityDiagram; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.command.CommandLinkClass; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; @@ -54,6 +53,7 @@ import net.sourceforge.plantuml.descdiagram.command.CommandLinkElement; import net.sourceforge.plantuml.klimt.color.ColorParser; import net.sourceforge.plantuml.klimt.color.ColorType; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -122,7 +122,7 @@ public class CommandLinkActivity extends SingleLineCommand2 { @Override protected CommandExecutionResult executeArg(ActivityDiagram diagram, LineLocation location, RegexResult arg) throws NoSuchColorException { - final EntityImp entity1 = getEntity(diagram, arg, true); + final Entity entity1 = getEntity(diagram, arg, true); if (entity1 == null) return CommandExecutionResult.error("No such activity"); @@ -135,7 +135,7 @@ public class CommandLinkActivity extends SingleLineCommand2 { entity1.setSpecificColorTOBEREMOVED(ColorType.BACK, diagram.getSkinParam().getIHtmlColorSet().getColor(s)); } - final EntityImp entity2 = getEntity(diagram, arg, false); + final Entity entity2 = getEntity(diagram, arg, false); if (entity2 == null) return CommandExecutionResult.error("No such activity"); @@ -186,7 +186,7 @@ public class CommandLinkActivity extends SingleLineCommand2 { } - static EntityImp getEntity(ActivityDiagram diagram, RegexResult arg, final boolean start) { + static Entity getEntity(ActivityDiagram diagram, RegexResult arg, final boolean start) { final String suf = start ? "" : "2"; final String openBracket2 = arg.get("OPENBRACKET" + suf, 0); @@ -215,7 +215,7 @@ public class CommandLinkActivity extends SingleLineCommand2 { final Quark ident = diagram.quarkInContext(diagram.cleanIdForQuark(idShort), false); final LeafType type = getTypeIfExisting(diagram, ident); - EntityImp result = (EntityImp) ident.getData(); + Entity result = (Entity) ident.getData(); if (result == null) result = diagram.reallyCreateLeaf(ident, Display.getWithNewlines(idShort), type, null); @@ -227,7 +227,7 @@ public class CommandLinkActivity extends SingleLineCommand2 { final String bar = arg.get("BAR" + suf, 0); if (bar != null) { final Quark quark = diagram.quarkInContext(diagram.cleanIdForQuark(bar), false); - EntityImp result = (EntityImp) quark.getData(); + Entity result = (Entity) quark.getData(); if (result == null) result = diagram.reallyCreateLeaf(quark, Display.getWithNewlines(bar), LeafType.SYNCHRO_BAR, null); return result; @@ -243,7 +243,7 @@ public class CommandLinkActivity extends SingleLineCommand2 { final Quark quark = diagram.quarkInContext(diagram.cleanIdForQuark(quotedString), false); final LeafType type = getTypeIfExisting(diagram, quark); - EntityImp result = (EntityImp) quark.getData(); + Entity result = (Entity) quark.getData(); if (result == null) result = diagram.reallyCreateLeaf(quark, Display.getWithNewlines(quoted.get(0)), type, null); if (partition != null) @@ -258,7 +258,7 @@ public class CommandLinkActivity extends SingleLineCommand2 { diagram.gotoGroup(quark, Display.getWithNewlines(quark), GroupType.PACKAGE); } final Quark identInvisible = diagram.quarkInContext(diagram.cleanIdForQuark(quoteInvisibleString), false); - EntityImp result = (EntityImp) identInvisible.getData(); + Entity result = (Entity) identInvisible.getData(); if (result == null) result = diagram.reallyCreateLeaf(identInvisible, Display.getWithNewlines(identInvisible.getName()), LeafType.ACTIVITY, null); diff --git a/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkLongActivity.java b/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkLongActivity.java index b0167e70e..c16dc641a 100644 --- a/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkLongActivity.java +++ b/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkLongActivity.java @@ -39,8 +39,7 @@ import java.util.List; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.activitydiagram.ActivityDiagram; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.command.CommandLinkClass; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.CommandMultilines2; @@ -57,6 +56,7 @@ import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.descdiagram.command.CommandLinkElement; import net.sourceforge.plantuml.klimt.color.ColorType; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.MyPattern; import net.sourceforge.plantuml.regex.RegexConcat; @@ -120,7 +120,7 @@ public class CommandLinkLongActivity extends CommandMultilines2 lines = lines.trim(); final RegexResult line0 = getStartingPattern().matcher(lines.getFirst().getTrimmed().getString()); - final EntityImp entity1 = CommandLinkActivity.getEntity(diagram, line0, true); + final Entity entity1 = CommandLinkActivity.getEntity(diagram, line0, true); if (entity1 == null) return CommandExecutionResult.error("No such entity"); @@ -181,7 +181,7 @@ public class CommandLinkLongActivity extends CommandMultilines2 } final Quark ident = diagram.quarkInContext(diagram.cleanIdForQuark(idShort), false); - EntityImp entity2 = (EntityImp) ident.getData(); + Entity entity2 = (Entity) ident.getData(); if (entity2 == null) entity2 = diagram.reallyCreateLeaf(ident, Display.getWithNewlines(display), LeafType.ACTIVITY, null); diff --git a/src/net/sourceforge/plantuml/activitydiagram/command/CommandPartition.java b/src/net/sourceforge/plantuml/activitydiagram/command/CommandPartition.java index 239a17695..08998af40 100644 --- a/src/net/sourceforge/plantuml/activitydiagram/command/CommandPartition.java +++ b/src/net/sourceforge/plantuml/activitydiagram/command/CommandPartition.java @@ -36,8 +36,7 @@ package net.sourceforge.plantuml.activitydiagram.command; import net.sourceforge.plantuml.activitydiagram.ActivityDiagram; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.cucadiagram.Display; @@ -47,6 +46,7 @@ import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.klimt.color.ColorParser; import net.sourceforge.plantuml.klimt.color.ColorType; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -89,7 +89,7 @@ public class CommandPartition extends SingleLineCommand2 { // final Quark code = diagram.buildFromFullPath(idShort); diagram.gotoGroup(quark, Display.getWithNewlines(quark.getName()), GroupType.PACKAGE); - final EntityImp p = diagram.getCurrentGroup(); + final Entity p = diagram.getCurrentGroup(); final Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); if (colors.isEmpty() == false) { diff --git a/src/net/sourceforge/plantuml/activitydiagram3/AbstractInstruction.java b/src/net/sourceforge/plantuml/activitydiagram3/AbstractInstruction.java index 37acd04a2..6e08c2ecb 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/AbstractInstruction.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/AbstractInstruction.java @@ -41,7 +41,7 @@ import net.sourceforge.plantuml.klimt.font.StringBounder; abstract class AbstractInstruction { - // ::comment when WASM + // ::comment when CORE public Gtile createGtile(ISkinParam skinParam, StringBounder stringBounder) { throw new UnsupportedOperationException("" + getClass()); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/Branch.java b/src/net/sourceforge/plantuml/activitydiagram3/Branch.java index 4d8d1cf5e..823fea917 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/Branch.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/Branch.java @@ -78,7 +78,7 @@ public class Branch { private final HColor color; private Ftile ftile; - // ::comment when WASM + // ::comment when CORE private Gtile gtile; // ::done @@ -132,7 +132,7 @@ public class Branch { this.ftile = factory.decorateOut(list.createFtile(factory), inlinkRendering); } - // ::comment when WASM + // ::comment when CORE public void updateGtile(ISkinParam skinParam, StringBounder stringBounder) { this.gtile = list.createGtile(skinParam, stringBounder); } @@ -190,14 +190,14 @@ public class Branch { return ftile; } - // ::comment when WASM + // ::comment when CORE public Gtile getGtile() { return gtile; } // ::done public ISkinParam skinParam() { - // ::comment when WASM + // ::comment when CORE if (gtile != null) return gtile.skinParam(); // ::done diff --git a/src/net/sourceforge/plantuml/activitydiagram3/Instruction.java b/src/net/sourceforge/plantuml/activitydiagram3/Instruction.java index 0e659fcd6..d3c00d3a2 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/Instruction.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/Instruction.java @@ -52,7 +52,7 @@ public interface Instruction extends Swimable { public Ftile createFtile(FtileFactory factory); - // ::comment when WASM + // ::comment when CORE public Gtile createGtile(ISkinParam skinParam, StringBounder stringBounder); // ::done diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionBreak.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionBreak.java index 336ffb4ea..4975bcf1b 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionBreak.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionBreak.java @@ -61,7 +61,7 @@ public class InstructionBreak extends MonoSwimable implements Instruction { return new FtileBreak(factory.skinParam(), getSwimlaneIn()); } - // ::comment when WASM + // ::comment when CORE @Override public Gtile createGtile(ISkinParam skinParam, StringBounder stringBounder) { return new GtileBreak(stringBounder, skinParam, getSwimlaneIn()); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionEnd.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionEnd.java index cfe60134a..23c1d8210 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionEnd.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionEnd.java @@ -57,7 +57,7 @@ public class InstructionEnd extends MonoSwimable implements Instruction { this.inlinkRendering = Objects.requireNonNull(inlinkRendering); } - // ::comment when WASM + // ::comment when CORE @Override public Gtile createGtile(ISkinParam skinParam, StringBounder stringBounder) { return new GtileCircleStart(stringBounder, skinParam, HColors.BLACK, getSwimlaneIn()); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionFork.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionFork.java index 358e4f4a9..e9ff46d1d 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionFork.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionFork.java @@ -98,7 +98,7 @@ public class InstructionFork extends WithNote implements Instruction { return getLastList().add(ins); } - // ::comment when WASM + // ::comment when CORE @Override public Gtile createGtile(ISkinParam skinParam, StringBounder stringBounder) { final List all = new ArrayList<>(); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionGoto.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionGoto.java index aed6a98df..1d4a65342 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionGoto.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionGoto.java @@ -59,7 +59,7 @@ public class InstructionGoto extends MonoSwimable implements Instruction { return new FtileGoto(factory.skinParam(), getSwimlaneIn(), name); } - // ::comment when WASM + // ::comment when CORE @Override public Gtile createGtile(ISkinParam skinParam, StringBounder stringBounder) { return new GtileEmpty(stringBounder, skinParam); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionGroup.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionGroup.java index bfc55a822..e2b6e2380 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionGroup.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionGroup.java @@ -90,7 +90,7 @@ public class InstructionGroup extends AbstractInstruction implements Instruction return list.add(ins); } - // ::comment when WASM + // ::comment when CORE @Override public Gtile createGtile(ISkinParam skinParam, StringBounder stringBounder) { Gtile tmp = list.createGtile(skinParam, stringBounder); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionIf.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionIf.java index 1d3351870..a945d791f 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionIf.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionIf.java @@ -108,7 +108,7 @@ public class InstructionIf extends WithNote implements Instruction, InstructionC return current.add(ins); } - // ::comment when WASM + // ::comment when CORE @Override public Gtile createGtile(ISkinParam skinParam, StringBounder stringBounder) { for (Branch branch : thens) diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionLabel.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionLabel.java index 3cb205750..8bda1b452 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionLabel.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionLabel.java @@ -59,7 +59,7 @@ public class InstructionLabel extends MonoSwimable implements Instruction { return new FtileLabel(factory.skinParam(), getSwimlaneIn(), name); } - // ::comment when WASM + // ::comment when CORE @Override public Gtile createGtile(ISkinParam skinParam, StringBounder stringBounder) { return new GtileEmpty(stringBounder, skinParam); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionList.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionList.java index a701a7631..e97b2ce52 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionList.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionList.java @@ -101,7 +101,7 @@ public class InstructionList extends WithNote implements Instruction, Instructio return CommandExecutionResult.ok(); } - // ::comment when WASM + // ::comment when CORE @Override public Gtile createGtile(ISkinParam skinParam, StringBounder stringBounder) { if (all.size() == 0) diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionRepeat.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionRepeat.java index a3453de83..c702f9919 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionRepeat.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionRepeat.java @@ -127,7 +127,7 @@ public class InstructionRepeat extends AbstractInstruction implements Instructio return repeatList.add(ins); } - // ::comment when WASM + // ::comment when CORE @Override public Gtile createGtile(ISkinParam skinParam, StringBounder stringBounder) { diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionSimple.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionSimple.java index 42f4c4176..4a557f63b 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionSimple.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionSimple.java @@ -82,7 +82,7 @@ public class InstructionSimple extends MonoSwimable implements Instruction { this.colors = Objects.requireNonNull(colors); } - // ::comment when WASM + // ::comment when CORE @Override public Gtile createGtile(ISkinParam skinParam, StringBounder stringBounder) { GtileBox result = GtileBox.create(stringBounder, colors.mute(skinParam), label, getSwimlaneIn(), style, diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionSplit.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionSplit.java index 29acd56e3..cf9681353 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionSplit.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionSplit.java @@ -89,7 +89,7 @@ public class InstructionSplit extends AbstractInstruction implements Instruction return getLast().add(ins); } - // ::comment when WASM + // ::comment when CORE @Override public Gtile createGtile(ISkinParam skinParam, StringBounder stringBounder) { final List all = new ArrayList<>(); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionSpot.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionSpot.java index e20bd114f..a6a8bd6ce 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionSpot.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionSpot.java @@ -80,7 +80,7 @@ public class InstructionSpot extends MonoSwimable implements Instruction { return result; } - // ::comment when WASM + // ::comment when CORE @Override public Gtile createGtile(ISkinParam skinParam, StringBounder stringBounder) { final UFont font = skinParam.getFont(null, false, FontParam.ACTIVITY); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionStart.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionStart.java index 6ef867a86..cc3aa36eb 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionStart.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionStart.java @@ -62,7 +62,7 @@ public class InstructionStart extends MonoSwimable implements Instruction { return false; } - // ::comment when WASM + // ::comment when CORE @Override public Gtile createGtile(ISkinParam skinParam, StringBounder stringBounder) { return new GtileCircleStart(stringBounder, skinParam, HColors.BLACK, getSwimlaneIn()); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionStop.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionStop.java index 83d7f97f6..eca77b8e0 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionStop.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionStop.java @@ -62,7 +62,7 @@ public class InstructionStop extends MonoSwimable implements Instruction { return false; } - // ::comment when WASM + // ::comment when CORE @Override public Gtile createGtile(ISkinParam skinParam, StringBounder stringBounder) { return new GtileCircleStart(stringBounder, skinParam, HColors.BLACK, getSwimlaneIn()); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionSwitch.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionSwitch.java index 4dad7d58e..0ca8203a0 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionSwitch.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionSwitch.java @@ -97,7 +97,7 @@ public class InstructionSwitch extends WithNote implements Instruction, Instruct return current.add(ins); } - // ::comment when WASM + // ::comment when CORE @Override public Gtile createGtile(ISkinParam skinParam, StringBounder stringBounder) { for (Branch branch : switches) diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionWhile.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionWhile.java index c86185d18..722d3b361 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionWhile.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionWhile.java @@ -103,7 +103,7 @@ public class InstructionWhile extends WithNote implements Instruction, Instructi return repeatList.add(ins); } - // ::comment when WASM + // ::comment when CORE @Override public Gtile createGtile(ISkinParam skinParam, StringBounder stringBounder) { final Gtile back = null; diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlanes.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlanes.java index a3f2a8dec..71474ac04 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlanes.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlanes.java @@ -192,7 +192,7 @@ public class Swimlanes extends AbstractTextBlock implements TextBlock, Styleable final ConnectionCross connectionCross = new ConnectionCross(connection); connectionCross.drawU(getUg()); } - // ::comment when WASM + // ::comment when CORE } else if (shape instanceof Gtile) { final Gtile tile = (Gtile) shape; tile.drawU(this); @@ -222,7 +222,7 @@ public class Swimlanes extends AbstractTextBlock implements TextBlock, Styleable } public final void drawU(UGraphic ug) { - // ::comment when WASM + // ::comment when CORE if (Gtile.USE_GTILE) { drawGtile(ug); return; @@ -242,7 +242,7 @@ public class Swimlanes extends AbstractTextBlock implements TextBlock, Styleable } } - // ::comment when WASM + // ::comment when CORE private void drawGtile(UGraphic ug) { TextBlock full = root.createGtile(skinParam, ug.getStringBounder()); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/UGraphicInterceptorUDrawable2.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/UGraphicInterceptorUDrawable2.java index 59382a293..f9d839bbf 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/UGraphicInterceptorUDrawable2.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/UGraphicInterceptorUDrawable2.java @@ -61,7 +61,7 @@ public class UGraphicInterceptorUDrawable2 extends UGraphicDelegator { } public void draw(UShape shape) { - // :: comment when WASM + // :: comment when CORE if (shape instanceof Gtile) { final Gtile gtile = (Gtile) shape; // System.err.println("gtile=" + gtile); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/UGraphicInterceptorOneSwimlane.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/UGraphicInterceptorOneSwimlane.java index 2722ab9be..0a1d6b7b5 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/UGraphicInterceptorOneSwimlane.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/UGraphicInterceptorOneSwimlane.java @@ -73,7 +73,7 @@ public class UGraphicInterceptorOneSwimlane extends UGraphicDelegator { tile.drawU(this); // drawGoto(); } - // ::comment when WASM + // ::comment when CORE } else if (shape instanceof Gtile) { final Gtile tile = (Gtile) shape; final Set swinlanes = tile.getSwimlanes(); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/gtile/Gtile.java b/src/net/sourceforge/plantuml/activitydiagram3/gtile/Gtile.java index 2228b23e7..d7ed32747 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/gtile/Gtile.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/gtile/Gtile.java @@ -43,7 +43,7 @@ import net.sourceforge.plantuml.klimt.UTranslate; import net.sourceforge.plantuml.klimt.font.StringBounder; public interface Gtile extends Swimable2, TextBlock { - // ::remove folder when WASM + // ::remove folder when CORE public static final boolean USE_GTILE = false; diff --git a/src/net/sourceforge/plantuml/anim/AffineTransformation.java b/src/net/sourceforge/plantuml/anim/AffineTransformation.java index 1d5f4a4b9..501ec42a4 100644 --- a/src/net/sourceforge/plantuml/anim/AffineTransformation.java +++ b/src/net/sourceforge/plantuml/anim/AffineTransformation.java @@ -47,7 +47,7 @@ import net.sourceforge.plantuml.awt.geom.XPoint2D; import net.sourceforge.plantuml.klimt.geom.MinMax; public class AffineTransformation { - // ::remove folder when WASM + // ::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*)"); diff --git a/src/net/sourceforge/plantuml/ant/CheckZipTask.java b/src/net/sourceforge/plantuml/ant/CheckZipTask.java index 05c5bdae9..4e9cb2793 100644 --- a/src/net/sourceforge/plantuml/ant/CheckZipTask.java +++ b/src/net/sourceforge/plantuml/ant/CheckZipTask.java @@ -54,7 +54,7 @@ import net.sourceforge.plantuml.security.SFile; import net.sourceforge.plantuml.security.SecurityUtils; public class CheckZipTask extends Task { - // ::remove folder when WASM + // ::remove folder when CORE private String zipfile = null; private List filesets = new ArrayList<>(); diff --git a/src/net/sourceforge/plantuml/api/mda/option2/MDADiagram.java b/src/net/sourceforge/plantuml/api/mda/option2/MDADiagram.java index 69e0da56f..28c43b413 100644 --- a/src/net/sourceforge/plantuml/api/mda/option2/MDADiagram.java +++ b/src/net/sourceforge/plantuml/api/mda/option2/MDADiagram.java @@ -38,6 +38,6 @@ package net.sourceforge.plantuml.api.mda.option2; import java.util.Collection; public interface MDADiagram { - // ::remove folder when WASM + // ::remove folder when CORE public Collection getPackages(); } diff --git a/src/net/sourceforge/plantuml/api/mda/option3/MDAVisitor.java b/src/net/sourceforge/plantuml/api/mda/option3/MDAVisitor.java index 9d6035779..5fa9bb86e 100644 --- a/src/net/sourceforge/plantuml/api/mda/option3/MDAVisitor.java +++ b/src/net/sourceforge/plantuml/api/mda/option3/MDAVisitor.java @@ -36,5 +36,5 @@ package net.sourceforge.plantuml.api.mda.option3; public interface MDAVisitor { - // ::remove folder when WASM + // ::remove folder when CORE } diff --git a/src/net/sourceforge/plantuml/argon2/Argon2.java b/src/net/sourceforge/plantuml/argon2/Argon2.java index f77808861..ebc06f900 100644 --- a/src/net/sourceforge/plantuml/argon2/Argon2.java +++ b/src/net/sourceforge/plantuml/argon2/Argon2.java @@ -25,7 +25,7 @@ import net.sourceforge.plantuml.argon2.model.Argon2Type; import net.sourceforge.plantuml.argon2.model.Instance; public class Argon2 { - // ::remove folder when WASM + // ::remove folder when CORE private byte[] output; private int outputLength; // -l N diff --git a/src/net/sourceforge/plantuml/asciiart/AbstractComponentText.java b/src/net/sourceforge/plantuml/asciiart/AbstractComponentText.java index 717b664ab..156b8a8b3 100644 --- a/src/net/sourceforge/plantuml/asciiart/AbstractComponentText.java +++ b/src/net/sourceforge/plantuml/asciiart/AbstractComponentText.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.style.StyleSignatureBasic; public abstract class AbstractComponentText implements Component { - // ::remove folder when WASM + // ::remove folder when CORE public final XDimension2D getPreferredDimension(StringBounder stringBounder) { final double w = getPreferredWidth(stringBounder); diff --git a/src/net/sourceforge/plantuml/baraye/CucaDiagram.java b/src/net/sourceforge/plantuml/baraye/CucaDiagram.java index 6f4b14747..c19f0d3d1 100644 --- a/src/net/sourceforge/plantuml/baraye/CucaDiagram.java +++ b/src/net/sourceforge/plantuml/baraye/CucaDiagram.java @@ -75,6 +75,8 @@ import net.sourceforge.plantuml.cucadiagram.dot.CucaDiagramTxtMaker; import net.sourceforge.plantuml.elk.CucaDiagramFileMakerElk; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.graphml.CucaDiagramGraphmlMaker; +import net.sourceforge.plantuml.plasma.Plasma; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.sdot.CucaDiagramFileMakerSmetana; import net.sourceforge.plantuml.security.SecurityUtils; import net.sourceforge.plantuml.skin.VisibilityModifier; @@ -104,7 +106,6 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, private boolean visibilityModifierPresent; - // private NamespaceStrategy lastNamespaceStrategy; private Together currentTogether; public CucaDiagram(UmlSource source, UmlDiagramType type, Map orig) { @@ -147,7 +148,7 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, @Override public boolean hasUrl() { for (Quark quark : getPlasma().quarks()) { - final EntityImp ent = (EntityImp) quark.getData(); + final Entity ent = (Entity) quark.getData(); if (ent != null && ent.hasUrl()) return true; } @@ -155,21 +156,21 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, return false; } - final public void setLastEntity(EntityImp foo) { - this.lastEntity = (EntityImp) foo; + final public void setLastEntity(Entity foo) { + this.lastEntity = (Entity) foo; } - protected void updateLasts(EntityImp result) { + protected void updateLasts(Entity result) { } - final public EntityImp reallyCreateLeaf(Quark ident, Display display, LeafType type, USymbol symbol) { + final public Entity reallyCreateLeaf(Quark ident, Display display, LeafType type, USymbol symbol) { Objects.requireNonNull(type); if (ident.getData() != null) throw new IllegalStateException(); if (Display.isNull(display)) throw new IllegalArgumentException(); - final EntityImp result = entityFactory.createLeaf(ident, display, type, getHides()); + final Entity result = entityFactory.createLeaf(ident, type, getHides()); result.setUSymbol(symbol); ident.setData(result); this.lastEntity = result; @@ -177,6 +178,7 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, updateLasts(result); // if (type == LeafType.OBJECT) // ((EntityImp) parent.getData()).muteToType2(type); + result.setDisplay(display); return result; } @@ -184,7 +186,7 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, final public Quark quarkInContext(String full, boolean specialForCreateClass) { final String sep = getNamespaceSeparator(); if (sep == null) { - final Quark result = getPlasma().getIfExistsFromName(full); + final Quark result = getPlasma().firstWithName(full); if (result != null) return result; return currentQuark().child(full); @@ -196,7 +198,7 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, final int x = full.indexOf(sep); if (x == -1) { if (specialForCreateClass == false && getPlasma().countByName(full) == 1) { - final Quark byName = getPlasma().getIfExistsFromName(full); + final Quark byName = getPlasma().firstWithName(full); assert byName != null; if (byName != currentQuark) return byName; @@ -233,24 +235,13 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, return id.substring(x + 2); } + // protected Plasma getPlasma() { public /* protected */ Plasma getPlasma() { return entityFactory.getPlasma(); } - final public Collection getChildrenGroups(EntityImp parent) { - final Collection result = new ArrayList<>(); - - final Quark parent__; - if (parent.instanceofGroupRoot()) - parent__ = getPlasma().root(); - else - parent__ = ((EntityImp) parent).getQuark(); - - for (EntityImp gg : getGroups(false)) - if (gg.getQuark().getParent() == parent__) - result.add(gg); - - return Collections.unmodifiableCollection(result); + final public Collection getChildrenGroups(Entity entity) { + return entity.groups(); } private void eventuallyBuildPhantomGroups() { @@ -259,12 +250,13 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, continue; int countChildren = quark.countChildren(); if (countChildren > 0) { - final Display display = Display.getWithNewlines(quark.getQualifiedName()); - final EntityImp result = entityFactory.createGroup(quark, display, GroupType.PACKAGE, getHides()); + // final Display display = Display.getWithNewlines(quark.getQualifiedName()); + final Display display = Display.getWithNewlines(quark.getName()); + final Entity result = entityFactory.createGroup(quark, GroupType.PACKAGE, getHides()); + result.setDisplay(display); quark.setData(result); } } - } final public CommandExecutionResult gotoTogether() { @@ -275,19 +267,19 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, return CommandExecutionResult.ok(); } - final public CommandExecutionResult gotoGroup(Quark ident, Display display, GroupType type) { + final public CommandExecutionResult gotoGroup(Quark quark, Display display, GroupType type) { if (currentTogether != null) return CommandExecutionResult.error("Cannot be done inside 'together'"); - if (ident.getData() == null) { - final EntityImp result = entityFactory.createGroup(ident, display, type, getHides()); - ident.setData(result); + if (quark.getData() == null) { + final Entity result = entityFactory.createGroup(quark, type, getHides()); + result.setDisplay(display); + quark.setData(result); } - final EntityImp ent = (EntityImp) ident.getData(); - ent.setDisplay(display); - ent.muteToType2(type); + final Entity ent = (Entity) quark.getData(); + ent.muteToGroupType(type); - this.stacks.add(ident); + this.stacks.add(quark); return CommandExecutionResult.ok(); @@ -309,64 +301,33 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, } - public final EntityImp getCurrentGroup() { - return (EntityImp) currentQuark().getData(); + public final Entity getCurrentGroup() { + return (Entity) currentQuark().getData(); } - public final EntityImp getGroup(String code) { - final Quark quark = getPlasma().getIfExistsFromName(code); + public final Entity getGroup(String code) { + final Quark quark = getPlasma().firstWithName(code); if (quark == null) return null; - return (EntityImp) quark.getData(); + return (Entity) quark.getData(); } public final boolean isGroup(String code) { - final Quark quark = getPlasma().getIfExistsFromName(code); + final Quark quark = getPlasma().firstWithName(code); if (quark == null) return false; return isGroup(quark); } - public final boolean isGroup(final Quark quark) { - final EntityImp ent = (EntityImp) quark.getData(); + public final boolean isGroup(Quark quark) { + final Entity ent = (Entity) quark.getData(); if (ent == null) return false; return ent.isGroup(); } - public final Collection getGroups(boolean withRootGroup) { - final List result = new ArrayList<>(); - for (Quark quark : getPlasma().quarks()) { - if (quark.isRoot()) { - if (withRootGroup) - result.add((EntityImp) quark.getData()); - } else { - final EntityImp data = (EntityImp) quark.getData(); - if (data != null && data.isGroup()) - result.add(data); - } - } - return Collections.unmodifiableCollection(result); - } - - public EntityImp getRootGroup() { - return (EntityImp) getPlasma().root().getData(); - } - - public final Collection getLeafsvalues() { - final List result = new ArrayList<>(); - for (Quark quark : getPlasma().quarks()) { - if (quark.isRoot()) - continue; - final EntityImp data = (EntityImp) quark.getData(); - if (data != null && data.isGroup() == false) - result.add(data); - } - return Collections.unmodifiableCollection(result); - } - - public final int getLeafssize() { - return getLeafsvalues().size(); + public Entity getRootGroup() { + return (Entity) getPlasma().root().getData(); } final public void addLink(Link link) { @@ -401,7 +362,7 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, return result.toArray(new String[result.size()]); } - // ::comment when WASM + // ::comment when CORE private void createFilesGraphml(OutputStream suggestedFile) throws IOException { final CucaDiagramGraphmlMaker maker = new CucaDiagramGraphmlMaker(this); maker.createFiles(suggestedFile); @@ -435,7 +396,7 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, throws IOException { final FileFormat fileFormat = fileFormatOption.getFileFormat(); - // ::comment when WASM + // ::comment when CORE if (fileFormat == FileFormat.ATXT || fileFormat == FileFormat.UTXT) { try { createFilesTxt(os, index, fileFormat); @@ -467,13 +428,13 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, this.eventuallyBuildPhantomGroups(); final CucaDiagramFileMaker maker; - // ::comment when WASM + // ::comment when CORE if (this.isUseElk()) maker = new CucaDiagramFileMakerElk(this, fileFormatOption.getDefaultStringBounder(getSkinParam())); else if (this.isUseSmetana()) // ::done maker = new CucaDiagramFileMakerSmetana(this, fileFormatOption.getDefaultStringBounder(getSkinParam())); - // ::comment when WASM + // ::comment when CORE else maker = new CucaDiagramFileMakerSvek(this); // ::done @@ -501,7 +462,7 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, return generalWarningOrError + BackSlash.NEWLINE + warningOrError; } - public boolean isAutarkic(EntityImp g) { + public boolean isAutarkic(Entity g) { if (g.getGroupType() == GroupType.PACKAGE) return false; @@ -521,7 +482,7 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, if (EntityUtils.isPureInnerLink3(g, link) == false) return false; - for (EntityImp leaf : g.getLeafsDirect()) + for (Entity leaf : g.leafs()) if (leaf.getEntityPosition() != EntityPosition.NORMAL) return false; @@ -571,16 +532,8 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, return "25"; } - final public boolean isEmpty(EntityImp gToTest) { - for (EntityImp gg : getGroups(false)) { - if (gg == gToTest) - continue; - - if (gg.getParentContainer() == gToTest) - return false; - - } - return gToTest.size() == 0; + final public boolean isEmpty(Entity entity) { + return entity.isEmpty(); } public final boolean isVisibilityModifierPresent() { @@ -591,7 +544,7 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, this.visibilityModifierPresent = visibilityModifierPresent; } - public final boolean showPortion(EntityPortion portion, EntityImp entity) { + public final boolean showPortion(EntityPortion portion, Entity entity) { if (getSkinParam().strictUmlStyle() && portion == EntityPortion.CIRCLED_CHARACTER) return false; @@ -643,7 +596,7 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, return Collections.unmodifiableSet(hides); } - final public boolean isStandalone(EntityImp ent) { + final public boolean isStandalone(Entity ent) { for (final Link link : getLinks()) if (link.getEntity1() == ent || link.getEntity2() == ent) return false; @@ -651,7 +604,7 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, return true; } - final public boolean isStandaloneForArgo(EntityImp ent) { + final public boolean isStandaloneForArgo(Entity ent) { for (final Link link : getLinks()) { if (link.isHidden() || link.isInvis()) continue; @@ -688,24 +641,24 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, return null; } - protected EntityImp lastEntity = null; + protected Entity lastEntity = null; - final public EntityImp getLastEntity() { + final public Entity getLastEntity() { return lastEntity; } final public EntityFactory getEntityFactory() { - // throw new UnsupportedOperationException(); return entityFactory; } public void applySingleStrategy() { final MagmaList magmaList = new MagmaList(); - for (EntityImp g : getGroups(true)) { - final List standalones = new ArrayList<>(); + final Collection groups = getEntityFactory().groupsAndRoot(); + for (Entity g : groups) { + final List standalones = new ArrayList<>(); - for (EntityImp ent : g.getLeafsDirect()) + for (Entity ent : g.leafs()) if (isStandalone(ent)) standalones.add(ent); @@ -717,7 +670,7 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, magmaList.add(magma); } - for (EntityImp g : getGroups(true)) { + for (Entity g : groups) { final MagmaList magmas = magmaList.getMagmas(g); if (magmas.size() < 3) continue; diff --git a/src/net/sourceforge/plantuml/baraye/EntityFactory.java b/src/net/sourceforge/plantuml/baraye/EntityFactory.java index c2d78e0a3..a39a7046a 100644 --- a/src/net/sourceforge/plantuml/baraye/EntityFactory.java +++ b/src/net/sourceforge/plantuml/baraye/EntityFactory.java @@ -42,7 +42,6 @@ import java.util.List; import java.util.Objects; import java.util.Set; -import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.cucadiagram.Bodier; import net.sourceforge.plantuml.cucadiagram.BodierJSon; import net.sourceforge.plantuml.cucadiagram.BodierMap; @@ -55,6 +54,8 @@ import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.cucadiagram.entity.IEntityFactory; +import net.sourceforge.plantuml.plasma.Plasma; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.skin.VisibilityModifier; public final class EntityFactory implements IEntityFactory { @@ -65,38 +66,24 @@ public final class EntityFactory implements IEntityFactory { private final Plasma plasma; - private final EntityImp rootGroup; + private final Entity rootGroup; private final List hides2; private final List removed; - /* private */ final public ICucaDiagram namespaceSeparator; - - public EntityImp getLeafForEmptyGroup(EntityImp g) { - throw new UnsupportedOperationException(); - } - - public EntityImp createLeafForEmptyGroup(EntityImp g, ISkinParam skinPdaram) { - final EntityImp ent = (EntityImp) g; - ent.muteToType2(LeafType.EMPTY_PACKAGE); - return ent; - } - -// - public EntityImp isIntricated(EntityImp parent) { - throw new UnsupportedOperationException(); - } + final private ICucaDiagram namespaceSeparator; + // public EntityFactory(List hides2, List removed, ICucaDiagram namespaceSeparator) { this.hides2 = hides2; this.removed = removed; this.namespaceSeparator = namespaceSeparator; this.plasma = new Plasma("."); - this.rootGroup = new EntityImp(this.plasma.root(), this, null, GroupType.ROOT, 0); + this.rootGroup = new Entity(this.plasma.root(), this, null, GroupType.ROOT, 0); this.plasma.root().setData(rootGroup); } - public boolean isHidden(EntityImp leaf) { - final EntityImp other = isNoteWithSingleLinkAttachedTo(leaf); + public boolean isHidden(Entity leaf) { + final Entity other = isNoteWithSingleLinkAttachedTo(leaf); if (other != null && other != leaf) return isHidden(other); @@ -115,10 +102,10 @@ public final class EntityFactory implements IEntityFactory { return result; } - public boolean isRemoved(EntityImp leaf) { - final EntityImp other = isNoteWithSingleLinkAttachedTo(leaf); - if (other instanceof EntityImp) - return isRemoved((EntityImp) other); + public boolean isRemoved(Entity leaf) { + final Entity other = isNoteWithSingleLinkAttachedTo(leaf); + if (other instanceof Entity) + return isRemoved((Entity) other); boolean result = false; for (HideOrShow2 hide : removed) @@ -127,11 +114,11 @@ public final class EntityFactory implements IEntityFactory { return result; } - private EntityImp isNoteWithSingleLinkAttachedTo(EntityImp note) { + private Entity isNoteWithSingleLinkAttachedTo(Entity note) { if (note.getLeafType() != LeafType.NOTE) return null; assert note.getLeafType() == LeafType.NOTE; - EntityImp other = null; + Entity other = null; for (Link link : this.getLinks()) { if (link.getType().isInvisible()) continue; @@ -148,7 +135,7 @@ public final class EntityFactory implements IEntityFactory { } - public boolean isRemovedIgnoreUnlinked(EntityImp leaf) { + public boolean isRemovedIgnoreUnlinked(Entity leaf) { boolean result = false; for (HideOrShow2 hide : removed) if (hide.isAboutUnlinked() == false) @@ -157,8 +144,7 @@ public final class EntityFactory implements IEntityFactory { return result; } - final public EntityImp createLeaf(Quark quark, Display display, LeafType entityType, - Set hides) { + final public Entity createLeaf(Quark quark, LeafType entityType, Set hides) { final Bodier bodier; if (Objects.requireNonNull(entityType) == LeafType.MAP) bodier = new BodierMap(); @@ -167,49 +153,33 @@ public final class EntityFactory implements IEntityFactory { else bodier = BodyFactory.createLeaf(entityType, hides); - final EntityImp result = new EntityImp(quark, this, bodier, entityType, rawLayout); + final Entity result = new Entity(quark, this, bodier, entityType, rawLayout); bodier.setLeaf(result); - result.setDisplay(display); return result; } - public EntityImp createGroup(Quark quark, Display display, GroupType groupType, Set hides) { + public Entity createGroup(Quark quark, GroupType groupType, Set hides) { Objects.requireNonNull(groupType); if (quark.getData() != null) - return (EntityImp) quark.getData(); -// for (Entry ent : groups2.entrySet()) -// if (ent.getKey().equals(ident)) -// return ent.getValue(); + return (Entity) quark.getData(); final Bodier bodier = BodyFactory.createGroup(hides); - final EntityImp result = new EntityImp(quark, this, bodier, groupType, rawLayout); - if (Display.isNull(display) == false) - result.setDisplay(display); + final Entity result = new Entity(quark, this, bodier, groupType, rawLayout); return result; } - public EntityImp getRootGroup() { + public Entity getRootGroup() { return rootGroup; } - public final EntityImp getLeafStrict(Quark ident) { - if (ident instanceof Quark == false) - throw new UnsupportedOperationException(); - final Quark quark = (Quark) ident; - final EntityImp result = (EntityImp) quark.getData(); - if (result == null) - throw new UnsupportedOperationException(); - return result; - } + public final Collection leafs() { - public final Collection leafs() { - - final List result = new ArrayList<>(); + final List result = new ArrayList<>(); for (Quark quark : getPlasma().quarks()) { if (quark.isRoot()) continue; - final EntityImp data = (EntityImp) quark.getData(); + final Entity data = (Entity) quark.getData(); if (data != null && data.isGroup() == false) result.add(data); } @@ -217,18 +187,27 @@ public final class EntityFactory implements IEntityFactory { } - public final Collection groups() { - final List result = new ArrayList<>(); + public final Collection groups() { + final List result = new ArrayList<>(); for (Quark quark : getPlasma().quarks()) { if (quark.isRoot()) continue; - final EntityImp data = (EntityImp) quark.getData(); + + final Entity data = (Entity) quark.getData(); if (data != null && data.isGroup()) result.add(data); } - // System.err.println("GROUPS=" + result.size()); return Collections.unmodifiableCollection(result); + } + public final Collection groupsAndRoot() { + final List result = new ArrayList<>(); + for (Quark quark : getPlasma().quarks()) { + final Entity data = (Entity) quark.getData(); + if (data != null && data.isGroup()) + result.add(data); + } + return Collections.unmodifiableCollection(result); } public void incRawLayout() { diff --git a/src/net/sourceforge/plantuml/baraye/EntityImp.java b/src/net/sourceforge/plantuml/baraye/EntityImp.java deleted file mode 100644 index 08c18f4b9..000000000 --- a/src/net/sourceforge/plantuml/baraye/EntityImp.java +++ /dev/null @@ -1,732 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2023, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://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 - * Contribution: Hisashi Miyashita - * Contribution: Miguel Esteves - * - */ -package net.sourceforge.plantuml.baraye; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.EnumMap; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; - -import net.sourceforge.plantuml.Hideable; -import net.sourceforge.plantuml.ISkinParam; -import net.sourceforge.plantuml.LineConfigurable; -import net.sourceforge.plantuml.Removeable; -import net.sourceforge.plantuml.SpecificBackcolorable; -import net.sourceforge.plantuml.StringUtils; -import net.sourceforge.plantuml.command.Position; -import net.sourceforge.plantuml.cucadiagram.Bodier; -import net.sourceforge.plantuml.cucadiagram.CucaNote; -import net.sourceforge.plantuml.cucadiagram.Display; -import net.sourceforge.plantuml.cucadiagram.DisplayPositioned; -import net.sourceforge.plantuml.cucadiagram.EntityPosition; -import net.sourceforge.plantuml.cucadiagram.GroupType; -import net.sourceforge.plantuml.cucadiagram.ICucaDiagram; -import net.sourceforge.plantuml.cucadiagram.LeafType; -import net.sourceforge.plantuml.cucadiagram.Link; -import net.sourceforge.plantuml.cucadiagram.Stereostyles; -import net.sourceforge.plantuml.cucadiagram.Stereotag; -import net.sourceforge.plantuml.cucadiagram.Stereotype; -import net.sourceforge.plantuml.cucadiagram.Together; -import net.sourceforge.plantuml.cucadiagram.dot.Neighborhood; -import net.sourceforge.plantuml.graphic.TextBlock; -import net.sourceforge.plantuml.graphic.TextBlockEmpty; -import net.sourceforge.plantuml.graphic.USymbol; -import net.sourceforge.plantuml.graphic.USymbols; -import net.sourceforge.plantuml.graphic.color.Colors; -import net.sourceforge.plantuml.klimt.color.ColorType; -import net.sourceforge.plantuml.klimt.color.HColor; -import net.sourceforge.plantuml.klimt.font.FontConfiguration; -import net.sourceforge.plantuml.klimt.font.FontParam; -import net.sourceforge.plantuml.klimt.font.UFont; -import net.sourceforge.plantuml.klimt.geom.HorizontalAlignment; -import net.sourceforge.plantuml.skin.VisibilityModifier; -import net.sourceforge.plantuml.style.Style; -import net.sourceforge.plantuml.svek.IEntityImage; -import net.sourceforge.plantuml.svek.Kal; -import net.sourceforge.plantuml.svek.Margins; -import net.sourceforge.plantuml.svek.PackageStyle; -import net.sourceforge.plantuml.svek.SingleStrategy; -import net.sourceforge.plantuml.svek.image.EntityImageStateCommon; -import net.sourceforge.plantuml.text.Guillemet; -import net.sourceforge.plantuml.url.Url; -import net.sourceforge.plantuml.utils.Direction; -import net.sourceforge.plantuml.utils.LineLocation; - -final public class EntityImp implements SpecificBackcolorable, Hideable, Removeable, LineConfigurable { - - private final EntityFactory entityFactory; - - private Quark quark; - - private Url url; - - private final Bodier bodier; - private final String uid; - private Display display = Display.empty(); - private DisplayPositioned legend = null; - - private LeafType leafType; - private Stereotype stereotype; - private Stereostyles stereostyles = Stereostyles.NONE; - private String generic; - - private GroupType groupType; - - // Other - private Margins margins = Margins.NONE; - private final Collection portShortNames = new HashSet<>(); - private int xposition; - private IEntityImage svekImage; - - private USymbol symbol; - private final int rawLayout; - private char concurrentSeparator; - private LineLocation codeLine; - - private Set tags = new LinkedHashSet<>(); - private final List notesTop = new ArrayList<>(); - private final List notesBottom = new ArrayList<>(); - - private Together together; - - // - public void addNote(Display note, Position position, Colors colors) { - if (position == Position.TOP) - notesTop.add(CucaNote.build(note, position, colors)); - else if (position == Position.BOTTOM) - notesBottom.add(CucaNote.build(note, position, colors)); - } - - // - public List getNotes(Position position) { - if (position == Position.TOP) - return Collections.unmodifiableList(notesTop); - if (position == Position.BOTTOM) - return Collections.unmodifiableList(notesBottom); - throw new IllegalArgumentException(); - } - - public void addStereotag(Stereotag tag) { - this.tags.add(tag); - } - - public Set stereotags() { - return Collections.unmodifiableSet(tags); - } - - // Back to Entity - private EntityImp(Quark quark, EntityFactory entityFactory, Bodier bodier, int rawLayout) { - this.quark = Objects.requireNonNull(quark); - if (quark.isRoot()) - this.uid = "clroot"; - else - this.uid = StringUtils.getUid("cl", entityFactory.getDiagram().getUniqueSequence()); - this.entityFactory = entityFactory; - this.bodier = bodier; - this.rawLayout = rawLayout; - } - - EntityImp(Quark quark, EntityFactory entityFactory, Bodier bodier, LeafType leafType, int rawLayout) { - this(Objects.requireNonNull(quark), entityFactory, bodier, rawLayout); - this.leafType = leafType; - } - - EntityImp(Quark quark, EntityFactory entityFactory, Bodier bodier, GroupType groupType, int rawLayout) { - this(Objects.requireNonNull(quark), entityFactory, bodier, rawLayout); - this.groupType = groupType; - } - - public LeafType getLeafType() { - return leafType; - } - - public void muteToType2(LeafType newType) { - if (leafType == LeafType.CLASS && newType == LeafType.OBJECT) - bodier.muteClassToObject(); - this.groupType = null; - this.leafType = newType; - } - - public void muteToType2(GroupType newType) { - this.groupType = newType; - this.leafType = null; - } - - public boolean muteToType(LeafType newType, USymbol newSymbol) { - // checkNotGroup(); - Objects.requireNonNull(newType); - if (leafType != LeafType.STILL_UNKNOWN) { - if (newType == this.leafType) - return true; - - if (leafType != LeafType.ANNOTATION && leafType != LeafType.ABSTRACT_CLASS && leafType != LeafType.CLASS - && leafType != LeafType.ENUM && leafType != LeafType.INTERFACE) { - return false; - // throw new IllegalArgumentException("type=" + leafType); - } - if (newType != LeafType.ANNOTATION && newType != LeafType.ABSTRACT_CLASS && newType != LeafType.CLASS - && newType != LeafType.ENUM && newType != LeafType.INTERFACE && newType != LeafType.OBJECT) { - return false; - // throw new IllegalArgumentException("newtype=" + newType); - } - } - if (leafType == LeafType.CLASS && newType == LeafType.OBJECT) - bodier.muteClassToObject(); - - this.leafType = newType; - this.symbol = newSymbol; - return true; - } - - public Quark getQuark() { - return quark; - } - - public String getCode() { - return getQuark().getName(); - } - - public String getCodeGetName() { - return getQuark().getName(); - } - - public Display getDisplay() { - return display; - } - - public void setDisplay(Display display) { - this.display = display; - } - - public String getUid() { - return uid; - } - - public Stereotype getStereotype() { - return stereotype; - } - - public final void setStereotype(Stereotype stereotype) { - this.stereotype = stereotype; - } - - public String toString() { - return quark.toString() + " " + display + "(" + leafType + ")[" + groupType + "] " + getUid(); - } - - public final Url getUrl99() { - return url; - } - - public boolean hasUrl() { - if (Display.isNull(display) == false && display.hasUrl()) - return true; - - if (bodier == null) - return false; - - if (bodier.hasUrl()) - return true; - - return url != null; - } - - public final void addUrl(Url url) { - this.url = url; - } - - public final Margins getMargins() { - checkNotGroup(); - return margins; - } - - public final void ensureMargins(Margins newMargins) { - // checkNotGroup(); - this.margins = this.margins.merge(newMargins); - } - - public int getXposition() { - checkNotGroup(); - return xposition; - } - - public void setXposition(int pos) { - checkNotGroup(); - xposition = pos; - } - - public final IEntityImage getSvekImage() { - checkNotGroup(); - return svekImage; - } - - public final void setSvekImage(IEntityImage svekImage) { - checkNotGroup(); - this.svekImage = svekImage; - } - - public final void setGeneric(String generic) { - checkNotGroup(); - this.generic = generic; - } - - public final String getGeneric() { - checkNotGroup(); - return generic; - } - - public Bodier getBodier() { - return bodier; - } - - public EntityPosition getEntityPosition() { -// if (leafType == LeafType.PORT) -// return EntityPosition.PORT; - - if (leafType == LeafType.PORTIN) - return EntityPosition.PORTIN; - - if (leafType == LeafType.PORTOUT) - return EntityPosition.PORTOUT; - - if (leafType != LeafType.STATE) - return EntityPosition.NORMAL; - - if (quark.isRoot()) - return EntityPosition.NORMAL; - - final Stereotype stereotype = getStereotype(); - if (stereotype == null) - return EntityPosition.NORMAL; - - return EntityPosition.fromStereotype(stereotype.getLabel(Guillemet.DOUBLE_COMPARATOR)); - - } - - // ---------- - - private void checkGroup() { - if (isGroup() == false) - throw new UnsupportedOperationException(); - - } - - private void checkNotGroup() { - if (isGroup()) - throw new UnsupportedOperationException(); - - } - - public GroupType getGroupType() { - checkGroup(); - return groupType; - } - - public PackageStyle getPackageStyle() { - checkGroup(); - if (stereotype == null) - return null; - - return stereotype.getPackageStyle(); - } - - public boolean isGroup() { - if (groupType != null && leafType != null) - throw new IllegalStateException(); - - assert groupType == null || leafType == null; - if (groupType != null) - return true; - - if (leafType != null) - return false; - - throw new IllegalStateException(); - } - - // ---- other - - public void overrideImage(IEntityImage img, LeafType leafType) { - checkGroup(); - this.svekImage = img; - this.url = null; - - for (final Link link : new ArrayList<>(entityFactory.getLinks())) - if (EntityUtils.isPureInnerLink12(this, link)) - entityFactory.removeLink(link); - -// if (entityFactory.namespaceSeparator.V1972()) { -// entityFactory.removeGroup(getIdent()); -// for (ILeaf ent : new ArrayList<>(entityFactory.leafs())) -// if (this != ent && getIdent().equals(ent.getIdent().parent())) -// entityFactory.removeLeaf(ent.getIdent()); -// -// } else { -// entityFactory.removeGroup(getCodeGetName()); -// for (ILeaf ent : new ArrayList<>(entityFactory.leafs())) -// if (this != ent && this == ent.getParentContainer()) -// entityFactory.removeLeaf(ent.getCodeGetName()); -// } -// -// entityFactory.addLeaf(this); - this.groupType = null; - this.leafType = leafType; - } - -// void muteToGroup(Code namespaceNew, GroupType groupType, IGroup parentContainer) { -// checkNotGroup(); -// if (parentContainer.isGroup() == false) -// throw new IllegalArgumentException(); -// -// this.namespace = namespaceNew; -// this.groupType = groupType; -// this.leafType = null; -// this.parentContainer = parentContainer; -// } - - public USymbol getUSymbol() { - if (getLeafType() == LeafType.CIRCLE) - return USymbols.INTERFACE; - - // if (symbol != null && stereotype != null && stereotype.getSprite() != null) { - // return symbol.withStereoAlignment(HorizontalAlignment.RIGHT); - // } - return symbol; - } - - public void setUSymbol(USymbol symbol) { - this.symbol = symbol; - } - - public SingleStrategy getSingleStrategy() { - return SingleStrategy.SQUARE; - } - - public boolean isHidden() { - if (getParentContainer() != null && getParentContainer().isHidden()) - return true; - - return isHiddenInternal(); - } - - private boolean isHiddenInternal() { - if (quark.isRoot()) - return false; - if (isGroup()) { - if (entityFactory.isHidden(this)) - return true; - - if (getLeafsDirect().size() == 0) - return false; - - for (EntityImp leaf : getLeafsDirect()) - if (leaf.isHiddenInternal() == false) - return false; - - for (EntityImp g : getChildren()) - if (g.isHiddenInternal() == false) - return false; - - return true; - } - return entityFactory.isHidden(this); - } - - public boolean isRemoved() { - if (getParentContainer() != null && getParentContainer().isRemoved()) - return true; - - return isRemovedInternal(); - } - - private boolean isRemovedInternal() { - if (isGroup()) { - if (entityFactory.isRemoved(this)) - return true; - - if (getLeafsDirect().size() == 0 && getChildren().size() == 0) - return false; - - for (EntityImp leaf : getLeafsDirect()) - if (((EntityImp) leaf).isRemovedInternal() == false) - return false; - - for (EntityImp g : getChildren()) - if (((EntityImp) g).isRemovedInternal() == false) - return false; - - return true; - } - return entityFactory.isRemoved(this); - } - - public boolean isAloneAndUnlinked() { - if (isGroup()) - return false; - - for (Link link : entityFactory.getLinks()) - if (link.contains(this)) { - final EntityImp other = (EntityImp) link.getOther(this); - final boolean removed = entityFactory.isRemovedIgnoreUnlinked(other); - if (removed == false && link.getType().isInvisible() == false) - return false; - } - - return true; - } - - private FontParam getTitleFontParam() { - return getGroupType() == GroupType.STATE ? FontParam.STATE : FontParam.PACKAGE; - } - - public FontConfiguration getFontConfigurationForTitle(final ISkinParam skinParam) { - final FontParam fontParam = getTitleFontParam(); - final HColor fontHtmlColor = skinParam.getFontHtmlColor(getStereotype(), fontParam, FontParam.PACKAGE); - final UFont font = skinParam.getFont(getStereotype(), true, fontParam, FontParam.PACKAGE); - final FontConfiguration fontConfiguration = FontConfiguration.create(font, fontHtmlColor, - skinParam.getHyperlinkColor(), skinParam.useUnderlineForHyperlink(), skinParam.getTabSize()); - return fontConfiguration; - } - - public final int getRawLayout() { - return rawLayout; - } - - public char getConcurrentSeparator() { - return concurrentSeparator; - } - - public void setConcurrentSeparator(char separator) { - this.concurrentSeparator = separator; - } - - private Neighborhood neighborhood; - - public void setNeighborhood(Neighborhood neighborhood) { - this.neighborhood = neighborhood; - } - - public Neighborhood getNeighborhood() { - return neighborhood; - } - - private final Map tips = new LinkedHashMap(); - - public void putTip(String member, Display display) { - tips.put(member, display); - } - - public Map getTips() { - return Collections.unmodifiableMap(tips); - } - - private Colors colors = Colors.empty(); - - public Colors getColors() { - return colors; - } - - public void setColors(Colors colors) { - this.colors = colors; - } - - public void setSpecificColorTOBEREMOVED(ColorType type, HColor color) { - if (color != null) - this.colors = colors.add(type, color); - - } - - public Collection getPortShortNames() { - checkNotGroup(); - return Collections.unmodifiableCollection(portShortNames); - } - - public void addPortShortName(String portShortName) { - portShortNames.add(portShortName); - } - - private VisibilityModifier visibility; - - public void setVisibilityModifier(VisibilityModifier visibility) { - this.visibility = visibility; - - } - - public VisibilityModifier getVisibilityModifier() { - return visibility; - } - - public void setLegend(DisplayPositioned legend) { - checkGroup(); - this.legend = legend; - } - - public DisplayPositioned getLegend() { - return legend; - } - - public String getCodeLine() { - if (this.codeLine == null) - return null; - - return "" + this.codeLine.getPosition(); - } - - public void setCodeLine(LineLocation codeLine) { - this.codeLine = codeLine; - } - - // - public void setStereostyle(String stereo) { - this.stereostyles = Stereostyles.build(stereo); - } - - // - public Stereostyles getStereostyles() { - return stereostyles; - } - - private final Map> kals = new EnumMap<>(Direction.class); - - public void addKal(Kal kal) { - final Direction position = kal.getPosition(); - List list = kals.get(position); - if (list == null) { - list = new ArrayList<>(); - kals.put(position, list); - } - list.add(kal); - } - - public List getKals(Direction position) { - final List result = kals.get(position); - if (result == null) - return Collections.emptyList(); - return Collections.unmodifiableList(result); - } - - public ICucaDiagram getDiagram() { - return entityFactory.getDiagram(); - } - - private boolean isStatic; - - // - public void setStatic(boolean isStatic) { - this.isStatic = isStatic; - } - - // - public boolean isStatic() { - return isStatic; - } - - // For group - - public TextBlock getStateHeader(ISkinParam skinParam) { - checkGroup(); - final Style style = EntityImageStateCommon.getStyleStateHeader(this, skinParam); - final List details = getBodier().getRawBody(); - - if (details.size() == 0) - return new TextBlockEmpty(); - - if (style == null) - throw new IllegalArgumentException(); - final FontConfiguration fontConfiguration = FontConfiguration.create(skinParam, style); - - Display display = null; - for (CharSequence s : details) - if (display == null) - display = Display.getWithNewlines(s.toString()); - else - display = display.addAll(Display.getWithNewlines(s.toString())); - - return display.create(fontConfiguration, HorizontalAlignment.LEFT, skinParam); - - } - - public Together getTogether() { - return together; - } - - public void setTogether(Together together) { - this.together = together; - } - - public EntityImp getParentContainer() { - if (quark.isRoot()) - return null; - return (EntityImp) quark.getParent().getData(); - } - - public Collection getLeafsDirect() { - final List result = new ArrayList<>(); - for (Quark quark : quark.getChildren()) { - final EntityImp data = (EntityImp) quark.getData(); - if (data != null && data.isGroup() == false) - result.add(data); - } - return Collections.unmodifiableCollection(result); - } - - public Collection getChildren() { - final List result = new ArrayList<>(); - for (Quark quark : quark.getChildren()) { - final EntityImp data = (EntityImp) quark.getData(); - if (data != null && data.isGroup()) - result.add(data); - } - return Collections.unmodifiableCollection(result); - } - - public int size() { - return getQuark().countChildren(); - } - - public boolean instanceofGroupRoot() { - return getQuark().isRoot(); - } - -} diff --git a/src/net/sourceforge/plantuml/baraye/EntityUtils.java b/src/net/sourceforge/plantuml/baraye/EntityUtils.java index da28abfdc..979778b8c 100644 --- a/src/net/sourceforge/plantuml/baraye/EntityUtils.java +++ b/src/net/sourceforge/plantuml/baraye/EntityUtils.java @@ -39,7 +39,7 @@ import net.sourceforge.plantuml.cucadiagram.Link; public abstract class EntityUtils { - private static boolean isParent(EntityImp groupToBeTested, EntityImp parentGroup) { + private static boolean isParent(Entity groupToBeTested, Entity parentGroup) { if (groupToBeTested.isGroup() == false) // Very strange! return false; @@ -47,7 +47,7 @@ public abstract class EntityUtils { if (groupToBeTested.isGroup() == false) throw new IllegalArgumentException(); - while (groupToBeTested.getQuark().isRoot() == false) { + while (groupToBeTested.isRoot() == false) { if (groupToBeTested == parentGroup) return true; @@ -60,14 +60,14 @@ public abstract class EntityUtils { return false; } - public static boolean isPureInnerLink12(EntityImp group, Link link) { + public static boolean isPureInnerLink12(Entity group, Link link) { if (group.isGroup() == false) throw new IllegalArgumentException(); - final EntityImp e1 = link.getEntity1(); - final EntityImp e2 = link.getEntity2(); - final EntityImp group1 = e1.getParentContainer(); - final EntityImp group2 = e2.getParentContainer(); + final Entity e1 = link.getEntity1(); + final Entity e2 = link.getEntity2(); + final Entity group1 = e1.getParentContainer(); + final Entity group2 = e2.getParentContainer(); if (isParent(group1, group) && isParent(group2, group)) return true; @@ -75,44 +75,14 @@ public abstract class EntityUtils { return false; } -// public static boolean isPureInnerLink12(EntityImp group, Link link) { -// if (group.isGroup() == false) -// throw new IllegalArgumentException(); -// -// final EntityImp e1 = (EntityImp) link.getZEntity1(); -// final EntityImp e2 = (EntityImp) link.getZEntity2(); -// final Quark group1 = e1.getQuark().getParent(); -// final Quark group2 = e2.getQuark().getParent(); -// if (group.getQuark().containsLarge(group1) && group.getQuark().containsLarge(group2)) -// return true; -//// if (isParent(group1, group) && isParent(group2, group)) -//// return true; -// -// return false; -// } -// -// public static boolean isPureInnerLink12(EntityImp group, Link link) { -// if (group.isGroup() == false) -// throw new IllegalArgumentException(); -// -// final EntityImp e1 = link.getEntity1(); -// final EntityImp e2 = link.getEntity2(); -// final EntityImp group1 = e1.getParentContainer(); -// final EntityImp group2 = e2.getParentContainer(); -// if (isParent(group1, group) && isParent(group2, group)) -// return true; -// -// return false; -// } - - public static boolean isPureInnerLink3(EntityImp group, Link link) { + public static boolean isPureInnerLink3(Entity group, Link link) { if (group.isGroup() == false) throw new IllegalArgumentException(); - final EntityImp e1 = link.getEntity1(); - final EntityImp e2 = link.getEntity2(); - final EntityImp group1 = e1.getParentContainer(); - final EntityImp group2 = e2.getParentContainer(); + final Entity e1 = link.getEntity1(); + final Entity e2 = link.getEntity2(); + final Entity group1 = e1.getParentContainer(); + final Entity group2 = e2.getParentContainer(); if (isParent(group2, group) == isParent(group1, group)) return true; diff --git a/src/net/sourceforge/plantuml/baraye/Plasma.java b/src/net/sourceforge/plantuml/baraye/Plasma.java deleted file mode 100644 index 30345714c..000000000 --- a/src/net/sourceforge/plantuml/baraye/Plasma.java +++ /dev/null @@ -1,173 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2023, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://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.baraye; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.List; - -public class Plasma { - - private String separator; - private final Quark root; - private final List quarks = new ArrayList<>(); - - public Plasma(String separator) { - this.root = new Quark(this, null, ""); - this.separator = separator; - this.quarks.add(root); - } - - public Quark root() { - return root; - } - - public final String getSeparator() { - return separator; - } - - public final void setSeparator(String separator) { - if (separator == null) - separator = "\u0000"; - this.separator = separator; - } - - public final boolean hasSeparator() { - return this.separator != null && this.separator != "\u0000"; - } - - public Quark parse(Quark root, String full) { - - final List result = root.getSignature(); - while (true) { - int idx = full.indexOf(separator); - if (idx == -1) { - result.add(full); - return ensurePresent(result); - } - if (idx > 0) { - result.add(full.substring(0, idx)); - ensurePresent(new ArrayList<>(result)); - } - - full = full.substring(idx + separator.length()); - } - } - - Quark ensurePresent(List result) { - Quark quark = getIfExists(result); - if (quark == null) { - if (result.size() == 0) { - // quark = new Quark(this, null, result); - throw new UnsupportedOperationException(); - } else { - final Quark parent = ensurePresent(result.subList(0, result.size() - 1)); - quark = new Quark(this, parent, result.get(result.size() - 1)); - } - // System.err.println("PUTTING " + quark); - quarks.add(quark); - } - return quark; - - } - - public Collection quarks() { - return Collections.unmodifiableCollection(quarks); - } - - public Quark getIfExistsFromName(String name) { - Quark result = null; - for (Quark quark : quarks) - if (quark.getName().equals(name)) { -// if (result != null) -// throw new IllegalArgumentException("Duplicate name: " + name); - result = quark; - return result; - } - return result; - } - - public int countByName(String name) { - int count = 0; - for (Quark quark : quarks) - if (quark.getName().equals(name)) - count++; - return count; - } - - public Quark getIfExistsFromFullPath(String full) { - for (Quark quark : quarks) - if (quark.toString(separator).equals(full)) - return quark; - return null; - } - - public Quark getIfExists(List signature) { - for (Quark quark : quarks) - if (quark.getSignature().equals(signature)) - return quark; - return null; - } - - public int countChildren(Quark parent) { - int count = 0; - for (Quark quark : quarks) - if (quark.getParent() == parent) - count++; - return count; - } - - public List getChildren(Quark parent) { - final List result = new ArrayList<>(); - for (Quark quark : quarks) - if (quark.getParent() == parent) - result.add(quark); - return Collections.unmodifiableList(result); - } - - public void moveAllChildOfToAnewFather(Quark oldFather, Quark newFather) { - for (Quark quark : quarks) { - if (quark == newFather) - continue; - - if (quark.getParent() == oldFather) - quark.setParent(newFather); - } - - } - -} diff --git a/src/net/sourceforge/plantuml/baraye/Quark.java b/src/net/sourceforge/plantuml/baraye/Quark.java deleted file mode 100644 index 204dd258d..000000000 --- a/src/net/sourceforge/plantuml/baraye/Quark.java +++ /dev/null @@ -1,180 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2023, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://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.baraye; - -import java.util.ArrayList; -import java.util.List; - -public class Quark { - - private final Plasma plasma; - private /* final */ Quark parent; - private final String name; - private Object data; - - Quark(Plasma plasma, Quark parent, String name) { - this.name = name; - this.plasma = plasma; - this.parent = parent; - } - - public Quark getParent() { - return parent; - } - - @Override - public String toString() { - // return parts.toString() + "(parent=" + parent + ")"; - return getSignature().toString(); - } - - public List getSignature() { - final List result = new ArrayList<>(); - if (parent != null) - result.addAll(parent.getSignature()); - result.add(name); - return result; - } - - public List parts() { - return getSignature(); - } - - public boolean containsLarge(Quark other) { - final List signature = this.parts(); - final List otherSignature = other.parts(); - return otherSignature.size() > signature.size() - && otherSignature.subList(0, signature.size()).equals(signature); - } - -// @Override -// public boolean equals(Object obj) { -// final Quark other = (Quark) obj; -// if (this.plasma != other.plasma) -// throw new IllegalArgumentException(); -// return this.parts.equals(other.parts); -// } -// -// @Override -// public int hashCode() { -// return parts.hashCode(); -// } - - public String toString(String sep) { - if (sep == null) - sep = "."; - - final StringBuilder sb = new StringBuilder(); - for (String s : parts()) { - if (sb.length() > 0) - sb.append(sep); - - sb.append(s); - } - return sb.toString(); - } - - public String getName() { - return name; - } - - public String getQualifiedName() { - if (plasma.hasSeparator()) - return toString(plasma.getSeparator()); - return name; - } - - public boolean isRoot() { - return parent == null; - // throw new UnsupportedOperationException(); - // return parts.size() == 0; - } - - public final Plasma getPlasma() { - return plasma; - } - - public final Object getData() { - return data; - } - - public final void setData(Object data) { - this.data = data; - } - - public Quark childIfExists(String name) { - final List sig = new ArrayList<>(getSignature()); - sig.add(name); - return plasma.getIfExists(sig); - } - - public Quark child(String full) { - return plasma.parse(this, full); - } - - public int countChildren() { - return plasma.countChildren(this); - } - - public List getChildren() { - return plasma.getChildren(this); - } - - public String forXmi() { - final StringBuilder sb = new StringBuilder(); - for (String s : parts()) { - if (sb.length() > 0) - sb.append("."); - - sb.append(s); - } - return sb.toString(); - } - - public String getPortMember() { - final String last = getName(); - final int x = last.lastIndexOf("::"); - if (x == -1) { - return null; - } - return last.substring(x + 2); - } - - void setParent(Quark newFather) { - this.parent = newFather; - } - -} diff --git a/src/net/sourceforge/plantuml/board/BoardDiagramFactory.java b/src/net/sourceforge/plantuml/board/BoardDiagramFactory.java index cb1bdc914..f417d58cb 100644 --- a/src/net/sourceforge/plantuml/board/BoardDiagramFactory.java +++ b/src/net/sourceforge/plantuml/board/BoardDiagramFactory.java @@ -45,7 +45,7 @@ import net.sourceforge.plantuml.core.DiagramType; import net.sourceforge.plantuml.core.UmlSource; public class BoardDiagramFactory extends PSystemCommandFactory { - // ::remove folder when WASM + // ::remove folder when CORE public BoardDiagramFactory() { super(DiagramType.BOARD); diff --git a/src/net/sourceforge/plantuml/bpm/BpmDiagram.java b/src/net/sourceforge/plantuml/bpm/BpmDiagram.java index 5214cef0c..8f0400e1e 100644 --- a/src/net/sourceforge/plantuml/bpm/BpmDiagram.java +++ b/src/net/sourceforge/plantuml/bpm/BpmDiagram.java @@ -53,7 +53,7 @@ import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.ImageBuilder; public class BpmDiagram extends UmlDiagram { - // ::remove folder when WASM + // ::remove folder when CORE private void cleanGrid(Grid grid) { while (true) { diff --git a/src/net/sourceforge/plantuml/braille/BrailleChar.java b/src/net/sourceforge/plantuml/braille/BrailleChar.java index 2485c873a..42714ee0d 100644 --- a/src/net/sourceforge/plantuml/braille/BrailleChar.java +++ b/src/net/sourceforge/plantuml/braille/BrailleChar.java @@ -36,7 +36,7 @@ package net.sourceforge.plantuml.braille; public class BrailleChar { - // ::remove folder when WASM + // ::remove folder when CORE private final int id; diff --git a/src/net/sourceforge/plantuml/brotli/BitReader.java b/src/net/sourceforge/plantuml/brotli/BitReader.java index 19780129a..cd2857f11 100644 --- a/src/net/sourceforge/plantuml/brotli/BitReader.java +++ b/src/net/sourceforge/plantuml/brotli/BitReader.java @@ -12,7 +12,7 @@ package net.sourceforge.plantuml.brotli; * Bit reading helpers. */ final class BitReader { - // ::remove folder when WASM + // ::remove folder when CORE // Added by Arnaud... not very beautifull private static final boolean CHECK_UNUSED_BYTES_AFTER_END = false; diff --git a/src/net/sourceforge/plantuml/classdiagram/AbstractEntityDiagram.java b/src/net/sourceforge/plantuml/classdiagram/AbstractEntityDiagram.java index 1e71eb7c5..b15fb798a 100644 --- a/src/net/sourceforge/plantuml/classdiagram/AbstractEntityDiagram.java +++ b/src/net/sourceforge/plantuml/classdiagram/AbstractEntityDiagram.java @@ -65,7 +65,7 @@ public abstract class AbstractEntityDiagram extends CucaDiagram { } final public DiagramDescription getDescription() { - final StringBuilder result = new StringBuilder("(" + getLeafssize() + " entities"); + final StringBuilder result = new StringBuilder("(" + getEntityFactory().leafs().size() + " entities"); if (getSource() != null) { final String id = getSource().getId(); if (id != null) { diff --git a/src/net/sourceforge/plantuml/classdiagram/ClassDiagram.java b/src/net/sourceforge/plantuml/classdiagram/ClassDiagram.java index 66c17e01d..de2f249ec 100644 --- a/src/net/sourceforge/plantuml/classdiagram/ClassDiagram.java +++ b/src/net/sourceforge/plantuml/classdiagram/ClassDiagram.java @@ -41,7 +41,7 @@ import java.util.Map; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.cucadiagram.Link; @@ -139,14 +139,14 @@ public class ClassDiagram extends AbstractClassOrObjectDiagram { private RowLayout getRawLayout(int raw) { final RowLayout rawLayout = new RowLayout(); - for (EntityImp leaf : entityFactory.leafs()) + for (Entity leaf : entityFactory.leafs()) if (leaf.getRawLayout() == raw) rawLayout.addLeaf(getEntityImageClass(leaf)); return rawLayout; } - private TextBlock getEntityImageClass(EntityImp entity) { + private TextBlock getEntityImageClass(Entity entity) { return new EntityImageClass(entity, getSkinParam(), this); } diff --git a/src/net/sourceforge/plantuml/classdiagram/command/CommandAddMethod.java b/src/net/sourceforge/plantuml/classdiagram/command/CommandAddMethod.java index f3e406248..020f2309b 100644 --- a/src/net/sourceforge/plantuml/classdiagram/command/CommandAddMethod.java +++ b/src/net/sourceforge/plantuml/classdiagram/command/CommandAddMethod.java @@ -35,14 +35,14 @@ */ package net.sourceforge.plantuml.classdiagram.command; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -71,7 +71,7 @@ public class CommandAddMethod extends SingleLineCommand2 { throws NoSuchColorException { final String idShort = arg.get("NAME", 0); final Quark quark = diagram.quarkInContext(diagram.cleanIdForQuark(idShort), false); - EntityImp entity = (EntityImp) quark.getData(); + Entity entity = (Entity) quark.getData(); if (entity == null) entity = diagram.reallyCreateLeaf(quark, Display.getWithNewlines(quark), LeafType.CLASS, null); // final Quark ident = diagram.buildFromName(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(idShort)); diff --git a/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClass.java b/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClass.java index 26976914d..a71141f63 100644 --- a/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClass.java +++ b/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClass.java @@ -36,8 +36,7 @@ package net.sourceforge.plantuml.classdiagram.command; import net.sourceforge.plantuml.StringUtils; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; @@ -52,6 +51,7 @@ import net.sourceforge.plantuml.klimt.color.ColorType; import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; import net.sourceforge.plantuml.klimt.font.FontParam; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -141,55 +141,18 @@ public class CommandCreateClass extends SingleLineCommand2 { final Quark quark = diagram.quarkInContext(idShort, true); - Display display = Display.getWithNewlines(displayString); - if (Display.isNull(display)) - display = Display.getWithNewlines(quark.getName()).withCreoleMode(CreoleMode.SIMPLE_LINE); - - EntityImp entity = (EntityImp) quark.getData(); + Entity entity = (Entity) quark.getData(); if (entity == null) { + Display display = Display.getWithNewlines(displayString); + if (Display.isNull(display)) + display = Display.getWithNewlines(quark.getName()).withCreoleMode(CreoleMode.SIMPLE_LINE); entity = diagram.reallyCreateLeaf(quark, display, type, null); } else { if (entity.muteToType(type, null) == false) return CommandExecutionResult.error("Bad name"); - entity.setDisplay(display); } -// final Quark quark = diagram.getPlasma().getIfExistsFromName(idShort); -// if (quark != null && quark.getData() != null) -// entity = diagram.getFromName(idShort); -// else - - // } else -// entity = (ILeaf) quark.getData(); -// if (entity == null || entity.isGroup()) { -// for (Quark tmp : diagram.getPlasma().quarks()) -// if (tmp.getData() instanceof EntityImp) { -// final EntityImp tmp2 = (EntityImp) tmp.getData(); -// if (tmp2 != null && tmp.getName().equals(idShort) && tmp2.isGroup() == false) { -// entity = (ILeaf) tmp.getData(); -// break; -// } -// } -// } -// if (entity == null) { -// entity = diagram.reallyCreateLeaf(quark, display, type, null); -// } else { -// if (entity.muteToType(type, null) == false) -// return CommandExecutionResult.error("Bad name"); -// } -// } else { -// final Quark idNewLong = diagram.buildLeafIdent(idShort); -// final Quark code = diagram.buildCode(idShort); -// if (diagram.leafExist(code)) { -// entity = diagram.getOrCreateLeaf(idNewLong, code, type, null); -// if (entity.muteToType(type, null) == false) -// return CommandExecutionResult.error("Bad name"); -// -// } else { -// entity = diagram.createLeaf(idNewLong, code, Display.getWithNewlines(display), type, null); -// } -// } diagram.setLastEntity(entity); if (stereo != null) { entity.setStereotype(Stereotype.build(stereo, diagram.getSkinParam().getCircledCharacterRadius(), diff --git a/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClassMultilines.java b/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClassMultilines.java index 1a3469a42..5083d34e3 100644 --- a/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClassMultilines.java +++ b/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClassMultilines.java @@ -36,8 +36,7 @@ package net.sourceforge.plantuml.classdiagram.command; import net.sourceforge.plantuml.StringUtils; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.CommandMultilines2; @@ -58,6 +57,7 @@ import net.sourceforge.plantuml.klimt.color.ColorType; import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; import net.sourceforge.plantuml.klimt.font.FontParam; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -169,7 +169,7 @@ public class CommandCreateClassMultilines extends CommandMultilines2 final String idShort = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(codeRaw); final Display display = Display.getWithNewlines(displayRaw == null ? idShort : displayRaw); final Quark quark = diagram.quarkInContext(idShort, false); - EntityImp entity = (EntityImp) quark.getData(); + Entity entity = (Entity) quark.getData(); if (entity == null) entity = diagram.reallyCreateLeaf(quark, display, type, usymbol); diff --git a/src/net/sourceforge/plantuml/classdiagram/command/CommandDiamondAssociation.java b/src/net/sourceforge/plantuml/classdiagram/command/CommandDiamondAssociation.java index 2e5d3ccb6..976ff350f 100644 --- a/src/net/sourceforge/plantuml/classdiagram/command/CommandDiamondAssociation.java +++ b/src/net/sourceforge/plantuml/classdiagram/command/CommandDiamondAssociation.java @@ -35,12 +35,12 @@ */ package net.sourceforge.plantuml.classdiagram.command; -import net.sourceforge.plantuml.baraye.Quark; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.LeafType; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; diff --git a/src/net/sourceforge/plantuml/classdiagram/command/CommandHideShowByGender.java b/src/net/sourceforge/plantuml/classdiagram/command/CommandHideShowByGender.java index 4f8fa4954..501d03557 100644 --- a/src/net/sourceforge/plantuml/classdiagram/command/CommandHideShowByGender.java +++ b/src/net/sourceforge/plantuml/classdiagram/command/CommandHideShowByGender.java @@ -37,9 +37,8 @@ package net.sourceforge.plantuml.classdiagram.command; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.UmlDiagram; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.baraye.EntityUtils; -import net.sourceforge.plantuml.baraye.Quark; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.cucadiagram.EntityGender; @@ -48,6 +47,7 @@ import net.sourceforge.plantuml.cucadiagram.EntityPortion; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.descdiagram.DescriptionDiagram; import net.sourceforge.plantuml.objectdiagram.AbstractClassOrObjectDiagram; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -150,7 +150,7 @@ public class CommandHideShowByGender extends SingleLineCommand2 { return CommandExecutionResult.error("No such element " + quark.getName()); // final IEntity entity = diagram.getOrCreateLeaf(quark, // diagram.buildFromFullPath(arg1), null, null); - final EntityImp entity = (EntityImp) quark.getData(); + final Entity entity = (Entity) quark.getData(); gender = EntityGenderUtils.byEntityAlone(entity); } @@ -193,7 +193,7 @@ public class CommandHideShowByGender extends SingleLineCommand2 { } else { arg1 = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg1); final Quark quark = diagram.quarkInContext(diagram.cleanIdForQuark(arg1), false); - EntityImp entity = (EntityImp) quark.getData(); + Entity entity = (Entity) quark.getData(); if (entity == null) return CommandExecutionResult.error("No such element " + quark.getName()); // entity = diagram.reallyCreateLeaf(quark, @@ -209,7 +209,7 @@ public class CommandHideShowByGender extends SingleLineCommand2 { if (empty == true && emptyMembers == false) { gender = EntityGenderUtils.and(gender, emptyByGender(portion)); } - if (diagram.getCurrentGroup().getQuark().isRoot() == false) { + if (diagram.getCurrentGroup().isRoot() == false) { gender = EntityGenderUtils.and(gender, EntityGenderUtils.byPackage(diagram.getCurrentGroup())); } diff --git a/src/net/sourceforge/plantuml/classdiagram/command/CommandLinkClass.java b/src/net/sourceforge/plantuml/classdiagram/command/CommandLinkClass.java index 15c1034f8..9f2ecb160 100644 --- a/src/net/sourceforge/plantuml/classdiagram/command/CommandLinkClass.java +++ b/src/net/sourceforge/plantuml/classdiagram/command/CommandLinkClass.java @@ -38,8 +38,7 @@ package net.sourceforge.plantuml.classdiagram.command; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.cucadiagram.Display; @@ -54,6 +53,7 @@ import net.sourceforge.plantuml.klimt.color.ColorParser; import net.sourceforge.plantuml.klimt.color.ColorType; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; import net.sourceforge.plantuml.objectdiagram.AbstractClassOrObjectDiagram; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexOptional; @@ -175,12 +175,12 @@ final public class CommandLinkClass extends SingleLineCommand2 { // final Quark code = diagram.buildFromFullPath(name); // final IEntity entity = diagram.getOrCreateLeaf(ident, code, null, null); final Quark quark = diagram.quarkInContext(diagram.cleanIdForQuark(name), false); - final EntityImp entity = (EntityImp) quark.getData(); + final Entity entity = (Entity) quark.getData(); if (entity == null) return CommandExecutionResult.error("No such class " + quark.getName()); diff --git a/src/net/sourceforge/plantuml/classdiagram/command/CommandUrl.java b/src/net/sourceforge/plantuml/classdiagram/command/CommandUrl.java index fa8ad5b88..aaf811a7c 100644 --- a/src/net/sourceforge/plantuml/classdiagram/command/CommandUrl.java +++ b/src/net/sourceforge/plantuml/classdiagram/command/CommandUrl.java @@ -35,11 +35,11 @@ */ package net.sourceforge.plantuml.classdiagram.command; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -78,7 +78,7 @@ public class CommandUrl extends SingleLineCommand2 { // final Quark code = diagram.buildFromFullPath(idShort); final Quark quark = diagram.quarkInContext(diagram.cleanIdForQuark(idShort), false); - final EntityImp entity = (EntityImp) quark.getData(); + final Entity entity = (Entity) quark.getData(); if (entity == null) return CommandExecutionResult.error(quark.getName() + " does not exist"); diff --git a/src/net/sourceforge/plantuml/code/CompressionBrotli.java b/src/net/sourceforge/plantuml/code/CompressionBrotli.java index ebaebeb03..b3fdfc87a 100644 --- a/src/net/sourceforge/plantuml/code/CompressionBrotli.java +++ b/src/net/sourceforge/plantuml/code/CompressionBrotli.java @@ -44,7 +44,7 @@ import net.sourceforge.plantuml.brotli.BrotliInputStream; import net.sourceforge.plantuml.log.Logme; public class CompressionBrotli implements Compression { - // ::remove file when WASM + // ::remove file when CORE public byte[] compress(byte[] in) { throw new UnsupportedOperationException(); diff --git a/src/net/sourceforge/plantuml/code/CompressionZlib.java b/src/net/sourceforge/plantuml/code/CompressionZlib.java index f1418f9cf..7b2efc90c 100644 --- a/src/net/sourceforge/plantuml/code/CompressionZlib.java +++ b/src/net/sourceforge/plantuml/code/CompressionZlib.java @@ -43,13 +43,13 @@ import net.sourceforge.plantuml.code.deflate.Decompressor; public class CompressionZlib implements Compression { - // ::comment when WASM + // ::comment when CORE private static boolean USE_ZOPFLI = false; // ::done private static final int COMPRESSION_LEVEL = 9; public byte[] compress(byte[] in) { - // ::comment when WASM + // ::comment when CORE if (USE_ZOPFLI) return new CompressionZopfliZlib().compress(in); // ::done diff --git a/src/net/sourceforge/plantuml/code/CompressionZlibAttic.java b/src/net/sourceforge/plantuml/code/CompressionZlibAttic.java index 40483ae97..17b01e37f 100644 --- a/src/net/sourceforge/plantuml/code/CompressionZlibAttic.java +++ b/src/net/sourceforge/plantuml/code/CompressionZlibAttic.java @@ -42,7 +42,7 @@ import java.util.zip.Inflater; @Deprecated public class CompressionZlibAttic implements Compression { - // ::remove file when WASM + // ::remove file when CORE private static boolean USE_ZOPFLI = false; private static final int COMPRESSION_LEVEL = 9; diff --git a/src/net/sourceforge/plantuml/code/CompressionZopfliZlib.java b/src/net/sourceforge/plantuml/code/CompressionZopfliZlib.java index a968c49f9..fb4c39b70 100644 --- a/src/net/sourceforge/plantuml/code/CompressionZopfliZlib.java +++ b/src/net/sourceforge/plantuml/code/CompressionZopfliZlib.java @@ -41,7 +41,7 @@ import net.sourceforge.plantuml.zopfli.Options.OutputFormat; import net.sourceforge.plantuml.zopfli.Zopfli; public class CompressionZopfliZlib implements Compression { - // ::remove file when WASM + // ::remove file when CORE public byte[] compress(byte[] in) { if (in.length == 0) diff --git a/src/net/sourceforge/plantuml/command/CommandAffineTransform.java b/src/net/sourceforge/plantuml/command/CommandAffineTransform.java index 8f7fa27a7..f4180424d 100644 --- a/src/net/sourceforge/plantuml/command/CommandAffineTransform.java +++ b/src/net/sourceforge/plantuml/command/CommandAffineTransform.java @@ -62,7 +62,7 @@ public class CommandAffineTransform extends SingleLineCommand2 { @Override protected CommandExecutionResult executeArg(UmlDiagram diagram, LineLocation location, RegexResult arg) { final CharSequence value = arg.get("ANIMATION", 0); - // ::comment when WASM + // ::comment when CORE diagram.setAnimation(Collections.singletonList(value)); // ::done return CommandExecutionResult.ok(); diff --git a/src/net/sourceforge/plantuml/command/CommandNamespace.java b/src/net/sourceforge/plantuml/command/CommandNamespace.java index 767c0cc4c..5bf5142e6 100644 --- a/src/net/sourceforge/plantuml/command/CommandNamespace.java +++ b/src/net/sourceforge/plantuml/command/CommandNamespace.java @@ -35,8 +35,7 @@ */ package net.sourceforge.plantuml.command; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.GroupType; @@ -46,6 +45,7 @@ import net.sourceforge.plantuml.graphic.USymbols; import net.sourceforge.plantuml.klimt.color.ColorParser; import net.sourceforge.plantuml.klimt.color.ColorType; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -82,14 +82,12 @@ public class CommandNamespace extends SingleLineCommand2 { protected CommandExecutionResult executeArg(ClassDiagram diagram, LineLocation location, RegexResult arg) throws NoSuchColorException { final String idShort = arg.get("NAME", 0); -// final Quark current = diagram.currentQuark(); -// final Quark idNewLong = current.child(idShort); final Quark quark = diagram.quarkInContext(diagram.cleanIdForQuark(idShort), true); - final CommandExecutionResult status = diagram.gotoGroup(quark, - Display.getWithNewlines(quark.getQualifiedName()), GroupType.PACKAGE); + final CommandExecutionResult status = diagram.gotoGroup(quark, Display.getWithNewlines(quark.getName()), + GroupType.PACKAGE); if (status.isOk() == false) return status; - final EntityImp p = diagram.getCurrentGroup(); + final Entity p = diagram.getCurrentGroup(); final String stereotype = arg.get("STEREOTYPE", 0); if (stereotype != null) { final USymbol usymbol = USymbols.fromString(stereotype, diagram.getSkinParam().actorStyle(), diff --git a/src/net/sourceforge/plantuml/command/CommandNamespace2.java b/src/net/sourceforge/plantuml/command/CommandNamespace2.java index dbc5f9885..d15364344 100644 --- a/src/net/sourceforge/plantuml/command/CommandNamespace2.java +++ b/src/net/sourceforge/plantuml/command/CommandNamespace2.java @@ -35,8 +35,7 @@ */ package net.sourceforge.plantuml.command; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.GroupType; @@ -44,6 +43,7 @@ import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.klimt.color.ColorParser; import net.sourceforge.plantuml.klimt.color.ColorType; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -94,7 +94,7 @@ public class CommandNamespace2 extends SingleLineCommand2 { final CommandExecutionResult status = diagram.gotoGroup(quark, display, GroupType.PACKAGE); if (status.isOk() == false) return status; - final EntityImp p = diagram.getCurrentGroup(); + final Entity p = diagram.getCurrentGroup(); final String stereotype = arg.get("STEREOTYPE", 0); if (stereotype != null) p.setStereotype(Stereotype.build(stereotype)); diff --git a/src/net/sourceforge/plantuml/command/CommandNamespaceEmpty.java b/src/net/sourceforge/plantuml/command/CommandNamespaceEmpty.java index 62102d42b..03380f96b 100644 --- a/src/net/sourceforge/plantuml/command/CommandNamespaceEmpty.java +++ b/src/net/sourceforge/plantuml/command/CommandNamespaceEmpty.java @@ -35,8 +35,7 @@ */ package net.sourceforge.plantuml.command; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.GroupType; @@ -44,6 +43,7 @@ import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.klimt.color.ColorParser; import net.sourceforge.plantuml.klimt.color.ColorType; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -94,7 +94,7 @@ public class CommandNamespaceEmpty extends SingleLineCommand2 { final CommandExecutionResult status = diagram.gotoGroup(quark, display, GroupType.PACKAGE); if (status.isOk() == false) return status; - final EntityImp p = diagram.getCurrentGroup(); + final Entity p = diagram.getCurrentGroup(); final String stereotype = arg.get("STEREOTYPE", 0); if (stereotype != null) p.setStereotype(Stereotype.build(stereotype)); diff --git a/src/net/sourceforge/plantuml/command/CommandPackage.java b/src/net/sourceforge/plantuml/command/CommandPackage.java index 6602f3478..1c1b3706c 100644 --- a/src/net/sourceforge/plantuml/command/CommandPackage.java +++ b/src/net/sourceforge/plantuml/command/CommandPackage.java @@ -36,8 +36,7 @@ package net.sourceforge.plantuml.command; import net.sourceforge.plantuml.StringUtils; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram; import net.sourceforge.plantuml.classdiagram.command.CommandCreateClassMultilines; import net.sourceforge.plantuml.cucadiagram.Display; @@ -50,6 +49,7 @@ import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.klimt.color.ColorParser; import net.sourceforge.plantuml.klimt.color.ColorType; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -117,16 +117,14 @@ public class CommandPackage extends SingleLineCommand2 { display = idShort; } } else { - display = name; + display = name; idShort = arg.get("AS", 0); } -// final Quark current = diagram.currentQuark(); -// final Quark ident = current.child(idShort); final Quark quark; if (arg.get("AS", 0) == null) { quark = diagram.quarkInContext(diagram.cleanIdForQuark(name), true); - display = quark.getQualifiedName(); + display = quark.getName(); } else { quark = diagram.quarkInContext(diagram.cleanIdForQuark(arg.get("AS", 0)), true); display = name; @@ -137,7 +135,7 @@ public class CommandPackage extends SingleLineCommand2 { if (status.isOk() == false) return status; - final EntityImp p = diagram.getCurrentGroup(); + final Entity p = diagram.getCurrentGroup(); final String stereotype = arg.get("STEREOTYPE", 0); diff --git a/src/net/sourceforge/plantuml/command/CommandPackageEmpty.java b/src/net/sourceforge/plantuml/command/CommandPackageEmpty.java index e5b863701..00f136f81 100644 --- a/src/net/sourceforge/plantuml/command/CommandPackageEmpty.java +++ b/src/net/sourceforge/plantuml/command/CommandPackageEmpty.java @@ -36,13 +36,13 @@ package net.sourceforge.plantuml.command; import net.sourceforge.plantuml.StringUtils; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.GroupType; import net.sourceforge.plantuml.klimt.color.ColorType; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -99,7 +99,7 @@ public class CommandPackageEmpty extends SingleLineCommand2 { } } else { system.getPragma().define(name, value); - // ::comment when WASM + // ::comment when CORE if (name.equalsIgnoreCase("graphviz_dot") && value.equalsIgnoreCase("jdot")) return CommandExecutionResult.error( "This directive has been renamed to '!pragma layout smetana'. Please update your diagram."); diff --git a/src/net/sourceforge/plantuml/command/note/CommandFactoryNote.java b/src/net/sourceforge/plantuml/command/note/CommandFactoryNote.java index d01304165..27df850d3 100644 --- a/src/net/sourceforge/plantuml/command/note/CommandFactoryNote.java +++ b/src/net/sourceforge/plantuml/command/note/CommandFactoryNote.java @@ -35,8 +35,7 @@ */ package net.sourceforge.plantuml.command.note; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram; import net.sourceforge.plantuml.classdiagram.command.CommandCreateClassMultilines; import net.sourceforge.plantuml.command.Command; @@ -51,6 +50,7 @@ import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.klimt.color.ColorParser; import net.sourceforge.plantuml.klimt.color.ColorType; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -142,7 +142,7 @@ public final class CommandFactoryNote implements SingleMultiFactoryCommand { if (quark.getData() != null) return CommandExecutionResult.error("Already exists " + quark.getName()); - final EntityImp ent = diagram.reallyCreateLeaf(quark, Display.getWithNewlines(quark), LeafType.BLOCK, null); + final Entity ent = diagram.reallyCreateLeaf(quark, Display.getWithNewlines(quark), LeafType.BLOCK, null); // ent.setDisplay(Display.getWithNewlines(display)); return CommandExecutionResult.ok(); } diff --git a/src/net/sourceforge/plantuml/compositediagram/command/CommandCreatePackageBlock.java b/src/net/sourceforge/plantuml/compositediagram/command/CommandCreatePackageBlock.java index 1e2d34c67..ef8bf6271 100644 --- a/src/net/sourceforge/plantuml/compositediagram/command/CommandCreatePackageBlock.java +++ b/src/net/sourceforge/plantuml/compositediagram/command/CommandCreatePackageBlock.java @@ -35,12 +35,12 @@ */ package net.sourceforge.plantuml.compositediagram.command; -import net.sourceforge.plantuml.baraye.Quark; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.compositediagram.CompositeDiagram; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.GroupType; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; diff --git a/src/net/sourceforge/plantuml/compositediagram/command/CommandLinkBlock.java b/src/net/sourceforge/plantuml/compositediagram/command/CommandLinkBlock.java index d66da25ae..c939483b9 100644 --- a/src/net/sourceforge/plantuml/compositediagram/command/CommandLinkBlock.java +++ b/src/net/sourceforge/plantuml/compositediagram/command/CommandLinkBlock.java @@ -34,8 +34,7 @@ */ package net.sourceforge.plantuml.compositediagram.command; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.compositediagram.CompositeDiagram; @@ -44,6 +43,7 @@ import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkArg; import net.sourceforge.plantuml.cucadiagram.LinkDecor; import net.sourceforge.plantuml.cucadiagram.LinkType; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -81,11 +81,11 @@ public class CommandLinkBlock extends SingleLineCommand2 { final String ent2 = arg.get("ENT2", 0); final Quark quark1 = diagram.quarkInContext(diagram.cleanIdForQuark(ent1), false); final Quark quark2 = diagram.quarkInContext(diagram.cleanIdForQuark(ent2), false); - final EntityImp cl1 = (EntityImp) quark1.getData(); + final Entity cl1 = (Entity) quark1.getData(); if (cl1 == null) return CommandExecutionResult.error("No such element " + quark1.getName()); - final EntityImp cl2 = (EntityImp) quark2.getData(); + final Entity cl2 = (Entity) quark2.getData(); if (cl2 == null) return CommandExecutionResult.error("No such element " + quark2.getName()); // final IEntity cl1 = diagram.getOrCreateLeaf(quark1, diagram.buildFromFullPath(ent1), null, null); diff --git a/src/net/sourceforge/plantuml/creole/atom/AtomImg.java b/src/net/sourceforge/plantuml/creole/atom/AtomImg.java index dc4bc5235..822822251 100644 --- a/src/net/sourceforge/plantuml/creole/atom/AtomImg.java +++ b/src/net/sourceforge/plantuml/creole/atom/AtomImg.java @@ -82,7 +82,7 @@ public class AtomImg extends AbstractAtom implements Atom { public static Atom createQrcode(String flash, double scale) { BufferedImage im = null; - // :: comment when WASM + // :: comment when CORE im = FlashCodeFactory.getFlashCodeUtils().exportFlashcode(flash, Color.BLACK, Color.WHITE); if (im == null) // ::done diff --git a/src/net/sourceforge/plantuml/creole/atom/AtomMath.java b/src/net/sourceforge/plantuml/creole/atom/AtomMath.java index 0c6e9a065..a5462b170 100644 --- a/src/net/sourceforge/plantuml/creole/atom/AtomMath.java +++ b/src/net/sourceforge/plantuml/creole/atom/AtomMath.java @@ -49,7 +49,7 @@ import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UImageSvg; public class AtomMath extends AbstractAtom implements Atom { - // ::remove file when WASM + // ::remove file when CORE private final ScientificEquationSafe math; private final HColor foreground; diff --git a/src/net/sourceforge/plantuml/creole/command/CommandCreoleLatex.java b/src/net/sourceforge/plantuml/creole/command/CommandCreoleLatex.java index 59c6436ec..ed7d44603 100644 --- a/src/net/sourceforge/plantuml/creole/command/CommandCreoleLatex.java +++ b/src/net/sourceforge/plantuml/creole/command/CommandCreoleLatex.java @@ -43,7 +43,7 @@ import net.sourceforge.plantuml.regex.MyPattern; import net.sourceforge.plantuml.regex.Pattern2; public class CommandCreoleLatex implements Command { - // ::remove file when WASM + // ::remove file when CORE @Override public String startingChars() { diff --git a/src/net/sourceforge/plantuml/creole/command/CommandCreoleMath.java b/src/net/sourceforge/plantuml/creole/command/CommandCreoleMath.java index 131ff1a42..b00f152d7 100644 --- a/src/net/sourceforge/plantuml/creole/command/CommandCreoleMath.java +++ b/src/net/sourceforge/plantuml/creole/command/CommandCreoleMath.java @@ -43,7 +43,7 @@ import net.sourceforge.plantuml.regex.MyPattern; import net.sourceforge.plantuml.regex.Pattern2; public class CommandCreoleMath implements Command { - // ::remove file when WASM + // ::remove file when CORE @Override public String startingChars() { diff --git a/src/net/sourceforge/plantuml/creole/legacy/CreoleParser.java b/src/net/sourceforge/plantuml/creole/legacy/CreoleParser.java index 87fac944e..34b3624d4 100644 --- a/src/net/sourceforge/plantuml/creole/legacy/CreoleParser.java +++ b/src/net/sourceforge/plantuml/creole/legacy/CreoleParser.java @@ -104,7 +104,7 @@ public class CreoleParser implements SheetBuilder { return new StripeTree(fontConfiguration, skinParam, line); } else if (Parser.isCodeStart(line)) { return new StripeCode(fontConfiguration.changeFamily(Parser.MONOSPACED)); - // ::comment when WASM + // ::comment when CORE } else if (Parser.isLatexStart(line)) { return new StripeLatex(fontConfiguration); // ::done diff --git a/src/net/sourceforge/plantuml/creole/legacy/PSystemCreole.java b/src/net/sourceforge/plantuml/creole/legacy/PSystemCreole.java index 0234df787..c7d3e4c03 100644 --- a/src/net/sourceforge/plantuml/creole/legacy/PSystemCreole.java +++ b/src/net/sourceforge/plantuml/creole/legacy/PSystemCreole.java @@ -55,7 +55,7 @@ import net.sourceforge.plantuml.klimt.font.UFont; import net.sourceforge.plantuml.klimt.geom.HorizontalAlignment; public class PSystemCreole extends PlainDiagram { - // ::remove file when WASM + // ::remove file when CORE private final List lines = new ArrayList<>(); diff --git a/src/net/sourceforge/plantuml/creole/legacy/PSystemCreoleFactory.java b/src/net/sourceforge/plantuml/creole/legacy/PSystemCreoleFactory.java index 1082ce354..46e06ea24 100644 --- a/src/net/sourceforge/plantuml/creole/legacy/PSystemCreoleFactory.java +++ b/src/net/sourceforge/plantuml/creole/legacy/PSystemCreoleFactory.java @@ -40,7 +40,7 @@ import net.sourceforge.plantuml.core.DiagramType; import net.sourceforge.plantuml.core.UmlSource; public class PSystemCreoleFactory extends PSystemBasicFactory { - // ::remove file when WASM + // ::remove file when CORE public PSystemCreoleFactory() { super(DiagramType.CREOLE); diff --git a/src/net/sourceforge/plantuml/creole/legacy/StripeLatex.java b/src/net/sourceforge/plantuml/creole/legacy/StripeLatex.java index 1d7c1643e..097dd0201 100644 --- a/src/net/sourceforge/plantuml/creole/legacy/StripeLatex.java +++ b/src/net/sourceforge/plantuml/creole/legacy/StripeLatex.java @@ -49,7 +49,7 @@ import net.sourceforge.plantuml.math.ScientificEquationSafe; import net.sourceforge.plantuml.ugraphic.UGraphic; public class StripeLatex implements StripeRaw { - // ::remove file when WASM + // ::remove file when CORE final private FontConfiguration fontConfiguration; final private StringBuilder formula = new StringBuilder(); private AtomMath atom; diff --git a/src/net/sourceforge/plantuml/creole/legacy/StripeSimple.java b/src/net/sourceforge/plantuml/creole/legacy/StripeSimple.java index 7c61d90fe..5f0203230 100644 --- a/src/net/sourceforge/plantuml/creole/legacy/StripeSimple.java +++ b/src/net/sourceforge/plantuml/creole/legacy/StripeSimple.java @@ -162,7 +162,7 @@ public class StripeSimple implements Stripe { addCommand(CommandCreoleQrcode.create()); addCommand(CommandCreoleOpenIcon.create()); addCommand(CommandCreoleEmoji.create()); - // ::comment when WASM + // ::comment when CORE addCommand(CommandCreoleMath.create()); addCommand(CommandCreoleLatex.create()); // ::done @@ -172,7 +172,7 @@ public class StripeSimple implements Stripe { addCommand(CommandCreoleFontFamilyChange.createEol()); addCommand(CommandCreoleMonospaced.create()); addCommand(CommandCreoleUrl.create()); - // ::comment when WASM + // ::comment when CORE if (SecurityUtils.allowSvgText()) addCommand(CommandCreoleSvgAttributeChange.create()); // ::done @@ -288,7 +288,7 @@ public class StripeSimple implements Stripe { atoms.add(new AtomEmoji(emoji, 1, fontConfiguration.getSize2D(), col)); } - // ::comment when WASM + // ::comment when CORE public void addMath(ScientificEquationSafe math) { atoms.add(new AtomMath(math, fontConfiguration.getColor(), fontConfiguration.getExtendedColor())); } diff --git a/src/net/sourceforge/plantuml/cucadiagram/Bodier.java b/src/net/sourceforge/plantuml/cucadiagram/Bodier.java index 0f0b3da83..93252d58a 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/Bodier.java +++ b/src/net/sourceforge/plantuml/cucadiagram/Bodier.java @@ -38,7 +38,7 @@ package net.sourceforge.plantuml.cucadiagram; import java.util.List; import net.sourceforge.plantuml.ISkinParam; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; import net.sourceforge.plantuml.klimt.font.FontConfiguration; @@ -46,7 +46,7 @@ import net.sourceforge.plantuml.style.Style; public interface Bodier { - public void setLeaf(EntityImp leaf); + public void setLeaf(Entity leaf); public Display getFieldsToDisplay(); diff --git a/src/net/sourceforge/plantuml/cucadiagram/BodierJSon.java b/src/net/sourceforge/plantuml/cucadiagram/BodierJSon.java index 93048dbf9..08616fa8d 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/BodierJSon.java +++ b/src/net/sourceforge/plantuml/cucadiagram/BodierJSon.java @@ -39,7 +39,7 @@ import java.util.List; import java.util.Objects; import net.sourceforge.plantuml.ISkinParam; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.json.JsonValue; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; @@ -48,7 +48,7 @@ import net.sourceforge.plantuml.style.Style; public class BodierJSon implements Bodier { - private EntityImp leaf; + private Entity leaf; private JsonValue json; @Override @@ -60,7 +60,7 @@ public class BodierJSon implements Bodier { } @Override - public void setLeaf(EntityImp leaf) { + public void setLeaf(Entity leaf) { this.leaf = Objects.requireNonNull(leaf); } diff --git a/src/net/sourceforge/plantuml/cucadiagram/BodierLikeClassOrObject.java b/src/net/sourceforge/plantuml/cucadiagram/BodierLikeClassOrObject.java index 296226a36..c933438c5 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/BodierLikeClassOrObject.java +++ b/src/net/sourceforge/plantuml/cucadiagram/BodierLikeClassOrObject.java @@ -43,7 +43,7 @@ import java.util.Set; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.StringUtils; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.creole.Parser; import net.sourceforge.plantuml.creole.legacy.CreoleParser; import net.sourceforge.plantuml.graphic.TextBlock; @@ -63,7 +63,7 @@ public class BodierLikeClassOrObject implements Bodier { private LeafType type; private List methodsToDisplay; private List fieldsToDisplay; - private EntityImp leaf; + private Entity leaf; @Override public void muteClassToObject() { @@ -82,7 +82,7 @@ public class BodierLikeClassOrObject implements Bodier { } @Override - public void setLeaf(EntityImp leaf) { + public void setLeaf(Entity leaf) { this.leaf = Objects.requireNonNull(leaf); } diff --git a/src/net/sourceforge/plantuml/cucadiagram/BodierMap.java b/src/net/sourceforge/plantuml/cucadiagram/BodierMap.java index 743a59ac2..c332e6ec5 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/BodierMap.java +++ b/src/net/sourceforge/plantuml/cucadiagram/BodierMap.java @@ -46,7 +46,7 @@ import java.util.regex.Pattern; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineBreakStrategy; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.klimt.font.FontConfiguration; import net.sourceforge.plantuml.style.Style; @@ -55,7 +55,7 @@ public class BodierMap implements Bodier { private final List rawBody = new ArrayList<>(); private final Map map = new LinkedHashMap(); - private EntityImp leaf; + private Entity leaf; @Override public void muteClassToObject() { @@ -66,7 +66,7 @@ public class BodierMap implements Bodier { } @Override - public void setLeaf(EntityImp leaf) { + public void setLeaf(Entity leaf) { this.leaf = Objects.requireNonNull(leaf); } diff --git a/src/net/sourceforge/plantuml/cucadiagram/BodierSimple.java b/src/net/sourceforge/plantuml/cucadiagram/BodierSimple.java index 0fc2c7585..4947631d5 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/BodierSimple.java +++ b/src/net/sourceforge/plantuml/cucadiagram/BodierSimple.java @@ -41,7 +41,7 @@ import java.util.List; import java.util.Objects; import net.sourceforge.plantuml.ISkinParam; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; import net.sourceforge.plantuml.klimt.font.FontConfiguration; @@ -51,7 +51,7 @@ import net.sourceforge.plantuml.style.Style; public class BodierSimple implements Bodier { private final List rawBody = new ArrayList<>(); - private EntityImp leaf; + private Entity leaf; @Override public void muteClassToObject() { @@ -62,7 +62,7 @@ public class BodierSimple implements Bodier { } @Override - public void setLeaf(EntityImp leaf) { + public void setLeaf(Entity leaf) { this.leaf = Objects.requireNonNull(leaf); } diff --git a/src/net/sourceforge/plantuml/cucadiagram/BodyEnhanced1.java b/src/net/sourceforge/plantuml/cucadiagram/BodyEnhanced1.java index 7eefcbac9..a300d5b66 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/BodyEnhanced1.java +++ b/src/net/sourceforge/plantuml/cucadiagram/BodyEnhanced1.java @@ -45,7 +45,7 @@ import java.util.regex.Pattern; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.awt.geom.XRectangle2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.creole.Parser; import net.sourceforge.plantuml.creole.legacy.CreoleParser; @@ -70,11 +70,11 @@ public class BodyEnhanced1 extends BodyEnhancedAbstract implements TextBlock, Wi private final boolean lineFirst; private final List urls = new ArrayList<>(); - private final EntityImp entity; + private final Entity entity; private final boolean inEllipse; private final Style style; - BodyEnhanced1(HorizontalAlignment align, List rawBody, ISkinParam skinParam, EntityImp entity, + BodyEnhanced1(HorizontalAlignment align, List rawBody, ISkinParam skinParam, Entity entity, Style style) { super(align, style.getFontConfiguration(skinParam.getIHtmlColorSet(), entity.getColors()), style); this.style = style; @@ -88,7 +88,7 @@ public class BodyEnhanced1 extends BodyEnhancedAbstract implements TextBlock, Wi this.inEllipse = false; } - BodyEnhanced1(HorizontalAlignment align, Display display, ISkinParam skinParam, EntityImp entity, Style style) { + BodyEnhanced1(HorizontalAlignment align, Display display, ISkinParam skinParam, Entity entity, Style style) { super(align, style.getFontConfiguration(skinParam.getIHtmlColorSet(), entity.getColors()), style); this.style = style; diff --git a/src/net/sourceforge/plantuml/cucadiagram/BodyFactory.java b/src/net/sourceforge/plantuml/cucadiagram/BodyFactory.java index beebae79f..7a1dade4c 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/BodyFactory.java +++ b/src/net/sourceforge/plantuml/cucadiagram/BodyFactory.java @@ -41,7 +41,7 @@ import java.util.Set; import net.atmp.ISkinSimple; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineBreakStrategy; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.klimt.font.FontConfiguration; import net.sourceforge.plantuml.klimt.geom.HorizontalAlignment; @@ -64,12 +64,12 @@ public class BodyFactory { } public static TextBlock create1(HorizontalAlignment align, List rawBody, ISkinParam skinParam, - Stereotype stereotype, EntityImp entity, Style style) { + Stereotype stereotype, Entity entity, Style style) { return new BodyEnhanced1(align, rawBody, skinParam, entity, style); } public static TextBlock create2(HorizontalAlignment align, Display display, ISkinParam skinParam, - Stereotype stereotype, EntityImp entity, Style style) { + Stereotype stereotype, Entity entity, Style style) { return new BodyEnhanced1(align, display, skinParam, entity, style); } diff --git a/src/net/sourceforge/plantuml/cucadiagram/Display.java b/src/net/sourceforge/plantuml/cucadiagram/Display.java index 1efee711d..f2e531891 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/Display.java +++ b/src/net/sourceforge/plantuml/cucadiagram/Display.java @@ -47,7 +47,6 @@ import java.util.regex.Pattern; import net.atmp.ISkinSimple; import net.sourceforge.plantuml.LineBreakStrategy; -import net.sourceforge.plantuml.baraye.Quark; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.creole.Sheet; import net.sourceforge.plantuml.creole.SheetBlock1; @@ -64,6 +63,7 @@ import net.sourceforge.plantuml.klimt.color.NoSuchColorException; import net.sourceforge.plantuml.klimt.font.FontConfiguration; import net.sourceforge.plantuml.klimt.font.UFont; import net.sourceforge.plantuml.klimt.geom.HorizontalAlignment; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.Matcher2; import net.sourceforge.plantuml.regex.MyPattern; import net.sourceforge.plantuml.regex.Pattern2; diff --git a/src/net/sourceforge/plantuml/cucadiagram/EntityGender.java b/src/net/sourceforge/plantuml/cucadiagram/EntityGender.java index 6679ca263..6c275c086 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/EntityGender.java +++ b/src/net/sourceforge/plantuml/cucadiagram/EntityGender.java @@ -35,8 +35,8 @@ */ package net.sourceforge.plantuml.cucadiagram; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; public interface EntityGender { - public boolean contains(EntityImp test); + public boolean contains(Entity test); } diff --git a/src/net/sourceforge/plantuml/cucadiagram/EntityGenderUtils.java b/src/net/sourceforge/plantuml/cucadiagram/EntityGenderUtils.java index 72384f3f5..d4bbd8bc4 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/EntityGenderUtils.java +++ b/src/net/sourceforge/plantuml/cucadiagram/EntityGenderUtils.java @@ -35,7 +35,7 @@ */ package net.sourceforge.plantuml.cucadiagram; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.baraye.EntityUtils; import net.sourceforge.plantuml.text.Guillemet; @@ -43,15 +43,15 @@ public class EntityGenderUtils { static public EntityGender byEntityType(final LeafType type) { return new EntityGender() { - public boolean contains(EntityImp test) { + public boolean contains(Entity test) { return test.getLeafType() == type; } }; } - static public EntityGender byEntityAlone(final EntityImp entity) { + static public EntityGender byEntityAlone(final Entity entity) { return new EntityGender() { - public boolean contains(EntityImp test) { + public boolean contains(Entity test) { return test.getUid().equals(entity.getUid()); } }; @@ -59,7 +59,7 @@ public class EntityGenderUtils { static public EntityGender byStereotype(final String stereotype) { return new EntityGender() { - public boolean contains(EntityImp test) { + public boolean contains(Entity test) { if (test.getStereotype() == null) { return false; } @@ -68,13 +68,13 @@ public class EntityGenderUtils { }; } - static public EntityGender byPackage(final EntityImp group) { - if (group.getQuark().isRoot()) { + static public EntityGender byPackage(final Entity group) { + if (group.isRoot()) { throw new IllegalArgumentException(); } return new EntityGender() { - public boolean contains(EntityImp test) { - if (test.getParentContainer().getQuark().isRoot()) { + public boolean contains(Entity test) { + if (test.getParentContainer().isRoot()) { return false; } if (group == test.getParentContainer()) { @@ -87,7 +87,7 @@ public class EntityGenderUtils { static public EntityGender and(final EntityGender g1, final EntityGender g2) { return new EntityGender() { - public boolean contains(EntityImp test) { + public boolean contains(Entity test) { return g1.contains(test) && g2.contains(test); } }; @@ -95,7 +95,7 @@ public class EntityGenderUtils { static public EntityGender all() { return new EntityGender() { - public boolean contains(EntityImp test) { + public boolean contains(Entity test) { return true; } }; @@ -103,7 +103,7 @@ public class EntityGenderUtils { static public EntityGender emptyMethods() { return new EntityGender() { - public boolean contains(EntityImp test) { + public boolean contains(Entity test) { return test.getBodier().getMethodsToDisplay().size() == 0; } }; @@ -111,7 +111,7 @@ public class EntityGenderUtils { static public EntityGender emptyFields() { return new EntityGender() { - public boolean contains(EntityImp test) { + public boolean contains(Entity test) { return test.getBodier().getFieldsToDisplay().size() == 0; } }; diff --git a/src/net/sourceforge/plantuml/cucadiagram/GroupHierarchy.java b/src/net/sourceforge/plantuml/cucadiagram/GroupHierarchy.java index 1cdad08a9..b5530b5d4 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/GroupHierarchy.java +++ b/src/net/sourceforge/plantuml/cucadiagram/GroupHierarchy.java @@ -37,13 +37,13 @@ package net.sourceforge.plantuml.cucadiagram; import java.util.Collection; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; public interface GroupHierarchy { - public EntityImp getRootGroup(); + public Entity getRootGroup(); - public Collection getChildrenGroups(EntityImp parent); + public Collection getChildrenGroups(Entity parent); - public boolean isEmpty(EntityImp g); + public boolean isEmpty(Entity g); } diff --git a/src/net/sourceforge/plantuml/cucadiagram/GroupPrinter.java b/src/net/sourceforge/plantuml/cucadiagram/GroupPrinter.java index df090f6bd..f087a47e0 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/GroupPrinter.java +++ b/src/net/sourceforge/plantuml/cucadiagram/GroupPrinter.java @@ -38,7 +38,7 @@ package net.sourceforge.plantuml.cucadiagram; import java.io.IOException; import java.io.PrintWriter; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.log.Logme; import net.sourceforge.plantuml.security.SFile; @@ -50,17 +50,17 @@ public class GroupPrinter { this.pw = pw; } - private void printGroup(EntityImp group) { + private void printGroup(Entity group) { pw.println(""); pw.println(""); pw.println(""); pw.println(""); pw.println(""); - if (group.getChildren().size() > 0) { + if (group.groups().size() > 0) { pw.println(""); pw.println("
"); - pw.println(group.getCodeGetName()); + pw.println(group.getName()); pw.println("
"); - if (group.getLeafsDirect().size() == 0) { + if (group.leafs().size() == 0) { pw.println("No direct leaf"); } else { - for (EntityImp leaf : group.getLeafsDirect()) { + for (Entity leaf : group.leafs()) { pw.println("
    "); printLeaf(leaf); pw.println("
"); @@ -68,10 +68,10 @@ public class GroupPrinter { } pw.println("
"); - for (EntityImp g : group.getChildren()) { + for (Entity g : group.groups()) { pw.println("
"); printGroup(g); pw.println("
"); @@ -82,11 +82,11 @@ public class GroupPrinter { pw.println("
"); } - private void printLeaf(EntityImp leaf) { - pw.println("
  • " + leaf.getCodeGetName()); + private void printLeaf(Entity leaf) { + pw.println("
  • " + leaf.getName()); } - public static void print(SFile f, EntityImp rootGroup) { + public static void print(SFile f, Entity rootGroup) { try (PrintWriter pw = f.createPrintWriter()) { pw.println(""); new GroupPrinter(pw).printGroup(rootGroup); diff --git a/src/net/sourceforge/plantuml/cucadiagram/HideOrShow2.java b/src/net/sourceforge/plantuml/cucadiagram/HideOrShow2.java index 655400907..89e898be7 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/HideOrShow2.java +++ b/src/net/sourceforge/plantuml/cucadiagram/HideOrShow2.java @@ -35,7 +35,7 @@ */ package net.sourceforge.plantuml.cucadiagram; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; public class HideOrShow2 { @@ -47,7 +47,7 @@ public class HideOrShow2 { return what + " (" + show + ")"; } - private boolean isApplyable(EntityImp leaf) { + private boolean isApplyable(Entity leaf) { if (what.startsWith("$")) return isApplyableTag(leaf, what.substring(1)); @@ -57,7 +57,7 @@ public class HideOrShow2 { if (isAboutUnlinked()) return isApplyableUnlinked(leaf); - final String fullName = leaf.getCodeGetName(); + final String fullName = leaf.getName(); // System.err.println("fullName=" + fullName); return match(fullName, what); } @@ -72,7 +72,7 @@ public class HideOrShow2 { return what.equalsIgnoreCase("@unlinked"); } - private boolean isApplyableUnlinked(EntityImp leaf) { + private boolean isApplyableUnlinked(Entity leaf) { if (leaf.isAloneAndUnlinked()) return true; @@ -90,7 +90,7 @@ public class HideOrShow2 { return false; } - private boolean isApplyableTag(EntityImp leaf, String pattern) { + private boolean isApplyableTag(Entity leaf, String pattern) { for (Stereotag tag : leaf.stereotags()) if (match(tag.getName(), pattern)) return true; @@ -115,7 +115,7 @@ public class HideOrShow2 { this.show = show; } - public boolean apply(boolean hidden, EntityImp leaf) { + public boolean apply(boolean hidden, Entity leaf) { if (isApplyable(leaf)) return !show; diff --git a/src/net/sourceforge/plantuml/cucadiagram/ICucaDiagram.java b/src/net/sourceforge/plantuml/cucadiagram/ICucaDiagram.java index 14cfb2c46..7120d8645 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/ICucaDiagram.java +++ b/src/net/sourceforge/plantuml/cucadiagram/ICucaDiagram.java @@ -43,8 +43,8 @@ import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.Pragma; import net.sourceforge.plantuml.UmlDiagramType; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.baraye.EntityFactory; -import net.sourceforge.plantuml.baraye.EntityImp; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.style.StyleBuilder; import net.sourceforge.plantuml.ugraphic.ImageBuilder; @@ -71,19 +71,15 @@ public interface ICucaDiagram extends GroupHierarchy, PortionShower, Annotated { String getFlashData(); - Collection getLeafsvalues(); - ImageBuilder createImageBuilder(FileFormatOption fileFormatOption) throws IOException; String getNamespaceSeparator(); - Collection getGroups(boolean b); - UmlSource getSource(); String[] getDotStringSkek(); - boolean isAutarkic(EntityImp g); + boolean isAutarkic(Entity g); int getUniqueSequence(); diff --git a/src/net/sourceforge/plantuml/cucadiagram/Link.java b/src/net/sourceforge/plantuml/cucadiagram/Link.java index 0c3b8242c..d52dc97c5 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/Link.java +++ b/src/net/sourceforge/plantuml/cucadiagram/Link.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.Hideable; import net.sourceforge.plantuml.OptionFlags; import net.sourceforge.plantuml.Removeable; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.entity.IEntityFactory; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.USymbolInterface; @@ -63,8 +63,8 @@ public class Link extends WithLinkType implements Hideable, Removeable { return styleBuilder; } - final private EntityImp cl1; - final private EntityImp cl2; + final private Entity cl1; + final private Entity cl2; private String port1; private String port2; @@ -93,23 +93,23 @@ public class Link extends WithLinkType implements Hideable, Removeable { public String idCommentForSvg() { if (type.looksLikeRevertedForSvg()) - return getEntity1().getCodeGetName() + "-backto-" + getEntity2().getCodeGetName(); + return getEntity1().getName() + "-backto-" + getEntity2().getName(); if (type.looksLikeNoDecorAtAllSvg()) - return getEntity1().getCodeGetName() + "-" + getEntity2().getCodeGetName(); + return getEntity1().getName() + "-" + getEntity2().getName(); - return getEntity1().getCodeGetName() + "-to-" + getEntity2().getCodeGetName(); + return getEntity1().getName() + "-to-" + getEntity2().getName(); } public UComment commentForSvg() { if (type.looksLikeRevertedForSvg()) return new UComment( - "reverse link " + getEntity1().getCodeGetName() + " to " + getEntity2().getCodeGetName()); + "reverse link " + getEntity1().getName() + " to " + getEntity2().getName()); - return new UComment("link " + getEntity1().getCodeGetName() + " to " + getEntity2().getCodeGetName()); + return new UComment("link " + getEntity1().getName() + " to " + getEntity2().getName()); } - public Link(IEntityFactory entityFactory, StyleBuilder styleBuilder, EntityImp cl1, EntityImp cl2, LinkType type, + public Link(IEntityFactory entityFactory, StyleBuilder styleBuilder, Entity cl1, Entity cl2, LinkType type, LinkArg linkArg) { if (linkArg.getLength() < 1) throw new IllegalArgumentException(); @@ -120,7 +120,7 @@ public class Link extends WithLinkType implements Hideable, Removeable { this.cl2 = Objects.requireNonNull(cl2); this.type = type; - final ICucaDiagram diagram = ((EntityImp) cl1).getDiagram(); + final ICucaDiagram diagram = ((Entity) cl1).getDiagram(); this.uid = "LNK" + diagram.getUniqueSequence(); this.linkArg = linkArg; @@ -173,7 +173,7 @@ public class Link extends WithLinkType implements Hideable, Removeable { this.invis = invis; } - public boolean isBetween(EntityImp cl1, EntityImp cl2) { + public boolean isBetween(Entity cl1, Entity cl2) { if (cl1.equals(this.cl1) && cl2.equals(this.cl2)) return true; @@ -188,11 +188,11 @@ public class Link extends WithLinkType implements Hideable, Removeable { return super.toString() + " {" + linkArg.getLength() + "} " + cl1 + "-->" + cl2; } - public EntityImp getEntity1() { + public Entity getEntity1() { return cl1; } - public EntityImp getEntity2() { + public Entity getEntity2() { return cl2; } @@ -204,7 +204,7 @@ public class Link extends WithLinkType implements Hideable, Removeable { return getEntityPort(cl2, port2, bibliotekon); } - private EntityPort getEntityPort(EntityImp leaf, String port, Bibliotekon bibliotekon) { + private EntityPort getEntityPort(Entity leaf, String port, Bibliotekon bibliotekon) { if (leaf.getEntityPosition().usePortP()) return EntityPort.forPort(bibliotekon.getNodeUid(leaf)); return EntityPort.create(bibliotekon.getNodeUid(leaf), port); @@ -230,12 +230,12 @@ public class Link extends WithLinkType implements Hideable, Removeable { return result; } - private boolean isReallyGroup(EntityImp ent) { + private boolean isReallyGroup(Entity ent) { if (ent.isGroup() == false) return false; - final EntityImp group = (EntityImp) ent; - return group.getChildren().size() + group.getLeafsDirect().size() > 0; + final Entity group = (Entity) ent; + return group.groups().size() + group.leafs().size() > 0; } public LinkType getTypePatchCluster() { @@ -265,7 +265,7 @@ public class Link extends WithLinkType implements Hideable, Removeable { return result; } - private boolean isLollipopInterfaceEye(EntityImp ent) { + private boolean isLollipopInterfaceEye(Entity ent) { return ent.getUSymbol() instanceof USymbolInterface; } @@ -330,7 +330,7 @@ public class Link extends WithLinkType implements Hideable, Removeable { return false; } - public boolean contains(EntityImp entity) { + public boolean contains(Entity entity) { if (isSame(getEntity1(), entity)) return true; if (isSame(getEntity2(), entity)) @@ -339,11 +339,11 @@ public class Link extends WithLinkType implements Hideable, Removeable { return false; } - static private boolean isSame(EntityImp a, EntityImp b) { + static private boolean isSame(Entity a, Entity b) { return a == b; } - public EntityImp getOther(EntityImp entity) { + public Entity getOther(Entity entity) { if (isSame(getEntity1(), entity)) return getEntity2(); @@ -492,10 +492,10 @@ public class Link extends WithLinkType implements Hideable, Removeable { this.port1 = port1; this.port2 = port2; if (port1 != null) - ((EntityImp) cl1).addPortShortName(port1); + ((Entity) cl1).addPortShortName(port1); if (port2 != null) - ((EntityImp) cl2).addPortShortName(port2); + ((Entity) cl2).addPortShortName(port2); } diff --git a/src/net/sourceforge/plantuml/cucadiagram/Magma.java b/src/net/sourceforge/plantuml/cucadiagram/Magma.java index abab0a4be..c0b7e940d 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/Magma.java +++ b/src/net/sourceforge/plantuml/cucadiagram/Magma.java @@ -38,36 +38,36 @@ package net.sourceforge.plantuml.cucadiagram; import java.util.List; import net.sourceforge.plantuml.baraye.CucaDiagram; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; public class Magma { private final CucaDiagram diagram; - private final List standalones; + private final List standalones; private final LinkType linkType = new LinkType(LinkDecor.NONE, LinkDecor.NONE).getInvisible(); - public Magma(CucaDiagram system, List standalones) { + public Magma(CucaDiagram system, List standalones) { this.diagram = system; this.standalones = standalones; } public void putInSquare() { - final SquareLinker linker = new SquareLinker() { - public void topDown(EntityImp top, EntityImp down) { + final SquareLinker linker = new SquareLinker() { + public void topDown(Entity top, Entity down) { diagram.addLink(new Link(diagram.getEntityFactory(), diagram.getSkinParam().getCurrentStyleBuilder(), top, down, linkType, LinkArg.noDisplay(2))); } - public void leftRight(EntityImp left, EntityImp right) { + public void leftRight(Entity left, Entity right) { diagram.addLink(new Link(diagram.getEntityFactory(), diagram.getSkinParam().getCurrentStyleBuilder(), left, right, linkType, LinkArg.noDisplay(1))); } }; - new SquareMaker().putInSquare(standalones, linker); + new SquareMaker().putInSquare(standalones, linker); } - public EntityImp getContainer() { - final EntityImp parent = standalones.get(0).getParentContainer(); + public Entity getContainer() { + final Entity parent = standalones.get(0).getParentContainer(); if (parent == null) return null; @@ -75,27 +75,27 @@ public class Magma { } public boolean isComplete() { - final EntityImp parent = getContainer(); + final Entity parent = getContainer(); if (parent == null) return false; - return parent.size() == standalones.size(); + return parent.countChildren() == standalones.size(); } private int squareSize() { return SquareMaker.computeBranch(standalones.size()); } - private EntityImp getTopLeft() { + private Entity getTopLeft() { return standalones.get(0); } - private EntityImp getBottomLeft() { + private Entity getBottomLeft() { int result = SquareMaker.getBottomLeft(standalones.size()); return standalones.get(result); } - private EntityImp getTopRight() { + private Entity getTopRight() { final int s = squareSize(); return standalones.get(s - 1); } diff --git a/src/net/sourceforge/plantuml/cucadiagram/MagmaList.java b/src/net/sourceforge/plantuml/cucadiagram/MagmaList.java index 6d9ced036..9440b3b5a 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/MagmaList.java +++ b/src/net/sourceforge/plantuml/cucadiagram/MagmaList.java @@ -38,7 +38,7 @@ package net.sourceforge.plantuml.cucadiagram; import java.util.ArrayList; import java.util.List; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; public class MagmaList { @@ -48,7 +48,7 @@ public class MagmaList { all.add(magma); } - public MagmaList getMagmas(EntityImp group) { + public MagmaList getMagmas(Entity group) { final MagmaList result = new MagmaList(); for (Magma m : all) { if (m.getContainer() == group) { diff --git a/src/net/sourceforge/plantuml/cucadiagram/MethodsOrFieldsArea.java b/src/net/sourceforge/plantuml/cucadiagram/MethodsOrFieldsArea.java index acdabdcf4..a50d504c8 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/MethodsOrFieldsArea.java +++ b/src/net/sourceforge/plantuml/cucadiagram/MethodsOrFieldsArea.java @@ -47,7 +47,7 @@ import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XRectangle2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.InnerStrategy; @@ -88,14 +88,14 @@ public class MethodsOrFieldsArea extends AbstractTextBlock implements TextBlock, private final HorizontalAlignment align; private final List embeddeds = new ArrayList<>(); - private final EntityImp leaf; + private final Entity leaf; private final Style style; - public MethodsOrFieldsArea(Display members, ISkinParam skinParam, EntityImp leaf, Style style) { + public MethodsOrFieldsArea(Display members, ISkinParam skinParam, Entity leaf, Style style) { this(members, skinParam, HorizontalAlignment.LEFT, leaf, style); } - public MethodsOrFieldsArea(Display members, ISkinParam skinParam, HorizontalAlignment align, EntityImp leaf, + public MethodsOrFieldsArea(Display members, ISkinParam skinParam, HorizontalAlignment align, Entity leaf, Style style) { this.style = style; this.leaf = leaf; diff --git a/src/net/sourceforge/plantuml/cucadiagram/PortionShower.java b/src/net/sourceforge/plantuml/cucadiagram/PortionShower.java index 398f66a99..4bc32290d 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/PortionShower.java +++ b/src/net/sourceforge/plantuml/cucadiagram/PortionShower.java @@ -35,9 +35,9 @@ */ package net.sourceforge.plantuml.cucadiagram; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; public interface PortionShower { - boolean showPortion(EntityPortion portion, EntityImp entity); + boolean showPortion(EntityPortion portion, Entity entity); } diff --git a/src/net/sourceforge/plantuml/cucadiagram/dot/AbstractGraphviz.java b/src/net/sourceforge/plantuml/cucadiagram/dot/AbstractGraphviz.java index 7ac9f561a..a6b7f1225 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/dot/AbstractGraphviz.java +++ b/src/net/sourceforge/plantuml/cucadiagram/dot/AbstractGraphviz.java @@ -49,7 +49,7 @@ import net.sourceforge.plantuml.security.SFile; import net.sourceforge.plantuml.utils.Log; abstract class AbstractGraphviz implements Graphviz { - // ::remove file when WASM + // ::remove file when CORE private final File dotExe; private final String dotString; diff --git a/src/net/sourceforge/plantuml/cucadiagram/dot/CucaDiagramSimplifierActivity.java b/src/net/sourceforge/plantuml/cucadiagram/dot/CucaDiagramSimplifierActivity.java index 37aad0c0d..b1fbbc7fb 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/dot/CucaDiagramSimplifierActivity.java +++ b/src/net/sourceforge/plantuml/cucadiagram/dot/CucaDiagramSimplifierActivity.java @@ -40,7 +40,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.ICucaDiagram; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.klimt.font.StringBounder; @@ -59,8 +59,8 @@ public final class CucaDiagramSimplifierActivity { boolean changed; do { changed = false; - final Collection groups = new ArrayList<>(diagram.getGroups(false)); - for (EntityImp g : groups) { + final Collection groups = new ArrayList<>(diagram.getEntityFactory().groups()); + for (Entity g : groups) { if (diagram.isAutarkic(g)) { // final EntityType type; // if (g.zgetGroupType() == GroupType.INNER_ACTIVITY) { @@ -80,13 +80,14 @@ public final class CucaDiagramSimplifierActivity { } while (changed); } - // private void computeImageGroup(EntityMutable g, EntityMutable proxy, List dotStrings) throws IOException, + // private void computeImageGroup(EntityMutable g, EntityMutable proxy, + // List dotStrings) throws IOException, // InterruptedException { // final GroupPngMakerActivity maker = new GroupPngMakerActivity(diagram, g); // proxy.setSvekImage(maker.getImage()); // } - private IEntityImage computeImage(EntityImp g) throws IOException, InterruptedException { + private IEntityImage computeImage(Entity g) throws IOException, InterruptedException { final GroupPngMakerActivity maker = new GroupPngMakerActivity(diagram, g, stringBounder); return maker.getImage(); } diff --git a/src/net/sourceforge/plantuml/cucadiagram/dot/CucaDiagramSimplifierState.java b/src/net/sourceforge/plantuml/cucadiagram/dot/CucaDiagramSimplifierState.java index d14ce05e4..b53dc692b 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/dot/CucaDiagramSimplifierState.java +++ b/src/net/sourceforge/plantuml/cucadiagram/dot/CucaDiagramSimplifierState.java @@ -41,7 +41,7 @@ import java.util.Collection; import java.util.LinkedHashSet; import java.util.List; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.GroupType; import net.sourceforge.plantuml.cucadiagram.ICucaDiagram; import net.sourceforge.plantuml.cucadiagram.LeafType; @@ -61,8 +61,8 @@ public final class CucaDiagramSimplifierState { boolean changed; do { changed = false; - final Collection groups = getOrdered(diagram.getRootGroup()); - for (EntityImp g : groups) + final Collection groups = getOrdered(diagram.getRootGroup()); + for (Entity g : groups) if (diagram.isAutarkic(g)) { final IEntityImage img = computeImage(g); g.overrideImage(img, g.getGroupType() == GroupType.CONCURRENT_STATE ? LeafType.STATE_CONCURRENT @@ -74,8 +74,8 @@ public final class CucaDiagramSimplifierState { } while (changed); } - private Collection getOrdered(EntityImp root) { - final Collection ordered = new LinkedHashSet<>(); + private Collection getOrdered(Entity root) { + final Collection ordered = new LinkedHashSet<>(); ordered.add(root); int size = 1; while (true) { @@ -85,30 +85,30 @@ public final class CucaDiagramSimplifierState { break; } - final List result = new ArrayList<>(); - for (EntityImp g : ordered) - if (g.instanceofGroupRoot() == false) + final List result = new ArrayList<>(); + for (Entity g : ordered) + if (g.isRoot() == false) result.add(0, g); return result; } - private void addOneLevel(Collection currents) { - for (EntityImp g : new ArrayList<>(currents)) - for (EntityImp child : reverse(g.getChildren())) + private void addOneLevel(Collection currents) { + for (Entity g : new ArrayList<>(currents)) + for (Entity child : reverse(g.groups())) currents.add(child); } - private List reverse(Collection source) { - final List result = new ArrayList<>(); - for (EntityImp g : source) + private List reverse(Collection source) { + final List result = new ArrayList<>(); + for (Entity g : source) result.add(0, g); return result; } - private IEntityImage computeImage(EntityImp g) throws IOException, InterruptedException { + private IEntityImage computeImage(Entity g) throws IOException, InterruptedException { final GroupPngMakerState maker = new GroupPngMakerState(diagram, g, stringBounder); return maker.getImage(); } diff --git a/src/net/sourceforge/plantuml/cucadiagram/dot/CucaDiagramTxtMaker.java b/src/net/sourceforge/plantuml/cucadiagram/dot/CucaDiagramTxtMaker.java index f2714cea6..c8d5148a9 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/dot/CucaDiagramTxtMaker.java +++ b/src/net/sourceforge/plantuml/cucadiagram/dot/CucaDiagramTxtMaker.java @@ -51,7 +51,7 @@ import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.asciiart.BasicCharArea; import net.sourceforge.plantuml.awt.geom.XCubicCurve2D; import net.sourceforge.plantuml.awt.geom.XPoint2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.EntityPortion; import net.sourceforge.plantuml.cucadiagram.ICucaDiagram; @@ -69,7 +69,7 @@ import net.sourceforge.plantuml.text.BackSlash; import net.sourceforge.plantuml.ugraphic.txt.UGraphicTxt; public final class CucaDiagramTxtMaker { - // ::remove file when WASM + // ::remove file when CORE // private final CucaDiagram diagram; private final FileFormat fileFormat; @@ -84,7 +84,7 @@ public final class CucaDiagramTxtMaker { return 10; } - private boolean showMember(EntityImp entity) { + private boolean showMember(Entity entity) { final boolean showMethods = portionShower.showPortion(EntityPortion.METHOD, entity); final boolean showFields = portionShower.showPortion(EntityPortion.FIELD, entity); return showMethods || showFields; @@ -97,9 +97,9 @@ public final class CucaDiagramTxtMaker { final Cluster root = new Cluster(null, 0, 0); int uid = 0; - final Map blocks = new HashMap(); + final Map blocks = new HashMap(); - for (EntityImp ent : diagram.getLeafsvalues()) { + for (Entity ent : diagram.getEntityFactory().leafs()) { // printClass(ent); // ug.translate(0, getHeight(ent) + 1); final double width = getWidth(ent) * getXPixelPerChar(); @@ -124,7 +124,7 @@ public final class CucaDiagramTxtMaker { } drawDotPath(p.getDotPath(), globalUg.getCharArea(), getXPixelPerChar(), getYPixelPerChar()); } - for (EntityImp ent : diagram.getLeafsvalues()) { + for (Entity ent : diagram.getEntityFactory().leafs()) { final Block b = blocks.get(ent); final XPoint2D p = b.getPosition(); printClass(ent, (UGraphicTxt) globalUg @@ -144,7 +144,7 @@ public final class CucaDiagramTxtMaker { } - private void printClass(final EntityImp ent, UGraphicTxt ug) { + private void printClass(final Entity ent, UGraphicTxt ug) { final int w = getWidth(ent); final int h = getHeight(ent); ug.getCharArea().drawBoxSimple(0, 0, w, h); @@ -182,7 +182,7 @@ public final class CucaDiagramTxtMaker { return Collections.singletonList(suggestedFile); } - private int getHeight(EntityImp entity) { + private int getHeight(Entity entity) { int result = StringUtils.getHeight(entity.getDisplay()); if (showMember(entity)) { for (CharSequence att : entity.getBodier().getRawBody()) { @@ -200,7 +200,7 @@ public final class CucaDiagramTxtMaker { return result + 3; } - private int getWidth(EntityImp entity) { + private int getWidth(Entity entity) { int result = StringUtils.getWcWidth(entity.getDisplay()); if (showMember(entity)) { for (CharSequence att : entity.getBodier().getRawBody()) { diff --git a/src/net/sourceforge/plantuml/cucadiagram/dot/DebugTrace.java b/src/net/sourceforge/plantuml/cucadiagram/dot/DebugTrace.java index ceea6b325..b49549c1d 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/dot/DebugTrace.java +++ b/src/net/sourceforge/plantuml/cucadiagram/dot/DebugTrace.java @@ -41,7 +41,7 @@ import java.io.PrintWriter; import net.sourceforge.plantuml.security.SFile; public class DebugTrace { - // ::remove file when WASM + // ::remove file when CORE private static final SFile out = new SFile("debug" + System.currentTimeMillis() + ".txt"); diff --git a/src/net/sourceforge/plantuml/cucadiagram/dot/DotData.java b/src/net/sourceforge/plantuml/cucadiagram/dot/DotData.java index f038b84d2..c81e1704f 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/dot/DotData.java +++ b/src/net/sourceforge/plantuml/cucadiagram/dot/DotData.java @@ -47,7 +47,7 @@ import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.Pragma; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.baraye.EntityFactory; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.EntityPortion; import net.sourceforge.plantuml.cucadiagram.GroupHierarchy; import net.sourceforge.plantuml.cucadiagram.Link; @@ -57,12 +57,12 @@ import net.sourceforge.plantuml.svek.DotMode; final public class DotData implements PortionShower { final private List links; - final private Collection leafs; + final private Collection leafs; final private UmlDiagramType umlDiagramType; final private ISkinParam skinParam; // final private Rankdir rankdir; final private GroupHierarchy groupHierarchy; - final private EntityImp topParent; + final private Entity topParent; final private PortionShower portionShower; final private boolean isHideEmptyDescriptionForState; final private DotMode dotMode; @@ -75,7 +75,7 @@ final public class DotData implements PortionShower { return entityFactory; } - public DotData(EntityImp topParent, List links, Collection leafs, UmlDiagramType umlDiagramType, + public DotData(Entity topParent, List links, Collection leafs, UmlDiagramType umlDiagramType, ISkinParam skinParam, GroupHierarchy groupHierarchy, PortionShower portionShower, EntityFactory entityFactory, boolean isHideEmptyDescriptionForState, DotMode dotMode, String namespaceSeparator, Pragma pragma) { @@ -94,11 +94,11 @@ final public class DotData implements PortionShower { this.entityFactory = entityFactory; } - public DotData(EntityImp topParent, List links, Collection leafs, UmlDiagramType umlDiagramType, + public DotData(Entity topParent, List links, Collection leafs, UmlDiagramType umlDiagramType, ISkinParam skinParam, GroupHierarchy groupHierarchy, EntityFactory entityFactory, boolean isHideEmptyDescriptionForState, DotMode dotMode, String namespaceSeparator, Pragma pragma) { this(topParent, links, leafs, umlDiagramType, skinParam, groupHierarchy, new PortionShower() { - public boolean showPortion(EntityPortion portion, EntityImp entity) { + public boolean showPortion(EntityPortion portion, Entity entity) { return true; } }, entityFactory, isHideEmptyDescriptionForState, dotMode, namespaceSeparator, pragma); @@ -120,23 +120,23 @@ final public class DotData implements PortionShower { return links; } - public Collection getLeafs() { + public Collection getLeafs() { return leafs; } - public final EntityImp getTopParent() { + public final Entity getTopParent() { return topParent; } - public boolean isEmpty(EntityImp g) { + public boolean isEmpty(Entity g) { return groupHierarchy.isEmpty(g); } - public boolean showPortion(EntityPortion portion, EntityImp entity) { + public boolean showPortion(EntityPortion portion, Entity entity) { return portionShower.showPortion(portion, entity); } - public EntityImp getRootGroup() { + public Entity getRootGroup() { return entityFactory.getRootGroup(); } @@ -186,7 +186,7 @@ final public class DotData implements PortionShower { some.add(link); } } - final EntityImp leaf = getLeaf(key); + final Entity leaf = getLeaf(key); final Neighborhood neighborhood = new Neighborhood(leaf, some, getLinksOfThisLeaf(leaf)); leaf.setNeighborhood(neighborhood); } @@ -203,7 +203,7 @@ final public class DotData implements PortionShower { } } - private List getLinksOfThisLeaf(EntityImp leaf) { + private List getLinksOfThisLeaf(Entity leaf) { final List result = new ArrayList<>(); for (Link link : links) { if (link.contains(leaf)) { @@ -213,8 +213,8 @@ final public class DotData implements PortionShower { return result; } - private EntityImp getLeaf(String key) { - for (EntityImp entity : leafs) { + private Entity getLeaf(String key) { + for (Entity entity : leafs) { if (entity.getUid().equals(key)) { return entity; } diff --git a/src/net/sourceforge/plantuml/cucadiagram/dot/ExeState.java b/src/net/sourceforge/plantuml/cucadiagram/dot/ExeState.java index bd6c4f806..414340c1e 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/dot/ExeState.java +++ b/src/net/sourceforge/plantuml/cucadiagram/dot/ExeState.java @@ -38,7 +38,7 @@ package net.sourceforge.plantuml.cucadiagram.dot; import java.io.File; public enum ExeState { - // ::remove file when WASM + // ::remove file when CORE NULL_UNDEFINED, OK, DOES_NOT_EXIST, IS_A_DIRECTORY, NOT_A_FILE, CANNOT_BE_READ; diff --git a/src/net/sourceforge/plantuml/cucadiagram/dot/Graphviz.java b/src/net/sourceforge/plantuml/cucadiagram/dot/Graphviz.java index 40b84eb50..c48939e84 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/dot/Graphviz.java +++ b/src/net/sourceforge/plantuml/cucadiagram/dot/Graphviz.java @@ -39,7 +39,7 @@ import java.io.File; import java.io.OutputStream; public interface Graphviz { - // ::remove file when WASM + // ::remove file when CORE public ProcessState createFile3(OutputStream os); diff --git a/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizLinux.java b/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizLinux.java index 7ba1cfe57..76e4eb705 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizLinux.java +++ b/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizLinux.java @@ -40,7 +40,7 @@ import java.io.File; import net.sourceforge.plantuml.ISkinParam; class GraphvizLinux extends AbstractGraphviz { - // ::remove file when WASM + // ::remove file when CORE GraphvizLinux(ISkinParam skinParam, String dotString, String... type) { super(skinParam, dotString, type); diff --git a/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizUtils.java b/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizUtils.java index f74ef98ea..45f020c27 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizUtils.java +++ b/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizUtils.java @@ -53,7 +53,7 @@ import net.sourceforge.plantuml.vizjs.GraphvizJs; import net.sourceforge.plantuml.vizjs.VizJsEngine; public class GraphvizUtils { - // :: remove file when WASM + // :: remove file when CORE public static final String VIZJS = "vizjs"; private static int DOT_VERSION_LIMIT = 226; diff --git a/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizVersion.java b/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizVersion.java index 06ee93e20..9a0371784 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizVersion.java +++ b/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizVersion.java @@ -36,7 +36,7 @@ package net.sourceforge.plantuml.cucadiagram.dot; public interface GraphvizVersion { - // ::comment when WASM + // ::comment when CORE public boolean useShieldForQuantifier(); public boolean useProtectionWhenThereALinkFromOrToGroup(); diff --git a/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizVersionFinder.java b/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizVersionFinder.java index cf832e840..899f59ed7 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizVersionFinder.java +++ b/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizVersionFinder.java @@ -42,7 +42,7 @@ import java.util.regex.Pattern; import net.sourceforge.plantuml.StringUtils; public class GraphvizVersionFinder { - // ::remove file when WASM + // ::remove file when CORE final private File dotExe; final public static GraphvizVersion DEFAULT = new GraphvizVersion() { diff --git a/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizVersions.java b/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizVersions.java index 6cfbf155b..de07fd66d 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizVersions.java +++ b/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizVersions.java @@ -40,7 +40,7 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; public class GraphvizVersions { - // ::remove file when WASM + // ::remove file when CORE private final static GraphvizVersions singleton = new GraphvizVersions(); diff --git a/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizWindowsLite.java b/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizWindowsLite.java index ca7e993c6..abc2ceddc 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizWindowsLite.java +++ b/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizWindowsLite.java @@ -41,7 +41,7 @@ import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.windowsdot.WindowsDotArchive; class GraphvizWindowsLite extends AbstractGraphviz { - // ::remove file when WASM + // ::remove file when CORE static private File specificDotExe; diff --git a/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizWindowsOld.java b/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizWindowsOld.java index d659e36db..dda3c6179 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizWindowsOld.java +++ b/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizWindowsOld.java @@ -47,7 +47,7 @@ import net.sourceforge.plantuml.log.Logme; import net.sourceforge.plantuml.windowsdot.WindowsDotArchive; class GraphvizWindowsOld extends AbstractGraphviz { - // ::remove file when WASM + // ::remove file when CORE static private File specificDotExe; diff --git a/src/net/sourceforge/plantuml/cucadiagram/dot/Neighborhood.java b/src/net/sourceforge/plantuml/cucadiagram/dot/Neighborhood.java index 37c6aafbf..773b18f1f 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/dot/Neighborhood.java +++ b/src/net/sourceforge/plantuml/cucadiagram/dot/Neighborhood.java @@ -43,7 +43,7 @@ import java.util.Set; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XPoint2D; import net.sourceforge.plantuml.awt.geom.XRectangle2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.klimt.ULine; import net.sourceforge.plantuml.klimt.UPolygon; @@ -54,11 +54,11 @@ import net.sourceforge.plantuml.ugraphic.UGraphic; public class Neighborhood { - private final EntityImp leaf; + private final Entity leaf; private final List sametailLinks; private final List allButSametails; - public Neighborhood(EntityImp leaf, List sametailLinks, List all) { + public Neighborhood(Entity leaf, List sametailLinks, List all) { this.leaf = leaf; this.sametailLinks = sametailLinks; this.allButSametails = new ArrayList<>(all); diff --git a/src/net/sourceforge/plantuml/cucadiagram/dot/ProcessRunner.java b/src/net/sourceforge/plantuml/cucadiagram/dot/ProcessRunner.java index c29978f6c..db667fb58 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/dot/ProcessRunner.java +++ b/src/net/sourceforge/plantuml/cucadiagram/dot/ProcessRunner.java @@ -48,7 +48,7 @@ import net.sourceforge.plantuml.log.Logme; import net.sourceforge.plantuml.security.SFile; public class ProcessRunner { - // ::remove file when WASM + // ::remove file when CORE private final String[] cmd; diff --git a/src/net/sourceforge/plantuml/cucadiagram/dot/ProcessState.java b/src/net/sourceforge/plantuml/cucadiagram/dot/ProcessState.java index ecc38e45d..21271a0ad 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/dot/ProcessState.java +++ b/src/net/sourceforge/plantuml/cucadiagram/dot/ProcessState.java @@ -38,7 +38,7 @@ package net.sourceforge.plantuml.cucadiagram.dot; import java.io.IOException; public class ProcessState { - // ::remove file when WASM + // ::remove file when CORE private final String name; private final IOException cause; diff --git a/src/net/sourceforge/plantuml/cucadiagram/entity/IEntityFactory.java b/src/net/sourceforge/plantuml/cucadiagram/entity/IEntityFactory.java index 80d269b5c..6306209ca 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/entity/IEntityFactory.java +++ b/src/net/sourceforge/plantuml/cucadiagram/entity/IEntityFactory.java @@ -37,13 +37,13 @@ package net.sourceforge.plantuml.cucadiagram.entity; import java.util.Collection; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.Stereotype; public interface IEntityFactory { public boolean isRemoved(Stereotype stereotype); - public Collection leafs(); + public Collection leafs(); } diff --git a/src/net/sourceforge/plantuml/dedication/BlumBlumShub.java b/src/net/sourceforge/plantuml/dedication/BlumBlumShub.java index 7646f898e..1abc93c85 100644 --- a/src/net/sourceforge/plantuml/dedication/BlumBlumShub.java +++ b/src/net/sourceforge/plantuml/dedication/BlumBlumShub.java @@ -3,7 +3,7 @@ package net.sourceforge.plantuml.dedication; import java.math.BigInteger; public class BlumBlumShub { - // ::remove folder when WASM + // ::remove folder when CORE private static final BigInteger two = BigInteger.valueOf(2L); diff --git a/src/net/sourceforge/plantuml/definition/PSystemDefinition.java b/src/net/sourceforge/plantuml/definition/PSystemDefinition.java index c66eefea7..345eae24b 100644 --- a/src/net/sourceforge/plantuml/definition/PSystemDefinition.java +++ b/src/net/sourceforge/plantuml/definition/PSystemDefinition.java @@ -53,7 +53,7 @@ import net.sourceforge.plantuml.klimt.geom.HorizontalAlignment; import net.sourceforge.plantuml.ugraphic.UGraphic; public class PSystemDefinition extends PlainDiagram implements UDrawable { - // ::remove folder when WASM + // ::remove folder when CORE private final List lines = new ArrayList<>(); private final String startLine; diff --git a/src/net/sourceforge/plantuml/descdiagram/CommandCreateDomain.java b/src/net/sourceforge/plantuml/descdiagram/CommandCreateDomain.java index a91faa3f2..2c419771e 100644 --- a/src/net/sourceforge/plantuml/descdiagram/CommandCreateDomain.java +++ b/src/net/sourceforge/plantuml/descdiagram/CommandCreateDomain.java @@ -35,8 +35,7 @@ */ package net.sourceforge.plantuml.descdiagram; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.command.GenericRegexProducer; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; @@ -49,6 +48,7 @@ import net.sourceforge.plantuml.graphic.USymbols; import net.sourceforge.plantuml.klimt.color.ColorType; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; import net.sourceforge.plantuml.klimt.font.FontParam; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -108,9 +108,9 @@ public class CommandCreateDomain extends SingleLineCommand2 Display display = Display.getWithNewlines(displayString); final String urlString = arg.get("URL", 0); final String group = arg.get("GROUP", 0); - EntityImp entity; + Entity entity; if (group != null) { - final EntityImp currentGroup = diagram.getCurrentGroup(); + final Entity currentGroup = diagram.getCurrentGroup(); diagram.gotoGroup(quark, display, type); entity = diagram.getCurrentGroup(); } else { diff --git a/src/net/sourceforge/plantuml/descdiagram/DescriptionDiagram.java b/src/net/sourceforge/plantuml/descdiagram/DescriptionDiagram.java index 48f7cf2be..78c408cd6 100644 --- a/src/net/sourceforge/plantuml/descdiagram/DescriptionDiagram.java +++ b/src/net/sourceforge/plantuml/descdiagram/DescriptionDiagram.java @@ -39,7 +39,7 @@ import java.util.Map; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.cucadiagram.LeafType; @@ -52,23 +52,6 @@ public class DescriptionDiagram extends AbstractEntityDiagram { super(source, UmlDiagramType.DESCRIPTION, skinParam); } -// @Override -// public Ident cleanIdent(Ident ident) { -// String codeString = ident.getName(); -// if (codeString.startsWith("[") && codeString.endsWith("]")) { -// return ident.eventuallyRemoveStartingAndEndingDoubleQuote("\"([:"); -// } -// if (codeString.startsWith(":") && codeString.endsWith(":")) { -// return ident.eventuallyRemoveStartingAndEndingDoubleQuote("\"([:"); -// } -// if (codeString.startsWith("()")) { -// codeString = StringUtils.trin(codeString.substring(2)); -// codeString = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(codeString); -// return ident.parent().add(Ident.empty().add(codeString, null)); -// } -// return ident; -// } - @Override public String cleanIdForQuark(String id) { if (id == null) @@ -78,50 +61,8 @@ public class DescriptionDiagram extends AbstractEntityDiagram { return super.cleanIdForQuark(id); } -// @Override -// protected ILeaf getOrCreateLeaf2(Quark ident, Quark code, LeafType type, USymbol symbol) { -// Objects.requireNonNull(ident); -// if (type == null) { -// String codeString = code.getName(); -// if (codeString.startsWith("[") && codeString.endsWith("]")) { -// final USymbol sym = getSkinParam().componentStyle().toUSymbol(); -// final Quark idNewLong = ident.eventuallyRemoveStartingAndEndingDoubleQuote("\"([:"); -// if (idNewLong.getData() != null) -// return (ILeaf) idNewLong.getData(); -// return reallyCreateLeaf(idNewLong, Display.getWithNewlines(idNewLong.getName()), LeafType.DESCRIPTION, -// sym); -// } -// if (codeString.startsWith(":") && codeString.endsWith(":")) { -// final Quark idNewLong = ident.eventuallyRemoveStartingAndEndingDoubleQuote("\"([:"); -// if (idNewLong.getData() != null) -// return (ILeaf) idNewLong.getData(); -// return reallyCreateLeaf(idNewLong, Display.getWithNewlines(idNewLong.getName()), LeafType.DESCRIPTION, -// getSkinParam().actorStyle().toUSymbol()); -// } -// if (codeString.startsWith("()")) { -// codeString = StringUtils.trin(codeString.substring(2)); -// codeString = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(codeString); -// final Quark idNewLong = buildFromName( -// StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(codeString)); -// if (idNewLong.getData() != null) -// return (ILeaf) idNewLong.getData(); -// return reallyCreateLeaf(idNewLong, Display.getWithNewlines(codeString), LeafType.DESCRIPTION, -// USymbols.INTERFACE); -// } -// final String tmp4 = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(code.getName(), "\"([:"); -// final Quark idNewLong = ident.eventuallyRemoveStartingAndEndingDoubleQuote("\"([:"); -// code = buildFromFullPath(tmp4); -// if (idNewLong.getData() != null) -// return (ILeaf) idNewLong.getData(); -// return reallyCreateLeaf(idNewLong, Display.getWithNewlines(tmp4), LeafType.STILL_UNKNOWN, symbol); -// } -// if (ident.getData() != null) -// return (ILeaf) ident.getData(); -// return reallyCreateLeaf(ident, Display.getWithNewlines(code.getName()), type, symbol); -// } - private boolean isUsecase() { - for (EntityImp leaf : getLeafsvalues()) { + for (Entity leaf : getEntityFactory().leafs()) { final LeafType type = leaf.getLeafType(); final USymbol usymbol = leaf.getUSymbol(); if (type == LeafType.USECASE || usymbol == getSkinParam().actorStyle().toUSymbol()) { @@ -136,7 +77,7 @@ public class DescriptionDiagram extends AbstractEntityDiagram { super.makeDiagramReady(); final LeafType defaultType = LeafType.DESCRIPTION; final USymbol defaultSymbol = isUsecase() ? getSkinParam().actorStyle().toUSymbol() : USymbols.INTERFACE; - for (EntityImp leaf : getLeafsvalues()) { + for (Entity leaf : getEntityFactory().leafs()) { if (leaf.getLeafType() == LeafType.STILL_UNKNOWN) { leaf.muteToType(defaultType, defaultSymbol); } diff --git a/src/net/sourceforge/plantuml/descdiagram/EntityImageDesignedDomain.java b/src/net/sourceforge/plantuml/descdiagram/EntityImageDesignedDomain.java index 196e90443..ccfaec016 100644 --- a/src/net/sourceforge/plantuml/descdiagram/EntityImageDesignedDomain.java +++ b/src/net/sourceforge/plantuml/descdiagram/EntityImageDesignedDomain.java @@ -40,7 +40,7 @@ import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.TextBlock; @@ -67,7 +67,7 @@ public class EntityImageDesignedDomain extends AbstractEntityImage { final private TextBlock stereo; final private Url url; - public EntityImageDesignedDomain(EntityImp entity, ISkinParam skinParam) { + public EntityImageDesignedDomain(Entity entity, ISkinParam skinParam) { super(entity, skinParam); final Stereotype stereotype = entity.getStereotype(); this.name = TextBlockUtils.withMargin( diff --git a/src/net/sourceforge/plantuml/descdiagram/EntityImageDomain.java b/src/net/sourceforge/plantuml/descdiagram/EntityImageDomain.java index 9e6873e59..7b0c591d1 100644 --- a/src/net/sourceforge/plantuml/descdiagram/EntityImageDomain.java +++ b/src/net/sourceforge/plantuml/descdiagram/EntityImageDomain.java @@ -40,7 +40,7 @@ import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.TextBlock; @@ -69,7 +69,7 @@ public class EntityImageDomain extends AbstractEntityImage { final private TextBlock stereo; final private Url url; - public EntityImageDomain(EntityImp entity, ISkinParam skinParam, char typeLetter) { + public EntityImageDomain(Entity entity, ISkinParam skinParam, char typeLetter) { super(entity, skinParam); final Stereotype stereotype = entity.getStereotype(); FontConfiguration fc = FontConfiguration.create(getSkinParam(), FontParam.DESIGNED_DOMAIN, stereotype); diff --git a/src/net/sourceforge/plantuml/descdiagram/EntityImageMachine.java b/src/net/sourceforge/plantuml/descdiagram/EntityImageMachine.java index ca1a6fd68..cabeae5c9 100644 --- a/src/net/sourceforge/plantuml/descdiagram/EntityImageMachine.java +++ b/src/net/sourceforge/plantuml/descdiagram/EntityImageMachine.java @@ -40,7 +40,7 @@ import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.TextBlock; @@ -67,7 +67,7 @@ public class EntityImageMachine extends AbstractEntityImage { final private TextBlock stereo; final private Url url; - public EntityImageMachine(EntityImp entity, ISkinParam skinParam) { + public EntityImageMachine(Entity entity, ISkinParam skinParam) { super(entity, skinParam); final Stereotype stereotype = entity.getStereotype(); this.name = TextBlockUtils.withMargin( diff --git a/src/net/sourceforge/plantuml/descdiagram/EntityImageRequirement.java b/src/net/sourceforge/plantuml/descdiagram/EntityImageRequirement.java index 212ea05dd..bdba3dd07 100644 --- a/src/net/sourceforge/plantuml/descdiagram/EntityImageRequirement.java +++ b/src/net/sourceforge/plantuml/descdiagram/EntityImageRequirement.java @@ -40,7 +40,7 @@ import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.creole.Stencil; import net.sourceforge.plantuml.cucadiagram.BodyFactory; import net.sourceforge.plantuml.cucadiagram.Display; @@ -74,7 +74,7 @@ public class EntityImageRequirement extends AbstractEntityImage { final private Url url; - public EntityImageRequirement(EntityImp entity, ISkinParam skinParam) { + public EntityImageRequirement(Entity entity, ISkinParam skinParam) { super(entity, skinParam); final Stereotype stereotype = entity.getStereotype(); diff --git a/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimate.java b/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimate.java index ae8c29b87..bee8f64cb 100644 --- a/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimate.java +++ b/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimate.java @@ -36,8 +36,7 @@ package net.sourceforge.plantuml.descdiagram.command; import net.sourceforge.plantuml.StringUtils; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.cucadiagram.Display; @@ -50,6 +49,7 @@ import net.sourceforge.plantuml.klimt.color.ColorParser; import net.sourceforge.plantuml.klimt.color.ColorType; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; import net.sourceforge.plantuml.klimt.font.FontParam; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -132,7 +132,7 @@ public class CommandArchimate extends SingleLineCommand2 { if (display == null) display = quark.getName(); - EntityImp entity = (EntityImp) quark.getData(); + Entity entity = (Entity) quark.getData(); if (entity == null) entity = diagram.reallyCreateLeaf(quark, Display.getWithNewlines(display), LeafType.DESCRIPTION, USymbols.ARCHIMATE); diff --git a/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimateMultilines.java b/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimateMultilines.java index 54f517c14..9766b72bf 100644 --- a/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimateMultilines.java +++ b/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimateMultilines.java @@ -35,8 +35,7 @@ */ package net.sourceforge.plantuml.descdiagram.command; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.CommandMultilines2; @@ -51,6 +50,7 @@ import net.sourceforge.plantuml.klimt.color.ColorParser; import net.sourceforge.plantuml.klimt.color.ColorType; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; import net.sourceforge.plantuml.klimt.font.FontParam; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -114,7 +114,7 @@ public class CommandArchimateMultilines extends CommandMultilines2 { final Labels labels = new Labels(arg); - final EntityImp cl1; - final EntityImp cl2; + final Entity cl1; + final Entity cl2; if (diagram.isGroup(ent1clean) && diagram.isGroup(ent2clean)) { cl1 = diagram.getGroup(ent1clean); cl2 = diagram.getGroup(ent2clean); @@ -297,12 +297,12 @@ public class CommandLinkElement extends SingleLineCommand2 { // return s; // } - private EntityImp getDummy(DescriptionDiagram diagram, String ident) { + private Entity getDummy(DescriptionDiagram diagram, String ident) { if (ident.startsWith("()")) { ident = diagram.cleanIdForQuark(ident); final Quark quark = diagram.quarkInContext(ident, false); if (quark.getData() != null) - return (EntityImp) quark.getData(); + return (Entity) quark.getData(); return diagram.reallyCreateLeaf(quark, Display.getWithNewlines(quark.getName()), LeafType.DESCRIPTION, USymbols.INTERFACE); } @@ -312,22 +312,22 @@ public class CommandLinkElement extends SingleLineCommand2 { final Quark quark = diagram.quarkInContext(ident, false); if (diagram.isGroup(quark)) - return (EntityImp) quark.getData(); + return (Entity) quark.getData(); if (quark.getData() != null) - return (EntityImp) quark.getData(); + return (Entity) quark.getData(); final Display display = Display.getWithNewlines(quark.getName()); if (codeChar == '(') { - return (EntityImp) diagram.reallyCreateLeaf(quark, display, LeafType.USECASE, USymbols.USECASE); + return (Entity) diagram.reallyCreateLeaf(quark, display, LeafType.USECASE, USymbols.USECASE); } else if (codeChar == ':') { - return (EntityImp) diagram.reallyCreateLeaf(quark, display, LeafType.DESCRIPTION, + return (Entity) diagram.reallyCreateLeaf(quark, display, LeafType.DESCRIPTION, diagram.getSkinParam().actorStyle().toUSymbol()); } else if (codeChar == '[') { final USymbol sym = diagram.getSkinParam().componentStyle().toUSymbol(); - return (EntityImp) diagram.reallyCreateLeaf(quark, display, LeafType.DESCRIPTION, sym); + return (Entity) diagram.reallyCreateLeaf(quark, display, LeafType.DESCRIPTION, sym); } - return (EntityImp) diagram.reallyCreateLeaf(quark, display, LeafType.STILL_UNKNOWN, null); + return (Entity) diagram.reallyCreateLeaf(quark, display, LeafType.STILL_UNKNOWN, null); } } diff --git a/src/net/sourceforge/plantuml/descdiagram/command/CommandPackageWithUSymbol.java b/src/net/sourceforge/plantuml/descdiagram/command/CommandPackageWithUSymbol.java index f3783eb83..e0985a1ea 100644 --- a/src/net/sourceforge/plantuml/descdiagram/command/CommandPackageWithUSymbol.java +++ b/src/net/sourceforge/plantuml/descdiagram/command/CommandPackageWithUSymbol.java @@ -36,8 +36,7 @@ package net.sourceforge.plantuml.descdiagram.command; import net.sourceforge.plantuml.StringUtils; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram; import net.sourceforge.plantuml.classdiagram.command.CommandCreateClassMultilines; import net.sourceforge.plantuml.command.CommandExecutionResult; @@ -51,6 +50,7 @@ import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.klimt.color.ColorParser; import net.sourceforge.plantuml.klimt.color.ColorType; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -155,7 +155,7 @@ public class CommandPackageWithUSymbol extends SingleLineCommand2 getDonors() throws IOException { final List lines = new ArrayList<>(); - // ::comment when WASM + // ::comment when CORE final Transcoder t = TranscoderImpl.utf8(new AsciiEncoder(), new StringCompressorNone(), new CompressionBrotli()); try { diff --git a/src/net/sourceforge/plantuml/donors/PSystemSkinparameterList.java b/src/net/sourceforge/plantuml/donors/PSystemSkinparameterList.java index 4feeea381..d63951de1 100644 --- a/src/net/sourceforge/plantuml/donors/PSystemSkinparameterList.java +++ b/src/net/sourceforge/plantuml/donors/PSystemSkinparameterList.java @@ -53,7 +53,7 @@ import net.sourceforge.plantuml.klimt.font.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; public class PSystemSkinparameterList extends PlainDiagram { - // ::remove file when WASM + // ::remove file when CORE public PSystemSkinparameterList(UmlSource source) { super(source); diff --git a/src/net/sourceforge/plantuml/donors/PSystemSkinparameterListFactory.java b/src/net/sourceforge/plantuml/donors/PSystemSkinparameterListFactory.java index 7ae0955ac..8a24caa19 100644 --- a/src/net/sourceforge/plantuml/donors/PSystemSkinparameterListFactory.java +++ b/src/net/sourceforge/plantuml/donors/PSystemSkinparameterListFactory.java @@ -40,7 +40,7 @@ import net.sourceforge.plantuml.command.PSystemSingleLineFactory; import net.sourceforge.plantuml.core.UmlSource; public class PSystemSkinparameterListFactory extends PSystemSingleLineFactory { - // ::remove file when WASM + // ::remove file when CORE @Override protected AbstractPSystem executeLine(UmlSource source, String line) { diff --git a/src/net/sourceforge/plantuml/eggs/EggUtils.java b/src/net/sourceforge/plantuml/eggs/EggUtils.java index e75d9b840..3296511e0 100644 --- a/src/net/sourceforge/plantuml/eggs/EggUtils.java +++ b/src/net/sourceforge/plantuml/eggs/EggUtils.java @@ -40,7 +40,7 @@ import java.math.BigInteger; import net.sourceforge.plantuml.StringUtils; public class EggUtils { - // ::remove file when WASM + // ::remove file when CORE public static String fromByteArrays(byte data[]) { final StringBuilder sb = new StringBuilder(); diff --git a/src/net/sourceforge/plantuml/eggs/GraphicsPath.java b/src/net/sourceforge/plantuml/eggs/GraphicsPath.java index fbc2b6752..101c6eea3 100644 --- a/src/net/sourceforge/plantuml/eggs/GraphicsPath.java +++ b/src/net/sourceforge/plantuml/eggs/GraphicsPath.java @@ -54,7 +54,7 @@ import net.sourceforge.plantuml.png.PngIO; import net.sourceforge.plantuml.ugraphic.g2d.UGraphicG2d; public class GraphicsPath { - // ::remove file when WASM + // ::remove file when CORE private final String path; private final ColorMapper colorMapper; diff --git a/src/net/sourceforge/plantuml/eggs/PSystemAppleTwo.java b/src/net/sourceforge/plantuml/eggs/PSystemAppleTwo.java index a99baf966..90b043dea 100644 --- a/src/net/sourceforge/plantuml/eggs/PSystemAppleTwo.java +++ b/src/net/sourceforge/plantuml/eggs/PSystemAppleTwo.java @@ -44,7 +44,7 @@ import net.sourceforge.plantuml.graphic.GraphicPosition; import net.sourceforge.plantuml.version.PSystemVersion; public class PSystemAppleTwo extends PlainStringsDiagram { - // ::remove file when WASM + // ::remove file when CORE public PSystemAppleTwo(UmlSource source) throws IOException { super(source); diff --git a/src/net/sourceforge/plantuml/eggs/PSystemAppleTwoFactory.java b/src/net/sourceforge/plantuml/eggs/PSystemAppleTwoFactory.java index 220d15f28..b57dc1566 100644 --- a/src/net/sourceforge/plantuml/eggs/PSystemAppleTwoFactory.java +++ b/src/net/sourceforge/plantuml/eggs/PSystemAppleTwoFactory.java @@ -44,7 +44,7 @@ import net.sourceforge.plantuml.log.Logme; import net.sourceforge.plantuml.utils.Log; public class PSystemAppleTwoFactory extends PSystemSingleLineFactory { - // ::remove file when WASM + // ::remove file when CORE @Override protected AbstractPSystem executeLine(UmlSource source, String line) { diff --git a/src/net/sourceforge/plantuml/eggs/PSystemEgg.java b/src/net/sourceforge/plantuml/eggs/PSystemEgg.java index 7cd542393..f9b65f200 100644 --- a/src/net/sourceforge/plantuml/eggs/PSystemEgg.java +++ b/src/net/sourceforge/plantuml/eggs/PSystemEgg.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.UmlSource; public class PSystemEgg extends PlainStringsDiagram { - // ::remove file when WASM + // ::remove file when CORE PSystemEgg(UmlSource source, String sentence) { super(source); diff --git a/src/net/sourceforge/plantuml/eggs/PSystemEggFactory.java b/src/net/sourceforge/plantuml/eggs/PSystemEggFactory.java index 1bf4ce7c2..21b5846d7 100644 --- a/src/net/sourceforge/plantuml/eggs/PSystemEggFactory.java +++ b/src/net/sourceforge/plantuml/eggs/PSystemEggFactory.java @@ -44,7 +44,7 @@ import net.sourceforge.plantuml.command.PSystemSingleLineFactory; import net.sourceforge.plantuml.core.UmlSource; public class PSystemEggFactory extends PSystemSingleLineFactory { - // ::remove file when WASM + // ::remove file when CORE final static private List all = Arrays .asList(EggUtils diff --git a/src/net/sourceforge/plantuml/eggs/PSystemLost.java b/src/net/sourceforge/plantuml/eggs/PSystemLost.java index cfd9fccca..8b78c71cc 100644 --- a/src/net/sourceforge/plantuml/eggs/PSystemLost.java +++ b/src/net/sourceforge/plantuml/eggs/PSystemLost.java @@ -40,7 +40,7 @@ import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.UmlSource; public class PSystemLost extends PlainStringsDiagram { - // ::remove file when WASM + // ::remove file when CORE public PSystemLost(UmlSource source) { super(source); diff --git a/src/net/sourceforge/plantuml/eggs/PSystemLostFactory.java b/src/net/sourceforge/plantuml/eggs/PSystemLostFactory.java index a644e8b44..cab5e832a 100644 --- a/src/net/sourceforge/plantuml/eggs/PSystemLostFactory.java +++ b/src/net/sourceforge/plantuml/eggs/PSystemLostFactory.java @@ -40,7 +40,7 @@ import net.sourceforge.plantuml.command.PSystemSingleLineFactory; import net.sourceforge.plantuml.core.UmlSource; public class PSystemLostFactory extends PSystemSingleLineFactory { - // ::remove file when WASM + // ::remove file when CORE @Override protected AbstractPSystem executeLine(UmlSource source, String line) { diff --git a/src/net/sourceforge/plantuml/eggs/PSystemPath.java b/src/net/sourceforge/plantuml/eggs/PSystemPath.java index 7021e9d3b..5703923ad 100644 --- a/src/net/sourceforge/plantuml/eggs/PSystemPath.java +++ b/src/net/sourceforge/plantuml/eggs/PSystemPath.java @@ -46,7 +46,7 @@ import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.klimt.color.ColorMapper; public class PSystemPath extends AbstractPSystem { - // ::remove file when WASM + // ::remove file when CORE private final GraphicsPath path; diff --git a/src/net/sourceforge/plantuml/eggs/PSystemPathFactory.java b/src/net/sourceforge/plantuml/eggs/PSystemPathFactory.java index f0c367c12..3d7ff7708 100644 --- a/src/net/sourceforge/plantuml/eggs/PSystemPathFactory.java +++ b/src/net/sourceforge/plantuml/eggs/PSystemPathFactory.java @@ -43,7 +43,7 @@ import net.sourceforge.plantuml.regex.MyPattern; import net.sourceforge.plantuml.regex.Pattern2; public class PSystemPathFactory extends PSystemSingleLineFactory { - // ::remove file when WASM + // ::remove file when CORE final private static Pattern2 p = MyPattern.cmpile("^path[%s]+([0-9A-Za-z]+)$"); diff --git a/src/net/sourceforge/plantuml/eggs/PSystemRIP.java b/src/net/sourceforge/plantuml/eggs/PSystemRIP.java index 26363b994..5af4523be 100644 --- a/src/net/sourceforge/plantuml/eggs/PSystemRIP.java +++ b/src/net/sourceforge/plantuml/eggs/PSystemRIP.java @@ -44,7 +44,7 @@ import net.sourceforge.plantuml.graphic.GraphicPosition; import net.sourceforge.plantuml.security.SImageIO; public class PSystemRIP extends PlainStringsDiagram { - // ::remove file when WASM + // ::remove file when CORE public PSystemRIP(UmlSource source) throws IOException { super(source); diff --git a/src/net/sourceforge/plantuml/eggs/PSystemRIPFactory.java b/src/net/sourceforge/plantuml/eggs/PSystemRIPFactory.java index 6fac16ccb..fa28cbaff 100644 --- a/src/net/sourceforge/plantuml/eggs/PSystemRIPFactory.java +++ b/src/net/sourceforge/plantuml/eggs/PSystemRIPFactory.java @@ -44,7 +44,7 @@ import net.sourceforge.plantuml.log.Logme; import net.sourceforge.plantuml.utils.Log; public class PSystemRIPFactory extends PSystemSingleLineFactory { - // ::remove file when WASM + // ::remove file when CORE @Override protected AbstractPSystem executeLine(UmlSource source, String line) { diff --git a/src/net/sourceforge/plantuml/eggs/SentenceDecoder.java b/src/net/sourceforge/plantuml/eggs/SentenceDecoder.java index be383b6a3..e6add88ff 100644 --- a/src/net/sourceforge/plantuml/eggs/SentenceDecoder.java +++ b/src/net/sourceforge/plantuml/eggs/SentenceDecoder.java @@ -40,7 +40,7 @@ import static java.nio.charset.StandardCharsets.UTF_8; import java.io.UnsupportedEncodingException; public class SentenceDecoder { - // ::remove file when WASM + // ::remove file when CORE private final String secret; diff --git a/src/net/sourceforge/plantuml/eggs/SentenceProducer.java b/src/net/sourceforge/plantuml/eggs/SentenceProducer.java index dd38c008e..69dfe7ea1 100644 --- a/src/net/sourceforge/plantuml/eggs/SentenceProducer.java +++ b/src/net/sourceforge/plantuml/eggs/SentenceProducer.java @@ -38,7 +38,7 @@ package net.sourceforge.plantuml.eggs; import static java.nio.charset.StandardCharsets.UTF_8; public class SentenceProducer { - // ::remove file when WASM + // ::remove file when CORE private final String secret; diff --git a/src/net/sourceforge/plantuml/elk/CucaDiagramFileMakerElk.java b/src/net/sourceforge/plantuml/elk/CucaDiagramFileMakerElk.java index 90a799537..a96f1ed2d 100644 --- a/src/net/sourceforge/plantuml/elk/CucaDiagramFileMakerElk.java +++ b/src/net/sourceforge/plantuml/elk/CucaDiagramFileMakerElk.java @@ -55,11 +55,12 @@ import net.sourceforge.plantuml.api.ImageDataSimple; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XPoint2D; import net.sourceforge.plantuml.baraye.EntityFactory; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.GroupType; import net.sourceforge.plantuml.cucadiagram.ICucaDiagram; +import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Link; /* @@ -144,14 +145,14 @@ https://rtsys.informatik.uni-kiel.de/~biblio/downloads/theses/yab-bt.pdf https://rtsys.informatik.uni-kiel.de/~biblio/downloads/theses/thw-bt.pdf */ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker { - // ::remove folder when WASM + // ::remove folder when CORE private final ICucaDiagram diagram; private final StringBounder stringBounder; private final DotStringFactory dotStringFactory; - private final Map nodes = new LinkedHashMap(); - private final Map clusters = new LinkedHashMap(); + private final Map nodes = new LinkedHashMap(); + private final Map clusters = new LinkedHashMap(); private final Map edges = new LinkedHashMap(); public CucaDiagramFileMakerElk(ICucaDiagram diagram, StringBounder stringBounder) { @@ -225,13 +226,13 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker { } private void drawAllClusters(UGraphic ug) { - for (Entry ent : clusters.entrySet()) + for (Entry ent : clusters.entrySet()) drawSingleCluster(ug, ent.getKey(), ent.getValue()); } private void drawAllNodes(UGraphic ug) { - for (Entry ent : nodes.entrySet()) + for (Entry ent : nodes.entrySet()) drawSingleNode(ug, ent.getKey(), ent.getValue()); } @@ -246,7 +247,7 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker { } } - private void drawSingleCluster(UGraphic ug, EntityImp group, ElkNode elkNode) { + private void drawSingleCluster(UGraphic ug, Entity group, ElkNode elkNode) { final XPoint2D corner = getPosition(elkNode); final URectangle rect = new URectangle(elkNode.getWidth(), elkNode.getHeight()); @@ -286,7 +287,7 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker { // ug.apply(HColorUtils.BLACK).apply(new UStroke(1.5)).apply(new UTranslate(corner)).draw(rect); } - private TextBlock getTitleBlock(EntityImp g) { + private TextBlock getTitleBlock(Entity g) { final Display label = g.getDisplay(); if (label == null) return TextBlockUtils.empty(0, 0); @@ -300,7 +301,7 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker { return null; } - private void drawSingleNode(UGraphic ug, EntityImp leaf, ElkNode elkNode) { + private void drawSingleNode(UGraphic ug, Entity leaf, ElkNode elkNode) { final IEntityImage image = printEntityInternal(leaf); // Retrieve coord from ELK final XPoint2D corner = getPosition(elkNode); @@ -314,7 +315,7 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker { final XPoint2D translate = getPosition(edge.getContainingNode()); final double magicY2 = 0; - final EntityImp dest = link.getEntity2(); + final Entity dest = link.getEntity2(); if (dest.getUSymbol() instanceof USymbolFolder) { // System.err.println("dest=" + dest); // final IEntityImage image = printEntityInternal((ILeaf) dest); @@ -339,16 +340,16 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker { } - private Collection getUnpackagedEntities() { - final List result = new ArrayList<>(); - for (EntityImp ent : diagram.getLeafsvalues()) + private Collection getUnpackagedEntities() { + final List result = new ArrayList<>(); + for (Entity ent : diagram.getEntityFactory().leafs()) if (diagram.getEntityFactory().getRootGroup() == ent.getParentContainer()) result.add(ent); return result; } - private ElkNode getElkNode(final EntityImp entity) { + private ElkNode getElkNode(final Entity entity) { ElkNode node = nodes.get(entity); if (node == null) node = clusters.get(entity); @@ -388,15 +389,13 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker { } - private void printAllSubgroups(ElkNode cluster, EntityImp group) { - for (EntityImp g : diagram.getChildrenGroups(group)) { + private void printAllSubgroups(ElkNode cluster, Entity group) { + for (Entity g : diagram.getChildrenGroups(group)) { if (g.isRemoved()) { continue; } if (diagram.isEmpty(g) && g.getGroupType() == GroupType.PACKAGE) { - final ISkinParam skinParam = diagram.getSkinParam(); - final EntityFactory entityFactory = diagram.getEntityFactory(); - final EntityImp folder = entityFactory.createLeafForEmptyGroup(g, skinParam); + g.muteToType(LeafType.EMPTY_PACKAGE); System.err.println("STILL IN PROGRESS"); // printEntityNew(folder); } else { @@ -418,17 +417,17 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker { } - private void printSingleGroup(EntityImp g) { + private void printSingleGroup(Entity g) { if (g.getGroupType() == GroupType.CONCURRENT_STATE) return; - this.printEntities(clusters.get(g), g.getLeafsDirect()); + this.printEntities(clusters.get(g), g.leafs()); printAllSubgroups(clusters.get(g), g); } - private void printEntities(ElkNode parent, Collection entities) { + private void printEntities(ElkNode parent, Collection entities) { // Convert all "leaf" to ELK node - for (EntityImp ent : entities) { + for (Entity ent : entities) { if (ent.isRemoved()) continue; @@ -443,7 +442,7 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker { } - private void manageSingleNode(final ElkNode root, EntityImp leaf) { + private void manageSingleNode(final ElkNode root, Entity leaf) { final IEntityImage image = printEntityInternal(leaf); // Expected dimension of the node @@ -543,7 +542,7 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker { return dotStringFactory.getBibliotekon(); } - private IEntityImage printEntityInternal(EntityImp ent) { + private IEntityImage printEntityInternal(Entity ent) { if (ent.isRemoved()) throw new IllegalStateException(); diff --git a/src/net/sourceforge/plantuml/emoji/Emoji.java b/src/net/sourceforge/plantuml/emoji/Emoji.java index e8a993619..0d60fdefc 100644 --- a/src/net/sourceforge/plantuml/emoji/Emoji.java +++ b/src/net/sourceforge/plantuml/emoji/Emoji.java @@ -54,7 +54,7 @@ import net.sourceforge.plantuml.ugraphic.UGraphic; // Emojji from https://twemoji.twitter.com/ // Shorcut from https://api.github.com/emojis -// ::uncomment when WASM +// ::uncomment when CORE //import com.plantuml.wasm.RunInit; //import java.io.FileInputStream; // ::done @@ -116,11 +116,11 @@ public class Emoji { return; final List data = new ArrayList(); - // ::uncomment when WASM + // ::uncomment when CORE // final String fullpath = RunInit.cheerpjPath + "emoji/" + unicode + ".svg"; // try (BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(fullpath)))) { // ::done - // ::comment when WASM + // ::comment when CORE try (BufferedReader br = new BufferedReader( new InputStreamReader(Dummy.class.getResourceAsStream(unicode + ".svg")))) { // ::done diff --git a/src/net/sourceforge/plantuml/emoji/PSystemListEmoji.java b/src/net/sourceforge/plantuml/emoji/PSystemListEmoji.java index 0786a9b82..6e85eaf09 100644 --- a/src/net/sourceforge/plantuml/emoji/PSystemListEmoji.java +++ b/src/net/sourceforge/plantuml/emoji/PSystemListEmoji.java @@ -52,7 +52,7 @@ import net.sourceforge.plantuml.svek.TextBlockBackcolored; import net.sourceforge.plantuml.ugraphic.UGraphic; public class PSystemListEmoji extends PlainDiagram { - // ::remove file when WASM + // ::remove file when CORE private final String text; diff --git a/src/net/sourceforge/plantuml/emoji/PSystemListEmojiFactory.java b/src/net/sourceforge/plantuml/emoji/PSystemListEmojiFactory.java index 6858352c4..c06cf41c6 100644 --- a/src/net/sourceforge/plantuml/emoji/PSystemListEmojiFactory.java +++ b/src/net/sourceforge/plantuml/emoji/PSystemListEmojiFactory.java @@ -41,7 +41,7 @@ import net.sourceforge.plantuml.command.PSystemSingleLineFactory; import net.sourceforge.plantuml.core.UmlSource; public class PSystemListEmojiFactory extends PSystemSingleLineFactory { - // ::remove file when WASM + // ::remove file when CORE @Override protected AbstractPSystem executeLine(UmlSource source, String line) { diff --git a/src/net/sourceforge/plantuml/eps/EpsGraphics.java b/src/net/sourceforge/plantuml/eps/EpsGraphics.java index 9e497d77a..d9dd27ef8 100644 --- a/src/net/sourceforge/plantuml/eps/EpsGraphics.java +++ b/src/net/sourceforge/plantuml/eps/EpsGraphics.java @@ -57,7 +57,7 @@ import net.sourceforge.plantuml.utils.MathUtils; import net.sourceforge.plantuml.version.Version; public class EpsGraphics { - // ::remove folder when WASM + // ::remove folder when CORE public static final String END_OF_FILE = "%plantuml done"; protected static final long COEF = 100L; diff --git a/src/net/sourceforge/plantuml/error/PSystemError.java b/src/net/sourceforge/plantuml/error/PSystemError.java index e92136252..18b50b672 100644 --- a/src/net/sourceforge/plantuml/error/PSystemError.java +++ b/src/net/sourceforge/plantuml/error/PSystemError.java @@ -232,7 +232,7 @@ public abstract class PSystemError extends PlainDiagram { @Override final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat) throws IOException { - // ::comment when WASM + // ::comment when CORE if (fileFormat.getFileFormat() == FileFormat.ATXT || fileFormat.getFileFormat() == FileFormat.UTXT) { final UGraphicTxt ugt = new UGraphicTxt(); final UmlCharArea area = ugt.getCharArea(); @@ -265,7 +265,7 @@ public abstract class PSystemError extends PlainDiagram { udrawable = addMessageLiberapay(udrawable); } else if (min == 30 || min == 39 || min == 48) { udrawable = addMessageDedication(udrawable); - // ::comment when WASM + // ::comment when CORE } else if (getSource().containsIgnoreCase("arecibo")) { udrawable = addMessageArecibo(udrawable); // ::done @@ -301,7 +301,7 @@ public abstract class PSystemError extends PlainDiagram { } private TextBlock addMessageLiberapay(final TextBlock source) throws IOException { - // ::comment when WASM + // ::comment when CORE if (LicenseInfo.retrieveNamedOrDistributorQuickIsValid()) return source; // ::done @@ -313,7 +313,7 @@ public abstract class PSystemError extends PlainDiagram { } private TextBlock addMessagePatreon(final TextBlock source) throws IOException { - // ::comment when WASM + // ::comment when CORE if (LicenseInfo.retrieveNamedOrDistributorQuickIsValid()) return source; // ::done @@ -325,7 +325,7 @@ public abstract class PSystemError extends PlainDiagram { } private TextBlock addMessageDedication(final TextBlock source) throws IOException { - // ::comment when WASM + // ::comment when CORE if (LicenseInfo.retrieveNamedOrDistributorQuickIsValid()) return source; // ::done @@ -335,7 +335,7 @@ public abstract class PSystemError extends PlainDiagram { return result; } - // ::comment when WASM + // ::comment when CORE private TextBlock addMessageAdopt(final TextBlock source) throws IOException { if (LicenseInfo.retrieveNamedOrDistributorQuickIsValid()) { return source; @@ -356,7 +356,7 @@ public abstract class PSystemError extends PlainDiagram { private TextBlockBackcolored getMessageDedication() { final HColorSimple backColor = (HColorSimple) HColorSet.instance().getColorOrWhite("#eae2c9"); - // ::comment when WASM + // ::comment when CORE final BufferedImage qrcode = smaller(FlashCodeFactory.getFlashCodeUtils() .exportFlashcode("http://plantuml.com/dedication", Color.BLACK, backColor.getAwtColor())); // ::done @@ -368,11 +368,11 @@ public abstract class PSystemError extends PlainDiagram { final TextBlock text = TextBlockUtils .withMargin(disp.create(fc, HorizontalAlignment.LEFT, new SpriteContainerEmpty()), 10, 0); final TextBlock result; - // ::comment when WASM + // ::comment when CORE if (qrcode == null) { // ::done result = text; - // ::comment when WASM + // ::comment when CORE } else { final UImage qr = new UImage(new PixelImage(qrcode, AffineTransformType.TYPE_NEAREST_NEIGHBOR)).scale(3); result = TextBlockUtils.mergeLR(text, TextBlockUtils.fromUImage(qr), VerticalAlignment.CENTER); @@ -404,7 +404,7 @@ public abstract class PSystemError extends PlainDiagram { final Color back = new Color(message.getImage(1).getRGB(0, 0)); final HColor backColor = HColors.simple(back); - // ::comment when WASM + // ::comment when CORE final BufferedImage qrcode = smaller(FlashCodeFactory.getFlashCodeUtils() .exportFlashcode("http://plantuml.com/patreon", Color.BLACK, Color.WHITE)); // ::done @@ -413,12 +413,12 @@ public abstract class PSystemError extends PlainDiagram { final double imWidth; final double imHeight; - // ::comment when WASM + // ::comment when CORE if (qrcode == null) { // ::done imWidth = message.getWidth(); imHeight = message.getHeight(); - // ::comment when WASM + // ::comment when CORE } else { imWidth = message.getWidth() + qrcode.getWidth() * scale + 20; imHeight = Math.max(message.getHeight(), qrcode.getHeight() * scale + 10); @@ -427,11 +427,11 @@ public abstract class PSystemError extends PlainDiagram { return new TextBlockBackcolored() { public void drawU(UGraphic ug) { - // ::comment when WASM + // ::comment when CORE if (qrcode == null) { // ::done ug.apply(new UTranslate(1, 1)).draw(message); - // ::comment when WASM + // ::comment when CORE } else { final UImage qr = new UImage(new PixelImage(qrcode, AffineTransformType.TYPE_NEAREST_NEIGHBOR)) .scale(scale); @@ -466,7 +466,7 @@ public abstract class PSystemError extends PlainDiagram { final Color back = new Color(message.getImage(1).getRGB(0, 0)); final HColor backColor = HColors.simple(back); - // ::comment when WASM + // ::comment when CORE final BufferedImage qrcode = smaller(FlashCodeFactory.getFlashCodeUtils() .exportFlashcode("http://plantuml.com/lp", Color.BLACK, Color.WHITE)); // ::done @@ -475,12 +475,12 @@ public abstract class PSystemError extends PlainDiagram { final double imWidth; final double imHeight; - // ::comment when WASM + // ::comment when CORE if (qrcode == null) { // ::done imWidth = message.getWidth(); imHeight = message.getHeight(); - // ::comment when WASM + // ::comment when CORE } else { imWidth = message.getWidth() + qrcode.getWidth() * scale + 20; imHeight = Math.max(message.getHeight(), qrcode.getHeight() * scale + 10); @@ -490,11 +490,11 @@ public abstract class PSystemError extends PlainDiagram { return new TextBlockBackcolored() { public void drawU(UGraphic ug) { - // ::comment when WASM + // ::comment when CORE if (qrcode == null) { // ::done ug.apply(new UTranslate(1, 1)).draw(message); - // ::comment when WASM + // ::comment when CORE } else { final UImage qr = new UImage(new PixelImage(qrcode, AffineTransformType.TYPE_NEAREST_NEIGHBOR)) .scale(scale); diff --git a/src/net/sourceforge/plantuml/flashcode/FlashCodeFactory.java b/src/net/sourceforge/plantuml/flashcode/FlashCodeFactory.java index ef3305e43..9e93abf76 100644 --- a/src/net/sourceforge/plantuml/flashcode/FlashCodeFactory.java +++ b/src/net/sourceforge/plantuml/flashcode/FlashCodeFactory.java @@ -36,7 +36,7 @@ package net.sourceforge.plantuml.flashcode; public class FlashCodeFactory { - // :: remove folder when WASM + // :: remove folder when CORE public static FlashCodeUtils getFlashCodeUtils() { final String name = "net.sourceforge.plantuml.flashcode.FlashCodeUtilsZxing"; diff --git a/src/net/sourceforge/plantuml/font/PSystemListFonts.java b/src/net/sourceforge/plantuml/font/PSystemListFonts.java index 4d353b155..ae41f66ee 100644 --- a/src/net/sourceforge/plantuml/font/PSystemListFonts.java +++ b/src/net/sourceforge/plantuml/font/PSystemListFonts.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.UmlSource; public class PSystemListFonts extends PlainStringsDiagram { - // ::remove folder when WASM + // ::remove folder when CORE public PSystemListFonts(UmlSource source, String text) { super(source); diff --git a/src/net/sourceforge/plantuml/ftp/FtpConnexion.java b/src/net/sourceforge/plantuml/ftp/FtpConnexion.java index 12c021fc5..eff548a16 100644 --- a/src/net/sourceforge/plantuml/ftp/FtpConnexion.java +++ b/src/net/sourceforge/plantuml/ftp/FtpConnexion.java @@ -53,7 +53,7 @@ import net.sourceforge.plantuml.SourceStringReader; import net.sourceforge.plantuml.core.DiagramDescription; public class FtpConnexion { - // ::remove folder when WASM + // ::remove folder when CORE private final String user; private final Map incoming = new HashMap(); diff --git a/src/net/sourceforge/plantuml/graphml/CucaDiagramGraphmlMaker.java b/src/net/sourceforge/plantuml/graphml/CucaDiagramGraphmlMaker.java index 758b505ae..59b945d37 100644 --- a/src/net/sourceforge/plantuml/graphml/CucaDiagramGraphmlMaker.java +++ b/src/net/sourceforge/plantuml/graphml/CucaDiagramGraphmlMaker.java @@ -49,7 +49,7 @@ import net.sourceforge.plantuml.utils.Log; import net.sourceforge.plantuml.xmi.XmlDiagramTransformer; public final class CucaDiagramGraphmlMaker { - // ::remove folder when WASM + // ::remove folder when CORE private final ICucaDiagram diagram; diff --git a/src/net/sourceforge/plantuml/graphml/GraphmlDescriptionDiagram.java b/src/net/sourceforge/plantuml/graphml/GraphmlDescriptionDiagram.java index 51f226843..215fc383b 100644 --- a/src/net/sourceforge/plantuml/graphml/GraphmlDescriptionDiagram.java +++ b/src/net/sourceforge/plantuml/graphml/GraphmlDescriptionDiagram.java @@ -52,7 +52,7 @@ import javax.xml.transform.stream.StreamResult; import org.w3c.dom.Document; import org.w3c.dom.Element; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.descdiagram.DescriptionDiagram; import net.sourceforge.plantuml.xmi.XmlDiagramTransformer; import net.sourceforge.plantuml.xml.XmlFactories; @@ -80,21 +80,21 @@ public class GraphmlDescriptionDiagram implements XmlDiagramTransformer { graph.setAttribute("edgedefault", "undirected"); graphml.appendChild(graph); - for (final EntityImp ent : diagram.getLeafsvalues()) - if (ent.getParentContainer().instanceofGroupRoot()) + for (final Entity ent : diagram.getEntityFactory().leafs()) + if (ent.getParentContainer().isRoot()) addElement(ent, graph); } - private void addElement(EntityImp tobeAdded, Element container) { + private void addElement(Entity tobeAdded, Element container) { final Element element = createEntityNode(tobeAdded); container.appendChild(element); } - private Element createEntityNode(EntityImp entity) { + private Element createEntityNode(Entity entity) { final Element cla = document.createElement("node"); - cla.setAttribute("id", entity.getCode()); + cla.setAttribute("id", entity.getName()); return cla; } diff --git a/src/net/sourceforge/plantuml/help/CommandHelp.java b/src/net/sourceforge/plantuml/help/CommandHelp.java index e3c579a9b..b58e31da2 100644 --- a/src/net/sourceforge/plantuml/help/CommandHelp.java +++ b/src/net/sourceforge/plantuml/help/CommandHelp.java @@ -44,7 +44,7 @@ import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.utils.LineLocation; public class CommandHelp extends SingleLineCommand2 { - // ::remove folder when WASM + // ::remove folder when CORE public CommandHelp() { super(getRegexConcat()); diff --git a/src/net/sourceforge/plantuml/html/CucaDiagramHtmlMaker.java b/src/net/sourceforge/plantuml/html/CucaDiagramHtmlMaker.java index b16db269f..c9acb6ddc 100644 --- a/src/net/sourceforge/plantuml/html/CucaDiagramHtmlMaker.java +++ b/src/net/sourceforge/plantuml/html/CucaDiagramHtmlMaker.java @@ -46,14 +46,14 @@ import java.util.List; import net.sourceforge.plantuml.FileImageData; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.baraye.CucaDiagram; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.security.SFile; public final class CucaDiagramHtmlMaker { - // ::remove folder when WASM + // ::remove folder when CORE private final CucaDiagram diagram; private final SFile dir; @@ -83,7 +83,7 @@ public final class CucaDiagramHtmlMaker { private void printAllType(final PrintWriter pw, LeafType type) throws IOException { if (hasSome(type)) { pw.println("

    " + type.toHtml() + "

    "); - for (final EntityImp ent : diagram.getLeafsvalues()) { + for (final Entity ent : diagram.getEntityFactory().leafs()) { if (ent.getLeafType() != type) { continue; } @@ -106,7 +106,7 @@ public final class CucaDiagramHtmlMaker { } private boolean hasSome(final LeafType type) { - for (EntityImp ent : diagram.getLeafsvalues()) { + for (Entity ent : diagram.getEntityFactory().leafs()) { if (ent.getLeafType() == type) { return true; } @@ -114,11 +114,11 @@ public final class CucaDiagramHtmlMaker { return false; } - private void export(EntityImp entity) throws IOException { + private void export(Entity entity) throws IOException { final SFile f = dir.file(LinkHtmlPrinter.urlOf(entity)); final PrintWriter pw = f.createPrintWriter(); pw.println(""); - pw.println("" + StringUtils.unicodeForHtml(entity.getCodeGetName()) + ""); + pw.println("" + StringUtils.unicodeForHtml(entity.getName()) + ""); pw.println("

    " + entity.getLeafType().toHtml() + "

    "); for (CharSequence s : entity.getDisplay()) { pw.println(StringUtils.unicodeForHtml(s.toString())); @@ -177,12 +177,12 @@ public final class CucaDiagramHtmlMaker { pw.println(""); } - final Collection notes = getNotes(entity); + final Collection notes = getNotes(entity); if (notes.size() > 0) { pw.println("
    "); pw.println("

    Notes:

    "); pw.println("
      "); - for (EntityImp note : notes) { + for (Entity note : notes) { pw.println("
    • "); for (CharSequence s : note.getDisplay()) { pw.println(StringUtils.unicodeForHtml(s.toString())); @@ -204,8 +204,8 @@ public final class CucaDiagramHtmlMaker { pw.close(); } - private Collection getNotes(EntityImp ent) { - final List result = new ArrayList<>(); + private Collection getNotes(Entity ent) { + final List result = new ArrayList<>(); for (Link link : diagram.getLinks()) { if (link.contains(ent) == false) { continue; @@ -217,7 +217,7 @@ public final class CucaDiagramHtmlMaker { return Collections.unmodifiableList(result); } - private Collection getLinksButNotes(EntityImp ent) { + private Collection getLinksButNotes(Entity ent) { final List result = new ArrayList<>(); for (Link link : diagram.getLinks()) { if (link.contains(ent) == false) { diff --git a/src/net/sourceforge/plantuml/html/LinkHtmlPrinter.java b/src/net/sourceforge/plantuml/html/LinkHtmlPrinter.java index 43eb4de99..b97a457d8 100644 --- a/src/net/sourceforge/plantuml/html/LinkHtmlPrinter.java +++ b/src/net/sourceforge/plantuml/html/LinkHtmlPrinter.java @@ -38,7 +38,7 @@ package net.sourceforge.plantuml.html; import java.io.PrintWriter; import net.sourceforge.plantuml.StringUtils; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkDecor; @@ -49,7 +49,7 @@ public final class LinkHtmlPrinter { // private final Entity entity; private final boolean chiral; - public LinkHtmlPrinter(Link link, EntityImp entity) { + public LinkHtmlPrinter(Link link, Entity entity) { this.link = link; if (link.getEntity1() == entity) { this.chiral = false; @@ -65,9 +65,9 @@ public final class LinkHtmlPrinter { final String ent2h; if (chiral) { ent1h = htmlLink(link.getEntity1()); - ent2h = "" + StringUtils.unicodeForHtml(link.getEntity2().getCodeGetName()) + ""; + ent2h = "" + StringUtils.unicodeForHtml(link.getEntity2().getName()) + ""; } else { - ent1h = "" + StringUtils.unicodeForHtml(link.getEntity1().getCodeGetName()) + ""; + ent1h = "" + StringUtils.unicodeForHtml(link.getEntity1().getName()) + ""; ent2h = htmlLink(link.getEntity2()); } String label = link.getLabel() == null ? null : StringUtils.unicodeForHtml(link.getLabel()); @@ -165,22 +165,22 @@ public final class LinkHtmlPrinter { return ent1 + " " + decor1 + "-" + decor2 + " " + ent2; } - static String htmlLink(EntityImp ent) { + static String htmlLink(Entity ent) { final StringBuilder sb = new StringBuilder(); sb.append(""); - sb.append(StringUtils.unicodeForHtml(ent.getCodeGetName())); + sb.append(StringUtils.unicodeForHtml(ent.getName())); sb.append(""); return sb.toString(); } - static String urlOf(EntityImp ent) { + static String urlOf(Entity ent) { if (ent.getLeafType() == LeafType.NOTE) { throw new IllegalArgumentException(); } - if (ent.getCodeGetName().matches("[-\\w_ .]+")) { - return StringUtils.unicodeForHtml(ent.getCodeGetName()) + ".html"; + if (ent.getName().matches("[-\\w_ .]+")) { + return StringUtils.unicodeForHtml(ent.getName()) + ".html"; } return StringUtils.unicodeForHtml(ent.getUid()) + ".html"; } diff --git a/src/net/sourceforge/plantuml/jasic/Jasic.java b/src/net/sourceforge/plantuml/jasic/Jasic.java index eb026d07c..1e35258ee 100644 --- a/src/net/sourceforge/plantuml/jasic/Jasic.java +++ b/src/net/sourceforge/plantuml/jasic/Jasic.java @@ -101,7 +101,7 @@ import java.util.Map; * @author Bob Nystrom */ public class Jasic { - // ::remove folder when WASM + // ::remove folder when CORE // Tokenizing (lexing) ----------------------------------------------------- diff --git a/src/net/sourceforge/plantuml/jcckit/PSystemJcckit.java b/src/net/sourceforge/plantuml/jcckit/PSystemJcckit.java index 99da75179..dc4f74f64 100644 --- a/src/net/sourceforge/plantuml/jcckit/PSystemJcckit.java +++ b/src/net/sourceforge/plantuml/jcckit/PSystemJcckit.java @@ -53,7 +53,7 @@ import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.security.SImageIO; public class PSystemJcckit extends AbstractPSystem { - // ::remove folder when WASM + // ::remove folder when CORE private final PropertiesBasedConfigData prop; private final int width; diff --git a/src/net/sourceforge/plantuml/logo/LogoScanner.java b/src/net/sourceforge/plantuml/logo/LogoScanner.java index bf07843ae..c2e89f0fc 100644 --- a/src/net/sourceforge/plantuml/logo/LogoScanner.java +++ b/src/net/sourceforge/plantuml/logo/LogoScanner.java @@ -39,7 +39,7 @@ import java.util.HashMap; import java.util.Map; class LogoScanner { - // ::remove folder when WASM + // ::remove folder when CORE final private Map keywordTable = new HashMap(); private char sourceString[]; private int sourceLength; diff --git a/src/net/sourceforge/plantuml/math/AsciiMath.java b/src/net/sourceforge/plantuml/math/AsciiMath.java index ac9e60ce1..b701218d9 100644 --- a/src/net/sourceforge/plantuml/math/AsciiMath.java +++ b/src/net/sourceforge/plantuml/math/AsciiMath.java @@ -46,7 +46,7 @@ import net.sourceforge.plantuml.klimt.MutableImage; import net.sourceforge.plantuml.ugraphic.UImageSvg; public class AsciiMath implements ScientificEquation { - // ::remove folder when WASM + // ::remove folder when CORE private final LatexBuilder builder; private final String tex; diff --git a/src/net/sourceforge/plantuml/mda/MDADiagramImpl.java b/src/net/sourceforge/plantuml/mda/MDADiagramImpl.java index a46781084..78526c0bc 100644 --- a/src/net/sourceforge/plantuml/mda/MDADiagramImpl.java +++ b/src/net/sourceforge/plantuml/mda/MDADiagramImpl.java @@ -45,12 +45,12 @@ import net.sourceforge.plantuml.SourceStringReader; import net.sourceforge.plantuml.api.mda.option2.MDADiagram; import net.sourceforge.plantuml.api.mda.option2.MDAPackage; import net.sourceforge.plantuml.baraye.EntityFactory; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.core.Diagram; public class MDADiagramImpl implements MDADiagram { - // ::remove folder when WASM + // ::remove folder when CORE public static MDADiagram create(String uml) { List blocks = new SourceStringReader(uml).getBlocks(); if (blocks.size() == 0) { @@ -73,7 +73,7 @@ public class MDADiagramImpl implements MDADiagram { private MDADiagramImpl(ClassDiagram classDiagram) { final EntityFactory entityFactory = classDiagram.getEntityFactory(); packages.add(new MDAPackageImpl(entityFactory.getRootGroup())); - for (EntityImp group : entityFactory.groups()) { + for (Entity group : entityFactory.groups()) { packages.add(new MDAPackageImpl(group)); } } diff --git a/src/net/sourceforge/plantuml/mda/MDAEntityImpl.java b/src/net/sourceforge/plantuml/mda/MDAEntityImpl.java index 8acb63211..dd8c31ec4 100644 --- a/src/net/sourceforge/plantuml/mda/MDAEntityImpl.java +++ b/src/net/sourceforge/plantuml/mda/MDAEntityImpl.java @@ -36,18 +36,18 @@ package net.sourceforge.plantuml.mda; import net.sourceforge.plantuml.api.mda.option2.MDAEntity; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; public class MDAEntityImpl implements MDAEntity { - private final EntityImp leaf; + private final Entity leaf; - public MDAEntityImpl(EntityImp leaf) { + public MDAEntityImpl(Entity leaf) { this.leaf = leaf; } public String getName() { - return leaf.getCodeGetName(); + return leaf.getName(); } } diff --git a/src/net/sourceforge/plantuml/mda/MDAPackageImpl.java b/src/net/sourceforge/plantuml/mda/MDAPackageImpl.java index 2449f2224..7f717e489 100644 --- a/src/net/sourceforge/plantuml/mda/MDAPackageImpl.java +++ b/src/net/sourceforge/plantuml/mda/MDAPackageImpl.java @@ -41,16 +41,16 @@ import java.util.Collections; import net.sourceforge.plantuml.api.mda.option2.MDAEntity; import net.sourceforge.plantuml.api.mda.option2.MDAPackage; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; public class MDAPackageImpl implements MDAPackage { private final Collection entities = new ArrayList<>(); - private final EntityImp group; + private final Entity group; - public MDAPackageImpl(EntityImp group) { + public MDAPackageImpl(Entity group) { this.group = group; - for (EntityImp leaf : group.getLeafsDirect()) { + for (Entity leaf : group.leafs()) { entities.add(new MDAEntityImpl(leaf)); } } @@ -60,10 +60,10 @@ public class MDAPackageImpl implements MDAPackage { } public String getName() { - if (group.instanceofGroupRoot()) { + if (group.isRoot()) { return ""; } - return group.getCodeGetName(); + return group.getName(); } } diff --git a/src/net/sourceforge/plantuml/mjpeg/MJPEGGenerator.java b/src/net/sourceforge/plantuml/mjpeg/MJPEGGenerator.java index 388812f49..4866af3eb 100644 --- a/src/net/sourceforge/plantuml/mjpeg/MJPEGGenerator.java +++ b/src/net/sourceforge/plantuml/mjpeg/MJPEGGenerator.java @@ -29,7 +29,7 @@ import net.sourceforge.plantuml.security.SImageIO; * @author monceaux */ public class MJPEGGenerator { - // ::remove folder when WASM + // ::remove folder when CORE /* * Info needed for MJPEG AVI * diff --git a/src/net/sourceforge/plantuml/objectdiagram/AbstractClassOrObjectDiagram.java b/src/net/sourceforge/plantuml/objectdiagram/AbstractClassOrObjectDiagram.java index a7f61497f..33fecc8dc 100644 --- a/src/net/sourceforge/plantuml/objectdiagram/AbstractClassOrObjectDiagram.java +++ b/src/net/sourceforge/plantuml/objectdiagram/AbstractClassOrObjectDiagram.java @@ -40,8 +40,7 @@ import java.util.List; import java.util.Map; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.core.UmlSource; @@ -53,6 +52,7 @@ import net.sourceforge.plantuml.cucadiagram.LinkArg; import net.sourceforge.plantuml.cucadiagram.LinkDecor; import net.sourceforge.plantuml.cucadiagram.LinkType; import net.sourceforge.plantuml.cucadiagram.NoteLinkStrategy; +import net.sourceforge.plantuml.plasma.Quark; public abstract class AbstractClassOrObjectDiagram extends AbstractEntityDiagram { @@ -60,7 +60,7 @@ public abstract class AbstractClassOrObjectDiagram extends AbstractEntityDiagram super(source, type, orig); } - final public boolean insertBetween(EntityImp entity1, EntityImp entity2, EntityImp node) { + final public boolean insertBetween(Entity entity1, Entity entity2, Entity node) { final Link link = foundLink(entity1, entity2); if (link == null) return false; @@ -81,7 +81,7 @@ public abstract class AbstractClassOrObjectDiagram extends AbstractEntityDiagram return true; } - private Link foundLink(EntityImp entity1, EntityImp entity2) { + private Link foundLink(Entity entity1, Entity entity2) { final List links = getLinks(); for (int i = links.size() - 1; i >= 0; i--) { final Link l = links.get(i); @@ -92,7 +92,7 @@ public abstract class AbstractClassOrObjectDiagram extends AbstractEntityDiagram return null; } - public int getNbOfHozizontalLollipop(EntityImp entity) { + public int getNbOfHozizontalLollipop(Entity entity) { if (entity.getLeafType() == LeafType.LOLLIPOP_FULL || entity.getLeafType() == LeafType.LOLLIPOP_HALF) throw new IllegalArgumentException(); @@ -108,8 +108,8 @@ public abstract class AbstractClassOrObjectDiagram extends AbstractEntityDiagram private final List associations = new ArrayList<>(); - public CommandExecutionResult associationClass(EntityImp entity1A, EntityImp entity1B, EntityImp entity2A, - EntityImp entity2B, LinkType linkType, Display label) { + public CommandExecutionResult associationClass(Entity entity1A, Entity entity1B, Entity entity2A, + Entity entity2B, LinkType linkType, Display label) { // final Quark ident1A = buildFromName(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(name1A)); // final Quark ident1B = buildFromName(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(name1B)); // final Quark ident2A = buildFromName(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(name2A)); @@ -135,10 +135,10 @@ public abstract class AbstractClassOrObjectDiagram extends AbstractEntityDiagram // final IEntity point2 = getOrCreateLeaf(ident2, code2, LeafType.POINT_FOR_ASSOCIATION, null); final Quark code1 = currentQuark().child(tmp1); - final EntityImp point1 = reallyCreateLeaf(code1, Display.getWithNewlines(""), LeafType.POINT_FOR_ASSOCIATION, + final Entity point1 = reallyCreateLeaf(code1, Display.getWithNewlines(""), LeafType.POINT_FOR_ASSOCIATION, null); final Quark code2 = currentQuark().child(tmp2); - final EntityImp point2 = reallyCreateLeaf(code2, Display.getWithNewlines(""), LeafType.POINT_FOR_ASSOCIATION, + final Entity point2 = reallyCreateLeaf(code2, Display.getWithNewlines(""), LeafType.POINT_FOR_ASSOCIATION, null); insertPointBetween(entity1A, entity1B, point1); @@ -154,7 +154,7 @@ public abstract class AbstractClassOrObjectDiagram extends AbstractEntityDiagram return CommandExecutionResult.error("Cannot link two associations points"); } - private void insertPointBetween(final EntityImp entity1A, final EntityImp entity1B, final EntityImp point1) { + private void insertPointBetween(final Entity entity1A, final Entity entity1B, final Entity point1) { Link existingLink1 = foundLink(entity1A, entity1B); if (existingLink1 == null) existingLink1 = new Link(getEntityFactory(), getSkinParam().getCurrentStyleBuilder(), entity1A, entity1B, @@ -162,9 +162,9 @@ public abstract class AbstractClassOrObjectDiagram extends AbstractEntityDiagram else removeLink(existingLink1); - final EntityImp entity1real = existingLink1.isInverted() ? existingLink1.getEntity2() + final Entity entity1real = existingLink1.isInverted() ? existingLink1.getEntity2() : existingLink1.getEntity1(); - final EntityImp entity2real = existingLink1.isInverted() ? existingLink1.getEntity1() + final Entity entity2real = existingLink1.isInverted() ? existingLink1.getEntity1() : existingLink1.getEntity2(); final Link entity1ToPoint = new Link(getEntityFactory(), getSkinParam().getCurrentStyleBuilder(), entity1real, @@ -190,7 +190,7 @@ public abstract class AbstractClassOrObjectDiagram extends AbstractEntityDiagram addLink(pointToEntity2); } - public boolean associationClass(int mode, EntityImp entity1, EntityImp entity2, EntityImp associed, LinkType linkType, + public boolean associationClass(int mode, Entity entity1, Entity entity2, Entity associed, LinkType linkType, Display label) { // final Quark ident1 = buildFromName(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(name1)); // final Quark ident2 = buildFromName(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(name2)); @@ -216,7 +216,7 @@ public abstract class AbstractClassOrObjectDiagram extends AbstractEntityDiagram return true; } - private List getExistingAssociatedPoints(final EntityImp entity1, final EntityImp entity2) { + private List getExistingAssociatedPoints(final Entity entity1, final Entity entity2) { final List same = new ArrayList<>(); for (Association existing : associations) if (existing.sameCouple(entity1, entity2)) @@ -226,10 +226,10 @@ public abstract class AbstractClassOrObjectDiagram extends AbstractEntityDiagram } class Association { - private EntityImp entity1; - private EntityImp entity2; - private EntityImp associed; - private EntityImp point; + private Entity entity1; + private Entity entity2; + private Entity associed; + private Entity point; private Link existingLink; @@ -239,7 +239,7 @@ public abstract class AbstractClassOrObjectDiagram extends AbstractEntityDiagram private Association other; - public Association(int mode, EntityImp entity1, EntityImp entity2, EntityImp associed) { + public Association(int mode, Entity entity1, Entity entity2, Entity associed) { this.entity1 = entity1; this.entity2 = entity2; this.associed = associed; @@ -253,7 +253,7 @@ public abstract class AbstractClassOrObjectDiagram extends AbstractEntityDiagram } - public Association createSecondAssociation(int mode2, EntityImp associed2, Display label) { + public Association createSecondAssociation(int mode2, Entity associed2, Display label) { final Association result = new Association(mode2, entity1, entity2, associed2); result.existingLink = this.existingLink; result.other = this; @@ -274,9 +274,9 @@ public abstract class AbstractClassOrObjectDiagram extends AbstractEntityDiagram else removeLink(existingLink); - final EntityImp entity1real = existingLink.isInverted() ? existingLink.getEntity2() + final Entity entity1real = existingLink.isInverted() ? existingLink.getEntity2() : existingLink.getEntity1(); - final EntityImp entity2real = existingLink.isInverted() ? existingLink.getEntity1() + final Entity entity2real = existingLink.isInverted() ? existingLink.getEntity1() : existingLink.getEntity2(); entity1ToPoint = new Link(getEntityFactory(), getSkinParam().getCurrentStyleBuilder(), entity1real, point, @@ -354,7 +354,7 @@ public abstract class AbstractClassOrObjectDiagram extends AbstractEntityDiagram } - boolean sameCouple(EntityImp entity1, EntityImp entity2) { + boolean sameCouple(Entity entity1, Entity entity2) { if (this.entity1 == entity1 && this.entity2 == entity2) return true; @@ -368,9 +368,9 @@ public abstract class AbstractClassOrObjectDiagram extends AbstractEntityDiagram @Override public void setLegend(DisplayPositioned legend) { - final EntityImp currentGroup = this.getCurrentGroup(); + final Entity currentGroup = this.getCurrentGroup(); - if (currentGroup.instanceofGroupRoot()) { + if (currentGroup.isRoot()) { super.setLegend(legend); return; } diff --git a/src/net/sourceforge/plantuml/objectdiagram/command/CommandAddData.java b/src/net/sourceforge/plantuml/objectdiagram/command/CommandAddData.java index b86675289..c1ad3d11b 100644 --- a/src/net/sourceforge/plantuml/objectdiagram/command/CommandAddData.java +++ b/src/net/sourceforge/plantuml/objectdiagram/command/CommandAddData.java @@ -35,12 +35,12 @@ */ package net.sourceforge.plantuml.objectdiagram.command; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; import net.sourceforge.plantuml.objectdiagram.AbstractClassOrObjectDiagram; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -68,7 +68,7 @@ public class CommandAddData extends SingleLineCommand2 throws NoSuchColorException { lines = lines.trim().removeEmptyLines(); final RegexResult line0 = getStartingPattern().matcher(lines.getFirst().getTrimmed().getString()); - final EntityImp entity1 = executeArg0(diagram, line0); + final Entity entity1 = executeArg0(diagram, line0); if (entity1 == null) return CommandExecutionResult.error("No such entity"); @@ -141,7 +141,7 @@ public class CommandCreateJson extends CommandMultilines2 return sb.toString(); } - private EntityImp executeArg0(AbstractEntityDiagram diagram, RegexResult line0) throws NoSuchColorException { + private Entity executeArg0(AbstractEntityDiagram diagram, RegexResult line0) throws NoSuchColorException { final String name = line0.get("NAME", 1); // final Quark ident = diagram.buildFromName(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(name)); // final Quark code = diagram.buildFromFullPath(name); @@ -158,7 +158,7 @@ public class CommandCreateJson extends CommandMultilines2 if (Display.isNull(display)) display = Display.getWithNewlines(name).withCreoleMode(CreoleMode.SIMPLE_LINE); - final EntityImp entity = diagram.reallyCreateLeaf(quark, display, LeafType.JSON, null); + final Entity entity = diagram.reallyCreateLeaf(quark, display, LeafType.JSON, null); if (stereotype != null) entity.setStereotype(Stereotype.build(stereotype, diagram.getSkinParam().getCircledCharacterRadius(), diagram.getSkinParam().getFont(null, false, FontParam.CIRCLED_CHARACTER), diff --git a/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateJsonSingleLine.java b/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateJsonSingleLine.java index 54f19aeaa..eb824af8c 100644 --- a/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateJsonSingleLine.java +++ b/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateJsonSingleLine.java @@ -35,8 +35,7 @@ */ package net.sourceforge.plantuml.objectdiagram.command; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.creole.CreoleMode; @@ -52,6 +51,7 @@ import net.sourceforge.plantuml.klimt.font.FontParam; import net.sourceforge.plantuml.json.JsonParser; import net.sourceforge.plantuml.json.JsonValue; import net.sourceforge.plantuml.objectdiagram.AbstractClassOrObjectDiagram; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -86,7 +86,7 @@ public class CommandCreateJsonSingleLine extends SingleLineCommand2 throws NoSuchColorException { lines = lines.trim().removeEmptyLines(); final RegexResult line0 = getStartingPattern().matcher(lines.getFirst().getTrimmed().getString()); - final EntityImp entity1 = executeArg0(diagram, line0); + final Entity entity1 = executeArg0(diagram, line0); if (entity1 == null) return CommandExecutionResult.error("No such entity"); @@ -123,7 +123,7 @@ public class CommandCreateMap extends CommandMultilines2 final String key = line.substring(0, x).trim(); final String dest = line.substring(x + linkStr.length()).trim(); final Quark ident2 = diagram.quarkInContext(dest, false); - final EntityImp entity2 = (EntityImp) ident2.getData(); + final Entity entity2 = (Entity) ident2.getData(); if (entity2 == null) return CommandExecutionResult.error("No such entity " + ident2.getName()); @@ -138,7 +138,7 @@ public class CommandCreateMap extends CommandMultilines2 return CommandExecutionResult.ok(); } - private EntityImp executeArg0(AbstractEntityDiagram diagram, RegexResult line0) throws NoSuchColorException { + private Entity executeArg0(AbstractEntityDiagram diagram, RegexResult line0) throws NoSuchColorException { final String name = line0.get("NAME", 1); // final Quark ident = diagram.buildFromName(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(name)); // final Quark code = diagram.buildFromFullPath(name); @@ -157,7 +157,7 @@ public class CommandCreateMap extends CommandMultilines2 if (Display.isNull(display)) display = Display.getWithNewlines(name).withCreoleMode(CreoleMode.SIMPLE_LINE); - final EntityImp entity = diagram.reallyCreateLeaf(quark, display, LeafType.MAP, null); + final Entity entity = diagram.reallyCreateLeaf(quark, display, LeafType.MAP, null); if (stereotype != null) entity.setStereotype(Stereotype.build(stereotype, diagram.getSkinParam().getCircledCharacterRadius(), diagram.getSkinParam().getFont(null, false, FontParam.CIRCLED_CHARACTER), diff --git a/src/net/sourceforge/plantuml/openiconic/PSystemListOpenIconic.java b/src/net/sourceforge/plantuml/openiconic/PSystemListOpenIconic.java index 23f531a1b..bc2595a57 100644 --- a/src/net/sourceforge/plantuml/openiconic/PSystemListOpenIconic.java +++ b/src/net/sourceforge/plantuml/openiconic/PSystemListOpenIconic.java @@ -54,7 +54,7 @@ import net.sourceforge.plantuml.graphic.VerticalAlignment; import net.sourceforge.plantuml.openiconic.data.DummyIcon; public class PSystemListOpenIconic extends PlainDiagram { - // ::remove file when WASM + // ::remove file when CORE public PSystemListOpenIconic(UmlSource source) { super(source); diff --git a/src/net/sourceforge/plantuml/openiconic/PSystemListOpenIconicFactory.java b/src/net/sourceforge/plantuml/openiconic/PSystemListOpenIconicFactory.java index 96f4d7c0f..d2815e021 100644 --- a/src/net/sourceforge/plantuml/openiconic/PSystemListOpenIconicFactory.java +++ b/src/net/sourceforge/plantuml/openiconic/PSystemListOpenIconicFactory.java @@ -41,7 +41,7 @@ import net.sourceforge.plantuml.command.PSystemSingleLineFactory; import net.sourceforge.plantuml.core.UmlSource; public class PSystemListOpenIconicFactory extends PSystemSingleLineFactory { - // ::remove file when WASM + // ::remove file when CORE @Override protected AbstractPSystem executeLine(UmlSource source, String line) { diff --git a/src/net/sourceforge/plantuml/openiconic/PSystemOpenIconic.java b/src/net/sourceforge/plantuml/openiconic/PSystemOpenIconic.java index 495d4da50..fe892f6ad 100644 --- a/src/net/sourceforge/plantuml/openiconic/PSystemOpenIconic.java +++ b/src/net/sourceforge/plantuml/openiconic/PSystemOpenIconic.java @@ -44,7 +44,7 @@ import net.sourceforge.plantuml.klimt.color.HColors; import net.sourceforge.plantuml.style.ClockwiseTopRightBottomLeft; public class PSystemOpenIconic extends PlainDiagram { - // ::remove file when WASM + // ::remove file when CORE private final String iconName; private final double factor; diff --git a/src/net/sourceforge/plantuml/openiconic/PSystemOpenIconicFactory.java b/src/net/sourceforge/plantuml/openiconic/PSystemOpenIconicFactory.java index 4007d7ac5..70f45482e 100644 --- a/src/net/sourceforge/plantuml/openiconic/PSystemOpenIconicFactory.java +++ b/src/net/sourceforge/plantuml/openiconic/PSystemOpenIconicFactory.java @@ -41,7 +41,7 @@ import net.sourceforge.plantuml.command.PSystemSingleLineFactory; import net.sourceforge.plantuml.core.UmlSource; public class PSystemOpenIconicFactory extends PSystemSingleLineFactory { - // ::remove file when WASM + // ::remove file when CORE @Override protected AbstractPSystem executeLine(UmlSource source, String line) { diff --git a/src/net/sourceforge/plantuml/oregon/BasicGame.java b/src/net/sourceforge/plantuml/oregon/BasicGame.java index 65dba6525..0cbb61101 100644 --- a/src/net/sourceforge/plantuml/oregon/BasicGame.java +++ b/src/net/sourceforge/plantuml/oregon/BasicGame.java @@ -36,7 +36,7 @@ package net.sourceforge.plantuml.oregon; public interface BasicGame { - // ::remove folder when WASM + // ::remove folder when CORE void run(Keyboard keyboard) throws NoInputException; diff --git a/src/net/sourceforge/plantuml/pdf/PdfConverter.java b/src/net/sourceforge/plantuml/pdf/PdfConverter.java index 8510ed328..5231c7fa0 100644 --- a/src/net/sourceforge/plantuml/pdf/PdfConverter.java +++ b/src/net/sourceforge/plantuml/pdf/PdfConverter.java @@ -41,7 +41,7 @@ import java.lang.reflect.Method; import net.sourceforge.plantuml.log.Logme; public class PdfConverter { - // ::remove folder when WASM + // ::remove folder when CORE public static void convert(File svgFile, File pdfFile) { diff --git a/src/net/sourceforge/plantuml/picoweb/PicoWebServer.java b/src/net/sourceforge/plantuml/picoweb/PicoWebServer.java index 774a630e0..c7daeb8df 100644 --- a/src/net/sourceforge/plantuml/picoweb/PicoWebServer.java +++ b/src/net/sourceforge/plantuml/picoweb/PicoWebServer.java @@ -77,7 +77,7 @@ import net.sourceforge.plantuml.utils.LineLocationImpl; import net.sourceforge.plantuml.version.Version; public class PicoWebServer implements Runnable { - // ::remove folder when WASM + // ::remove folder when CORE private final Socket connect; private static boolean enableStop; diff --git a/src/net/sourceforge/plantuml/png/Metadata.java b/src/net/sourceforge/plantuml/png/Metadata.java index 251ceb2b9..b8e78347a 100644 --- a/src/net/sourceforge/plantuml/png/Metadata.java +++ b/src/net/sourceforge/plantuml/png/Metadata.java @@ -49,7 +49,7 @@ import net.sourceforge.plantuml.security.SFile; import net.sourceforge.plantuml.security.SImageIO; public class Metadata { - // ::remove file when WASM + // ::remove file when CORE public static void main(String[] args) throws IOException { final Metadata meta = new Metadata(); diff --git a/src/net/sourceforge/plantuml/png/MetadataTag.java b/src/net/sourceforge/plantuml/png/MetadataTag.java index 5217ad4aa..564f2222b 100644 --- a/src/net/sourceforge/plantuml/png/MetadataTag.java +++ b/src/net/sourceforge/plantuml/png/MetadataTag.java @@ -51,7 +51,7 @@ import net.sourceforge.plantuml.security.SFile; import net.sourceforge.plantuml.security.SImageIO; public class MetadataTag { - // ::remove file when WASM + // ::remove file when CORE private final Object source; private final String tag; diff --git a/src/net/sourceforge/plantuml/png/PngFlashcoder.java b/src/net/sourceforge/plantuml/png/PngFlashcoder.java index 05bb9dc54..3a3845460 100644 --- a/src/net/sourceforge/plantuml/png/PngFlashcoder.java +++ b/src/net/sourceforge/plantuml/png/PngFlashcoder.java @@ -43,7 +43,7 @@ import java.util.List; import net.sourceforge.plantuml.klimt.UAntiAliasing; public class PngFlashcoder { - // ::remove file when WASM + // ::remove file when CORE private final List flashcodes; diff --git a/src/net/sourceforge/plantuml/png/PngIO.java b/src/net/sourceforge/plantuml/png/PngIO.java index b05fb25b7..17724e37e 100644 --- a/src/net/sourceforge/plantuml/png/PngIO.java +++ b/src/net/sourceforge/plantuml/png/PngIO.java @@ -48,7 +48,7 @@ import net.sourceforge.plantuml.utils.Log; public class PngIO { - // ::comment when WASM + // ::comment when CORE private static final String copyleft = "Generated by http://plantuml.com"; public static boolean USE_QUANTIZATION = false; // ::done @@ -74,14 +74,14 @@ public class PngIO { private static void write(RenderedImage image, ColorMapper mapper, OutputStream os, String metadata, int dpi, String debugData) throws IOException { - // ::comment when WASM + // ::comment when CORE if (USE_QUANTIZATION) image = Quantizer.quantizeNow(mapper, (BufferedImage) image); if (metadata == null) // ::done SImageIO.write(image, "png", os); - // ::comment when WASM + // ::comment when CORE else PngIOMetadata.writeWithMetadata(image, os, metadata, dpi, debugData); // ::done diff --git a/src/net/sourceforge/plantuml/png/PngRotation.java b/src/net/sourceforge/plantuml/png/PngRotation.java index cd5dbcd49..faef16898 100644 --- a/src/net/sourceforge/plantuml/png/PngRotation.java +++ b/src/net/sourceforge/plantuml/png/PngRotation.java @@ -42,7 +42,7 @@ import java.awt.image.BufferedImage; import net.sourceforge.plantuml.utils.Log; public class PngRotation { - // ::remove file when WASM + // ::remove file when CORE public static BufferedImage process(BufferedImage im) { diff --git a/src/net/sourceforge/plantuml/png/PngSplitter.java b/src/net/sourceforge/plantuml/png/PngSplitter.java index 373980f97..449a716c0 100644 --- a/src/net/sourceforge/plantuml/png/PngSplitter.java +++ b/src/net/sourceforge/plantuml/png/PngSplitter.java @@ -50,7 +50,7 @@ import net.sourceforge.plantuml.security.SImageIO; import net.sourceforge.plantuml.utils.Log; public class PngSplitter { - // ::remove file when WASM + // ::remove file when CORE private final List files = new ArrayList<>(); diff --git a/src/net/sourceforge/plantuml/posimo/GraphvizSolverB.java b/src/net/sourceforge/plantuml/posimo/GraphvizSolverB.java index dde71b3c1..8524f63ec 100644 --- a/src/net/sourceforge/plantuml/posimo/GraphvizSolverB.java +++ b/src/net/sourceforge/plantuml/posimo/GraphvizSolverB.java @@ -57,7 +57,7 @@ import net.sourceforge.plantuml.svek.SvgResult; import net.sourceforge.plantuml.svek.YDelta; public class GraphvizSolverB { - // ::remove file when WASM + // ::remove file when CORE // static private void traceDotString(String dotString) throws IOException { // final File f = SecurityUtils.File("dottmpfile" + UniqueSequence.getValue() + diff --git a/src/net/sourceforge/plantuml/preproc/ImportedFiles.java b/src/net/sourceforge/plantuml/preproc/ImportedFiles.java index e331c3d81..517a890c8 100644 --- a/src/net/sourceforge/plantuml/preproc/ImportedFiles.java +++ b/src/net/sourceforge/plantuml/preproc/ImportedFiles.java @@ -48,7 +48,7 @@ import net.sourceforge.plantuml.OptionFlags; import net.sourceforge.plantuml.security.SFile; import net.sourceforge.plantuml.security.SecurityUtils; import net.sourceforge.plantuml.utils.Log; -// ::uncomment when WASM +// ::uncomment when CORE //import java.util.Collections; // ::done @@ -110,7 +110,7 @@ public class ImportedFiles { public List getPath() { final List result = new ArrayList<>(imported); - // ::comment when WASM + // ::comment when CORE result.addAll(includePath()); result.addAll(SecurityUtils.getPath(SecurityUtils.PATHS_CLASSES)); // ::done @@ -118,10 +118,10 @@ public class ImportedFiles { } private List includePath() { - // ::comment when WASM + // ::comment when CORE return SecurityUtils.getPath(SecurityUtils.PATHS_INCLUDES); // ::done - // ::uncomment when WASM + // ::uncomment when CORE // return Collections.emptyList(); // ::done } diff --git a/src/net/sourceforge/plantuml/preproc/Stdlib.java b/src/net/sourceforge/plantuml/preproc/Stdlib.java index b734ddaf0..81c845933 100644 --- a/src/net/sourceforge/plantuml/preproc/Stdlib.java +++ b/src/net/sourceforge/plantuml/preproc/Stdlib.java @@ -32,7 +32,7 @@ import net.sourceforge.plantuml.creole.atom.AtomImg; import net.sourceforge.plantuml.log.Logme; import net.sourceforge.plantuml.security.SFile; import net.sourceforge.plantuml.utils.Log; -// ::uncomment when WASM +// ::uncomment when CORE //import java.io.FileInputStream; //import java.io.FileNotFoundException; //import com.plantuml.wasm.RunInit; @@ -40,7 +40,7 @@ import net.sourceforge.plantuml.utils.Log; public class Stdlib { - // ::uncomment when WASM + // ::uncomment when CORE // public static InputStream getResourceAsStream(String fullname) { // fullname = fullname.replace(".puml", ""); // fullname = fullname.replace("awslib/", "awslib14/"); @@ -57,7 +57,7 @@ public class Stdlib { // } // ::done - // ::comment when WASM + // ::comment when CORE private static final Map all = new ConcurrentHashMap(); private static final String SEPARATOR = "\uF8FF"; private static final Pattern sizePattern = Pattern.compile("\\[(\\d+)x(\\d+)/16\\]"); diff --git a/src/net/sourceforge/plantuml/quantization/Quantizer.java b/src/net/sourceforge/plantuml/quantization/Quantizer.java index 4ca477ac6..6862220f0 100644 --- a/src/net/sourceforge/plantuml/quantization/Quantizer.java +++ b/src/net/sourceforge/plantuml/quantization/Quantizer.java @@ -7,7 +7,7 @@ import java.util.Set; import net.sourceforge.plantuml.klimt.color.ColorMapper; public final class Quantizer { - // ::remove folder when WASM + // ::remove folder when CORE private static final int MAX_COLOR_COUNT = 256; private static QImage quantizeNow(QImage image) throws IOException { diff --git a/src/net/sourceforge/plantuml/sdot/CucaDiagramFileMakerSmetana.java b/src/net/sourceforge/plantuml/sdot/CucaDiagramFileMakerSmetana.java index f18c8f133..f39ff12c9 100644 --- a/src/net/sourceforge/plantuml/sdot/CucaDiagramFileMakerSmetana.java +++ b/src/net/sourceforge/plantuml/sdot/CucaDiagramFileMakerSmetana.java @@ -68,12 +68,13 @@ import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.api.ImageDataSimple; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XPoint2D; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.baraye.EntityFactory; -import net.sourceforge.plantuml.baraye.EntityImp; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.GroupType; import net.sourceforge.plantuml.cucadiagram.ICucaDiagram; +import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.QuoteUtils; @@ -111,9 +112,9 @@ public class CucaDiagramFileMakerSmetana implements CucaDiagramFileMaker { private final ICucaDiagram diagram; private final StringBounder stringBounder; - private final Map nodes = new LinkedHashMap(); + private final Map nodes = new LinkedHashMap(); private final Map edges = new LinkedHashMap(); - private final Map clusters = new LinkedHashMap(); + private final Map clusters = new LinkedHashMap(); private final DotStringFactory dotStringFactory; @@ -135,11 +136,11 @@ public class CucaDiagramFileMakerSmetana implements CucaDiagramFileMaker { ug = ug.apply(new UTranslate(6 - minMax.getMinX(), 6)); } - for (Map.Entry ent : clusters.entrySet()) + for (Map.Entry ent : clusters.entrySet()) drawGroup(ug, ymirror, ent.getKey(), ent.getValue()); - for (Map.Entry ent : nodes.entrySet()) { - final EntityImp leaf = ent.getKey(); + for (Map.Entry ent : nodes.entrySet()) { + final Entity leaf = ent.getKey(); final ST_Agnode_s agnode = ent.getValue(); final XPoint2D corner = getCorner(agnode); @@ -195,7 +196,7 @@ public class CucaDiagramFileMakerSmetana implements CucaDiagramFileMaker { } - public void drawGroup(UGraphic ug, YMirror ymirror, EntityImp group, ST_Agraph_s gr) { + public void drawGroup(UGraphic ug, YMirror ymirror, Entity group, ST_Agraph_s gr) { JUtils.LOG2("drawGroup"); try { final ST_Agrec_s tmp1 = Macro.AGDATA(gr); @@ -229,38 +230,36 @@ public class CucaDiagramFileMakerSmetana implements CucaDiagramFileMaker { } } - private void printAllSubgroups(EntityImp parent) { - for (EntityImp g : diagram.getChildrenGroups(parent)) { + private void printAllSubgroups(Entity parent) { + for (Entity g : diagram.getChildrenGroups(parent)) { if (g.isRemoved()) continue; if (diagram.isEmpty(g) && g.getGroupType() == GroupType.PACKAGE) { - final ISkinParam skinParam = diagram.getSkinParam(); - final EntityFactory entityFactory = diagram.getEntityFactory(); - final EntityImp folder = entityFactory.createLeafForEmptyGroup(g, skinParam); - printEntityNew(folder); + g.muteToType(LeafType.EMPTY_PACKAGE); + printEntityNew(g); } else { printSingleGroup(g); } } } - private void printSingleGroup(EntityImp g) { + private void printSingleGroup(Entity g) { if (g.getGroupType() == GroupType.CONCURRENT_STATE) return; - final ClusterHeader clusterHeader = new ClusterHeader((EntityImp) g, diagram.getSkinParam(), diagram, + final ClusterHeader clusterHeader = new ClusterHeader((Entity) g, diagram.getSkinParam(), diagram, stringBounder); dotStringFactory.openCluster(g, clusterHeader); - this.printEntities(g.getLeafsDirect()); + this.printEntities(g.leafs()); printAllSubgroups(g); dotStringFactory.closeCluster(); } - private void printEntities(Collection entities) { - for (EntityImp ent : entities) { + private void printEntities(Collection entities) { + for (Entity ent : entities) { if (ent.isRemoved()) continue; @@ -268,15 +267,15 @@ public class CucaDiagramFileMakerSmetana implements CucaDiagramFileMaker { } } - private void exportEntities(ST_Agraph_s g, Collection entities) { - for (EntityImp ent : entities) { + private void exportEntities(ST_Agraph_s g, Collection entities) { + for (Entity ent : entities) { if (ent.isRemoved()) continue; exportEntity(g, ent); } } - private void exportEntity(ST_Agraph_s g, EntityImp leaf) { + private void exportEntity(ST_Agraph_s g, Entity leaf) { final SvekNode node = dotStringFactory.getBibliotekon().getNode(leaf); if (node == null) { System.err.println("CANNOT FIND NODE"); @@ -293,7 +292,7 @@ public class CucaDiagramFileMakerSmetana implements CucaDiagramFileMaker { nodes.put(leaf, agnode); } - private void printEntity(EntityImp ent) { + private void printEntity(Entity ent) { if (ent.isRemoved()) throw new IllegalStateException(); @@ -303,9 +302,9 @@ public class CucaDiagramFileMakerSmetana implements CucaDiagramFileMaker { dotStringFactory.addNode(node); } - private Collection getUnpackagedEntities() { - final List result = new ArrayList<>(); - for (EntityImp ent : diagram.getLeafsvalues()) + private Collection getUnpackagedEntities() { + final List result = new ArrayList<>(); + for (Entity ent : diagram.getEntityFactory().leafs()) if (diagram.getEntityFactory().getRootGroup() == ent.getParentContainer()) result.add(ent); @@ -320,7 +319,7 @@ public class CucaDiagramFileMakerSmetana implements CucaDiagramFileMaker { final String height = "" + (node.getHeight() / 72); agsafeset(agnode, new CString("width"), new CString(width), new CString("")); agsafeset(agnode, new CString("height"), new CString(height), new CString("")); - final EntityImp leaf = dotStringFactory.getBibliotekon().getLeaf(node); + final Entity leaf = dotStringFactory.getBibliotekon().getLeaf(node); nodes.put(leaf, agnode); } @@ -340,7 +339,7 @@ public class CucaDiagramFileMakerSmetana implements CucaDiagramFileMaker { @Override public ImageData createOneGraphic(UGraphic ug) { - for (EntityImp leaf : diagram.getLeafsvalues()) + for (Entity leaf : diagram.getEntityFactory().leafs()) printEntityNew(leaf); Z.open(); @@ -360,7 +359,7 @@ public class CucaDiagramFileMakerSmetana implements CucaDiagramFileMaker { private ImageData createFileLocked(OutputStream os, List dotStrings, FileFormatOption fileFormatOption) throws IOException { - for (EntityImp leaf : diagram.getLeafsvalues()) + for (Entity leaf : diagram.getEntityFactory().leafs()) printEntityNew(leaf); Z.open(); @@ -423,15 +422,15 @@ public class CucaDiagramFileMakerSmetana implements CucaDiagramFileMaker { return drawable; } - private void exportGroups(ST_Agraph_s graph, EntityImp parent) { - for (EntityImp g : diagram.getChildrenGroups(parent)) { + private void exportGroups(ST_Agraph_s graph, Entity parent) { + for (Entity g : diagram.getChildrenGroups(parent)) { if (g.isRemoved()) continue; if (diagram.isEmpty(g) && g.getGroupType() == GroupType.PACKAGE) { - final EntityFactory entityFactory = diagram.getEntityFactory(); - final EntityImp folder = entityFactory.getLeafForEmptyGroup(g); - exportEntity(graph, folder); + // final EntityFactory entityFactory = diagram.getEntityFactory(); + // final EntityImp folder = entityFactory.getLeafForEmptyGroup(g); + exportEntity(graph, g); } else { exportGroup(graph, g); } @@ -439,7 +438,7 @@ public class CucaDiagramFileMakerSmetana implements CucaDiagramFileMaker { } - private void exportGroup(ST_Agraph_s graph, EntityImp group) { + private void exportGroup(ST_Agraph_s graph, Entity group) { final Cluster cluster = getBibliotekon().getCluster(group); if (cluster == null) { System.err.println("CucaDiagramFileMakerJDot::exportGroup issue"); @@ -453,7 +452,7 @@ public class CucaDiagramFileMakerSmetana implements CucaDiagramFileMaker { agsafeset(cluster1, new CString("label"), Macro.createHackInitDimensionFromLabel((int) width, (int) height), new CString("")); } - this.exportEntities(cluster1, group.getLeafsDirect()); + this.exportEntities(cluster1, group.leafs()); this.clusters.put(group, cluster1); this.exportGroups(cluster1, group); } @@ -494,14 +493,14 @@ public class CucaDiagramFileMakerSmetana implements CucaDiagramFileMaker { return TextBlockUtils.withMargin(label, marginLabel, marginLabel); } - private ST_Agnode_s getAgnodeFromLeaf(EntityImp entity) { + private ST_Agnode_s getAgnodeFromLeaf(Entity entity) { final ST_Agnode_s n = nodes.get(entity); if (n != null) return n; try { - final String id = getBibliotekon().getNodeUid((EntityImp) entity); - for (Map.Entry ent : nodes.entrySet()) + final String id = getBibliotekon().getNodeUid((Entity) entity); + for (Map.Entry ent : nodes.entrySet()) if (id.equals(getBibliotekon().getNodeUid(ent.getKey()))) return ent.getValue(); @@ -582,7 +581,7 @@ public class CucaDiagramFileMakerSmetana implements CucaDiagramFileMaker { return strings; } - private void printEntityNew(EntityImp ent) { + private void printEntityNew(Entity ent) { if (ent.isRemoved()) { System.err.println("Jdot STRANGE: entity is removed"); return; @@ -597,7 +596,7 @@ public class CucaDiagramFileMakerSmetana implements CucaDiagramFileMaker { return dotStringFactory.getBibliotekon(); } - private IEntityImage printEntityInternal(EntityImp ent) { + private IEntityImage printEntityInternal(Entity ent) { if (ent.isRemoved()) throw new IllegalStateException(); diff --git a/src/net/sourceforge/plantuml/security/SFile.java b/src/net/sourceforge/plantuml/security/SFile.java index 3ab923bbe..d430b177b 100644 --- a/src/net/sourceforge/plantuml/security/SFile.java +++ b/src/net/sourceforge/plantuml/security/SFile.java @@ -258,7 +258,7 @@ public class SFile implements Comparable { * Check SecurityProfile to see if this file can be open. */ private boolean isFileOk() { - // ::comment when WASM + // ::comment when CORE if (SecurityUtils.getSecurityProfile() == SecurityProfile.SANDBOX) // In SANDBOX, we cannot read any files return false; @@ -316,7 +316,7 @@ public class SFile implements Comparable { * @throws IOException If an I/O error occurs, which is possible because the * check the pathname may require filesystem queries */ - // ::comment when WASM + // ::comment when CORE private boolean isDenied() throws IOException { SFile securityPath = SecurityUtils.getSecurityPath(); if (securityPath == null) @@ -354,7 +354,7 @@ public class SFile implements Comparable { // https://stackoverflow.com/questions/18743790/can-java-load-images-with-transparency if (isFileOk()) try { - // ::comment when WASM + // ::comment when CORE if (internal.getName().endsWith(".webp")) return readWebp(); else @@ -366,7 +366,7 @@ public class SFile implements Comparable { return null; } - // ::comment when WASM + // ::comment when CORE private BufferedImage readWebp() throws IOException { try (InputStream is = openFile()) { final int riff = read32(is); diff --git a/src/net/sourceforge/plantuml/security/SURL.java b/src/net/sourceforge/plantuml/security/SURL.java index dc19a62f2..846a8a631 100644 --- a/src/net/sourceforge/plantuml/security/SURL.java +++ b/src/net/sourceforge/plantuml/security/SURL.java @@ -72,7 +72,7 @@ import net.sourceforge.plantuml.log.Logme; import net.sourceforge.plantuml.security.authentication.SecurityAccessInterceptor; import net.sourceforge.plantuml.security.authentication.SecurityAuthentication; import net.sourceforge.plantuml.security.authentication.SecurityCredentials; -//::uncomment when WASM +//::uncomment when CORE //import net.sourceforge.plantuml.FileUtils; //::done @@ -161,7 +161,7 @@ public class SURL { if (url == null) throw new MalformedURLException("URL cannot be null"); - // ::comment when WASM + // ::comment when CORE final String credentialId = url.getUserInfo(); if (credentialId == null || credentialId.indexOf(':') > 0) @@ -176,7 +176,7 @@ public class SURL { return new SURL(url, WITHOUT_AUTHENTICATION); } - // ::uncomment when WASM + // ::uncomment when CORE // public InputStream openStream() { // try { // return internal.openStream(); @@ -217,7 +217,7 @@ public class SURL { * Check SecurityProfile to see if this URL can be opened. */ private boolean isUrlOk() { - // ::comment when WASM + // ::comment when CORE if (SecurityUtils.getSecurityProfile() == SecurityProfile.SANDBOX) // In SANDBOX, we cannot read any URL return false; @@ -232,7 +232,7 @@ public class SURL { if (isInUrlAllowList()) // ::done return true; - // ::comment when WASM + // ::comment when CORE if (SecurityUtils.getSecurityProfile() == SecurityProfile.INTERNET) { if (forbiddenURL(cleanPath(internal.toString()))) @@ -248,7 +248,7 @@ public class SURL { - // ::comment when WASM + // ::comment when CORE /** * Regex to remove the UserInfo part from a URL. */ diff --git a/src/net/sourceforge/plantuml/security/SecurityProfile.java b/src/net/sourceforge/plantuml/security/SecurityProfile.java index 78c65dfd1..3807c9b30 100644 --- a/src/net/sourceforge/plantuml/security/SecurityProfile.java +++ b/src/net/sourceforge/plantuml/security/SecurityProfile.java @@ -105,7 +105,7 @@ public enum SecurityProfile { * @return the value */ static SecurityProfile init() { - // ::comment when WASM + // ::comment when CORE final String env = SecurityUtils.getenv("PLANTUML_SECURITY_PROFILE"); if ("SANDBOX".equalsIgnoreCase(env)) return SANDBOX; @@ -116,7 +116,7 @@ public enum SecurityProfile { else if ("UNSECURE".equalsIgnoreCase(env)) // ::done return UNSECURE; - // ::comment when WASM + // ::comment when CORE return LEGACY; // ::done diff --git a/src/net/sourceforge/plantuml/security/SecurityUtils.java b/src/net/sourceforge/plantuml/security/SecurityUtils.java index 8d4920946..01ce5a48d 100644 --- a/src/net/sourceforge/plantuml/security/SecurityUtils.java +++ b/src/net/sourceforge/plantuml/security/SecurityUtils.java @@ -78,14 +78,14 @@ import net.sourceforge.plantuml.utils.Log; public class SecurityUtils { - // ::uncomment when WASM + // ::uncomment when CORE // public static SecurityProfile getSecurityProfile() { // return SecurityProfile.UNSECURE; // } // ::done public static boolean ignoreThisLink(String url) { - // ::comment when WASM + // ::comment when CORE if (allowJavascriptInLink() == false && isJavascriptLink(url)) return true; // ::done @@ -109,7 +109,7 @@ public class SecurityUtils { return image; } - // ::comment when WASM + // ::comment when CORE /** * Java class paths to import files from. */ diff --git a/src/net/sourceforge/plantuml/security/authentication/SecurityAccessInterceptor.java b/src/net/sourceforge/plantuml/security/authentication/SecurityAccessInterceptor.java index 591f15e1a..a9290fc4b 100644 --- a/src/net/sourceforge/plantuml/security/authentication/SecurityAccessInterceptor.java +++ b/src/net/sourceforge/plantuml/security/authentication/SecurityAccessInterceptor.java @@ -45,7 +45,7 @@ import java.net.URLConnection; * @author Aljoscha Rittner */ public interface SecurityAccessInterceptor { - // ::remove folder when WASM + // ::remove folder when CORE /** * Applies to a connection the authentication information. * diff --git a/src/net/sourceforge/plantuml/sequencediagram/SequenceDiagram.java b/src/net/sourceforge/plantuml/sequencediagram/SequenceDiagram.java index 2437cc6f8..bd96cfc3a 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/SequenceDiagram.java +++ b/src/net/sourceforge/plantuml/sequencediagram/SequenceDiagram.java @@ -254,7 +254,7 @@ public class SequenceDiagram extends UmlDiagram { private FileMaker getSequenceDiagramPngMaker(int index, FileFormatOption fileFormatOption) { final FileFormat fileFormat = fileFormatOption.getFileFormat(); - // ::comment when WASM + // ::comment when CORE if (fileFormat == FileFormat.ATXT || fileFormat == FileFormat.UTXT) return new SequenceDiagramTxtMaker(this, fileFormat); @@ -448,7 +448,7 @@ public class SequenceDiagram extends UmlDiagram { @Override public int getNbImages() { - // ::comment when WASM + // ::comment when CORE try { // The DEBUG StringBounder is ok just to compute the number of pages here. return getSequenceDiagramPngMaker(1, new FileFormatOption(FileFormat.DEBUG)).getNbPages(); @@ -456,7 +456,7 @@ public class SequenceDiagram extends UmlDiagram { Logme.error(t); // ::done return 1; - // ::comment when WASM + // ::comment when CORE } // ::done } diff --git a/src/net/sourceforge/plantuml/sequencediagram/graphic/DrawableSet.java b/src/net/sourceforge/plantuml/sequencediagram/graphic/DrawableSet.java index ee06a14f3..1fd048511 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/graphic/DrawableSet.java +++ b/src/net/sourceforge/plantuml/sequencediagram/graphic/DrawableSet.java @@ -297,10 +297,10 @@ public class DrawableSet { private void drawLineU22(UGraphic ug, boolean showTail, Page page) { // http://plantuml.sourceforge.net/qa/?qa=4826/lifelines-broken-for-txt-seq-diagrams-when-create-is-used - // ::comment when WASM + // ::comment when CORE final boolean isTxt = ug instanceof UGraphicTxt; // ::done - // ::uncomment when WASM + // ::uncomment when CORE // final boolean isTxt = false; // ::done for (LivingParticipantBox box : getAllLivingParticipantBox()) { diff --git a/src/net/sourceforge/plantuml/sequencediagram/graphic/SequenceDiagramTxtMaker.java b/src/net/sourceforge/plantuml/sequencediagram/graphic/SequenceDiagramTxtMaker.java index 62446de23..b77aaf087 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/graphic/SequenceDiagramTxtMaker.java +++ b/src/net/sourceforge/plantuml/sequencediagram/graphic/SequenceDiagramTxtMaker.java @@ -60,7 +60,7 @@ import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.txt.UGraphicTxt; public class SequenceDiagramTxtMaker implements FileMaker { - // ::remove file when WASM + // ::remove file when CORE private final SequenceDiagram diagram; private final DrawableSet drawableSet; diff --git a/src/net/sourceforge/plantuml/sprite/CommandStdlib.java b/src/net/sourceforge/plantuml/sprite/CommandStdlib.java index 17e9565cb..a25c6ca45 100644 --- a/src/net/sourceforge/plantuml/sprite/CommandStdlib.java +++ b/src/net/sourceforge/plantuml/sprite/CommandStdlib.java @@ -44,7 +44,7 @@ import net.sourceforge.plantuml.regex.RegexResult; import net.sourceforge.plantuml.utils.LineLocation; public class CommandStdlib extends SingleLineCommand2 { - // ::remove file when WASM + // ::remove file when CORE public CommandStdlib() { super(getRegexConcat()); diff --git a/src/net/sourceforge/plantuml/sprite/ListSpriteDiagram.java b/src/net/sourceforge/plantuml/sprite/ListSpriteDiagram.java index f469da431..c282f6c6c 100644 --- a/src/net/sourceforge/plantuml/sprite/ListSpriteDiagram.java +++ b/src/net/sourceforge/plantuml/sprite/ListSpriteDiagram.java @@ -60,7 +60,7 @@ import net.sourceforge.plantuml.ugraphic.ImageBuilder; import net.sourceforge.plantuml.ugraphic.UGraphic; public class ListSpriteDiagram extends UmlDiagram { - // ::remove file when WASM + // ::remove file when CORE public ListSpriteDiagram(UmlSource source, Map skinParam) { super(source, UmlDiagramType.HELP, skinParam); diff --git a/src/net/sourceforge/plantuml/sprite/ListSpriteDiagramFactory.java b/src/net/sourceforge/plantuml/sprite/ListSpriteDiagramFactory.java index 7b6dac5bd..7bf4b259c 100644 --- a/src/net/sourceforge/plantuml/sprite/ListSpriteDiagramFactory.java +++ b/src/net/sourceforge/plantuml/sprite/ListSpriteDiagramFactory.java @@ -44,7 +44,7 @@ import net.sourceforge.plantuml.command.PSystemCommandFactory; import net.sourceforge.plantuml.core.UmlSource; public class ListSpriteDiagramFactory extends PSystemCommandFactory { - // ::remove file when WASM + // ::remove file when CORE @Override protected void initCommandsList(List cmds) { diff --git a/src/net/sourceforge/plantuml/sprite/PSystemListInternalSprites.java b/src/net/sourceforge/plantuml/sprite/PSystemListInternalSprites.java index 47e3384a8..e48e5efd8 100644 --- a/src/net/sourceforge/plantuml/sprite/PSystemListInternalSprites.java +++ b/src/net/sourceforge/plantuml/sprite/PSystemListInternalSprites.java @@ -50,7 +50,7 @@ import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.graphic.VerticalAlignment; public class PSystemListInternalSprites extends PlainDiagram { - // ::remove file when WASM + // ::remove file when CORE public PSystemListInternalSprites(UmlSource source) { super(source); diff --git a/src/net/sourceforge/plantuml/sprite/PSystemListInternalSpritesFactory.java b/src/net/sourceforge/plantuml/sprite/PSystemListInternalSpritesFactory.java index 185d8278b..15a2c0107 100644 --- a/src/net/sourceforge/plantuml/sprite/PSystemListInternalSpritesFactory.java +++ b/src/net/sourceforge/plantuml/sprite/PSystemListInternalSpritesFactory.java @@ -41,7 +41,7 @@ import net.sourceforge.plantuml.command.PSystemSingleLineFactory; import net.sourceforge.plantuml.core.UmlSource; public class PSystemListInternalSpritesFactory extends PSystemSingleLineFactory { - // ::remove file when WASM + // ::remove file when CORE @Override protected AbstractPSystem executeLine(UmlSource source, String line) { diff --git a/src/net/sourceforge/plantuml/sprite/SpriteGrayLevel.java b/src/net/sourceforge/plantuml/sprite/SpriteGrayLevel.java index 111617fc0..b12bdbd5b 100644 --- a/src/net/sourceforge/plantuml/sprite/SpriteGrayLevel.java +++ b/src/net/sourceforge/plantuml/sprite/SpriteGrayLevel.java @@ -239,7 +239,7 @@ public enum SpriteGrayLevel { return result; } - // ::comment when WASM + // ::comment when CORE public List encodeZ(BufferedImage img) { final int width = img.getWidth(); final int height = img.getHeight(); diff --git a/src/net/sourceforge/plantuml/sprite/StdlibDiagram.java b/src/net/sourceforge/plantuml/sprite/StdlibDiagram.java index 6a9ebc3b7..eb629089d 100644 --- a/src/net/sourceforge/plantuml/sprite/StdlibDiagram.java +++ b/src/net/sourceforge/plantuml/sprite/StdlibDiagram.java @@ -69,7 +69,7 @@ import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.utils.BlocLines; public class StdlibDiagram extends UmlDiagram { - // ::remove file when WASM + // ::remove file when CORE private static final int WIDTH = 1800; private String name; diff --git a/src/net/sourceforge/plantuml/sprite/StdlibDiagramFactory.java b/src/net/sourceforge/plantuml/sprite/StdlibDiagramFactory.java index a3113f09f..3ecfcdadc 100644 --- a/src/net/sourceforge/plantuml/sprite/StdlibDiagramFactory.java +++ b/src/net/sourceforge/plantuml/sprite/StdlibDiagramFactory.java @@ -43,7 +43,7 @@ import net.sourceforge.plantuml.command.PSystemCommandFactory; import net.sourceforge.plantuml.core.UmlSource; public class StdlibDiagramFactory extends PSystemCommandFactory { - // ::remove file when WASM + // ::remove file when CORE @Override protected void initCommandsList(List cmds) { diff --git a/src/net/sourceforge/plantuml/statediagram/StateDiagram.java b/src/net/sourceforge/plantuml/statediagram/StateDiagram.java index 017ae1bdd..4923aabc6 100644 --- a/src/net/sourceforge/plantuml/statediagram/StateDiagram.java +++ b/src/net/sourceforge/plantuml/statediagram/StateDiagram.java @@ -38,15 +38,15 @@ package net.sourceforge.plantuml.statediagram; import java.util.Map; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.baraye.EntityUtils; -import net.sourceforge.plantuml.baraye.Quark; import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.GroupType; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Link; +import net.sourceforge.plantuml.plasma.Quark; public class StateDiagram extends AbstractEntityDiagram { @@ -69,7 +69,7 @@ public class StateDiagram extends AbstractEntityDiagram { return true; } // final IEntity existing = this.getLeafFromName(code.getName()); - final EntityImp existing = (EntityImp) code.getData(); + final Entity existing = (Entity) code.getData(); if (getCurrentGroup().getGroupType() == GroupType.CONCURRENT_STATE && getCurrentGroup() != existing.getParentContainer()) { return false; @@ -81,121 +81,101 @@ public class StateDiagram extends AbstractEntityDiagram { return true; } -// @Override -// protected IEntity getOrCreateLeaf2(Quark ident, Quark code, LeafType type, USymbol symbol) { -// if (checkConcurrentStateOk(code) == false) { -// throw new IllegalStateException("Concurrent State " + code); -// } -// if (type == null) { -// if (code.getName().startsWith("[*]")) -// throw new IllegalArgumentException(); -// -// if (isGroup(code.getName())) -// return getGroup(code.getName()); -// -// if (code.getData() != null) -// return (ILeaf) code.getData(); -// -// return reallyCreateLeaf(ident, Display.getWithNewlines(code.getName()), LeafType.STATE, null); -// } -// if (code.getData() != null) -// return (ILeaf) code.getData(); -// return reallyCreateLeaf(ident, Display.getWithNewlines(code.getName()), type, symbol); -// } - public EntityImp getStart() { - final EntityImp g = getCurrentGroup(); - if (g.getQuark().isRoot()) { + + public Entity getStart() { + final Entity g = getCurrentGroup(); + if (g.isRoot()) { final String idShort = "*start*"; final Quark quark = quarkInContext(cleanIdForQuark(idShort), false); if (quark.getData() == null) quark.setData(reallyCreateLeaf(quark, Display.getWithNewlines(""), LeafType.CIRCLE_START, null)); - return (EntityImp) quark.getData(); + return (Entity) quark.getData(); } - final String idShort = "*start*" + g.getCodeGetName(); + final String idShort = "*start*" + g.getName(); final Quark quark = quarkInContext(cleanIdForQuark(idShort), false); if (quark.getData() == null) quark.setData(reallyCreateLeaf(quark, Display.getWithNewlines(""), LeafType.CIRCLE_START, null)); - return (EntityImp) quark.getData(); + return (Entity) quark.getData(); } - public EntityImp getEnd() { - final EntityImp p = getCurrentGroup(); - if (p.getQuark().isRoot()) { + public Entity getEnd() { + final Entity p = getCurrentGroup(); + if (p.isRoot()) { final String idShort = "*end*"; final Quark quark = quarkInContext(cleanIdForQuark(idShort), false); if (quark.getData() == null) quark.setData(reallyCreateLeaf(quark, Display.getWithNewlines(""), LeafType.CIRCLE_END, null)); - return (EntityImp) quark.getData(); + return (Entity) quark.getData(); } - final String idShort = "*end*" + p.getCodeGetName(); + final String idShort = "*end*" + p.getName(); final Quark quark = quarkInContext(cleanIdForQuark(idShort), false); if (quark.getData() == null) quark.setData(reallyCreateLeaf(quark, Display.getWithNewlines(""), LeafType.CIRCLE_END, null)); - return (EntityImp) quark.getData(); + return (Entity) quark.getData(); } - public EntityImp getHistorical() { - final EntityImp g = getCurrentGroup(); - if (g.getQuark().isRoot()) { + public Entity getHistorical() { + final Entity g = getCurrentGroup(); + if (g.isRoot()) { final String idShort = "*historical*"; final Quark quark = quarkInContext(cleanIdForQuark(idShort), false); if (quark.getData() == null) quark.setData(reallyCreateLeaf(quark, Display.getWithNewlines(""), LeafType.PSEUDO_STATE, null)); - return (EntityImp) quark.getData(); + return (Entity) quark.getData(); } - final String idShort = "*historical*" + g.getCodeGetName(); + final String idShort = "*historical*" + g.getName(); final Quark quark = quarkInContext(cleanIdForQuark(idShort), false); if (quark.getData() == null) quark.setData(reallyCreateLeaf(quark, Display.getWithNewlines(""), LeafType.PSEUDO_STATE, null)); - return (EntityImp) quark.getData(); + return (Entity) quark.getData(); } - public EntityImp getHistorical(String idShort) { + public Entity getHistorical(String idShort) { final Quark quark = quarkInContext(cleanIdForQuark(idShort), false); gotoGroup(quark, Display.getWithNewlines(quark), GroupType.STATE); - final EntityImp g = getCurrentGroup(); - final String tmp = "*historical*" + g.getCodeGetName(); + final Entity g = getCurrentGroup(); + final String tmp = "*historical*" + g.getName(); final Quark ident = quarkInContext(tmp, false); - final EntityImp result = reallyCreateLeaf(ident, Display.getWithNewlines(ident), LeafType.PSEUDO_STATE, null); + final Entity result = reallyCreateLeaf(ident, Display.getWithNewlines(ident), LeafType.PSEUDO_STATE, null); endGroup(); return result; } - public EntityImp getDeepHistory() { - final EntityImp g = getCurrentGroup(); - if (g.getQuark().isRoot()) { + public Entity getDeepHistory() { + final Entity g = getCurrentGroup(); + if (g.isRoot()) { final String idShort = "*deephistory*"; final Quark quark = quarkInContext(cleanIdForQuark(idShort), false); if (quark.getData() == null) quark.setData(reallyCreateLeaf(quark, Display.getWithNewlines(""), LeafType.DEEP_HISTORY, null)); - return (EntityImp) quark.getData(); + return (Entity) quark.getData(); } - final String idShort = "*deephistory*" + g.getCodeGetName(); + final String idShort = "*deephistory*" + g.getName(); final Quark quark = quarkInContext(cleanIdForQuark(idShort), false); if (quark.getData() == null) quark.setData(reallyCreateLeaf(quark, Display.getWithNewlines(""), LeafType.DEEP_HISTORY, null)); - return (EntityImp) quark.getData(); + return (Entity) quark.getData(); } - public EntityImp getDeepHistory(String idShort) { + public Entity getDeepHistory(String idShort) { final Quark quark = quarkInContext(cleanIdForQuark(idShort), false); // final Quark codeGroup = buildFromFullPath(idShort); gotoGroup(quark, Display.getWithNewlines(quark), GroupType.STATE); - final EntityImp g = getCurrentGroup(); - final String tmp = "*deephistory*" + g.getCodeGetName(); + final Entity g = getCurrentGroup(); + final String tmp = "*deephistory*" + g.getName(); final Quark ident = quarkInContext(cleanIdForQuark(tmp), false); - final EntityImp result = reallyCreateLeaf(ident, Display.getWithNewlines(""), LeafType.DEEP_HISTORY, null); + final Entity result = reallyCreateLeaf(ident, Display.getWithNewlines(""), LeafType.DEEP_HISTORY, null); endGroup(); return result; } public boolean concurrentState(char direction) { - final EntityImp cur = getCurrentGroup(); + final Entity cur = getCurrentGroup(); // printlink("BEFORE"); - if (cur.getQuark().isRoot() == false && cur.getGroupType() == GroupType.CONCURRENT_STATE) { + if (cur.isRoot() == false && cur.getGroupType() == GroupType.CONCURRENT_STATE) { super.endGroup(); } getCurrentGroup().setConcurrentSeparator(direction); @@ -203,8 +183,8 @@ public class StateDiagram extends AbstractEntityDiagram { final Quark ident1 = quarkInContext(cleanIdForQuark(tmp1), false); gotoGroup(ident1, Display.create(""), GroupType.CONCURRENT_STATE); - final EntityImp conc1 = getCurrentGroup(); - if (cur.getQuark().isRoot() == false && cur.getGroupType() == GroupType.STATE) { + final Entity conc1 = getCurrentGroup(); + if (cur.isRoot() == false && cur.getGroupType() == GroupType.STATE) { // cur.moveEntitiesTo(conc1); getPlasma().moveAllChildOfToAnewFather(cur.getQuark(), conc1.getQuark()); super.endGroup(); @@ -228,8 +208,8 @@ public class StateDiagram extends AbstractEntityDiagram { @Override public boolean endGroup() { - final EntityImp cur = getCurrentGroup(); - if (cur.getQuark().isRoot() == false && cur.getGroupType() == GroupType.CONCURRENT_STATE) + final Entity cur = getCurrentGroup(); + if (cur.isRoot() == false && cur.getGroupType() == GroupType.CONCURRENT_STATE) super.endGroup(); return super.endGroup(); @@ -249,17 +229,17 @@ public class StateDiagram extends AbstractEntityDiagram { @Override public String checkFinalError() { for (Link link : this.getLinks()) { - final EntityImp parent1 = getGroupParentIfItIsConcurrentState(link.getEntity1()); - final EntityImp parent2 = getGroupParentIfItIsConcurrentState(link.getEntity2()); + final Entity parent1 = getGroupParentIfItIsConcurrentState(link.getEntity1()); + final Entity parent2 = getGroupParentIfItIsConcurrentState(link.getEntity2()); if (isCompatible(parent1, parent2) == false) { return "State within concurrent state cannot be linked out of this concurrent state (between " - + link.getEntity1().getCodeGetName() + " and " + link.getEntity2().getCodeGetName() + ")"; + + link.getEntity1().getName() + " and " + link.getEntity2().getName() + ")"; } } return super.checkFinalError(); } - private static boolean isCompatible(EntityImp parent1, EntityImp parent2) { + private static boolean isCompatible(Entity parent1, Entity parent2) { if (parent1 == null && parent2 == null) { return true; } @@ -270,8 +250,8 @@ public class StateDiagram extends AbstractEntityDiagram { return parent1 == parent2; } - private static EntityImp getGroupParentIfItIsConcurrentState(EntityImp ent) { - EntityImp parent = ent.getParentContainer(); + private static Entity getGroupParentIfItIsConcurrentState(Entity ent) { + Entity parent = ent.getParentContainer(); while (parent != null) { if (parent.getGroupType() == GroupType.CONCURRENT_STATE) { return parent; diff --git a/src/net/sourceforge/plantuml/statediagram/command/CommandAddField.java b/src/net/sourceforge/plantuml/statediagram/command/CommandAddField.java index fef5d4239..f28990e6e 100644 --- a/src/net/sourceforge/plantuml/statediagram/command/CommandAddField.java +++ b/src/net/sourceforge/plantuml/statediagram/command/CommandAddField.java @@ -35,13 +35,13 @@ */ package net.sourceforge.plantuml.statediagram.command; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -78,7 +78,7 @@ public class CommandAddField extends SingleLineCommand2 { else quark = diagram.quarkInContext(diagram.cleanIdForQuark(codeString), false); - EntityImp entity = (EntityImp) quark.getData(); + Entity entity = (Entity) quark.getData(); if (entity == null) entity = diagram.reallyCreateLeaf(quark, Display.getWithNewlines(quark), LeafType.STATE, null); diff --git a/src/net/sourceforge/plantuml/statediagram/command/CommandCreatePackage2.java b/src/net/sourceforge/plantuml/statediagram/command/CommandCreatePackage2.java index 98e2c4c8d..72df4c66b 100644 --- a/src/net/sourceforge/plantuml/statediagram/command/CommandCreatePackage2.java +++ b/src/net/sourceforge/plantuml/statediagram/command/CommandCreatePackage2.java @@ -35,8 +35,7 @@ */ package net.sourceforge.plantuml.statediagram.command; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.cucadiagram.Display; @@ -48,6 +47,7 @@ import net.sourceforge.plantuml.klimt.color.ColorParser; import net.sourceforge.plantuml.klimt.color.ColorType; import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -118,7 +118,7 @@ public class CommandCreatePackage2 extends SingleLineCommand2 { display = quark.getName(); diagram.gotoGroup(quark, Display.getWithNewlines(display), GroupType.PACKAGE); - final EntityImp p = diagram.getCurrentGroup(); + final Entity p = diagram.getCurrentGroup(); final String stereotype = arg.get("STEREOTYPE", 0); if (stereotype != null) p.setStereotype(Stereotype.build(stereotype)); diff --git a/src/net/sourceforge/plantuml/statediagram/command/CommandCreatePackageState.java b/src/net/sourceforge/plantuml/statediagram/command/CommandCreatePackageState.java index ab9eb1df4..ddaa7963a 100644 --- a/src/net/sourceforge/plantuml/statediagram/command/CommandCreatePackageState.java +++ b/src/net/sourceforge/plantuml/statediagram/command/CommandCreatePackageState.java @@ -35,8 +35,7 @@ */ package net.sourceforge.plantuml.statediagram.command; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.command.CommandCreateClassMultilines; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; @@ -49,6 +48,7 @@ import net.sourceforge.plantuml.klimt.color.ColorParser; import net.sourceforge.plantuml.klimt.color.ColorType; import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -124,7 +124,7 @@ public class CommandCreatePackageState extends SingleLineCommand2 display = quark.getName(); diagram.gotoGroup(quark, Display.getWithNewlines(display), GroupType.STATE); - final EntityImp p = diagram.getCurrentGroup(); + final Entity p = diagram.getCurrentGroup(); final String stereotype = arg.get("STEREOTYPE", 0); if (stereotype != null) p.setStereotype(Stereotype.build(stereotype)); diff --git a/src/net/sourceforge/plantuml/statediagram/command/CommandCreateState.java b/src/net/sourceforge/plantuml/statediagram/command/CommandCreateState.java index d870ee607..1498b77c4 100644 --- a/src/net/sourceforge/plantuml/statediagram/command/CommandCreateState.java +++ b/src/net/sourceforge/plantuml/statediagram/command/CommandCreateState.java @@ -35,8 +35,7 @@ */ package net.sourceforge.plantuml.statediagram.command; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.command.CommandCreateClassMultilines; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; @@ -49,6 +48,7 @@ import net.sourceforge.plantuml.klimt.color.ColorParser; import net.sourceforge.plantuml.klimt.color.ColorType; import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; @@ -129,7 +129,7 @@ public class CommandCreateState extends SingleLineCommand2 { return CommandExecutionResult.error("The state " + quark.getName() + " has been created in a concurrent state : it cannot be used here."); - EntityImp ent = (EntityImp) quark.getData(); + Entity ent = (Entity) quark.getData(); if (ent == null) ent = diagram.reallyCreateLeaf(quark, Display.getWithNewlines(display), type, null); diff --git a/src/net/sourceforge/plantuml/statediagram/command/CommandEndState.java b/src/net/sourceforge/plantuml/statediagram/command/CommandEndState.java index 892fe43d9..66df5b0a0 100644 --- a/src/net/sourceforge/plantuml/statediagram/command/CommandEndState.java +++ b/src/net/sourceforge/plantuml/statediagram/command/CommandEndState.java @@ -35,7 +35,7 @@ */ package net.sourceforge.plantuml.statediagram.command; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.regex.IRegex; @@ -59,7 +59,7 @@ public class CommandEndState extends SingleLineCommand2 { @Override protected CommandExecutionResult executeArg(StateDiagram diagram, LineLocation location, RegexResult arg) { - final EntityImp currentPackage = diagram.getCurrentGroup(); + final Entity currentPackage = diagram.getCurrentGroup(); if (currentPackage == null) { return CommandExecutionResult.error("No inner state defined"); } diff --git a/src/net/sourceforge/plantuml/statediagram/command/CommandLinkStateCommon.java b/src/net/sourceforge/plantuml/statediagram/command/CommandLinkStateCommon.java index b9f7592d5..394f57efd 100644 --- a/src/net/sourceforge/plantuml/statediagram/command/CommandLinkStateCommon.java +++ b/src/net/sourceforge/plantuml/statediagram/command/CommandLinkStateCommon.java @@ -37,8 +37,7 @@ package net.sourceforge.plantuml.statediagram.command; import net.sourceforge.plantuml.StringUtils; -import net.sourceforge.plantuml.baraye.EntityImp; -import net.sourceforge.plantuml.baraye.Quark; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.cucadiagram.Display; @@ -50,6 +49,7 @@ import net.sourceforge.plantuml.cucadiagram.LinkType; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.klimt.color.ColorType; import net.sourceforge.plantuml.klimt.color.NoSuchColorException; +import net.sourceforge.plantuml.plasma.Quark; import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; @@ -74,12 +74,12 @@ abstract class CommandLinkStateCommon extends SingleLineCommand2 { final String ent1 = arg.get("ENT1", 0); final String ent2 = arg.get("ENT2", 0); - final EntityImp cl1 = getEntityStart(diagram, ent1); + final Entity cl1 = getEntityStart(diagram, ent1); if (cl1 == null) return CommandExecutionResult .error("The state " + ent1 + " has been created in a concurrent state : it cannot be used here."); - final EntityImp cl2 = getEntityEnd(diagram, ent2); + final Entity cl2 = getEntityEnd(diagram, ent2); if (cl2 == null) return CommandExecutionResult .error("The state " + ent2 + " has been created in a concurrent state : it cannot be used here."); @@ -137,21 +137,21 @@ abstract class CommandLinkStateCommon extends SingleLineCommand2 { return null; } - private EntityImp getEntityStart(StateDiagram diagram, final String code) { + private Entity getEntityStart(StateDiagram diagram, final String code) { if (code.startsWith("[*]")) return diagram.getStart(); return getEntity(diagram, code); } - private EntityImp getEntityEnd(StateDiagram diagram, final String code) { + private Entity getEntityEnd(StateDiagram diagram, final String code) { if (code.startsWith("[*]")) return diagram.getEnd(); return getEntity(diagram, code); } - private EntityImp getEntity(StateDiagram diagram, final String code) { + private Entity getEntity(StateDiagram diagram, final String code) { if (code.equalsIgnoreCase("[H]")) return diagram.getHistorical(); @@ -168,19 +168,19 @@ abstract class CommandLinkStateCommon extends SingleLineCommand2 { final String codeString1 = removeEquals(code); final Quark quark = diagram.quarkInContext(diagram.cleanIdForQuark(codeString1), false); if (quark.getData() != null) - return (EntityImp) quark.getData(); + return (Entity) quark.getData(); return diagram.reallyCreateLeaf(quark, Display.getWithNewlines(quark), LeafType.SYNCHRO_BAR, null); } if (diagram.currentQuark().getName().equals(code) && diagram.currentQuark().getData() != null) - return (EntityImp) diagram.currentQuark().getData(); + return (Entity) diagram.currentQuark().getData(); final Quark quark = diagram.quarkInContext(diagram.cleanIdForQuark(code), false); if (diagram.checkConcurrentStateOk(quark) == false) return null; if (quark.getData() != null) - return (EntityImp) quark.getData(); + return (Entity) quark.getData(); return diagram.reallyCreateLeaf(quark, Display.getWithNewlines(quark.getName()), LeafType.STATE, null); } diff --git a/src/net/sourceforge/plantuml/stats/CreoleConverter.java b/src/net/sourceforge/plantuml/stats/CreoleConverter.java index c11ba4166..0c62ef623 100644 --- a/src/net/sourceforge/plantuml/stats/CreoleConverter.java +++ b/src/net/sourceforge/plantuml/stats/CreoleConverter.java @@ -47,7 +47,7 @@ import net.sourceforge.plantuml.stats.api.StatsLine; import net.sourceforge.plantuml.stats.api.StatsTable; public class CreoleConverter { - // ::remove folder when WASM + // ::remove folder when CORE private final DateFormat formatter = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM); diff --git a/src/net/sourceforge/plantuml/style/StyleLoader.java b/src/net/sourceforge/plantuml/style/StyleLoader.java index f0647cd09..58e868c3c 100644 --- a/src/net/sourceforge/plantuml/style/StyleLoader.java +++ b/src/net/sourceforge/plantuml/style/StyleLoader.java @@ -78,13 +78,13 @@ public class StyleLoader { } public static InputStream getInputStreamForStyle(String filename) throws IOException { - //::uncomment when WASM + //::uncomment when CORE // final String res = "/skin/" + filename; // final InputStream is = StyleLoader.class.getResourceAsStream(res); // return is; //::done - //::comment when WASM + //::comment when CORE InputStream internalIs = null; SFile localFile = new SFile(filename); Log.info("Trying to load style " + filename); diff --git a/src/net/sourceforge/plantuml/sudoku/GraphicsSudoku.java b/src/net/sourceforge/plantuml/sudoku/GraphicsSudoku.java index 4378d45b1..b39aa0078 100644 --- a/src/net/sourceforge/plantuml/sudoku/GraphicsSudoku.java +++ b/src/net/sourceforge/plantuml/sudoku/GraphicsSudoku.java @@ -78,7 +78,7 @@ public class GraphicsSudoku { this.sudoku = sudoku; } - // ::comment when WASM + // ::comment when CORE public ImageData writeImageEps(OutputStream os) throws IOException { final UGraphicEps ug = new UGraphicEps(HColors.WHITE, ColorMapper.IDENTITY, FileFormat.EPS_TEXT.getDefaultStringBounder(), EpsStrategy.WITH_MACRO_AND_TEXT); diff --git a/src/net/sourceforge/plantuml/sudoku/PSystemSudoku.java b/src/net/sourceforge/plantuml/sudoku/PSystemSudoku.java index cec866cd4..7dbf3e955 100644 --- a/src/net/sourceforge/plantuml/sudoku/PSystemSudoku.java +++ b/src/net/sourceforge/plantuml/sudoku/PSystemSudoku.java @@ -53,7 +53,7 @@ public class PSystemSudoku extends AbstractPSystem { final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat) throws IOException { final GraphicsSudoku sud = new GraphicsSudoku(sudoku); - // ::comment when WASM + // ::comment when CORE if (fileFormat.getFileFormat() == FileFormat.EPS) return sud.writeImageEps(os); diff --git a/src/net/sourceforge/plantuml/svek/AbstractEntityImage.java b/src/net/sourceforge/plantuml/svek/AbstractEntityImage.java index f48e4b48a..480589227 100644 --- a/src/net/sourceforge/plantuml/svek/AbstractEntityImage.java +++ b/src/net/sourceforge/plantuml/svek/AbstractEntityImage.java @@ -38,7 +38,7 @@ package net.sourceforge.plantuml.svek; import java.util.Objects; import net.sourceforge.plantuml.ISkinParam; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.klimt.color.HColor; @@ -46,10 +46,10 @@ import net.sourceforge.plantuml.klimt.font.StringBounder; public abstract class AbstractEntityImage extends AbstractTextBlock implements IEntityImage { - private final EntityImp entity; + private final Entity entity; private final ISkinParam skinParam; - public AbstractEntityImage(EntityImp entity, ISkinParam skinParam) { + public AbstractEntityImage(Entity entity, ISkinParam skinParam) { this.entity = Objects.requireNonNull(entity); this.skinParam = Objects.requireNonNull(skinParam); } @@ -59,7 +59,7 @@ public abstract class AbstractEntityImage extends AbstractTextBlock implements I return entity.isHidden(); } - protected final EntityImp getEntity() { + protected final Entity getEntity() { return entity; } diff --git a/src/net/sourceforge/plantuml/svek/Bibliotekon.java b/src/net/sourceforge/plantuml/svek/Bibliotekon.java index b10a297d1..e0694f177 100644 --- a/src/net/sourceforge/plantuml/svek/Bibliotekon.java +++ b/src/net/sourceforge/plantuml/svek/Bibliotekon.java @@ -43,7 +43,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.klimt.font.StringBounder; @@ -51,13 +51,13 @@ public class Bibliotekon { private final List allCluster = new ArrayList<>(); - private final Map nodeMap = new LinkedHashMap(); + private final Map nodeMap = new LinkedHashMap(); private final List lines0 = new ArrayList<>(); private final List lines1 = new ArrayList<>(); private final List allLines = new ArrayList<>(); - public SvekNode createNode(EntityImp ent, IEntityImage image, ColorSequence colorSequence, + public SvekNode createNode(Entity ent, IEntityImage image, ColorSequence colorSequence, StringBounder stringBounder) { final SvekNode node = new SvekNode(ent, image, colorSequence, stringBounder); nodeMap.put(ent, node); @@ -65,7 +65,7 @@ public class Bibliotekon { return node; } - public Cluster getCluster(EntityImp ent) { + public Cluster getCluster(Entity ent) { for (Cluster cl : allCluster) if (cl.getGroups().contains(ent)) return cl; @@ -106,11 +106,11 @@ public class Bibliotekon { allCluster.add(current); } - public SvekNode getNode(EntityImp ent) { + public SvekNode getNode(Entity ent) { return nodeMap.get(ent); } - public String getNodeUid(EntityImp ent) { + public String getNodeUid(Entity ent) { // System.err.println("Getting for " + ent); final SvekNode result = getNode(ent); if (result != null) { @@ -120,24 +120,20 @@ public class Bibliotekon { return uid; } - assert result == null; - if (ent.isGroup()) { - for (EntityImp i : nodeMap.keySet()) - if (ent.getQuark().equals(i.getQuark())) - return getNode(i).getUid(); + if (ent.isGroup()) return Cluster.getSpecialPointId(ent); - } + throw new IllegalStateException(); } public String getWarningOrError(int warningOrError) { final StringBuilder sb = new StringBuilder(); - for (Map.Entry ent : nodeMap.entrySet()) { + for (Map.Entry ent : nodeMap.entrySet()) { final SvekNode sh = ent.getValue(); final double maxX = sh.getMinX() + sh.getWidth(); if (maxX > warningOrError) { - final EntityImp entity = ent.getKey(); - sb.append(entity.getCodeGetName() + " is overpassing the width limit."); + final Entity entity = ent.getKey(); + sb.append(entity.getName() + " is overpassing the width limit."); sb.append("\n"); } @@ -147,11 +143,11 @@ public class Bibliotekon { public Map getMaxX() { final Map result = new HashMap(); - for (Map.Entry ent : nodeMap.entrySet()) { + for (Map.Entry ent : nodeMap.entrySet()) { final SvekNode sh = ent.getValue(); final double maxX = sh.getMinX() + sh.getWidth(); - final EntityImp entity = ent.getKey(); - result.put(entity.getCodeGetName(), maxX); + final Entity entity = ent.getKey(); + result.put(entity.getName(), maxX); } return Collections.unmodifiableMap(result); } @@ -176,7 +172,7 @@ public class Bibliotekon { return Collections.unmodifiableCollection(nodeMap.values()); } - public List getAllLineConnectedTo(EntityImp leaf) { + public List getAllLineConnectedTo(Entity leaf) { final List result = new ArrayList<>(); for (SvekLine line : allLines) if (line.isLinkFromOrTo(leaf)) @@ -193,9 +189,9 @@ public class Bibliotekon { throw new IllegalArgumentException(); } - public EntityImp getOnlyOther(EntityImp entity) { + public Entity getOnlyOther(Entity entity) { for (SvekLine line : allLines) { - final EntityImp other = line.getOther(entity); + final Entity other = line.getOther(entity); if (other != null) return other; @@ -203,8 +199,8 @@ public class Bibliotekon { return null; } - public EntityImp getLeaf(SvekNode node) { - for (Map.Entry ent : nodeMap.entrySet()) + public Entity getLeaf(SvekNode node) { + for (Map.Entry ent : nodeMap.entrySet()) if (ent.getValue() == node) return ent.getKey(); diff --git a/src/net/sourceforge/plantuml/svek/Cluster.java b/src/net/sourceforge/plantuml/svek/Cluster.java index ca961d407..81925c685 100644 --- a/src/net/sourceforge/plantuml/svek/Cluster.java +++ b/src/net/sourceforge/plantuml/svek/Cluster.java @@ -54,7 +54,7 @@ import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XPoint2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.command.Position; import net.sourceforge.plantuml.cucadiagram.CucaNote; import net.sourceforge.plantuml.cucadiagram.EntityPosition; @@ -97,7 +97,7 @@ public class Cluster implements Moveable { public final static String CENTER_ID = "za"; private final Cluster parentCluster; - private final EntityImp group; + private final Entity group; private final List nodes = new ArrayList<>(); private final List children = new ArrayList<>(); private final int color; @@ -137,12 +137,12 @@ public class Cluster implements Moveable { return Collections.unmodifiableSet(result); } - public Cluster(ICucaDiagram diagram, ColorSequence colorSequence, ISkinParam skinParam, EntityImp root) { + public Cluster(ICucaDiagram diagram, ColorSequence colorSequence, ISkinParam skinParam, Entity root) { this(diagram, null, colorSequence, skinParam, root); } private Cluster(ICucaDiagram diagram, Cluster parentCluster, ColorSequence colorSequence, ISkinParam skinParam, - EntityImp group) { + Entity group) { if (group == null) throw new IllegalStateException(); @@ -234,18 +234,18 @@ public class Cluster implements Moveable { } public Cluster createChild(ClusterHeader clusterHeader, ColorSequence colorSequence, ISkinParam skinParam, - EntityImp g) { + Entity g) { final Cluster child = new Cluster(diagram, this, colorSequence, skinParam, g); child.clusterHeader = clusterHeader; this.children.add(child); return child; } - public final Set getGroups() { + public final Set getGroups() { return Collections.singleton(group); } - final EntityImp getGroup() { + final Entity getGroup() { return group; } @@ -292,7 +292,7 @@ public class Cluster implements Moveable { getCucaNote(Position.BOTTOM).drawU(ug.apply(new UTranslate(xyNoteBottom))); } - final String fullName = group.getCodeGetName(); + final String fullName = group.getName(); if (fullName.startsWith("##") == false) ug.draw(new UComment("cluster " + fullName)); @@ -362,7 +362,7 @@ public class Cluster implements Moveable { skinParam.getCurrentStyleBuilder()); } - static public UStroke getStrokeInternal(EntityImp group, Style style) { + static public UStroke getStrokeInternal(Entity group, Style style) { final Colors colors = group.getColors(); if (colors.getSpecificLineStroke() != null) return colors.getSpecificLineStroke(); @@ -424,7 +424,7 @@ public class Cluster implements Moveable { final HColor imgBackcolor = EntityImageStateCommon.getStyleStateBody(group, skinParam) .value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet()); - final TextBlock attribute = ((EntityImp) group).getStateHeader(skinParam); + final TextBlock attribute = ((Entity) group).getStateHeader(skinParam); final double attributeHeight = attribute.calculateDimension(ug.getStringBounder()).getHeight(); if (total.getWidth() == 0) { System.err.println("Cluster::drawUState issue"); @@ -457,7 +457,7 @@ public class Cluster implements Moveable { this.clusterPosition = new ClusterPosition(min, max); } - // ::comment when WASM + // ::comment when CORE public boolean printCluster1(StringBuilder sb, Collection lines, StringBounder stringBounder) { final List tmp = getNodesOrderedTop(lines); if (tmp.size() == 0) @@ -567,7 +567,7 @@ public class Cluster implements Moveable { return "cluster" + color; } - static String getSpecialPointId(EntityImp group) { + static String getSpecialPointId(Entity group) { return CENTER_ID + group.getUid(); } @@ -598,7 +598,7 @@ public class Cluster implements Moveable { } private final HColor getBackColor(UmlDiagramType umlDiagramType, Style style) { - if (group.getQuark().isRoot()) + if (group.isRoot()) return null; final HColor result = group.getColors().getColor(ColorType.BACK); @@ -622,7 +622,7 @@ public class Cluster implements Moveable { // return parentCluster.getBackColor(umlDiagramType, style); } - boolean isClusterOf(EntityImp ent) { + boolean isClusterOf(Entity ent) { if (ent.isGroup() == false) return false; diff --git a/src/net/sourceforge/plantuml/svek/ClusterDotString.java b/src/net/sourceforge/plantuml/svek/ClusterDotString.java index a24723e66..276e6f2b3 100644 --- a/src/net/sourceforge/plantuml/svek/ClusterDotString.java +++ b/src/net/sourceforge/plantuml/svek/ClusterDotString.java @@ -55,7 +55,7 @@ import net.sourceforge.plantuml.klimt.font.StringBounder; import net.sourceforge.plantuml.klimt.geom.HorizontalAlignment; public class ClusterDotString { - // ::remove file when WASM + // ::remove file when CORE private final Cluster cluster; private final ISkinParam skinParam; diff --git a/src/net/sourceforge/plantuml/svek/ClusterDotStringKermor.java b/src/net/sourceforge/plantuml/svek/ClusterDotStringKermor.java index 2f51e49ab..bc56f18f9 100644 --- a/src/net/sourceforge/plantuml/svek/ClusterDotStringKermor.java +++ b/src/net/sourceforge/plantuml/svek/ClusterDotStringKermor.java @@ -56,7 +56,7 @@ import net.sourceforge.plantuml.klimt.font.StringBounder; import net.sourceforge.plantuml.klimt.geom.HorizontalAlignment; public class ClusterDotStringKermor { - // ::remove file when WASM + // ::remove file when CORE private final Cluster cluster; private final ISkinParam skinParam; diff --git a/src/net/sourceforge/plantuml/svek/ClusterHeader.java b/src/net/sourceforge/plantuml/svek/ClusterHeader.java index 5e60c79ce..b4b856e26 100644 --- a/src/net/sourceforge/plantuml/svek/ClusterHeader.java +++ b/src/net/sourceforge/plantuml/svek/ClusterHeader.java @@ -42,7 +42,7 @@ import java.util.List; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.ftile.EntityImageLegend; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.DisplayPositioned; import net.sourceforge.plantuml.cucadiagram.EntityPortion; @@ -66,14 +66,14 @@ public final class ClusterHeader { final private TextBlock title; final private TextBlock stereo; - public ClusterHeader(EntityImp g, ISkinParam skinParam, PortionShower portionShower, StringBounder stringBounder) { + public ClusterHeader(Entity g, ISkinParam skinParam, PortionShower portionShower, StringBounder stringBounder) { this.title = getTitleBlock(g, skinParam); this.stereo = getStereoBlock(g, skinParam, portionShower); final TextBlock stereoAndTitle = TextBlockUtils.mergeTB(stereo, title, HorizontalAlignment.CENTER); final XDimension2D dimLabel = stereoAndTitle.calculateDimension(stringBounder); if (dimLabel.getWidth() > 0) { - final XDimension2D dimAttribute = ((EntityImp) g).getStateHeader(skinParam) + final XDimension2D dimAttribute = ((Entity) g).getStateHeader(skinParam) .calculateDimension(stringBounder); final double attributeHeight = dimAttribute.getHeight(); final double attributeWidth = dimAttribute.getWidth(); @@ -105,7 +105,7 @@ public final class ClusterHeader { return stereo; } - private TextBlock getTitleBlock(EntityImp g, ISkinParam skinParam) { + private TextBlock getTitleBlock(Entity g, ISkinParam skinParam) { final Display label = g.getDisplay(); if (label == null) return TextBlockUtils.empty(0, 0); @@ -134,7 +134,7 @@ public final class ClusterHeader { return label.create(fontConfiguration, alignment, skinParam); } - private TextBlock getStereoBlock(EntityImp g, ISkinParam skinParam, PortionShower portionShower) { + private TextBlock getStereoBlock(Entity g, ISkinParam skinParam, PortionShower portionShower) { final TextBlock stereo = getStereoBlockWithoutLegend(g, portionShower, skinParam); final DisplayPositioned legend = g.getLegend(); if (legend == null || legend.isNull()) @@ -145,7 +145,7 @@ public final class ClusterHeader { legend.getVerticalAlignment()); } - private TextBlock getStereoBlockWithoutLegend(EntityImp g, PortionShower portionShower, ISkinParam skinParam) { + private TextBlock getStereoBlockWithoutLegend(Entity g, PortionShower portionShower, ISkinParam skinParam) { final Stereotype stereotype = g.getStereotype(); // final DisplayPositionned legend = g.getLegend(); if (stereotype == null) diff --git a/src/net/sourceforge/plantuml/svek/CucaDiagramFileMakerSvek.java b/src/net/sourceforge/plantuml/svek/CucaDiagramFileMakerSvek.java index 15e860ea2..2d6035afa 100644 --- a/src/net/sourceforge/plantuml/svek/CucaDiagramFileMakerSvek.java +++ b/src/net/sourceforge/plantuml/svek/CucaDiagramFileMakerSvek.java @@ -57,7 +57,7 @@ import net.sourceforge.plantuml.log.Logme; import net.sourceforge.plantuml.ugraphic.UGraphic; public final class CucaDiagramFileMakerSvek implements CucaDiagramFileMaker { - // ::remove file when WASM + // ::remove file when CORE private final ICucaDiagram diagram; @@ -82,8 +82,8 @@ public final class CucaDiagramFileMakerSvek implements CucaDiagramFileMaker { private GeneralImageBuilder createDotDataImageBuilder(DotMode dotMode, StringBounder stringBounder) { final DotData dotData = new DotData(diagram.getEntityFactory().getRootGroup(), getOrderedLinks(), - diagram.getLeafsvalues(), diagram.getUmlDiagramType(), diagram.getSkinParam(), diagram, diagram, - diagram.getEntityFactory(), diagram.isHideEmptyDescriptionForState(), dotMode, + diagram.getEntityFactory().leafs(), diagram.getUmlDiagramType(), diagram.getSkinParam(), diagram, + diagram, diagram.getEntityFactory(), diagram.isHideEmptyDescriptionForState(), dotMode, diagram.getNamespaceSeparator(), diagram.getPragma()); return new GeneralImageBuilder(dotData, diagram.getEntityFactory(), diagram.getSource(), diagram.getPragma(), stringBounder, diagram.getUmlDiagramType().getStyleName()); diff --git a/src/net/sourceforge/plantuml/svek/DotStringFactory.java b/src/net/sourceforge/plantuml/svek/DotStringFactory.java index f2899c9ee..db3e7a5ec 100644 --- a/src/net/sourceforge/plantuml/svek/DotStringFactory.java +++ b/src/net/sourceforge/plantuml/svek/DotStringFactory.java @@ -51,7 +51,7 @@ import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.awt.geom.XPoint2D; import net.sourceforge.plantuml.baraye.EntityFactory; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.command.Position; import net.sourceforge.plantuml.cucadiagram.ICucaDiagram; import net.sourceforge.plantuml.cucadiagram.dot.DotData; @@ -134,7 +134,7 @@ public class DotStringFactory implements Moveable { return max / 10; } - // ::comment when WASM + // ::comment when CORE String createDotString(String... dotStrings) { final StringBuilder sb = new StringBuilder(); @@ -280,12 +280,12 @@ public class DotStringFactory implements Moveable { return 35; } - // ::uncomment when WASM + // ::uncomment when CORE // public GraphvizVersion getGraphvizVersion() { // return null; // } // ::done - // ::comment when WASM + // ::comment when CORE private GraphvizVersion graphvizVersion; public GraphvizVersion getGraphvizVersion() { @@ -469,7 +469,7 @@ public class DotStringFactory implements Moveable { } // ::done - public void openCluster(EntityImp g, ClusterHeader clusterHeader) { + public void openCluster(Entity g, ClusterHeader clusterHeader) { this.current = current.createChild(clusterHeader, colorSequence, skinParam, g); bibliotekon.addCluster(this.current); } diff --git a/src/net/sourceforge/plantuml/svek/GeneralImageBuilder.java b/src/net/sourceforge/plantuml/svek/GeneralImageBuilder.java index 51b99637c..2511b050d 100644 --- a/src/net/sourceforge/plantuml/svek/GeneralImageBuilder.java +++ b/src/net/sourceforge/plantuml/svek/GeneralImageBuilder.java @@ -56,8 +56,8 @@ import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XRectangle2D; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.baraye.EntityFactory; -import net.sourceforge.plantuml.baraye.EntityImp; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.cucadiagram.EntityPosition; import net.sourceforge.plantuml.cucadiagram.GroupType; @@ -126,7 +126,7 @@ import net.sourceforge.plantuml.utils.Log; public final class GeneralImageBuilder { - public static IEntityImage createEntityImageBlock(EntityImp leaf, ISkinParam skinParam, + public static IEntityImage createEntityImageBlock(Entity leaf, ISkinParam skinParam, boolean isHideEmptyDescriptionForState, PortionShower portionShower, Bibliotekon bibliotekon, GraphvizVersion graphvizVersion, UmlDiagramType umlDiagramType, Collection links) { final IEntityImage result = createEntityImageBlockInternal(leaf, skinParam, isHideEmptyDescriptionForState, @@ -135,14 +135,14 @@ public final class GeneralImageBuilder { return result; } - private static IEntityImage createEntityImageBlockInternal(EntityImp leaf, ISkinParam skinParam, + private static IEntityImage createEntityImageBlockInternal(Entity leaf, ISkinParam skinParam, boolean isHideEmptyDescriptionForState, PortionShower portionShower, Bibliotekon bibliotekon, GraphvizVersion graphvizVersion, UmlDiagramType umlDiagramType, Collection links) { if (leaf.isRemoved()) throw new IllegalStateException(); if (leaf.getLeafType().isLikeClass()) { - final EntityImageClass entityImageClass = new EntityImageClass((EntityImp) leaf, skinParam, portionShower); + final EntityImageClass entityImageClass = new EntityImageClass((Entity) leaf, skinParam, portionShower); final Neighborhood neighborhood = leaf.getNeighborhood(); if (neighborhood != null) return new EntityImageProtected(entityImageClass, 20, neighborhood, bibliotekon); @@ -313,7 +313,7 @@ public final class GeneralImageBuilder { return result; } - private boolean isOpalisable(EntityImp entity) { + private boolean isOpalisable(Entity entity) { if (strictUmlStyle) return false; @@ -383,14 +383,14 @@ public final class GeneralImageBuilder { } public IEntityImage buildImage(BaseFile basefile, String dotStrings[]) { - // ::comment when WASM + // ::comment when CORE if (dotData.isDegeneratedWithFewEntities(0)) return new EntityImageSimpleEmpty(dotData.getSkinParam().getBackgroundColor()); if (dotData.isDegeneratedWithFewEntities(1) && dotData.getUmlDiagramType() != UmlDiagramType.STATE) { - final EntityImp single = dotData.getLeafs().iterator().next(); - final EntityImp group = single.getParentContainer(); - if (group.instanceofGroupRoot() && single.getUSymbol() instanceof USymbolHexagon == false) { + final Entity single = dotData.getLeafs().iterator().next(); + final Entity group = single.getParentContainer(); + if (group.isRoot() && single.getUSymbol() instanceof USymbolHexagon == false) { final IEntityImage tmp = GeneralImageBuilder.createEntityImageBlock(single, dotData.getSkinParam(), dotData.isHideEmptyDescriptionForState(), dotData, null, null, dotData.getUmlDiagramType(), dotData.getLinks()); @@ -466,7 +466,7 @@ public final class GeneralImageBuilder { throw new UnparsableGraphvizException(e, graphvizVersion, svg, source.getPlainString()); } // ::done - // ::uncomment when WASM + // ::uncomment when CORE // return null; // ::done @@ -491,7 +491,7 @@ public final class GeneralImageBuilder { return null; } - private Link onlyOneLink(EntityImp ent) { + private Link onlyOneLink(Entity ent) { Link single = null; for (Link link : dotData.getLinks()) { if (link.isInvis()) @@ -506,7 +506,7 @@ public final class GeneralImageBuilder { return single; } - // ::comment when WASM + // ::comment when CORE private IEntityImage error(File dotExe) { final List msg = new ArrayList<>(); msg.add("Dot Executable: " + dotExe); @@ -526,8 +526,8 @@ public final class GeneralImageBuilder { } // ::done - private void printEntities(DotStringFactory dotStringFactory, Collection entities2) { - for (EntityImp ent : entities2) { + private void printEntities(DotStringFactory dotStringFactory, Collection entities2) { + for (Entity ent : entities2) { if (ent.isRemoved()) continue; @@ -535,7 +535,7 @@ public final class GeneralImageBuilder { } } - private void printEntity(DotStringFactory dotStringFactory, EntityImp ent) { + private void printEntity(DotStringFactory dotStringFactory, Entity ent) { if (ent.isRemoved()) throw new IllegalStateException(); @@ -545,7 +545,7 @@ public final class GeneralImageBuilder { dotStringFactory.addNode(node); } - private IEntityImage printEntityInternal(DotStringFactory dotStringFactory, EntityImp ent) { + private IEntityImage printEntityInternal(DotStringFactory dotStringFactory, Entity ent) { if (ent.isRemoved()) throw new IllegalStateException(); @@ -565,7 +565,7 @@ public final class GeneralImageBuilder { private double getMaxWidth() { double result = 0; - for (EntityImp ent : dotData.getLeafs()) { + for (Entity ent : dotData.getLeafs()) { if (ent.getLeafType().isLikeClass() == false) continue; @@ -578,41 +578,40 @@ public final class GeneralImageBuilder { return result; } - private Collection getUnpackagedEntities() { - final List result = new ArrayList<>(); - for (EntityImp ent : dotData.getLeafs()) + private Collection getUnpackagedEntities() { + final List result = new ArrayList<>(); + for (Entity ent : dotData.getLeafs()) if (dotData.getTopParent() == ent.getParentContainer()) result.add(ent); return result; } - private void printGroups(DotStringFactory dotStringFactory, EntityImp parent) { + private void printGroups(DotStringFactory dotStringFactory, Entity parent) { // System.err.println("PARENT=" + parent); - final Collection groups = dotData.getGroupHierarchy().getChildrenGroups(parent); + final Collection groups = dotData.getGroupHierarchy().getChildrenGroups(parent); // System.err.println("groups=" + groups); - for (EntityImp g : groups) { + for (Entity g : groups) { if (g.isRemoved()) continue; if (dotData.isEmpty(g) && g.getGroupType() == GroupType.PACKAGE) { - final ISkinParam skinParam = dotData.getSkinParam(); - final EntityImp folder = entityFactory.createLeafForEmptyGroup(g, skinParam); - printEntity(dotStringFactory, folder); + g.muteToType(LeafType.EMPTY_PACKAGE); + printEntity(dotStringFactory, g); } else { printGroup(dotStringFactory, g); } } } - private void printGroup(DotStringFactory dotStringFactory, EntityImp g) { + private void printGroup(DotStringFactory dotStringFactory, Entity g) { if (g.getGroupType() == GroupType.CONCURRENT_STATE) return; - final ClusterHeader clusterHeader = new ClusterHeader((EntityImp) g, dotData.getSkinParam(), dotData, + final ClusterHeader clusterHeader = new ClusterHeader((Entity) g, dotData.getSkinParam(), dotData, stringBounder); dotStringFactory.openCluster(g, clusterHeader); - this.printEntities(dotStringFactory, g.getLeafsDirect()); + this.printEntities(dotStringFactory, g.leafs()); printGroups(dotStringFactory, g); diff --git a/src/net/sourceforge/plantuml/svek/GraphvizCrash.java b/src/net/sourceforge/plantuml/svek/GraphvizCrash.java index 7aaabe62f..498d5038b 100644 --- a/src/net/sourceforge/plantuml/svek/GraphvizCrash.java +++ b/src/net/sourceforge/plantuml/svek/GraphvizCrash.java @@ -69,14 +69,14 @@ public class GraphvizCrash extends AbstractTextBlock implements IEntityImage { private final TextBlock text1; private final String text; - // ::comment when WASM + // ::comment when CORE private final BufferedImage flashCode; private final boolean graphviz244onWindows; // ::done public GraphvizCrash(String text, boolean graphviz244onWindows, Throwable rootCause) { this.text = text; - // ::comment when WASM + // ::comment when CORE this.graphviz244onWindows = graphviz244onWindows; this.flashCode = FlashCodeFactory.getFlashCodeUtils().exportFlashcode(text, Color.BLACK, Color.WHITE); // ::done @@ -149,7 +149,7 @@ public class GraphvizCrash extends AbstractTextBlock implements IEntityImage { strings.add(" "); addProperties(strings); strings.add(" "); - // ::comment when WASM + // ::comment when CORE try { final String dotVersion = GraphvizUtils.dotVersion(); strings.add("Default dot version: " + dotVersion); @@ -159,7 +159,7 @@ public class GraphvizCrash extends AbstractTextBlock implements IEntityImage { // ::done pleaseGoTo(strings); youShouldSendThisDiagram(strings); - // ::comment when WASM + // ::comment when CORE if (flashCode != null) addDecodeHint(strings); // ::done @@ -189,7 +189,7 @@ public class GraphvizCrash extends AbstractTextBlock implements IEntityImage { } public static void addProperties(final List strings) { - // ::comment when WASM + // ::comment when CORE strings.addAll(OptionPrint.interestingProperties()); strings.addAll(OptionPrint.interestingValues()); // ::done @@ -213,7 +213,7 @@ public class GraphvizCrash extends AbstractTextBlock implements IEntityImage { private TextBlock getMain() { TextBlock result = text1; - // ::comment when WASM + // ::comment when CORE if (flashCode != null) { final UImage flash = new UImage(new PixelImage(flashCode, AffineTransformType.TYPE_NEAREST_NEIGHBOR)) .scale(3); diff --git a/src/net/sourceforge/plantuml/svek/GroupPngMakerActivity.java b/src/net/sourceforge/plantuml/svek/GroupPngMakerActivity.java index 9cfc3fda5..c6e6e9b9c 100644 --- a/src/net/sourceforge/plantuml/svek/GroupPngMakerActivity.java +++ b/src/net/sourceforge/plantuml/svek/GroupPngMakerActivity.java @@ -42,7 +42,7 @@ import java.util.List; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.ISkinParam; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.baraye.EntityUtils; import net.sourceforge.plantuml.cucadiagram.GroupHierarchy; import net.sourceforge.plantuml.cucadiagram.GroupType; @@ -63,29 +63,29 @@ import net.sourceforge.plantuml.svek.image.EntityImageState; public final class GroupPngMakerActivity { private final ICucaDiagram diagram; - private final EntityImp group; + private final Entity group; private final StringBounder stringBounder; class InnerGroupHierarchy implements GroupHierarchy { - public EntityImp getRootGroup() { + public Entity getRootGroup() { throw new UnsupportedOperationException(); } - public Collection getChildrenGroups(EntityImp parent) { - if (parent.getQuark().isRoot()) { + public Collection getChildrenGroups(Entity parent) { + if (parent.isRoot()) return diagram.getChildrenGroups(group); - } + return diagram.getChildrenGroups(parent); } - public boolean isEmpty(EntityImp g) { + public boolean isEmpty(Entity g) { return diagram.isEmpty(g); } } - public GroupPngMakerActivity(ICucaDiagram diagram, EntityImp group, StringBounder stringBounder) { + public GroupPngMakerActivity(ICucaDiagram diagram, Entity group, StringBounder stringBounder) { this.diagram = diagram; this.group = group; this.stringBounder = stringBounder; @@ -94,12 +94,12 @@ public final class GroupPngMakerActivity { private List getPureInnerLinks() { final List result = new ArrayList<>(); for (Link link : diagram.getLinks()) { - final EntityImp e1 = (EntityImp) link.getEntity1(); - final EntityImp e2 = (EntityImp) link.getEntity2(); + final Entity e1 = (Entity) link.getEntity1(); + final Entity e2 = (Entity) link.getEntity2(); if (e1.getParentContainer() == group && e1.isGroup() == false && e2.getParentContainer() == group - && e2.isGroup() == false) { + && e2.isGroup() == false) result.add(link); - } + } return result; } @@ -109,13 +109,13 @@ public final class GroupPngMakerActivity { } public IEntityImage getImage() throws IOException, InterruptedException { - if (group.size() == 0) { + if (group.countChildren() == 0) { return new EntityImageState(group, diagram.getSkinParam()); } final List links = getPureInnerLinks(); final ISkinParam skinParam = diagram.getSkinParam(); - final DotData dotData = new DotData(group, links, group.getLeafsDirect(), diagram.getUmlDiagramType(), + final DotData dotData = new DotData(group, links, group.leafs(), diagram.getUmlDiagramType(), skinParam, new InnerGroupHierarchy(), diagram.getEntityFactory(), false, DotMode.NORMAL, diagram.getNamespaceSeparator(), diagram.getPragma()); diff --git a/src/net/sourceforge/plantuml/svek/GroupPngMakerState.java b/src/net/sourceforge/plantuml/svek/GroupPngMakerState.java index 046c76a45..274ba34b9 100644 --- a/src/net/sourceforge/plantuml/svek/GroupPngMakerState.java +++ b/src/net/sourceforge/plantuml/svek/GroupPngMakerState.java @@ -40,7 +40,7 @@ import java.util.Collection; import java.util.List; import net.sourceforge.plantuml.ISkinParam; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.baraye.EntityUtils; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.GroupHierarchy; @@ -66,29 +66,29 @@ import net.sourceforge.plantuml.svek.image.EntityImageStateCommon; public final class GroupPngMakerState { private final ICucaDiagram diagram; - private final EntityImp group; + private final Entity group; private final StringBounder stringBounder; class InnerGroupHierarchy implements GroupHierarchy { - public EntityImp getRootGroup() { + public Entity getRootGroup() { throw new UnsupportedOperationException(); } - public Collection getChildrenGroups(EntityImp parent) { - if (parent.getQuark().isRoot()) + public Collection getChildrenGroups(Entity parent) { + if (parent.isRoot()) return diagram.getChildrenGroups(group); return diagram.getChildrenGroups(parent); } - public boolean isEmpty(EntityImp g) { + public boolean isEmpty(Entity g) { return diagram.isEmpty(g); } } - public GroupPngMakerState(ICucaDiagram diagram, EntityImp group, StringBounder stringBounder) { + public GroupPngMakerState(ICucaDiagram diagram, Entity group, StringBounder stringBounder) { this.diagram = diagram; this.stringBounder = stringBounder; this.group = group; @@ -122,12 +122,12 @@ public final class GroupPngMakerState { final TextBlock title = display.create(titleFontConfiguration, HorizontalAlignment.CENTER, diagram.getSkinParam()); - if (group.size() == 0 && group.getChildren().size() == 0) + if (group.countChildren() == 0 && group.groups().size() == 0) return new EntityImageState(group, diagram.getSkinParam()); final List links = getPureInnerLinks(); - final DotData dotData = new DotData(group, links, group.getLeafsDirect(), diagram.getUmlDiagramType(), + final DotData dotData = new DotData(group, links, group.leafs(), diagram.getUmlDiagramType(), skinParam, new InnerGroupHierarchy(), diagram.getEntityFactory(), diagram.isHideEmptyDescriptionForState(), DotMode.NORMAL, diagram.getNamespaceSeparator(), diagram.getPragma()); @@ -154,7 +154,7 @@ public final class GroupPngMakerState { if (stroke == null) stroke = style.getStroke(); - final TextBlock attribute = ((EntityImp) group).getStateHeader(skinParam); + final TextBlock attribute = ((Entity) group).getStateHeader(skinParam); final Stereotype stereotype = group.getStereotype(); final boolean withSymbol = stereotype != null && stereotype.isWithOOSymbol(); @@ -171,7 +171,7 @@ public final class GroupPngMakerState { private IEntityImage buildImageForConcurrentState(DotData dotData) { final List inners = new ArrayList<>(); - for (EntityImp inner : dotData.getLeafs()) + for (Entity inner : dotData.getLeafs()) inners.add(inner.getSvekImage()); return new CucaDiagramFileMakerSvek2InternalImage(inners, dotData.getTopParent().getConcurrentSeparator(), @@ -180,11 +180,11 @@ public final class GroupPngMakerState { } private boolean containsOnlyConcurrentStates(DotData dotData) { - for (EntityImp leaf : dotData.getLeafs()) { - if (leaf instanceof EntityImp == false) + for (Entity leaf : dotData.getLeafs()) { + if (leaf instanceof Entity == false) return false; - if (((EntityImp) leaf).getLeafType() != LeafType.STATE_CONCURRENT) + if (((Entity) leaf).getLeafType() != LeafType.STATE_CONCURRENT) return false; } diff --git a/src/net/sourceforge/plantuml/svek/Kal.java b/src/net/sourceforge/plantuml/svek/Kal.java index 3630c985f..932d2ed14 100644 --- a/src/net/sourceforge/plantuml/svek/Kal.java +++ b/src/net/sourceforge/plantuml/svek/Kal.java @@ -37,7 +37,7 @@ package net.sourceforge.plantuml.svek; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Link; @@ -61,10 +61,10 @@ public class Kal implements UDrawable { private XDimension2D dim; private UTranslate translate; private final SvekLine svekLine; - private final EntityImp entity; + private final Entity entity; private final Link link; - public Kal(SvekLine svekLine, String text, FontConfiguration font, ISkinParam skinParam, EntityImp entity, + public Kal(SvekLine svekLine, String text, FontConfiguration font, ISkinParam skinParam, Entity entity, Link link, StringBounder stringBounder) { this.svekLine = svekLine; this.entity = entity; diff --git a/src/net/sourceforge/plantuml/svek/SvekLine.java b/src/net/sourceforge/plantuml/svek/SvekLine.java index 923733c2c..8a0d5a3f4 100644 --- a/src/net/sourceforge/plantuml/svek/SvekLine.java +++ b/src/net/sourceforge/plantuml/svek/SvekLine.java @@ -53,7 +53,7 @@ import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XPoint2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.command.Position; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.cucadiagram.CucaNote; @@ -206,7 +206,7 @@ public class SvekLine implements Moveable, Hideable, GuideLine { return ang; } - private Cluster getCluster2(Bibliotekon bibliotekon, EntityImp entityMutable) { + private Cluster getCluster2(Bibliotekon bibliotekon, Entity entityMutable) { for (Cluster cl : bibliotekon.allCluster()) if (cl.getGroups().contains(entityMutable)) return cl; @@ -217,7 +217,7 @@ public class SvekLine implements Moveable, Hideable, GuideLine { public SvekLine(Link link, ColorSequence colorSequence, ISkinParam skinParam, StringBounder stringBounder, FontConfiguration font, Bibliotekon bibliotekon, Pragma pragma, GraphvizVersion graphvizVersion) { - // ::comment when WASM + // ::comment when CORE if (graphvizVersion.useShieldForQuantifier() && link.getLinkArg().getQuantifier1() != null) link.getEntity1().ensureMargins(Margins.uniform(16)); @@ -226,11 +226,11 @@ public class SvekLine implements Moveable, Hideable, GuideLine { // ::done if (link.getLinkArg().getKal1() != null) - this.kal1 = new Kal(this, link.getLinkArg().getKal1(), font, skinParam, (EntityImp) link.getEntity1(), link, + this.kal1 = new Kal(this, link.getLinkArg().getKal1(), font, skinParam, (Entity) link.getEntity1(), link, stringBounder); if (link.getLinkArg().getKal2() != null) - this.kal2 = new Kal(this, link.getLinkArg().getKal2(), font, skinParam, (EntityImp) link.getEntity2(), link, + this.kal2 = new Kal(this, link.getLinkArg().getKal2(), font, skinParam, (Entity) link.getEntity2(), link, stringBounder); this.type = skinParam.getUmlDiagramType(); @@ -363,7 +363,7 @@ public class SvekLine implements Moveable, Hideable, GuideLine { return link.getLinkArrow(); } - // ::comment when WASM + // ::comment when CORE public void appendLine(GraphvizVersion graphvizVersion, StringBuilder sb, DotMode dotMode, DotSplines dotSplines) { // Log.println("inverted=" + isInverted()); // if (isInverted()) { @@ -667,8 +667,8 @@ public class SvekLine implements Moveable, Hideable, GuideLine { ug.draw(link.commentForSvg()); final Map typeIDent = new EnumMap<>(UGroupType.class); typeIDent.put(UGroupType.CLASS, - "link " + link.getEntity1().getCode() + " " + link.getEntity2().getCode() + " selected"); - typeIDent.put(UGroupType.ID, "link_" + link.getEntity1().getCode() + "_" + link.getEntity2().getCode()); + "link " + link.getEntity1().getName() + " " + link.getEntity2().getName() + " selected"); + typeIDent.put(UGroupType.ID, "link_" + link.getEntity1().getName() + "_" + link.getEntity2().getName()); ug.startGroup(typeIDent); double x = 0; double y = 0; @@ -677,7 +677,7 @@ public class SvekLine implements Moveable, Hideable, GuideLine { ug.startUrl(url); if (link.isAutoLinkOfAGroup()) { - final Cluster cl = bibliotekon.getCluster((EntityImp) link.getEntity1()); + final Cluster cl = bibliotekon.getCluster((Entity) link.getEntity1()); if (cl != null) { x += cl.getClusterPosition().getWidth(); x -= dotPath.getStartPoint().getX() - cl.getClusterPosition().getMinX(); @@ -717,7 +717,7 @@ public class SvekLine implements Moveable, Hideable, GuideLine { DotPath todraw = dotPath; if (link.getEntity2().isGroup() && link.getEntity2().getUSymbol() instanceof USymbolFolder) { - final Cluster endCluster = bibliotekon.getCluster((EntityImp) link.getEntity2()); + final Cluster endCluster = bibliotekon.getCluster((Entity) link.getEntity2()); if (endCluster != null) { final double deltaFolderH = endCluster.checkFolderPosition(dotPath.getEndPoint(), ug.getStringBounder()); @@ -998,7 +998,7 @@ public class SvekLine implements Moveable, Hideable, GuideLine { return link.isHorizontalSolitary(); } - public boolean isLinkFromOrTo(EntityImp group) { + public boolean isLinkFromOrTo(Entity group) { return link.getEntity1() == group || link.getEntity2() == group; } @@ -1023,7 +1023,7 @@ public class SvekLine implements Moveable, Hideable, GuideLine { return link.getEntity1() == link.getEntity2(); } - public XPoint2D getMyPoint(EntityImp entity) { + public XPoint2D getMyPoint(Entity entity) { if (link.getEntity1() == entity) return moveDelta(dotPath.getStartPoint()); @@ -1059,7 +1059,7 @@ public class SvekLine implements Moveable, Hideable, GuideLine { return new XPoint2D(dx + end.getX(), dy + end.getY()); } - public EntityImp getOther(EntityImp entity) { + public Entity getOther(Entity entity) { if (link.contains(entity)) return link.getOther(entity); diff --git a/src/net/sourceforge/plantuml/svek/SvekNode.java b/src/net/sourceforge/plantuml/svek/SvekNode.java index 02dbd1a38..2268948f3 100644 --- a/src/net/sourceforge/plantuml/svek/SvekNode.java +++ b/src/net/sourceforge/plantuml/svek/SvekNode.java @@ -41,7 +41,7 @@ import net.sourceforge.plantuml.Hideable; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XPoint2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.EntityPosition; import net.sourceforge.plantuml.cucadiagram.Together; import net.sourceforge.plantuml.klimt.Shadowable; @@ -91,7 +91,7 @@ public class SvekNode implements Positionable, Hideable { return super.toString() + " " + image + " " + type; } - private final EntityImp leaf; + private final Entity leaf; public final Together getTogether() { if (leaf == null) @@ -99,7 +99,7 @@ public class SvekNode implements Positionable, Hideable { return leaf.getTogether(); } - SvekNode(EntityImp ent, IEntityImage image, ColorSequence colorSequence, StringBounder stringBounder) { + SvekNode(Entity ent, IEntityImage image, ColorSequence colorSequence, StringBounder stringBounder) { this.stringBounder = stringBounder; this.entityPosition = ent.getEntityPosition(); this.image = image; @@ -424,22 +424,22 @@ public class SvekNode implements Positionable, Hideable { } public void drawKals(UGraphic ug) { - if (leaf instanceof EntityImp == false) + if (leaf instanceof Entity == false) return; - drawList(ug, ((EntityImp) leaf).getKals(Direction.DOWN)); - drawList(ug, ((EntityImp) leaf).getKals(Direction.UP)); - drawList(ug, ((EntityImp) leaf).getKals(Direction.LEFT)); - drawList(ug, ((EntityImp) leaf).getKals(Direction.RIGHT)); + drawList(ug, ((Entity) leaf).getKals(Direction.DOWN)); + drawList(ug, ((Entity) leaf).getKals(Direction.UP)); + drawList(ug, ((Entity) leaf).getKals(Direction.LEFT)); + drawList(ug, ((Entity) leaf).getKals(Direction.RIGHT)); } public void fixOverlap() { - if (leaf instanceof EntityImp == false) + if (leaf instanceof Entity == false) return; - fixHoverlap(((EntityImp) leaf).getKals(Direction.DOWN)); - fixHoverlap(((EntityImp) leaf).getKals(Direction.UP)); + fixHoverlap(((Entity) leaf).getKals(Direction.DOWN)); + fixHoverlap(((Entity) leaf).getKals(Direction.UP)); } private void fixHoverlap(final List list) { diff --git a/src/net/sourceforge/plantuml/svek/SvekResult.java b/src/net/sourceforge/plantuml/svek/SvekResult.java index f59748784..1e807373d 100644 --- a/src/net/sourceforge/plantuml/svek/SvekResult.java +++ b/src/net/sourceforge/plantuml/svek/SvekResult.java @@ -59,7 +59,7 @@ import net.sourceforge.plantuml.style.StyleSignatureBasic; import net.sourceforge.plantuml.ugraphic.UGraphic; public final class SvekResult extends AbstractTextBlock implements IEntityImage { - // ::remove file when WASM + // ::remove file when CORE private final DotData dotData; private final DotStringFactory dotStringFactory; diff --git a/src/net/sourceforge/plantuml/svek/image/AbstractEntityImageBorder.java b/src/net/sourceforge/plantuml/svek/image/AbstractEntityImageBorder.java index b2f450bd8..94bd5e9c2 100644 --- a/src/net/sourceforge/plantuml/svek/image/AbstractEntityImageBorder.java +++ b/src/net/sourceforge/plantuml/svek/image/AbstractEntityImageBorder.java @@ -38,7 +38,7 @@ package net.sourceforge.plantuml.svek.image; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.EntityPosition; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.TextBlock; @@ -63,12 +63,12 @@ public abstract class AbstractEntityImageBorder extends AbstractEntityImage { protected abstract StyleSignatureBasic getSignature(); final protected Style getStyle() { - final EntityImp leaf = (EntityImp) getEntity(); + final Entity leaf = (Entity) getEntity(); final Stereotype stereotype = leaf.getStereotype(); return getSignature().withTOBECHANGED(stereotype).getMergedStyle(getSkinParam().getCurrentStyleBuilder()); } - AbstractEntityImageBorder(EntityImp leaf, ISkinParam skinParam, Cluster parent, Bibliotekon bibliotekon, + AbstractEntityImageBorder(Entity leaf, ISkinParam skinParam, Cluster parent, Bibliotekon bibliotekon, FontParam fontParam) { super(leaf, skinParam); @@ -82,7 +82,7 @@ public abstract class AbstractEntityImageBorder extends AbstractEntityImage { } protected final TextBlock getDesc() { - final EntityImp leaf = (EntityImp) getEntity(); + final Entity leaf = (Entity) getEntity(); final FontConfiguration fc = FontConfiguration.create(getSkinParam(), getStyle()); return leaf.getDisplay().create(fc, HorizontalAlignment.CENTER, getSkinParam()); } diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageActivity.java b/src/net/sourceforge/plantuml/svek/image/EntityImageActivity.java index 675f22605..79ef2657f 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageActivity.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageActivity.java @@ -37,7 +37,7 @@ package net.sourceforge.plantuml.svek.image; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.klimt.Shadowable; @@ -70,7 +70,7 @@ public class EntityImageActivity extends AbstractEntityImage { final private Url url; private final Bibliotekon bibliotekon; - public EntityImageActivity(EntityImp entity, ISkinParam skinParam, Bibliotekon bibliotekon) { + public EntityImageActivity(Entity entity, ISkinParam skinParam, Bibliotekon bibliotekon) { super(entity, skinParam); this.bibliotekon = bibliotekon; diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageArcCircle.java b/src/net/sourceforge/plantuml/svek/image/EntityImageArcCircle.java index 80f824633..60f24d5d4 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageArcCircle.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageArcCircle.java @@ -37,7 +37,7 @@ package net.sourceforge.plantuml.svek.image; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.TextBlock; @@ -58,7 +58,7 @@ public class EntityImageArcCircle extends AbstractEntityImage { private final TextBlock name; private final TextBlock stereo; - public EntityImageArcCircle(EntityImp entity, ISkinParam skinParam) { + public EntityImageArcCircle(Entity entity, ISkinParam skinParam) { super(entity, skinParam); final Stereotype stereotype = entity.getStereotype(); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageAssociation.java b/src/net/sourceforge/plantuml/svek/image/EntityImageAssociation.java index 4afee37d3..453c24db0 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageAssociation.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageAssociation.java @@ -37,7 +37,7 @@ package net.sourceforge.plantuml.svek.image; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.klimt.UPolygon; import net.sourceforge.plantuml.klimt.UStroke; import net.sourceforge.plantuml.klimt.color.HColor; @@ -55,7 +55,7 @@ public class EntityImageAssociation extends AbstractEntityImage { final private static int SIZE = 12; private final SName sname; - public EntityImageAssociation(EntityImp entity, ISkinParam skinParam, SName sname) { + public EntityImageAssociation(Entity entity, ISkinParam skinParam, SName sname) { super(entity, skinParam); this.sname = sname; } diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageAssociationPoint.java b/src/net/sourceforge/plantuml/svek/image/EntityImageAssociationPoint.java index 1f52f5e2b..5ed8fbd87 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageAssociationPoint.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageAssociationPoint.java @@ -37,7 +37,7 @@ package net.sourceforge.plantuml.svek.image; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.klimt.UShape; import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.font.StringBounder; @@ -55,7 +55,7 @@ public class EntityImageAssociationPoint extends AbstractEntityImage { private static final int SIZE = 4; - public EntityImageAssociationPoint(EntityImp entity, ISkinParam skinParam) { + public EntityImageAssociationPoint(Entity entity, ISkinParam skinParam) { super(entity, skinParam); } diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageBranch.java b/src/net/sourceforge/plantuml/svek/image/EntityImageBranch.java index 48e0d3832..e2edd7abe 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageBranch.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageBranch.java @@ -40,7 +40,7 @@ import java.util.Map; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.klimt.UGroupType; import net.sourceforge.plantuml.klimt.UPolygon; import net.sourceforge.plantuml.klimt.UStroke; @@ -58,7 +58,7 @@ public class EntityImageBranch extends AbstractEntityImage { final private static int SIZE = 12; - public EntityImageBranch(EntityImp entity, ISkinParam skinParam) { + public EntityImageBranch(Entity entity, ISkinParam skinParam) { super(entity, skinParam); } @@ -86,8 +86,8 @@ public class EntityImageBranch extends AbstractEntityImage { diams.setDeltaShadow(shadowing); final Map typeIDent = new EnumMap<>(UGroupType.class); - typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected"); - typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode()); + typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getName() + " selected"); + typeIDent.put(UGroupType.ID, "elem_" + getEntity().getName()); ug.startGroup(typeIDent); ug.apply(border).apply(back.bg()).apply(stroke).draw(diams); ug.closeGroup(); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageCircleEnd.java b/src/net/sourceforge/plantuml/svek/image/EntityImageCircleEnd.java index 4fe32cbde..7cc218d57 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageCircleEnd.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageCircleEnd.java @@ -37,7 +37,7 @@ package net.sourceforge.plantuml.svek.image; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.klimt.UShape; import net.sourceforge.plantuml.klimt.UTranslate; import net.sourceforge.plantuml.klimt.color.ColorType; @@ -61,7 +61,7 @@ public class EntityImageCircleEnd extends AbstractEntityImage { return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.circle, SName.end); } - public EntityImageCircleEnd(EntityImp entity, ISkinParam skinParam) { + public EntityImageCircleEnd(Entity entity, ISkinParam skinParam) { super(entity, skinParam); } diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageCircleStart.java b/src/net/sourceforge/plantuml/svek/image/EntityImageCircleStart.java index 6d2119cd0..ac594ea5e 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageCircleStart.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageCircleStart.java @@ -37,7 +37,7 @@ package net.sourceforge.plantuml.svek.image; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.klimt.color.ColorType; import net.sourceforge.plantuml.klimt.color.HColor; import net.sourceforge.plantuml.klimt.color.HColors; @@ -59,7 +59,7 @@ public class EntityImageCircleStart extends AbstractEntityImage { return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.circle, SName.start); } - public EntityImageCircleStart(EntityImp entity, ISkinParam skinParam) { + public EntityImageCircleStart(Entity entity, ISkinParam skinParam) { super(entity, skinParam); } diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageClass.java b/src/net/sourceforge/plantuml/svek/image/EntityImageClass.java index 3ea6889af..aabd13c49 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageClass.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageClass.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineConfigurable; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XRectangle2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.creole.Stencil; import net.sourceforge.plantuml.cucadiagram.EntityPortion; import net.sourceforge.plantuml.cucadiagram.LeafType; @@ -85,7 +85,7 @@ public class EntityImageClass extends AbstractEntityImage implements Stencil, Wi final private LineConfigurable lineConfig; - public EntityImageClass(EntityImp entity, ISkinParam skinParam, PortionShower portionShower) { + public EntityImageClass(Entity entity, ISkinParam skinParam, PortionShower portionShower) { super(entity, entity.getColors().mute(skinParam)); this.leafType = entity.getLeafType(); this.lineConfig = entity; @@ -121,10 +121,10 @@ public class EntityImageClass extends AbstractEntityImage implements Stencil, Wi private double getKalWidth() { double widthUp = 0; double widthDown = 0; - for (Kal kal : ((EntityImp) getEntity()).getKals(Direction.UP)) + for (Kal kal : ((Entity) getEntity()).getKals(Direction.UP)) widthUp += kal.getDimension().getWidth(); - for (Kal kal : ((EntityImp) getEntity()).getKals(Direction.DOWN)) + for (Kal kal : ((Entity) getEntity()).getKals(Direction.DOWN)) widthDown += kal.getDimension().getWidth(); return Math.max(widthUp, widthDown); @@ -143,13 +143,13 @@ public class EntityImageClass extends AbstractEntityImage implements Stencil, Wi } final public void drawU(UGraphic ug) { - ug.draw(new UComment("class " + getEntity().getCodeGetName())); + ug.draw(new UComment("class " + getEntity().getName())); if (url != null) ug.startUrl(url); final Map typeIDent = new EnumMap<>(UGroupType.class); - typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected"); - typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode()); + typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getName() + " selected"); + typeIDent.put(UGroupType.ID, "elem_" + getEntity().getName()); ug.startGroup(typeIDent); drawInternal(ug); ug.closeGroup(); @@ -181,7 +181,7 @@ public class EntityImageClass extends AbstractEntityImage implements Stencil, Wi final double widthTotal = dimTotal.getWidth(); final double heightTotal = dimTotal.getHeight(); final Shadowable rect = new URectangle(widthTotal, heightTotal).rounded(roundCorner) - .withCommentAndCodeLine(getEntity().getCodeGetName(), getEntity().getCodeLine()); + .withCommentAndCodeLine(getEntity().getName(), getEntity().getCodeLine()); double shadow = 0; @@ -248,7 +248,7 @@ public class EntityImageClass extends AbstractEntityImage implements Stencil, Wi } public ShapeType getShapeType() { - if (((EntityImp) getEntity()).getPortShortNames().size() > 0) + if (((Entity) getEntity()).getPortShortNames().size() > 0) return ShapeType.RECTANGLE_HTML_FOR_PORTS; return ShapeType.RECTANGLE; @@ -256,7 +256,7 @@ public class EntityImageClass extends AbstractEntityImage implements Stencil, Wi @Override public Margins getShield(StringBounder stringBounder) { - return ((EntityImp) getEntity()).getMargins(); + return ((Entity) getEntity()).getMargins(); } public double getStartingX(StringBounder stringBounder, double y) { diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageClassHeader.java b/src/net/sourceforge/plantuml/svek/image/EntityImageClassHeader.java index 8b2ac9234..b6a5c2028 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageClassHeader.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageClassHeader.java @@ -38,7 +38,7 @@ package net.sourceforge.plantuml.svek.image; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.EntityPortion; @@ -72,7 +72,7 @@ public class EntityImageClassHeader extends AbstractEntityImage { final private HeaderLayout headerLayout; - public EntityImageClassHeader(EntityImp entity, ISkinParam skinParam, PortionShower portionShower) { + public EntityImageClassHeader(Entity entity, ISkinParam skinParam, PortionShower portionShower) { super(entity, skinParam); final boolean italic = entity.getLeafType() == LeafType.ABSTRACT_CLASS @@ -137,7 +137,7 @@ public class EntityImageClassHeader extends AbstractEntityImage { } final TextBlock circledCharacter; - if (portionShower.showPortion(EntityPortion.CIRCLED_CHARACTER, (EntityImp) getEntity())) + if (portionShower.showPortion(EntityPortion.CIRCLED_CHARACTER, (Entity) getEntity())) circledCharacter = TextBlockUtils.withMargin(getCircledCharacter(entity, skinParam), 4, 0, 5, 5); else circledCharacter = null; @@ -145,7 +145,7 @@ public class EntityImageClassHeader extends AbstractEntityImage { this.headerLayout = new HeaderLayout(circledCharacter, stereo, name, genericBlock); } - private TextBlock getCircledCharacter(EntityImp entity, ISkinParam skinParam) { + private TextBlock getCircledCharacter(Entity entity, ISkinParam skinParam) { final Stereotype stereotype = entity.getStereotype(); if (stereotype != null && stereotype.getSprite(skinParam) != null) return stereotype.getSprite(skinParam); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageDeepHistory.java b/src/net/sourceforge/plantuml/svek/image/EntityImageDeepHistory.java index 5285154b9..daaa5c103 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageDeepHistory.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageDeepHistory.java @@ -36,12 +36,12 @@ package net.sourceforge.plantuml.svek.image; import net.sourceforge.plantuml.ISkinParam; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.style.SName; public class EntityImageDeepHistory extends EntityImagePseudoState { - public EntityImageDeepHistory(EntityImp entity, ISkinParam skinParam, SName sname) { + public EntityImageDeepHistory(Entity entity, ISkinParam skinParam, SName sname) { super(entity, skinParam, "H*", sname); } diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageDescription.java b/src/net/sourceforge/plantuml/svek/image/EntityImageDescription.java index 46d1cc3ac..24e402a0b 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageDescription.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageDescription.java @@ -45,7 +45,7 @@ import java.util.Set; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.BodyFactory; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.EntityPortion; @@ -103,7 +103,7 @@ public class EntityImageDescription extends AbstractEntityImage { private final Bibliotekon bibliotekon; private final SymbolContext ctx; - public EntityImageDescription(EntityImp entity, ISkinParam skinParam2, PortionShower portionShower, + public EntityImageDescription(Entity entity, ISkinParam skinParam2, PortionShower portionShower, Collection links, SName styleName, Bibliotekon bibliotekon) { super(entity, entity.getColors().mute(skinParam2)); this.useRankSame = getSkinParam().useRankSame(); @@ -160,7 +160,7 @@ public class EntityImageDescription extends AbstractEntityImage { ctx = new SymbolContext(backcolor, forecolor).withStroke(stroke).withShadow(deltaShadow).withCorner(roundCorner, diagonalCorner); - final Display codeDisplay = Display.getWithNewlines(entity.getCodeGetName()); + final Display codeDisplay = Display.getWithNewlines(entity.getName()); if ((entity.getDisplay().equalsLike(codeDisplay) && symbol.getSName() == SName.package_) || entity.getDisplay().isWhite()) desc = TextBlockUtils.empty(style.value(PName.MinimumWidth).asDouble(), 0); @@ -188,7 +188,7 @@ public class EntityImageDescription extends AbstractEntityImage { } - private USymbol getUSymbol(EntityImp entity) { + private USymbol getUSymbol(Entity entity) { final USymbol result = entity.getUSymbol() == null ? getSkinParam().componentStyle().toUSymbol() : entity.getUSymbol(); return Objects.requireNonNull(result); @@ -210,13 +210,13 @@ public class EntityImageDescription extends AbstractEntityImage { if (hideText == false) return Margins.NONE; - if (isThereADoubleLink((EntityImp) getEntity(), links)) + if (isThereADoubleLink((Entity) getEntity(), links)) return Margins.NONE; - if (fixCircleLabelOverlapping == false && hasSomeHorizontalLinkVisible((EntityImp) getEntity(), links)) + if (fixCircleLabelOverlapping == false && hasSomeHorizontalLinkVisible((Entity) getEntity(), links)) return Margins.NONE; - if (hasSomeHorizontalLinkDoubleDecorated((EntityImp) getEntity(), links)) + if (hasSomeHorizontalLinkDoubleDecorated((Entity) getEntity(), links)) return Margins.NONE; final XDimension2D dimStereo = stereo.calculateDimension(stringBounder); @@ -231,7 +231,7 @@ public class EntityImageDescription extends AbstractEntityImage { return new Margins(suppX / 2, suppX / 2, y, y); } - private boolean hasSomeHorizontalLinkVisible(EntityImp leaf, Collection links) { + private boolean hasSomeHorizontalLinkVisible(Entity leaf, Collection links) { for (Link link : links) if (link.getLength() == 1 && link.contains(leaf) && link.isInvis() == false) return true; @@ -239,11 +239,11 @@ public class EntityImageDescription extends AbstractEntityImage { return false; } - private boolean isThereADoubleLink(EntityImp leaf, Collection links) { - final Set others = new HashSet<>(); + private boolean isThereADoubleLink(Entity leaf, Collection links) { + final Set others = new HashSet<>(); for (Link link : links) { if (link.contains(leaf)) { - final EntityImp other = link.getOther(leaf); + final Entity other = link.getOther(leaf); final boolean changed = others.add(other); if (changed == false) return true; @@ -253,7 +253,7 @@ public class EntityImageDescription extends AbstractEntityImage { return false; } - private boolean hasSomeHorizontalLinkDoubleDecorated(EntityImp leaf, Collection links) { + private boolean hasSomeHorizontalLinkDoubleDecorated(Entity leaf, Collection links) { for (Link link : links) if (link.getLength() == 1 && link.contains(leaf) && link.getType().isDoubleDecorated()) return true; @@ -262,10 +262,10 @@ public class EntityImageDescription extends AbstractEntityImage { } final public void drawU(UGraphic ug) { - ug.draw(new UComment("entity " + getEntity().getCodeGetName())); + ug.draw(new UComment("entity " + getEntity().getName())); final Map typeIDent = new EnumMap<>(UGroupType.class); - typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected"); - typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode()); + typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getName() + " selected"); + typeIDent.put(UGroupType.ID, "elem_" + getEntity().getName()); ug.startGroup(typeIDent); if (url != null) diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageEmptyPackage.java b/src/net/sourceforge/plantuml/svek/image/EntityImageEmptyPackage.java index ae0173ac3..2655b7a32 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageEmptyPackage.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageEmptyPackage.java @@ -39,7 +39,7 @@ import net.sourceforge.plantuml.AlignmentParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.ftile.EntityImageLegend; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.DisplayPositioned; import net.sourceforge.plantuml.cucadiagram.EntityPortion; @@ -88,7 +88,7 @@ public class EntityImageEmptyPackage extends AbstractEntityImage { .withTOBECHANGED(stereotype).getMergedStyle(getSkinParam().getCurrentStyleBuilder()); } - public EntityImageEmptyPackage(EntityImp entity, ISkinParam skinParam, PortionShower portionShower, SName sname) { + public EntityImageEmptyPackage(Entity entity, ISkinParam skinParam, PortionShower portionShower, SName sname) { super(entity, skinParam); this.sname = sname; @@ -114,7 +114,7 @@ public class EntityImageEmptyPackage extends AbstractEntityImage { this.desc = entity.getDisplay().create(titleFontConfiguration, titleHorizontalAlignment, skinParam); - final DisplayPositioned legend = ((EntityImp) entity).getLegend(); + final DisplayPositioned legend = ((Entity) entity).getLegend(); if (legend != null) { final TextBlock legendBlock = EntityImageLegend.create(legend.getDisplay(), skinParam); stereoBlock = legendBlock; diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageGroup.java b/src/net/sourceforge/plantuml/svek/image/EntityImageGroup.java index 30b62ec73..a597031cc 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageGroup.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageGroup.java @@ -37,7 +37,7 @@ package net.sourceforge.plantuml.svek.image; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.klimt.font.StringBounder; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.ShapeType; @@ -48,7 +48,7 @@ public class EntityImageGroup extends AbstractEntityImage { // final private TextBlock desc; // final private static int MARGIN = 10; - public EntityImageGroup(EntityImp entity, ISkinParam skinParam) { + public EntityImageGroup(Entity entity, ISkinParam skinParam) { super(entity, skinParam); // this.desc = Display.create(StringUtils.getWithNewlines(entity.getDisplay()), // FontConfiguration.create( diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageJson.java b/src/net/sourceforge/plantuml/svek/image/EntityImageJson.java index f0064f81d..39da4eda0 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageJson.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageJson.java @@ -39,7 +39,7 @@ import net.sourceforge.plantuml.CornerParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineConfigurable; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.creole.Stencil; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.EntityPortion; @@ -84,7 +84,7 @@ public class EntityImageJson extends AbstractEntityImage implements Stencil, Wit final private LineConfigurable lineConfig; - public EntityImageJson(EntityImp entity, ISkinParam skinParam, PortionShower portionShower) { + public EntityImageJson(Entity entity, ISkinParam skinParam, PortionShower portionShower) { super(entity, skinParam); this.lineConfig = entity; final Stereotype stereotype = entity.getStereotype(); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterface.java b/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterface.java index eb2bf760c..4e1eeba60 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterface.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterface.java @@ -40,7 +40,7 @@ import java.util.Map; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.klimt.UGroupType; @@ -77,7 +77,7 @@ public class EntityImageLollipopInterface extends AbstractEntityImage { return new UStroke(1.5); } - public EntityImageLollipopInterface(EntityImp entity, ISkinParam skinParam, SName sname) { + public EntityImageLollipopInterface(Entity entity, ISkinParam skinParam, SName sname) { super(entity, skinParam); this.sname = sname; @@ -114,8 +114,8 @@ public class EntityImageLollipopInterface extends AbstractEntityImage { ug.startUrl(url); final Map typeIDent = new EnumMap<>(UGroupType.class); - typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected"); - typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode()); + typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getName() + " selected"); + typeIDent.put(UGroupType.ID, "elem_" + getEntity().getName()); ug.startGroup(typeIDent); ug.apply(getUStroke()).draw(circle); ug.closeGroup(); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterfaceEye1.java b/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterfaceEye1.java index eb945245f..4873d7240 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterfaceEye1.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterfaceEye1.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XPoint2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.klimt.UStroke; @@ -67,7 +67,7 @@ public class EntityImageLollipopInterfaceEye1 extends AbstractEntityImage { private final Bibliotekon bibliotekon; final private Url url; - public EntityImageLollipopInterfaceEye1(EntityImp entity, ISkinParam skinParam, Bibliotekon bibliotekon) { + public EntityImageLollipopInterfaceEye1(Entity entity, ISkinParam skinParam, Bibliotekon bibliotekon) { super(entity, skinParam); this.bibliotekon = bibliotekon; final Stereotype stereotype = entity.getStereotype(); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterfaceEye2.java b/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterfaceEye2.java index f2c52498c..1831902b1 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterfaceEye2.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterfaceEye2.java @@ -37,7 +37,7 @@ package net.sourceforge.plantuml.svek.image; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.BodyFactory; import net.sourceforge.plantuml.cucadiagram.EntityPortion; import net.sourceforge.plantuml.cucadiagram.PortionShower; @@ -70,7 +70,7 @@ public class EntityImageLollipopInterfaceEye2 extends AbstractEntityImage { private final SymbolContext ctx; final private Url url; - public EntityImageLollipopInterfaceEye2(EntityImp entity, ISkinParam skinParam, PortionShower portionShower) { + public EntityImageLollipopInterfaceEye2(Entity entity, ISkinParam skinParam, PortionShower portionShower) { super(entity, skinParam); final Stereotype stereotype = entity.getStereotype(); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageMap.java b/src/net/sourceforge/plantuml/svek/image/EntityImageMap.java index b23182400..5599a0db1 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageMap.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageMap.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.CornerParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineConfigurable; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.creole.Stencil; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.EntityPortion; @@ -88,7 +88,7 @@ public class EntityImageMap extends AbstractEntityImage implements Stencil, With final private LineConfigurable lineConfig; - public EntityImageMap(EntityImp entity, ISkinParam skinParam, PortionShower portionShower) { + public EntityImageMap(Entity entity, ISkinParam skinParam, PortionShower portionShower) { super(entity, skinParam); this.lineConfig = entity; final Stereotype stereotype = entity.getStereotype(); @@ -181,8 +181,8 @@ public class EntityImageMap extends AbstractEntityImage implements Stencil, With ug.startUrl(url); final Map typeIDent = new EnumMap<>(UGroupType.class); - typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected"); - typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode()); + typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getName() + " selected"); + typeIDent.put(UGroupType.ID, "elem_" + getEntity().getName()); ug.startGroup(typeIDent); ug.apply(stroke).draw(rect); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageNote.java b/src/net/sourceforge/plantuml/svek/image/EntityImageNote.java index 5ae5a5601..07104fcfd 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageNote.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageNote.java @@ -47,7 +47,7 @@ import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XLine2D; import net.sourceforge.plantuml.awt.geom.XPoint2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.creole.Stencil; import net.sourceforge.plantuml.cucadiagram.BodyFactory; import net.sourceforge.plantuml.cucadiagram.Display; @@ -94,7 +94,7 @@ public class EntityImageNote extends AbstractEntityImage implements Stencil { private final TextBlock textBlock; - public EntityImageNote(EntityImp entity, ISkinParam skinParam, UmlDiagramType umlDiagramType) { + public EntityImageNote(Entity entity, ISkinParam skinParam, UmlDiagramType umlDiagramType) { super(entity, getSkin(getISkinParam(skinParam, entity), entity)); this.skinParam = getISkinParam(skinParam, entity); @@ -121,14 +121,14 @@ public class EntityImageNote extends AbstractEntityImage implements Stencil { } - private static ISkinParam getISkinParam(ISkinParam skinParam, EntityImp entity) { + private static ISkinParam getISkinParam(ISkinParam skinParam, Entity entity) { if (entity.getColors() != null) return entity.getColors().mute(skinParam); return skinParam; } - static ISkinParam getSkin(ISkinParam skinParam, EntityImp entity) { + static ISkinParam getSkin(ISkinParam skinParam, Entity entity) { final Stereotype stereotype = entity.getStereotype(); HColor back = entity.getColors().getColor(ColorType.BACK); if (back != null) @@ -193,8 +193,8 @@ public class EntityImageNote extends AbstractEntityImage implements Stencil { final Url url = getEntity().getUrl99(); final Map typeIDent = new EnumMap<>(UGroupType.class); - typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected"); - typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode()); + typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getName() + " selected"); + typeIDent.put(UGroupType.ID, "elem_" + getEntity().getName()); ug.startGroup(typeIDent); if (url != null) diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageObject.java b/src/net/sourceforge/plantuml/svek/image/EntityImageObject.java index b49a01b60..66aa3e9c1 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageObject.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageObject.java @@ -43,7 +43,7 @@ import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineConfigurable; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XRectangle2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.creole.Stencil; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.EntityPortion; @@ -90,7 +90,7 @@ public class EntityImageObject extends AbstractEntityImage implements Stencil, W final private LineConfigurable lineConfig; - public EntityImageObject(EntityImp entity, ISkinParam skinParam, PortionShower portionShower) { + public EntityImageObject(Entity entity, ISkinParam skinParam, PortionShower portionShower) { super(entity, skinParam); this.lineConfig = entity; final Stereotype stereotype = entity.getStereotype(); @@ -131,7 +131,7 @@ public class EntityImageObject extends AbstractEntityImage implements Stencil, W .withTOBECHANGED(getEntity().getStereotype()).getMergedStyle(getSkinParam().getCurrentStyleBuilder()); } - private Display getUnderlinedName(EntityImp entity) { + private Display getUnderlinedName(Entity entity) { if (getSkinParam().strictUmlStyle()) return entity.getDisplay().underlinedName(); @@ -184,8 +184,8 @@ public class EntityImageObject extends AbstractEntityImage implements Stencil, W ug.startUrl(url); final Map typeIDent = new EnumMap<>(UGroupType.class); - typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected"); - typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode()); + typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getName() + " selected"); + typeIDent.put(UGroupType.ID, "elem_" + getEntity().getName()); ug.startGroup(typeIDent); ug.apply(stroke).draw(rect); @@ -240,7 +240,7 @@ public class EntityImageObject extends AbstractEntityImage implements Stencil, W } public ShapeType getShapeType() { - if (((EntityImp) getEntity()).getPortShortNames().size() > 0) + if (((Entity) getEntity()).getPortShortNames().size() > 0) return ShapeType.RECTANGLE_HTML_FOR_PORTS; return ShapeType.RECTANGLE; diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImagePort.java b/src/net/sourceforge/plantuml/svek/image/EntityImagePort.java index 0b0ad9a34..99ad6cd51 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImagePort.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImagePort.java @@ -39,7 +39,7 @@ package net.sourceforge.plantuml.svek.image; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XPoint2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.EntityPosition; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.klimt.Shadowable; @@ -64,7 +64,7 @@ public class EntityImagePort extends AbstractEntityImageBorder { private final SName sname; - public EntityImagePort(EntityImp leaf, ISkinParam skinParam, Cluster parent, Bibliotekon bibliotekon, SName sname) { + public EntityImagePort(Entity leaf, ISkinParam skinParam, Cluster parent, Bibliotekon bibliotekon, SName sname) { super(leaf, skinParam, parent, bibliotekon, FontParam.BOUNDARY); this.sname = sname; } diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImagePseudoState.java b/src/net/sourceforge/plantuml/svek/image/EntityImagePseudoState.java index c641e8e3b..705460a2c 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImagePseudoState.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImagePseudoState.java @@ -37,7 +37,7 @@ package net.sourceforge.plantuml.svek.image; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.TextBlock; @@ -63,7 +63,7 @@ public class EntityImagePseudoState extends AbstractEntityImage { private final TextBlock desc; private final SName sname; - public EntityImagePseudoState(EntityImp entity, ISkinParam skinParam, SName sname) { + public EntityImagePseudoState(Entity entity, ISkinParam skinParam, SName sname) { this(entity, skinParam, "H", sname); } @@ -75,7 +75,7 @@ public class EntityImagePseudoState extends AbstractEntityImage { return StyleSignatureBasic.of(SName.root, SName.element, sname, SName.diamond); } - public EntityImagePseudoState(EntityImp entity, ISkinParam skinParam, String historyText, SName sname) { + public EntityImagePseudoState(Entity entity, ISkinParam skinParam, String historyText, SName sname) { super(entity, skinParam); this.sname = sname; final Stereotype stereotype = entity.getStereotype(); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageState.java b/src/net/sourceforge/plantuml/svek/image/EntityImageState.java index 8f77a2cf2..1306cd02f 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageState.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageState.java @@ -39,7 +39,7 @@ import java.util.Collections; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Stereotype; @@ -68,7 +68,7 @@ public class EntityImageState extends EntityImageStateCommon { final static private double smallMarginX = 7; final static private double smallMarginY = 4; - public EntityImageState(EntityImp entity, ISkinParam skinParam) { + public EntityImageState(Entity entity, ISkinParam skinParam) { super(entity, skinParam); final Stereotype stereotype = entity.getStereotype(); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageState2.java b/src/net/sourceforge/plantuml/svek/image/EntityImageState2.java index 03e4f92ee..22b427e8e 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageState2.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageState2.java @@ -37,7 +37,7 @@ package net.sourceforge.plantuml.svek.image; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.BodyFactory; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.SymbolContext; @@ -62,7 +62,7 @@ public class EntityImageState2 extends AbstractEntityImage { private final TextBlock asSmall; - public EntityImageState2(EntityImp entity, ISkinParam skinParam, SName sname) { + public EntityImageState2(Entity entity, ISkinParam skinParam, SName sname) { super(entity, skinParam); this.sname = sname; final Stereotype stereotype = entity.getStereotype(); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageStateBorder.java b/src/net/sourceforge/plantuml/svek/image/EntityImageStateBorder.java index e02343817..8c70696a9 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageStateBorder.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageStateBorder.java @@ -38,7 +38,7 @@ package net.sourceforge.plantuml.svek.image; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XPoint2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.EntityPosition; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.klimt.UStroke; @@ -60,7 +60,7 @@ public class EntityImageStateBorder extends AbstractEntityImageBorder { private final SName sname; - public EntityImageStateBorder(EntityImp leaf, ISkinParam skinParam, Cluster stateParent, final Bibliotekon bibliotekon, + public EntityImageStateBorder(Entity leaf, ISkinParam skinParam, Cluster stateParent, final Bibliotekon bibliotekon, SName sname) { super(leaf, skinParam, stateParent, bibliotekon, FontParam.STATE); this.sname = sname; diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageStateCommon.java b/src/net/sourceforge/plantuml/svek/image/EntityImageStateCommon.java index 178cfb9a4..46c4bda94 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageStateCommon.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageStateCommon.java @@ -38,7 +38,7 @@ package net.sourceforge.plantuml.svek.image; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineConfigurable; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.klimt.URectangle; @@ -62,7 +62,7 @@ public abstract class EntityImageStateCommon extends AbstractEntityImage { final protected LineConfigurable lineConfig; - public EntityImageStateCommon(EntityImp entity, ISkinParam skinParam) { + public EntityImageStateCommon(Entity entity, ISkinParam skinParam) { super(entity, skinParam); this.lineConfig = entity; @@ -76,22 +76,22 @@ public abstract class EntityImageStateCommon extends AbstractEntityImage { } - public static Style getStyleStateTitle(EntityImp group, ISkinParam skinParam) { + public static Style getStyleStateTitle(Entity group, ISkinParam skinParam) { return StyleSignatureBasic.of(SName.root, SName.element, SName.stateDiagram, SName.state, SName.title) .withTOBECHANGED(group.getStereotype()).getMergedStyle(skinParam.getCurrentStyleBuilder()); } - public static Style getStyleStateHeader(EntityImp group, ISkinParam skinParam) { + public static Style getStyleStateHeader(Entity group, ISkinParam skinParam) { return StyleSignatureBasic.of(SName.root, SName.element, SName.stateDiagram, SName.state, SName.header) .withTOBECHANGED(group.getStereotype()).getMergedStyle(skinParam.getCurrentStyleBuilder()); } - public static Style getStyleState(EntityImp group, ISkinParam skinParam) { + public static Style getStyleState(Entity group, ISkinParam skinParam) { return StyleSignatureBasic.of(SName.root, SName.element, SName.stateDiagram, SName.state) .withTOBECHANGED(group.getStereotype()).getMergedStyle(skinParam.getCurrentStyleBuilder()); } - public static Style getStyleStateBody(EntityImp group, ISkinParam skinParam) { + public static Style getStyleStateBody(Entity group, ISkinParam skinParam) { return StyleSignatureBasic.of(SName.root, SName.element, SName.stateDiagram, SName.stateBody) .withTOBECHANGED(group.getStereotype()).getMergedStyle(skinParam.getCurrentStyleBuilder()); } diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageStateEmptyDescription.java b/src/net/sourceforge/plantuml/svek/image/EntityImageStateEmptyDescription.java index fa28b6eeb..119b9e872 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageStateEmptyDescription.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageStateEmptyDescription.java @@ -37,7 +37,7 @@ package net.sourceforge.plantuml.svek.image; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.klimt.UStroke; import net.sourceforge.plantuml.klimt.UTranslate; import net.sourceforge.plantuml.klimt.font.StringBounder; @@ -48,7 +48,7 @@ public class EntityImageStateEmptyDescription extends EntityImageStateCommon { final private static int MIN_WIDTH = 50; final private static int MIN_HEIGHT = 40; - public EntityImageStateEmptyDescription(EntityImp entity, ISkinParam skinParam) { + public EntityImageStateEmptyDescription(Entity entity, ISkinParam skinParam) { super(entity, skinParam); } diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageSynchroBar.java b/src/net/sourceforge/plantuml/svek/image/EntityImageSynchroBar.java index 1a02bfa6a..3733aa834 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageSynchroBar.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageSynchroBar.java @@ -37,7 +37,7 @@ package net.sourceforge.plantuml.svek.image; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.awt.geom.XDimension2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.klimt.Shadowable; import net.sourceforge.plantuml.klimt.URectangle; import net.sourceforge.plantuml.klimt.color.HColor; @@ -56,7 +56,7 @@ public class EntityImageSynchroBar extends AbstractEntityImage { // private final SName styleName; - public EntityImageSynchroBar(EntityImp entity, ISkinParam skinParam, SName styleName) { + public EntityImageSynchroBar(Entity entity, ISkinParam skinParam, SName styleName) { super(entity, skinParam); // this.styleName = styleName; } diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageTips.java b/src/net/sourceforge/plantuml/svek/image/EntityImageTips.java index d489e865a..82b5da13e 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageTips.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageTips.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XPoint2D; import net.sourceforge.plantuml.awt.geom.XRectangle2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.command.Position; import net.sourceforge.plantuml.cucadiagram.BodyFactory; import net.sourceforge.plantuml.cucadiagram.Display; @@ -79,7 +79,7 @@ public class EntityImageTips extends AbstractEntityImage { private final double ySpacing = 10; - public EntityImageTips(EntityImp entity, ISkinParam skinParam, Bibliotekon bibliotekon, UmlDiagramType type) { + public EntityImageTips(Entity entity, ISkinParam skinParam, Bibliotekon bibliotekon, UmlDiagramType type) { super(entity, EntityImageNote.getSkin(skinParam, entity)); this.skinParam = skinParam; this.bibliotekon = bibliotekon; @@ -99,7 +99,7 @@ public class EntityImageTips extends AbstractEntityImage { } private Position getPosition() { - if (getEntity().getCodeGetName().endsWith(Position.RIGHT.name())) + if (getEntity().getName().endsWith(Position.RIGHT.name())) return Position.RIGHT; return Position.LEFT; @@ -125,7 +125,7 @@ public class EntityImageTips extends AbstractEntityImage { public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); - final EntityImp other = bibliotekon.getOnlyOther(getEntity()); + final Entity other = bibliotekon.getOnlyOther(getEntity()); final SvekNode nodeMe = bibliotekon.getNode(getEntity()); final SvekNode nodeOther = bibliotekon.getNode(other); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageUseCase.java b/src/net/sourceforge/plantuml/svek/image/EntityImageUseCase.java index 29d9a8105..b92ecc7a8 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageUseCase.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageUseCase.java @@ -41,7 +41,7 @@ import java.util.Map; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XPoint2D; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.creole.Stencil; import net.sourceforge.plantuml.cucadiagram.BodyFactory; import net.sourceforge.plantuml.cucadiagram.Display; @@ -83,7 +83,7 @@ public class EntityImageUseCase extends AbstractEntityImage { final private Url url; - public EntityImageUseCase(EntityImp entity, ISkinParam skinParam2, PortionShower portionShower) { + public EntityImageUseCase(Entity entity, ISkinParam skinParam2, PortionShower portionShower) { super(entity, entity.getColors().mute(skinParam2)); final Stereotype stereotype = entity.getStereotype(); @@ -135,8 +135,8 @@ public class EntityImageUseCase extends AbstractEntityImage { final UGraphic ug2 = new MyUGraphicEllipse(ug, 0, 0, ellipse.getUEllipse()); final Map typeIDent = new EnumMap<>(UGroupType.class); - typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected"); - typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode()); + typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getName() + " selected"); + typeIDent.put(UGroupType.ID, "elem_" + getEntity().getName()); ug.startGroup(typeIDent); ellipse.drawU(ug2); ug2.closeGroup(); diff --git a/src/net/sourceforge/plantuml/swing/AboutWindow.java b/src/net/sourceforge/plantuml/swing/AboutWindow.java index 793edd31e..c1841d976 100644 --- a/src/net/sourceforge/plantuml/swing/AboutWindow.java +++ b/src/net/sourceforge/plantuml/swing/AboutWindow.java @@ -61,7 +61,7 @@ import net.sourceforge.plantuml.version.PSystemVersion; import net.sourceforge.plantuml.version.Version; class AboutWindow extends JFrame { - // :: remove folder when WASM + // :: remove folder when CORE public AboutWindow() { super(); diff --git a/src/net/sourceforge/plantuml/telnet/TelnetServer.java b/src/net/sourceforge/plantuml/telnet/TelnetServer.java index 2dede1acc..5222393ae 100644 --- a/src/net/sourceforge/plantuml/telnet/TelnetServer.java +++ b/src/net/sourceforge/plantuml/telnet/TelnetServer.java @@ -39,7 +39,7 @@ import java.net.ServerSocket; import java.net.Socket; public class TelnetServer { - // ::remove folder when WASM + // ::remove folder when CORE public static void main(String args[]) throws Exception { final ServerSocket server = new ServerSocket(4242); while (true) { diff --git a/src/net/sourceforge/plantuml/theme/ThemeUtils.java b/src/net/sourceforge/plantuml/theme/ThemeUtils.java index 595224363..da122a516 100644 --- a/src/net/sourceforge/plantuml/theme/ThemeUtils.java +++ b/src/net/sourceforge/plantuml/theme/ThemeUtils.java @@ -50,7 +50,7 @@ import net.sourceforge.plantuml.preproc.Stdlib; import net.sourceforge.plantuml.sprite.ResourcesUtils; import net.sourceforge.plantuml.utils.Log; -// ::uncomment when WASM +// ::uncomment when CORE //import com.plantuml.wasm.RunInit; //import java.io.FileInputStream; //import java.io.FileNotFoundException; @@ -64,7 +64,7 @@ public class ThemeUtils { private static final String THEME_PATH = "themes"; - // ::uncomment when WASM + // ::uncomment when CORE // public static ReadLine getReaderTheme(String filename) throws FileNotFoundException { // Log.info("Loading theme " + filename); // final String fullpath = RunInit.cheerpjPath + THEME_PATH + "/" + THEME_FILE_PREFIX + filename @@ -77,7 +77,7 @@ public class ThemeUtils { //} // ::done - // ::comment when WASM + // ::comment when CORE public static ReadLine getReaderTheme(String filename) { Log.info("Loading theme " + filename); final String res = "/" + THEME_PATH + "/" + THEME_FILE_PREFIX + filename + THEME_FILE_SUFFIX; diff --git a/src/net/sourceforge/plantuml/tikz/TikzGraphics.java b/src/net/sourceforge/plantuml/tikz/TikzGraphics.java index 0475d7ed9..1803f5562 100644 --- a/src/net/sourceforge/plantuml/tikz/TikzGraphics.java +++ b/src/net/sourceforge/plantuml/tikz/TikzGraphics.java @@ -61,7 +61,7 @@ import net.sourceforge.plantuml.utils.Log; import net.sourceforge.plantuml.version.Version; public class TikzGraphics { - // ::remove folder when WASM + // ::remove folder when CORE // https://www.sharelatex.com/blog/2013/08/27/tikz-series-pt1.html // http://cremeronline.com/LaTeX/minimaltikz.pdf diff --git a/src/net/sourceforge/plantuml/tim/stdlib/Getenv.java b/src/net/sourceforge/plantuml/tim/stdlib/Getenv.java index ac52f57ce..62d1dd197 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/Getenv.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/Getenv.java @@ -60,11 +60,11 @@ public class Getenv extends SimpleReturnFunction { public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List values, Map named) throws EaterException, EaterExceptionLocated { - // ::comment when WASM + // ::comment when CORE if (OptionFlags.ALLOW_INCLUDE == false) // ::done return TValue.fromString(""); - // ::comment when WASM + // ::comment when CORE final String name = values.get(0).toString(); final String value = getenv(name); @@ -75,7 +75,7 @@ public class Getenv extends SimpleReturnFunction { // ::done } - // ::comment when WASM + // ::comment when CORE private String getenv(String name) { // Check, if the script requests secret information. // A plantuml server should have an own SecurityManager to diff --git a/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java b/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java index f47972c09..13f8d9668 100644 --- a/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java +++ b/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java @@ -113,7 +113,7 @@ import net.sourceforge.plantuml.url.Url; public class ImageBuilder { - // ::comment when WASM + // ::comment when CORE private Animation animation; // ::done private boolean annotations; @@ -223,7 +223,7 @@ public class ImageBuilder { public ImageBuilder styled(TitledDiagram diagram) { skinParam = diagram.getSkinParam(); stringBounder = fileFormatOption.getDefaultStringBounder(skinParam); - // ::comment when WASM + // ::comment when CORE animation = diagram.getAnimation(); // ::done annotations = true; @@ -246,7 +246,7 @@ public class ImageBuilder { udrawable = annotatedWorker.addAdd((TextBlock) udrawable); } - // ::comment when WASM + // ::comment when CORE switch (fileFormatOption.getFileFormat()) { case MJPEG: return writeImageMjpeg(os); @@ -255,10 +255,10 @@ public class ImageBuilder { default: return writeImageInternal(os, animation); // ::done - // ::uncomment when WASM + // ::uncomment when CORE // return writeImageInternal(os); // ::done - // ::comment when WASM + // ::comment when CORE } // ::done } @@ -270,16 +270,16 @@ public class ImageBuilder { } } - // ::comment when WASM + // ::comment when CORE private ImageData writeImageInternal(OutputStream os, Animation animationArg) throws IOException { // ::done - // ::uncomment when WASM + // ::uncomment when CORE // private ImageData writeImageInternal(OutputStream os) throws IOException { // ::done XDimension2D dim = getFinalDimension(); double dx = 0; double dy = 0; - // ::comment when WASM + // ::comment when CORE if (animationArg != null) { final MinMax minmax = animationArg.getMinMax(dim); animationArg.setDimension(dim); @@ -294,11 +294,11 @@ public class ImageBuilder { if (scaleFactor <= 0) throw new IllegalStateException("Bad scaleFactor"); WasmLog.log("...image drawing..."); - // ::comment when WASM + // ::comment when CORE UGraphic ug = createUGraphic(dim, animationArg, dx, dy, scaleFactor, titledDiagram == null ? new Pragma() : titledDiagram.getPragma()); // ::done - // ::uncomment when WASM + // ::uncomment when CORE // UGraphic ug = createUGraphic(dim, dx, dy, scaleFactor, // titledDiagram == null ? new Pragma() : titledDiagram.getPragma()); // ::done @@ -368,7 +368,7 @@ public class ImageBuilder { return ug; } - // ::comment when WASM + // ::comment when CORE private ImageData writeImageMjpeg(OutputStream os) throws IOException { final XDimension2D dim = getFinalDimension(); @@ -427,28 +427,28 @@ public class ImageBuilder { } // ::done - // ::comment when WASM + // ::comment when CORE private UGraphic createUGraphic(final XDimension2D dim, Animation animationArg, double dx, double dy, double scaleFactor, Pragma pragma) { // ::done - // ::uncomment when WASM + // ::uncomment when CORE // private UGraphic createUGraphic(final XDimension2D dim, double dx, double dy, // double scaleFactor, Pragma pragma) { // ::done final ColorMapper colorMapper = fileFormatOption.getColorMapper(); switch (fileFormatOption.getFileFormat()) { case PNG: - // ::comment when WASM + // ::comment when CORE return createUGraphicPNG(scaleFactor, dim, animationArg, dx, dy, fileFormatOption.getWatermark()); // ::done - // ::uncomment when WASM + // ::uncomment when CORE // return createUGraphicPNG(scaleFactor, dim, dx, dy, // fileFormatOption.getWatermark()); // ::done case SVG: final boolean interactive = "true".equalsIgnoreCase(pragma.getValue("svginteractive")); return createUGraphicSVG(scaleFactor, dim, interactive); - // ::comment when WASM + // ::comment when CORE case EPS: return new UGraphicEps(backcolor, colorMapper, stringBounder, EpsStrategy.getDefault2()); case EPS_TEXT: @@ -488,11 +488,11 @@ public class ImageBuilder { } - // ::uncomment when WASM + // ::uncomment when CORE // private UGraphic createUGraphicPNG(double scaleFactor, final XDimension2D // dim, double dx, double dy, String watermark) { // ::done - // ::comment when WASM + // ::comment when CORE private UGraphic createUGraphicPNG(double scaleFactor, final XDimension2D dim, Animation affineTransforms, double dx, double dy, String watermark) { // ::done @@ -509,11 +509,11 @@ public class ImageBuilder { (int) (dim.getHeight() * scaleFactor), pngBackColor, stringBounder); final Graphics2D graphics2D = builder.getGraphics2D(); - // ::comment when WASM + // ::comment when CORE final UGraphicG2d ug = new UGraphicG2d(backcolor, fileFormatOption.getColorMapper(), stringBounder, graphics2D, scaleFactor, affineTransforms == null ? null : affineTransforms.getFirst(), dx, dy); // ::done - // ::uncomment when WASM + // ::uncomment when CORE // final UGraphicG2d ug = new UGraphicG2d(backcolor, // fileFormatOption.getColorMapper(), stringBounder, graphics2D, // scaleFactor, dx, dy); diff --git a/src/net/sourceforge/plantuml/ugraphic/debug/StringBounderDebug.java b/src/net/sourceforge/plantuml/ugraphic/debug/StringBounderDebug.java index 2cf212194..173fab66f 100644 --- a/src/net/sourceforge/plantuml/ugraphic/debug/StringBounderDebug.java +++ b/src/net/sourceforge/plantuml/ugraphic/debug/StringBounderDebug.java @@ -43,7 +43,7 @@ import net.sourceforge.plantuml.klimt.font.StringBounderRaw; import net.sourceforge.plantuml.klimt.font.UFont; public class StringBounderDebug extends StringBounderRaw { - // ::remove folder when WASM + // ::remove folder when CORE public StringBounderDebug() { super(FileFormat.gg.getFontRenderContext()); diff --git a/src/net/sourceforge/plantuml/ugraphic/eps/DriverCenteredCharacterEps.java b/src/net/sourceforge/plantuml/ugraphic/eps/DriverCenteredCharacterEps.java index 5282cc83e..91758d17e 100644 --- a/src/net/sourceforge/plantuml/ugraphic/eps/DriverCenteredCharacterEps.java +++ b/src/net/sourceforge/plantuml/ugraphic/eps/DriverCenteredCharacterEps.java @@ -47,7 +47,7 @@ import net.sourceforge.plantuml.ugraphic.UCenteredCharacter; import net.sourceforge.plantuml.ugraphic.UDriver; public class DriverCenteredCharacterEps implements UDriver { - // ::remove folder when WASM + // ::remove folder when CORE public void draw(UCenteredCharacter centeredCharacter, double x, double y, ColorMapper mapper, UParam param, EpsGraphics eps) { diff --git a/src/net/sourceforge/plantuml/ugraphic/g2d/UGraphicG2d.java b/src/net/sourceforge/plantuml/ugraphic/g2d/UGraphicG2d.java index 612fd8926..37423d7bd 100644 --- a/src/net/sourceforge/plantuml/ugraphic/g2d/UGraphicG2d.java +++ b/src/net/sourceforge/plantuml/ugraphic/g2d/UGraphicG2d.java @@ -86,7 +86,7 @@ public class UGraphicG2d extends AbstractUGraphic implements EnsureV private List urls = new ArrayList<>(); private Set allUrls = new HashSet<>(); - // ::comment when WASM + // ::comment when CORE private final boolean hasAffineTransform; // ::done @@ -110,7 +110,7 @@ public class UGraphicG2d extends AbstractUGraphic implements EnsureV private UGraphicG2d(UGraphicG2d other) { super(other); - // ::comment when WASM + // ::comment when CORE this.hasAffineTransform = other.hasAffineTransform; // ::done this.dpiFactor = other.dpiFactor; @@ -123,19 +123,19 @@ public class UGraphicG2d extends AbstractUGraphic implements EnsureV public UGraphicG2d(HColor defaultBackground, ColorMapper colorMapper, StringBounder stringBounder, Graphics2D g2d, double dpiFactor) { - // ::comment when WASM + // ::comment when CORE this(defaultBackground, colorMapper, stringBounder, g2d, dpiFactor, null, 0, 0); // ::done - // ::uncomment when WASM + // ::uncomment when CORE // this(defaultBackground, colorMapper, stringBounder, g2d, dpiFactor, 0, 0); // ::done } - // ::comment when WASM + // ::comment when CORE public UGraphicG2d(HColor defaultBackground, ColorMapper colorMapper, StringBounder stringBounder, Graphics2D g2d, double dpiFactor, AffineTransformation affineTransform, double dx, double dy) { // ::done - // ::uncomment when WASM + // ::uncomment when CORE // public UGraphicG2d(HColor defaultBackground, ColorMapper colorMapper, // StringBounder stringBounder, Graphics2D g2d, // double dpiFactor, double dx, double dy) { @@ -145,7 +145,7 @@ public class UGraphicG2d extends AbstractUGraphic implements EnsureV if (dpiFactor != 1.0) g2d.scale(dpiFactor, dpiFactor); - // ::comment when WASM + // ::comment when CORE this.hasAffineTransform = affineTransform != null; if (this.hasAffineTransform) { if (dx != 0 || dy != 0) diff --git a/src/net/sourceforge/plantuml/ugraphic/html5/DriverLineHtml5.java b/src/net/sourceforge/plantuml/ugraphic/html5/DriverLineHtml5.java index be1a218ca..c6720046f 100644 --- a/src/net/sourceforge/plantuml/ugraphic/html5/DriverLineHtml5.java +++ b/src/net/sourceforge/plantuml/ugraphic/html5/DriverLineHtml5.java @@ -44,7 +44,7 @@ import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.UDriver; public class DriverLineHtml5 implements UDriver { - // ::remove folder when WASM + // ::remove folder when CORE private final ClipContainer clipContainer; diff --git a/src/net/sourceforge/plantuml/ugraphic/tikz/DriverAtomTextTikz.java b/src/net/sourceforge/plantuml/ugraphic/tikz/DriverAtomTextTikz.java index 737945c32..4edc94e45 100644 --- a/src/net/sourceforge/plantuml/ugraphic/tikz/DriverAtomTextTikz.java +++ b/src/net/sourceforge/plantuml/ugraphic/tikz/DriverAtomTextTikz.java @@ -45,7 +45,7 @@ import net.sourceforge.plantuml.tikz.TikzGraphics; import net.sourceforge.plantuml.ugraphic.UDriver; public class DriverAtomTextTikz implements UDriver { - // ::remove folder when WASM + // ::remove folder when CORE public void draw(AtomText text, double x, double y, ColorMapper mapper, UParam param, TikzGraphics tikz) { final FontConfiguration fontConfiguration = text.getFontConfiguration(); diff --git a/src/net/sourceforge/plantuml/ugraphic/txt/UGraphicTxt.java b/src/net/sourceforge/plantuml/ugraphic/txt/UGraphicTxt.java index 7f08cc41e..f89e14ceb 100644 --- a/src/net/sourceforge/plantuml/ugraphic/txt/UGraphicTxt.java +++ b/src/net/sourceforge/plantuml/ugraphic/txt/UGraphicTxt.java @@ -56,7 +56,7 @@ import net.sourceforge.plantuml.ugraphic.AbstractCommonUGraphic; import net.sourceforge.plantuml.ugraphic.ClipContainer; public class UGraphicTxt extends AbstractCommonUGraphic implements ClipContainer { - // ::remove folder when WASM + // ::remove folder when CORE private final UmlCharArea charArea; diff --git a/src/net/sourceforge/plantuml/ugraphic/visio/DriverDotPathVdx.java b/src/net/sourceforge/plantuml/ugraphic/visio/DriverDotPathVdx.java index 7d7937a88..579871d6e 100644 --- a/src/net/sourceforge/plantuml/ugraphic/visio/DriverDotPathVdx.java +++ b/src/net/sourceforge/plantuml/ugraphic/visio/DriverDotPathVdx.java @@ -40,7 +40,7 @@ import net.sourceforge.plantuml.klimt.color.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; public class DriverDotPathVdx implements UDriver { - // ::remove folder when WASM + // ::remove folder when CORE public void draw(DotPath path, double x, double y, ColorMapper mapper, UParam param, VisioGraphics visio) { visio.upath(x, y, path.toUPath()); diff --git a/src/net/sourceforge/plantuml/url/Check.java b/src/net/sourceforge/plantuml/url/Check.java index 61bb4c107..48a62d8be 100644 --- a/src/net/sourceforge/plantuml/url/Check.java +++ b/src/net/sourceforge/plantuml/url/Check.java @@ -36,7 +36,7 @@ package net.sourceforge.plantuml.url; final public class Check { - // ::remove file when WASM + // ::remove file when CORE private static boolean isJunit = false; diff --git a/src/net/sourceforge/plantuml/url/Url.java b/src/net/sourceforge/plantuml/url/Url.java index ee7c1ff39..121c0fe35 100644 --- a/src/net/sourceforge/plantuml/url/Url.java +++ b/src/net/sourceforge/plantuml/url/Url.java @@ -95,7 +95,7 @@ public class Url implements EnsureVisible { } public String getCoords(double scale) { - // ::comment when WASM + // ::comment when CORE if (Check.isJunit() && visible.getCoords(1.0).contains("0,0,0,0")) throw new IllegalStateException(toString()); // ::done diff --git a/src/net/sourceforge/plantuml/version/License.java b/src/net/sourceforge/plantuml/version/License.java index 817ba5b9b..e9a9e17c4 100644 --- a/src/net/sourceforge/plantuml/version/License.java +++ b/src/net/sourceforge/plantuml/version/License.java @@ -264,7 +264,7 @@ public enum License { } private void addSupplementary(final LicenseInfo licenseInfo, final List text) { - // ::comment when WASM + // ::comment when CORE if (licenseInfo.isValid() == false) { text.add("PlantUML can occasionally display sponsored or advertising messages. Those"); text.add("messages are usually generated on welcome or error images and never on"); @@ -279,7 +279,7 @@ public enum License { } private void header1(final List text, LicenseInfo licenseInfo) { - // ::comment when WASM + // ::comment when CORE if (licenseInfo.isNone()) { // ::done text.add("+======================================================================="); @@ -287,7 +287,7 @@ public enum License { text.add("| PlantUML : a free UML diagram generator"); text.add("| "); text.add("+======================================================================="); - // ::comment when WASM + // ::comment when CORE } else { text.add("+======================================================================="); text.add("| "); @@ -307,7 +307,7 @@ public enum License { text.add("Project Info: https://plantuml.com"); text.add(" "); - // ::comment when WASM + // ::comment when CORE if (licenseInfo.isValid() == false) { text.add("If you like this project or if you find it useful, you can support us at:"); text.add(" "); @@ -326,7 +326,7 @@ public enum License { } public static void addLicenseInfo(final List text, LicenseInfo licenseInfo) { - // ::comment when WASM + // ::comment when CORE if (licenseInfo.getLicenseType() == LicenseType.NAMED) { text.add("| "); text.add("| LICENSED TO : " + licenseInfo.getOwner()); @@ -478,7 +478,7 @@ public enum License { public List getTextFull() { final List text = new ArrayList<>(); - // ::comment when WASM + // ::comment when CORE final LicenseInfo licenseInfo = LicenseInfo.retrieveQuick(); header1(text, licenseInfo); header2(text, licenseInfo, false); @@ -524,7 +524,7 @@ public enum License { text.add("(more info on https://plantuml.com/statistics-report)"); } text.add(" "); - // ::comment when WASM + // ::comment when CORE if (WindowsDotArchive.getInstance().isThereArchive()) { text.add("This distribution bundles a minimal set of GraphViz files and may install them"); text.add(" if needed in the local temporary directory."); diff --git a/src/net/sourceforge/plantuml/version/LicenseInfo.java b/src/net/sourceforge/plantuml/version/LicenseInfo.java index 0a4a890c4..4bf6879ab 100644 --- a/src/net/sourceforge/plantuml/version/LicenseInfo.java +++ b/src/net/sourceforge/plantuml/version/LicenseInfo.java @@ -54,7 +54,7 @@ import net.sourceforge.plantuml.security.SImageIO; import net.sourceforge.plantuml.utils.Log; public class LicenseInfo { - // ::comment when WASM + // ::comment when CORE private final static Preferences prefs = Preferences.userNodeForPackage(LicenseInfo.class); public final static LicenseInfo NONE = new LicenseInfo(LicenseType.NONE, 0, 0, null, null, null); diff --git a/src/net/sourceforge/plantuml/version/LicenseType.java b/src/net/sourceforge/plantuml/version/LicenseType.java index 803520f5d..5a7142562 100644 --- a/src/net/sourceforge/plantuml/version/LicenseType.java +++ b/src/net/sourceforge/plantuml/version/LicenseType.java @@ -35,7 +35,7 @@ package net.sourceforge.plantuml.version; public enum LicenseType { - // ::remove file when WASM + // ::remove file when CORE NONE, NAMED, DISTRIBUTOR, UNKNOWN; diff --git a/src/net/sourceforge/plantuml/version/PLSSignature.java b/src/net/sourceforge/plantuml/version/PLSSignature.java index c5286ebcf..fb414cea5 100644 --- a/src/net/sourceforge/plantuml/version/PLSSignature.java +++ b/src/net/sourceforge/plantuml/version/PLSSignature.java @@ -57,7 +57,7 @@ import net.sourceforge.plantuml.dedication.TurningBytes; import net.sourceforge.plantuml.log.Logme; public class PLSSignature { - // ::remove file when WASM + // ::remove file when CORE private final int type; private final byte[] sha; diff --git a/src/net/sourceforge/plantuml/version/PSystemKeycheck.java b/src/net/sourceforge/plantuml/version/PSystemKeycheck.java index 79850af3d..ebf80c88d 100644 --- a/src/net/sourceforge/plantuml/version/PSystemKeycheck.java +++ b/src/net/sourceforge/plantuml/version/PSystemKeycheck.java @@ -60,7 +60,7 @@ import net.sourceforge.plantuml.ugraphic.PixelImage; import net.sourceforge.plantuml.ugraphic.UGraphic; public class PSystemKeycheck extends PlainDiagram { - // ::remove file when WASM + // ::remove file when CORE final private String key; final private String sig; diff --git a/src/net/sourceforge/plantuml/version/PSystemKeygen.java b/src/net/sourceforge/plantuml/version/PSystemKeygen.java index b6486067a..fdcab765f 100644 --- a/src/net/sourceforge/plantuml/version/PSystemKeygen.java +++ b/src/net/sourceforge/plantuml/version/PSystemKeygen.java @@ -60,7 +60,7 @@ import net.sourceforge.plantuml.ugraphic.PixelImage; import net.sourceforge.plantuml.ugraphic.UGraphic; public class PSystemKeygen extends PlainDiagram { - // ::remove file when WASM + // ::remove file when CORE final private String key; diff --git a/src/net/sourceforge/plantuml/version/PSystemLicense.java b/src/net/sourceforge/plantuml/version/PSystemLicense.java index 70d586d37..faf012ee2 100644 --- a/src/net/sourceforge/plantuml/version/PSystemLicense.java +++ b/src/net/sourceforge/plantuml/version/PSystemLicense.java @@ -77,19 +77,19 @@ public class PSystemLicense extends PlainDiagram implements UDrawable { public void drawU(UGraphic ug) { - // ::comment when WASM + // ::comment when CORE final LicenseInfo licenseInfo = LicenseInfo.retrieveQuick(); final BufferedImage logo = LicenseInfo.retrieveDistributorImage(licenseInfo); if (logo == null) { // ::done final List strings = new ArrayList<>(); - // ::comment when WASM + // ::comment when CORE strings.addAll(License.getCurrent().getText1(licenseInfo)); strings.addAll(License.getCurrent().getText2(licenseInfo)); // ::done getGraphicStrings(strings).drawU(ug); - // ::comment when WASM + // ::comment when CORE } else { final List strings1 = new ArrayList<>(); final List strings2 = new ArrayList<>(); diff --git a/src/net/sourceforge/plantuml/version/PSystemVersion.java b/src/net/sourceforge/plantuml/version/PSystemVersion.java index 03191712a..7dd65db85 100644 --- a/src/net/sourceforge/plantuml/version/PSystemVersion.java +++ b/src/net/sourceforge/plantuml/version/PSystemVersion.java @@ -97,7 +97,7 @@ public class PSystemVersion extends PlainStringsDiagram { return getImage("favicon.png"); } - // ::comment when WASM + // ::comment when CORE public static BufferedImage getArecibo() { return getImage("arecibo.png"); } @@ -127,7 +127,7 @@ public class PSystemVersion extends PlainStringsDiagram { return new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB); } - // ::comment when WASM + // ::comment when CORE private static BufferedImage getImageWebp(final String name) { try (InputStream is = PSystemVersion.class.getResourceAsStream(name)) { return SFile.getBufferedImageFromWebpButHeader(is); @@ -163,7 +163,7 @@ public class PSystemVersion extends PlainStringsDiagram { public static PSystemVersion createShowVersion2(UmlSource source) { final List strings = new ArrayList<>(); strings.add("PlantUML version " + Version.versionString() + " (" + Version.compileTimeString() + ")"); - // :: comment when WASM + // :: comment when CORE strings.add("(" + License.getCurrent() + " source distribution)"); GraphvizCrash.checkOldVersionWarning(strings); if (OptionFlags.ALLOW_INCLUDE) { @@ -195,7 +195,7 @@ public class PSystemVersion extends PlainStringsDiagram { return new PSystemVersion(source, true, strings); } - // :: comment when WASM + // :: comment when CORE public static PSystemVersion createStdLib(UmlSource source) { final List strings = new ArrayList<>(); Stdlib.addInfoVersion(strings, true); @@ -245,7 +245,7 @@ public class PSystemVersion extends PlainStringsDiagram { } - // ::comment when WASM + // ::comment when CORE public static PSystemVersion createTestDot(UmlSource source) throws IOException { final List strings = new ArrayList<>(); strings.add(Version.fullDescription()); @@ -264,7 +264,7 @@ public class PSystemVersion extends PlainStringsDiagram { // return new PSystemVersion(false, strings); // } - // ::comment when WASM + // ::comment when CORE public static PSystemVersion createKeyDistributor(UmlSource source) throws IOException { final LicenseInfo license = LicenseInfo.retrieveDistributor(); BufferedImage im = null; diff --git a/src/net/sourceforge/plantuml/version/PSystemVersionFactory.java b/src/net/sourceforge/plantuml/version/PSystemVersionFactory.java index 76fa5f296..e67dcc113 100644 --- a/src/net/sourceforge/plantuml/version/PSystemVersionFactory.java +++ b/src/net/sourceforge/plantuml/version/PSystemVersionFactory.java @@ -54,7 +54,7 @@ public class PSystemVersionFactory extends PSystemSingleLineFactory { if (line.matches("(?i)^version\\s*$")) return PSystemVersion.createShowVersion2(source); - // ::comment when WASM + // ::comment when CORE if (line.matches("(?i)^stdlib\\s*$")) return PSystemVersion.createStdLib(source); diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index 7ccb37b78..9e559acc2 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -81,7 +81,7 @@ public class Version { } public static int beta() { - final int beta = 2; + final int beta = 3; return beta; } @@ -104,7 +104,7 @@ public class Version { return new Date(Version.compileTime()).toString(); } - // ::comment when WASM + // ::comment when CORE public static String getJarPath() { try { final ClassLoader loader = Version.class.getClassLoader(); diff --git a/src/net/sourceforge/plantuml/vizjs/GraphvizJs.java b/src/net/sourceforge/plantuml/vizjs/GraphvizJs.java index 1db73d621..592317ec3 100644 --- a/src/net/sourceforge/plantuml/vizjs/GraphvizJs.java +++ b/src/net/sourceforge/plantuml/vizjs/GraphvizJs.java @@ -50,7 +50,7 @@ import net.sourceforge.plantuml.cucadiagram.dot.ProcessState; import net.sourceforge.plantuml.log.Logme; public class GraphvizJs implements Graphviz { - // ::remove folder when WASM + // ::remove folder when CORE private final static ExecutorService executorService = Executors .newSingleThreadScheduledExecutor(new ThreadFactory() { diff --git a/src/net/sourceforge/plantuml/webp/BoolDecoder.java b/src/net/sourceforge/plantuml/webp/BoolDecoder.java index b13accf6c..c04d4319a 100644 --- a/src/net/sourceforge/plantuml/webp/BoolDecoder.java +++ b/src/net/sourceforge/plantuml/webp/BoolDecoder.java @@ -20,7 +20,7 @@ import java.io.IOException; import javax.imageio.stream.ImageInputStream; public class BoolDecoder { - // ::remove folder when WASM + // ::remove folder when CORE int bit_count; /* # of bits shifted out of value, at most 7 */ ImageInputStream data; private long offset; /* pointer to next compressed data byte */ diff --git a/src/net/sourceforge/plantuml/windowsdot/WindowsDotArchive.java b/src/net/sourceforge/plantuml/windowsdot/WindowsDotArchive.java index e9e98cdcc..f9aa2b21c 100644 --- a/src/net/sourceforge/plantuml/windowsdot/WindowsDotArchive.java +++ b/src/net/sourceforge/plantuml/windowsdot/WindowsDotArchive.java @@ -46,7 +46,7 @@ import net.sourceforge.plantuml.brotli.BrotliInputStream; import net.sourceforge.plantuml.log.Logme; public final class WindowsDotArchive { - // ::remove folder when WASM + // ::remove folder when CORE private static WindowsDotArchive singleton = null; diff --git a/src/net/sourceforge/plantuml/wire/Block.java b/src/net/sourceforge/plantuml/wire/Block.java index 1c018b99a..43d91faf7 100644 --- a/src/net/sourceforge/plantuml/wire/Block.java +++ b/src/net/sourceforge/plantuml/wire/Block.java @@ -60,7 +60,7 @@ import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; public class Block extends AbstractTextBlock { - // ::remove folder when WASM + // ::remove folder when CORE static class Pos { final double x; diff --git a/src/net/sourceforge/plantuml/xmi/CucaDiagramXmiMaker.java b/src/net/sourceforge/plantuml/xmi/CucaDiagramXmiMaker.java index 88f51fbd4..284787599 100644 --- a/src/net/sourceforge/plantuml/xmi/CucaDiagramXmiMaker.java +++ b/src/net/sourceforge/plantuml/xmi/CucaDiagramXmiMaker.java @@ -51,7 +51,7 @@ import net.sourceforge.plantuml.statediagram.StateDiagram; import net.sourceforge.plantuml.utils.Log; public final class CucaDiagramXmiMaker { - // ::remove folder when WASM + // ::remove folder when CORE private final ICucaDiagram diagram; private final FileFormat fileFormat; diff --git a/src/net/sourceforge/plantuml/xmi/XmiClassDiagramAbstract.java b/src/net/sourceforge/plantuml/xmi/XmiClassDiagramAbstract.java index 287425bfd..b60c4efa1 100644 --- a/src/net/sourceforge/plantuml/xmi/XmiClassDiagramAbstract.java +++ b/src/net/sourceforge/plantuml/xmi/XmiClassDiagramAbstract.java @@ -54,7 +54,7 @@ import javax.xml.transform.stream.StreamResult; import org.w3c.dom.Document; import org.w3c.dom.Element; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.LeafType; @@ -72,7 +72,7 @@ abstract class XmiClassDiagramAbstract implements XmlDiagramTransformer { protected final Document document; protected Element ownedElement; - protected final Set done = new HashSet<>(); + protected final Set done = new HashSet<>(); public XmiClassDiagramAbstract(ClassDiagram classDiagram) throws ParserConfigurationException { this.classDiagram = classDiagram; @@ -132,14 +132,14 @@ abstract class XmiClassDiagramAbstract implements XmlDiagramTransformer { transformer.transform(source, resultat); } - final protected Element createEntityNode(EntityImp entity) { + final protected Element createEntityNode(Entity entity) { final Element cla = document.createElement("UML:Class"); if (entity.getLeafType() == LeafType.NOTE) return null; cla.setAttribute("xmi.id", entity.getUid()); cla.setAttribute("name", entity.getDisplay().get(0).toString()); - final String parentCode = entity.getQuark().getParent().forXmi(); + final String parentCode = entity.getQuark().getParent().toString("."); if (parentCode.length() == 0) cla.setAttribute("namespace", CucaDiagramXmiMaker.getModel(classDiagram)); @@ -163,12 +163,12 @@ abstract class XmiClassDiagramAbstract implements XmlDiagramTransformer { else if (type == LeafType.INTERFACE) cla.setAttribute("isInterface", "true"); - if (((EntityImp) entity).isStatic()) + if (((Entity) entity).isStatic()) cla.setAttribute("isStatic", "true"); - if (((EntityImp) entity).getVisibilityModifier() == VisibilityModifier.PRIVATE_FIELD - || ((EntityImp) entity).getVisibilityModifier() == VisibilityModifier.PRIVATE_METHOD) - cla.setAttribute("visibility", ((EntityImp) entity).getVisibilityModifier().getXmiVisibility()); + if (((Entity) entity).getVisibilityModifier() == VisibilityModifier.PRIVATE_FIELD + || ((Entity) entity).getVisibilityModifier() == VisibilityModifier.PRIVATE_METHOD) + cla.setAttribute("visibility", ((Entity) entity).getVisibilityModifier().getXmiVisibility()); final Element feature = document.createElement("UML:Classifier.feature"); cla.appendChild(feature); diff --git a/src/net/sourceforge/plantuml/xmi/XmiClassDiagramArgo.java b/src/net/sourceforge/plantuml/xmi/XmiClassDiagramArgo.java index 976ec913e..c0e248a30 100644 --- a/src/net/sourceforge/plantuml/xmi/XmiClassDiagramArgo.java +++ b/src/net/sourceforge/plantuml/xmi/XmiClassDiagramArgo.java @@ -39,7 +39,7 @@ import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Element; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.cucadiagram.Link; @@ -48,7 +48,7 @@ public class XmiClassDiagramArgo extends XmiClassDiagramAbstract implements XmlD public XmiClassDiagramArgo(ClassDiagram classDiagram) throws ParserConfigurationException { super(classDiagram); - for (final EntityImp ent : classDiagram.getLeafsvalues()) { + for (final Entity ent : classDiagram.getEntityFactory().leafs()) { if (classDiagram.isStandaloneForArgo(ent) == false) continue; @@ -129,7 +129,7 @@ public class XmiClassDiagramArgo extends XmiClassDiagramAbstract implements XmlD } - private Element createEntityNodeRef(EntityImp entity) { + private Element createEntityNodeRef(Entity entity) { final Element cla = document.createElement("UML:Class"); cla.setAttribute("xmi.idref", entity.getUid()); return cla; diff --git a/src/net/sourceforge/plantuml/xmi/XmiClassDiagramStandard.java b/src/net/sourceforge/plantuml/xmi/XmiClassDiagramStandard.java index 46526cb71..7e2c6fa35 100644 --- a/src/net/sourceforge/plantuml/xmi/XmiClassDiagramStandard.java +++ b/src/net/sourceforge/plantuml/xmi/XmiClassDiagramStandard.java @@ -39,7 +39,7 @@ import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Element; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.ClassDiagram; public class XmiClassDiagramStandard extends XmiClassDiagramAbstract implements XmlDiagramTransformer { @@ -47,7 +47,7 @@ public class XmiClassDiagramStandard extends XmiClassDiagramAbstract implements public XmiClassDiagramStandard(ClassDiagram classDiagram) throws ParserConfigurationException { super(classDiagram); - for (final EntityImp ent : classDiagram.getLeafsvalues()) { + for (final Entity ent : classDiagram.getEntityFactory().leafs()) { // if (fileFormat == FileFormat.XMI_ARGO && isStandalone(ent) == false) { // continue; // } diff --git a/src/net/sourceforge/plantuml/xmi/XmiClassDiagramStar.java b/src/net/sourceforge/plantuml/xmi/XmiClassDiagramStar.java index cfe2e9660..fda4ce57e 100644 --- a/src/net/sourceforge/plantuml/xmi/XmiClassDiagramStar.java +++ b/src/net/sourceforge/plantuml/xmi/XmiClassDiagramStar.java @@ -39,7 +39,7 @@ import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Element; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Link; @@ -50,7 +50,7 @@ public class XmiClassDiagramStar extends XmiClassDiagramAbstract implements XmlD public XmiClassDiagramStar(ClassDiagram classDiagram) throws ParserConfigurationException { super(classDiagram); - for (final EntityImp ent : classDiagram.getLeafsvalues()) { + for (final Entity ent : classDiagram.getEntityFactory().leafs()) { final Element cla = createEntityNode(ent); if (cla == null) continue; diff --git a/src/net/sourceforge/plantuml/xmi/XmiDescriptionDiagram.java b/src/net/sourceforge/plantuml/xmi/XmiDescriptionDiagram.java index 8070865fd..7c7a471cb 100644 --- a/src/net/sourceforge/plantuml/xmi/XmiDescriptionDiagram.java +++ b/src/net/sourceforge/plantuml/xmi/XmiDescriptionDiagram.java @@ -52,7 +52,7 @@ import javax.xml.transform.stream.StreamResult; import org.w3c.dom.Document; import org.w3c.dom.Element; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkDecor; @@ -97,12 +97,12 @@ public class XmiDescriptionDiagram implements XmlDiagramTransformer { this.ownedElement = document.createElement("UML:Namespace.ownedElement"); model.appendChild(ownedElement); - for (final EntityImp gr : diagram.getGroups(false)) - if (gr.getParentContainer().instanceofGroupRoot()) + for (final Entity gr : diagram.getEntityFactory().groups()) + if (gr.getParentContainer().isRoot()) addElement(gr, ownedElement); - for (final EntityImp ent : diagram.getLeafsvalues()) - if (ent.getParentContainer().instanceofGroupRoot()) + for (final Entity ent : diagram.getEntityFactory().leafs()) + if (ent.getParentContainer().isRoot()) addElement(ent, ownedElement); for (final Link link : diagram.getLinks()) @@ -110,14 +110,14 @@ public class XmiDescriptionDiagram implements XmlDiagramTransformer { } - private void addElement(final EntityImp tobeAdded, Element container) { + private void addElement(final Entity tobeAdded, Element container) { final Element element = createEntityNode(tobeAdded); container.appendChild(element); - for (final EntityImp ent : diagram.getGroups(false)) + for (final Entity ent : diagram.getEntityFactory().groups()) if (ent.getParentContainer() == tobeAdded) addElement(ent, element); - for (final EntityImp ent : diagram.getLeafsvalues()) + for (final Entity ent : diagram.getEntityFactory().leafs()) if (ent.getParentContainer() == tobeAdded) addElement(ent, element); @@ -182,7 +182,7 @@ public class XmiDescriptionDiagram implements XmlDiagramTransformer { } - private Element createEntityNode(EntityImp entity) { + private Element createEntityNode(Entity entity) { final Element cla = document.createElement("UML:Component"); cla.setAttribute("xmi.id", entity.getUid()); diff --git a/src/net/sourceforge/plantuml/xmi/XmiStateDiagram.java b/src/net/sourceforge/plantuml/xmi/XmiStateDiagram.java index f0d64bdb5..708765c7c 100644 --- a/src/net/sourceforge/plantuml/xmi/XmiStateDiagram.java +++ b/src/net/sourceforge/plantuml/xmi/XmiStateDiagram.java @@ -52,7 +52,7 @@ import javax.xml.transform.stream.StreamResult; import org.w3c.dom.Document; import org.w3c.dom.Element; -import net.sourceforge.plantuml.baraye.EntityImp; +import net.sourceforge.plantuml.baraye.Entity; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkDecor; @@ -98,36 +98,30 @@ public class XmiStateDiagram implements XmlDiagramTransformer { this.ownedElement = document.createElement("UML:Namespace.ownedElement"); model.appendChild(ownedElement); - for (final EntityImp gr : diagram.getGroups(false)) { - if (gr.getParentContainer().instanceofGroupRoot()) { + for (final Entity gr : diagram.getEntityFactory().groups()) + if (gr.getParentContainer().isRoot()) addState(gr, ownedElement); - } - } - for (final EntityImp ent : diagram.getLeafsvalues()) { - if (ent.getParentContainer().instanceofGroupRoot()) { + for (final Entity ent : diagram.getEntityFactory().leafs()) + if (ent.getParentContainer().isRoot()) addState(ent, ownedElement); - } - } - for (final Link link : diagram.getLinks()) { + for (final Link link : diagram.getLinks()) addLink(link); - } + } - private void addState(final EntityImp tobeAdded, Element container) { + private void addState(final Entity tobeAdded, Element container) { final Element elementState = createEntityNode(tobeAdded); container.appendChild(elementState); - for (final EntityImp ent : diagram.getGroups(false)) { - if (ent.getParentContainer() == tobeAdded) { + for (final Entity ent : diagram.getEntityFactory().groups()) + if (ent.getParentContainer() == tobeAdded) addState(ent, elementState); - } - } - for (final EntityImp ent : diagram.getLeafsvalues()) { - if (ent.getParentContainer() == tobeAdded) { + + for (final Entity ent : diagram.getEntityFactory().leafs()) + if (ent.getParentContainer() == tobeAdded) addState(ent, elementState); - } - } + } public static String forXMI(String s) { @@ -144,26 +138,25 @@ public class XmiStateDiagram implements XmlDiagramTransformer { final Element association = document.createElement("UML:Association"); association.setAttribute("xmi.id", assId); association.setAttribute("namespace", CucaDiagramXmiMaker.getModel(diagram)); - if (Display.isNull(link.getLabel()) == false) { + if (Display.isNull(link.getLabel()) == false) association.setAttribute("name", forXMI(link.getLabel())); - } final Element connection = document.createElement("UML:Association.connection"); final Element end1 = document.createElement("UML:AssociationEnd"); end1.setAttribute("xmi.id", "end" + diagram.getUniqueSequence()); end1.setAttribute("association", assId); end1.setAttribute("type", link.getEntity1().getUid()); - if (link.getQuantifier1() != null) { + if (link.getQuantifier1() != null) end1.setAttribute("name", forXMI(link.getQuantifier1())); - } + final Element endparticipant1 = document.createElement("UML:AssociationEnd.participant"); - if (link.getType().getDecor2() == LinkDecor.COMPOSITION) { + if (link.getType().getDecor2() == LinkDecor.COMPOSITION) end1.setAttribute("aggregation", "composite"); - } - if (link.getType().getDecor2() == LinkDecor.AGREGATION) { + + if (link.getType().getDecor2() == LinkDecor.AGREGATION) end1.setAttribute("aggregation", "aggregate"); - } + // } end1.appendChild(endparticipant1); connection.appendChild(end1); @@ -172,16 +165,16 @@ public class XmiStateDiagram implements XmlDiagramTransformer { end2.setAttribute("xmi.id", "end" + diagram.getUniqueSequence()); end2.setAttribute("association", assId); end2.setAttribute("type", link.getEntity2().getUid()); - if (link.getQuantifier2() != null) { + if (link.getQuantifier2() != null) end2.setAttribute("name", forXMI(link.getQuantifier2())); - } + final Element endparticipant2 = document.createElement("UML:AssociationEnd.participant"); - if (link.getType().getDecor1() == LinkDecor.COMPOSITION) { + if (link.getType().getDecor1() == LinkDecor.COMPOSITION) end2.setAttribute("aggregation", "composite"); - } - if (link.getType().getDecor1() == LinkDecor.AGREGATION) { + + if (link.getType().getDecor1() == LinkDecor.AGREGATION) end2.setAttribute("aggregation", "aggregate"); - } + // } end2.appendChild(endparticipant2); connection.appendChild(end2); @@ -192,7 +185,7 @@ public class XmiStateDiagram implements XmlDiagramTransformer { } - private Element createEntityNode(EntityImp entity) { + private Element createEntityNode(Entity entity) { //