use of com.intellij.psi.PsiExpressionList in project intellij-community by JetBrains.
the class NotInSuperOrThisCallFilterBase method isOK.
public boolean isOK(PsiExpression occurrence) {
PsiElement parent = occurrence.getParent();
while (parent instanceof PsiExpression) {
parent = parent.getParent();
}
if (!(parent instanceof PsiExpressionList))
return true;
parent = parent.getParent();
if (!(parent instanceof PsiMethodCallExpression))
return true;
final String text = ((PsiMethodCallExpression) parent).getMethodExpression().getText();
return !getKeywordText().equals(text);
}
use of com.intellij.psi.PsiExpressionList in project intellij-community by JetBrains.
the class JavaConditionalUnwrapper method doUnwrap.
@Override
protected void doUnwrap(PsiElement element, Context context) throws IncorrectOperationException {
PsiConditionalExpression cond = (PsiConditionalExpression) element.getParent();
PsiElement savedBlock;
if (cond.getElseExpression() == element) {
savedBlock = element;
} else {
savedBlock = cond.getThenExpression();
}
context.extractElement(savedBlock, cond);
if (cond.getParent() instanceof PsiExpressionList) {
context.delete(cond);
} else {
context.deleteExactly(cond);
}
}
Aggregations