1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 509191 - Do not create parameter guessing proposal if we know we are not calling the function

Change-Id: I7e45501707e0f58ed6d8745506a3519e29c0763a
This commit is contained in:
Nathan Ridge 2017-01-11 00:54:55 -05:00
parent 72fe8bfa97
commit d02a030f03
2 changed files with 3 additions and 3 deletions

View file

@ -1441,7 +1441,7 @@ public class CompletionTests extends AbstractContentAssistTest {
// }
// using N::f/*cursor*/
public void testUsingDeclaration_379631() throws Exception {
final String[] expected= { "foo()" };
final String[] expected= { "foo;" };
assertCompletionResults(fCursorOffset, expected, REPLACEMENT);
}
@ -1605,7 +1605,7 @@ public class CompletionTests extends AbstractContentAssistTest {
// }
// using N::fo/*cursor*/;
public void testUsingCompletionWithFollowingSemicolon() throws Exception {
final String[] expected = { "foo()" };
final String[] expected = { "foo" };
assertContentAssistResults(fCursorOffset, expected, true, REPLACEMENT);
final String[] expectedInformation = { "null" };
assertContentAssistResults(fCursorOffset, expectedInformation, true, CONTEXT);

View file

@ -622,7 +622,7 @@ public class DOMCompletionProposalComputer extends ParsingBasedProposalComputer
// The ParameterGuessingProposal will be active if the function accepts parameters and the content
// assist is invoked before typing any parameters. Otherwise, the normal parameter hint proposal will
// be added.
if (function.getParameters() != null && function.getParameters().length != 0
if (!inUsingDeclaration && function.getParameters() != null && function.getParameters().length != 0
&& isBeforeParameters(context)) {
proposals.add(ParameterGuessingProposal.createProposal(context, fAvailableElements, proposal,
function, fPrefix, fGuessArguments));