mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Further restructuring.
This commit is contained in:
parent
8b844d54f1
commit
91794dcff9
47 changed files with 369 additions and 243 deletions
|
@ -1,3 +1,6 @@
|
|||
2003-07-07 John Camelon
|
||||
Update ClassDeclarationPatternTests::testBug39652().
|
||||
|
||||
2003-07-04 John Camelon
|
||||
Moved testBug39652() from failed search tests to ClassDeclarationPatternTests.
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ import java.util.Map;
|
|||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.eclipse.cdt.core.parser.ast.AccessVisibility;
|
||||
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
|
||||
import org.eclipse.cdt.internal.core.parser.ast.full.ASTCompilationUnit;
|
||||
import org.eclipse.cdt.internal.core.parser.ast.full.IASTFCompilationUnit;
|
||||
import org.eclipse.cdt.internal.core.parser.pst.IContainerSymbol;
|
||||
|
@ -266,10 +266,10 @@ public class ParserSymbolTableTest extends TestCase {
|
|||
IDerivableContainerSymbol c = table.newDerivableContainerSymbol("C");
|
||||
|
||||
IDerivableContainerSymbol a = table.newDerivableContainerSymbol("A");
|
||||
a.addParent( c, true, AccessVisibility.PUBLIC );
|
||||
a.addParent( c, true, ASTAccessVisibility.PUBLIC );
|
||||
|
||||
IDerivableContainerSymbol b = table.newDerivableContainerSymbol("B");
|
||||
b.addParent( c, true, AccessVisibility.PUBLIC );
|
||||
b.addParent( c, true, ASTAccessVisibility.PUBLIC );
|
||||
|
||||
decl.addParent( a );
|
||||
decl.addParent( b );
|
||||
|
|
|
@ -96,13 +96,13 @@ public class ClassDeclarationPatternTests extends TestCase implements ICSearchCo
|
|||
initialize( pattern );
|
||||
matchLocator.locateMatches( new String[] { cppPath }, null, null );
|
||||
matches = resultCollector.getMatches();
|
||||
assertTrue( matches == null );
|
||||
assertTrue( matches != null );
|
||||
|
||||
pattern = CSearchPattern.createPattern( "NS::B::A", TYPE, DECLARATIONS, EXACT_MATCH, true );
|
||||
initialize( pattern );
|
||||
matchLocator.locateMatches( new String[] { cppPath }, null, null );
|
||||
matches = resultCollector.getMatches();
|
||||
assertTrue( matches == null );
|
||||
assertTrue( matches != null );
|
||||
}
|
||||
|
||||
public void failingtestMatchStruct(){
|
||||
|
|
|
@ -9,7 +9,6 @@ import org.eclipse.cdt.core.parser.IToken;
|
|||
import org.eclipse.cdt.core.parser.ast.IASTASMDefinition;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTCompilationUnit;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTConstructor;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTElaboratedTypeSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTEnumerationSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTField;
|
||||
|
@ -1178,13 +1177,6 @@ public class DOMBuilder implements IParserCallback, ISourceElementRequestor
|
|||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptConstructor(org.eclipse.cdt.core.parser.ast.IASTConstructor)
|
||||
*/
|
||||
public void acceptConstructor(IASTConstructor constructor) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitTemplateDeclaration(org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration)
|
||||
|
|
|
@ -13,7 +13,7 @@ package org.eclipse.cdt.internal.core.search.indexing;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.eclipse.cdt.core.parser.ast.ClassKind;
|
||||
import org.eclipse.cdt.core.parser.ast.ASTClassKind;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier;
|
||||
import org.eclipse.cdt.core.search.ICSearchConstants;
|
||||
import org.eclipse.cdt.internal.core.index.IDocument;
|
||||
|
@ -33,15 +33,15 @@ public abstract class AbstractIndexer implements IIndexer, IIndexConstants, ICSe
|
|||
}
|
||||
|
||||
public void addClassSpecifier(IASTClassSpecifier classSpecification){
|
||||
if (classSpecification.getClassKind().equals(ClassKind.CLASS))
|
||||
if (classSpecification.getClassKind().equals(ASTClassKind.CLASS))
|
||||
{
|
||||
this.output.addRef(encodeTypeEntry(classSpecification.getName().toCharArray(),CLASS));
|
||||
}
|
||||
else if (classSpecification.getClassKind().equals(ClassKind.STRUCT))
|
||||
else if (classSpecification.getClassKind().equals(ASTClassKind.STRUCT))
|
||||
{
|
||||
this.output.addRef(encodeTypeEntry(classSpecification.getName().toCharArray(),STRUCT));
|
||||
}
|
||||
else if (classSpecification.getClassKind().equals(ClassKind.UNION))
|
||||
else if (classSpecification.getClassKind().equals(ASTClassKind.UNION))
|
||||
{
|
||||
this.output.addRef(encodeTypeEntry(classSpecification.getName().toCharArray(),UNION));
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ import org.eclipse.cdt.core.parser.IToken;
|
|||
import org.eclipse.cdt.core.parser.ast.IASTASMDefinition;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTCompilationUnit;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTConstructor;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTElaboratedTypeSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTEnumerationSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTField;
|
||||
|
@ -254,14 +253,6 @@ public class SourceIndexerRequestor implements IParserCallback,ISourceElementReq
|
|||
//System.out.println("acceptField");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptConstructor(org.eclipse.cdt.core.parser.ast.IASTConstructor)
|
||||
*/
|
||||
public void acceptConstructor(IASTConstructor constructor) {
|
||||
// TODO Auto-generated method stub
|
||||
//System.out.println("acceptConstructor");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptClassReference(org.eclipse.cdt.core.parser.ast.IASTClassSpecifier, int)
|
||||
*/
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2003-07-07 John Camelon
|
||||
Bug 39652 - AST: Nested Classes incorrectly report null qualified Names
|
||||
Fuller specification of Field/Method interfaces.
|
||||
|
||||
2003-07-04 John Camelon
|
||||
Fixed NPE in Parser::declarator().
|
||||
Bug 39652 - AST: Nested Classes incorrectly report null qualified Names
|
||||
|
|
|
@ -13,7 +13,6 @@ package org.eclipse.cdt.core.parser;
|
|||
import org.eclipse.cdt.core.parser.ast.IASTASMDefinition;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTCompilationUnit;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTConstructor;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTElaboratedTypeSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTEnumerationSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTField;
|
||||
|
@ -65,7 +64,6 @@ public interface ISourceElementRequestor {
|
|||
public void enterMethodBody( IASTMethod method );
|
||||
public void exitMethodBody( IASTMethod method );
|
||||
public void acceptField( IASTField field );
|
||||
public void acceptConstructor( IASTConstructor constructor );
|
||||
|
||||
public void acceptClassReference( IASTClassSpecifier classSpecifier, int referenceOffset );
|
||||
|
||||
|
|
|
@ -16,13 +16,13 @@ import org.eclipse.cdt.core.parser.Enum;
|
|||
* @author jcamelon
|
||||
*
|
||||
*/
|
||||
public class AccessVisibility extends Enum {
|
||||
public class ASTAccessVisibility extends Enum {
|
||||
|
||||
public static final AccessVisibility PUBLIC = new AccessVisibility( 1 );
|
||||
public static final AccessVisibility PROTECTED = new AccessVisibility( 2 );
|
||||
public static final AccessVisibility PRIVATE = new AccessVisibility( 3 );
|
||||
public static final ASTAccessVisibility PUBLIC = new ASTAccessVisibility( 1 );
|
||||
public static final ASTAccessVisibility PROTECTED = new ASTAccessVisibility( 2 );
|
||||
public static final ASTAccessVisibility PRIVATE = new ASTAccessVisibility( 3 );
|
||||
|
||||
private AccessVisibility( int constant)
|
||||
private ASTAccessVisibility( int constant)
|
||||
{
|
||||
super( constant );
|
||||
}
|
|
@ -16,14 +16,14 @@ import org.eclipse.cdt.core.parser.Enum;
|
|||
* @author jcamelon
|
||||
*
|
||||
*/
|
||||
public class ClassKind extends Enum {
|
||||
public class ASTClassKind extends Enum {
|
||||
|
||||
public final static ClassKind CLASS = new ClassKind( 1 );
|
||||
public final static ClassKind STRUCT = new ClassKind( 2 );
|
||||
public final static ClassKind UNION = new ClassKind( 3 );
|
||||
public final static ClassKind ENUM = new ClassKind( 4 );
|
||||
public final static ASTClassKind CLASS = new ASTClassKind( 1 );
|
||||
public final static ASTClassKind STRUCT = new ASTClassKind( 2 );
|
||||
public final static ASTClassKind UNION = new ASTClassKind( 3 );
|
||||
public final static ASTClassKind ENUM = new ASTClassKind( 4 );
|
||||
|
||||
private ClassKind( int value )
|
||||
private ASTClassKind( int value )
|
||||
{
|
||||
super( value );
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
/**********************************************************************
|
||||
* Copyright (c) 2002,2003 Rational Software Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Common Public License v0.5
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/cpl-v05.html
|
||||
*
|
||||
* Contributors:
|
||||
* IBM Rational Software - Initial API and implementation
|
||||
***********************************************************************/
|
||||
package org.eclipse.cdt.core.parser.ast;
|
||||
|
||||
import org.eclipse.cdt.core.parser.Enum;
|
||||
|
||||
/**
|
||||
* @author jcamelon
|
||||
*
|
||||
*/
|
||||
public class ASTPointerOperator extends Enum
|
||||
{
|
||||
public static final ASTPointerOperator REFERENCE = new ASTPointerOperator( 0 );
|
||||
public static final ASTPointerOperator POINTER = new ASTPointerOperator( 1 );
|
||||
public static final ASTPointerOperator CONST_POINTER = new ASTPointerOperator( 2 );
|
||||
public static final ASTPointerOperator VOLATILE_POINTER = new ASTPointerOperator( 3 );
|
||||
public static final ASTPointerOperator POINTER_TO_FUNCTION = new ASTPointerOperator( 4 );
|
||||
public static final ASTPointerOperator CONST_POINTER_TO_FUNCTION = new ASTPointerOperator( 5 );
|
||||
public static final ASTPointerOperator VOLATILE_POINTER_TO_FUNCTION = new ASTPointerOperator( 6 );
|
||||
|
||||
|
||||
/**
|
||||
* @param enumValue
|
||||
*/
|
||||
protected ASTPointerOperator(int enumValue)
|
||||
{
|
||||
super(enumValue);
|
||||
}
|
||||
}
|
|
@ -16,15 +16,15 @@ import org.eclipse.cdt.core.parser.Enum;
|
|||
* @author jcamelon
|
||||
*
|
||||
*/
|
||||
public class TemplateDeclarationType extends Enum {
|
||||
public class ASTTemplateDeclarationType extends Enum {
|
||||
|
||||
public static final TemplateDeclarationType CLASS = new TemplateDeclarationType(1);
|
||||
public static final TemplateDeclarationType FUNCTION = new TemplateDeclarationType( 2 );
|
||||
public static final TemplateDeclarationType MEMBERCLASS = new TemplateDeclarationType( 3 );
|
||||
public static final TemplateDeclarationType METHOD = new TemplateDeclarationType( 4 );
|
||||
public static final TemplateDeclarationType FIELD = new TemplateDeclarationType( 5 );
|
||||
public static final ASTTemplateDeclarationType CLASS = new ASTTemplateDeclarationType(1);
|
||||
public static final ASTTemplateDeclarationType FUNCTION = new ASTTemplateDeclarationType( 2 );
|
||||
public static final ASTTemplateDeclarationType MEMBERCLASS = new ASTTemplateDeclarationType( 3 );
|
||||
public static final ASTTemplateDeclarationType METHOD = new ASTTemplateDeclarationType( 4 );
|
||||
public static final ASTTemplateDeclarationType FIELD = new ASTTemplateDeclarationType( 5 );
|
||||
|
||||
private TemplateDeclarationType( int t )
|
||||
private ASTTemplateDeclarationType( int t )
|
||||
{
|
||||
super( t );
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
/**********************************************************************
|
||||
* Copyright (c) 2002,2003 Rational Software Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Common Public License v0.5
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/cpl-v05.html
|
||||
*
|
||||
* Contributors:
|
||||
* IBM Rational Software - Initial API and implementation
|
||||
***********************************************************************/
|
||||
package org.eclipse.cdt.core.parser.ast;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author jcamelon
|
||||
*
|
||||
*/
|
||||
public interface IASTAbstractDeclarator
|
||||
{
|
||||
public IASTTypeSpecifier getTypeSpecifier();
|
||||
public List getPointerOperators();
|
||||
}
|
|
@ -17,7 +17,7 @@ package org.eclipse.cdt.core.parser.ast;
|
|||
*/
|
||||
public interface IASTBaseSpecifier {
|
||||
|
||||
public AccessVisibility getAccess();
|
||||
public ASTAccessVisibility getAccess();
|
||||
public boolean isVirtual();
|
||||
public IASTClassSpecifier getParent();
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import org.eclipse.cdt.core.parser.Enum;
|
|||
* @author jcamelon
|
||||
*
|
||||
*/
|
||||
public interface IASTClassSpecifier extends IASTTypeSpecifier, IASTScope, IASTOffsetableNamedElement, IASTTemplatedDeclaration {
|
||||
public interface IASTClassSpecifier extends IASTTypeSpecifier, IASTScope, IASTOffsetableNamedElement, IASTTemplatedDeclaration, IASTQualifiedNameElement {
|
||||
|
||||
public class ClassNameType extends Enum {
|
||||
|
||||
|
@ -33,12 +33,10 @@ public interface IASTClassSpecifier extends IASTTypeSpecifier, IASTScope, IASTOf
|
|||
|
||||
public ClassNameType getClassNameType();
|
||||
|
||||
public ClassKind getClassKind();
|
||||
public ASTClassKind getClassKind();
|
||||
|
||||
public Iterator getBaseClauses();
|
||||
|
||||
public AccessVisibility getCurrentVisibilityMode();
|
||||
|
||||
public String[] getFullyQualifiedName();
|
||||
public ASTAccessVisibility getCurrentVisibilityMode();
|
||||
|
||||
}
|
||||
|
|
|
@ -18,6 +18,6 @@ package org.eclipse.cdt.core.parser.ast;
|
|||
public interface IASTElaboratedTypeSpecifier extends IASTTypeSpecifier, IASTOffsetableElement {
|
||||
|
||||
public String getTypeName();
|
||||
public ClassKind getClassKind();
|
||||
public ASTClassKind getClassKind();
|
||||
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ import org.eclipse.cdt.core.parser.Backtrack;
|
|||
import org.eclipse.cdt.core.parser.ITokenDuple;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier.ClassNameType;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTExpression.IASTNewExpressionDescriptor;
|
||||
import org.eclipse.cdt.internal.core.parser.IASTArrayModifier;
|
||||
import org.eclipse.cdt.internal.core.parser.ast.IASTArrayModifier;
|
||||
|
||||
/**
|
||||
* @author jcamelon
|
||||
|
@ -55,9 +55,9 @@ public interface IASTFactory {
|
|||
|
||||
public IASTClassSpecifier createClassSpecifier( IASTScope scope,
|
||||
String name,
|
||||
ClassKind kind,
|
||||
ASTClassKind kind,
|
||||
ClassNameType type,
|
||||
AccessVisibility access,
|
||||
ASTAccessVisibility access,
|
||||
IASTTemplateDeclaration ownerTemplateDeclaration, int startingOffset, int nameOffset );
|
||||
|
||||
/**
|
||||
|
@ -66,9 +66,9 @@ public interface IASTFactory {
|
|||
* @param visibility
|
||||
* @param string
|
||||
*/
|
||||
public void addBaseSpecifier(IASTClassSpecifier astClassSpec, boolean isVirtual, AccessVisibility visibility, String string);
|
||||
public void addBaseSpecifier(IASTClassSpecifier astClassSpec, boolean isVirtual, ASTAccessVisibility visibility, String string);
|
||||
|
||||
public IASTElaboratedTypeSpecifier createElaboratedTypeSpecifier(ClassKind elaboratedClassKind, String typeName, int startingOffset, int endOffset );
|
||||
public IASTElaboratedTypeSpecifier createElaboratedTypeSpecifier(ASTClassKind elaboratedClassKind, String typeName, int startingOffset, int endOffset );
|
||||
public IASTEnumerationSpecifier createEnumerationSpecifier(String name, int startingOffset, int nameOffset );
|
||||
public void addEnumerator(IASTEnumerationSpecifier enumeration, String string, int startingOffset, int endingOffset);
|
||||
|
||||
|
|
|
@ -14,6 +14,6 @@ package org.eclipse.cdt.core.parser.ast;
|
|||
* @author jcamelon
|
||||
*
|
||||
*/
|
||||
public interface IASTField {
|
||||
public interface IASTField extends IASTVariable {
|
||||
|
||||
}
|
||||
|
|
|
@ -15,5 +15,11 @@ package org.eclipse.cdt.core.parser.ast;
|
|||
*
|
||||
*/
|
||||
public interface IASTFunction {
|
||||
|
||||
public boolean isInline();
|
||||
public boolean isFriend();
|
||||
public boolean isStatic();
|
||||
|
||||
public IASTAbstractDeclarator getReturnType();
|
||||
|
||||
}
|
||||
|
|
|
@ -14,6 +14,12 @@ package org.eclipse.cdt.core.parser.ast;
|
|||
* @author jcamelon
|
||||
*
|
||||
*/
|
||||
public interface IASTMethod {
|
||||
public interface IASTMethod extends IASTFunction {
|
||||
|
||||
public boolean isVirtual();
|
||||
public boolean isExplicit();
|
||||
|
||||
public boolean isConstructor();
|
||||
public boolean isDestructor();
|
||||
|
||||
}
|
||||
|
|
|
@ -14,6 +14,6 @@ package org.eclipse.cdt.core.parser.ast;
|
|||
* @author jcamelon
|
||||
*
|
||||
*/
|
||||
public interface IASTNamespaceDefinition extends IASTOffsetableNamedElement, IASTScope, IASTDeclaration {
|
||||
public interface IASTNamespaceDefinition extends IASTOffsetableNamedElement, IASTScope, IASTDeclaration, IASTQualifiedNameElement {
|
||||
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ package org.eclipse.cdt.core.parser.ast;
|
|||
* @author jcamelon
|
||||
*
|
||||
*/
|
||||
public interface IASTConstructor {
|
||||
|
||||
public interface IASTQualifiedNameElement
|
||||
{
|
||||
public String[] getFullyQualifiedName();
|
||||
}
|
|
@ -18,7 +18,7 @@ import java.util.Iterator;
|
|||
*/
|
||||
public interface IASTTemplateDeclaration {
|
||||
|
||||
public TemplateDeclarationType getTemplateDeclarationType();
|
||||
public ASTTemplateDeclarationType getTemplateDeclarationType();
|
||||
public Iterator getTemplateParameters();
|
||||
|
||||
}
|
||||
|
|
|
@ -16,6 +16,6 @@ package org.eclipse.cdt.core.parser.ast;
|
|||
*/
|
||||
public interface IASTTemplateInstantiation {
|
||||
|
||||
public TemplateDeclarationType getTemplateDeclarationType();
|
||||
public ASTTemplateDeclarationType getTemplateDeclarationType();
|
||||
public IASTTemplateDeclaration getTemplateDeclaration();
|
||||
}
|
||||
|
|
|
@ -16,6 +16,6 @@ package org.eclipse.cdt.core.parser.ast;
|
|||
*/
|
||||
public interface IASTTemplateSpecialization {
|
||||
|
||||
public TemplateDeclarationType getTemplateDeclarationType();
|
||||
public ASTTemplateDeclarationType getTemplateDeclarationType();
|
||||
public IASTTemplateDeclaration getTemplateDeclaration();
|
||||
}
|
||||
|
|
|
@ -16,4 +16,13 @@ package org.eclipse.cdt.core.parser.ast;
|
|||
*/
|
||||
public interface IASTVariable {
|
||||
|
||||
public boolean isAuto();
|
||||
public boolean isRegister();
|
||||
public boolean isStatic();
|
||||
public boolean isExtern();
|
||||
public boolean isMutable();
|
||||
|
||||
public IASTAbstractDeclarator getAbstractDeclaration();
|
||||
public String getName();
|
||||
public IASTInitializerClause getInitializerClause();
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.eclipse.cdt.core.parser.ast.IASTVariable;
|
|||
* @author jcamelon
|
||||
*
|
||||
*/
|
||||
public class DeclarationWrapper
|
||||
public class DeclarationWrapper implements IDeclaratorOwner
|
||||
{
|
||||
private final IASTScope scope;
|
||||
private IASTTypeSpecifier typeSpecifier;
|
||||
|
@ -285,9 +285,9 @@ public class DeclarationWrapper
|
|||
declarators.add( d );
|
||||
}
|
||||
|
||||
public List getDeclarators()
|
||||
public Iterator getDeclarators()
|
||||
{
|
||||
return Collections.unmodifiableList( declarators );
|
||||
return Collections.unmodifiableList( declarators ).iterator();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -342,7 +342,7 @@ public class DeclarationWrapper
|
|||
*/
|
||||
private IASTMethod createMethodASTNode(Declarator declarator)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
|
@ -372,6 +372,13 @@ public class DeclarationWrapper
|
|||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.parser.IDeclaratorOwner#getDeclarationWrapper()
|
||||
*/
|
||||
public DeclarationWrapper getDeclarationWrapper()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ package org.eclipse.cdt.internal.core.parser;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.core.parser.ITokenDuple;
|
||||
|
@ -19,19 +20,19 @@ import org.eclipse.cdt.core.parser.ast.IASTConstructorMemberInitializer;
|
|||
import org.eclipse.cdt.core.parser.ast.IASTExceptionSpecification;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTExpression;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTInitializerClause;
|
||||
import org.eclipse.cdt.internal.core.parser.ast.*;
|
||||
|
||||
/**
|
||||
* @author jcamelon
|
||||
*
|
||||
*/
|
||||
public class Declarator implements IParameterCollection
|
||||
public class Declarator implements IParameterCollection, IDeclaratorOwner
|
||||
{
|
||||
private boolean isFunction;
|
||||
private boolean hasFunctionBody;
|
||||
private IASTExpression constructorExpression;
|
||||
private boolean pureVirtual = false;
|
||||
private final DeclarationWrapper owner1;
|
||||
private final Declarator owner2;
|
||||
private final IDeclaratorOwner owner;
|
||||
private Declarator ownedDeclarator = null;
|
||||
private String name = "";
|
||||
private IASTInitializerClause initializerClause = null;
|
||||
|
@ -48,17 +49,11 @@ public class Declarator implements IParameterCollection
|
|||
|
||||
private int nameStartOffset, nameEndOffset;
|
||||
|
||||
public Declarator( DeclarationWrapper owner )
|
||||
public Declarator( IDeclaratorOwner owner )
|
||||
{
|
||||
this.owner1 = owner;
|
||||
owner2 = null;
|
||||
this.owner = owner;
|
||||
}
|
||||
|
||||
public Declarator( Declarator owner )
|
||||
{
|
||||
owner2 = owner;
|
||||
owner1 = null;
|
||||
}
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
|
@ -86,9 +81,9 @@ public class Declarator implements IParameterCollection
|
|||
/**
|
||||
* @return
|
||||
*/
|
||||
public DeclarationWrapper getOwner()
|
||||
public IDeclaratorOwner getOwner()
|
||||
{
|
||||
return owner1;
|
||||
return owner;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -115,14 +110,6 @@ public class Declarator implements IParameterCollection
|
|||
nameStartOffset = i;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
public Declarator getOwnerDeclarator()
|
||||
{
|
||||
return owner2;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
|
@ -354,4 +341,27 @@ public class Declarator implements IParameterCollection
|
|||
isFunction = b;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.parser.IDeclaratorOwner#getDeclarators()
|
||||
*/
|
||||
public Iterator getDeclarators()
|
||||
{
|
||||
List l = new ArrayList();
|
||||
if( ownedDeclarator != null )
|
||||
l.add( ownedDeclarator );
|
||||
return l.iterator();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.parser.IDeclaratorOwner#getDeclarationWrapper()
|
||||
*/
|
||||
public DeclarationWrapper getDeclarationWrapper()
|
||||
{
|
||||
Declarator d = this;
|
||||
while( d.getOwner() instanceof Declarator )
|
||||
d = (Declarator)d.getOwner();
|
||||
return (DeclarationWrapper)d.getOwner();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
/**********************************************************************
|
||||
* Copyright (c) 2002,2003 Rational Software Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Common Public License v0.5
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/cpl-v05.html
|
||||
*
|
||||
* Contributors:
|
||||
* IBM Rational Software - Initial API and implementation
|
||||
***********************************************************************/
|
||||
package org.eclipse.cdt.internal.core.parser;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
/**
|
||||
* @author jcamelon
|
||||
*
|
||||
*/
|
||||
public interface IDeclaratorOwner
|
||||
{
|
||||
public Iterator getDeclarators();
|
||||
public DeclarationWrapper getDeclarationWrapper();
|
||||
}
|
|
@ -8,7 +8,6 @@ import org.eclipse.cdt.core.parser.IToken;
|
|||
import org.eclipse.cdt.core.parser.ast.IASTASMDefinition;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTCompilationUnit;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTConstructor;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTElaboratedTypeSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTEnumerationSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTField;
|
||||
|
@ -163,12 +162,6 @@ public class NullSourceElementRequestor implements ISourceElementRequestor, IPar
|
|||
public void acceptField(IASTField field) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptConstructor(org.eclipse.cdt.core.parser.ast.IASTConstructor)
|
||||
*/
|
||||
public void acceptConstructor(IASTConstructor constructor) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitTemplateDeclaration(org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration)
|
||||
*/
|
||||
|
|
|
@ -25,8 +25,8 @@ import org.eclipse.cdt.core.parser.ITranslationResult;
|
|||
import org.eclipse.cdt.core.parser.ParserFactory;
|
||||
import org.eclipse.cdt.core.parser.ParserMode;
|
||||
import org.eclipse.cdt.core.parser.ScannerException;
|
||||
import org.eclipse.cdt.core.parser.ast.AccessVisibility;
|
||||
import org.eclipse.cdt.core.parser.ast.ClassKind;
|
||||
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
|
||||
import org.eclipse.cdt.core.parser.ast.ASTClassKind;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTASMDefinition;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTCompilationUnit;
|
||||
|
@ -43,6 +43,7 @@ import org.eclipse.cdt.core.parser.ast.IASTUsingDirective;
|
|||
import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier.ClassNameType;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTExpression.Kind;
|
||||
import org.eclipse.cdt.internal.core.model.Util;
|
||||
import org.eclipse.cdt.internal.core.parser.ast.*;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -1668,21 +1669,21 @@ public class Parser implements IParser
|
|||
// this is an elaborated class specifier
|
||||
Object elab = null;
|
||||
IToken t = consume();
|
||||
ClassKind eck = null;
|
||||
ASTClassKind eck = null;
|
||||
|
||||
switch( t.getType() )
|
||||
{
|
||||
case Token.t_class:
|
||||
eck = ClassKind.CLASS;
|
||||
eck = ASTClassKind.CLASS;
|
||||
break;
|
||||
case Token.t_struct:
|
||||
eck = ClassKind.STRUCT;
|
||||
eck = ASTClassKind.STRUCT;
|
||||
break;
|
||||
case Token.t_union:
|
||||
eck = ClassKind.UNION;
|
||||
eck = ASTClassKind.UNION;
|
||||
break;
|
||||
case Token.t_enum:
|
||||
eck = ClassKind.ENUM;
|
||||
eck = ASTClassKind.ENUM;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -1922,7 +1923,7 @@ public class Parser implements IParser
|
|||
protected DeclaratorDuple initDeclarator(Object owner, DeclarationWrapper sdw)
|
||||
throws Backtrack
|
||||
{
|
||||
DeclaratorDuple duple = declarator(owner, sdw, null);
|
||||
DeclaratorDuple duple = declarator(owner, sdw);
|
||||
Object declarator = duple.getObject();
|
||||
Declarator d = duple.getDeclarator();
|
||||
|
||||
|
@ -2076,21 +2077,17 @@ public class Parser implements IParser
|
|||
* @return declarator that this parsing produced.
|
||||
* @throws Backtrack request a backtrack
|
||||
*/
|
||||
protected DeclaratorDuple declarator(Object container, DeclarationWrapper sdw, Declarator owningDeclarator) throws Backtrack
|
||||
protected DeclaratorDuple declarator(Object container, IDeclaratorOwner owner) throws Backtrack
|
||||
{
|
||||
Object declarator = null;
|
||||
Declarator d = null;
|
||||
DeclarationWrapper sdw = owner.getDeclarationWrapper();
|
||||
|
||||
overallLoop:
|
||||
do
|
||||
{
|
||||
declarator = null;
|
||||
d = null;
|
||||
|
||||
if( sdw != null )
|
||||
d = new Declarator( sdw );
|
||||
else if( owningDeclarator != null )
|
||||
d = new Declarator( owningDeclarator );
|
||||
d = new Declarator( owner );
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -2113,7 +2110,7 @@ public class Parser implements IParser
|
|||
if (LT(1) == IToken.tLPAREN)
|
||||
{
|
||||
consume();
|
||||
DeclaratorDuple subDeclarator = declarator(declarator, null, d);
|
||||
DeclaratorDuple subDeclarator = declarator(declarator, d);
|
||||
consume(IToken.tRPAREN);
|
||||
try
|
||||
{
|
||||
|
@ -2354,23 +2351,12 @@ public class Parser implements IParser
|
|||
try
|
||||
{
|
||||
do
|
||||
{
|
||||
IASTScope s = null;
|
||||
if( sdw != null )
|
||||
s = sdw.getScope();
|
||||
else
|
||||
{
|
||||
Declarator i = owningDeclarator;
|
||||
while( i.getOwnerDeclarator() != null )
|
||||
i = i.getOwnerDeclarator();
|
||||
s = i.getOwner().getScope();
|
||||
}
|
||||
|
||||
{
|
||||
simpleDeclaration(
|
||||
oldKRParameterDeclarationClause,
|
||||
false,
|
||||
true,
|
||||
s);
|
||||
sdw.getScope());
|
||||
}
|
||||
while (LT(1) != IToken.tLBRACE);
|
||||
}
|
||||
|
@ -2495,8 +2481,9 @@ public class Parser implements IParser
|
|||
}
|
||||
}
|
||||
while (true);
|
||||
if( sdw == null )
|
||||
owningDeclarator.setOwnedDeclarator(d);
|
||||
|
||||
if( d.getOwner() instanceof Declarator )
|
||||
((Declarator)d.getOwner()).setOwnedDeclarator(d);
|
||||
return new DeclaratorDuple( declarator, d );
|
||||
|
||||
}
|
||||
|
@ -2849,8 +2836,8 @@ public class Parser implements IParser
|
|||
throws Backtrack
|
||||
{
|
||||
ClassNameType nameType = ClassNameType.IDENTIFIER;
|
||||
ClassKind classKind = null;
|
||||
AccessVisibility access = AccessVisibility.PUBLIC;
|
||||
ASTClassKind classKind = null;
|
||||
ASTAccessVisibility access = ASTAccessVisibility.PUBLIC;
|
||||
IToken classKey = null;
|
||||
IToken mark = mark();
|
||||
// class key
|
||||
|
@ -2858,16 +2845,16 @@ public class Parser implements IParser
|
|||
{
|
||||
case IToken.t_class :
|
||||
classKey = consume();
|
||||
classKind = ClassKind.CLASS;
|
||||
access = AccessVisibility.PRIVATE;
|
||||
classKind = ASTClassKind.CLASS;
|
||||
access = ASTAccessVisibility.PRIVATE;
|
||||
break;
|
||||
case IToken.t_struct :
|
||||
classKey = consume();
|
||||
classKind = ClassKind.STRUCT;
|
||||
classKind = ASTClassKind.STRUCT;
|
||||
break;
|
||||
case IToken.t_union :
|
||||
classKey = consume();
|
||||
classKind = ClassKind.UNION;
|
||||
classKind = ASTClassKind.UNION;
|
||||
break;
|
||||
default :
|
||||
throw backtrack;
|
||||
|
@ -3008,7 +2995,7 @@ public class Parser implements IParser
|
|||
{
|
||||
}
|
||||
boolean isVirtual = false;
|
||||
AccessVisibility visibility = AccessVisibility.PUBLIC;
|
||||
ASTAccessVisibility visibility = ASTAccessVisibility.PUBLIC;
|
||||
ITokenDuple nameDuple = null;
|
||||
baseSpecifierLoop : for (;;)
|
||||
{
|
||||
|
@ -3046,10 +3033,10 @@ public class Parser implements IParser
|
|||
catch (Exception e)
|
||||
{
|
||||
}
|
||||
visibility = AccessVisibility.PROTECTED;
|
||||
visibility = ASTAccessVisibility.PROTECTED;
|
||||
break;
|
||||
case IToken.t_private :
|
||||
visibility = AccessVisibility.PRIVATE;
|
||||
visibility = ASTAccessVisibility.PRIVATE;
|
||||
try
|
||||
{
|
||||
callback.baseSpecifierVisibility(
|
||||
|
@ -3080,7 +3067,7 @@ public class Parser implements IParser
|
|||
visibility,
|
||||
nameDuple.toString());
|
||||
isVirtual = false;
|
||||
visibility = AccessVisibility.PUBLIC;
|
||||
visibility = ASTAccessVisibility.PUBLIC;
|
||||
nameDuple = null;
|
||||
callback.baseSpecifierEnd(baseSpecifier);
|
||||
baseSpecifier =
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
***********************************************************************/
|
||||
package org.eclipse.cdt.internal.core.parser.ast;
|
||||
|
||||
import org.eclipse.cdt.core.parser.ast.AccessVisibility;
|
||||
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTBaseSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier;
|
||||
|
||||
|
@ -22,9 +22,9 @@ public class ASTBaseSpecifier implements IASTBaseSpecifier {
|
|||
|
||||
private final IASTClassSpecifier baseClass;
|
||||
private final boolean isVirtual;
|
||||
private final AccessVisibility visibility;
|
||||
private final ASTAccessVisibility visibility;
|
||||
|
||||
public ASTBaseSpecifier( IASTClassSpecifier c, AccessVisibility a, boolean virtual )
|
||||
public ASTBaseSpecifier( IASTClassSpecifier c, ASTAccessVisibility a, boolean virtual )
|
||||
{
|
||||
isVirtual = virtual;
|
||||
baseClass = c;
|
||||
|
@ -34,7 +34,7 @@ public class ASTBaseSpecifier implements IASTBaseSpecifier {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTBaseSpecifier#getAccess()
|
||||
*/
|
||||
public AccessVisibility getAccess() {
|
||||
public ASTAccessVisibility getAccess() {
|
||||
return visibility;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* Contributors:
|
||||
* IBM Rational Software - Initial API and implementation
|
||||
***********************************************************************/
|
||||
package org.eclipse.cdt.internal.core.parser;
|
||||
package org.eclipse.cdt.internal.core.parser.ast;
|
||||
|
||||
/**
|
||||
* @author jcamelon
|
|
@ -12,8 +12,8 @@ package org.eclipse.cdt.internal.core.parser.ast.full;
|
|||
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.eclipse.cdt.core.parser.ast.AccessVisibility;
|
||||
import org.eclipse.cdt.core.parser.ast.ClassKind;
|
||||
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
|
||||
import org.eclipse.cdt.core.parser.ast.ASTClassKind;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration;
|
||||
import org.eclipse.cdt.internal.core.parser.pst.IDerivableContainerSymbol;
|
||||
import org.eclipse.cdt.internal.core.parser.pst.ISymbol;
|
||||
|
@ -26,11 +26,11 @@ import org.eclipse.cdt.internal.core.parser.pst.ParserSymbolTable;
|
|||
public class ASTClassSpecifier implements IASTFClassSpecifier, IPSTSymbolExtension {
|
||||
|
||||
private final IDerivableContainerSymbol symbol;
|
||||
private final ClassKind classKind;
|
||||
private final ASTClassKind classKind;
|
||||
private final ClassNameType type;
|
||||
private final String name;
|
||||
|
||||
public ASTClassSpecifier( IDerivableContainerSymbol symbol, String name, ClassNameType type, ClassKind kind )
|
||||
public ASTClassSpecifier( IDerivableContainerSymbol symbol, String name, ClassNameType type, ASTClassKind kind )
|
||||
{
|
||||
this.name = name;
|
||||
this.symbol = symbol;
|
||||
|
@ -56,7 +56,7 @@ public class ASTClassSpecifier implements IASTFClassSpecifier, IPSTSymbolExtensi
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTClassSpecifier#getClassKind()
|
||||
*/
|
||||
public ClassKind getClassKind() {
|
||||
public ASTClassKind getClassKind() {
|
||||
return classKind;
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ public class ASTClassSpecifier implements IASTFClassSpecifier, IPSTSymbolExtensi
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTClassSpecifier#getCurrentVisiblity()
|
||||
*/
|
||||
public AccessVisibility getCurrentVisibilityMode() {
|
||||
public ASTAccessVisibility getCurrentVisibilityMode() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -108,5 +108,14 @@ public class ASTNamespaceDefinition implements IASTFNamespaceDefinition {
|
|||
*/
|
||||
public IASTScope getOwnerScope() {
|
||||
return (IPSTContainerExtension)symbol.getContainingSymbol().getASTNode();
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTQualifiedNameElement#getFullyQualifiedName()
|
||||
*/
|
||||
public String[] getFullyQualifiedName()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,8 +16,8 @@ import java.util.List;
|
|||
import org.eclipse.cdt.core.parser.Backtrack;
|
||||
import org.eclipse.cdt.core.parser.IToken;
|
||||
import org.eclipse.cdt.core.parser.ITokenDuple;
|
||||
import org.eclipse.cdt.core.parser.ast.AccessVisibility;
|
||||
import org.eclipse.cdt.core.parser.ast.ClassKind;
|
||||
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
|
||||
import org.eclipse.cdt.core.parser.ast.ASTClassKind;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTASMDefinition;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTCompilationUnit;
|
||||
|
@ -39,8 +39,8 @@ import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier.ClassNameType;
|
|||
import org.eclipse.cdt.core.parser.ast.IASTExpression.IASTNewExpressionDescriptor;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTExpression.Kind;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTSimpleTypeSpecifier.SimpleType;
|
||||
import org.eclipse.cdt.internal.core.parser.IASTArrayModifier;
|
||||
import org.eclipse.cdt.internal.core.parser.ast.BaseASTFactory;
|
||||
import org.eclipse.cdt.internal.core.parser.ast.IASTArrayModifier;
|
||||
import org.eclipse.cdt.internal.core.parser.pst.IContainerSymbol;
|
||||
import org.eclipse.cdt.internal.core.parser.pst.ISymbol;
|
||||
import org.eclipse.cdt.internal.core.parser.pst.ParserSymbolTable;
|
||||
|
@ -165,7 +165,7 @@ public class FullParseASTFactory 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, String name, ClassKind kind, ClassNameType type, AccessVisibility access, IASTTemplateDeclaration ownerTemplateDeclaration, int startingOffset, int nameOffset) {
|
||||
public IASTClassSpecifier createClassSpecifier(IASTScope scope, String name, ASTClassKind kind, ClassNameType type, ASTAccessVisibility access, IASTTemplateDeclaration ownerTemplateDeclaration, int startingOffset, int nameOffset) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ public class FullParseASTFactory extends BaseASTFactory implements IASTFactory {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#addBaseSpecifier(org.eclipse.cdt.core.parser.ast.IASTClassSpecifier, boolean, org.eclipse.cdt.core.parser.ast.AccessVisibility, java.lang.String)
|
||||
*/
|
||||
public void addBaseSpecifier(IASTClassSpecifier astClassSpec, boolean isVirtual, AccessVisibility visibility, String string) {
|
||||
public void addBaseSpecifier(IASTClassSpecifier astClassSpec, boolean isVirtual, ASTAccessVisibility visibility, String string) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ public class FullParseASTFactory extends BaseASTFactory implements IASTFactory {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createElaboratedTypeSpecifier(org.eclipse.cdt.core.parser.ast.ClassKind, java.lang.String, int, int)
|
||||
*/
|
||||
public IASTElaboratedTypeSpecifier createElaboratedTypeSpecifier(ClassKind elaboratedClassKind, String typeName, int startingOffset, int endOffset )
|
||||
public IASTElaboratedTypeSpecifier createElaboratedTypeSpecifier(ASTClassKind elaboratedClassKind, String typeName, int startingOffset, int endOffset )
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
***********************************************************************/
|
||||
package org.eclipse.cdt.internal.core.parser.ast.quick;
|
||||
|
||||
import org.eclipse.cdt.core.parser.ast.AccessVisibility;
|
||||
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTBaseSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier;
|
||||
|
||||
|
@ -20,11 +20,11 @@ import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier;
|
|||
*/
|
||||
public class ASTBaseSpecifier implements IASTBaseSpecifier {
|
||||
|
||||
private final AccessVisibility visibility;
|
||||
private final ASTAccessVisibility visibility;
|
||||
private final boolean isVirtual;
|
||||
private final IASTClassSpecifier parentClass;
|
||||
|
||||
public ASTBaseSpecifier( IASTClassSpecifier classSpec, boolean v, AccessVisibility a )
|
||||
public ASTBaseSpecifier( IASTClassSpecifier classSpec, boolean v, ASTAccessVisibility a )
|
||||
{
|
||||
parentClass = classSpec;
|
||||
isVirtual = v;
|
||||
|
@ -33,25 +33,22 @@ public class ASTBaseSpecifier implements IASTBaseSpecifier {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTBaseSpecifier#getAccess()
|
||||
*/
|
||||
public AccessVisibility getAccess() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
public ASTAccessVisibility getAccess() {
|
||||
return visibility;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTBaseSpecifier#isVirtual()
|
||||
*/
|
||||
public boolean isVirtual() {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
return isVirtual;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTBaseSpecifier#getParent()
|
||||
*/
|
||||
public IASTClassSpecifier getParent() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
return parentClass;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -12,15 +12,11 @@ package org.eclipse.cdt.internal.core.parser.ast.quick;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Stack;
|
||||
|
||||
import org.eclipse.cdt.core.parser.ast.AccessVisibility;
|
||||
import org.eclipse.cdt.core.parser.ast.ClassKind;
|
||||
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
|
||||
import org.eclipse.cdt.core.parser.ast.ASTClassKind;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTBaseSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTDeclaration;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTNamespaceDefinition;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTScope;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration;
|
||||
import org.eclipse.cdt.internal.core.parser.ast.NamedOffsets;
|
||||
|
@ -29,57 +25,33 @@ import org.eclipse.cdt.internal.core.parser.ast.NamedOffsets;
|
|||
*
|
||||
*/
|
||||
public class ASTClassSpecifier
|
||||
extends ASTDeclaration
|
||||
extends ASTQualifiedNamedDeclaration
|
||||
implements IASTQClassSpecifier, IASTQScope
|
||||
{
|
||||
public ASTClassSpecifier(
|
||||
IASTScope scope,
|
||||
String name,
|
||||
ClassKind kind,
|
||||
ASTClassKind kind,
|
||||
ClassNameType type,
|
||||
AccessVisibility access,
|
||||
ASTAccessVisibility access,
|
||||
IASTTemplateDeclaration ownerTemplateDeclaration)
|
||||
{
|
||||
super(scope);
|
||||
super(scope, name );
|
||||
classNameType = type;
|
||||
classKind = kind;
|
||||
this.access = access;
|
||||
this.name = name;
|
||||
templateOwner = ownerTemplateDeclaration;
|
||||
|
||||
Stack names = new Stack();
|
||||
IASTScope parent = getOwnerScope();
|
||||
|
||||
names.push( name ); // push on our own name
|
||||
while (parent != null)
|
||||
{
|
||||
if (parent instanceof IASTNamespaceDefinition
|
||||
|| parent instanceof IASTClassSpecifier)
|
||||
{
|
||||
names.push(((IASTOffsetableNamedElement)parent).getName());
|
||||
parent = ((IASTDeclaration)parent).getOwnerScope();
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (names.size() != 0)
|
||||
{
|
||||
qualifiedNames = new String[names.size()];
|
||||
int counter = 0;
|
||||
while (!names.empty())
|
||||
qualifiedNames[counter++] = (String)names.pop();
|
||||
}
|
||||
else
|
||||
qualifiedNames = null;
|
||||
}
|
||||
private final String[] qualifiedNames;
|
||||
|
||||
private IASTTemplateDeclaration templateOwner = null;
|
||||
private final String name;
|
||||
private List declarations = new ArrayList();
|
||||
private List baseClauses = new ArrayList();
|
||||
private AccessVisibility access;
|
||||
private ASTAccessVisibility access;
|
||||
private NamedOffsets offsets = new NamedOffsets();
|
||||
private final ClassNameType classNameType;
|
||||
private final ClassKind classKind;
|
||||
private final ASTClassKind classKind;
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTClassSpecifier#getClassNameType()
|
||||
*/
|
||||
|
@ -90,7 +62,7 @@ public class ASTClassSpecifier
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTClassSpecifier#getClassKind()
|
||||
*/
|
||||
public ClassKind getClassKind()
|
||||
public ASTClassKind getClassKind()
|
||||
{
|
||||
return classKind;
|
||||
}
|
||||
|
@ -104,7 +76,7 @@ public class ASTClassSpecifier
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTClassSpecifier#getCurrentVisiblity()
|
||||
*/
|
||||
public AccessVisibility getCurrentVisibilityMode()
|
||||
public ASTAccessVisibility getCurrentVisibilityMode()
|
||||
{
|
||||
return access;
|
||||
}
|
||||
|
@ -185,11 +157,4 @@ public class ASTClassSpecifier
|
|||
{
|
||||
baseClauses.add(baseSpecifier);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTClassSpecifier#getFullyQualifiedName()
|
||||
*/
|
||||
public String[] getFullyQualifiedName()
|
||||
{
|
||||
return qualifiedNames;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
***********************************************************************/
|
||||
package org.eclipse.cdt.internal.core.parser.ast.quick;
|
||||
|
||||
import org.eclipse.cdt.core.parser.ast.ClassKind;
|
||||
import org.eclipse.cdt.core.parser.ast.ASTClassKind;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTElaboratedTypeSpecifier;
|
||||
import org.eclipse.cdt.internal.core.parser.ast.Offsets;
|
||||
|
||||
|
@ -23,14 +23,14 @@ public class ASTElaboratedTypeSpecifier implements IASTElaboratedTypeSpecifier
|
|||
|
||||
private Offsets offsets = new Offsets();
|
||||
private final String typeName;
|
||||
private final ClassKind classKind;
|
||||
private final ASTClassKind classKind;
|
||||
/**
|
||||
* @param elaboratedClassKind
|
||||
* @param typeName
|
||||
* @param startingOffset
|
||||
* @param endOffset
|
||||
*/
|
||||
public ASTElaboratedTypeSpecifier(ClassKind elaboratedClassKind, String typeName, int startingOffset, int endOffset)
|
||||
public ASTElaboratedTypeSpecifier(ASTClassKind elaboratedClassKind, String typeName, int startingOffset, int endOffset)
|
||||
{
|
||||
classKind = elaboratedClassKind;
|
||||
this.typeName = typeName;
|
||||
|
@ -47,7 +47,7 @@ public class ASTElaboratedTypeSpecifier implements IASTElaboratedTypeSpecifier
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTElaboratedTypeSpecifier#getClassKind()
|
||||
*/
|
||||
public ClassKind getClassKind()
|
||||
public ASTClassKind getClassKind()
|
||||
{
|
||||
return classKind;
|
||||
}
|
||||
|
|
|
@ -23,14 +23,14 @@ import org.eclipse.cdt.internal.core.parser.ast.NamedOffsets;
|
|||
* @author jcamelon
|
||||
*
|
||||
*/
|
||||
public class ASTNamespaceDefinition extends ASTDeclaration implements IASTNamespaceDefinition, IASTQScope {
|
||||
public class ASTNamespaceDefinition extends ASTQualifiedNamedDeclaration implements IASTNamespaceDefinition, IASTQScope {
|
||||
|
||||
private final String name;
|
||||
private NamedOffsets offsets = new NamedOffsets();
|
||||
|
||||
public ASTNamespaceDefinition( IASTScope scope, String name )
|
||||
{
|
||||
super( scope );
|
||||
super( scope, name );
|
||||
this.name = name;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
/**********************************************************************
|
||||
* Copyright (c) 2002,2003 Rational Software Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Common Public License v0.5
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/cpl-v05.html
|
||||
*
|
||||
* Contributors:
|
||||
* IBM Rational Software - Initial API and implementation
|
||||
***********************************************************************/
|
||||
package org.eclipse.cdt.internal.core.parser.ast.quick;
|
||||
|
||||
import java.util.Stack;
|
||||
|
||||
import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTDeclaration;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTNamespaceDefinition;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTScope;
|
||||
|
||||
/**
|
||||
* @author jcamelon
|
||||
*
|
||||
*/
|
||||
public class ASTQualifiedNamedDeclaration extends ASTDeclaration
|
||||
{
|
||||
|
||||
/**
|
||||
* @param scope
|
||||
*/
|
||||
public ASTQualifiedNamedDeclaration(IASTScope scope, String name )
|
||||
{
|
||||
super(scope);
|
||||
Stack names = new Stack();
|
||||
IASTScope parent = getOwnerScope();
|
||||
|
||||
names.push( name ); // push on our own name
|
||||
while (parent != null)
|
||||
{
|
||||
if (parent instanceof IASTNamespaceDefinition
|
||||
|| parent instanceof IASTClassSpecifier )
|
||||
{
|
||||
names.push(((IASTOffsetableNamedElement)parent).getName());
|
||||
parent = ((IASTDeclaration)parent).getOwnerScope();
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
if (names.size() != 0)
|
||||
{
|
||||
qualifiedNames = new String[names.size()];
|
||||
int counter = 0;
|
||||
while (!names.empty())
|
||||
qualifiedNames[counter++] = (String)names.pop();
|
||||
}
|
||||
else
|
||||
qualifiedNames = null;
|
||||
|
||||
}
|
||||
|
||||
public String[] getFullyQualifiedName()
|
||||
{
|
||||
return qualifiedNames;
|
||||
}
|
||||
|
||||
private final String[] qualifiedNames;
|
||||
|
||||
}
|
|
@ -14,8 +14,8 @@ import java.util.List;
|
|||
|
||||
import org.eclipse.cdt.core.parser.Backtrack;
|
||||
import org.eclipse.cdt.core.parser.ITokenDuple;
|
||||
import org.eclipse.cdt.core.parser.ast.AccessVisibility;
|
||||
import org.eclipse.cdt.core.parser.ast.ClassKind;
|
||||
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
|
||||
import org.eclipse.cdt.core.parser.ast.ASTClassKind;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTASMDefinition;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTBaseSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier;
|
||||
|
@ -39,8 +39,8 @@ import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier.ClassNameType;
|
|||
import org.eclipse.cdt.core.parser.ast.IASTExpression.IASTNewExpressionDescriptor;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTExpression.Kind;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTSimpleTypeSpecifier.SimpleType;
|
||||
import org.eclipse.cdt.internal.core.parser.IASTArrayModifier;
|
||||
import org.eclipse.cdt.internal.core.parser.ast.BaseASTFactory;
|
||||
import org.eclipse.cdt.internal.core.parser.ast.IASTArrayModifier;
|
||||
|
||||
/**
|
||||
* @author jcamelon
|
||||
|
@ -99,7 +99,7 @@ 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, String name, ClassKind kind, ClassNameType type, AccessVisibility access, IASTTemplateDeclaration ownerTemplateDeclaration, int startingOffset, int nameOffset) {
|
||||
public IASTClassSpecifier createClassSpecifier(IASTScope scope, String name, ASTClassKind kind, ClassNameType type, ASTAccessVisibility access, IASTTemplateDeclaration ownerTemplateDeclaration, int startingOffset, int nameOffset) {
|
||||
IASTClassSpecifier spec = new ASTClassSpecifier( scope, name, kind, type, access, ownerTemplateDeclaration );
|
||||
spec.setStartingOffset( startingOffset );
|
||||
spec.setNameOffset( nameOffset );
|
||||
|
@ -109,7 +109,7 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#addBaseSpecifier(org.eclipse.cdt.core.parser.ast.IASTClassSpecifier, boolean, org.eclipse.cdt.core.parser.ast.AccessVisibility, java.lang.String)
|
||||
*/
|
||||
public void addBaseSpecifier(IASTClassSpecifier astClassSpec, boolean isVirtual, AccessVisibility visibility, String string) {
|
||||
public void addBaseSpecifier(IASTClassSpecifier astClassSpec, boolean isVirtual, ASTAccessVisibility visibility, String string) {
|
||||
IASTBaseSpecifier baseSpecifier = new ASTBaseSpecifier( astClassSpec, isVirtual, visibility );
|
||||
((IASTQClassSpecifier)astClassSpec).addBaseClass(baseSpecifier);
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createElaboratedTypeSpecifier(org.eclipse.cdt.core.parser.ast.ClassKind, java.lang.String, int, int)
|
||||
*/
|
||||
public IASTElaboratedTypeSpecifier createElaboratedTypeSpecifier(ClassKind elaboratedClassKind, String typeName, int startingOffset, int endOffset)
|
||||
public IASTElaboratedTypeSpecifier createElaboratedTypeSpecifier(ASTClassKind elaboratedClassKind, String typeName, int startingOffset, int endOffset)
|
||||
{
|
||||
return new ASTElaboratedTypeSpecifier( elaboratedClassKind, typeName, startingOffset, endOffset );
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ package org.eclipse.cdt.internal.core.parser.pst;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.core.parser.ast.AccessVisibility;
|
||||
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
|
||||
|
||||
/**
|
||||
* @author aniefer
|
||||
|
@ -29,7 +29,7 @@ import org.eclipse.cdt.core.parser.ast.AccessVisibility;
|
|||
public interface IDerivableContainerSymbol extends IContainerSymbol {
|
||||
|
||||
public void addParent( ISymbol parent );
|
||||
public void addParent( ISymbol parent, boolean virtual, AccessVisibility visibility );
|
||||
public void addParent( ISymbol parent, boolean virtual, ASTAccessVisibility visibility );
|
||||
public List getParents();
|
||||
public boolean hasParents();
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ import java.util.ListIterator;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.cdt.core.parser.ast.AccessVisibility;
|
||||
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
|
||||
import org.eclipse.cdt.internal.core.parser.ast.full.IPSTSymbolExtension;
|
||||
|
||||
/**
|
||||
|
@ -2337,9 +2337,9 @@ public class ParserSymbolTable {
|
|||
}
|
||||
|
||||
public void addParent( ISymbol parent ){
|
||||
addParent( parent, false, AccessVisibility.PUBLIC );
|
||||
addParent( parent, false, ASTAccessVisibility.PUBLIC );
|
||||
}
|
||||
public void addParent( ISymbol parent, boolean virtual, AccessVisibility visibility ){
|
||||
public void addParent( ISymbol parent, boolean virtual, ASTAccessVisibility visibility ){
|
||||
if( _parentScopes == null ){
|
||||
_parentScopes = new LinkedList();
|
||||
}
|
||||
|
@ -3104,7 +3104,7 @@ public class ParserSymbolTable {
|
|||
|
||||
public class ParentWrapper implements IDerivableContainerSymbol.IParentSymbol
|
||||
{
|
||||
public ParentWrapper( ISymbol p, boolean v, AccessVisibility s ){
|
||||
public ParentWrapper( ISymbol p, boolean v, ASTAccessVisibility s ){
|
||||
parent = p;
|
||||
isVirtual = v;
|
||||
access = s;
|
||||
|
@ -3128,11 +3128,11 @@ public class ParserSymbolTable {
|
|||
|
||||
private boolean isVirtual = false;
|
||||
private ISymbol parent = null;
|
||||
private final AccessVisibility access;
|
||||
private final ASTAccessVisibility access;
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
public AccessVisibility getAccess() {
|
||||
public ASTAccessVisibility getAccess() {
|
||||
return access;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ import org.eclipse.cdt.core.parser.IToken;
|
|||
import org.eclipse.cdt.core.parser.ParserFactory;
|
||||
import org.eclipse.cdt.core.parser.ParserMode;
|
||||
import org.eclipse.cdt.core.parser.ScannerException;
|
||||
import org.eclipse.cdt.core.parser.ast.ClassKind;
|
||||
import org.eclipse.cdt.core.parser.ast.ASTClassKind;
|
||||
import org.eclipse.cdt.core.search.ICSearchConstants;
|
||||
import org.eclipse.cdt.core.search.ICSearchPattern;
|
||||
import org.eclipse.cdt.internal.core.search.CharOperation;
|
||||
|
@ -146,15 +146,15 @@ public abstract class CSearchPattern implements ICSearchConstants, ICSearchPatte
|
|||
} catch (ScannerException e) {
|
||||
}
|
||||
|
||||
ClassKind kind = null;
|
||||
ASTClassKind kind = null;
|
||||
if( searchFor == CLASS ){
|
||||
kind = ClassKind.CLASS;
|
||||
kind = ASTClassKind.CLASS;
|
||||
} else if( searchFor == STRUCT ) {
|
||||
kind = ClassKind.STRUCT;
|
||||
kind = ASTClassKind.STRUCT;
|
||||
} else if ( searchFor == ENUM ) {
|
||||
kind = ClassKind.ENUM;
|
||||
kind = ASTClassKind.ENUM;
|
||||
} else if ( searchFor == UNION ) {
|
||||
kind = ClassKind.UNION;
|
||||
kind = ASTClassKind.UNION;
|
||||
}
|
||||
|
||||
char [][] qualifications = new char[0][];
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*/
|
||||
package org.eclipse.cdt.internal.core.search.matching;
|
||||
|
||||
import org.eclipse.cdt.core.parser.ast.ClassKind;
|
||||
import org.eclipse.cdt.core.parser.ast.ASTClassKind;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTOffsetableElement;
|
||||
import org.eclipse.cdt.internal.core.search.CharOperation;
|
||||
|
@ -30,7 +30,7 @@ public class ClassDeclarationPattern extends CSearchPattern {
|
|||
super( matchMode, caseSensitive );
|
||||
}
|
||||
|
||||
public ClassDeclarationPattern( char[] name, char[][] containers, ClassKind kind, int mode, boolean caseSensitive ){
|
||||
public ClassDeclarationPattern( char[] name, char[][] containers, ASTClassKind kind, int mode, boolean caseSensitive ){
|
||||
super( mode, caseSensitive );
|
||||
simpleName = caseSensitive ? name : CharOperation.toLowerCase( name );
|
||||
if( caseSensitive || containers == null ){
|
||||
|
@ -90,6 +90,6 @@ public class ClassDeclarationPattern extends CSearchPattern {
|
|||
|
||||
private char[] simpleName;
|
||||
private char[][] containingTypes;
|
||||
private ClassKind classKind;
|
||||
private ASTClassKind classKind;
|
||||
|
||||
}
|
||||
|
|
|
@ -77,7 +77,6 @@ public class MatchLocator implements ISourceElementRequestor {
|
|||
public void acceptElaboratedTypeSpecifier(IASTElaboratedTypeSpecifier elaboratedTypeSpec){ }
|
||||
public void acceptMethodDeclaration(IASTMethod method) { }
|
||||
public void acceptField(IASTField field) { }
|
||||
public void acceptConstructor(IASTConstructor constructor) { }
|
||||
public void enterFunctionBody(IASTFunction function) { }
|
||||
public void enterCompilationUnit(IASTCompilationUnit compilationUnit) { }
|
||||
public void enterNamespaceDefinition(IASTNamespaceDefinition namespaceDefinition) { }
|
||||
|
|
Loading…
Add table
Reference in a new issue