move method should not be available for type parameters

This commit is contained in:
Eugene Vigdorchik
2005-01-29 13:48:38 +03:00
parent b46e46d5d0
commit b4523429fe
2 changed files with 4 additions and 4 deletions
@@ -60,10 +60,10 @@ public class ConvertToInstanceMethodHandler implements RefactoringActionHandler
for (int i = 0; i < parameters.length; i++) {
final PsiParameter parameter = parameters[i];
final PsiType type = parameter.getType();
if (type instanceof PsiClassType) {
if (type instanceof PsiClassType && !((PsiClassType)type).hasParameters()) {
classTypesFound = true;
final PsiClass psiClass = ((PsiClassType)type).resolve();
if (psiClass != null) {
if (psiClass != null && !(psiClass instanceof PsiTypeParameter)) {
resolvableClassesFound = true;
final boolean inProject = method.getManager().isInProject(psiClass);
if (inProject) {
@@ -77,10 +77,10 @@ public class MoveInstanceMethodHandler implements RefactoringActionHandler {
for (Iterator<PsiVariable> iterator = allVariables.iterator(); iterator.hasNext();) {
PsiVariable variable = iterator.next();
final PsiType type = variable.getType();
if (type instanceof PsiClassType) {
if (type instanceof PsiClassType && !((PsiClassType)type).hasParameters()) {
classTypesFound = true;
final PsiClass psiClass = ((PsiClassType)type).resolve();
if (psiClass != null) {
if (psiClass != null && !(psiClass instanceof PsiTypeParameter)) {
resolvableClassesFound = true;
final boolean inProject = method.getManager().isInProject(psiClass);
if (inProject) {