Skip to content

Commit f6f7329

Browse files
committed
Merge branch 'ST6RI-178' into ST6RI-836
2 parents fddd5ef + bf1bfea commit f6f7329

1 file changed

Lines changed: 31 additions & 33 deletions

File tree

org.omg.sysml.interactive/src/org/omg/sysml/interactive/SysMLInteractiveHelp.java

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright (c) 2021, 2025 Model Driven Solutions, Inc.
44
* Copyright (c) 2021 Twingineer LLC
55
* Copyright (c) 2022 Mgnite Inc.
6-
*
6+
*
77
* This program is free software: you can redistribute it and/or modify
88
* it under the terms of the GNU Lesser General Public License as published by
99
* the Free Software Foundation, either version 3 of the License, or
@@ -13,17 +13,17 @@
1313
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1515
* GNU Lesser General Public License for more details.
16-
*
16+
*
1717
* You should have received a copy of theGNU Lesser General Public License
1818
* along with this program. If not, see <https://www.gnu.org/licenses/>.
19-
*
19+
*
2020
* @license LGPL-3.0-or-later <http://spdx.org/licenses/LGPL-3.0-or-later>
21-
*
21+
*
2222
* Contributors:
2323
* Ed Seidewitz, MDS
2424
* Ivan Gomes
2525
* Hisashi Miyashita
26-
*
26+
*
2727
*******************************************************************************/
2828

2929
package org.omg.sysml.interactive;
@@ -34,7 +34,7 @@
3434
import org.omg.sysml.plantuml.SysML2PlantUMLStyle;
3535

3636
public class SysMLInteractiveHelp {
37-
37+
3838
private static final String GENERAL_HELP_STRING =
3939
"The following SysML v2 magic commands are available.\n"
4040
+ "For help on a specific command, use \"%help <COMMAND>\" or \"%<cmd> -h\".\n\n"
@@ -50,12 +50,12 @@ public class SysMLInteractiveHelp {
5050
+ "%view\t\tRender the view specified by the named view usage\n"
5151
+ "%viz\t\tVisualize the name model elements\n"
5252
;
53-
53+
5454
private static final String HELP_HELP_STRING =
5555
"Usage: %help [<COMMAND>]\n\n"
5656
+ "Print help information on the named SysML v2 magic <COMMAND>.\n"
5757
+ "If no <COMMAND> is given, then list the available commands.\n";
58-
58+
5959
private static final String EVAL_HELP_STRING =
6060
"Usage: %eval [--target=<NAME>] <EXPR>\n\n"
6161
+ "Print the results of evaluating <EXPR> on the target given by <NAME>, which must be fully qualified.\n"
@@ -69,7 +69,7 @@ public class SysMLInteractiveHelp {
6969
+ "that is, one of the following:\n"
7070
+ " <NAME>\t\telement given by the fully qualified <NAME>\n"
7171
+ " <NAME>::*\t\tall members of the namespace <NAME>\n"
72-
+ " <NAME>::**\t\tall members of the namespace <NAME> and, recursively, members of owned namespaces.\n"
72+
+ " <NAME>::**\t\tall members of the namespace <NAME> and, recursively, members of owned namespaces.\n"
7373
+ "The last two forms may be optionally followed by a filter expression in square brackets.\n";
7474

7575
private static final String SHOW_HELP_STRING =
@@ -120,13 +120,13 @@ public class SysMLInteractiveHelp {
120120
+ " MIXED\t\tShow multiple views\n\n"
121121
+ "<STYLE> is also case insensitive. Multiple --style options are allowed. The possible style names are:\n"
122122
+ SysML2PlantUMLStyle.getStyleHelp();
123-
123+
124124

125125
private static final String EXPORT_HELP_STRING =
126126
"Usage: %export <NAME>\n\n"
127127
+ "Save a file containing the complete JSON representation of the abstract syntax tree rooted in <NAME>.\n"
128128
+ "<NAME> must be fully qualified.\n";
129-
129+
130130
private static final String LOAD_HELP_STRING =
131131
"Usage: %load [--id=<PROJECT ID] [--name=<NAME>] [--branch=<BRANCH_NAME>] [<NAME>]\n\n"
132132
+ "Download previously published models from a project in the repository. <NAME> is the full name of the project.\n"
@@ -135,7 +135,7 @@ public class SysMLInteractiveHelp {
135135
+ "If <PROJECT ID> is given, then the project with that UUID is loaded. In this case, the <NAME> must not be given.\n"
136136
+ "If <BRANCH NAME> is given, then the model is loaded from this branch of the project.\n"
137137
+ "If <BRANCH NAME> is not given, the default branch is used.\n";
138-
138+
139139
private static final String PROJECTS_HELP_STRING =
140140
"Usage: %projects\n\n"
141141
+ "Print the name and identifier of all projects in the repository.\n";
@@ -151,15 +151,15 @@ public class SysMLInteractiveHelp {
151151
public static String getGeneralHelp() {
152152
return GENERAL_HELP_STRING;
153153
}
154-
154+
155155
public static String getHelpHelp() {
156156
return HELP_HELP_STRING;
157157
}
158-
158+
159159
public static String getEvalHelp() {
160160
return EVAL_HELP_STRING;
161161
}
162-
162+
163163
public static String getListHelp() {
164164
return LIST_HELP_STRING;
165165
}
@@ -175,46 +175,44 @@ public static String getPublishHelp() {
175175
public static String getVizHelp() {
176176
return VIZ_HELP_STRING;
177177
}
178-
178+
179179
public static String getViewHelp() {
180180
return VIEW_HELP_STRING;
181181
}
182-
182+
183183
public static String getExportHelp() {
184184
return EXPORT_HELP_STRING;
185185
}
186-
186+
187187
public static String getProjectsHelp() {
188188
return PROJECTS_HELP_STRING;
189189
}
190-
190+
191191
public static String getLoadHelp() {
192192
return LOAD_HELP_STRING;
193193
}
194-
public static String getApiBasePathHelp() {
195-
return API_BASE_PATH_HELP_STRING;
196-
}
197-
194+
198195
private static Map<String, String> commandHelpMap = createCommandHelpMap();
199-
196+
200197
private static Map<String, String> createCommandHelpMap() {
201198
Map<String, String> map = new HashMap<>();
202-
map.put("%help", HELP_HELP_STRING);
203-
map.put("%eval", EVAL_HELP_STRING);
204-
map.put("%list", LIST_HELP_STRING);
205-
map.put("%show", SHOW_HELP_STRING);
206-
map.put("%publish", PUBLISH_HELP_STRING);
207-
map.put("%viz", VIZ_HELP_STRING);
208-
map.put("%view", VIEW_HELP_STRING);
199+
map.put("%help", HELP_HELP_STRING);
200+
map.put("%eval", EVAL_HELP_STRING);
201+
map.put("%list", LIST_HELP_STRING);
202+
map.put("%show", SHOW_HELP_STRING);
203+
map.put("%publish", PUBLISH_HELP_STRING);
204+
map.put("%viz", VIZ_HELP_STRING);
205+
map.put("%view", VIEW_HELP_STRING);
209206
map.put("%export", EXPORT_HELP_STRING);
210207
map.put("%load", LOAD_HELP_STRING);
211208
map.put("%projects", PROJECTS_HELP_STRING);
212209
map.put("%repo", API_BASE_PATH_HELP_STRING);
210+
213211
return map;
214212
}
215-
213+
216214
public static String getHelpString(String command) {
217215
return commandHelpMap.get(command);
218216
}
219-
217+
220218
}

0 commit comments

Comments
 (0)