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:
parent
73178a9453
commit
ac87e55ae0
4 changed files with 16 additions and 1 deletions
|
@ -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
|
2004-02-18 Andrew Niefer
|
||||||
added IUsingDeclarationSymbol and UsingDeclarationSymbol
|
added IUsingDeclarationSymbol and UsingDeclarationSymbol
|
||||||
changed IContainerSymbol.addUsingDeclaration to return a IUsingDeclarationSymbol
|
changed IContainerSymbol.addUsingDeclaration to return a IUsingDeclarationSymbol
|
||||||
|
|
|
@ -44,4 +44,9 @@ public interface IScanner {
|
||||||
public void setTokenizingMacroReplacementList(boolean b);
|
public void setTokenizingMacroReplacementList(boolean b);
|
||||||
public void setThrowExceptionOnBadCharacterRead( boolean throwOnBad );
|
public void setThrowExceptionOnBadCharacterRead( boolean throwOnBad );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean isOnTopContext();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class SelectionParser extends ContextualParser {
|
||||||
* @see org.eclipse.cdt.internal.core.parser.Parser#handleNewToken(org.eclipse.cdt.core.parser.IToken)
|
* @see org.eclipse.cdt.internal.core.parser.Parser#handleNewToken(org.eclipse.cdt.core.parser.IToken)
|
||||||
*/
|
*/
|
||||||
protected void handleNewToken(IToken value) {
|
protected void handleNewToken(IToken value) {
|
||||||
if( value != null )
|
if( value != null && scanner.isOnTopContext() )
|
||||||
{
|
{
|
||||||
if( value.getOffset() == offsetRange.getFloorOffset() )
|
if( value.getOffset() == offsetRange.getFloorOffset() )
|
||||||
firstTokenOfDuple = value;
|
firstTokenOfDuple = value;
|
||||||
|
|
|
@ -3111,4 +3111,11 @@ public class Scanner implements IScanner {
|
||||||
return limitReached;
|
return limitReached;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.IScanner#isOnTopContext()
|
||||||
|
*/
|
||||||
|
public boolean isOnTopContext() {
|
||||||
|
return ( scannerData.getContextStack().getCurrentContext() == scannerData.getContextStack().getTopContext() );
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue