@Nullable private InstructionImpl findInstruction(PsiElement element) { final Iterator<InstructionImpl> iterator = myProcessingStack.descendingIterator(); while (iterator.hasNext()) { final InstructionImpl instruction = iterator.next(); if (element.equals(instruction.getElement())) return instruction; } return null; }
@Nullable private ExceptionInfo findCatch(PsiType thrownType) { final Iterator<ExceptionInfo> iterator = myCaughtExceptionInfos.descendingIterator(); while (iterator.hasNext()) { final ExceptionInfo info = iterator.next(); final GrCatchClause clause = info.myClause; final GrParameter parameter = clause.getParameter(); if (parameter != null) { final PsiType type = parameter.getType(); if (type.isAssignableFrom(thrownType)) return info; } } return null; }