diff --git a/core/org.eclipse.cdt.core/.classpath b/core/org.eclipse.cdt.core/.classpath index 9d6202a599d..1c2ef2fda6b 100644 --- a/core/org.eclipse.cdt.core/.classpath +++ b/core/org.eclipse.cdt.core/.classpath @@ -10,5 +10,6 @@ + diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/CPPASTVisitor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/CPPASTVisitor.java index fcd2418ebcb..da175dd5fb4 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/CPPASTVisitor.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/CPPASTVisitor.java @@ -17,13 +17,56 @@ package org.eclipse.cdt.core.dom.ast.cpp; import org.eclipse.cdt.core.dom.ast.ASTVisitor; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier; +/** + * C++ specific visitor class. + * + * @author jcamelon + */ +public abstract class CPPASTVisitor extends ASTVisitor { -public abstract class CPPASTVisitor extends ASTVisitor{ + /** + * Overide this value if you wish to visit base specifiers off composite + * types. + */ public boolean shouldVisitBaseSpecifiers = false; - public boolean shouldVisitNamespaces = false; + + /** + * Overide this value if you wish to visit namespaces. + */ + public boolean shouldVisitNamespaces = false; + + /** + * Overide this value if you wish to visit template parameters. + */ public boolean shouldVisitTemplateParameters = false; - - public int visit( ICPPASTBaseSpecifier specifier ) { return PROCESS_CONTINUE; } - public int visit( ICPPASTNamespaceDefinition namespace ){ return PROCESS_CONTINUE; } - public int visit( ICPPASTTemplateParameter parameter ) { return PROCESS_CONTINUE; } + + /** + * Visit BaseSpecifiers. + * + * @param specifier + * @return + */ + public int visit(ICPPASTBaseSpecifier specifier) { + return PROCESS_CONTINUE; + } + + /** + * Visit namespace definitions. + * + * @param namespace + * @return + */ + public int visit(ICPPASTNamespaceDefinition namespace) { + return PROCESS_CONTINUE; + } + + /** + * Visit template parameter. + * + * @param parameter + * @return + */ + public int visit(ICPPASTTemplateParameter parameter) { + return PROCESS_CONTINUE; + } } \ No newline at end of file diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTBinaryExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTBinaryExpression.java index 9f46ab049d7..b881b34582f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTBinaryExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTBinaryExpression.java @@ -13,11 +13,24 @@ package org.eclipse.cdt.core.dom.ast.cpp; import org.eclipse.cdt.core.dom.ast.IASTBinaryExpression; /** + * C++ adds a few more binary expressions over C. + * * @author jcamelon */ public interface ICPPASTBinaryExpression extends IASTBinaryExpression { - public static final int op_pmdot = IASTBinaryExpression.op_last + 1; - public static final int op_pmarrow = IASTBinaryExpression.op_last + 2; - public static final int op_last = op_pmarrow; + /** + * op_pmdot pointer-to-member field dereference. + */ + public static final int op_pmdot = IASTBinaryExpression.op_last + 1; + + /** + * op_pmarrow pointer-to-member pointer dereference. + */ + public static final int op_pmarrow = IASTBinaryExpression.op_last + 2; + + /** + * op_last is defined for subinterfaces to further extend. + */ + public static final int op_last = op_pmarrow; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTCastExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTCastExpression.java index 7ae776a1970..24d32170181 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTCastExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTCastExpression.java @@ -13,13 +13,34 @@ package org.eclipse.cdt.core.dom.ast.cpp; import org.eclipse.cdt.core.dom.ast.IASTCastExpression; /** + * C++ adds in additional cast-style expressions. + * * @author jcamelon */ public interface ICPPASTCastExpression extends IASTCastExpression { - public static final int op_dynamic_cast = IASTCastExpression.op_last + 1; - public static final int op_static_cast = IASTCastExpression.op_last + 2; - public static final int op_reinterpret_cast = IASTCastExpression.op_last + 3; - public static final int op_const_cast = IASTCastExpression.op_last + 4; - public static final int op_last = op_const_cast; + /** + * op_dynamic_cast is used for dynamic_cast<>'s. + */ + public static final int op_dynamic_cast = IASTCastExpression.op_last + 1; + + /** + * op_static_cast is used for static_cast<>'s. + */ + public static final int op_static_cast = IASTCastExpression.op_last + 2; + + /** + * op_reinterpret_cast is used for reinterpret_cast<>'s. + */ + public static final int op_reinterpret_cast = IASTCastExpression.op_last + 3; + + /** + * op_const_cast is used for const_cast<>'s. + */ + public static final int op_const_cast = IASTCastExpression.op_last + 4; + + /** + * op_last is for subinterfaces to extend. + */ + public static final int op_last = op_const_cast; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTCatchHandler.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTCatchHandler.java index c0a68e35772..3d47c611814 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTCatchHandler.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTCatchHandler.java @@ -15,32 +15,73 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclaration; import org.eclipse.cdt.core.dom.ast.IASTStatement; /** + * Catch handler serves as a standalone stage. + * * @author jcamelon */ public interface ICPPASTCatchHandler extends IASTStatement { - public static final ICPPASTCatchHandler [] EMPTY_CATCHHANDLER_ARRAY = new ICPPASTCatchHandler[0]; - - public static final ASTNodeProperty DECLARATION = new ASTNodeProperty( "Declaration"); //$NON-NLS-1$ - public static final ASTNodeProperty CATCH_BODY = new ASTNodeProperty( "Catch Body"); //$NON-NLS-1$ + /** + * Constant + */ + public static final ICPPASTCatchHandler[] EMPTY_CATCHHANDLER_ARRAY = new ICPPASTCatchHandler[0]; - /** - * @param isEllipsis - */ - public void setIsCatchAll(boolean isEllipsis); - public boolean isCatchAll(); + /** + * DECLARATION represnts the nested declaration within the + * catch handler. + */ + public static final ASTNodeProperty DECLARATION = new ASTNodeProperty( + "Declaration"); //$NON-NLS-1$ - /** - * @param compoundStatement - */ - public void setCatchBody(IASTStatement compoundStatement); - public IASTStatement getCatchBody(); + /** + * CATCH_BODY represents the nested (compound) statement. + */ + public static final ASTNodeProperty CATCH_BODY = new ASTNodeProperty( + "Catch Body"); //$NON-NLS-1$ - /** - * @param decl - */ - public void setDeclaration(IASTDeclaration decl); - public IASTDeclaration getDeclaration(); - + /** + * Set is catch all handler. + * + * @param isEllipsis + * boolean + */ + public void setIsCatchAll(boolean isEllipsis); + + /** + * Is this catch handler for all exceptions? + * + * @return boolean + */ + public boolean isCatchAll(); + + /** + * Set the catch body. + * + * @param compoundStatement + * IASTStatement + */ + public void setCatchBody(IASTStatement compoundStatement); + + /** + * Get the cathc body. + * + * @return IASTStatement + */ + public IASTStatement getCatchBody(); + + /** + * Set the declaration. + * + * @param decl + * IASTDeclaration + */ + public void setDeclaration(IASTDeclaration decl); + + /** + * Get the declaration. + * + * @return IASTDeclaration + */ + public IASTDeclaration getDeclaration(); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTCompositeTypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTCompositeTypeSpecifier.java index cf3713b70d1..5c591dc0836 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTCompositeTypeSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTCompositeTypeSpecifier.java @@ -18,35 +18,126 @@ import org.eclipse.cdt.core.dom.ast.IASTNode; /** * @author jcamelon */ -public interface ICPPASTCompositeTypeSpecifier extends IASTCompositeTypeSpecifier, - ICPPASTDeclSpecifier { +public interface ICPPASTCompositeTypeSpecifier extends + IASTCompositeTypeSpecifier, ICPPASTDeclSpecifier { + + /** + * k_class C++ introduces the class concept for composite + * types. + */ + public static final int k_class = IASTCompositeTypeSpecifier.k_last + 1; + + /** + * k_last allows for subinterfaces to extend the kind type. + */ + public static final int k_last = k_class; + + /** + * VISIBILITY_LABEL is used to express the relationship for a + * visibility label "declaration". + */ + public static final ASTNodeProperty VISIBILITY_LABEL = new ASTNodeProperty( + "Visibility Label"); //$NON-NLS-1$ + + /** + * BASE_SPECIFIER expresses the subclass role. + */ + public static final ASTNodeProperty BASE_SPECIFIER = new ASTNodeProperty( + "Base Specifier"); //$NON-NLS-1$ + + /** + * Base Specifiers are where a class expresses from whom it inherits. + * + * @author jcamelon + */ + public static interface ICPPASTBaseSpecifier extends IASTNode { + /** + * Constant. + */ + public static final ICPPASTBaseSpecifier[] EMPTY_BASESPECIFIER_ARRAY = new ICPPASTBaseSpecifier[0]; + + /** + * Is the keyword virtual used? + * + * @return boolean + */ + public boolean isVirtual(); + + /** + * Set the virtual flag on/off. + * + * @param value + * boolean + */ + public void setVirtual(boolean value); + + /** + * v_public was public keyword used in describing this + * base class? + */ + public static final int v_public = 1; + + /** + * v_protected was protected keyword used in describing + * this base class? + */ + public static final int v_protected = 2; + + /** + * v_private was private keyword used in describing this + * base class? + */ + public static final int v_private = 3; + + /** + * Get the visibility. + * + * @return int + */ + public int getVisibility(); + + /** + * Set the visibility. + * + * @param visibility + */ + public void setVisibility(int visibility); + + /** + * NAME is the name of the base class. + */ + public static final ASTNodeProperty NAME = new ASTNodeProperty( + "BaseSpec Name"); //$NON-NLS-1$ + + /** + * Get the name. + * + * @return IASTName + */ + public IASTName getName(); + + /** + * Set the name. + * + * @param name + * IASTName + */ + public void setName(IASTName name); + } + + /** + * Get the base specifiers. + * + * @return ICPPASTBaseSpecifier [] + */ + public ICPPASTBaseSpecifier[] getBaseSpecifiers(); + + /** + * Add a base specifier. + * + * @param baseSpec + * ICPPASTBaseSpecifier + */ + public void addBaseSpecifier(ICPPASTBaseSpecifier baseSpec); - public static final int k_class = IASTCompositeTypeSpecifier.k_last + 1; - public static final int k_last = k_class; - - public static final ASTNodeProperty VISIBILITY_LABEL = new ASTNodeProperty( "Visibility Label"); //$NON-NLS-1$ - public static final ASTNodeProperty BASE_SPECIFIER = new ASTNodeProperty( "Base Specifier"); //$NON-NLS-1$ - - public static interface ICPPASTBaseSpecifier extends IASTNode - { - public static final ICPPASTBaseSpecifier[] EMPTY_BASESPECIFIER_ARRAY = new ICPPASTBaseSpecifier[0]; - - public boolean isVirtual(); - public void setVirtual( boolean value ); - - public static final int v_public = 1; - public static final int v_protected = 2; - public static final int v_private = 3; - - public int getVisibility(); - public void setVisibility( int visibility ); - - public static final ASTNodeProperty NAME = new ASTNodeProperty( "BaseSpec Name"); //$NON-NLS-1$ - public IASTName getName(); - public void setName( IASTName name ); - } - - public ICPPASTBaseSpecifier[] getBaseSpecifiers(); - public void addBaseSpecifier( ICPPASTBaseSpecifier baseSpec ); - } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTConstructorChainInitializer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTConstructorChainInitializer.java index feb160c0294..c75c6161ba0 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTConstructorChainInitializer.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTConstructorChainInitializer.java @@ -19,14 +19,52 @@ import org.eclipse.cdt.core.dom.ast.IASTNode; * @author jcamelon */ public interface ICPPASTConstructorChainInitializer extends IASTNode { - public static final ICPPASTConstructorChainInitializer [] EMPTY_CONSTRUCTORCHAININITIALIZER_ARRAY = new ICPPASTConstructorChainInitializer[0]; - - public static final ASTNodeProperty MEMBER_ID = new ASTNodeProperty( "Member Initializer Id"); //$NON-NLS-1$ - public IASTName getMemberInitializerId(); - public void setMemberInitializerId( IASTName name ); - - public static final ASTNodeProperty INITIALIZER = new ASTNodeProperty( "Expression Initializer"); //$NON-NLS-1$ - public IASTExpression getInitializerValue(); - public void setInitializerValue( IASTExpression expression ); + /** + * Constant. + */ + public static final ICPPASTConstructorChainInitializer[] EMPTY_CONSTRUCTORCHAININITIALIZER_ARRAY = new ICPPASTConstructorChainInitializer[0]; + + /** + * MEMBER_ID represents the class field name being + * initialized. + */ + public static final ASTNodeProperty MEMBER_ID = new ASTNodeProperty( + "Member Initializer Id"); //$NON-NLS-1$ + + /** + * Get the field name. + * + * @return IASTName + */ + public IASTName getMemberInitializerId(); + + /** + * Set the field name. + * + * @param name + * IASTName + */ + public void setMemberInitializerId(IASTName name); + + /** + * Expression field is being initialized to. + */ + public static final ASTNodeProperty INITIALIZER = new ASTNodeProperty( + "Expression Initializer"); //$NON-NLS-1$ + + /** + * Get the initializer value. + * + * @return IASTExpression + */ + public IASTExpression getInitializerValue(); + + /** + * Set the initializer value. + * + * @param expression + * IASTExpression + */ + public void setInitializerValue(IASTExpression expression); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTConstructorInitializer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTConstructorInitializer.java index 682bcac8b45..1fd9f44882c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTConstructorInitializer.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTConstructorInitializer.java @@ -15,20 +15,31 @@ import org.eclipse.cdt.core.dom.ast.IASTExpression; import org.eclipse.cdt.core.dom.ast.IASTInitializer; /** - * This is an initializer that is a call to the constructor for the - * declarator. + * This is an initializer that is a call to the constructor for the declarator. * * @author Doug Schaefer */ public interface ICPPASTConstructorInitializer extends IASTInitializer { + /** + * EXPRESSION represents the expression being conusmed in a + * constructor. + */ + public static final ASTNodeProperty EXPRESSION = new ASTNodeProperty( + "Expression"); //$NON-NLS-1$ + /** * Get the arguments to the constructor. * * @return IASTExpression */ - public static final ASTNodeProperty EXPRESSION = new ASTNodeProperty( "Expression"); //$NON-NLS-1$ public IASTExpression getExpression(); - public void setExpression( IASTExpression expression ); - + + /** + * Set the arguments to the constructor. + * + * @param expression + */ + public void setExpression(IASTExpression expression); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTDeclSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTDeclSpecifier.java index 8d0025a5d9d..fa412eefaca 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTDeclSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTDeclSpecifier.java @@ -13,22 +13,67 @@ package org.eclipse.cdt.core.dom.ast.cpp; import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier; /** + * C++ adds additional modifiers and types for decl specifier sequence. + * * @author Doug Schaefer */ public interface ICPPASTDeclSpecifier extends IASTDeclSpecifier { // Extra storage class in C++ + /** + * sc_mutable represents a mutable storage representation. + */ public static final int sc_mutable = IASTDeclSpecifier.sc_last + 1; + + /** + * sc_last is overwritten to allow extensibility. + */ public static final int sc_last = sc_mutable; // A declaration in C++ can be a friend declaration + /** + * Is this a friend declaration? + * + * @return boolean + */ public boolean isFriend(); - public void setFriend( boolean value ); - + + /** + * Set this to be a friend declaration true/false. + * + * @param value + * boolean + */ + public void setFriend(boolean value); + + /** + * Is this a virtual function? + * + * @return boolean + */ public boolean isVirtual(); - public void setVirtual( boolean value ); - + + /** + * Set this declaration to be virutal. + * + * @param value + * boolean + */ + public void setVirtual(boolean value); + + /** + * Is this an explicit constructor? + * + * @return boolean + */ public boolean isExplicit(); - public void setExplicit( boolean value ); - + + /** + * Set this to be an explicit constructor. + * + * @param value + * boolean + */ + public void setExplicit(boolean value); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTDeleteExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTDeleteExpression.java index 4baefcdeb59..a1cc202e29a 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTDeleteExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTDeleteExpression.java @@ -14,23 +14,59 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty; import org.eclipse.cdt.core.dom.ast.IASTExpression; /** + * This interface represents a delete expression. delete [] operand; + * * @author jcamelon */ public interface ICPPASTDeleteExpression extends IASTExpression { - public static final ASTNodeProperty OPERAND = new ASTNodeProperty( "Operand"); //$NON-NLS-1$ - public IASTExpression getOperand(); - public void setOperand( IASTExpression expression ); - /** - * @param global - */ - public void setIsGlobal(boolean global); - public boolean isGlobal(); + /** + * OPERAND is the expression representing the pointer being + * deleted. + */ + public static final ASTNodeProperty OPERAND = new ASTNodeProperty("Operand"); //$NON-NLS-1$ - /** - * @param vectored - */ - public void setIsVectored(boolean vectored); - public boolean isVectored(); + /** + * Get the operand. + * + * @return IASTExpression + */ + public IASTExpression getOperand(); + + /** + * @param expression + * IASTExpression + */ + public void setOperand(IASTExpression expression); + + /** + * Set this to be the global delete function called. + * + * @param global + * boolean + */ + public void setIsGlobal(boolean global); + + /** + * Is this the global delete function called? + * + * @return boolean + */ + public boolean isGlobal(); + + /** + * Set this to be a vector delete. ([]) + * + * @param vectored + * boolean + */ + public void setIsVectored(boolean vectored); + + /** + * Is this a delete [] ? + * + * @return boolean + */ + public boolean isVectored(); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTElaboratedTypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTElaboratedTypeSpecifier.java index fff89663504..03a72f48cb1 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTElaboratedTypeSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTElaboratedTypeSpecifier.java @@ -13,12 +13,21 @@ package org.eclipse.cdt.core.dom.ast.cpp; import org.eclipse.cdt.core.dom.ast.IASTElaboratedTypeSpecifier; /** + * Elaborated types in C++ include classes. + * * @author jcamelon */ public interface ICPPASTElaboratedTypeSpecifier extends - IASTElaboratedTypeSpecifier, ICPPASTDeclSpecifier { + IASTElaboratedTypeSpecifier, ICPPASTDeclSpecifier { + + /** + * k_class represents elaborated class declaration + */ + public static final int k_class = IASTElaboratedTypeSpecifier.k_last + 1; + + /** + * k_last is defined for subinterfaces. + */ + public static final int k_last = k_class; - public static final int k_class = IASTElaboratedTypeSpecifier.k_last + 1; - public static final int k_last = k_class; - } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTExplicitTemplateInstantiation.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTExplicitTemplateInstantiation.java index f7abeb58002..8cb86c963cf 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTExplicitTemplateInstantiation.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTExplicitTemplateInstantiation.java @@ -14,12 +14,32 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty; import org.eclipse.cdt.core.dom.ast.IASTDeclaration; /** + * This interface represents an explict template instantiation. + * * @author jcamelon */ public interface ICPPASTExplicitTemplateInstantiation extends IASTDeclaration { - public static final ASTNodeProperty OWNED_DECLARATION = new ASTNodeProperty( "Owned Declaration"); //$NON-NLS-1$ - public IASTDeclaration getDeclaration(); - public void setDeclaration( IASTDeclaration declaration ); + /** + * OWNED_DECLARATION represents the role of the inner + * declaration that this template refers to. + */ + public static final ASTNodeProperty OWNED_DECLARATION = new ASTNodeProperty( + "Owned Declaration"); //$NON-NLS-1$ + + /** + * Get the owned declaration. + * + * @return IASTDeclaration + */ + public IASTDeclaration getDeclaration(); + + /** + * Set the owned declaration. + * + * @param declaration + * IASTDeclaration + */ + public void setDeclaration(IASTDeclaration declaration); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFieldReference.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFieldReference.java index bccf78913db..42a258ea60a 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFieldReference.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFieldReference.java @@ -13,12 +13,25 @@ package org.eclipse.cdt.core.dom.ast.cpp; import org.eclipse.cdt.core.dom.ast.IASTFieldReference; /** + * Certain field references in C++ require the use the keyword template to + * specify the parse. + * * @author jcamelon */ public interface ICPPASTFieldReference extends IASTFieldReference { - public boolean isTemplate(); - public void setIsTemplate( boolean value ); - - + /** + * Was template keyword used? + * + * @return + */ + public boolean isTemplate(); + + /** + * Set the template keyword used. + * + * @param value + */ + public void setIsTemplate(boolean value); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFunctionDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFunctionDeclarator.java index 5ad94aefb2d..97b9ef5374f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFunctionDeclarator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFunctionDeclarator.java @@ -16,30 +16,106 @@ import org.eclipse.cdt.core.dom.ast.IASTTypeId; /** * C++ adds a few things to function declarators. - * + * * @author Doug Schaefer */ -public interface ICPPASTFunctionDeclarator extends IASTStandardFunctionDeclarator { +public interface ICPPASTFunctionDeclarator extends + IASTStandardFunctionDeclarator { - - public boolean isConst(); - public void setConst( boolean value ); - + /** + * Is this a const method? + * + * @return boolean + */ + public boolean isConst(); + + /** + * Set the method to be const or not. + * + * @param value + * boolean + */ + public void setConst(boolean value); + + /** + * Is this a volatile method? + * + * @return boolean + */ public boolean isVolatile(); - public void setVolatile( boolean value ); - - public static final ASTNodeProperty EXCEPTION_TYPEID = new ASTNodeProperty( "Exception TypeId"); //$NON-NLS-1$ - public IASTTypeId [] getExceptionSpecification(); - public void addExceptionSpecificationTypeId( IASTTypeId typeId ); - /** - * @param isPureVirtual - */ - public boolean isPureVirtual(); - public void setPureVirtual(boolean isPureVirtual); - - public static final ASTNodeProperty CONSTRUCTOR_CHAIN_MEMBER = new ASTNodeProperty( "Constructor Chain Member"); //$NON-NLS-1$ - public ICPPASTConstructorChainInitializer[] getConstructorChain(); - public void addConstructorToChain( ICPPASTConstructorChainInitializer initializer ); - public ICPPFunctionScope getFunctionScope(); + /** + * Set the method to be volatile or not. + * + * @param value + * boolean + */ + public void setVolatile(boolean value); + + /** + * EXCEPTION_TYPEID represents the type IDs throws in the + * exception specification. + */ + public static final ASTNodeProperty EXCEPTION_TYPEID = new ASTNodeProperty( + "Exception TypeId"); //$NON-NLS-1$ + + /** + * Get the exception specification. + * + * @return IASTTypeId [] + */ + public IASTTypeId[] getExceptionSpecification(); + + /** + * Add an exception specification type Id. + * + * @param typeId + * IASTTypeId + */ + public void addExceptionSpecificationTypeId(IASTTypeId typeId); + + /** + * Is the method pure virtual? + * + * @return boolean + */ + public boolean isPureVirtual(); + + /** + * Set thid method to be pure virtual. + * + * @param isPureVirtual + * boolean + */ + public void setPureVirtual(boolean isPureVirtual); + + /** + * CONSTRUCTOR_CHAIN_MEMBER is the role of a constructor + * chain initializer. + */ + public static final ASTNodeProperty CONSTRUCTOR_CHAIN_MEMBER = new ASTNodeProperty( + "Constructor Chain Member"); //$NON-NLS-1$ + + /** + * Get constructor chain. + * + * @return ICPPASTConstructorChainInitializer[] + */ + public ICPPASTConstructorChainInitializer[] getConstructorChain(); + + /** + * Add a constructor chain initializer to constructor chain. + * + * @param initializer + * ICPPASTConstructorChainInitializer + */ + public void addConstructorToChain( + ICPPASTConstructorChainInitializer initializer); + + /** + * Get function scope this node represents. + * + * @return ICPPFunctionScope scope + */ + public ICPPFunctionScope getFunctionScope(); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFunctionTryBlockDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFunctionTryBlockDeclarator.java index 563cda95319..ce4efe3cdd0 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFunctionTryBlockDeclarator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFunctionTryBlockDeclarator.java @@ -13,12 +13,32 @@ package org.eclipse.cdt.core.dom.ast.cpp; import org.eclipse.cdt.core.dom.ast.ASTNodeProperty; /** + * This is a function try block declarator. + * * @author jcamelon */ public interface ICPPASTFunctionTryBlockDeclarator extends - ICPPASTFunctionDeclarator { + ICPPASTFunctionDeclarator { - public static final ASTNodeProperty CATCH_HANDLER = new ASTNodeProperty( "Catch Handler"); //$NON-NLS-1$ - public void addCatchHandler( ICPPASTCatchHandler statement ); - public ICPPASTCatchHandler [] getCatchHandlers(); + /** + * A CATCH_HANDLER is the role of an ICPPASTCatchHandler in + * this interface. + */ + public static final ASTNodeProperty CATCH_HANDLER = new ASTNodeProperty( + "Catch Handler"); //$NON-NLS-1$ + + /** + * Add a catch handler. + * + * @param statement + * ICPPASTCatchHandler + */ + public void addCatchHandler(ICPPASTCatchHandler statement); + + /** + * Get catch handlers. + * + * @return ICPPASTCatchHandler + */ + public ICPPASTCatchHandler[] getCatchHandlers(); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTLinkageSpecification.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTLinkageSpecification.java index 49e2d486753..e3d64c3171e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTLinkageSpecification.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTLinkageSpecification.java @@ -14,14 +14,46 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty; import org.eclipse.cdt.core.dom.ast.IASTDeclaration; /** + * This interface represents a linkage specification. e.g. extern "C" { ... } + * * @author jcamelon */ public interface ICPPASTLinkageSpecification extends IASTDeclaration { - public String getLiteral(); - public void setLiteral( String value ); - - public static final ASTNodeProperty OWNED_DECLARATION = new ASTNodeProperty( "Owned Declaration"); //$NON-NLS-1$ - public IASTDeclaration [] getDeclarations(); - public void addDeclaration( IASTDeclaration declaration ); + /** + * Get the "literal" that represents the linkage. + * + * @return String + */ + public String getLiteral(); + + /** + * Set the "literal" that represents the linkage. + * + * @param value + * String + */ + public void setLiteral(String value); + + /** + * OWNED_DECLARATION is the owned declaration role for + * linkages. + */ + public static final ASTNodeProperty OWNED_DECLARATION = new ASTNodeProperty( + "Owned Declaration"); //$NON-NLS-1$ + + /** + * Get all of the declarations. + * + * @return IASTDeclaration[] + */ + public IASTDeclaration[] getDeclarations(); + + /** + * Add another declaration to the linkage. + * + * @param declaration + * IASTDeclaration + */ + public void addDeclaration(IASTDeclaration declaration); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTLiteralExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTLiteralExpression.java index ad09ba69802..10538bd4fa7 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTLiteralExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTLiteralExpression.java @@ -13,12 +13,29 @@ package org.eclipse.cdt.core.dom.ast.cpp; import org.eclipse.cdt.core.dom.ast.IASTLiteralExpression; /** + * C++ adds additional literal types to primary expression. + * * @author jcamelon */ public interface ICPPASTLiteralExpression extends IASTLiteralExpression { - public static final int lk_this = IASTLiteralExpression.lk_last + 1; - public static final int lk_true = IASTLiteralExpression.lk_last + 2; - public static final int lk_false = IASTLiteralExpression.lk_last + 3; - public static final int lk_last = lk_false; + /** + * lk_this represents the 'this' keyword. + */ + public static final int lk_this = IASTLiteralExpression.lk_last + 1; + + /** + * lk_true represents the 'true' keyword. + */ + public static final int lk_true = IASTLiteralExpression.lk_last + 2; + + /** + * lk_false represents the 'false' keyword. + */ + public static final int lk_false = IASTLiteralExpression.lk_last + 3; + + /** + * lk_last is maintained for future subinterfaces. + */ + public static final int lk_last = lk_false; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNamedTypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNamedTypeSpecifier.java index 32a21f48004..f0c533f8a22 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNamedTypeSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNamedTypeSpecifier.java @@ -13,11 +13,27 @@ package org.eclipse.cdt.core.dom.ast.cpp; import org.eclipse.cdt.core.dom.ast.IASTNamedTypeSpecifier; /** + * C++ adds the capability of qualifying a named type specifier w/the keyword + * typename. + * * @author jcamelon */ -public interface ICPPASTNamedTypeSpecifier extends IASTNamedTypeSpecifier, ICPPASTDeclSpecifier { - - public boolean isTypename(); - public void setIsTypename( boolean value ); +public interface ICPPASTNamedTypeSpecifier extends IASTNamedTypeSpecifier, + ICPPASTDeclSpecifier { + + /** + * Was typename token consumed? + * + * @return boolean + */ + public boolean isTypename(); + + /** + * Set this value. + * + * @param value + * boolean + */ + public void setIsTypename(boolean value); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNamespaceAlias.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNamespaceAlias.java index 4063f2dbde9..f17c99c19b0 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNamespaceAlias.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNamespaceAlias.java @@ -15,17 +15,55 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclaration; import org.eclipse.cdt.core.dom.ast.IASTName; /** + * This interface represents a namespace alias in C++. e.g. namespace ABC { int + * x; } namspace DEF = ABC; + * * @author jcamelon */ public interface ICPPASTNamespaceAlias extends IASTDeclaration { - public static final ASTNodeProperty ALIAS_NAME = new ASTNodeProperty( "Alias name"); //$NON-NLS-1$ - public static final ASTNodeProperty MAPPING_NAME = new ASTNodeProperty( "Mapping name"); //$NON-NLS-1$ - - public IASTName getAlias(); - public void setAlias( IASTName name ); - - public IASTName getQualifiedName(); - public void setQualifiedName( IASTName qualifiedName ); - + /** + * ALIAS_NAME represents the new namespace name being + * introduced. + */ + public static final ASTNodeProperty ALIAS_NAME = new ASTNodeProperty( + "Alias name"); //$NON-NLS-1$ + + /** + * MAPPING_NAME represents the pre-existing namespace which + * the new symbol aliases. + */ + public static final ASTNodeProperty MAPPING_NAME = new ASTNodeProperty( + "Mapping name"); //$NON-NLS-1$ + + /** + * Get the new alias name. + * + * @return IASTName + */ + public IASTName getAlias(); + + /** + * Set the new alias name. + * + * @param name + * IASTName + */ + public void setAlias(IASTName name); + + /** + * Get the mapping name. + * + * @return IASTName + */ + public IASTName getMappingName(); + + /** + * Set the mapping name. + * + * @param qualifiedName + * IASTName + */ + public void setMappingName(IASTName qualifiedName); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNamespaceDefinition.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNamespaceDefinition.java index bc222e6e840..b9f67547606 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNamespaceDefinition.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNamespaceDefinition.java @@ -16,24 +16,60 @@ import org.eclipse.cdt.core.dom.ast.IASTName; import org.eclipse.cdt.core.dom.ast.IScope; /** + * This interface repesents a namespace definition in C++. + * * @author jcamelon */ public interface ICPPASTNamespaceDefinition extends IASTDeclaration { - - public static final ASTNodeProperty OWNED_DECLARATION = new ASTNodeProperty( "Owned" ); //$NON-NLS-1$ - public static final ASTNodeProperty NAMESPACE_NAME = new ASTNodeProperty( "Name"); //$NON-NLS-1$ - - - public IASTName getName(); - public void setName( IASTName name ); - /** + /** + * OWNED_DECLARATION is the role served by all the nested + * declarations. + */ + public static final ASTNodeProperty OWNED_DECLARATION = new ASTNodeProperty( + "Owned"); //$NON-NLS-1$ + + /** + * NAMESPACE_NAME is the role served by the name in this + * interface. + */ + public static final ASTNodeProperty NAMESPACE_NAME = new ASTNodeProperty( + "Name"); //$NON-NLS-1$ + + /** + * Get the name. + * + * @return IASTName + */ + public IASTName getName(); + + /** + * Set the name. + * + * @param name + * IASTName + */ + public void setName(IASTName name); + + /** * A translation unit contains an ordered sequence of declarations. * - * @return List of IASTDeclaration + * @return IASTDeclaration [] + */ + public IASTDeclaration[] getDeclarations(); + + /** + * Add a declaration to the namespace. + * + * @param declaration + * IASTDeclaration + */ + public void addDeclaration(IASTDeclaration declaration); + + /** + * Get the scope object represented by this construct. + * + * @return IScope */ - public IASTDeclaration [] getDeclarations(); - - public void addDeclaration( IASTDeclaration declaration ); public IScope getScope(); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNewExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNewExpression.java index 66fdfccfbe9..16f98df9322 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNewExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNewExpression.java @@ -15,30 +15,120 @@ import org.eclipse.cdt.core.dom.ast.IASTExpression; import org.eclipse.cdt.core.dom.ast.IASTTypeId; /** + * This interface represents a new expression. + * * @author jcamelon */ public interface ICPPASTNewExpression extends IASTExpression { - public boolean isGlobal(); - public void setIsGlobal( boolean value ); - - public static final ASTNodeProperty NEW_PLACEMENT = new ASTNodeProperty( "New Placement"); //$NON-NLS-1$ - public IASTExpression getNewPlacement(); - public void setNewPlacement( IASTExpression expression ); - - public static final ASTNodeProperty NEW_INITIALIZER = new ASTNodeProperty( "New Initializer"); //$NON-NLS-1$ - public IASTExpression getNewInitializer(); - public void setNewInitializer( IASTExpression expression ); - - public static final ASTNodeProperty TYPE_ID = new ASTNodeProperty( "Type Id"); //$NON-NLS-1$ - public IASTTypeId getTypeId(); - public void setTypeId( IASTTypeId typeId ); + /** + * Is this a ::new expression? + * + * @return boolean + */ + public boolean isGlobal(); - public boolean isNewTypeId(); - public void setIsNewTypeId( boolean value ); - - public static final ASTNodeProperty NEW_TYPEID_ARRAY_EXPRESSION = new ASTNodeProperty( "Array Size Expression"); //$NON-NLS-1$ - public IASTExpression [] getNewTypeIdArrayExpressions(); - public void addNewTypeIdArrayExpression( IASTExpression expression ); + /** + * Set this expression to bea global ::new expression (or not). + * + * @param value + * boolean + */ + public void setIsGlobal(boolean value); + + /** + * NEW_PLACEMENT is a role for an expression to represent the location of + * where the memory should be allocated. + */ + public static final ASTNodeProperty NEW_PLACEMENT = new ASTNodeProperty( + "New Placement"); //$NON-NLS-1$ + + /** + * Get the new placement (optional). + * + * @return IASTExpression + */ + public IASTExpression getNewPlacement(); + + /** + * Set the new placement expression. + * + * @param expression + * IASTExpression + */ + public void setNewPlacement(IASTExpression expression); + + /** + * NEW_INITIALIZER + */ + public static final ASTNodeProperty NEW_INITIALIZER = new ASTNodeProperty( + "New Initializer"); //$NON-NLS-1$ + + /** + * @return IASTExpression + */ + public IASTExpression getNewInitializer(); + + /** + * @param expression + * IASTExpression + */ + public void setNewInitializer(IASTExpression expression); + + /** + * TYPE_ID is the type being 'newed'. + */ + public static final ASTNodeProperty TYPE_ID = new ASTNodeProperty("Type Id"); //$NON-NLS-1$ + + /** + * Get the type Id. + * + * @return IASTTypeId + */ + public IASTTypeId getTypeId(); + + /** + * Set the type Id. + * + * @param typeId + * IASTTypeId + */ + public void setTypeId(IASTTypeId typeId); + + /** + * Is the typeID a new type ID? + * + * @return boolean + */ + public boolean isNewTypeId(); + + /** + * Set the type ID to be a new type ID. + * + * @param value + * boolean + */ + public void setIsNewTypeId(boolean value); + + /** + * Expressions that go inside array brackets. + */ + public static final ASTNodeProperty NEW_TYPEID_ARRAY_EXPRESSION = new ASTNodeProperty( + "Array Size Expression"); //$NON-NLS-1$ + + /** + * Get the new array size expressions. + * + * @return IASTExpression [] + */ + public IASTExpression[] getNewTypeIdArrayExpressions(); + + /** + * Add another array size expression. + * + * @param expression + * IASTExpression + */ + public void addNewTypeIdArrayExpression(IASTExpression expression); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTParameterDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTParameterDeclaration.java index 06f5f45c7ef..7b0168d163b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTParameterDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTParameterDeclaration.java @@ -16,6 +16,6 @@ import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration; * @author jcamelon */ public interface ICPPASTParameterDeclaration extends ICPPASTTemplateParameter, - IASTParameterDeclaration { + IASTParameterDeclaration { } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTPointerToMember.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTPointerToMember.java index 21d706bdc65..87f1e89285c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTPointerToMember.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTPointerToMember.java @@ -21,8 +21,24 @@ import org.eclipse.cdt.core.dom.ast.IASTPointer; */ public interface ICPPASTPointerToMember extends IASTPointer { - public static final ASTNodeProperty NAME = new ASTNodeProperty( "Name"); //$NON-NLS-1$ - public void setName( IASTName name ); - public IASTName getName(); - + /** + * This property refers to the nested name. + */ + public static final ASTNodeProperty NAME = new ASTNodeProperty("Name"); //$NON-NLS-1$ + + /** + * Set the name. + * + * @param name + * IASTName + */ + public void setName(IASTName name); + + /** + * Get the name. + * + * @return IASTName + */ + public IASTName getName(); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTQualifiedName.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTQualifiedName.java index b7d9bd14935..c9edefe5227 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTQualifiedName.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTQualifiedName.java @@ -14,14 +14,45 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty; import org.eclipse.cdt.core.dom.ast.IASTName; /** + * This interface is a qualified name in C++. + * * @author jcamelon */ public interface ICPPASTQualifiedName extends IASTName { - public static final ASTNodeProperty SEGMENT_NAME = new ASTNodeProperty( "Segment"); //$NON-NLS-1$ - public void addName( IASTName name ); - public IASTName [] getNames(); - - public boolean isFullyQualified(); - public void setFullyQualified( boolean value ); + /** + * Each IASTName segment has property being SEGMENT_NAME. + */ + public static final ASTNodeProperty SEGMENT_NAME = new ASTNodeProperty( + "Segment"); //$NON-NLS-1$ + + /** + * Add a subname. + * + * @param name + * IASTName + */ + public void addName(IASTName name); + + /** + * Get all subnames. + * + * @return IASTName [] + */ + public IASTName[] getNames(); + + /** + * Is this name fully qualified? + * + * @return boolean + */ + public boolean isFullyQualified(); + + /** + * Set this name to be fully qualified or not (true/false). + * + * @param value + * boolean + */ + public void setFullyQualified(boolean value); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSimpleDeclSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSimpleDeclSpecifier.java index 2bf696e7f26..5f125440abd 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSimpleDeclSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSimpleDeclSpecifier.java @@ -17,10 +17,22 @@ import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier; * * @author Doug Schaefer */ -public interface ICPPASTSimpleDeclSpecifier extends IASTSimpleDeclSpecifier, ICPPASTDeclSpecifier { +public interface ICPPASTSimpleDeclSpecifier extends IASTSimpleDeclSpecifier, + ICPPASTDeclSpecifier { // Extra types + /** + * t_bool bool + */ public static final int t_bool = IASTSimpleDeclSpecifier.t_last + 1; + + /** + * t_wchar_t wchar_t + */ public static final int t_wchar_t = IASTSimpleDeclSpecifier.t_last + 2; + + /** + * t_last is specified for subinterfaces. + */ public static final int t_last = t_wchar_t; - + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSimpleTypeConstructorExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSimpleTypeConstructorExpression.java index 2485c3a2347..a990abbd72d 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSimpleTypeConstructorExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSimpleTypeConstructorExpression.java @@ -14,30 +14,111 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty; import org.eclipse.cdt.core.dom.ast.IASTExpression; /** + * Simple type constructor postfix expression. + * * @author jcamelon */ public interface ICPPASTSimpleTypeConstructorExpression extends IASTExpression { + /** + * t_unspecified (error) + */ public static final int t_unspecified = 0; + + /** + * t_void == void + */ public static final int t_void = 1; + + /** + * t_char == char + */ public static final int t_char = 2; + + /** + * t_int == int + */ public static final int t_int = 3; + + /** + * t_float == float + */ public static final int t_float = 4; + + /** + * t_double == double + */ public static final int t_double = 5; + + /** + * t_bool = bool + */ public static final int t_bool = 6; + + /** + * t_wchar_t = wchar_t + */ public static final int t_wchar_t = 7; + + /** + * t_short = short + */ public static final int t_short = 8; + + /** + * t_long = long + */ public static final int t_long = 9; + + /** + * t_signed = signed + */ public static final int t_signed = 10; + + /** + * t_unsigned = unsigned + */ public static final int t_unsigned = 11; + + /** + * t_last is provided for subinterfaces. + */ public static final int t_last = t_unsigned; + /** + * Get the simple type. + * + * @return int + */ public int getSimpleType(); - public void setSimpleType( int value ); - - public static final ASTNodeProperty INITIALIZER_VALUE = new ASTNodeProperty( "Initializer Value"); //$NON-NLS-1$ - + + /** + * Set the simple type. + * + * @param value + * int + */ + public void setSimpleType(int value); + + /** + * INITIALIZER_VALUE is the value passed into the constructor. + */ + public static final ASTNodeProperty INITIALIZER_VALUE = new ASTNodeProperty( + "Initializer Value"); //$NON-NLS-1$ + + /** + * Get the initial value. + * + * @return IASTExpression + */ public IASTExpression getInitialValue(); - public void setInitialValue( IASTExpression expression ); - + + /** + * Set the initial value. + * + * @param expression + * IASTExpression + */ + public void setInitialValue(IASTExpression expression); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSimpleTypeTemplateParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSimpleTypeTemplateParameter.java index 9ac6febc8e8..877d3e07eac 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSimpleTypeTemplateParameter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSimpleTypeTemplateParameter.java @@ -15,23 +15,78 @@ import org.eclipse.cdt.core.dom.ast.IASTName; import org.eclipse.cdt.core.dom.ast.IASTTypeId; /** + * This interface represents a simple type template parameter. + * * @author jcamelon */ public interface ICPPASTSimpleTypeTemplateParameter extends - ICPPASTTemplateParameter { + ICPPASTTemplateParameter { - public static final int st_class = 1; - public static final int st_typename = 2; - - public int getParameterType(); - public void setParameterType( int value ); - - public static final ASTNodeProperty PARAMETER_NAME = new ASTNodeProperty( "Name" ); //$NON-NLS-1$ - public IASTName getName(); - public void setName( IASTName name ); + /** + * st_class represents a class. + */ + public static final int st_class = 1; - public static final ASTNodeProperty DEFAULT_TYPE = new ASTNodeProperty( "Default Type"); //$NON-NLS-1$ - public IASTTypeId getDefaultType(); - public void setDefaultType( IASTTypeId typeId ); + /** + * st_typename represents a typename. + */ + public static final int st_typename = 2; + + /** + * Get the parameter type. + * + * @return int + */ + public int getParameterType(); + + /** + * Set the parameter type. + * + * @param value + * int + */ + public void setParameterType(int value); + + /** + * The parameter name. + */ + public static final ASTNodeProperty PARAMETER_NAME = new ASTNodeProperty( + "Name"); //$NON-NLS-1$ + + /** + * Get the name. + * + * @return IASTName + */ + public IASTName getName(); + + /** + * Set the name. + * + * @param name + * IASTName + */ + public void setName(IASTName name); + + /** + * DEFAULT_TYPE is the optional default typeId value + */ + public static final ASTNodeProperty DEFAULT_TYPE = new ASTNodeProperty( + "Default Type"); //$NON-NLS-1$ + + /** + * Get the default type. + * + * @return IASTTypeId + */ + public IASTTypeId getDefaultType(); + + /** + * Set the default type. + * + * @param typeId + * IASTTypeId + */ + public void setDefaultType(IASTTypeId typeId); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateDeclaration.java index c85abe7e67b..1c6b0cca136 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateDeclaration.java @@ -14,18 +14,67 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty; import org.eclipse.cdt.core.dom.ast.IASTDeclaration; /** + * Template declaration. + * * @author jcamelon */ public interface ICPPASTTemplateDeclaration extends IASTDeclaration { - public boolean isExported(); - public void setExported( boolean value ); - - public static final ASTNodeProperty OWNED_DECLARATION = new ASTNodeProperty( "Owned Declaration"); //$NON-NLS-1$ - public IASTDeclaration getDeclaration(); - public void setDeclaration( IASTDeclaration declaration ); - - public static final ASTNodeProperty PARAMETER = new ASTNodeProperty( "Template Parameter"); //$NON-NLS-1$ - public ICPPASTTemplateParameter [] getTemplateParameters(); - public void addTemplateParamter( ICPPASTTemplateParameter parm ); + /** + * Is the export keyword used? + * + * @return boolean + */ + public boolean isExported(); + + /** + * Should the export keyword be used? + * + * @param value + * boolean + */ + public void setExported(boolean value); + + /** + * OWNED_DECLARATION is the subdeclaration that we maintain + * grammatically. + */ + public static final ASTNodeProperty OWNED_DECLARATION = new ASTNodeProperty( + "Owned Declaration"); //$NON-NLS-1$ + + /** + * Get templated declaration. + * + * @return IASTDeclaration + */ + public IASTDeclaration getDeclaration(); + + /** + * Set the templated declaration. + * + * @param declaration + * IASTDeclaration + */ + public void setDeclaration(IASTDeclaration declaration); + + /** + * PARAMETER is used for template parameters. + */ + public static final ASTNodeProperty PARAMETER = new ASTNodeProperty( + "Template Parameter"); //$NON-NLS-1$ + + /** + * Get template parameters. + * + * @return ICPPASTTemplateParameter [] + */ + public ICPPASTTemplateParameter[] getTemplateParameters(); + + /** + * Add a template parameter. + * + * @param parm + * ICPPASTTemplateParameter + */ + public void addTemplateParamter(ICPPASTTemplateParameter parm); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateId.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateId.java index e01634fbf11..0fc65f0e297 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateId.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateId.java @@ -10,7 +10,6 @@ **********************************************************************/ package org.eclipse.cdt.core.dom.ast.cpp; - import org.eclipse.cdt.core.dom.ast.ASTNodeProperty; import org.eclipse.cdt.core.dom.ast.IASTExpression; import org.eclipse.cdt.core.dom.ast.IASTName; @@ -22,14 +21,59 @@ import org.eclipse.cdt.core.dom.ast.IASTTypeId; */ public interface ICPPASTTemplateId extends IASTName { - public static final ASTNodeProperty TEMPLATE_NAME = new ASTNodeProperty( "TemplateId Name"); //$NON-NLS-1$ - public IASTName getTemplateName(); - public void setTemplateName( IASTName name ); - - public static final ASTNodeProperty TEMPLATE_ID_ARGUMENT = new ASTNodeProperty( "TemplateId Arg"); //$NON-NLS-1$ - public static final IASTNode[] EMPTY_ARG_ARRAY = new IASTNode[0]; - public void addTemplateArgument( IASTTypeId typeId ); - public void addTemplateArgument( IASTExpression expression ); - public IASTNode[] getTemplateArguments(); - + /** + * TEMPLATE_NAME is the IASTName. + */ + public static final ASTNodeProperty TEMPLATE_NAME = new ASTNodeProperty( + "TemplateId Name"); //$NON-NLS-1$ + + /** + * Get the name. + * + * @return IASTName + */ + public IASTName getTemplateName(); + + /** + * Set the name. + * + * @param name + * IASTName + */ + public void setTemplateName(IASTName name); + + /** + * TEMPLATE_ID_ARGUMENT = template id argument. + */ + public static final ASTNodeProperty TEMPLATE_ID_ARGUMENT = new ASTNodeProperty( + "TemplateId Arg"); //$NON-NLS-1$ + + /** + * Constant. + */ + public static final IASTNode[] EMPTY_ARG_ARRAY = new IASTNode[0]; + + /** + * Add template argument. + * + * @param typeId + * IASTTypeId + */ + public void addTemplateArgument(IASTTypeId typeId); + + /** + * Add template argument. + * + * @param expression + * IASTExpression + */ + public void addTemplateArgument(IASTExpression expression); + + /** + * Get all template arguments. (as nodes) + * + * @return IASTNode [] + */ + public IASTNode[] getTemplateArguments(); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateParameter.java index 940cddc54a0..628ee964884 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateParameter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateParameter.java @@ -13,9 +13,14 @@ package org.eclipse.cdt.core.dom.ast.cpp; import org.eclipse.cdt.core.dom.ast.IASTNode; /** + * Base interface for all template parameters. + * * @author jcamelon */ public interface ICPPASTTemplateParameter extends IASTNode { - public static final ICPPASTTemplateParameter [] EMPTY_TEMPLATEPARAMETER_ARRAY = new ICPPASTTemplateParameter[0]; + /** + * Constant + */ + public static final ICPPASTTemplateParameter[] EMPTY_TEMPLATEPARAMETER_ARRAY = new ICPPASTTemplateParameter[0]; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateSpecialization.java index 015b0a2eab3..b36f31dd5e4 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateSpecialization.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateSpecialization.java @@ -14,12 +14,31 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty; import org.eclipse.cdt.core.dom.ast.IASTDeclaration; /** + * This interface represents a template specialization. + * * @author jcamelon */ public interface ICPPASTTemplateSpecialization extends IASTDeclaration { - public static final ASTNodeProperty OWNED_DECLARATION = new ASTNodeProperty( "Owned Declaration"); //$NON-NLS-1$ - public IASTDeclaration getDeclaration(); - public void setDeclaration( IASTDeclaration declaration ); + /** + * The declaration that the specialization affects. + */ + public static final ASTNodeProperty OWNED_DECLARATION = new ASTNodeProperty( + "Owned Declaration"); //$NON-NLS-1$ + + /** + * Get the declaration. + * + * @return IASTDeclaration + */ + public IASTDeclaration getDeclaration(); + + /** + * Set the declaration. + * + * @param declaration + * IASTDeclaration + */ + public void setDeclaration(IASTDeclaration declaration); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplatedTypeTemplateParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplatedTypeTemplateParameter.java index 51b6c26b30d..36f2918830c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplatedTypeTemplateParameter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplatedTypeTemplateParameter.java @@ -10,26 +10,78 @@ **********************************************************************/ package org.eclipse.cdt.core.dom.ast.cpp; - import org.eclipse.cdt.core.dom.ast.ASTNodeProperty; import org.eclipse.cdt.core.dom.ast.IASTExpression; import org.eclipse.cdt.core.dom.ast.IASTName; /** + * This is a templated template parameter. + * * @author jcamelon */ public interface ICPPASTTemplatedTypeTemplateParameter extends - ICPPASTTemplateParameter { + ICPPASTTemplateParameter { - public static final ASTNodeProperty PARAMETER = new ASTNodeProperty( "Template Parameter"); //$NON-NLS-1$ - public ICPPASTTemplateParameter[] getTemplateParameters(); - public void addTemplateParamter( ICPPASTTemplateParameter parm ); + /** + * PARAMETER + */ + public static final ASTNodeProperty PARAMETER = new ASTNodeProperty( + "Template Parameter"); //$NON-NLS-1$ - public static final ASTNodeProperty PARAMETER_NAME = new ASTNodeProperty( "Name" ); //$NON-NLS-1$ - public IASTName getName(); - public void setName( IASTName name ); + /** + * Get all template parameters. + * + * @return ICPPASTTemplateParameter [] + */ + public ICPPASTTemplateParameter[] getTemplateParameters(); - public static final ASTNodeProperty DEFAULT_VALUE = new ASTNodeProperty( "Default Value"); //$NON-NLS-1$ - public IASTExpression getDefaultValue(); - public void setDefaultValue( IASTExpression expression ); + /** + * Add a parameter. + * + * @param parm + * ICPPASTTemplateParameter + */ + public void addTemplateParamter(ICPPASTTemplateParameter parm); + + /** + * This parameter's name. + */ + public static final ASTNodeProperty PARAMETER_NAME = new ASTNodeProperty( + "Name"); //$NON-NLS-1$ + + /** + * Get name. + * + * @return IASTName + */ + public IASTName getName(); + + /** + * Set name. + * + * @param name + * IASTName + */ + public void setName(IASTName name); + + /** + * DEFAULT_VALUE is an expession. + */ + public static final ASTNodeProperty DEFAULT_VALUE = new ASTNodeProperty( + "Default Value"); //$NON-NLS-1$ + + /** + * Get default value for template type. + * + * @return IASTExpression + */ + public IASTExpression getDefaultValue(); + + /** + * Set default value for template type. + * + * @param expression + * IASTExpression + */ + public void setDefaultValue(IASTExpression expression); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTranslationUnit.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTranslationUnit.java index 557d181f997..7c38cd49276 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTranslationUnit.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTranslationUnit.java @@ -20,5 +20,12 @@ import org.eclipse.cdt.core.dom.ast.IBinding; * @author aniefer */ public interface ICPPASTTranslationUnit extends IASTTranslationUnit { + + /** + * Resolve the binding for translation unit. + * + * @return IBinding + */ public IBinding resolveBinding(); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTryBlockStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTryBlockStatement.java index 081b60ffd30..ef8075748fb 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTryBlockStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTryBlockStatement.java @@ -14,26 +14,54 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty; import org.eclipse.cdt.core.dom.ast.IASTStatement; /** + * This interface represents the try block statement. try { //body } catch( Exc + * e ) { // handler } catch( ... ) { + * } + * * @author jcamelon + * */ public interface ICPPASTTryBlockStatement extends IASTStatement { - - + /** + * BODY is the body of the try block. + */ + public static final ASTNodeProperty BODY = new ASTNodeProperty("Body"); //$NON-NLS-1$ - public static final ASTNodeProperty BODY = new ASTNodeProperty( "Body"); //$NON-NLS-1$ - /** - * @param tryBlock - */ - public void setTryBody(IASTStatement tryBlock); - public IASTStatement getTryBody(); - + /** + * Set try body. + * + * @param tryBlock + * IASTStatement + */ + public void setTryBody(IASTStatement tryBlock); - public static final ASTNodeProperty CATCH_HANDLER = new ASTNodeProperty( "Catch Handler"); //$NON-NLS-1$ - /** - * @param handler - */ - public void addCatchHandler(ICPPASTCatchHandler handler); - public ICPPASTCatchHandler [] getCatchHandlers(); + /** + * Get try body. + * + * @return IASTStatement + */ + public IASTStatement getTryBody(); + + /** + * CATCH_HANDLER are the exception catching handlers. + */ + public static final ASTNodeProperty CATCH_HANDLER = new ASTNodeProperty( + "Catch Handler"); //$NON-NLS-1$ + + /** + * Add catch handler. + * + * @param handler + * ICPPASTCatchHandler + */ + public void addCatchHandler(ICPPASTCatchHandler handler); + + /** + * Get the catch handlers. + * + * @return ICPPASTCatchHandler [] + */ + public ICPPASTCatchHandler[] getCatchHandlers(); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTypeIdExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTypeIdExpression.java index 31556cab0ac..94610cefa4b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTypeIdExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTypeIdExpression.java @@ -17,6 +17,7 @@ import org.eclipse.cdt.core.dom.ast.IASTTypeIdExpression; */ public interface ICPPASTTypeIdExpression extends IASTTypeIdExpression { - public static final int op_typeid = IASTTypeIdExpression.op_last + 1; - public static final int op_last = op_typeid; + public static final int op_typeid = IASTTypeIdExpression.op_last + 1; + + public static final int op_last = op_typeid; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTypenameExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTypenameExpression.java index 2f7a233801b..4c2f055d2f0 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTypenameExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTypenameExpression.java @@ -19,24 +19,61 @@ import org.eclipse.cdt.core.dom.ast.IASTName; */ public interface ICPPASTTypenameExpression extends IASTExpression { - /** - * @param templateTokenConsumed - */ - public void setIsTemplate(boolean templateTokenConsumed); - public boolean isTemplate(); + /** + * Was template token consumed? + * + * @param templateTokenConsumed + * boolean + */ + public void setIsTemplate(boolean templateTokenConsumed); - public static final ASTNodeProperty TYPENAME = new ASTNodeProperty( "Typename" ); //$NON-NLS-1$ - /** - * @param name - */ - public void setName(IASTName name); - public IASTName getName(); + /** + * Was template token consumed? + * + * @return boolean + */ + public boolean isTemplate(); - public static final ASTNodeProperty INITIAL_VALUE = new ASTNodeProperty( "Initial Value"); //$NON-NLS-1$ - /** - * @param expressionList - */ - public void setInitialValue(IASTExpression expressionList); - public IASTExpression getInitialValue(); + /** + * TYPENAME is the name of the type. + */ + public static final ASTNodeProperty TYPENAME = new ASTNodeProperty( + "Typename"); //$NON-NLS-1$ + + /** + * Set the name. + * + * @param name + * IASTName + */ + public void setName(IASTName name); + + /** + * Get the name. + * + * @return IASTName + */ + public IASTName getName(); + + /** + * INITIAL_VALUE is an expression. + */ + public static final ASTNodeProperty INITIAL_VALUE = new ASTNodeProperty( + "Initial Value"); //$NON-NLS-1$ + + /** + * Set initial value. + * + * @param expressionList + * IASTExpression + */ + public void setInitialValue(IASTExpression expressionList); + + /** + * Get initial value. + * + * @return IASTExpression + */ + public IASTExpression getInitialValue(); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUnaryExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUnaryExpression.java index cf83fdc2b9f..6b25c476888 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUnaryExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUnaryExpression.java @@ -17,8 +17,19 @@ import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression; */ public interface ICPPASTUnaryExpression extends IASTUnaryExpression { - public static final int op_throw = IASTUnaryExpression.op_last + 1; - public static final int op_typeid = IASTUnaryExpression.op_last + 2; - public static final int op_last = op_typeid; - + /** + * op_throw throw exp + */ + public static final int op_throw = IASTUnaryExpression.op_last + 1; + + /** + * op_typeid = typeid( exp ) + */ + public static final int op_typeid = IASTUnaryExpression.op_last + 2; + + /** + * op_last is provided for subinterfaces. + */ + public static final int op_last = op_typeid; + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUsingDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUsingDeclaration.java index 6f21a078f2c..75b736679eb 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUsingDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUsingDeclaration.java @@ -15,16 +15,45 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclaration; import org.eclipse.cdt.core.dom.ast.IASTName; /** + * This interface represents a using declaration. + * * @author jcamelon */ public interface ICPPASTUsingDeclaration extends IASTDeclaration { - public static final ASTNodeProperty NAME = new ASTNodeProperty( "Name"); //$NON-NLS-1$ - - public void setIsTypename( boolean value ); - public boolean isTypename(); + /** + * NAME is the qualified name brought into scope. + */ + public static final ASTNodeProperty NAME = new ASTNodeProperty("Name"); //$NON-NLS-1$ + + /** + * Was the typename keyword used? + * + * @param value + * boolean + */ + public void setIsTypename(boolean value); + + /** + * Set that the typename keyword was/wasn't used. + * + * @return boolean + */ + public boolean isTypename(); + + /** + * Get the name. + * + * @return IASTName + */ + public IASTName getName(); + + /** + * Set the name. + * + * @param name + * IASTName + */ + public void setName(IASTName name); - public IASTName getName(); - public void setName(IASTName name); - } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUsingDirective.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUsingDirective.java index b7c0ab24d08..e6a3cf3eb8a 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUsingDirective.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUsingDirective.java @@ -15,13 +15,36 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclaration; import org.eclipse.cdt.core.dom.ast.IASTName; /** + * This interface represents a C++ using directive. + * * @author jcamelon */ public interface ICPPASTUsingDirective extends IASTDeclaration { - public static final ICPPASTUsingDirective [] EMPTY_USINGDIRECTIVE_ARRAY = new ICPPASTUsingDirective[0]; - public static final ASTNodeProperty QUALIFIED_NAME = new ASTNodeProperty( "Name"); //$NON-NLS-1$ - - public IASTName getQualifiedName(); - public void setQualifiedName( IASTName qualifiedName ); - + /** + * Constant. + */ + public static final ICPPASTUsingDirective[] EMPTY_USINGDIRECTIVE_ARRAY = new ICPPASTUsingDirective[0]; + + /** + * QUALIFIED_NAME is the name that is brought into local + * scope. + */ + public static final ASTNodeProperty QUALIFIED_NAME = new ASTNodeProperty( + "Name"); //$NON-NLS-1$ + + /** + * Get the qualified name. + * + * @return IASTName + */ + public IASTName getQualifiedName(); + + /** + * Set the qualified name. + * + * @param qualifiedName + * IASTName + */ + public void setQualifiedName(IASTName qualifiedName); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTVisiblityLabel.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTVisiblityLabel.java index bcd105936cf..900fa7bc6df 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTVisiblityLabel.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTVisiblityLabel.java @@ -13,15 +13,41 @@ package org.eclipse.cdt.core.dom.ast.cpp; import org.eclipse.cdt.core.dom.ast.IASTDeclaration; /** + * C++ allows for visibility labels to be mixed interdeclaration in class + * specifiers. + * * @author jcamelon */ public interface ICPPASTVisiblityLabel extends IASTDeclaration { - public static final int v_public = 1; - public static final int v_protected = 2; - public static final int v_private = 3; - - public int getVisibility(); - public void setVisibility( int visibility ); - + /** + * v_public == public: + */ + public static final int v_public = 1; + + /** + * v_protected == protected: + */ + public static final int v_protected = 2; + + /** + * v_private == private: + */ + public static final int v_private = 3; + + /** + * Get the visibility. + * + * @return int + */ + public int getVisibility(); + + /** + * Set visibility. + * + * @param visibility + * int + */ + public void setVisibility(int visibility); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTWhileStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTWhileStatement.java index f24d25ebc2b..042a3f92f99 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTWhileStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTWhileStatement.java @@ -15,13 +15,31 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclaration; import org.eclipse.cdt.core.dom.ast.IASTWhileStatement; /** + * This inteface accommodates C++ allows for broader while loop syntax. + * * @author jcamelon - * */ public interface ICPPASTWhileStatement extends IASTWhileStatement { - public static final ASTNodeProperty CONDITIONDECLARATION = new ASTNodeProperty("initDeclaration"); //$NON-NLS-1$ - public IASTDeclaration getConditionDeclaration(); + /** + * In C++ conditions can be declarations w/side effects. + */ + public static final ASTNodeProperty CONDITIONDECLARATION = new ASTNodeProperty( + "initDeclaration"); //$NON-NLS-1$ + + /** + * Get the condition declaration. + * + * @return IASTDeclaration + */ + public IASTDeclaration getConditionDeclaration(); + + /** + * Set the condition declaration. + * + * @param declaration + * IASTDeclaration + */ public void setConditionDeclaration(IASTDeclaration declaration); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPBase.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPBase.java index f8fe5d3d70e..65a5d333e2c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPBase.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPBase.java @@ -19,24 +19,26 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBas * @author Doug Schaefer */ public interface ICPPBase { - public static final ICPPBase [] EMPTY_BASE_ARRAY = new ICPPBase[0]; - + public static final ICPPBase[] EMPTY_BASE_ARRAY = new ICPPBase[0]; + /** * The base class. * * @return */ public ICPPClassType getBaseClass() throws DOMException; - + /** * The visibility qualifier applied to the base class. * * @return */ public int getVisibility() throws DOMException; - + public static final int v_private = ICPPASTBaseSpecifier.v_private; + public static final int v_protected = ICPPASTBaseSpecifier.v_protected; + public static final int v_public = ICPPASTBaseSpecifier.v_public; /** diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPBasicType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPBasicType.java index d30857127c5..49c72c7b9df 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPBasicType.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPBasicType.java @@ -19,7 +19,8 @@ import org.eclipse.cdt.core.dom.ast.IBasicType; * @author aniefer */ public interface ICPPBasicType extends IBasicType { - //Extra types + // Extra types public static final int t_bool = ICPPASTSimpleDeclSpecifier.t_bool; + public static final int t_wchar_t = ICPPASTSimpleDeclSpecifier.t_wchar_t; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPClassScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPClassScope.java index e390841a434..d40d1ca711f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPClassScope.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPClassScope.java @@ -17,18 +17,20 @@ package org.eclipse.cdt.core.dom.ast.cpp; * @author aniefer */ public interface ICPPClassScope extends ICPPScope { - /** - * Get the binding for the class this scope is associated with - * @return - */ - ICPPClassType getClassType(); - /** - * Returns an array of methods that were implicitly added to this class scope. - * These methods may or may not have been explicitly declared in the code. - * The methods that will be implicitly declared are: the default constructor, - * copy constructor, copy assignment operator, and destructor + * Get the binding for the class this scope is associated with + * * @return */ - public ICPPMethod [] getImplicitMethods(); + ICPPClassType getClassType(); + + /** + * Returns an array of methods that were implicitly added to this class + * scope. These methods may or may not have been explicitly declared in the + * code. The methods that will be implicitly declared are: the default + * constructor, copy constructor, copy assignment operator, and destructor + * + * @return + */ + public ICPPMethod[] getImplicitMethods(); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPClassType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPClassType.java index a3221033aba..3f5716ead15 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPClassType.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPClassType.java @@ -23,30 +23,32 @@ import org.eclipse.cdt.core.dom.ast.IField; public interface ICPPClassType extends ICompositeType { public static final int k_class = ICPPASTCompositeTypeSpecifier.k_class; + /** - * Returns a list of base class relationships. The list is empty if - * there are none. + * Returns a list of base class relationships. The list is empty if there + * are none. * * @return List of ICPPBase */ - public ICPPBase [] getBases() throws DOMException; + public ICPPBase[] getBases() throws DOMException; /** - * Get fields is restated here just to point out that this method returns - * a list of ICPPField objects representing all fields, declared or inherited. + * Get fields is restated here just to point out that this method returns a + * list of ICPPField objects representing all fields, declared or inherited. */ public IField[] getFields() throws DOMException; - + /** - * findField is restated here to point out that this method looks through the - * inheritance tree of this class while looking for a field with the given name - * If no field is found, null is returned, if the name is found to be ambiguous - * a IProblemBinding is returned. + * findField is restated here to point out that this method looks through + * the inheritance tree of this class while looking for a field with the + * given name If no field is found, null is returned, if the name is found + * to be ambiguous a IProblemBinding is returned. + * * @param name * @return */ - public IField findField( String name ) throws DOMException; - + public IField findField(String name) throws DOMException; + /** * Returns a list of ICPPField objects representing fields declared in this * class. It does not include fields inherited from base classes. @@ -54,11 +56,11 @@ public interface ICPPClassType extends ICompositeType { * @return List of ICPPField */ public ICPPField[] getDeclaredFields() throws DOMException; - + /** * Returns a list of ICPPMethod objects representing all methods defined for - * this class including those declared, inherited, or generated (e.g. default - * constructors and the like). + * this class including those declared, inherited, or generated (e.g. + * default constructors and the like). * * @return List of ICPPMethod */ @@ -66,34 +68,37 @@ public interface ICPPClassType extends ICompositeType { /** * Returns a list of ICPPMethod objects representing all method explicitly - * declared by this class and inherited from base classes. It does not include - * automatically generated methods. + * declared by this class and inherited from base classes. It does not + * include automatically generated methods. * * @return List of ICPPMethod */ public ICPPMethod[] getAllDeclaredMethods() throws DOMException; - + /** * Returns a list of ICPPMethod objects representing all methods explicitly - * declared by this class. It does not include inherited methods or automatically - * generated methods. + * declared by this class. It does not include inherited methods or + * automatically generated methods. * * @return List of ICPPMethod */ public ICPPMethod[] getDeclaredMethods() throws DOMException; - /** - * Returns an array of ICPPConstructor objects representing the contructors for this - * class. This list includes both declared and implicit constructors. - * @return - */ - public ICPPConstructor[] getConstructors() throws DOMException; - - /** - * return an array of bindings for those classes/functions declared as friends of this - * class. - * @return - * @throws DOMException - */ - public IBinding [] getFriends() throws DOMException; + /** + * Returns an array of ICPPConstructor objects representing the contructors + * for this class. This list includes both declared and implicit + * constructors. + * + * @return + */ + public ICPPConstructor[] getConstructors() throws DOMException; + + /** + * return an array of bindings for those classes/functions declared as + * friends of this class. + * + * @return + * @throws DOMException + */ + public IBinding[] getFriends() throws DOMException; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPCompositeBinding.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPCompositeBinding.java index 4c49b443b6d..a245a191104 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPCompositeBinding.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPCompositeBinding.java @@ -17,16 +17,18 @@ import org.eclipse.cdt.core.dom.ast.DOMException; import org.eclipse.cdt.core.dom.ast.IBinding; /** - * This binding is a container for other bindings. It is used in instances - * where an IASTName refers to more than one binding, for example a using declaration - * refering to a set of overloaded functions. + * This binding is a container for other bindings. It is used in instances where + * an IASTName refers to more than one binding, for example a using declaration + * refering to a set of overloaded functions. + * * @author aniefer */ public interface ICPPCompositeBinding extends IBinding { - /** - * get the bindings - * @return - * @throws DOMException - */ - IBinding [] getBindings() throws DOMException; + /** + * get the bindings + * + * @return + * @throws DOMException + */ + IBinding[] getBindings() throws DOMException; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPConstructor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPConstructor.java index aaf853aa413..1d4007147a3 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPConstructor.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPConstructor.java @@ -20,11 +20,12 @@ import org.eclipse.cdt.core.dom.ast.DOMException; */ public interface ICPPConstructor extends ICPPMethod { - /** - * Whether or not this constructor was declared as explicit - * @return - * @throws DOMException - */ - boolean isExplicit() throws DOMException; + /** + * Whether or not this constructor was declared as explicit + * + * @return + * @throws DOMException + */ + boolean isExplicit() throws DOMException; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPFunctionScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPFunctionScope.java index 8a63dedab25..60ba13e6660 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPFunctionScope.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPFunctionScope.java @@ -21,11 +21,12 @@ import org.eclipse.cdt.core.dom.ast.IScope; */ public interface ICPPFunctionScope extends ICPPScope { - /** - * Get the scope representing the function body. - * returns null if there is no function definition - * @return - * @throws DOMException - */ - public IScope getBodyScope() throws DOMException; + /** + * Get the scope representing the function body. returns null if there is no + * function definition + * + * @return + * @throws DOMException + */ + public IScope getBodyScope() throws DOMException; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPMember.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPMember.java index ba40e96a4f2..44c28c46292 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPMember.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPMember.java @@ -21,13 +21,15 @@ public interface ICPPMember { /** * The visibility. - * + * * @return */ public int getVisibility() throws DOMException; - + public static final int v_private = ICPPASTVisiblityLabel.v_private; + public static final int v_protected = ICPPASTVisiblityLabel.v_protected; + public static final int v_public = ICPPASTVisiblityLabel.v_public; - + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPNamespace.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPNamespace.java index 89f1c0117bd..0c024c94525 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPNamespace.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPNamespace.java @@ -18,13 +18,15 @@ import org.eclipse.cdt.core.dom.ast.IBinding; /** * This interface represents a C++ namespace + * * @author aniefer */ public interface ICPPNamespace extends IBinding { - /** - * get the scope object associated with this namespace - * @return - * @throws DOMException - */ + /** + * get the scope object associated with this namespace + * + * @return + * @throws DOMException + */ public ICPPNamespaceScope getNamespaceScope() throws DOMException; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPNamespaceScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPNamespaceScope.java index a4521317d13..38be07a75ea 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPNamespaceScope.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPNamespaceScope.java @@ -16,25 +16,27 @@ package org.eclipse.cdt.core.dom.ast.cpp; import org.eclipse.cdt.core.dom.ast.DOMException; import org.eclipse.cdt.core.dom.ast.IASTNode; - /** * @author aniefer */ public interface ICPPNamespaceScope extends ICPPScope { /** - * Add an IASTNode that nominates another namespace to this scope - * Most commonly, ICPPASTUsingDirectives, but in the case of unnamed namespaces, - * it could be an ICPPASTNamespaceDefinition + * Add an IASTNode that nominates another namespace to this scope Most + * commonly, ICPPASTUsingDirectives, but in the case of unnamed namespaces, + * it could be an ICPPASTNamespaceDefinition + * * @param directive */ - public void addUsingDirective( IASTNode directive ) throws DOMException; - + public void addUsingDirective(IASTNode directive) throws DOMException; + /** - * Get the IASTNodes that have been added to this scope to nominate other - * namespaces during lookup. (ICPPASTUsingDirective or ICPPASTNamespaceDefinition) + * Get the IASTNodes that have been added to this scope to nominate other + * namespaces during lookup. (ICPPASTUsingDirective or + * ICPPASTNamespaceDefinition) + * * @return */ public IASTNode[] getUsingDirectives() throws DOMException; - + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPPointerToMemberType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPPointerToMemberType.java index 8c7dcb79cb8..a0aaec9b1c8 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPPointerToMemberType.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPPointerToMemberType.java @@ -20,10 +20,11 @@ import org.eclipse.cdt.core.dom.ast.IPointerType; * @author aniefer */ public interface ICPPPointerToMemberType extends IPointerType { - - /** - * Get the class to whose members this points to - * @return - */ - public ICPPClassType getMemberOfClass(); + + /** + * Get the class to whose members this points to + * + * @return + */ + public ICPPClassType getMemberOfClass(); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPReferenceType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPReferenceType.java index 2bd409299d3..f7862447421 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPReferenceType.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPReferenceType.java @@ -21,10 +21,11 @@ import org.eclipse.cdt.core.dom.ast.IType; * @author aniefer */ public interface ICPPReferenceType extends IType { - /** - * get the type that this is a reference of - * @return - * @throws DOMException - */ - public IType getType() throws DOMException; + /** + * get the type that this is a reference of + * + * @return + * @throws DOMException + */ + public IType getType() throws DOMException; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPScope.java index e302b5cfdba..78e72f6fd97 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPScope.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPScope.java @@ -19,8 +19,8 @@ import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.IScope; /** - * The ICPPScope serves as a mechanism for caching IASTNames and - * bindings to speed up resolution. + * The ICPPScope serves as a mechanism for caching IASTNames and bindings to + * speed up resolution. * * @author aniefer */ @@ -28,33 +28,37 @@ public interface ICPPScope extends IScope { /** * Add an IASTName to be cached in this scope + * * @param name * @throws DOMException */ - public void addName( IASTName name ) throws DOMException; - - /** - * Get the binding that the given name would resolve to in this scope. - * Could return null if there is no matching binding in this scope, - * or if resolve == false and the appropriate binding has not yet been - * resolved. - * - * @param name - * @param resolve : whether or not to resolve the matching binding if it - * has not been so already. - * @return : the binding in this scope that matches the name, or null - * @throws DOMException - */ - public IBinding getBinding( IASTName name, boolean resolve ) throws DOMException; - + public void addName(IASTName name) throws DOMException; + + /** + * Get the binding that the given name would resolve to in this scope. Could + * return null if there is no matching binding in this scope, or if resolve == + * false and the appropriate binding has not yet been resolved. + * + * @param name + * @param resolve : + * whether or not to resolve the matching binding if it has not + * been so already. + * @return : the binding in this scope that matches the name, or null + * @throws DOMException + */ + public IBinding getBinding(IASTName name, boolean resolve) + throws DOMException; + /** * Set whether or not all the names in this scope have been cached + * * @param b */ public void setFullyCached(boolean b) throws DOMException; - + /** - * whether or not this scope's cache contains all the names + * whether or not this scope's cache contains all the names + * * @return */ public boolean isFullyCached() throws DOMException; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateDefinition.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateDefinition.java index 2bae751ec2e..a4b76bdbec7 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateDefinition.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateDefinition.java @@ -20,24 +20,24 @@ public interface ICPPTemplateDefinition { /** * Returns the list of template parameters. If this is a template * specialization, the parameters will be substituted by the arguments - * determined in the specialization. + * determined in the specialization. * - * @return List of ICPPTemplateParameter, IType, or IASTExpression. - * The type or expression are arguments in a specialization. + * @return List of ICPPTemplateParameter, IType, or IASTExpression. The type + * or expression are arguments in a specialization. */ public List getParameters(); - + /** * Returns whether this is a template specialization. * * @return is this a template specialization */ public boolean isSpecialization(); - + /** * If this is a template specialization, this returns the template - * definition this is specializing. It returns null if this template - * is not a specialization. + * definition this is specializing. It returns null if this template is not + * a specialization. * * @return */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateNonTypeParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateNonTypeParameter.java index bbf3504b5f9..60c80a1ffbf 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateNonTypeParameter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateNonTypeParameter.java @@ -16,13 +16,14 @@ import org.eclipse.cdt.core.dom.ast.IVariable; /** * @author Doug Schaefer */ -public interface ICPPTemplateNonTypeParameter extends ICPPTemplateParameter, IVariable { +public interface ICPPTemplateNonTypeParameter extends ICPPTemplateParameter, + IVariable { /** * The default value for this parameter. - * + * * @return */ public IASTExpression getDefault(); - + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateTypeParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateTypeParameter.java index 0846c0bc77b..e588864faa0 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateTypeParameter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateTypeParameter.java @@ -19,10 +19,10 @@ import org.eclipse.cdt.core.dom.ast.IType; public interface ICPPTemplateTypeParameter extends ICPPTemplateParameter, IType { /** - * The default type for this parameter. - * May be null + * The default type for this parameter. May be null + * * @return */ public IType getDefault() throws DOMException; - + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamespaceAlias.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamespaceAlias.java index 0367ee32631..92ebc9f189c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamespaceAlias.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamespaceAlias.java @@ -40,14 +40,14 @@ public class CPPASTNamespaceAlias extends CPPASTNode implements /* (non-Javadoc) * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceAlias#getQualifiedName() */ - public IASTName getQualifiedName() { + public IASTName getMappingName() { return qualifiedName; } /* (non-Javadoc) * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceAlias#setQualifiedName(org.eclipse.cdt.core.dom.ast.cpp.ICPPASTQualifiedName) */ - public void setQualifiedName(IASTName qualifiedName) { + public void setMappingName(IASTName qualifiedName) { this.qualifiedName = qualifiedName; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVisitor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVisitor.java index af0ac4e28db..8c5bf1188fe 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVisitor.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVisitor.java @@ -346,7 +346,7 @@ public class CPPVisitor { return CPPSemantics.resolveBinding( ((ICPPASTUsingDirective) declaration).getQualifiedName() ); } else if( declaration instanceof ICPPASTNamespaceAlias ) { ICPPASTNamespaceAlias alias = (ICPPASTNamespaceAlias) declaration; - return CPPSemantics.resolveBinding( alias.getQualifiedName() ); + return CPPSemantics.resolveBinding( alias.getMappingName() ); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java index db57cd48040..ce34421242a 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java @@ -2495,7 +2495,7 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser { alias.setAlias(name); name.setParent(alias); name.setPropertyInParent(ICPPASTNamespaceAlias.ALIAS_NAME); - alias.setQualifiedName(qualifiedName); + alias.setMappingName(qualifiedName); qualifiedName.setParent(alias); qualifiedName.setPropertyInParent(ICPPASTNamespaceAlias.MAPPING_NAME); return alias;