Skip to content
Permalink
Browse files

Fix for WFCORE-4402, Upgrade CLI to use aesh 2.3

  • Loading branch information
jfdenise committed Apr 5, 2019
1 parent 3889c29 commit 2a6ada95d47a3a80b95f78cc765496cc266b5f05
@@ -161,6 +161,16 @@ public void complete(AeshCompleteOperation completeOperation, ParsedLine line, I
public void doPopulate(ProcessedCommand processedCommand, InvocationProviders invocationProviders, AeshContext aeshContext, Mode mode) throws CommandLineParserException, OptionValidatorException {
parser.doPopulate(processedCommand, invocationProviders, aeshContext, mode);
}

@Override
public void updateAnsiMode(boolean mode) {
parser.updateAnsiMode(mode);
}

@Override
public String getFormattedCommand(int offset, int descriptionStart) {
return parser.getFormattedCommand(offset, descriptionStart);
}
}

public class CLICommandParser implements CommandLineParser<CLICommandInvocation> {
@@ -273,6 +283,16 @@ public void complete(AeshCompleteOperation completeOperation, ParsedLine line, I
public void doPopulate(ProcessedCommand processedCommand, InvocationProviders invocationProviders, AeshContext aeshContext, Mode mode) throws CommandLineParserException, OptionValidatorException {
container.getParser().doPopulate(processedCommand, invocationProviders, aeshContext, mode);
}

@Override
public void updateAnsiMode(boolean mode) {
container.getParser().updateAnsiMode(mode);
}

@Override
public String getFormattedCommand(int offset, int descriptionStart) {
return container.getParser().getFormattedCommand(offset, descriptionStart);
}
}

private final CommandContainer<CLICommandInvocation> container;
@@ -192,6 +192,16 @@ public void complete(AeshCompleteOperation completeOperation, ParsedLine line, I
@Override
public void doPopulate(ProcessedCommand processedCommand, InvocationProviders invocationProviders, AeshContext aeshContext, Mode mode) throws CommandLineParserException, OptionValidatorException {
}

@Override
public void updateAnsiMode(boolean mode) {

}

@Override
public String getFormattedCommand(int offset, int descriptionStart) {
return null;
}
}

private final Command<CLICommandInvocation> command = new LegacyCommand();
@@ -186,6 +186,16 @@ public void complete(AeshCompleteOperation completeOperation, ParsedLine line, I
@Override
public void doPopulate(ProcessedCommand processedCommand, InvocationProviders invocationProviders, AeshContext aeshContext, Mode mode) throws CommandLineParserException, OptionValidatorException {
}

@Override
public void updateAnsiMode(boolean mode) {

}

@Override
public String getFormattedCommand(int offset, int descriptionStart) {
return null;
}
}

private final Command<CLICommandInvocation> command = new OperationCommand();
@@ -148,9 +148,9 @@
<version.javax.json.javax-json-api>1.1.2</version.javax.json.javax-json-api>
<version.junit>4.12</version.junit>
<version.log4j>1.2.17</version.log4j>
<version.org.aesh>2.0</version.org.aesh>
<version.org.aesh>2.3</version.org.aesh>
<version.org.aesh-extensions>1.7</version.org.aesh-extensions>
<version.org.aesh-readline>1.15</version.org.aesh-readline>
<version.org.aesh-readline>1.17</version.org.aesh-readline>
<version.org.apache.ds>2.0.0-M15</version.org.apache.ds>
<!-- TODO Elytron - Bump to M17 -->
<version.org.apache.httpcomponents.httpclient>4.5.4</version.org.apache.httpcomponents.httpclient>

0 comments on commit 2a6ada9

Please sign in to comment.
You can’t perform that action at this time.