[jbosstools-issues] [JBoss JIRA] (JBIDE-7686) Quick fix for "Interceptor/Decorator is annotated @Specializes [JSR-299 §4.3.1]" error markers
Isaac Rooskov (JIRA)
jira-events at lists.jboss.org
Wed Apr 11 23:05:48 EDT 2012
[ https://issues.jboss.org/browse/JBIDE-7686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Isaac Rooskov closed JBIDE-7686.
--------------------------------
Resolution: Done
Re-closing as release note status has been set
> Quick fix for "Interceptor/Decorator is annotated @Specializes [JSR-299 §4.3.1]" error markers
> ----------------------------------------------------------------------------------------------
>
> Key: JBIDE-7686
> URL: https://issues.jboss.org/browse/JBIDE-7686
> 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.M3
>
> Attachments: SpecializesInDecorator.png, SpecializesInInterceptor.png
>
>
> This quick fix should offer to Delete @Specializes annotation
> Test case:
> EXECUTE: Create CDI project
> EXECUTE: Create TestBean class
> {code}
> package org.test;
> import javax.enterprise.inject.Specializes;
> import javax.interceptor.Interceptor;
> @Interceptor
> @AnyBinding
> @Specializes
> public class TestBean extends AnyBean{
> public String produce(){
> return "a";
> }
> }
> {code}
> EXECUTE: Create AAnnotation interface
> {code}
> package org.test;
> public @interface AAnnotation {
> }
> {code}
> EXECUTE: Create AnyBean class
> {code}
> package org.test;
> public class AnyBean {
> }
> {code}
> EXECUTE: Create AnyBinding interface
> {code}
> package org.test;
> import java.lang.annotation.ElementType;
> import java.lang.annotation.Inherited;
> import java.lang.annotation.Retention;
> import java.lang.annotation.RetentionPolicy;
> import java.lang.annotation.Target;
> import javax.interceptor.InterceptorBinding;
> @Inherited
> @InterceptorBinding
> @Target(ElementType.TYPE)
> @Retention(RetentionPolicy.RUNTIME)
> public @interface AnyBinding {
> }
> {code}
> ASSERT: @Specializes annotation should be marked by problem marker
> EXECUTE: Point mouse to @Specializes annotation
> ASSERT: Text hover with quick fixe appears
> EXECUTE: Create TestBean2 class
> {code}
> package org.test;
> import javax.decorator.Decorator;
> import javax.decorator.Delegate;
> import javax.enterprise.inject.Specializes;
> import javax.inject.Inject;
> @Decorator
> @Specializes
> public class TestBean2 extends AnyBean{
> @Inject @Delegate @AAnnotation String str;
> public String produce(){
> return str;
> }
> }
> {code}
> ASSERT: @Specializes annotation should be marked by problem marker
> EXECUTE: Point mouse to @Specializes annotation
> ASSERT: Text hover with quick fixe appears
--
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