Skip to content

Commit

Permalink
Replace PlantUML Version.versionString() by %version() in diagrams. (
Browse files Browse the repository at this point in the history
…#549)

Signed-off-by: Sjoerd Talsma <sjoerdtalsma@users.noreply.github.com>
  • Loading branch information
sjoerdtalsma authored Feb 19, 2024
1 parent 8d80bfd commit 9678a5d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
3 changes: 1 addition & 2 deletions src/main/java/nl/talsmasoftware/umldoclet/UMLDoclet.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import jdk.javadoc.doclet.DocletEnvironment;
import jdk.javadoc.doclet.Reporter;
import jdk.javadoc.doclet.StandardDoclet;
import net.sourceforge.plantuml.version.Version;
import nl.talsmasoftware.umldoclet.html.HtmlPostprocessor;
import nl.talsmasoftware.umldoclet.javadoc.DocletConfig;
import nl.talsmasoftware.umldoclet.javadoc.UMLFactory;
Expand Down Expand Up @@ -117,7 +116,7 @@ public Set<Option> getSupportedOptions() {
@Override
public boolean run(DocletEnvironment environment) {
config.logger().info(DOCLET_COPYRIGHT, DOCLET_VERSION);
config.logger().info(PLANTUML_COPYRIGHT, Version.versionString());
config.logger().info(PLANTUML_COPYRIGHT);

// First generate Standard HTML documentation

Expand Down
7 changes: 2 additions & 5 deletions src/main/java/nl/talsmasoftware/umldoclet/uml/Diagram.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2023 Talsma ICT
* Copyright 2016-2024 Talsma ICT
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -78,10 +78,7 @@ protected <IPW extends IndentingPrintWriter> IPW writeCustomDirectives(List<Stri

private <IPW extends IndentingPrintWriter> IPW writeFooterTo(IPW output) {
output.append("center footer").whitespace()
.append(config.logger().localize(
Message.DOCLET_UML_FOOTER,
Message.DOCLET_VERSION,
net.sourceforge.plantuml.version.Version.versionString()))
.append(config.logger().localize(Message.DOCLET_UML_FOOTER, Message.DOCLET_VERSION))
.newline();
return output;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2022 Talsma ICT
* Copyright 2016-2024 Talsma ICT
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,7 +15,6 @@
*/
package nl.talsmasoftware.umldoclet.uml;

import net.sourceforge.plantuml.version.Version;
import nl.talsmasoftware.umldoclet.configuration.Configuration;
import nl.talsmasoftware.umldoclet.configuration.ImageConfig;
import nl.talsmasoftware.umldoclet.logging.Message;
Expand Down Expand Up @@ -116,7 +115,7 @@ public void testCustomDirective() {
StringWriter output = new StringWriter();
Diagram testDiagram = new TestDiagram(config, new File("target/test-classes/custom-directive.puml"));
IndentingPrintWriter writer = IndentingPrintWriter.wrap(output, Indentation.NONE);
String footer = logger.localize(Message.DOCLET_UML_FOOTER, Message.DOCLET_VERSION, Version.versionString());
String footer = logger.localize(Message.DOCLET_UML_FOOTER, Message.DOCLET_VERSION);

// execute
testDiagram.writeTo(writer);
Expand All @@ -138,7 +137,7 @@ public void testCustomBackgroundcolor() {
StringWriter output = new StringWriter();
Diagram testDiagram = new TestDiagram(config, new File("target/test-classes/custom-directive.puml"));
IndentingPrintWriter writer = IndentingPrintWriter.wrap(output, Indentation.NONE);
String footer = logger.localize(Message.DOCLET_UML_FOOTER, Message.DOCLET_VERSION, Version.versionString());
String footer = logger.localize(Message.DOCLET_UML_FOOTER, Message.DOCLET_VERSION);

// execute
testDiagram.writeTo(writer);
Expand Down

0 comments on commit 9678a5d

Please sign in to comment.