[
https://issues.jboss.org/browse/FORGE-2339?page=com.atlassian.jira.plugin...
]
George Gastaldi commented on FORGE-2339:
----------------------------------------
This is a bug in the Aesh version Forge currently uses. The bug lies in the
{{org.jboss.aesh.cl.parser.AeshCommandLineCompletionParser}} class.
Repeated values when auto-completing a UISelectMany component
-------------------------------------------------------------
Key: FORGE-2339
URL:
https://issues.jboss.org/browse/FORGE-2339
Project: Forge
Issue Type: Bug
Components: UI - Shell
Affects Versions: 2.16.1.Final
Reporter: George Gastaldi
Fix For: 2.x Future
Having a command defined as:
{code:java}
import java.util.Arrays;
import javax.inject.Inject;
import org.jboss.forge.addon.ui.command.AbstractUICommand;
import org.jboss.forge.addon.ui.context.UIBuilder;
import org.jboss.forge.addon.ui.context.UIContext;
import org.jboss.forge.addon.ui.context.UIExecutionContext;
import org.jboss.forge.addon.ui.input.UISelectMany;
import org.jboss.forge.addon.ui.metadata.UICommandMetadata;
import org.jboss.forge.addon.ui.result.Result;
import org.jboss.forge.addon.ui.result.Results;
import org.jboss.forge.addon.ui.util.Metadata;
public class Comando extends AbstractUICommand {
@Inject
private UISelectMany<String> source;
@Override
public UICommandMetadata getMetadata(UIContext context) {
return Metadata.forCommand(Comando.class).name("comando");
}
@Override
public void initializeUI(UIBuilder builder) throws Exception {
source.setValueChoices(Arrays.asList("Spring")).setDefaultValue(
Arrays.asList("Java"));
builder.add(source);
}
@Override
public Result execute(UIExecutionContext context) throws Exception {
return Results.success("Result: " + source.getValue());
}
}
{code}
When running in the shell, type:
{code}
comando --source Spring
{code}
Keep pressing {{<TAB>}} and you should see Spring repeated over and over
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)