mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
move method should not be available for type parameters
This commit is contained in:
+2
-2
@@ -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) {
|
||||
|
||||
+2
-2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user