mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26: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:
parent
72fe8bfa97
commit
d02a030f03
2 changed files with 3 additions and 3 deletions
|
@ -1441,7 +1441,7 @@ public class CompletionTests extends AbstractContentAssistTest {
|
||||||
// }
|
// }
|
||||||
// using N::f/*cursor*/
|
// using N::f/*cursor*/
|
||||||
public void testUsingDeclaration_379631() throws Exception {
|
public void testUsingDeclaration_379631() throws Exception {
|
||||||
final String[] expected= { "foo()" };
|
final String[] expected= { "foo;" };
|
||||||
assertCompletionResults(fCursorOffset, expected, REPLACEMENT);
|
assertCompletionResults(fCursorOffset, expected, REPLACEMENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1605,7 +1605,7 @@ public class CompletionTests extends AbstractContentAssistTest {
|
||||||
// }
|
// }
|
||||||
// using N::fo/*cursor*/;
|
// using N::fo/*cursor*/;
|
||||||
public void testUsingCompletionWithFollowingSemicolon() throws Exception {
|
public void testUsingCompletionWithFollowingSemicolon() throws Exception {
|
||||||
final String[] expected = { "foo()" };
|
final String[] expected = { "foo" };
|
||||||
assertContentAssistResults(fCursorOffset, expected, true, REPLACEMENT);
|
assertContentAssistResults(fCursorOffset, expected, true, REPLACEMENT);
|
||||||
final String[] expectedInformation = { "null" };
|
final String[] expectedInformation = { "null" };
|
||||||
assertContentAssistResults(fCursorOffset, expectedInformation, true, CONTEXT);
|
assertContentAssistResults(fCursorOffset, expectedInformation, true, CONTEXT);
|
||||||
|
|
|
@ -622,7 +622,7 @@ public class DOMCompletionProposalComputer extends ParsingBasedProposalComputer
|
||||||
// The ParameterGuessingProposal will be active if the function accepts parameters and the content
|
// 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
|
// assist is invoked before typing any parameters. Otherwise, the normal parameter hint proposal will
|
||||||
// be added.
|
// be added.
|
||||||
if (function.getParameters() != null && function.getParameters().length != 0
|
if (!inUsingDeclaration && function.getParameters() != null && function.getParameters().length != 0
|
||||||
&& isBeforeParameters(context)) {
|
&& isBeforeParameters(context)) {
|
||||||
proposals.add(ParameterGuessingProposal.createProposal(context, fAvailableElements, proposal,
|
proposals.add(ParameterGuessingProposal.createProposal(context, fAvailableElements, proposal,
|
||||||
function, fPrefix, fGuessArguments));
|
function, fPrefix, fGuessArguments));
|
||||||
|
|
Loading…
Add table
Reference in a new issue