[
https://issues.jboss.org/browse/JBIDE-10611?page=com.atlassian.jira.plugi...
]
Alexey Kazakov resolved JBIDE-10611.
------------------------------------
Resolution: Done
Jaroslav, as-you-type cdi validation is a huge complex feature. We implemented it for
Alpha1 but of course there were some bugs left. We fixed some of them in Alpha1 and some
in Alpha2. But main features are implemented in Alpha1 and the test case (see the
description) works in Alpha1. If you see any problem, then please create a new issue.
As-you-type CDI validation
--------------------------
Key: JBIDE-10611
URL:
https://issues.jboss.org/browse/JBIDE-10611
Project: Tools (JBoss Tools)
Issue Type: Feature Request
Components: CDI
Reporter: Alexey Kazakov
Assignee: Alexey Kazakov
Labels: new_and_noteworthy
Fix For: 4.0.0.Alpha1
Attachments: JBIDE-10611.ogv, out-3.avi
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:
{code}
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 {
}
}
{code}
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:
{code}
<alternatives>
<class>test.Test</class>
</alternatives>
{code}
9. Don't save the file.
10. There is an error on test.Test since the class bean is not an alternative.
https://vimeo.com/47965113
--
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