Skip to content

Commit f39fbda

Browse files
committed
ST6RI-178 Added description to KerMLRepositorySave util args
1 parent f356fa6 commit f39fbda

1 file changed

Lines changed: 18 additions & 8 deletions

File tree

org.omg.kerml.xtext/src/org/omg/kerml/xtext/util/KerMLRepositorySaveUtil.java

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@
4747
*/
4848
public class KerMLRepositorySaveUtil extends KerMLTraversalUtil {
4949

50+
public static final String BASE_PATH_OPTION_LONG_NAME = "base-path-url";
51+
public static final String LIBRARY_OPTION_LONG_NAME = "library-base-path";
52+
public static final String BRANCH_OPTION = "Project branch to use. If none given the default branch of the project is used";
53+
public static final String PROJECT_NAME_OPTION_DESCRIPTION = "project name to upload the model into. If not specified a unique name is generated based on the selected folders and the current timestamp";
54+
public static final String DERIVED_OPTION_DESCRIPTION = "specifies that derived attributes should be included (the default is not to)";
55+
public static final String IMPLICIT_GEN_OPTION_DESCRIPTION = "specifies that implicit generalizations should be generated (the default is not to)";
56+
public static final String VERBOSE_MODE_OPTION_DESCRIPTION = "verbose mode";
57+
public static final String BASE_PATH_OPTION_DESCRIPTION = "gives the URL for the base path to be used for the API endpoint (if none is given, the default is used)";
58+
public static final String LIBRARY_OPTION_DESCRIPTION = "gives the base path to used for reading model library resources";
59+
5060
private String basePath = ApiElementProcessingFacade.DEFAULT_BASE_PATH;
5161
private String libraryPath = null;
5262
private boolean isAddDerivedElements = false;
@@ -123,13 +133,13 @@ public boolean isCommitted() {
123133
* prepended to arguments for library model files.
124134
*/
125135
protected String[] processArgs(String[] args) {
126-
var libraryPathOption = new Option("l", true, "gives the base path to used for reading model library resources");
127-
var basePathOption = new Option("b", true, "");
128-
var isVerboseOption = new Option("v", false, "");
129-
var addImplicitsOption = new Option("g", "");
130-
var addDerivedOption = new Option("d", "");
131-
var projectOption = new Option("p", true, "");
132-
var branchOption = new Option("br", true, "");
136+
var libraryPathOption = new Option("l", LIBRARY_OPTION_LONG_NAME, true, LIBRARY_OPTION_DESCRIPTION);
137+
var basePathOption = new Option("b", BASE_PATH_OPTION_LONG_NAME, true, BASE_PATH_OPTION_DESCRIPTION);
138+
var isVerboseOption = new Option("v", false, VERBOSE_MODE_OPTION_DESCRIPTION);
139+
var addImplicitsOption = new Option("g", IMPLICIT_GEN_OPTION_DESCRIPTION);
140+
var addDerivedOption = new Option("d", DERIVED_OPTION_DESCRIPTION);
141+
var projectOption = new Option("p", true, PROJECT_NAME_OPTION_DESCRIPTION);
142+
var branchOption = new Option(null, "branch", true, BRANCH_OPTION);
133143

134144
libraryPathOption.setRequired(true);
135145
basePathOption.setRequired(true);
@@ -148,7 +158,7 @@ protected String[] processArgs(String[] args) {
148158
.addOption(projectOption)
149159
.addOption(branchOption);
150160

151-
CommandLineParser parser = new DefaultParser();
161+
CommandLineParser parser = new DefaultParser(false);
152162

153163
try {
154164
CommandLine cli = parser.parse(options, args);

0 commit comments

Comments
 (0)