[JBoss JIRA] (FORGE-245) Support structured options in @Commands
by Lincoln Baxter III (JIRA)
[ https://issues.jboss.org/browse/FORGE-245?page=com.atlassian.jira.plugin.... ]
Lincoln Baxter III closed FORGE-245.
------------------------------------
Assignee: Lincoln Baxter III
Resolution: Done
Implemented with UI API in Forge 2
> Support structured options in @Commands
> ---------------------------------------
>
> Key: FORGE-245
> URL: https://issues.jboss.org/browse/FORGE-245
> Project: Forge
> Issue Type: Feature Request
> Components: Plugin API
> Reporter: Max Rydahl Andersen
> Assignee: Lincoln Baxter III
> Fix For: 2.0.0.Alpha2
>
>
> ver considered allowing something like
> generateEntities(@Option String table, @Option String catalog, @Option @Option String schema, @NestedOption final JPADataSource datasource)
> class DataSource {
> public DataSource(@Option(...) String name, @Option(..) password, @Option(..) ..)
> ...
> )
> Which would actually provide some more nested structure and be useful in ui construction in IDE plus better naming of things even in shell ?
> Would also be good to be able to reference "default" @JPADatasource should be "production", "dev" or "test" if SEAMFORGE-210 comes to life?
--
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
11 years, 8 months
[JBoss JIRA] (FORGE-136) SPI to add @Option Converters for custom types
by Lincoln Baxter III (JIRA)
[ https://issues.jboss.org/browse/FORGE-136?page=com.atlassian.jira.plugin.... ]
Lincoln Baxter III closed FORGE-136.
------------------------------------
Assignee: Lincoln Baxter III
Resolution: Done
Implemented with Convert Addon in Forge 2
> SPI to add @Option Converters for custom types
> ----------------------------------------------
>
> Key: FORGE-136
> URL: https://issues.jboss.org/browse/FORGE-136
> Project: Forge
> Issue Type: Enhancement
> Components: Plugin API, UI - Shell
> Affects Versions: 1.0.0.Alpha2
> Reporter: Lincoln Baxter III
> Assignee: Lincoln Baxter III
> Fix For: 2.0.0.Alpha2
>
>
> This process should be encapsulated with a Forge interface API, adapter, and ServiceLoader for extension.
> {code}
> void init(@Observes final Startup event, final PluginCommandCompleter pluginCompleter) throws Exception
> {
> BooleanConverter booleanConverter = new BooleanConverter();
> addConversionHandler(boolean.class, booleanConverter);
> addConversionHandler(Boolean.class, booleanConverter);
> addConversionHandler(File.class, new FileConverter());
> addConversionHandler(Dependency.class, new DependencyIdConverter());
> addConversionHandler(URL.class, new URLConverter());
> ...
> }
> public interface OptionValueConverter<T> {
> public boolean supports(Class<?> type);
> public T convert(Object value);
> }
> {code}
> This interface should support injection.
--
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
11 years, 8 months
[JBoss JIRA] (FORGE-682) ShellPrompt has fixed set of PromptTypes, should be extensible
by Lincoln Baxter III (JIRA)
[ https://issues.jboss.org/browse/FORGE-682?page=com.atlassian.jira.plugin.... ]
Lincoln Baxter III closed FORGE-682.
------------------------------------
Resolution: Done
Assignee.
> ShellPrompt has fixed set of PromptTypes, should be extensible
> --------------------------------------------------------------
>
> Key: FORGE-682
> URL: https://issues.jboss.org/browse/FORGE-682
> Project: Forge
> Issue Type: Enhancement
> Components: UI - Shell
> Affects Versions: 1.0.5.Final
> Reporter: Andre Dietisheim
> Assignee: Lincoln Baxter III
> Fix For: 2.0.0.Alpha2
>
>
> If a plugin wants to prompt the user to supply some settings it'll use:
> {code:title=ShellPrompt}
> String promptCommon(String message, PromptType type);
> {code}
> PromptType is what the prompt would use to validate the user input against. Unfortunately PromptType is an enum so there's no way for a plugin to provide it's own prompt type.
--
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
11 years, 8 months
[JBoss JIRA] (FORGE-682) ShellPrompt has fixed set of PromptTypes, should be extensible
by Lincoln Baxter III (JIRA)
[ https://issues.jboss.org/browse/FORGE-682?page=com.atlassian.jira.plugin.... ]
Lincoln Baxter III closed FORGE-682.
------------------------------------
Resolution: Done
Hey Andre.
You are correct that there is no really great way to do this kind of validation in Forge 1. Our current recommendation is to validate this once the plugin has run, then do a ShellPrompt.prompt() to ask the user for corrected input.
This is fixed in Forge 2 since we added a validation step for command execution.
~Lincoln
> ShellPrompt has fixed set of PromptTypes, should be extensible
> --------------------------------------------------------------
>
> Key: FORGE-682
> URL: https://issues.jboss.org/browse/FORGE-682
> Project: Forge
> Issue Type: Enhancement
> Components: UI - Shell
> Affects Versions: 1.0.5.Final
> Reporter: Andre Dietisheim
> Fix For: 2.0.0.Alpha2
>
>
> If a plugin wants to prompt the user to supply some settings it'll use:
> {code:title=ShellPrompt}
> String promptCommon(String message, PromptType type);
> {code}
> PromptType is what the prompt would use to validate the user input against. Unfortunately PromptType is an enum so there's no way for a plugin to provide it's own prompt type.
--
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
11 years, 8 months
[JBoss JIRA] (FORGE-682) ShellPrompt has fixed set of PromptTypes, should be extensible
by Lincoln Baxter III (JIRA)
[ https://issues.jboss.org/browse/FORGE-682?page=com.atlassian.jira.plugin.... ]
Lincoln Baxter III reopened FORGE-682:
--------------------------------------
Assignee: Lincoln Baxter III
> ShellPrompt has fixed set of PromptTypes, should be extensible
> --------------------------------------------------------------
>
> Key: FORGE-682
> URL: https://issues.jboss.org/browse/FORGE-682
> Project: Forge
> Issue Type: Enhancement
> Components: UI - Shell
> Affects Versions: 1.0.5.Final
> Reporter: Andre Dietisheim
> Assignee: Lincoln Baxter III
> Fix For: 2.0.0.Alpha2
>
>
> If a plugin wants to prompt the user to supply some settings it'll use:
> {code:title=ShellPrompt}
> String promptCommon(String message, PromptType type);
> {code}
> PromptType is what the prompt would use to validate the user input against. Unfortunately PromptType is an enum so there's no way for a plugin to provide it's own prompt type.
--
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
11 years, 8 months