Search in sources :

Example 1 with JavaCompiledPattern

use of com.intellij.structuralsearch.impl.matcher.JavaCompiledPattern in project intellij-community by JetBrains.

the class JavaCompilingVisitor method visitClass.

@Override
public void visitClass(PsiClass psiClass) {
    super.visitClass(psiClass);
    CompiledPattern pattern = myCompilingVisitor.getContext().getPattern();
    final MatchingHandler handler = pattern.getHandler(psiClass);
    if (needsSupers(psiClass, handler)) {
        ((JavaCompiledPattern) pattern).setRequestsSuperInners(true);
    }
    handleReferenceText(psiClass.getName(), myCompilingVisitor.getContext());
    GlobalCompilingVisitor.setFilter(handler, ClassFilter.getInstance());
}
Also used : JavaCompiledPattern(com.intellij.structuralsearch.impl.matcher.JavaCompiledPattern) CompiledPattern(com.intellij.structuralsearch.impl.matcher.CompiledPattern) JavaCompiledPattern(com.intellij.structuralsearch.impl.matcher.JavaCompiledPattern)

Example 2 with JavaCompiledPattern

use of com.intellij.structuralsearch.impl.matcher.JavaCompiledPattern in project intellij-community by JetBrains.

the class JavaCompilingVisitor method visitField.

@Override
public void visitField(PsiField psiField) {
    super.visitField(psiField);
    CompiledPattern pattern = myCompilingVisitor.getContext().getPattern();
    final MatchingHandler handler = pattern.getHandler(psiField);
    if (needsSupers(psiField, handler)) {
        assert pattern instanceof JavaCompiledPattern;
        ((JavaCompiledPattern) pattern).setRequestsSuperFields(true);
    }
}
Also used : JavaCompiledPattern(com.intellij.structuralsearch.impl.matcher.JavaCompiledPattern) CompiledPattern(com.intellij.structuralsearch.impl.matcher.CompiledPattern) JavaCompiledPattern(com.intellij.structuralsearch.impl.matcher.JavaCompiledPattern)

Example 3 with JavaCompiledPattern

use of com.intellij.structuralsearch.impl.matcher.JavaCompiledPattern in project intellij-community by JetBrains.

the class JavaCompilingVisitor method visitMethod.

@Override
public void visitMethod(PsiMethod psiMethod) {
    super.visitMethod(psiMethod);
    CompiledPattern pattern = myCompilingVisitor.getContext().getPattern();
    final MatchingHandler handler = pattern.getHandler(psiMethod);
    if (needsSupers(psiMethod, handler)) {
        assert pattern instanceof JavaCompiledPattern;
        ((JavaCompiledPattern) pattern).setRequestsSuperMethods(true);
    }
    GlobalCompilingVisitor.setFilter(handler, MethodFilter.getInstance());
    handleReferenceText(psiMethod.getName(), myCompilingVisitor.getContext());
}
Also used : JavaCompiledPattern(com.intellij.structuralsearch.impl.matcher.JavaCompiledPattern) CompiledPattern(com.intellij.structuralsearch.impl.matcher.CompiledPattern) JavaCompiledPattern(com.intellij.structuralsearch.impl.matcher.JavaCompiledPattern)

Aggregations

CompiledPattern (com.intellij.structuralsearch.impl.matcher.CompiledPattern)3 JavaCompiledPattern (com.intellij.structuralsearch.impl.matcher.JavaCompiledPattern)3