[jbosstools-issues] [JBoss JIRA] Updated: (JBIDE-7685) Quick fix for "Interceptor/Decorator cannot have a method with a parameter annotated @Observes [JSR-299 §10.4.2]" error markers
Daniel Azarov (JIRA)
jira-events at lists.jboss.org
Wed Jul 27 19:37:23 EDT 2011
[ https://issues.jboss.org/browse/JBIDE-7685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Azarov updated JBIDE-7685:
---------------------------------
Description:
This quick fix should offer to Delete @Observes annotation
Test case:
EXECUTE: Create CDI project
EXECUTE: Create ObserverInDecorator class
{code}
package org.test;
import javax.decorator.Decorator;
import javax.decorator.Delegate;
import javax.enterprise.event.Observes;
import javax.inject.Inject;
@Decorator
public class ObserverInDecorator {
@Inject @Delegate @AAnnotation String str;
public void method(@Observes String param){
}
}
{code}
ASSERT: @Observes annotation should be marked by problem marker
EXECUTE: Point mouse to @Observes annotation
ASSERT: Text hover with quick fixe appears
EXECUTE: Create ObserverInInterceptor class
{code}
package org.test;
import javax.enterprise.event.Observes;
import javax.interceptor.Interceptor;
@Interceptor
@FooBinding
public class ObserverInInterceptor {
public void method(@Observes String param){
}
}
{code}
ASSERT: @Observes annotation should be marked by problem marker
EXECUTE: Point mouse to @Observes annotation
ASSERT: Text hover with quick fixe appears
was:
This quick fix should offer next:
1. Delete @Observes annotation
2. Delete @Interceptor/@Decorator annotation
> Quick fix for "Interceptor/Decorator cannot have a method with a parameter annotated @Observes [JSR-299 §10.4.2]" error markers
> -------------------------------------------------------------------------------------------------------------------------------
>
> Key: JBIDE-7685
> URL: https://issues.jboss.org/browse/JBIDE-7685
> Project: Tools (JBoss Tools)
> Issue Type: Sub-task
> Components: cdi
> Reporter: Daniel Azarov
> Assignee: Daniel Azarov
> Labels: new_and_noteworthy
> Fix For: 3.3.x
>
>
> This quick fix should offer to Delete @Observes annotation
> Test case:
> EXECUTE: Create CDI project
> EXECUTE: Create ObserverInDecorator class
> {code}
> package org.test;
> import javax.decorator.Decorator;
> import javax.decorator.Delegate;
> import javax.enterprise.event.Observes;
> import javax.inject.Inject;
> @Decorator
> public class ObserverInDecorator {
> @Inject @Delegate @AAnnotation String str;
>
> public void method(@Observes String param){
>
> }
> }
> {code}
> ASSERT: @Observes annotation should be marked by problem marker
> EXECUTE: Point mouse to @Observes annotation
> ASSERT: Text hover with quick fixe appears
> EXECUTE: Create ObserverInInterceptor class
> {code}
> package org.test;
> import javax.enterprise.event.Observes;
> import javax.interceptor.Interceptor;
> @Interceptor
> @FooBinding
> public class ObserverInInterceptor {
>
> public void method(@Observes String param){
>
> }
> }
> {code}
> ASSERT: @Observes annotation should be marked by problem marker
> EXECUTE: Point mouse to @Observes annotation
> ASSERT: Text hover with quick fixe appears
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbosstools-issues
mailing list