[
https://issues.jboss.org/browse/FORGE-1155?page=com.atlassian.jira.plugin...
]
George Gastaldi commented on FORGE-1155:
----------------------------------------
{quote}
<gastaldi> right, but I need to set the values to the UIInput objects before that
<gastaldi> should I do that in the Completer implementation for each option ?
<stalep> aesh does that for you
<stalep> atleast all values that are "finished"
<stalep> so if you have: "foo --bar one --" then the bar field will be
populated
<stalep> eh, in that example aesh itself will try to populate the option name
<stalep> but if it was trying to complete a value it would call the specific
option's complete class
<stalep> with the bar value populated
<gastaldi> how would it set the values in the UIInput objects inside my UICommand?
<gastaldi>
org.jboss.forge.addon.shell.aesh.CommandLineUtil.populateUIInputs(CommandLine,
Map<String, InputComponent<?, Object>>) does that
<stalep> there is a Converter interface that will be called
<vineetreynolds> bbl
<stalep> public interface CLConverter<T> {
<stalep> T convert(String input);
<stalep> }
<gastaldi> how does that work with multiple values ?
<stalep> if its a list object its called for each value
<stalep> the aesh adds it to the list
<stalep> or set
<stalep> etc
{quote}
Migrate the shell implementation to the newest Aesh API (0.41+)
---------------------------------------------------------------
Key: FORGE-1155
URL:
https://issues.jboss.org/browse/FORGE-1155
Project: Forge
Issue Type: Feature Request
Components: UI - Shell
Reporter: George Gastaldi
Assignee: George Gastaldi
Fix For: 2.0.0.Alpha12
The shell addon should be implemented on top of the newest Aesh API. Check AeshExample
for a sample of how it should be handled.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira