action to change assignable var type (IDEA-125234)

This commit is contained in:
Anna Kozlova
2014-05-20 14:17:05 +04:00
parent ec9a61b8bd
commit bb5631c2b5
@@ -2673,6 +2673,11 @@ public class HighlightUtil extends HighlightUtilBase {
if (method != null) {
QuickFixAction.registerQuickFixAction(highlightInfo, QUICK_FIX_FACTORY.createMethodReturnFix(method, parameter.getType(), true));
}
} else if (expr instanceof PsiReferenceExpression) {
final PsiElement resolve = ((PsiReferenceExpression)expr).resolve();
if (resolve instanceof PsiVariable) {
registerChangeVariableTypeFixes((PsiVariable)resolve, parameter.getType(), null, highlightInfo);
}
}
}