void (@NotNull PsiElement element) { if ((!ourFilter.accepts(element) || StructuralSearchUtil.isIdentifier(element)) && context.getPattern().isRealTypedVar(element) && context.getPattern().getHandlerSimple(element) == null ) { final CompiledPattern pattern = context.getPattern(); String name = pattern.getTypedVarString(element); // name is the same for named element (clazz,methods, etc) and token (name of ... itself) // @todo need fix this final SubstitutionHandler handler = (SubstitutionHandler)pattern.getHandler(name); if (handler == null) return; pattern.setHandler(element, handler); if (context.getOptions().getVariableConstraint(handler.getName()).isPartOfSearchResults()) { handler.setTarget(true); final PsiElement targetNode = pattern.getTargetNode(); if (targetNode == null || targetNode == element.getParent()) { pattern.setTargetNode(element); } } } }