[
https://issues.jboss.org/browse/JBIDE-10611?page=com.atlassian.jira.plugi...
]
Alexey Kazakov updated JBIDE-10611:
-----------------------------------
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:
{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
was:
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.
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: 3.4.0.M1
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:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira