[jbosstools-issues] [JBoss JIRA] (JBIDE-9833) Quick fixes for problem markers in beans.xml

Jaroslav Jankovič (JIRA) jira-events at lists.jboss.org
Tue Jun 12 02:09:05 EDT 2012


     [ https://issues.jboss.org/browse/JBIDE-9833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jaroslav Jankovič closed JBIDE-9833.
------------------------------------



Verified with jbdevstudio-product-universal-5.0.0.v201205272317M-H143-CR1.
                
> 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
>              Labels: new_and_noteworthy
>             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!
> 7. Press Finish button
> ASSERT: 'org.jboss.beans.MyFirstInterceptor' class is created and opened in Java Editor, there is not problem marker on 'org.jboss.beans.MyFirstInterceptor' in beans.xml
> 8. Point mouse cursor to 'org.jboss.beans.MyFirstDecorator'
> ASSERT: Text hoover message appears:
> !hoover2.png!
> 9. Select "Create 'org.jboss.beans.MyFirstDecorator' CDI Decorator" quick fix
> ASSERT: New Decorator Wizard appears:
> !new_decorator.png!
> 10. Add interface and Press Finish button
> ASSERT: 'org.jboss.beans.MyFirstDecorator' class is created and opened in Java Editor, there is not problem marker on 'org.jboss.beans.MyFirstDecorator' in beans.xml
> 11. Point mouse cursor to 'org.jboss.beans.MyFirstBean'
> ASSERT: Text hoover message appears:
> !hoover3.png!
> 12. Select "Create 'org.jboss.beans.MyFirstBean' CDI Bean Class" quick fix
> ASSERT: New CDI Bean Wizard appears:
> !new_bean.png!
> 13. Press Finish button
> ASSERT: 'org.jboss.beans.MyFirstBean' class is created and opened in Java Editor, there is not problem marker on 'org.jboss.beans.MyFirstBean' in beans.xml
> 14. Point mouse cursor to 'org.jboss.beans.MyFirstStereotype'
> ASSERT: Text hoover message appears:
> !hoover4.png!
> 15. Select "Create 'org.jboss.beans.MyFirstStereotype' CDI Stereotype" quick fix
> ASSERT: New Stereotype Wizard appears:
> !new_stereotype.png!
> 16. Press Finish button
> ASSERT: 'org.jboss.beans.MyFirstStereotype' class is created and opened in Java Editor, there is not problem marker on 'org.jboss.beans.MyFirstStereotype' in beans.xml
> 17. Open org.jboss.beans.MyFirstBean class in Java Editor
> 18. Delete @Alternative annotation and save the file
> ASSERT: problem marker appears on 'org.jboss.beans.MyFirstBean' in beans.xml
> 19. Point mouse cursor to 'org.jboss.beans.MyFirstBean'
> ASSERT: Text hoover message appears:
> !hoover5.png!
> 20. Select "Add @Alternative annotation to 'MyFirstBean' class" quick fix
> ASSERT: there is no problem marker on 'org.jboss.beans.MyFirstBean' in beans.xml
> 21. Open org.jboss.beans.MyFirstStereotype class in Java Editor
> 18. Delete @Alternative annotation and save the file
> ASSERT: problem marker appears on 'org.jboss.beans.MyFirstStereotype' in beans.xml
> 19. Point mouse cursor to 'org.jboss.beans.MyFirstStereotype'
> ASSERT: Text hoover message appears:
> !hoover6.png!
> 20. Select "Add @Alternative annotation to 'MyFirstStereotype' class" quick fix
> ASSERT: there is no problem marker on 'org.jboss.beans.MyFirstStereotype' in beans.xml

--
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

       



More information about the jbosstools-issues mailing list