mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 02:36:01 +02:00
Fix for Bug 172204 - Extra/missing parameter hint proposals (patch by Bryan Wilkinson)
This commit is contained in:
parent
062bd88019
commit
fd426ee735
1 changed files with 8 additions and 3 deletions
|
@ -7,6 +7,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Anton Leherbauer (Wind River Systems) - initial API and implementation
|
||||
* Bryan Wilkinson (QNX)
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.internal.ui.text.contentassist;
|
||||
|
@ -137,13 +138,17 @@ public class LegacyCompletionProposalComputer implements ICompletionProposalComp
|
|||
int paren= scanner.findOpeningPeer(pos, bound, '(', ')');
|
||||
if (paren == CHeuristicScanner.NOT_FOUND)
|
||||
break;
|
||||
int token= scanner.previousToken(paren - 1, bound);
|
||||
paren= scanner.findNonWhitespaceBackward(paren - 1, bound);
|
||||
if (paren == CHeuristicScanner.NOT_FOUND) {
|
||||
break;
|
||||
}
|
||||
int token= scanner.previousToken(paren, bound);
|
||||
// next token must be a method name (identifier) or the closing angle of a
|
||||
// constructor call of a template type.
|
||||
if (token == Symbols.TokenIDENT || token == Symbols.TokenGREATERTHAN) {
|
||||
return paren - 1;
|
||||
return paren + 1;
|
||||
}
|
||||
pos= paren - 1;
|
||||
pos= paren;
|
||||
} while (true);
|
||||
|
||||
return context.getInvocationOffset();
|
||||
|
|
Loading…
Add table
Reference in a new issue