Details
-
Feature Request
-
Resolution: Done
-
Major
-
None
-
Validation that occurs as-you-type has been added for context dependency injection.
-
Documented as Feature Request
Description
It would be great to have as-you-type CDI (JSR-299) validation for Java and beans.xml files.
1. Create a cdi project.
2. Create the following bean:
package test; import javax.enterprise.inject.Produces; import javax.inject.Inject; import javax.inject.Named; public class Test { @Inject @Named Test2 create; @Produces @Named public Test2 create() { return new Test2(); } @Produces @Named("create") public Test2 create2() { return new Test2(); } public static class Test2 { } }
3. There three waring messages. One on the injection sying there is an ambiguous injection point. And two on the producers sying there a two beans with the same EL names.
4. Comment line #18: // @Named("create"). Don't save the file!
5. All the warings are gone.
6. Save the file.
7. Open the beans.xml
8. Add the following code there:
<alternatives> <class>test.Test</class> </alternatives>
9. Don't save the file.
10. There is an error on test.Test since the class bean is not an alternative.
Attachments
Issue Links
- blocks
-
JBIDE-12404 CDI hyper links should work on modified files correctly
- Closed
- clones
-
JBIDE-10738 As-you-type EL validation
- Closed