inline superclass: do not call for refactoring which would be invoked later: call method instead (IDEA-86806)

This commit is contained in:
Anna Kozlova
2012-05-30 15:41:08 +04:00
parent d836edf6c5
commit f33811b72d
2 changed files with 2 additions and 2 deletions
@@ -412,7 +412,7 @@ public class InlineMethodProcessor extends BaseRefactoringProcessor {
}
}
private void inlineMethodCall(PsiReferenceExpression ref) throws IncorrectOperationException {
public void inlineMethodCall(PsiReferenceExpression ref) throws IncorrectOperationException {
InlineUtil.TailCallType tailCall = InlineUtil.getTailCallType(ref);
ChangeContextUtil.encodeContextInfo(myMethod, false);
myMethodCopy = (PsiMethod)myMethod.copy();
@@ -72,7 +72,7 @@ public class InlineSuperCallUsageInfo extends FixableUsageInfo {
assert inliningClass != null;
methodCopy = (PsiMethod)inliningClass.add(methodCopy);
final InlineMethodProcessor inlineMethodProcessor = new InlineMethodProcessor(getProject(), methodCopy, methodExpression, null, true);
inlineMethodProcessor.run();
inlineMethodProcessor.inlineMethodCall(methodExpression);
methodCopy.delete();
}
}