don't suggest to add return type to constructor

This commit is contained in:
Maxim.Medvedev
2012-06-25 11:05:02 +04:00
parent 67cafac473
commit e3558d3c70
@@ -54,7 +54,8 @@ public class AddReturnTypeFix implements IntentionAction {
@Override
public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) {
return findMethod(editor, file) != null;
GrMethod method = findMethod(editor, file);
return method != null && !method.isConstructor();
}
@Nullable