diff --git a/org.omg.sysml.interactive/src/org/omg/sysml/interactive/SysMLInteractive.java b/org.omg.sysml.interactive/src/org/omg/sysml/interactive/SysMLInteractive.java index dc7095169a..4bd8fbd77a 100644 --- a/org.omg.sysml.interactive/src/org/omg/sysml/interactive/SysMLInteractive.java +++ b/org.omg.sysml.interactive/src/org/omg/sysml/interactive/SysMLInteractive.java @@ -282,7 +282,7 @@ public String help(String command) { public String repo(String apiBasePath, List help) { this.counter++; if (!help.isEmpty()) { - return SysMLInteractiveHelp.getApiBasePathHelp(); + return SysMLInteractiveHelp.getRepoPathHelp(); } if (!Strings.isNullOrEmpty(apiBasePath)) { diff --git a/org.omg.sysml.interactive/src/org/omg/sysml/interactive/SysMLInteractiveHelp.java b/org.omg.sysml.interactive/src/org/omg/sysml/interactive/SysMLInteractiveHelp.java index 54f7e77ca8..fde8f14ccc 100644 --- a/org.omg.sysml.interactive/src/org/omg/sysml/interactive/SysMLInteractiveHelp.java +++ b/org.omg.sysml.interactive/src/org/omg/sysml/interactive/SysMLInteractiveHelp.java @@ -21,8 +21,9 @@ * * Contributors: * Ed Seidewitz, MDS - * Ivan Gomes - * Hisashi Miyashita + * Zoltan Ujhelyi, MDS + * Ivan Gomes, Twingineer + * Hisashi Miyashita, Mgnite * *******************************************************************************/ @@ -30,37 +31,32 @@ import java.util.HashMap; import java.util.Map; +import java.util.TreeMap; import org.omg.sysml.plantuml.SysML2PlantUMLStyle; +import com.google.common.base.Preconditions; + public class SysMLInteractiveHelp { - private static final String GENERAL_HELP_STRING = + private static final String GENERAL_HELP_STRING_PREFIX = "The following SysML v2 magic commands are available.\n" + "For help on a specific command, use \"%help \" or \"% -h\".\n\n" - + "%eval\t\tEvaluate a given expression.\n" - + "%export\t\tSave a file of the JSON representation of the abstract syntax tree rooted in the named element.\n" - + "%help\t\tGet a list of available commands or help on a specific command\n" - + "%list\t\tList loaded library packages or the results of a given query\n" - + "%load\t\tLoad a model from the repository\n" - + "%repo\t Set the api base path for the repository\n" - + "%show\t\tPrint the abstract syntax tree rooted in a named element\n" - + "%projects\tList projects in the repository\n" - + "%publish\tPublish to the repository the modele elements rooted in a named element\n" - + "%view\t\tRender the view specified by the named view usage\n" - + "%viz\t\tVisualize the name model elements\n" ; + private static final String HELP_HELP_SHORT_STRING = "%help\t\tGet a list of available commands or help on a specific command"; private static final String HELP_HELP_STRING = "Usage: %help []\n\n" + "Print help information on the named SysML v2 magic .\n" + "If no is given, then list the available commands.\n"; + private static final String EVAL_HELP_SHORT_STRING = "%eval\t\tEvaluate a given expression."; private static final String EVAL_HELP_STRING = "Usage: %eval [--target=] \n\n" + "Print the results of evaluating on the target given by , which must be fully qualified.\n" + "If a target is not given, then evaluate in global scope.\n"; + private static final String LIST_HELP_SHORT_STRING = "%list\t\tList loaded library packages or the results of a given query"; private static final String LIST_HELP_STRING = "Usage: %list []\n\n" + "If is not given, then list all loaded library packages.\n" @@ -72,6 +68,8 @@ public class SysMLInteractiveHelp { + " ::**\t\tall members of the namespace and, recursively, members of owned namespaces.\n" + "The last two forms may be optionally followed by a filter expression in square brackets.\n"; + private static final String SHOW_HELP_SHORT_STRING = + "%show\t\tPrint the abstract syntax tree rooted in a named element"; private static final String SHOW_HELP_STRING = "Usage: %show [--style=