mirror of
https://github.com/corda/corda.git
synced 2024-12-19 04:57:58 +00:00
CORDA-1075 - Add "bye" and "help" to crash shell menu(#2600)
* shell: list commands alphabetically * increased crash shell version * crash shell with help and bye
This commit is contained in:
parent
3ac2de0ede
commit
a3abc1d2a5
@ -61,7 +61,7 @@ buildscript {
|
|||||||
ext.dependency_checker_version = '3.1.0'
|
ext.dependency_checker_version = '3.1.0'
|
||||||
ext.commons_collections_version = '4.1'
|
ext.commons_collections_version = '4.1'
|
||||||
ext.beanutils_version = '1.9.3'
|
ext.beanutils_version = '1.9.3'
|
||||||
ext.crash_version = 'cce5a00f114343c1145c1d7756e1dd6df3ea984e'
|
ext.crash_version = 'cadb53544fbb3c0fb901445da614998a6a419488'
|
||||||
ext.jsr305_version = constants.getProperty("jsr305Version")
|
ext.jsr305_version = constants.getProperty("jsr305Version")
|
||||||
ext.shiro_version = '1.4.0'
|
ext.shiro_version = '1.4.0'
|
||||||
ext.artifactory_plugin_version = constants.getProperty('artifactoryPluginVersion')
|
ext.artifactory_plugin_version = constants.getProperty('artifactoryPluginVersion')
|
||||||
|
@ -36,8 +36,10 @@ public class RunShellCommand extends InteractiveShellCommand {
|
|||||||
private void emitHelp(InvocationContext<Map> context, StringToMethodCallParser<CordaRPCOps> parser) {
|
private void emitHelp(InvocationContext<Map> context, StringToMethodCallParser<CordaRPCOps> parser) {
|
||||||
// Sends data down the pipeline about what commands are available. CRaSH will render it nicely.
|
// Sends data down the pipeline about what commands are available. CRaSH will render it nicely.
|
||||||
// Each element we emit is a map of column -> content.
|
// Each element we emit is a map of column -> content.
|
||||||
Map<String, String> cmdsAndArgs = parser.getAvailableCommands();
|
Set<Map.Entry<String, String>> entries = parser.getAvailableCommands().entrySet();
|
||||||
for (Map.Entry<String, String> entry : cmdsAndArgs.entrySet()) {
|
ArrayList<Map.Entry<String, String>> entryList = new ArrayList<>(entries);
|
||||||
|
entryList.sort(Comparator.comparing(Map.Entry::getKey));
|
||||||
|
for (Map.Entry<String, String> entry : entryList) {
|
||||||
// Skip these entries as they aren't really interesting for the user.
|
// Skip these entries as they aren't really interesting for the user.
|
||||||
if (entry.getKey().equals("startFlowDynamic")) continue;
|
if (entry.getKey().equals("startFlowDynamic")) continue;
|
||||||
if (entry.getKey().equals("getProtocolVersion")) continue;
|
if (entry.getKey().equals("getProtocolVersion")) continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user