mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 09:16:02 +02:00
Further improve SelectionSearch w/Scanner2.
This commit is contained in:
parent
12268e9104
commit
cb47b164a0
2 changed files with 4 additions and 5 deletions
|
@ -336,7 +336,7 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
||||||
private IASTFactory astFactory = null;
|
private IASTFactory astFactory = null;
|
||||||
private int endLine;
|
private int endLine;
|
||||||
|
|
||||||
private char[] fn;
|
private final char[] fn;
|
||||||
/**
|
/**
|
||||||
* @param requestor
|
* @param requestor
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2515,14 +2515,13 @@ public class Scanner2 implements IScanner, IScannerData {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
private final char[] getCurrentFilename() {
|
||||||
* @see org.eclipse.cdt.core.parser.IFilenameProvider#getCurrentFilename()
|
|
||||||
*/
|
|
||||||
public final char[] getCurrentFilename() {
|
|
||||||
for( int i = bufferStackPos; i >= 0; --i )
|
for( int i = bufferStackPos; i >= 0; --i )
|
||||||
{
|
{
|
||||||
if( bufferData[i] instanceof InclusionData )
|
if( bufferData[i] instanceof InclusionData )
|
||||||
return ((InclusionData)bufferData[i]).reader.filename;
|
return ((InclusionData)bufferData[i]).reader.filename;
|
||||||
|
if( bufferData[i] instanceof CodeReader )
|
||||||
|
return ((CodeReader)bufferData[i]).filename;
|
||||||
}
|
}
|
||||||
return emptyCharArray;
|
return emptyCharArray;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue