[
https://issues.jboss.org/browse/FORGE-682?page=com.atlassian.jira.plugin....
]
Andre Dietisheim commented on FORGE-682:
----------------------------------------
I was actually trying to prompt a user to provide a package to create my examples to
(I'm creating a forge plugin that would create infinispan examples). I wanted to
re-prompt the user if the path that corresponds to the package supplied is already
occupied by file. It would have been great if I could have put the whole validation into a
(custom) PromptType. In my current implementation I'm using a PromptType.JAVA_PACKAGE
and further checks in my facet. Could be that I miss something?
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
Affects Versions: 1.0.5.Final
Reporter: Andre Dietisheim
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