[JBoss JIRA] (FORGE-1671) Add nested annotation to a constraint annotation
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-1671?page=com.atlassian.jira.plugin... ]
Antonio Goncalves updated FORGE-1671:
-------------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/forge/core/pull/446
> Add nested annotation to a constraint annotation
> ------------------------------------------------
>
> Key: FORGE-1671
> URL: https://issues.jboss.org/browse/FORGE-1671
> Project: Forge
> Issue Type: Sub-task
> Components: Java EE, Parsers / File Manipulation
> Affects Versions: 2.2.0.Final
> Reporter: Antonio Goncalves
> Assignee: Antonio Goncalves
> Fix For: 2.x Future
>
>
> At the moment a constraint annotation does not contain a {{List}} of constraints. So, at the moment, the command {{constraint-new-annotation}} generates the following code :
> {code}
> @Documented
> @Constraint(validatedBy = {})
> @Target( { METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
> @Retention(RUNTIME)
> @ReportAsSingleViolation
> public @interface URL {
> String message() default "Invalid value";
> Class<?>[] groups() default { };
> Class<? extends Payload>[] payload() default { };
> {code}
> It should add a nested annotation {{List}} of type array of constraint
> {code}
> @Documented
> @Constraint(validatedBy = {})
> @Target( { METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
> @Retention(RUNTIME)
> @ReportAsSingleViolation
> public @interface URL {
> String message() default "Invalid value";
> Class<?>[] groups() default { };
> Class<? extends Payload>[] payload() default { };
> @Target( { METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
> @Retention(RUNTIME)
> @Documented
> public @interface List {
> URL[] value();
> }
> }
> {code}
> See class : {{NewAnnotationCommand}}
--
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
10 years, 2 months
[JBoss JIRA] (FORGE-1436) Implement 'help' command as a source of general guidance and flow control
by Jess Sightler (JIRA)
[ https://issues.jboss.org/browse/FORGE-1436?page=com.atlassian.jira.plugin... ]
Jess Sightler commented on FORGE-1436:
--------------------------------------
The man pages are useful, but how do I know to us man pages if I don't have "help"? It was the first thing that I tried when using forge 2 for the first time, and I was surprised when it wasn't there.
> Implement 'help' command as a source of general guidance and flow control
> -------------------------------------------------------------------------
>
> Key: FORGE-1436
> URL: https://issues.jboss.org/browse/FORGE-1436
> Project: Forge
> Issue Type: Sub-task
> Components: UI - Shell
> Affects Versions: 2.0.0.Beta4
> Reporter: Antonio Goncalves
> Fix For: 2.x Future
>
>
> I find this one usefull and it could even add more content (such as mentioning the {{man}} command...
> {code}
> [no project] Forge $ help
> Welcome to JBoss Forge, a next-generation interactive Shell and project-generation tool. If you find yourself lost, or uncertain how to complete an operation, you may press the <TAB> key for command-completion, or <TAB><TAB> for hints while typing a command.
> Type 'list-commands' for a list of available commands in the current Resource context.
> You are not working on a project. Type 'help new-project' to get started.
> {code}
--
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
10 years, 2 months
[JBoss JIRA] (FORGE-1546) Generate inputTextarea instead of inputText
by Ivan St. Ivanov (JIRA)
[ https://issues.jboss.org/browse/FORGE-1546?page=com.atlassian.jira.plugin... ]
Ivan St. Ivanov reassigned FORGE-1546:
--------------------------------------
Assignee: Ivan St. Ivanov
> Generate inputTextarea instead of inputText
> -------------------------------------------
>
> Key: FORGE-1546
> URL: https://issues.jboss.org/browse/FORGE-1546
> Project: Forge
> Issue Type: Enhancement
> Components: Scaffold
> Affects Versions: 2.0.0.Final
> Reporter: Antonio Goncalves
> Assignee: Ivan St. Ivanov
> Labels: starter
> Fix For: 2.x Future
>
>
> In the JSF scaffolding, when an entity has a length greater than, let's say, 500, an inputTextarea should be generated instead of an inputText
> {code}
> jpa-new-field --named bio --length 800
> {code}
> Should generate :
> {code}
> <h:inputTextarea id="authorBeanAuthorBio" maxLength="800" value="#{authorBean.author.bio}"/>
> {code}
--
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
10 years, 2 months
[JBoss JIRA] (FORGE-1671) Add nested annotation to a constraint annotation
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-1671?page=com.atlassian.jira.plugin... ]
Antonio Goncalves reassigned FORGE-1671:
----------------------------------------
Assignee: Antonio Goncalves
> Add nested annotation to a constraint annotation
> ------------------------------------------------
>
> Key: FORGE-1671
> URL: https://issues.jboss.org/browse/FORGE-1671
> Project: Forge
> Issue Type: Sub-task
> Components: Java EE, Parsers / File Manipulation
> Affects Versions: 2.2.0.Final
> Reporter: Antonio Goncalves
> Assignee: Antonio Goncalves
> Fix For: 2.x Future
>
>
> At the moment a constraint annotation does not contain a {{List}} of constraints. So, at the moment, the command {{constraint-new-annotation}} generates the following code :
> {code}
> @Documented
> @Constraint(validatedBy = {})
> @Target( { METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
> @Retention(RUNTIME)
> @ReportAsSingleViolation
> public @interface URL {
> String message() default "Invalid value";
> Class<?>[] groups() default { };
> Class<? extends Payload>[] payload() default { };
> {code}
> It should add a nested annotation {{List}} of type array of constraint
> {code}
> @Documented
> @Constraint(validatedBy = {})
> @Target( { METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
> @Retention(RUNTIME)
> @ReportAsSingleViolation
> public @interface URL {
> String message() default "Invalid value";
> Class<?>[] groups() default { };
> Class<? extends Payload>[] payload() default { };
> @Target( { METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
> @Retention(RUNTIME)
> @Documented
> public @interface List {
> URL[] value();
> }
> }
> {code}
> See class : {{NewAnnotationCommand}}
--
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
10 years, 2 months
[JBoss JIRA] (ROASTER-4) Having Parameterize interface bit more typed
by Lincoln Baxter III (JIRA)
[ https://issues.jboss.org/browse/ROASTER-4?page=com.atlassian.jira.plugin.... ]
Lincoln Baxter III commented on ROASTER-4:
------------------------------------------
+1
I like this idea. It's good.
> Having Parameterize interface bit more typed
> --------------------------------------------
>
> Key: ROASTER-4
> URL: https://issues.jboss.org/browse/ROASTER-4
> Project: Roaster
> Issue Type: Feature Request
> Components: API
> Affects Versions: 2.1.0.Final
> Reporter: Antonio Goncalves
> Fix For: 2.x Future
>
>
> For a constraint, I need to implement a parametrize interface like this :
> {code}
> public class MaxValidatorForString implements ConstraintValidator<Max, Number> {
> {code}
> The only way I could find is by passing a String :
> {code}
> final JavaClassSource javaClass = Roaster.create(JavaClassSource.class);
> javaClass.setName("MaxValidatorForString");
> javaClass.addImport(ConstraintValidator.class);
> javaClass.addInterface("ConstraintValidator<Max, Number>");
> {code}
> It's a shame because with {{addInterface(Class)}}, it does the import automatically and things are more typed. But I cannot add types :
> {code}
> final JavaClassSource javaClass = Roaster.create(JavaClassSource.class);
> javaClass.setName("MaxValidatorForString");
> javaClass.addInterface(ConstraintValidator.class);
> {code}
> It would be good to have something like :
> {code}
> javaClass.addInterface(ConstraintValidator.class).addType(Max.class).addType(Number.class);
> {code}
--
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
10 years, 2 months