use of com.intellij.lang.javascript.validation.fixes.ActionScriptCreateConstructorFix in project intellij-plugins by JetBrains.
the class ActionScriptFunctionSignatureChecker method checkConstructorCall.
@Override
public void checkConstructorCall(@NotNull JSCallExpression node, @NotNull JSClass target) {
if (node instanceof JSNewExpression || node.getMethodExpression() instanceof JSSuperExpression) {
final JSArgumentList argumentList = node.getArgumentList();
final JSExpression[] expressions = argumentList != null ? argumentList.getArguments() : JSExpression.EMPTY_ARRAY;
if (expressions.length > 0) {
final ActionScriptCreateConstructorFix fix = ActionScriptCreateConstructorFix.createIfApplicable(node);
registerProblem(node, JSBundle.message("javascript.invalid.number.of.parameters", "0"), fix != null ? new LocalQuickFix[] { fix } : LocalQuickFix.EMPTY_ARRAY);
}
} else {
reportProblemIfNotExpectedCountOfParameters(node, 1, "one");
}
}
Aggregations