You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's some tension between this and #331. The argument expression is matched and flows through the catch block below. To try and provide named argument proposals, the conditional if (context.location != ContentAssistLocation.STATEMENT) was added.
publicvoidvisitConstructorCallExpression(ConstructorCallExpressionexpression) {
if (!check(expression)) {
return;
}
Expressionarguments = expression.getArguments();
checkForAfterClosingParen(expression, arguments);
ClassNodeconstructorType = expression.getType();
if (check(constructorType)) {
createContext(constructorType, blockStack.getLast(), ContentAssistLocation.CONSTRUCTOR);
}
try {
// see comments in visitMethodCallExpressionvisitArguments(arguments, expression);
} catch (VisitCompleteExceptione) {
if (context.location != ContentAssistLocation.STATEMENT) {
throwe;
}
// completing constructor argument (https://github.com/groovy/groovy-eclipse/issues/331)
}
// completion invocation offset is outside of type name and argument expressions; it is probably after opening paren or separating commacreateContextForCallContext(expression, constructorType, constructorType.getUnresolvedName());
}
Consider the following:
And the following Groovy class:
Invoke code assist at "|", with the purpose of writing
bean1.foo
: as you can see, no proposal is shown, apart from generic proposals for class names.The text was updated successfully, but these errors were encountered: