mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
CORE
Continued work on Bug 43062 : Outline is confused on operator methods containing spaces Partial fix for Bug 43680 : Fix Parser Error Handling TEST Added testErrorHandling_1() to CompleteParseASTTest.java.
This commit is contained in:
parent
3340b03ebf
commit
e95da4dade
68 changed files with 1068 additions and 234 deletions
|
@ -1,3 +1,6 @@
|
|||
2003-09-29 John Camelon
|
||||
Added testErrorHandling_1() to CompleteParseASTTest.java.
|
||||
|
||||
2003-09-26 John Camelon
|
||||
Added QuickParseASTTests::testBug43644() & testBug43062().
|
||||
Moved ASTFailedTests::testBug39531() to QuickParseASTTests.
|
||||
|
|
|
@ -844,4 +844,16 @@ public class CompleteParseASTTest extends CompleteParseBaseTest
|
|||
assertFalse( i.hasNext() );
|
||||
assertAllReferences( 8, createTaskList( new Task( SD_02), new Task( SD_01, 3 ), new Task( a ), new Task( f_SD_01 ), new Task( f_SD_02 ), new Task( next ) ));
|
||||
}
|
||||
|
||||
public void testErrorHandling_1() throws Exception
|
||||
{
|
||||
Iterator i = parse( "A anA; int x = c; class A {}; A * anotherA = &anA; int b;", false ).getDeclarations();
|
||||
IASTVariable x = (IASTVariable)i.next();
|
||||
assertEquals( x.getName(), "x");
|
||||
IASTClassSpecifier A = (IASTClassSpecifier)((IASTAbstractTypeSpecifierDeclaration)i.next()).getTypeSpecifier();
|
||||
IASTVariable anotherA = (IASTVariable)i.next();
|
||||
IASTVariable b = (IASTVariable)i.next();
|
||||
assertEquals( b.getName(), "b");
|
||||
assertFalse(i.hasNext());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -666,14 +666,19 @@ public class CompleteParseBaseTest extends TestCase
|
|||
return null;
|
||||
}
|
||||
protected FullParseCallback callback;
|
||||
protected IASTScope parse(String code) throws ParserException
|
||||
|
||||
protected IASTScope parse( String code ) throws ParserException
|
||||
{
|
||||
return parse( code, true );
|
||||
}
|
||||
protected IASTScope parse(String code, boolean throwOnError) throws ParserException
|
||||
{
|
||||
callback = new FullParseCallback();
|
||||
IParser parser = ParserFactory.createParser(
|
||||
ParserFactory.createScanner( new StringReader( code ), "test-code", new ScannerInfo(),
|
||||
ParserMode.COMPLETE_PARSE, ParserLanguage.CPP, callback ), callback, ParserMode.COMPLETE_PARSE, ParserLanguage.CPP
|
||||
);
|
||||
if( ! parser.parse() ) throw new ParserException( "FAILURE");
|
||||
if( ! parser.parse() && throwOnError ) throw new ParserException( "FAILURE");
|
||||
return callback.getCompilationUnit();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2003-09-29 John Camelon
|
||||
Continued work on Bug 43062 : Outline is confused on operator methods containing spaces
|
||||
Partial fix for Bug 43680 : Fix Parser Error Handling
|
||||
|
||||
2003-09-26 John Camelon
|
||||
Fixed Bug 43644 : 6 triangle icons appearing in outline viewer when typing an error
|
||||
Fixed Bug 43062 : Outline is confused on operator methods containing spaces
|
||||
|
|
|
@ -43,20 +43,6 @@ public interface IParser {
|
|||
*/
|
||||
public IASTExpression expression(IASTScope scope) throws Backtrack;
|
||||
|
||||
/**
|
||||
* Is the parser configured for ANSI C or ANSI C++?
|
||||
*
|
||||
* @return true for C++, false for C
|
||||
*/
|
||||
public ParserLanguage getLanguage();
|
||||
|
||||
/**
|
||||
* Set the Parser explicitly to be a C or C++ parser.
|
||||
*
|
||||
* @param l CPP or C
|
||||
*/
|
||||
public void setLanguage( ParserLanguage l);
|
||||
|
||||
/**
|
||||
* If an error was encountered, give us the offset of the token that caused the error.
|
||||
*
|
||||
|
|
|
@ -23,15 +23,15 @@ public interface IASTFactory
|
|||
public IASTMacro createMacro(
|
||||
String name,
|
||||
int startingOffset,
|
||||
int endingOffset,
|
||||
int nameOffset);
|
||||
int nameOffset,
|
||||
int nameEndOffset, int endingOffset);
|
||||
public IASTInclusion createInclusion(
|
||||
String name,
|
||||
String fileName,
|
||||
boolean local,
|
||||
int startingOffset,
|
||||
int endingOffset,
|
||||
int nameOffset);
|
||||
int nameOffset,
|
||||
int nameEndOffset, int endingOffset);
|
||||
public IASTUsingDirective createUsingDirective(
|
||||
IASTScope scope,
|
||||
ITokenDuple duple, int startingOffset, int endingOffset)
|
||||
|
@ -49,7 +49,7 @@ public interface IASTFactory
|
|||
IASTScope scope,
|
||||
String identifier,
|
||||
int startingOffset,
|
||||
int nameOffset) throws ASTSemanticException;
|
||||
int nameOffset, int nameEndOffset) throws ASTSemanticException;
|
||||
|
||||
public IASTNamespaceAlias createNamespaceAlias(
|
||||
IASTScope scope,
|
||||
|
@ -57,7 +57,7 @@ public interface IASTFactory
|
|||
ITokenDuple alias,
|
||||
int startingOffset,
|
||||
int nameOffset,
|
||||
int endOffset ) throws ASTSemanticException;
|
||||
int nameEndOffset, int endOffset ) throws ASTSemanticException;
|
||||
|
||||
public IASTCompilationUnit createCompilationUnit();
|
||||
public IASTLinkageSpecification createLinkageSpecification(
|
||||
|
@ -70,7 +70,7 @@ public interface IASTFactory
|
|||
ClassNameType type,
|
||||
ASTAccessVisibility access,
|
||||
int startingOffset,
|
||||
int nameOffset) throws ASTSemanticException;
|
||||
int nameOffset, int nameEndOffset) throws ASTSemanticException;
|
||||
/**
|
||||
* @param astClassSpec
|
||||
* @param isVirtual
|
||||
|
@ -90,12 +90,12 @@ public interface IASTFactory
|
|||
public IASTEnumerationSpecifier createEnumerationSpecifier(
|
||||
IASTScope scope,
|
||||
String name,
|
||||
int startingOffset, int nameOffset) throws ASTSemanticException;
|
||||
int startingOffset, int nameOffset, int nameEndOffset) throws ASTSemanticException;
|
||||
public void addEnumerator(
|
||||
IASTEnumerationSpecifier enumeration,
|
||||
String string,
|
||||
int startingOffset,
|
||||
int endingOffset, IASTExpression initialValue)throws ASTSemanticException;
|
||||
int nameOffset, int nameEndOffset, int endingOffset, IASTExpression initialValue)throws ASTSemanticException;
|
||||
public IASTExpression createExpression(
|
||||
IASTScope scope,
|
||||
IASTExpression.Kind kind,
|
||||
|
@ -133,7 +133,6 @@ public interface IASTFactory
|
|||
public IASTFunction createFunction(
|
||||
IASTScope scope,
|
||||
String name,
|
||||
int nameEndOffset,
|
||||
List parameters,
|
||||
IASTAbstractDeclaration returnType,
|
||||
IASTExceptionSpecification exception,
|
||||
|
@ -142,6 +141,7 @@ public interface IASTFactory
|
|||
boolean isStatic,
|
||||
int startOffset,
|
||||
int nameOffset,
|
||||
int nameEndOffset,
|
||||
IASTTemplate ownerTemplate,
|
||||
boolean isConst,
|
||||
boolean isVolatile,
|
||||
|
@ -156,7 +156,6 @@ public interface IASTFactory
|
|||
public IASTMethod createMethod(
|
||||
IASTScope scope,
|
||||
String name,
|
||||
int nameEndOffset,
|
||||
List parameters,
|
||||
IASTAbstractDeclaration returnType,
|
||||
IASTExceptionSpecification exception,
|
||||
|
@ -165,6 +164,7 @@ public interface IASTFactory
|
|||
boolean isStatic,
|
||||
int startOffset,
|
||||
int nameOffset,
|
||||
int nameEndOffset,
|
||||
IASTTemplate ownerTemplate,
|
||||
boolean isConst,
|
||||
boolean isVolatile,
|
||||
|
@ -173,11 +173,11 @@ public interface IASTFactory
|
|||
boolean isPureVirtual, ASTAccessVisibility visibility, List constructorChain, boolean isDefinition) throws ASTSemanticException;
|
||||
|
||||
public IASTVariable createVariable(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression,
|
||||
IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, IASTExpression constructorExpression ) throws ASTSemanticException;
|
||||
IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, int nameEndOffset, IASTExpression constructorExpression ) throws ASTSemanticException;
|
||||
|
||||
public IASTField createField( IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, IASTExpression constructorExpression, ASTAccessVisibility visibility) throws ASTSemanticException;
|
||||
public IASTField createField( IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, int nameEndOffset, IASTExpression constructorExpression, ASTAccessVisibility visibility) throws ASTSemanticException;
|
||||
|
||||
public IASTParameterDeclaration createParameterDeclaration( boolean isConst, boolean isVolatile, IASTTypeSpecifier getTypeSpecifier, List pointerOperators, List arrayModifiers, List parameters, ASTPointerOperator pointerOp, String parameterName, IASTInitializerClause initializerClause, int startingOffset, int endingOffset, int nameOffset );
|
||||
public IASTParameterDeclaration createParameterDeclaration( boolean isConst, boolean isVolatile, IASTTypeSpecifier getTypeSpecifier, List pointerOperators, List arrayModifiers, List parameters, ASTPointerOperator pointerOp, String parameterName, IASTInitializerClause initializerClause, int startingOffset, int nameOffset, int nameEndOffset, int endingOffset );
|
||||
|
||||
public IASTTemplateDeclaration createTemplateDeclaration( IASTScope scope, List templateParameters, boolean exported, int startingOffset );
|
||||
|
||||
|
@ -187,7 +187,7 @@ public interface IASTFactory
|
|||
|
||||
public IASTTemplateSpecialization createTemplateSpecialization(IASTScope scope, int startingOffset);
|
||||
|
||||
public IASTTypedefDeclaration createTypedef( IASTScope scope, String name, IASTAbstractDeclaration mapping, int startingOffset, int nameOffset ) throws ASTSemanticException;
|
||||
public IASTTypedefDeclaration createTypedef( IASTScope scope, String name, IASTAbstractDeclaration mapping, int startingOffset, int nameOffset, int nameEndOffset ) throws ASTSemanticException;
|
||||
|
||||
public IASTAbstractTypeSpecifierDeclaration createTypeSpecDeclaration( IASTScope scope, IASTTypeSpecifier typeSpecifier, IASTTemplate template, int startingOffset, int endingOffset);
|
||||
|
||||
|
|
|
@ -35,5 +35,4 @@ public interface IASTFunction extends IASTCodeScope, IASTOffsetableNamedElement,
|
|||
|
||||
public boolean previouslyDeclared();
|
||||
|
||||
public int getNameEndOffset(); // necessary for operator new, etc. which are > 1 token
|
||||
}
|
||||
|
|
|
@ -20,4 +20,6 @@ public interface IASTOffsetableNamedElement extends IASTOffsetableElement {
|
|||
public String getName();
|
||||
public int getNameOffset();
|
||||
public void setNameOffset( int o );
|
||||
public int getNameEndOffset();
|
||||
public void setNameEndOffset( int o );
|
||||
}
|
||||
|
|
|
@ -381,9 +381,9 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
|||
return astFactory.createTypedef(
|
||||
scope,
|
||||
name,
|
||||
abs, getStartingOffset(), d.getNameStartOffset() );
|
||||
abs, getStartingOffset(), d.getNameStartOffset(), d.getNameEndOffset() );
|
||||
else
|
||||
return astFactory.createVariable( scope, name, auto, d.getInitializerClause(), d.getBitFieldExpression(), abs, mutable, extern, register, staticc, getStartingOffset(), d.getNameStartOffset(), d.getConstructorExpression() );
|
||||
return astFactory.createVariable( scope, name, auto, d.getInitializerClause(), d.getBitFieldExpression(), abs, mutable, extern, register, staticc, getStartingOffset(), d.getNameStartOffset(), d.getNameEndOffset(), d.getConstructorExpression() );
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -406,7 +406,7 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
|||
constt,
|
||||
volatil,
|
||||
getTypeSpecifier(),
|
||||
declarator.getPointerOperators(), declarator.getArrayModifiers(), null, null), startingOffset, declarator.getNameStartOffset());
|
||||
declarator.getPointerOperators(), declarator.getArrayModifiers(), null, null), startingOffset, declarator.getNameStartOffset(), declarator.getNameEndOffset());
|
||||
}
|
||||
/**
|
||||
* @param declarator
|
||||
|
@ -418,8 +418,7 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
|||
.createMethod(
|
||||
scope,
|
||||
nested ? declarator.getOwnedDeclarator().getName() : declarator.getName(),
|
||||
declarator.getNameEndOffset(),
|
||||
createParameterList(declarator.getParameters()),
|
||||
createParameterList(declarator.getParameters()),
|
||||
astFactory.createAbstractDeclaration(
|
||||
constt,
|
||||
volatil,
|
||||
|
@ -431,6 +430,7 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
|||
staticc,
|
||||
startingOffset,
|
||||
declarator.getNameStartOffset(),
|
||||
declarator.getNameEndOffset(),
|
||||
templateDeclaration,
|
||||
declarator.isConst(),
|
||||
declarator.isVolatile(),
|
||||
|
@ -448,7 +448,6 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
|||
return astFactory.createFunction(
|
||||
scope,
|
||||
nested ? declarator.getOwnedDeclarator().getName() : declarator.getName(),
|
||||
declarator.getNameEndOffset(),
|
||||
createParameterList(declarator.getParameters()),
|
||||
astFactory.createAbstractDeclaration(
|
||||
constt,
|
||||
|
@ -461,6 +460,7 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
|||
staticc,
|
||||
startingOffset,
|
||||
declarator.getNameStartOffset(),
|
||||
declarator.getNameEndOffset(),
|
||||
templateDeclaration,
|
||||
declarator.isConst(),
|
||||
declarator.isVolatile(),
|
||||
|
@ -492,7 +492,7 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
|||
staticc,
|
||||
startingOffset,
|
||||
declarator.getNameStartOffset(),
|
||||
declarator.getConstructorExpression(), ((IASTClassSpecifier)scope).getCurrentVisibilityMode());
|
||||
declarator.getNameEndOffset(), declarator.getConstructorExpression(), ((IASTClassSpecifier)scope).getCurrentVisibilityMode());
|
||||
}
|
||||
private List createParameterList(List currentParameters)
|
||||
{
|
||||
|
@ -514,7 +514,7 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
|||
declarator.getArrayModifiers(),
|
||||
null, null, declarator.getName() == null
|
||||
? ""
|
||||
: declarator.getName(), declarator.getInitializerClause(), wrapper.getStartingOffset(), wrapper.getEndOffset(), declarator.getNameStartOffset()));
|
||||
: declarator.getName(), declarator.getInitializerClause(), wrapper.getStartingOffset(), declarator.getNameStartOffset(), declarator.getNameEndOffset(), wrapper.getEndOffset()));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
@ -541,7 +541,7 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
|||
register,
|
||||
staticc,
|
||||
getStartingOffset(),
|
||||
declarator.getNameStartOffset(), declarator.getConstructorExpression());
|
||||
declarator.getNameStartOffset(), declarator.getNameEndOffset(), declarator.getConstructorExpression());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -128,7 +128,7 @@ public class Parser implements IParser
|
|||
requestor = callback;
|
||||
this.mode = mode;
|
||||
this.language = language;
|
||||
astFactory = ParserFactory.createASTFactory(mode, language);
|
||||
astFactory = ParserFactory.createASTFactory( mode, language);
|
||||
scanner.setASTFactory(astFactory);
|
||||
}
|
||||
// counter that keeps track of the number of times Parser.parse() is called
|
||||
|
@ -606,7 +606,7 @@ public class Parser implements IParser
|
|||
declarator.getArrayModifiers(),
|
||||
null, null, declarator.getName() == null
|
||||
? ""
|
||||
: declarator.getName(), declarator.getInitializerClause(), wrapper.getStartingOffset(), wrapper.getEndOffset(), declarator.getNameStartOffset()),
|
||||
: declarator.getName(), declarator.getInitializerClause(), wrapper.getStartingOffset(), declarator.getNameStartOffset(), declarator.getNameEndOffset(), wrapper.getEndOffset()),
|
||||
null));
|
||||
}
|
||||
}
|
||||
|
@ -757,7 +757,8 @@ public class Parser implements IParser
|
|||
scope,
|
||||
(identifier == null ? "" : identifier.getImage()),
|
||||
first.getOffset(),
|
||||
(identifier == null ? first.getOffset() : identifier.getOffset()));
|
||||
(identifier == null ? first.getOffset() : identifier.getOffset()),
|
||||
(identifier == null ? first.getEndOffset() : identifier.getEndOffset() ));
|
||||
}
|
||||
catch (ASTSemanticException e)
|
||||
{
|
||||
|
@ -808,7 +809,7 @@ public class Parser implements IParser
|
|||
{
|
||||
astFactory.createNamespaceAlias(
|
||||
scope, identifier.toString(), duple, first.getOffset(),
|
||||
identifier.getOffset(), duple.getLastToken().getEndOffset() );
|
||||
identifier.getOffset(), identifier.getEndOffset(), duple.getLastToken().getEndOffset() );
|
||||
}
|
||||
catch (ASTSemanticException e)
|
||||
{
|
||||
|
@ -2315,7 +2316,9 @@ public class Parser implements IParser
|
|||
mark.getOffset(),
|
||||
((identifier == null)
|
||||
? mark.getOffset()
|
||||
: identifier.getOffset()));
|
||||
: identifier.getOffset()),
|
||||
((identifier == null)? mark.getEndOffset()
|
||||
: identifier.getEndOffset()));
|
||||
}
|
||||
catch (ASTSemanticException e)
|
||||
{
|
||||
|
@ -2349,8 +2352,8 @@ public class Parser implements IParser
|
|||
enumeration,
|
||||
enumeratorIdentifier.getImage(),
|
||||
enumeratorIdentifier.getOffset(),
|
||||
enumeratorIdentifier.getEndOffset(),
|
||||
initialValue);
|
||||
enumeratorIdentifier.getOffset(),
|
||||
enumeratorIdentifier.getEndOffset(), enumeratorIdentifier.getEndOffset(), initialValue);
|
||||
}
|
||||
catch (ASTSemanticException e1)
|
||||
{
|
||||
|
@ -2369,8 +2372,8 @@ public class Parser implements IParser
|
|||
enumeration,
|
||||
enumeratorIdentifier.getImage(),
|
||||
enumeratorIdentifier.getOffset(),
|
||||
enumeratorIdentifier.getEndOffset(),
|
||||
initialValue);
|
||||
enumeratorIdentifier.getOffset(),
|
||||
enumeratorIdentifier.getEndOffset(), enumeratorIdentifier.getEndOffset(), initialValue);
|
||||
}
|
||||
catch (ASTSemanticException e1)
|
||||
{
|
||||
|
@ -2452,7 +2455,8 @@ public class Parser implements IParser
|
|||
nameType,
|
||||
access,
|
||||
classKey.getOffset(),
|
||||
duple == null ? classKey.getOffset() : duple.getFirstToken().getOffset());
|
||||
duple == null ? classKey.getOffset() : duple.getFirstToken().getOffset(),
|
||||
duple == null ? classKey.getEndOffset() : duple.getFirstToken().getEndOffset() );
|
||||
}
|
||||
catch (ASTSemanticException e)
|
||||
{
|
||||
|
|
|
@ -344,7 +344,7 @@ public class Scanner implements IScanner {
|
|||
}
|
||||
}
|
||||
if (inclusionReader != null) {
|
||||
IASTInclusion inclusion = astFactory.createInclusion( fileName, newPath, !useIncludePaths, beginOffset, endOffset, nameOffset );
|
||||
IASTInclusion inclusion = astFactory.createInclusion( fileName, newPath, !useIncludePaths, beginOffset, nameOffset, nameOffset + fileName.length(), endOffset );
|
||||
contextStack.updateContext(inclusionReader, newPath, ScannerContext.INCLUSION, inclusion, requestor );
|
||||
}
|
||||
}
|
||||
|
@ -2011,7 +2011,7 @@ public class Scanner implements IScanner {
|
|||
if( requestor != null )
|
||||
{
|
||||
IASTInclusion i = astFactory.createInclusion( f, "", !useIncludePath, beginningOffset,
|
||||
endOffset, startOffset );
|
||||
startOffset, startOffset + f.length(), endOffset );
|
||||
i.enterScope( requestor );
|
||||
i.exitScope( requestor );
|
||||
}
|
||||
|
@ -2168,7 +2168,7 @@ public class Scanner implements IScanner {
|
|||
throw new ScannerException( ScannerException.ErrorCode.INVALID_PREPROCESSOR_DIRECTIVE, getCurrentFile(), getCurrentOffset() );
|
||||
}
|
||||
|
||||
astFactory.createMacro( key, beginning, contextStack.getCurrentContext().getOffset(), offset ).acceptElement( requestor );
|
||||
astFactory.createMacro( key, beginning, offset, offset + key.length(), contextStack.getCurrentContext().getOffset() ).acceptElement( requestor );
|
||||
}
|
||||
|
||||
protected Vector getMacroParameters (String params, boolean forStringizing) throws ScannerException {
|
||||
|
|
|
@ -19,14 +19,19 @@ import org.eclipse.cdt.core.parser.ast.IASTInclusion;
|
|||
*/
|
||||
public class ASTInclusion implements IASTInclusion {
|
||||
|
||||
public ASTInclusion( String name, String fileName, boolean local )
|
||||
public ASTInclusion( String name, String fileName, boolean local, int startingOffset, int nameOffset, int nameEndOffset, int endOffset )
|
||||
{
|
||||
this.name = name;
|
||||
this.fileName = fileName;
|
||||
this.local = local;
|
||||
setStartingOffset(startingOffset);
|
||||
setNameOffset(nameOffset);
|
||||
setNameEndOffset(nameEndOffset);
|
||||
setEndingOffset(endOffset);
|
||||
}
|
||||
|
||||
private final String name, fileName;
|
||||
private int nameEndOffset;
|
||||
private final String name, fileName;
|
||||
private final boolean local;
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTInclusion#getName()
|
||||
|
@ -109,7 +114,14 @@ public class ASTInclusion implements IASTInclusion {
|
|||
*/
|
||||
public void enterScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.enterInclusion(this);
|
||||
try
|
||||
{
|
||||
requestor.enterInclusion(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -117,7 +129,28 @@ public class ASTInclusion implements IASTInclusion {
|
|||
*/
|
||||
public void exitScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.exitInclusion(this);
|
||||
try
|
||||
{
|
||||
requestor.exitInclusion(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return nameEndOffset;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
{
|
||||
nameEndOffset = o;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,10 +19,15 @@ import org.eclipse.cdt.core.parser.ast.IASTMacro;
|
|||
*/
|
||||
public class ASTMacro implements IASTMacro {
|
||||
|
||||
private final String name;
|
||||
public ASTMacro( String name )
|
||||
private int nameEndOffset = 0;
|
||||
private final String name;
|
||||
public ASTMacro( String name, int start, int end, int nameBeg, int nameEnd )
|
||||
{
|
||||
this.name =name;
|
||||
setStartingOffset(start);
|
||||
setNameOffset(nameBeg);
|
||||
setNameEndOffset(nameEnd);
|
||||
setEndingOffset(end);
|
||||
}
|
||||
|
||||
private int startingOffset = 0, endingOffset = 0, nameOffset = 0;
|
||||
|
@ -74,7 +79,14 @@ public class ASTMacro implements IASTMacro {
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptMacro( this );
|
||||
try
|
||||
{
|
||||
requestor.acceptMacro( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
|
@ -89,4 +101,18 @@ public class ASTMacro implements IASTMacro {
|
|||
{
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return nameEndOffset;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
{
|
||||
nameEndOffset = o;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,22 +31,16 @@ public class BaseASTFactory {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.parser.ast.IASTFactory#createMacro(java.lang.String, int, int, int)
|
||||
*/
|
||||
public IASTMacro createMacro(String name, int startingOffset, int endingOffset, int nameOffset) {
|
||||
IASTMacro m = new ASTMacro( name );
|
||||
m.setStartingOffset( startingOffset );
|
||||
m.setEndingOffset( endingOffset );
|
||||
m.setNameOffset( nameOffset );
|
||||
public IASTMacro createMacro(String name, int startingOffset, int nameOffset, int nameEndOffset, int endingOffset) {
|
||||
IASTMacro m = new ASTMacro( name, startingOffset, endingOffset, nameOffset, nameEndOffset );
|
||||
return m;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.parser.ast.IASTFactory#createInclusion(java.lang.String, java.lang.String, boolean)
|
||||
*/
|
||||
public IASTInclusion createInclusion(String name, String fileName, boolean local, int startingOffset, int endingOffset, int nameOffset) {
|
||||
IASTInclusion inclusion = new ASTInclusion( name, fileName, local );
|
||||
inclusion.setStartingOffset( startingOffset );
|
||||
inclusion.setEndingOffset( endingOffset );
|
||||
inclusion.setNameOffset( nameOffset );
|
||||
public IASTInclusion createInclusion(String name, String fileName, boolean local, int startingOffset, int nameOffset, int nameEndOffset, int endingOffset) {
|
||||
IASTInclusion inclusion = new ASTInclusion( name, fileName, local, startingOffset, nameOffset, nameEndOffset, endingOffset );
|
||||
return inclusion;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,8 @@ package org.eclipse.cdt.internal.core.parser.ast;
|
|||
*/
|
||||
public class NamedOffsets extends Offsets {
|
||||
|
||||
private int nameOffset = 0;
|
||||
private int nameEndOffset = 0;
|
||||
private int nameOffset = 0;
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getElementNameOffset()
|
||||
|
@ -32,6 +33,15 @@ public class NamedOffsets extends Offsets {
|
|||
public void setNameOffset(int o) {
|
||||
nameOffset = o;
|
||||
}
|
||||
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return nameEndOffset;
|
||||
}
|
||||
|
||||
public void setNameEndOffset( int offset )
|
||||
{
|
||||
nameEndOffset = offset;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -74,7 +74,14 @@ public class ASTASMDefinition extends ASTAnonymousDeclaration implements IASTASM
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptASMDefinition(this);
|
||||
try
|
||||
{
|
||||
requestor.acceptASMDefinition(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
|
|
|
@ -46,7 +46,14 @@ public class ASTAbstractTypeSpecifierDeclaration
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptAbstractTypeSpecDeclaration(this);
|
||||
try
|
||||
{
|
||||
requestor.acceptAbstractTypeSpecDeclaration(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -47,7 +47,14 @@ public class ASTClassReference
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptClassReference( this );
|
||||
try
|
||||
{
|
||||
requestor.acceptClassReference( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
|
|
|
@ -91,7 +91,7 @@ public class ASTClassSpecifier extends ASTScope implements IASTClassSpecifier
|
|||
/**
|
||||
* @param symbol
|
||||
*/
|
||||
public ASTClassSpecifier(ISymbol symbol, ASTClassKind kind, ClassNameType type, ASTAccessVisibility access, int startingOffset, int nameOffset, List references )
|
||||
public ASTClassSpecifier(ISymbol symbol, ASTClassKind kind, ClassNameType type, ASTAccessVisibility access, int startingOffset, int nameOffset, int nameEndOffset, List references )
|
||||
{
|
||||
super(symbol);
|
||||
classKind = kind;
|
||||
|
@ -99,6 +99,7 @@ public class ASTClassSpecifier extends ASTScope implements IASTClassSpecifier
|
|||
currentVisibility = access;
|
||||
setStartingOffset(startingOffset);
|
||||
setNameOffset(nameOffset);
|
||||
setNameEndOffset(nameEndOffset);
|
||||
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), symbol.getName() );
|
||||
this.references = new ASTReferenceStore( references );
|
||||
}
|
||||
|
@ -171,7 +172,14 @@ public class ASTClassSpecifier extends ASTScope implements IASTClassSpecifier
|
|||
public void enterScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
references.processReferences( requestor );
|
||||
requestor.enterClassSpecifier(this);
|
||||
try
|
||||
{
|
||||
requestor.enterClassSpecifier(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
Iterator i = getBaseClauses();
|
||||
while( i.hasNext() )
|
||||
{
|
||||
|
@ -184,7 +192,14 @@ public class ASTClassSpecifier extends ASTScope implements IASTClassSpecifier
|
|||
*/
|
||||
public void exitScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.exitClassSpecifier(this);
|
||||
try
|
||||
{
|
||||
requestor.exitClassSpecifier(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
|
@ -228,4 +243,18 @@ public class ASTClassSpecifier extends ASTScope implements IASTClassSpecifier
|
|||
{
|
||||
return (IASTScope)symbol.getContainingSymbol().getASTExtension().getPrimaryDeclaration();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return offsets.getNameEndOffset();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,14 +40,28 @@ public class ASTCodeScope extends ASTScope implements IASTCodeScope {
|
|||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
*/
|
||||
public void enterScope(ISourceElementRequestor requestor) {
|
||||
requestor.enterCodeBlock( this );
|
||||
try
|
||||
{
|
||||
requestor.enterCodeBlock( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#exitScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
*/
|
||||
public void exitScope(ISourceElementRequestor requestor) {
|
||||
requestor.exitCodeBlock( this );
|
||||
try
|
||||
{
|
||||
requestor.exitCodeBlock( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -41,13 +41,27 @@ public class ASTCompilationUnit
|
|||
*/
|
||||
public void enterScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.enterCompilationUnit( this );
|
||||
try
|
||||
{
|
||||
requestor.enterCompilationUnit( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#exitScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
*/
|
||||
public void exitScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.exitCompilationUnit( this );
|
||||
try
|
||||
{
|
||||
requestor.exitCompilationUnit( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,12 +39,13 @@ public class ASTElaboratedTypeSpecifier extends ASTSymbol implements IASTElabora
|
|||
* @param startingOffset
|
||||
* @param endOffset
|
||||
*/
|
||||
public ASTElaboratedTypeSpecifier(ISymbol checkSymbol, ASTClassKind kind, int startingOffset, int nameOffset, int endOffset, List references, boolean isDecl )
|
||||
public ASTElaboratedTypeSpecifier(ISymbol checkSymbol, ASTClassKind kind, int startingOffset, int nameOffset, int nameEndOffset, int endOffset, List references, boolean isDecl )
|
||||
{
|
||||
super( checkSymbol );
|
||||
this.kind = kind;
|
||||
setStartingOffset( startingOffset );
|
||||
setNameOffset( nameOffset );
|
||||
setNameEndOffset(nameEndOffset);
|
||||
setEndingOffset( endOffset );
|
||||
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), checkSymbol.getName() );
|
||||
store = new ASTReferenceStore( references );
|
||||
|
@ -106,7 +107,14 @@ public class ASTElaboratedTypeSpecifier extends ASTSymbol implements IASTElabora
|
|||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
if( isForwardDeclaration )
|
||||
requestor.acceptElaboratedForewardDeclaration(this);
|
||||
try
|
||||
{
|
||||
requestor.acceptElaboratedForewardDeclaration(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
store.processReferences(requestor);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
|
@ -145,4 +153,19 @@ public class ASTElaboratedTypeSpecifier extends ASTSymbol implements IASTElabora
|
|||
{
|
||||
return references;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return offsets.getNameEndOffset();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,14 @@ public class ASTEnumerationReference
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptEnumerationReference( this );
|
||||
try
|
||||
{
|
||||
requestor.acceptEnumerationReference( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
|
|
|
@ -34,11 +34,12 @@ public class ASTEnumerationSpecifier
|
|||
/**
|
||||
* @param symbol
|
||||
*/
|
||||
public ASTEnumerationSpecifier(ISymbol symbol, int startingOffset, int nameOffset )
|
||||
public ASTEnumerationSpecifier(ISymbol symbol, int startingOffset, int nameOffset, int nameEndOffset )
|
||||
{
|
||||
super(symbol);
|
||||
setStartingOffset(startingOffset);
|
||||
setNameOffset( nameOffset );
|
||||
setNameEndOffset(nameEndOffset);
|
||||
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), symbol.getName() );
|
||||
}
|
||||
|
||||
|
@ -62,7 +63,14 @@ public class ASTEnumerationSpecifier
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptEnumerationSpecifier(this);
|
||||
try
|
||||
{
|
||||
requestor.acceptEnumerationSpecifier(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
|
@ -132,4 +140,19 @@ public class ASTEnumerationSpecifier
|
|||
{
|
||||
return offsets.getEndingOffset();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return offsets.getNameEndOffset();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ import org.eclipse.cdt.core.parser.ISourceElementRequestor;
|
|||
import org.eclipse.cdt.core.parser.ast.IASTEnumerationSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTEnumerator;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTExpression;
|
||||
import org.eclipse.cdt.internal.core.parser.ast.Offsets;
|
||||
import org.eclipse.cdt.internal.core.parser.ast.NamedOffsets;
|
||||
import org.eclipse.cdt.internal.core.parser.pst.ISymbol;
|
||||
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ import org.eclipse.cdt.internal.core.parser.pst.ISymbol;
|
|||
*/
|
||||
public class ASTEnumerator extends ASTSymbol implements IASTEnumerator
|
||||
{
|
||||
private Offsets offsets = new Offsets();
|
||||
private NamedOffsets offsets = new NamedOffsets();
|
||||
private final IASTExpression initialValue;
|
||||
private final IASTEnumerationSpecifier owner;
|
||||
/**
|
||||
|
@ -32,10 +32,12 @@ public class ASTEnumerator extends ASTSymbol implements IASTEnumerator
|
|||
* @param endingOffset
|
||||
* @param initialValue
|
||||
*/
|
||||
public ASTEnumerator(ISymbol enumeratorSymbol, IASTEnumerationSpecifier owner, int startingOffset, int endingOffset, IASTExpression initialValue)
|
||||
public ASTEnumerator(ISymbol enumeratorSymbol, IASTEnumerationSpecifier owner, int startingOffset, int nameOffset, int nameEndOffset, int endingOffset, IASTExpression initialValue)
|
||||
{
|
||||
super( enumeratorSymbol );
|
||||
setStartingOffset(startingOffset);
|
||||
setNameOffset( nameOffset );
|
||||
setNameEndOffset( nameEndOffset );
|
||||
setEndingOffset( endingOffset );
|
||||
this.initialValue = initialValue;
|
||||
this.owner = owner;
|
||||
|
@ -121,4 +123,19 @@ public class ASTEnumerator extends ASTSymbol implements IASTEnumerator
|
|||
{
|
||||
return offsets.getEndingOffset();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return offsets.getNameEndOffset();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,14 @@ public class ASTEnumeratorReference extends ASTReference implements IASTEnumerat
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptEnumeratorReference( this );
|
||||
try
|
||||
{
|
||||
requestor.acceptEnumeratorReference( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
|
|
|
@ -37,9 +37,9 @@ public class ASTField extends ASTVariable implements IASTField
|
|||
* @param references
|
||||
* @param visibility
|
||||
*/
|
||||
public ASTField(ISymbol newSymbol, IASTAbstractDeclaration abstractDeclaration, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, int startingOffset, int nameOffset, List references, boolean previouslyDeclared, IASTExpression constructorExpression, ASTAccessVisibility visibility)
|
||||
public ASTField(ISymbol newSymbol, IASTAbstractDeclaration abstractDeclaration, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, int startingOffset, int nameOffset, int nameEndOffset, List references, boolean previouslyDeclared, IASTExpression constructorExpression, ASTAccessVisibility visibility)
|
||||
{
|
||||
super( newSymbol, abstractDeclaration, initializerClause, bitfieldExpression, startingOffset, nameOffset, references, constructorExpression, previouslyDeclared );
|
||||
super( newSymbol, abstractDeclaration, initializerClause, bitfieldExpression, startingOffset, nameOffset, nameEndOffset, references, constructorExpression, previouslyDeclared );
|
||||
this.visibility = visibility;
|
||||
|
||||
}
|
||||
|
@ -53,7 +53,14 @@ public class ASTField extends ASTVariable implements IASTField
|
|||
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptField(this);
|
||||
try
|
||||
{
|
||||
requestor.acceptField(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
referenceDelegate.processReferences(requestor);
|
||||
if( getInitializerClause() != null )
|
||||
getInitializerClause().acceptElement(requestor);
|
||||
|
|
|
@ -47,7 +47,14 @@ public class ASTFieldReference
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptFieldReference(this);
|
||||
try
|
||||
{
|
||||
requestor.acceptFieldReference(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
|
|
|
@ -62,6 +62,7 @@ public class ASTFunction extends ASTScope implements IASTFunction
|
|||
this.exception = exception;
|
||||
setStartingOffset(startOffset);
|
||||
setNameOffset(nameOffset);
|
||||
setNameEndOffset(nameEndOffset);
|
||||
this.ownerTemplate = ownerTemplate;
|
||||
this.references = new ASTReferenceStore( references );
|
||||
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), symbol.getName() );
|
||||
|
@ -195,7 +196,14 @@ public class ASTFunction extends ASTScope implements IASTFunction
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptFunctionDeclaration(this);
|
||||
try
|
||||
{
|
||||
requestor.acceptFunctionDeclaration(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
functionCallbacks(requestor);
|
||||
}
|
||||
|
||||
|
@ -233,7 +241,14 @@ public class ASTFunction extends ASTScope implements IASTFunction
|
|||
*/
|
||||
public void enterScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.enterFunctionBody( this );
|
||||
try
|
||||
{
|
||||
requestor.enterFunctionBody( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
functionCallbacks( requestor );
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
|
@ -241,7 +256,14 @@ public class ASTFunction extends ASTScope implements IASTFunction
|
|||
*/
|
||||
public void exitScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.exitFunctionBody( this );
|
||||
try
|
||||
{
|
||||
requestor.exitFunctionBody( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -263,13 +285,18 @@ public class ASTFunction extends ASTScope implements IASTFunction
|
|||
return previouslyDeclared;
|
||||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFunction#getNameEndOffset()
|
||||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return offsets.getNameEndOffset();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,14 @@ public class ASTFunctionReference
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptFunctionReference( this );
|
||||
try
|
||||
{
|
||||
requestor.acceptFunctionReference( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
|
|
|
@ -89,13 +89,27 @@ public class ASTLinkageSpecification extends ASTAnonymousDeclaration implements
|
|||
*/
|
||||
public void enterScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.enterLinkageSpecification(this);
|
||||
try
|
||||
{
|
||||
requestor.enterLinkageSpecification(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#exitScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
*/
|
||||
public void exitScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.exitLinkageSpecification(this);
|
||||
try
|
||||
{
|
||||
requestor.exitLinkageSpecification(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -126,7 +126,14 @@ public class ASTMethod extends ASTFunction implements IASTMethod
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptMethodDeclaration(this);
|
||||
try
|
||||
{
|
||||
requestor.acceptMethodDeclaration(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
methodCallbacks(requestor);
|
||||
}
|
||||
protected void methodCallbacks(ISourceElementRequestor requestor)
|
||||
|
@ -152,7 +159,14 @@ public class ASTMethod extends ASTFunction implements IASTMethod
|
|||
*/
|
||||
public void enterScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.enterMethodBody(this);
|
||||
try
|
||||
{
|
||||
requestor.enterMethodBody(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
methodCallbacks( requestor );
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
|
@ -160,7 +174,14 @@ public class ASTMethod extends ASTFunction implements IASTMethod
|
|||
*/
|
||||
public void exitScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.exitMethodBody( this );
|
||||
try
|
||||
{
|
||||
requestor.exitMethodBody( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTMethod#getConstructorChainInitializers()
|
||||
|
|
|
@ -45,7 +45,14 @@ public class ASTMethodReference
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptMethodReference( this );
|
||||
try
|
||||
{
|
||||
requestor.acceptMethodReference( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
|
|
|
@ -36,7 +36,7 @@ public class ASTNamespaceAlias extends ASTSymbol implements IASTNamespaceAlias
|
|||
* @param nameOffset
|
||||
* @param endOffset
|
||||
*/
|
||||
public ASTNamespaceAlias(ISymbol s, String alias, IASTNamespaceDefinition namespaceDefinition, int startingOffset, int nameOffset, int endOffset, List references)
|
||||
public ASTNamespaceAlias(ISymbol s, String alias, IASTNamespaceDefinition namespaceDefinition, int startingOffset, int nameOffset, int nameEndOffset, int endOffset, List references)
|
||||
{
|
||||
super( s );
|
||||
this.alias = alias;
|
||||
|
@ -44,6 +44,7 @@ public class ASTNamespaceAlias extends ASTSymbol implements IASTNamespaceAlias
|
|||
setStartingOffset(startingOffset);
|
||||
setEndingOffset(endOffset);
|
||||
setNameOffset(nameOffset);
|
||||
setNameEndOffset(nameEndOffset);
|
||||
store = new ASTReferenceStore( references);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
|
@ -131,4 +132,19 @@ public class ASTNamespaceAlias extends ASTSymbol implements IASTNamespaceAlias
|
|||
{
|
||||
return offsets.getEndingOffset();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return offsets.getNameEndOffset();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,11 +33,12 @@ public class ASTNamespaceDefinition
|
|||
* @param startingOffset
|
||||
* @param nameOffset
|
||||
*/
|
||||
public ASTNamespaceDefinition(ISymbol namespaceSymbol, int startingOffset, int nameOffset)
|
||||
public ASTNamespaceDefinition(ISymbol namespaceSymbol, int startingOffset, int nameOffset, int nameEndOffset )
|
||||
{
|
||||
super( namespaceSymbol );
|
||||
setStartingOffset( startingOffset );
|
||||
setNameOffset( nameOffset );
|
||||
setNameEndOffset( nameEndOffset );
|
||||
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), namespaceSymbol.getName() );
|
||||
}
|
||||
|
||||
|
@ -109,7 +110,14 @@ public class ASTNamespaceDefinition
|
|||
*/
|
||||
public void enterScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.enterNamespaceDefinition( this );
|
||||
try
|
||||
{
|
||||
requestor.enterNamespaceDefinition( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -118,7 +126,14 @@ public class ASTNamespaceDefinition
|
|||
*/
|
||||
public void exitScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.exitNamespaceDefinition( this );
|
||||
try
|
||||
{
|
||||
requestor.exitNamespaceDefinition( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -128,4 +143,19 @@ public class ASTNamespaceDefinition
|
|||
{
|
||||
return qualifiedName.getFullyQualifiedName();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return namedOffsets.getNameEndOffset();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
{
|
||||
namedOffsets.setNameEndOffset(o);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,14 @@ public class ASTNamespaceReference
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptNamespaceReference( this );
|
||||
try
|
||||
{
|
||||
requestor.acceptNamespaceReference( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
|
|
|
@ -40,7 +40,7 @@ public class ASTParameterDeclaration extends ASTSymbol implements IASTParameterD
|
|||
* @param parameterName
|
||||
* @param initializerClause
|
||||
*/
|
||||
public ASTParameterDeclaration(ISymbol symbol, boolean isConst, boolean isVolatile, IASTTypeSpecifier typeSpecifier, List pointerOperators, List arrayModifiers, List parameters, ASTPointerOperator pointerOp, String parameterName, IASTInitializerClause initializerClause, int startingOffset, int endingOffset, int nameOffset)
|
||||
public ASTParameterDeclaration(ISymbol symbol, boolean isConst, boolean isVolatile, IASTTypeSpecifier typeSpecifier, List pointerOperators, List arrayModifiers, List parameters, ASTPointerOperator pointerOp, String parameterName, IASTInitializerClause initializerClause, int startingOffset, int endingOffset, int nameOffset, int nameEndOffset )
|
||||
{
|
||||
super( symbol );
|
||||
abstractDeclaration = new ASTAbstractDeclaration( isConst, isVolatile, typeSpecifier, pointerOperators, arrayModifiers, parameters, pointerOp );
|
||||
|
@ -49,6 +49,7 @@ public class ASTParameterDeclaration extends ASTSymbol implements IASTParameterD
|
|||
setStartingOffset(startingOffset);
|
||||
setEndingOffset(endingOffset);
|
||||
setNameOffset(nameOffset);
|
||||
setNameEndOffset( nameEndOffset );
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTParameterDeclaration#getName()
|
||||
|
@ -177,5 +178,20 @@ public class ASTParameterDeclaration extends ASTSymbol implements IASTParameterD
|
|||
{
|
||||
return offsets.getEndingOffset();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return offsets.getNameEndOffset();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -46,7 +46,14 @@ public class ASTParameterReference extends ASTReference implements IASTParameter
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptParameterReference( this );
|
||||
try
|
||||
{
|
||||
requestor.acceptParameterReference( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
|
|
|
@ -38,7 +38,7 @@ public class ASTTypedef extends ASTSymbol implements IASTTypedefDeclaration
|
|||
* @param nameOffset
|
||||
* @param references
|
||||
*/
|
||||
public ASTTypedef(ISymbol newSymbol, IASTAbstractDeclaration mapping, int startingOffset, int nameOffset, List references)
|
||||
public ASTTypedef(ISymbol newSymbol, IASTAbstractDeclaration mapping, int startingOffset, int nameOffset, int nameEndOffset, List references)
|
||||
{
|
||||
super( newSymbol );
|
||||
this.mapping = mapping;
|
||||
|
@ -46,6 +46,7 @@ public class ASTTypedef extends ASTSymbol implements IASTTypedefDeclaration
|
|||
this.qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), newSymbol.getName());
|
||||
setStartingOffset(startingOffset);
|
||||
setNameOffset(nameOffset);
|
||||
setNameEndOffset( nameEndOffset );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -69,7 +70,14 @@ public class ASTTypedef extends ASTSymbol implements IASTTypedefDeclaration
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptTypedefDeclaration(this);
|
||||
try
|
||||
{
|
||||
requestor.acceptTypedefDeclaration(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
referenceStore.processReferences(requestor);
|
||||
getAbstractDeclarator().acceptElement( requestor );
|
||||
}
|
||||
|
@ -143,5 +151,20 @@ public class ASTTypedef extends ASTSymbol implements IASTTypedefDeclaration
|
|||
{
|
||||
return qualifiedName.getFullyQualifiedName();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return offsets.getNameEndOffset();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -45,7 +45,14 @@ public class ASTTypedefReference
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptTypedefReference(this);
|
||||
try
|
||||
{
|
||||
requestor.acceptTypedefReference(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
|
|
|
@ -98,7 +98,14 @@ public class ASTUsingDeclaration implements IASTUsingDeclaration
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptUsingDeclaration( this );
|
||||
try
|
||||
{
|
||||
requestor.acceptUsingDeclaration( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
delegate.processReferences(requestor);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -91,7 +91,14 @@ public class ASTUsingDirective extends ASTAnonymousDeclaration implements IASTUs
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptUsingDirective( this );
|
||||
try
|
||||
{
|
||||
requestor.acceptUsingDirective( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
referenceDelegate.processReferences(requestor);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -46,7 +46,7 @@ public class ASTVariable extends ASTSymbol implements IASTVariable
|
|||
* @param nameOffset
|
||||
* @param references
|
||||
*/
|
||||
public ASTVariable(ISymbol newSymbol, IASTAbstractDeclaration abstractDeclaration, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, int startingOffset, int nameOffset, List references, IASTExpression constructorExpression, boolean previouslyDeclared )
|
||||
public ASTVariable(ISymbol newSymbol, IASTAbstractDeclaration abstractDeclaration, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, int startingOffset, int nameOffset, int nameEndOffset, List references, IASTExpression constructorExpression, boolean previouslyDeclared )
|
||||
{
|
||||
super( newSymbol );
|
||||
this.abstractDeclaration = abstractDeclaration;
|
||||
|
@ -55,6 +55,7 @@ public class ASTVariable extends ASTSymbol implements IASTVariable
|
|||
this.constructorExpression = constructorExpression;
|
||||
setStartingOffset( startingOffset );
|
||||
setNameOffset( nameOffset );
|
||||
setNameEndOffset(nameEndOffset);
|
||||
referenceDelegate = new ASTReferenceStore( references );
|
||||
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), newSymbol.getName() );
|
||||
this.previouslyDeclared =previouslyDeclared;
|
||||
|
@ -162,7 +163,14 @@ public class ASTVariable extends ASTSymbol implements IASTVariable
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptVariable(this);
|
||||
try
|
||||
{
|
||||
requestor.acceptVariable(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
referenceDelegate.processReferences(requestor);
|
||||
if( initializerClause != null )
|
||||
initializerClause.acceptElement(requestor);
|
||||
|
@ -205,6 +213,7 @@ public class ASTVariable extends ASTSymbol implements IASTVariable
|
|||
{
|
||||
return offsets.getStartingOffset();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingOffset()
|
||||
*/
|
||||
|
@ -212,6 +221,20 @@ public class ASTVariable extends ASTSymbol implements IASTVariable
|
|||
{
|
||||
return offsets.getEndingOffset();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return offsets.getNameEndOffset();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTVariable#getConstructorExpression()
|
||||
*/
|
||||
|
|
|
@ -48,7 +48,14 @@ public class ASTVariableReference
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptVariableReference( this );
|
||||
try
|
||||
{
|
||||
requestor.acceptVariableReference( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
|
|
|
@ -368,7 +368,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
IASTScope scope,
|
||||
String identifier,
|
||||
int startingOffset,
|
||||
int nameOffset) throws ASTSemanticException
|
||||
int nameOffset, int nameEndOffset) throws ASTSemanticException
|
||||
{
|
||||
|
||||
IContainerSymbol pstScope = scopeToSymbol(scope);
|
||||
|
@ -411,7 +411,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
}
|
||||
}
|
||||
|
||||
ASTNamespaceDefinition namespaceDef = new ASTNamespaceDefinition( namespaceSymbol, startingOffset, nameOffset );
|
||||
ASTNamespaceDefinition namespaceDef = new ASTNamespaceDefinition( namespaceSymbol, startingOffset, nameOffset, nameEndOffset );
|
||||
try
|
||||
{
|
||||
attachSymbolExtension( namespaceSymbol, namespaceDef );
|
||||
|
@ -490,7 +490,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
ClassNameType type,
|
||||
ASTAccessVisibility access,
|
||||
int startingOffset,
|
||||
int nameOffset) throws ASTSemanticException
|
||||
int nameOffset, int nameEndOffset) throws ASTSemanticException
|
||||
{
|
||||
IContainerSymbol currentScopeSymbol = scopeToSymbol(scope);
|
||||
TypeInfo.eType pstType = classKindToTypeInfo(kind);
|
||||
|
@ -544,7 +544,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
throw new ASTSemanticException();
|
||||
}
|
||||
|
||||
ASTClassSpecifier classSpecifier = new ASTClassSpecifier( newSymbol, kind, type, access, startingOffset, nameOffset, references );
|
||||
ASTClassSpecifier classSpecifier = new ASTClassSpecifier( newSymbol, kind, type, access, startingOffset, nameOffset, nameEndOffset, references );
|
||||
try
|
||||
{
|
||||
attachSymbolExtension(newSymbol, classSpecifier );
|
||||
|
@ -691,7 +691,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
IASTScope scope,
|
||||
String name,
|
||||
int startingOffset,
|
||||
int nameOffset) throws ASTSemanticException
|
||||
int nameOffset, int nameEndOffset) throws ASTSemanticException
|
||||
{
|
||||
IContainerSymbol containerSymbol = scopeToSymbol(scope);
|
||||
TypeInfo.eType pstType = TypeInfo.t_enumeration;
|
||||
|
@ -706,7 +706,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
throw new ASTSemanticException();
|
||||
}
|
||||
|
||||
ASTEnumerationSpecifier enumSpecifier = new ASTEnumerationSpecifier( classSymbol, startingOffset, nameOffset );
|
||||
ASTEnumerationSpecifier enumSpecifier = new ASTEnumerationSpecifier( classSymbol, startingOffset, nameOffset, nameEndOffset );
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -725,8 +725,8 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
IASTEnumerationSpecifier enumeration,
|
||||
String string,
|
||||
int startingOffset,
|
||||
int endingOffset,
|
||||
IASTExpression initialValue) throws ASTSemanticException
|
||||
int nameOffset,
|
||||
int nameEndOffset, int endingOffset, IASTExpression initialValue) throws ASTSemanticException
|
||||
{
|
||||
IContainerSymbol enumerationSymbol = (IContainerSymbol)((ISymbolOwner)enumeration).getSymbol();
|
||||
|
||||
|
@ -739,7 +739,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
{
|
||||
throw new ASTSemanticException();
|
||||
}
|
||||
ASTEnumerator enumerator = new ASTEnumerator( enumeratorSymbol, enumeration, startingOffset, endingOffset, initialValue );
|
||||
ASTEnumerator enumerator = new ASTEnumerator( enumeratorSymbol, enumeration, startingOffset, nameOffset, nameEndOffset, endingOffset, initialValue );
|
||||
((ASTEnumerationSpecifier)enumeration).addEnumerator( enumerator );
|
||||
try
|
||||
{
|
||||
|
@ -1413,7 +1413,6 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
public IASTFunction createFunction(
|
||||
IASTScope scope,
|
||||
String name,
|
||||
int nameEndOffset,
|
||||
List parameters,
|
||||
IASTAbstractDeclaration returnType,
|
||||
IASTExceptionSpecification exception,
|
||||
|
@ -1422,6 +1421,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
boolean isStatic,
|
||||
int startOffset,
|
||||
int nameOffset,
|
||||
int nameEndOffset,
|
||||
IASTTemplate ownerTemplate,
|
||||
boolean isConst,
|
||||
boolean isVolatile,
|
||||
|
@ -1718,7 +1718,6 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
public IASTMethod createMethod(
|
||||
IASTScope scope,
|
||||
String name,
|
||||
int nameEndOffset,
|
||||
List parameters,
|
||||
IASTAbstractDeclaration returnType,
|
||||
IASTExceptionSpecification exception,
|
||||
|
@ -1727,6 +1726,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
boolean isStatic,
|
||||
int startOffset,
|
||||
int nameOffset,
|
||||
int nameEndOffset,
|
||||
IASTTemplate ownerTemplate,
|
||||
boolean isConst,
|
||||
boolean isVolatile,
|
||||
|
@ -1881,7 +1881,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
boolean isRegister,
|
||||
boolean isStatic,
|
||||
int startingOffset,
|
||||
int nameOffset, IASTExpression constructorExpression) throws ASTSemanticException
|
||||
int nameOffset, int nameEndOffset, IASTExpression constructorExpression) throws ASTSemanticException
|
||||
{
|
||||
List references = new ArrayList();
|
||||
IContainerSymbol ownerScope = scopeToSymbol( scope );
|
||||
|
@ -1933,7 +1933,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
){
|
||||
IASTScope fieldParentScope = (IASTScope)parentScope.getASTExtension().getPrimaryDeclaration();
|
||||
return createField(fieldParentScope, fieldName,isAuto, initializerClause, bitfieldExpression, abstractDeclaration, isMutable, isExtern,
|
||||
isRegister, isStatic, startingOffset, offset, constructorExpression, ASTAccessVisibility.PRIVATE, references);
|
||||
isRegister, isStatic, startingOffset, offset, nameEndOffset, constructorExpression, ASTAccessVisibility.PRIVATE, references);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1968,7 +1968,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
// TODO Auto-generated catch block
|
||||
}
|
||||
|
||||
ASTVariable variable = new ASTVariable( newSymbol, abstractDeclaration, initializerClause, bitfieldExpression, startingOffset, nameOffset, references, constructorExpression, previouslyDeclared );
|
||||
ASTVariable variable = new ASTVariable( newSymbol, abstractDeclaration, initializerClause, bitfieldExpression, startingOffset, nameOffset, nameEndOffset, references, constructorExpression, previouslyDeclared );
|
||||
try
|
||||
{
|
||||
attachSymbolExtension(newSymbol, variable );
|
||||
|
@ -2041,10 +2041,10 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
boolean isStatic,
|
||||
int startingOffset,
|
||||
int nameOffset,
|
||||
IASTExpression constructorExpression, ASTAccessVisibility visibility) throws ASTSemanticException
|
||||
int nameEndOffset, IASTExpression constructorExpression, ASTAccessVisibility visibility) throws ASTSemanticException
|
||||
{
|
||||
return createField(scope, name,isAuto, initializerClause, bitfieldExpression, abstractDeclaration, isMutable, isExtern,
|
||||
isRegister, isStatic, startingOffset, nameOffset, constructorExpression, visibility, null);
|
||||
isRegister, isStatic, startingOffset, nameOffset, nameEndOffset, constructorExpression, visibility, null);
|
||||
}
|
||||
|
||||
public IASTField createField(
|
||||
|
@ -2060,6 +2060,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
boolean isStatic,
|
||||
int startingOffset,
|
||||
int nameOffset,
|
||||
int nameEndOffset,
|
||||
IASTExpression constructorExpression,
|
||||
ASTAccessVisibility visibility,
|
||||
List references) throws ASTSemanticException
|
||||
|
@ -2104,7 +2105,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
throw new ASTSemanticException();
|
||||
}
|
||||
|
||||
ASTField field = new ASTField( newSymbol, abstractDeclaration, initializerClause, bitfieldExpression, startingOffset, nameOffset, references, previouslyDeclared, constructorExpression, visibility );
|
||||
ASTField field = new ASTField( newSymbol, abstractDeclaration, initializerClause, bitfieldExpression, startingOffset, nameOffset, nameEndOffset, references, previouslyDeclared, constructorExpression, visibility );
|
||||
try
|
||||
{
|
||||
attachSymbolExtension(newSymbol, field );
|
||||
|
@ -2171,7 +2172,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
String name,
|
||||
IASTAbstractDeclaration mapping,
|
||||
int startingOffset,
|
||||
int nameOffset) throws ASTSemanticException
|
||||
int nameOffset, int nameEndOffset) throws ASTSemanticException
|
||||
{
|
||||
IContainerSymbol containerSymbol = scopeToSymbol(scope);
|
||||
ISymbol newSymbol = pst.newSymbol( name, TypeInfo.t_type);
|
||||
|
@ -2192,7 +2193,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
{
|
||||
throw new ASTSemanticException();
|
||||
}
|
||||
ASTTypedef d = new ASTTypedef( newSymbol, mapping, startingOffset, nameOffset, references );
|
||||
ASTTypedef d = new ASTTypedef( newSymbol, mapping, startingOffset, nameOffset, nameEndOffset, references );
|
||||
try
|
||||
{
|
||||
attachSymbolExtension(newSymbol, d );
|
||||
|
@ -2260,7 +2261,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
}
|
||||
|
||||
ASTElaboratedTypeSpecifier elab =
|
||||
new ASTElaboratedTypeSpecifier( checkSymbol, kind, startingOffset, name.getFirstToken().getOffset(), endOffset, references, isForewardDecl );
|
||||
new ASTElaboratedTypeSpecifier( checkSymbol, kind, startingOffset, name.getFirstToken().getOffset(), name.getLastToken().getEndOffset(), endOffset, references, isForewardDecl );
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -2279,7 +2280,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
checkSymbol.getASTExtension().getPrimaryDeclaration() instanceof IASTEnumerationSpecifier
|
||||
)
|
||||
{
|
||||
ASTElaboratedTypeSpecifier elab = new ASTElaboratedTypeSpecifier( checkSymbol, kind, startingOffset, name.getFirstToken().getOffset(), endOffset, references, isForewardDecl );
|
||||
ASTElaboratedTypeSpecifier elab = new ASTElaboratedTypeSpecifier( checkSymbol, kind, startingOffset, name.getFirstToken().getOffset(), name.getLastToken().getEndOffset(), endOffset, references, isForewardDecl );
|
||||
try
|
||||
{
|
||||
attachSymbolExtension( checkSymbol, elab );
|
||||
|
@ -2304,7 +2305,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createNamespaceAlias(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, org.eclipse.cdt.core.parser.ITokenDuple, int, int, int)
|
||||
*/
|
||||
public IASTNamespaceAlias createNamespaceAlias(IASTScope scope, String identifier, ITokenDuple alias, int startingOffset, int nameOffset, int endOffset) throws ASTSemanticException
|
||||
public IASTNamespaceAlias createNamespaceAlias(IASTScope scope, String identifier, ITokenDuple alias, int startingOffset, int nameOffset, int nameEndOffset, int endOffset) throws ASTSemanticException
|
||||
{
|
||||
IContainerSymbol startingSymbol = scopeToSymbol(scope);
|
||||
List references = new ArrayList();
|
||||
|
@ -2328,7 +2329,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
|
||||
ASTNamespaceAlias astAlias = new ASTNamespaceAlias(
|
||||
newSymbol, alias.toString(), (IASTNamespaceDefinition)namespaceSymbol.getASTExtension().getPrimaryDeclaration(),
|
||||
startingOffset, nameOffset, endOffset, references );
|
||||
startingOffset, nameOffset, nameEndOffset, endOffset, references );
|
||||
try
|
||||
{
|
||||
attachSymbolExtension( newSymbol, astAlias );
|
||||
|
@ -2380,9 +2381,9 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
return false;
|
||||
}
|
||||
|
||||
public IASTParameterDeclaration createParameterDeclaration(boolean isConst, boolean isVolatile, IASTTypeSpecifier typeSpecifier, List pointerOperators, List arrayModifiers, List parameters, ASTPointerOperator pointerOp, String parameterName, IASTInitializerClause initializerClause, int startingOffset, int endingOffset, int nameOffset)
|
||||
public IASTParameterDeclaration createParameterDeclaration(boolean isConst, boolean isVolatile, IASTTypeSpecifier typeSpecifier, List pointerOperators, List arrayModifiers, List parameters, ASTPointerOperator pointerOp, String parameterName, IASTInitializerClause initializerClause, int startingOffset, int nameOffset, int nameEndOffset, int endingOffset)
|
||||
{
|
||||
return new ASTParameterDeclaration( null, isConst, isVolatile, typeSpecifier, pointerOperators, arrayModifiers, parameters, pointerOp, parameterName, initializerClause, startingOffset, endingOffset, nameOffset );
|
||||
return new ASTParameterDeclaration( null, isConst, isVolatile, typeSpecifier, pointerOperators, arrayModifiers, parameters, pointerOp, parameterName, initializerClause, startingOffset, endingOffset, nameOffset, nameEndOffset );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -73,7 +73,14 @@ public class ASTASMDefinition
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptASMDefinition(this);
|
||||
try
|
||||
{
|
||||
requestor.acceptASMDefinition(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -91,7 +91,14 @@ public class ASTAbstractTypeSpecifierDeclaration
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptAbstractTypeSpecDeclaration(this);
|
||||
try
|
||||
{
|
||||
requestor.acceptAbstractTypeSpecDeclaration(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -34,6 +34,9 @@ public class ASTClassSpecifier extends ASTScopedTypeSpecifier implements IASTQCl
|
|||
String name,
|
||||
ASTClassKind kind,
|
||||
ClassNameType type,
|
||||
int startingOffset,
|
||||
int nameOffset,
|
||||
int nameEndOffset,
|
||||
ASTAccessVisibility access)
|
||||
{
|
||||
super( scope, name );
|
||||
|
@ -41,6 +44,9 @@ public class ASTClassSpecifier extends ASTScopedTypeSpecifier implements IASTQCl
|
|||
qualifiedNameElement = new ASTQualifiedNamedElement( scope, name );
|
||||
classNameType = type;
|
||||
classKind = kind;
|
||||
offsets.setStartingOffset(startingOffset);
|
||||
offsets.setNameOffset(nameOffset);
|
||||
offsets.setNameEndOffset(nameEndOffset);
|
||||
this.access = access;
|
||||
this.name = name;
|
||||
}
|
||||
|
@ -171,14 +177,42 @@ public class ASTClassSpecifier extends ASTScopedTypeSpecifier implements IASTQCl
|
|||
*/
|
||||
public void enterScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.enterClassSpecifier(this);
|
||||
try
|
||||
{
|
||||
requestor.enterClassSpecifier(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#exit(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
*/
|
||||
public void exitScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.exitClassSpecifier(this);
|
||||
try
|
||||
{
|
||||
requestor.exitClassSpecifier(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return offsets.getNameEndOffset();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,14 @@ public class ASTCompilationUnit implements IASTCompilationUnit, IASTQScope {
|
|||
*/
|
||||
public void enterScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.enterCompilationUnit(this);
|
||||
try
|
||||
{
|
||||
requestor.enterCompilationUnit(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
|
@ -57,7 +64,14 @@ public class ASTCompilationUnit implements IASTCompilationUnit, IASTQScope {
|
|||
*/
|
||||
public void exitScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.exitCompilationUnit(this);
|
||||
try
|
||||
{
|
||||
requestor.exitCompilationUnit(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -35,12 +35,13 @@ public class ASTElaboratedTypeSpecifier implements IASTElaboratedTypeSpecifier
|
|||
* @param startingOffset
|
||||
* @param endOffset
|
||||
*/
|
||||
public ASTElaboratedTypeSpecifier(IASTScope scope, ASTClassKind elaboratedClassKind, String typeName, int startingOffset, int nameOffset, int endOffset)
|
||||
public ASTElaboratedTypeSpecifier(IASTScope scope, ASTClassKind elaboratedClassKind, String typeName, int startingOffset, int nameOffset, int nameEndOffset, int endOffset)
|
||||
{
|
||||
classKind = elaboratedClassKind;
|
||||
this.typeName = typeName;
|
||||
setStartingOffset( startingOffset );
|
||||
setNameOffset( nameOffset );
|
||||
setNameEndOffset( nameEndOffset );
|
||||
setEndingOffset( endOffset );
|
||||
qualifiedName = new ASTQualifiedNamedElement( scope, typeName );
|
||||
}
|
||||
|
@ -106,7 +107,14 @@ public class ASTElaboratedTypeSpecifier implements IASTElaboratedTypeSpecifier
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptElaboratedForewardDeclaration(this);
|
||||
try
|
||||
{
|
||||
requestor.acceptElaboratedForewardDeclaration(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
|
@ -132,4 +140,19 @@ public class ASTElaboratedTypeSpecifier implements IASTElaboratedTypeSpecifier
|
|||
public void setNameOffset(int o) {
|
||||
offsets.setNameOffset(o);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return offsets.getNameEndOffset();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,12 +36,13 @@ public class ASTEnumerationSpecifier extends ASTScopedTypeSpecifier
|
|||
* @param name
|
||||
* @param startingOffset
|
||||
*/
|
||||
public ASTEnumerationSpecifier(IASTScope scope, String name, int startingOffset, int nameOffset)
|
||||
public ASTEnumerationSpecifier(IASTScope scope, String name, int startingOffset, int nameOffset, int nameEndOffset )
|
||||
{
|
||||
super( scope, name );
|
||||
this.name = name;
|
||||
offsets.setNameOffset( nameOffset );
|
||||
offsets.setStartingOffset( startingOffset);
|
||||
setNameEndOffset(nameEndOffset);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getName()
|
||||
|
@ -111,7 +112,14 @@ public class ASTEnumerationSpecifier extends ASTScopedTypeSpecifier
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptEnumerationSpecifier(this);
|
||||
try
|
||||
{
|
||||
requestor.acceptEnumerationSpecifier(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enter(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
|
@ -125,4 +133,19 @@ public class ASTEnumerationSpecifier extends ASTScopedTypeSpecifier
|
|||
public void exitScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return offsets.getNameEndOffset();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,12 +35,13 @@ public class ASTEnumerator
|
|||
* @param startingOffset
|
||||
* @param endingOffset
|
||||
*/
|
||||
public ASTEnumerator(IASTEnumerationSpecifier enumeration, String string, int startingOffset, int endingOffset, IASTExpression initialValue)
|
||||
public ASTEnumerator(IASTEnumerationSpecifier enumeration, String string, int startingOffset, int nameOffset, int nameEndOffset, int endingOffset, IASTExpression initialValue)
|
||||
{
|
||||
this.enumeration = enumeration;
|
||||
name = string;
|
||||
offsets.setStartingOffset( startingOffset );
|
||||
offsets.setNameOffset( startingOffset );
|
||||
offsets.setNameOffset( nameOffset );
|
||||
offsets.setNameEndOffset( nameEndOffset );
|
||||
offsets.setEndingOffset( endingOffset );
|
||||
this.initialValue = initialValue;
|
||||
}
|
||||
|
@ -125,4 +126,20 @@ public class ASTEnumerator
|
|||
public void exitScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return offsets.getNameEndOffset();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ public class ASTField extends ASTVariable implements IASTField
|
|||
* @param isRegister
|
||||
* @param isStatic
|
||||
*/
|
||||
public ASTField(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, IASTExpression constructorExpression, ASTAccessVisibility visibility)
|
||||
public ASTField(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, int nameEndOffset, IASTExpression constructorExpression, ASTAccessVisibility visibility)
|
||||
{
|
||||
super(
|
||||
scope,
|
||||
|
@ -50,7 +50,7 @@ public class ASTField extends ASTVariable implements IASTField
|
|||
isMutable,
|
||||
isExtern,
|
||||
isRegister,
|
||||
isStatic, startingOffset, nameOffset, constructorExpression );
|
||||
isStatic, startingOffset, nameOffset, nameEndOffset, constructorExpression );
|
||||
this.visibility = visibility;
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,14 @@ public class ASTField extends ASTVariable implements IASTField
|
|||
|
||||
public void acceptElement( ISourceElementRequestor requestor )
|
||||
{
|
||||
requestor.acceptField( this );
|
||||
try
|
||||
{
|
||||
requestor.acceptField( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
public void enterScope( ISourceElementRequestor requestor )
|
||||
|
|
|
@ -51,10 +51,10 @@ public class ASTFunction extends ASTDeclaration implements IASTFunction
|
|||
offsets.setStartingOffset( startOffset );
|
||||
offsets.setNameOffset( nameOffset );
|
||||
qualifiedName = new ASTQualifiedNamedElement( scope, name );
|
||||
this.nameEndOffset = nameEndOffset;
|
||||
setNameEndOffset(nameEndOffset);
|
||||
}
|
||||
|
||||
private final int nameEndOffset;
|
||||
private boolean previouslyDeclared;
|
||||
private boolean hasFunctionBody = false;
|
||||
private final IASTQualifiedNameElement qualifiedName;
|
||||
private final IASTTemplate ownerTemplateDeclaration;
|
||||
|
@ -184,14 +184,28 @@ public class ASTFunction extends ASTDeclaration implements IASTFunction
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptFunctionDeclaration(this);
|
||||
try
|
||||
{
|
||||
requestor.acceptFunctionDeclaration(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enter(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
*/
|
||||
public void enterScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.enterFunctionBody( this );
|
||||
try
|
||||
{
|
||||
requestor.enterFunctionBody( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
|
@ -199,7 +213,14 @@ public class ASTFunction extends ASTDeclaration implements IASTFunction
|
|||
*/
|
||||
public void exitScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.exitFunctionBody( this );
|
||||
try
|
||||
{
|
||||
requestor.exitFunctionBody( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFunction#setHasFunctionBody(boolean)
|
||||
|
@ -225,14 +246,19 @@ public class ASTFunction extends ASTDeclaration implements IASTFunction
|
|||
*/
|
||||
public boolean previouslyDeclared()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
return previouslyDeclared;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFunction#getNameEndOffset()
|
||||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return nameEndOffset;
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return offsets.getNameEndOffset();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
}}
|
||||
|
|
|
@ -101,7 +101,14 @@ public class ASTLinkageSpecification
|
|||
*/
|
||||
public void enterScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.enterLinkageSpecification(this);
|
||||
try
|
||||
{
|
||||
requestor.enterLinkageSpecification(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -109,7 +116,14 @@ public class ASTLinkageSpecification
|
|||
*/
|
||||
public void exitScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.exitLinkageSpecification(this);
|
||||
try
|
||||
{
|
||||
requestor.exitLinkageSpecification(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -167,17 +167,38 @@ public class ASTMethod extends ASTFunction implements IASTMethod
|
|||
|
||||
public void acceptElement( ISourceElementRequestor requestor )
|
||||
{
|
||||
requestor.acceptMethodDeclaration( this );
|
||||
try
|
||||
{
|
||||
requestor.acceptMethodDeclaration( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
public void enterScope( ISourceElementRequestor requestor )
|
||||
{
|
||||
requestor.enterMethodBody(this);
|
||||
try
|
||||
{
|
||||
requestor.enterMethodBody(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
public void exitScope( ISourceElementRequestor requestor )
|
||||
{
|
||||
requestor.exitMethodBody(this);
|
||||
try
|
||||
{
|
||||
requestor.exitMethodBody(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTMethod#getConstructorChainInitializers()
|
||||
|
|
|
@ -35,11 +35,12 @@ public class ASTNamespaceAlias extends ASTDeclaration implements IASTNamespaceAl
|
|||
* @param nameOffset
|
||||
* @param endOffset
|
||||
*/
|
||||
public ASTNamespaceAlias(IASTScope scope, String identifier, String string, int startingOffset, int nameOffset, int endOffset)
|
||||
public ASTNamespaceAlias(IASTScope scope, String identifier, String string, int startingOffset, int nameOffset, int nameEndOffset, int endOffset)
|
||||
{
|
||||
super( scope );
|
||||
setStartingOffset(startingOffset);
|
||||
setNameOffset(nameOffset);
|
||||
setNameEndOffset( nameEndOffset );
|
||||
setEndingOffset(endOffset);
|
||||
this.identifier = identifier;
|
||||
this.alias = string;
|
||||
|
@ -129,4 +130,19 @@ public class ASTNamespaceAlias extends ASTDeclaration implements IASTNamespaceAl
|
|||
{
|
||||
return offsets.getEndingOffset();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return offsets.getNameEndOffset();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,11 +31,14 @@ public class ASTNamespaceDefinition extends ASTDeclaration implements IASTNamesp
|
|||
private NamedOffsets offsets = new NamedOffsets();
|
||||
private final ASTQualifiedNamedElement qualifiedNameElement;
|
||||
|
||||
public ASTNamespaceDefinition( IASTScope scope, String name )
|
||||
public ASTNamespaceDefinition( IASTScope scope, String name, int startOffset, int nameOffset, int nameEndOffset )
|
||||
{
|
||||
super( scope );
|
||||
qualifiedNameElement = new ASTQualifiedNamedElement( scope, name );
|
||||
this.name = name;
|
||||
setStartingOffset(startOffset);
|
||||
setNameOffset(nameOffset);
|
||||
setNameEndOffset(nameEndOffset);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getName()
|
||||
|
@ -118,13 +121,42 @@ public class ASTNamespaceDefinition extends ASTDeclaration implements IASTNamesp
|
|||
*/
|
||||
public void enterScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.enterNamespaceDefinition(this);
|
||||
try
|
||||
{
|
||||
requestor.enterNamespaceDefinition(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#exit(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
*/
|
||||
public void exitScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.exitNamespaceDefinition(this);
|
||||
try
|
||||
{
|
||||
requestor.exitNamespaceDefinition(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return offsets.getNameEndOffset();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ public class ASTParameterDeclaration extends ASTAbstractDeclaration implements I
|
|||
* @param parameterName
|
||||
* @param initializerClause
|
||||
*/
|
||||
public ASTParameterDeclaration(boolean isConst, boolean isVolatile, IASTTypeSpecifier typeSpecifier, List pointerOperators, List arrayModifiers, List parameters, ASTPointerOperator pointerOp, String parameterName, IASTInitializerClause initializerClause, int startingOffset, int endingOffset, int nameOffset)
|
||||
public ASTParameterDeclaration(boolean isConst, boolean isVolatile, IASTTypeSpecifier typeSpecifier, List pointerOperators, List arrayModifiers, List parameters, ASTPointerOperator pointerOp, String parameterName, IASTInitializerClause initializerClause, int startingOffset, int endingOffset, int nameOffset, int nameEndOffset )
|
||||
{
|
||||
super( isConst, isVolatile, typeSpecifier, pointerOperators, arrayModifiers, parameters, pointerOp );
|
||||
this.parameterName = parameterName;
|
||||
|
@ -44,6 +44,7 @@ public class ASTParameterDeclaration extends ASTAbstractDeclaration implements I
|
|||
setStartingOffset( startingOffset );
|
||||
setEndingOffset( endingOffset );
|
||||
setNameOffset( nameOffset );
|
||||
setNameEndOffset(nameEndOffset);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTParameterDeclaration#getName()
|
||||
|
@ -102,4 +103,19 @@ public class ASTParameterDeclaration extends ASTAbstractDeclaration implements I
|
|||
{
|
||||
return offsets.getEndingOffset();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return offsets.getNameEndOffset();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,7 +112,14 @@ public class ASTTemplateDeclaration extends ASTDeclaration implements IASTTempla
|
|||
*/
|
||||
public void enterScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.enterTemplateDeclaration(this);
|
||||
try
|
||||
{
|
||||
requestor.enterTemplateDeclaration(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -120,6 +127,13 @@ public class ASTTemplateDeclaration extends ASTDeclaration implements IASTTempla
|
|||
*/
|
||||
public void exitScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.exitTemplateDeclaration(this);
|
||||
try
|
||||
{
|
||||
requestor.exitTemplateDeclaration(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,7 +94,14 @@ public class ASTTemplateInstantiation extends ASTDeclaration implements IASTTemp
|
|||
*/
|
||||
public void enterScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.enterTemplateInstantiation(this);
|
||||
try
|
||||
{
|
||||
requestor.enterTemplateInstantiation(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -103,6 +110,13 @@ public class ASTTemplateInstantiation extends ASTDeclaration implements IASTTemp
|
|||
*/
|
||||
public void exitScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.exitTemplateExplicitInstantiation(this);
|
||||
try
|
||||
{
|
||||
requestor.exitTemplateExplicitInstantiation(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,7 +89,14 @@ public class ASTTemplateSpecialization extends ASTDeclaration implements IASTTem
|
|||
*/
|
||||
public void enterScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.enterTemplateSpecialization(this);
|
||||
try
|
||||
{
|
||||
requestor.enterTemplateSpecialization(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -97,6 +104,13 @@ public class ASTTemplateSpecialization extends ASTDeclaration implements IASTTem
|
|||
*/
|
||||
public void exitScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.exitTemplateSpecialization(this);
|
||||
try
|
||||
{
|
||||
requestor.exitTemplateSpecialization(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,13 +32,14 @@ public class ASTTypedefDeclaration extends ASTDeclaration implements IASTTypedef
|
|||
* @param name
|
||||
* @param mapping
|
||||
*/
|
||||
public ASTTypedefDeclaration(IASTScope scope, String name, IASTAbstractDeclaration mapping, int startingOffset, int nameOffset)
|
||||
public ASTTypedefDeclaration(IASTScope scope, String name, IASTAbstractDeclaration mapping, int startingOffset, int nameOffset, int nameEndOffset )
|
||||
{
|
||||
super( scope );
|
||||
this.name = name;
|
||||
this.mapping = mapping;
|
||||
setStartingOffset(startingOffset);
|
||||
setNameOffset(nameOffset);
|
||||
setNameEndOffset(nameEndOffset);
|
||||
qualifiedName = new ASTQualifiedNamedElement( scope, name );
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
|
@ -110,7 +111,14 @@ public class ASTTypedefDeclaration extends ASTDeclaration implements IASTTypedef
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptTypedefDeclaration(this);
|
||||
try
|
||||
{
|
||||
requestor.acceptTypedefDeclaration(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enter(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
|
@ -124,5 +132,20 @@ public class ASTTypedefDeclaration extends ASTDeclaration implements IASTTypedef
|
|||
public void exitScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return offsets.getNameEndOffset();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -84,7 +84,14 @@ public class ASTUsingDeclaration
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptUsingDeclaration(this);
|
||||
try
|
||||
{
|
||||
requestor.acceptUsingDeclaration(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enter(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
|
|
|
@ -76,7 +76,14 @@ public class ASTUsingDirective
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptUsingDirective(this);
|
||||
try
|
||||
{
|
||||
requestor.acceptUsingDirective(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enter(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
|
|
|
@ -41,7 +41,7 @@ public class ASTVariable extends ASTDeclaration implements IASTVariable
|
|||
* @param scope
|
||||
*/
|
||||
public ASTVariable(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression,
|
||||
IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, IASTExpression constructorExpression )
|
||||
IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, int nameEndOffset, IASTExpression constructorExpression )
|
||||
{
|
||||
super(scope);
|
||||
this.isAuto = isAuto;
|
||||
|
@ -57,6 +57,7 @@ public class ASTVariable extends ASTDeclaration implements IASTVariable
|
|||
qualifiedName = new ASTQualifiedNamedElement( scope, name );
|
||||
setStartingOffset(startingOffset);
|
||||
setNameOffset(nameOffset);
|
||||
setNameEndOffset( nameEndOffset );
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTVariable#isAuto()
|
||||
|
@ -182,7 +183,14 @@ public class ASTVariable extends ASTDeclaration implements IASTVariable
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptVariable(this);
|
||||
try
|
||||
{
|
||||
requestor.acceptVariable(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enter(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
|
@ -203,6 +211,20 @@ public class ASTVariable extends ASTDeclaration implements IASTVariable
|
|||
{
|
||||
return constructorExpression;
|
||||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return offsets.getNameEndOffset();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -85,10 +85,8 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.parser.ast.IASTFactory#createNamespaceDefinition(int, java.lang.String, int)
|
||||
*/
|
||||
public IASTNamespaceDefinition createNamespaceDefinition(IASTScope scope, String identifier, int first, int nameOffset) {
|
||||
IASTNamespaceDefinition definition = new ASTNamespaceDefinition( scope, identifier );
|
||||
definition.setStartingOffset( first );
|
||||
definition.setNameOffset( nameOffset );
|
||||
public IASTNamespaceDefinition createNamespaceDefinition(IASTScope scope, String identifier, int first, int nameOffset, int nameEndOffset) {
|
||||
IASTNamespaceDefinition definition = new ASTNamespaceDefinition( scope, identifier, first, nameOffset, nameEndOffset );
|
||||
return definition;
|
||||
}
|
||||
|
||||
|
@ -116,11 +114,8 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createClassSpecifier(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, org.eclipse.cdt.core.parser.ast.ClassKind, org.eclipse.cdt.core.parser.ast.ClassNameType, org.eclipse.cdt.core.parser.ast.AccessVisibility, org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration)
|
||||
*/
|
||||
public IASTClassSpecifier createClassSpecifier(IASTScope scope, ITokenDuple name, ASTClassKind kind, ClassNameType type, ASTAccessVisibility access, int startingOffset, int nameOffset) throws ASTSemanticException {
|
||||
IASTClassSpecifier spec = new ASTClassSpecifier( scope, name == null ? "" : name.toString() , kind, type, access );
|
||||
spec.setStartingOffset( startingOffset );
|
||||
spec.setNameOffset( nameOffset );
|
||||
return spec;
|
||||
public IASTClassSpecifier createClassSpecifier(IASTScope scope, ITokenDuple name, ASTClassKind kind, ClassNameType type, ASTAccessVisibility access, int startingOffset, int nameOffset, int nameEndOffset ) throws ASTSemanticException {
|
||||
return new ASTClassSpecifier( scope, name == null ? "" : name.toString() , kind, type, startingOffset, nameOffset, nameEndOffset, access );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -134,17 +129,17 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createEnumerationSpecifier(java.lang.String, int)
|
||||
*/
|
||||
public IASTEnumerationSpecifier createEnumerationSpecifier(IASTScope scope, String name, int startingOffset, int nameOffset)
|
||||
public IASTEnumerationSpecifier createEnumerationSpecifier(IASTScope scope, String name, int startingOffset, int nameOffset, int nameEndOffset)
|
||||
{
|
||||
return new ASTEnumerationSpecifier( scope, name, startingOffset, nameOffset );
|
||||
return new ASTEnumerationSpecifier( scope, name, startingOffset, nameOffset, nameEndOffset );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#addEnumerator(org.eclipse.cdt.core.parser.ast.IASTEnumerationSpecifier, java.lang.String, int, int)
|
||||
*/
|
||||
public void addEnumerator(IASTEnumerationSpecifier enumeration, String string, int startingOffset, int endingOffset, IASTExpression initialValue)
|
||||
public void addEnumerator(IASTEnumerationSpecifier enumeration, String string, int startingOffset, int nameOffset, int nameEndOffset, int endingOffset, IASTExpression initialValue)
|
||||
{
|
||||
IASTEnumerator enumerator = new ASTEnumerator( enumeration, string, startingOffset, endingOffset, initialValue );
|
||||
IASTEnumerator enumerator = new ASTEnumerator( enumeration, string, startingOffset, nameOffset, nameEndOffset, endingOffset, initialValue );
|
||||
((ASTEnumerationSpecifier)enumeration).addEnumerator( enumerator );
|
||||
}
|
||||
|
||||
|
@ -189,7 +184,7 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createFunction(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, java.util.List, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration, org.eclipse.cdt.core.parser.ast.IASTExceptionSpecification, boolean, boolean, boolean, int, int, org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration)
|
||||
*/
|
||||
public IASTFunction createFunction(IASTScope scope, String name, int nameEndOffset, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, IASTTemplate ownerTemplate, boolean isConst, boolean isVolatile, boolean isVirtual, boolean isExplicit, boolean isPureVirtual, List constructorChain, boolean isFunctionDefinition )
|
||||
public IASTFunction createFunction(IASTScope scope, String name, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, int nameEndOffset, IASTTemplate ownerTemplate, boolean isConst, boolean isVolatile, boolean isVirtual, boolean isExplicit, boolean isPureVirtual, List constructorChain, boolean isFunctionDefinition )
|
||||
{
|
||||
return new ASTFunction(scope, name, nameEndOffset, parameters, returnType, exception, isInline, isFriend, isStatic, startOffset, nameOffset, ownerTemplate );
|
||||
}
|
||||
|
@ -197,7 +192,7 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createMethod(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, java.util.List, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration, org.eclipse.cdt.core.parser.ast.IASTExceptionSpecification, boolean, boolean, boolean, int, int, org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration, boolean, boolean, boolean, boolean, boolean, boolean, boolean, org.eclipse.cdt.core.parser.ast.ASTAccessVisibility)
|
||||
*/
|
||||
public IASTMethod createMethod(IASTScope scope, String name, int nameEndOffset, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, IASTTemplate ownerTemplate, boolean isConst, boolean isVolatile, boolean isVirtual, boolean isExplicit, boolean isPureVirtual, ASTAccessVisibility visibility, List constructorChain, boolean isFunctionDefinition )
|
||||
public IASTMethod createMethod(IASTScope scope, String name, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, int nameEndOffset, IASTTemplate ownerTemplate, boolean isConst, boolean isVolatile, boolean isVirtual, boolean isExplicit, boolean isPureVirtual, ASTAccessVisibility visibility, List constructorChain, boolean isFunctionDefinition )
|
||||
{
|
||||
return new ASTMethod(scope, name, nameEndOffset, parameters, returnType, exception, isInline, isFriend, isStatic, startOffset, nameOffset, ownerTemplate, isConst, isVolatile, false, false, isVirtual, isExplicit, isPureVirtual, visibility, constructorChain);
|
||||
}
|
||||
|
@ -205,17 +200,17 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createVariable(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, boolean, org.eclipse.cdt.core.parser.ast.IASTInitializerClause, org.eclipse.cdt.core.parser.ast.IASTExpression, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration, boolean, boolean, boolean, boolean)
|
||||
*/
|
||||
public IASTVariable createVariable(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, IASTExpression constructorExpression)
|
||||
public IASTVariable createVariable(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, int nameEndOffset, IASTExpression constructorExpression)
|
||||
{
|
||||
return new ASTVariable(scope, name, isAuto, initializerClause, bitfieldExpression, abstractDeclaration, isMutable, isExtern, isRegister, isStatic, startingOffset, nameOffset, constructorExpression);
|
||||
return new ASTVariable(scope, name, isAuto, initializerClause, bitfieldExpression, abstractDeclaration, isMutable, isExtern, isRegister, isStatic, startingOffset, nameOffset, nameEndOffset, constructorExpression);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createField(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, boolean, org.eclipse.cdt.core.parser.ast.IASTInitializerClause, org.eclipse.cdt.core.parser.ast.IASTExpression, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration, boolean, boolean, boolean, boolean, org.eclipse.cdt.core.parser.ast.ASTAccessVisibility)
|
||||
*/
|
||||
public IASTField createField(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, IASTExpression constructorExpression, ASTAccessVisibility visibility)
|
||||
public IASTField createField(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, int nameEndOffset, IASTExpression constructorExpression, ASTAccessVisibility visibility)
|
||||
{
|
||||
return new ASTField(scope, name, isAuto, initializerClause, bitfieldExpression, abstractDeclaration, isMutable, isExtern, isRegister, isStatic, startingOffset, nameOffset, constructorExpression, visibility);
|
||||
return new ASTField(scope, name, isAuto, initializerClause, bitfieldExpression, abstractDeclaration, isMutable, isExtern, isRegister, isStatic, startingOffset, nameOffset, nameEndOffset, constructorExpression, visibility);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -253,9 +248,9 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createTypedef(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration)
|
||||
*/
|
||||
public IASTTypedefDeclaration createTypedef(IASTScope scope, String name, IASTAbstractDeclaration mapping, int startingOffset, int nameOffset)
|
||||
public IASTTypedefDeclaration createTypedef(IASTScope scope, String name, IASTAbstractDeclaration mapping, int startingOffset, int nameOffset, int nameEndOffset)
|
||||
{
|
||||
return new ASTTypedefDeclaration( scope, name, mapping, startingOffset, nameOffset );
|
||||
return new ASTTypedefDeclaration( scope, name, mapping, startingOffset, nameOffset, nameEndOffset);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -268,15 +263,15 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
|||
|
||||
public IASTElaboratedTypeSpecifier createElaboratedTypeSpecifier(IASTScope scope, ASTClassKind elaboratedClassKind, ITokenDuple typeName, int startingOffset, int endOffset, boolean isForewardDecl)
|
||||
{
|
||||
return new ASTElaboratedTypeSpecifier( scope, elaboratedClassKind, typeName.toString(), startingOffset, typeName.getFirstToken().getOffset(), endOffset );
|
||||
return new ASTElaboratedTypeSpecifier( scope, elaboratedClassKind, typeName.toString(), startingOffset, typeName.getFirstToken().getOffset(), typeName.getLastToken().getEndOffset(), endOffset );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createNamespaceAlias(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, org.eclipse.cdt.core.parser.ITokenDuple, int, int, int)
|
||||
*/
|
||||
public IASTNamespaceAlias createNamespaceAlias(IASTScope scope, String identifier, ITokenDuple alias, int startingOffset, int nameOffset, int endOffset)
|
||||
public IASTNamespaceAlias createNamespaceAlias(IASTScope scope, String identifier, ITokenDuple alias, int startingOffset, int nameOffset, int nameEndOffset, int endOffset)
|
||||
{
|
||||
return new ASTNamespaceAlias( scope, identifier, alias.toString(), startingOffset, nameOffset, endOffset );
|
||||
return new ASTNamespaceAlias( scope, identifier, alias.toString(), startingOffset, nameOffset, nameEndOffset, endOffset );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -293,9 +288,9 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
|||
return true; // we have no information to say that it is not
|
||||
}
|
||||
|
||||
public IASTParameterDeclaration createParameterDeclaration(boolean isConst, boolean isVolatile, IASTTypeSpecifier typeSpecifier, List pointerOperators, List arrayModifiers, List parameters, ASTPointerOperator pointerOp, String parameterName, IASTInitializerClause initializerClause, int startingOffset, int endingOffset, int nameOffset)
|
||||
public IASTParameterDeclaration createParameterDeclaration(boolean isConst, boolean isVolatile, IASTTypeSpecifier typeSpecifier, List pointerOperators, List arrayModifiers, List parameters, ASTPointerOperator pointerOp, String parameterName, IASTInitializerClause initializerClause, int startingOffset, int nameOffset, int nameEndOffset, int endingOffset)
|
||||
{
|
||||
return new ASTParameterDeclaration( isConst, isVolatile, typeSpecifier, pointerOperators, arrayModifiers, parameters, pointerOp, parameterName, initializerClause, startingOffset, endingOffset, nameOffset );
|
||||
return new ASTParameterDeclaration( isConst, isVolatile, typeSpecifier, pointerOperators, arrayModifiers, parameters, pointerOp, parameterName, initializerClause, startingOffset, endingOffset, nameOffset, nameEndOffset );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -253,7 +253,14 @@ public class DefaultProblem implements IProblem {
|
|||
*/
|
||||
public void acceptElement(ISourceElementRequestor requestor)
|
||||
{
|
||||
requestor.acceptProblem( this );
|
||||
try
|
||||
{
|
||||
requestor.acceptProblem( this );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
Loading…
Add table
Reference in a new issue