blob: f31ee37e8aed55c1b4f7a7ed0121e54f701f50f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
package com.intellij.structuralsearch.impl.matcher.strategies;
import com.intellij.psi.*;
/**
* CommonStrategy to match symbols
*/
public class SymbolMatchingStrategy extends ExprMatchingStrategy {
@Override public void visitReferenceList(final PsiReferenceList list) {
result = true;
}
@Override public void visitAnnotation(final PsiAnnotation annotation) {
result = true;
}
@Override public void visitAnnotationParameterList(final PsiAnnotationParameterList list) {
result = true;
}
@Override public void visitModifierList(final PsiModifierList list) {
result = true;
}
@Override public void visitNameValuePair(final PsiNameValuePair pair) {
result = true;
}
@Override public void visitTypeParameterList(PsiTypeParameterList psiTypeParameterList) {
result = true;
}
@Override public void visitTypeElement(PsiTypeElement psiTypeElement) {
result = true;
}
@Override public void visitReferenceElement(PsiJavaCodeReferenceElement psiJavaCodeReferenceElement) {
result = true;
}
@Override public void visitReferenceParameterList(PsiReferenceParameterList psiReferenceParameterList) {
result = true;
}
private SymbolMatchingStrategy() {}
private static class SymbolMatchingStrategyHolder {
private static final SymbolMatchingStrategy instance = new SymbolMatchingStrategy();
}
public static MatchingStrategy getInstance() {
return SymbolMatchingStrategyHolder.instance;
}
}
|