This commit is contained in:
Roman Shevchenko
2012-09-18 19:34:21 +02:00
parent b12e3b2b7e
commit e1d5dc3ac7
3 changed files with 5 additions and 6 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -258,7 +258,7 @@ public class ConvertToInstanceMethodProcessor extends BaseRefactoringProcessor {
modifierList.setModifierProperty(PsiModifier.PRIVATE, false);
modifierList.setModifierProperty(PsiModifier.PUBLIC, false);
modifierList.setModifierProperty(PsiModifier.PROTECTED, false);
RefactoringUtil.abstractizeMethod(myTargetClass, interfaceMethod);
RefactoringUtil.makeMethodAbstract(myTargetClass, interfaceMethod);
for (final PsiClass psiClass : inheritors) {
final PsiMethod newMethod = addMethodToClass(psiClass);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -309,7 +309,7 @@ public class PushDownProcessor extends BaseRefactoringProcessor {
if (method.hasModifierProperty(PsiModifier.PRIVATE)) {
PsiUtil.setModifierProperty(method, PsiModifier.PROTECTED, true);
}
RefactoringUtil.abstractizeMethod(myClass, method);
RefactoringUtil.makeMethodAbstract(myClass, method);
myJavaDocPolicy.processOldJavaDoc(method.getDocComment());
}
else {
@@ -327,7 +327,6 @@ public class PushDownProcessor extends BaseRefactoringProcessor {
}
}
private void pushDownToClass(PsiClass targetClass) throws IncorrectOperationException {
final PsiElementFactory factory = JavaPsiFacade.getInstance(myClass.getProject()).getElementFactory();
final PsiSubstitutor substitutor = TypeConversionUtil.getSuperClassSubstitutor(myClass, targetClass, PsiSubstitutor.EMPTY);
@@ -775,7 +775,6 @@ public class RefactoringUtil {
throws IncorrectOperationException {
PsiType initializerType = null;
if (initializer != null) {
// initializerType = myExpresssion.getType();
if (forcedType != null) {
initializerType = forcedType;
}
@@ -798,6 +797,7 @@ public class RefactoringUtil {
}
/** @deprecated use {@linkplain #makeMethodAbstract(com.intellij.psi.PsiClass, com.intellij.psi.PsiMethod)} (to remove in IDEA 13) */
@SuppressWarnings("UnusedDeclaration")
public static void abstractizeMethod(PsiClass targetClass, PsiMethod method) throws IncorrectOperationException {
makeMethodAbstract(targetClass, method);
}