]
Daniel Azarov updated JBIDE-9833:
---------------------------------
Attachment: hoover1.png
hoover2.png
hoover3.png
hoover4.png
hoover5.png
hoover6.png
new_interceptor.png
new_decorator.png
new_bean.png
new_stereotype.png
Quick fixes for problem markers in beans.xml
--------------------------------------------
Key: JBIDE-9833
URL:
https://issues.jboss.org/browse/JBIDE-9833
Project: Tools (JBoss Tools)
Issue Type: Sub-task
Components: CDI
Reporter: Daniel Azarov
Assignee: Daniel Azarov
Fix For: 3.3.0.M4
Attachments: hoover1.png, hoover2.png, hoover3.png, hoover4.png, hoover5.png,
hoover6.png, new_bean.png, new_decorator.png, new_interceptor.png, new_stereotype.png
1. Quick fix for "There is no class/annotation with the specified name [JSR-299
§5.1.1]" problem marker
In case when Bean class or Stereotype does not exists there should be a quick fix:
"Create Bean Class/Stereotype". This quick fix should run Creation wizard for
Bean Class or Stereotype with selected "Add @Alternative" option
2. Quick fix for "<class> element must specify the name of an alternative bean
class [JSR-299 §5.1.1]" and "<stereotype> element must specify the name of
an @Alternative stereotype annotation [JSR-299 §5.1.1]" problem markers
In case of existing of Bean Class or Stereotype and when Bean Class or Stereotype has no
@Alternative annotation there should be a quick fix:
"Add @Alternative annotation to Bean Class/Stereotype"
3. Quick fix for "There is no class with the specified name [JSR-299 §9.4]/[JSR-299
§8.2]" problem markers
In case when Decorator or Interceptor does not exists there should be a quick fix:
"Create Interceptor/Decorator". This quick fix should run Creation wizard for
Interceptor or Decorator
Test case:
1. Create CDI Project
2. Create beans.xml file and open it in JBoss Tools XML Editor
{code}
<?xml version="1.0"?>
<beans
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:weld="http://jboss.org/schema/weld/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://jboss.org/schema/cdi/beans_1_0.xsd http://jboss.org/schema/weld/beans
http://jboss.org/schema/weld/beans_1_1.xsd">
<interceptors>
<class>org.jboss.beans.MyFirstInterceptor</class>
</interceptors>
<weld:scan/>
<decorators>
<class>org.jboss.beans.MyFirstDecorator</class>
</decorators>
<alternatives>
<class>org.jboss.beans.MyFirstBean</class>
<stereotype>org.jboss.beans.MyFirstStereotype</stereotype>
</alternatives>
</beans>
{code}
3. Save file
ASSERT: Problem markers appear
4. Point mouse cursor to 'org.jboss.beans.MyFirstInterceptor'
ASSERT: Text hoover message appears:
!hoover1.png!
5. Select "Create 'org.jboss.beans.MyFirstInterceptor' CDI Interceptor"
quick fix
ASSERT: New Interceptor Wizard appears:
!new_interceptor.png!
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: