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

Partial Fix for Bug 52534 - Selection Search offset limit reached is broken

This commit is contained in:
John Camelon 2004-02-24 16:01:32 +00:00
parent 73178a9453
commit ac87e55ae0
4 changed files with 16 additions and 1 deletions

View file

@ -1,3 +1,6 @@
2004-02-24 John Camelon
Partial Fix for Bug 52534 - Selection Search offset limit reached is broken
2004-02-18 Andrew Niefer
added IUsingDeclarationSymbol and UsingDeclarationSymbol
changed IContainerSymbol.addUsingDeclaration to return a IUsingDeclarationSymbol

View file

@ -44,4 +44,9 @@ public interface IScanner {
public void setTokenizingMacroReplacementList(boolean b);
public void setThrowExceptionOnBadCharacterRead( boolean throwOnBad );
/**
* @return
*/
public boolean isOnTopContext();
}

View file

@ -35,7 +35,7 @@ public class SelectionParser extends ContextualParser {
* @see org.eclipse.cdt.internal.core.parser.Parser#handleNewToken(org.eclipse.cdt.core.parser.IToken)
*/
protected void handleNewToken(IToken value) {
if( value != null )
if( value != null && scanner.isOnTopContext() )
{
if( value.getOffset() == offsetRange.getFloorOffset() )
firstTokenOfDuple = value;

View file

@ -3111,4 +3111,11 @@ public class Scanner implements IScanner {
return limitReached;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.parser.IScanner#isOnTopContext()
*/
public boolean isOnTopContext() {
return ( scannerData.getContextStack().getCurrentContext() == scannerData.getContextStack().getTopContext() );
}
}