use of com.intellij.psi.controlFlow.AnalysisCanceledException in project ballerina by ballerina-lang.
the class HighlightExitPointsHandler method computeUsages.
@Override
public void computeUsages(final List<PsiElement> targets) {
PsiElement parent = PsiTreeUtil.getParentOfType(myTarget, StatementNode.class);
if (!(parent instanceof ReturnStatementNode) && !(parent instanceof ThrowStatementNode)) {
return;
}
final PsiElement definitionNode = PsiTreeUtil.getParentOfType(parent, FunctionDefinitionNode.class, ResourceDefinitionNode.class, ActionDefinitionNode.class);
if (definitionNode == null) {
return;
}
try {
highlightExitPoints(definitionNode);
} catch (AnalysisCanceledException e) {
// ignore
}
}
Aggregations