Project
IntelliJ IDEA
Priority
Normal
Type
Bug
Fix versions
No Fix versions
State
Fixed
Assignee
Alexey Kudravtsev
Subsystem
J2EE.Spring
Affected versions
No Affected versions
Fixed in build
108.65  
  • Created by   Taras Tielkes
    4 years ago (03 Oct 2007 21:10)
  • Updated by   root
    2 years ago (17 Jan 2010 20:53)
  • Jira: IDEADEV-22632
    (history, comments)
 
IDEA-41342 spring + aop: inconsistent "highlight usages"
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
import org.aspectj.lang.annotation.Before;

@org.aspectj.lang.annotation.Aspect
public class Dummy {
    @Before("@annotation(MyAnnotation) && args(n, ..)")
    public void before(int n) {
        System.out.println("n : " + n);
    }
}


There are 3 usages of "n". Highlighting (Ctrl-Shift-F7) behavior is inconsistent:
  • Inside args(), in injected context: Ctrl-Shift-F7 highlights 2 usages (see attached screenshot)
  • As Java method parameter: Ctrl-Shift-F7 highlights 3 usages
  • As variable reference in method body: Ctrl-Shift-F7 highlights 3 usages


Issue was resolved
Comments (1)
 
History
 
Linked Issues (?)
 
Taras Tielkes
  Taras Tielkes
11 Oct 2007 16:29
4 years ago
And a similar example from HQL injected in to Java:
Query q4 = session.createQuery("from User user order by user.lastName asc, user.firstName asc");


First Ctrl-Shift-F7 highlights all 3 "user" tokens
Second Ctrl-Shift-F7 removes highlighting from second and third "user" token, but not from the first.

In addition, IDEA-15507 (similar Ctrl-Shift-F7 problem with JavaScript injected in HTML) is probably a duplicate of this.