[forge-issues] [JBoss JIRA] (FORGE-687) PromptType.JAVA_PACKAGE should support default package
Vineet Reynolds (JIRA)
jira-events at lists.jboss.org
Mon Jul 15 18:19:26 EDT 2013
[ https://issues.jboss.org/browse/FORGE-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789799#comment-12789799 ]
Vineet Reynolds edited comment on FORGE-687 at 7/15/13 6:18 PM:
----------------------------------------------------------------
This also affects the newly introduced Forge wizards in JBDS 7 (as of Jul 16). When an invalid package name is provided via the New Project wizard, the wizard hangs since it is waiting for the user input to provide a valid package name is Forge. Of course, this is not possible, and hence it should be necessary to invoke the {{prompt.promptCommon}} API with a default package name.
was (Author: vineet.reynolds):
This also affects the newly introduced Forge wizards in JBDS 7 (as of . When an invalid package name is provided via the New Project wizard, the wizard hangs since it is waiting for the user input to provide a valid package name is Forge. Of course, this is not possible, and hence it should be necessary to invoke the {{prompt.promptCommon}} API with a default package name.
> PromptType.JAVA_PACKAGE should support default package
> ------------------------------------------------------
>
> Key: FORGE-687
> URL: https://issues.jboss.org/browse/FORGE-687
> Project: Forge
> Issue Type: Bug
> Components: UI - Shell
> Affects Versions: 1.0.5.Final
> Reporter: Andre Dietisheim
> Fix For: 1.x Future
>
>
> If you want to prompt the user to provide some valid java package you'd specify PromptType.JAVA_PACKAGE. Unfortunately this prompt type considers the empty string as invalid package even though I'd argue that this is the default package.
> If I ask the user for the package, scaffolded resources would get created to, I'd do:
> {code}
> prompt.promptCommon(target package: ", PromptType.JAVA_PACKAGE, project.getFacet(JavaSourceFacet.class).getBasePackageResource().toString())
> {code}
> If I have no valid packageResource (ex. forge would return an invalid base package) I'd want to suggest the user to put his sources into the default package (for a maven project: src/main/java). I'd then feed a "" as default to the prompt:
> {code}
> prompt.promptCommon(target package: ", PromptType.JAVA_PACKAGE, "")
> {code}
> Unfortunately the PromptType.JAVA_PACKAGE would not validate the empty string. It would tell me that this is not a valid package.
--
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
More information about the forge-issues
mailing list