From: Svjatoslav Agejenko Date: Tue, 19 Oct 2021 15:53:06 +0000 (+0300) Subject: Made graph name optional. Default name is "graph". X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=commitdiff_plain;h=3299e7bb4ad47a0e726cf101043793c442de8996;p=javainspect.git Made graph name optional. Default name is "graph". --- diff --git a/pom.xml b/pom.xml index 573798e..c594c1d 100644 --- a/pom.xml +++ b/pom.xml @@ -120,7 +120,7 @@ eu.svjatoslav svjatoslavcommons - 1.8 + 1.9-SNAPSHOT diff --git a/src/main/java/eu/svjatoslav/inspector/java/commandline/CommandlineConfiguration.java b/src/main/java/eu/svjatoslav/inspector/java/commandline/CommandlineConfiguration.java index 933a95d..5d4bf6f 100644 --- a/src/main/java/eu/svjatoslav/inspector/java/commandline/CommandlineConfiguration.java +++ b/src/main/java/eu/svjatoslav/inspector/java/commandline/CommandlineConfiguration.java @@ -16,7 +16,9 @@ public class CommandlineConfiguration { public final boolean configurationOk; public NullParameter hideOrphanedClasses; - public CommandlineConfiguration(String args[]) { + public static final String DEFAULT_GRAPH_NAME = "graph"; + + public CommandlineConfiguration(String[] args) { Parser parser = buildCommandlineParameterParser(); configurationOk = parser.parse(args); if (!configurationOk) @@ -36,8 +38,7 @@ public class CommandlineConfiguration { .addAliases("-j"); graphName = parser.add( - new StringParameter("Graph name.")) - .setMandatory() + new StringParameter("Graph name. (default: \"" + DEFAULT_GRAPH_NAME + "\")", DEFAULT_GRAPH_NAME)) .addAliases("-n"); showDebug = parser.add(