Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSLD method proposals with positional and optional parameters showing incorrect name-type pairings #623

Closed
eric-milles opened this issue Jul 6, 2018 · 1 comment
Assignees
Labels
Milestone

Comments

@eric-milles
Copy link
Member

eric-milles commented Jul 6, 2018

Consider the following:

contribute(enclosingCall(name('withConfig') & hasArgument('configuration')) & inClosure() & isScript() & isThisType()) {
    method(name:'ast', type:void, params:[xform:'java.lang.Class<? extends Annotation>'], optionalParams:[attributes:Map])
}

and the script:

withConfig(configuration) {
  a|
}

Completion at | is showing proposal ast(Class attributes) in the list of proposals.

It should be showing either ast(Class xform) or ast(Map attributes, Class xform).

@eric-milles
Copy link
Member Author

org.eclipse.jdt.ui.text.java.CompletionProposalLabelProvider.appendUnboundedParameterList(StyledString, CompletionProposal) gets parameter names from total list set on proposal object (includes optional params) and parameter types from method signature (does not include optional params).

@eric-milles eric-milles changed the title DSLD method proposals with optional parameters showing incorrect name-type pairings DSLD method proposals with positional and optional parameters showing incorrect name-type pairings Jul 6, 2018
@eric-milles eric-milles self-assigned this Jul 6, 2018
@eric-milles eric-milles added this to the v3.0.0 milestone Jul 6, 2018
@eric-milles eric-milles added the bug label Jul 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant