From 775d2e16c9063b96a017ce1a83a0bc4efbc7cf92 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Mon, 29 Aug 2022 18:43:42 +0200 Subject: [PATCH] Remove version from UML:model --- .../plantuml/xmi/XmiDescriptionDiagram.java | 6 +----- .../plantuml/xmi/XmiSequenceDiagramArgo.java | 20 +++++++------------ .../plantuml/xmi/XmiStateDiagram.java | 5 +---- test/nonreg/xmi/component/XMI0001_Test.java | 4 ++-- 4 files changed, 11 insertions(+), 24 deletions(-) diff --git a/src/net/sourceforge/plantuml/xmi/XmiDescriptionDiagram.java b/src/net/sourceforge/plantuml/xmi/XmiDescriptionDiagram.java index d5f7d16a3..497b0aae9 100644 --- a/src/net/sourceforge/plantuml/xmi/XmiDescriptionDiagram.java +++ b/src/net/sourceforge/plantuml/xmi/XmiDescriptionDiagram.java @@ -92,15 +92,11 @@ public class XmiDescriptionDiagram implements XmlDiagramTransformer { final Element content = document.createElement("XMI.content"); xmi.appendChild(content); - // final Element model = document.createElement("UML:Model"); model.setAttribute("xmi.id", CucaDiagramXmiMaker.getModel(diagram)); - model.setAttribute("name", "PlantUML " + Version.versionString()); + model.setAttribute("name", "PlantUML"); content.appendChild(model); - // this.ownedElement = document.createElement("UML:Namespace.ownedElement"); model.appendChild(ownedElement); diff --git a/src/net/sourceforge/plantuml/xmi/XmiSequenceDiagramArgo.java b/src/net/sourceforge/plantuml/xmi/XmiSequenceDiagramArgo.java index 88c5abe64..116223079 100644 --- a/src/net/sourceforge/plantuml/xmi/XmiSequenceDiagramArgo.java +++ b/src/net/sourceforge/plantuml/xmi/XmiSequenceDiagramArgo.java @@ -8,7 +8,6 @@ import net.sourceforge.plantuml.sequencediagram.Event; import net.sourceforge.plantuml.sequencediagram.Message; import net.sourceforge.plantuml.sequencediagram.Participant; import net.sourceforge.plantuml.sequencediagram.SequenceDiagram; -import net.sourceforge.plantuml.version.Version; public class XmiSequenceDiagramArgo extends XmiSequenceDiagram { public XmiSequenceDiagramArgo(SequenceDiagram diagram, Document document) { @@ -33,11 +32,8 @@ public class XmiSequenceDiagramArgo extends XmiSequenceDiagram { final Element content = document.createElement("XMI.content"); xmi.appendChild(content); - // final Element model = createElement(diagram, "UML:Model"); - model.setAttribute("name", "PlantUML " + Version.versionString()); + model.setAttribute("name", "PlantUML"); content.appendChild(model); Element ownedElement = document.createElement("UML:Namespace.ownedElement"); @@ -84,19 +80,17 @@ public class XmiSequenceDiagramArgo extends XmiSequenceDiagram { private Node createSendAction(Message message) { Element sendAction = createElement(message, "UML:SendAction"); - sendAction.appendChild(document.createElement("UML:Action.script")).appendChild(createElement( - "UML:ActionExpression", new String[][] { - {"xmi.id", getXmiId("UML:ActionExpression", message)}, - {"body", getDisplayString(message.getLabel()) } - })); + sendAction.appendChild(document.createElement("UML:Action.script")) + .appendChild(createElement("UML:ActionExpression", + new String[][] { { "xmi.id", getXmiId("UML:ActionExpression", message) }, + { "body", getDisplayString(message.getLabel()) } })); return sendAction; } private Element createElement(Object object, String tag) { - return createElement(tag, - new String[][] { {"xmi.id", getXmiId("UML:ActionExpression", object)}}); + return createElement(tag, new String[][] { { "xmi.id", getXmiId("UML:ActionExpression", object) } }); } - + private Node createRef(String tag, Object target) { Element role = document.createElement(tag); role.setAttribute("xmi.idref", getXmiId(tag, target)); diff --git a/src/net/sourceforge/plantuml/xmi/XmiStateDiagram.java b/src/net/sourceforge/plantuml/xmi/XmiStateDiagram.java index dd7671831..accf6fcc8 100644 --- a/src/net/sourceforge/plantuml/xmi/XmiStateDiagram.java +++ b/src/net/sourceforge/plantuml/xmi/XmiStateDiagram.java @@ -92,12 +92,9 @@ public class XmiStateDiagram implements XmlDiagramTransformer { final Element content = document.createElement("XMI.content"); xmi.appendChild(content); - // final Element model = document.createElement("UML:Model"); model.setAttribute("xmi.id", CucaDiagramXmiMaker.getModel(diagram)); - model.setAttribute("name", "PlantUML "+Version.versionString()); + model.setAttribute("name", "PlantUML"); content.appendChild(model); // diff --git a/test/nonreg/xmi/component/XMI0001_Test.java b/test/nonreg/xmi/component/XMI0001_Test.java index 3c9362385..3b8e20441 100644 --- a/test/nonreg/xmi/component/XMI0001_Test.java +++ b/test/nonreg/xmi/component/XMI0001_Test.java @@ -33,7 +33,7 @@ Expected result MUST be put between triple brackets - + @@ -76,7 +76,7 @@ Expected result MUST be put between triple brackets - +