mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Partial fix for Bug 56614 - Content Assist] Global variables do not appear in a global completion list
This commit is contained in:
parent
f76fe15b92
commit
8fda490dee
2 changed files with 13 additions and 1 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
2004-03-30 John Camelon
|
||||||
|
Partial fix for Bug 56614 - Content Assist] Global variables do not appear in a global completion list
|
||||||
|
|
||||||
2004-03-29 Andrew Niefer
|
2004-03-29 Andrew Niefer
|
||||||
fixed bug 56620 - Outline view stops on error on last line of block
|
fixed bug 56620 - Outline view stops on error on last line of block
|
||||||
(errorHandling() goes to far)
|
(errorHandling() goes to far)
|
||||||
|
|
|
@ -1746,11 +1746,14 @@ public abstract class Parser extends ExpressionParser implements IParser
|
||||||
{
|
{
|
||||||
// handle initializer
|
// handle initializer
|
||||||
final IASTScope scope = d.getDeclarationWrapper().getScope();
|
final IASTScope scope = d.getDeclarationWrapper().getScope();
|
||||||
|
setCompletionValues(scope,CompletionKind.NO_SUCH_KIND,Key.EMPTY);
|
||||||
if (LT(1) == IToken.tASSIGN)
|
if (LT(1) == IToken.tASSIGN)
|
||||||
{
|
{
|
||||||
consume(IToken.tASSIGN);
|
consume(IToken.tASSIGN);
|
||||||
|
setCompletionValues(scope,CompletionKind.SINGLE_NAME_REFERENCE,Key.EMPTY);
|
||||||
IASTInitializerClause clause = initializerClause(scope);
|
IASTInitializerClause clause = initializerClause(scope);
|
||||||
d.setInitializerClause(clause);
|
d.setInitializerClause(clause);
|
||||||
|
setCompletionValues(scope,CompletionKind.NO_SUCH_KIND,Key.EMPTY);
|
||||||
}
|
}
|
||||||
else if (LT(1) == IToken.tLPAREN )
|
else if (LT(1) == IToken.tLPAREN )
|
||||||
{
|
{
|
||||||
|
@ -1759,8 +1762,10 @@ public abstract class Parser extends ExpressionParser implements IParser
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
consume(IToken.tLPAREN); // EAT IT!
|
consume(IToken.tLPAREN); // EAT IT!
|
||||||
|
setCompletionValues(scope,CompletionKind.SINGLE_NAME_REFERENCE,Key.EMPTY);
|
||||||
IASTExpression astExpression = null;
|
IASTExpression astExpression = null;
|
||||||
astExpression = expression(scope);
|
astExpression = expression(scope);
|
||||||
|
setCompletionValues(scope,CompletionKind.NO_SUCH_KIND,Key.EMPTY);
|
||||||
consume(IToken.tRPAREN);
|
consume(IToken.tRPAREN);
|
||||||
d.setConstructorExpression(astExpression);
|
d.setConstructorExpression(astExpression);
|
||||||
} catch( BacktrackException bt )
|
} catch( BacktrackException bt )
|
||||||
|
@ -1773,10 +1778,14 @@ public abstract class Parser extends ExpressionParser implements IParser
|
||||||
|
|
||||||
protected void optionalCInitializer( Declarator d ) throws EndOfFileException, BacktrackException
|
protected void optionalCInitializer( Declarator d ) throws EndOfFileException, BacktrackException
|
||||||
{
|
{
|
||||||
|
final IASTScope scope = d.getDeclarationWrapper().getScope();
|
||||||
|
setCompletionValues(scope,CompletionKind.NO_SUCH_KIND,Key.EMPTY);
|
||||||
if( LT(1) == IToken.tASSIGN )
|
if( LT(1) == IToken.tASSIGN )
|
||||||
{
|
{
|
||||||
consume( IToken.tASSIGN );
|
consume( IToken.tASSIGN );
|
||||||
d.setInitializerClause( cInitializerClause(d.getDeclarationWrapper().getScope(), EMPTY_LIST ) );
|
setCompletionValues(scope,CompletionKind.SINGLE_NAME_REFERENCE,Key.EMPTY);
|
||||||
|
d.setInitializerClause( cInitializerClause(scope, EMPTY_LIST ) );
|
||||||
|
setCompletionValues(scope,CompletionKind.NO_SUCH_KIND,Key.EMPTY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue