diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTGotoStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTGotoStatement.java index d26587b6beb..2470e72471d 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTGotoStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTGotoStatement.java @@ -22,10 +22,15 @@ public interface IASTGotoStatement extends IASTStatement { /** * Returns the name of the label. The name resolves to a ILabel binding. * - * @return + * @return IASTName */ public IASTName getName(); + /** + * Set the name for a goto statement label. + * + * @param name IASTName + */ public void setName(IASTName name); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTIdExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTIdExpression.java index 15b9963a07a..0894f373db9 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTIdExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTIdExpression.java @@ -17,6 +17,9 @@ package org.eclipse.cdt.core.dom.ast; */ public interface IASTIdExpression extends IASTExpression { + /** + * ID_NAME represents the relationship between an IASTIdExpression and a IASTName. + */ public static final ASTNodeProperty ID_NAME = new ASTNodeProperty( "IdExpression Name"); //$NON-NLS-1$ /** * Returns the name used in the expression. @@ -25,5 +28,10 @@ public interface IASTIdExpression extends IASTExpression { */ public IASTName getName(); + /** + * Set the name to be used inthe expression. + * + * @param name + */ public void setName( IASTName name ); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTIfStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTIfStatement.java index 2107b598698..52de688b3d9 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTIfStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTIfStatement.java @@ -17,36 +17,59 @@ package org.eclipse.cdt.core.dom.ast; */ public interface IASTIfStatement extends IASTStatement { + /** + * CONDITION represents the relationship between an IASTIfStatement and its nested IASTExpression. + */ public static final ASTNodeProperty CONDITION = new ASTNodeProperty("condition"); //$NON-NLS-1$ + /** + * THEN represents the relationship between an IASTIfStatement and its nested IASTStatement (then). + */ public static final ASTNodeProperty THEN = new ASTNodeProperty("then"); //$NON-NLS-1$ + /** + * ELSE represents the relationship between an IASTIfStatement and its nested IASTStatement (else). + */ public static final ASTNodeProperty ELSE = new ASTNodeProperty("else"); //$NON-NLS-1$ /** - * The condition in the if statement. + * Get the condition in the if statement. * - * @return the condition expression + * @return the condition IASTExpression */ public IASTExpression getCondition(); + /** + * Set the condition in the if statement. + * @param condition IASTExpression + */ public void setCondition(IASTExpression condition); /** - * The statement that is executed if the condition is true. + * Get the statement that is executed if the condition is true. * - * @return the then clause + * @return the then clause IASTStatement */ public IASTStatement getThenClause(); + /** + * Set the statement that is executed if the condition is true. + * + * @param thenClause IASTStatement + */ public void setThenClause(IASTStatement thenClause); /** - * The statement that is executed if the condition is false. This + * Get the statement that is executed if the condition is false. This * clause is optional and returns null if there is none. * - * @return the else clause or null + * @return the else clause or null IASTStatement */ public IASTStatement getElseClause(); + /** + * Set the else clause. + * + * @param elseClause IASTStatement + */ public void setElseClause(IASTStatement elseClause); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializer.java index 1d82ddde660..ea89836342d 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializer.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializer.java @@ -16,6 +16,10 @@ package org.eclipse.cdt.core.dom.ast; * @author Doug Schaefer */ public interface IASTInitializer extends IASTNode { - public final static IASTInitializer[] EMPTY_INIALIZER_ARRAY = new IASTInitializer[0]; + + /** + * Constant. + */ + public final static IASTInitializer[] EMPTY_INITIALIZER_ARRAY = new IASTInitializer[0]; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializerExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializerExpression.java index 08077f12b36..e335173670a 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializerExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializerExpression.java @@ -17,13 +17,21 @@ package org.eclipse.cdt.core.dom.ast; */ public interface IASTInitializerExpression extends IASTInitializer { - public ASTNodeProperty INITIALIZER_EXPRESSION = new ASTNodeProperty( "Initializer Expression"); //$NON-NLS-1$ + /** + * INITIALIZER_EXPRESSION represents the relationship between an IASTInitializerExpression. and its IASTExpression. + */ + public static final ASTNodeProperty INITIALIZER_EXPRESSION = new ASTNodeProperty( "Initializer Expression"); //$NON-NLS-1$ /** * Get the expression for the initializer. * - * @return + * @return IASTExpression */ public IASTExpression getExpression(); + /** + * Set the initializer's expression. + * + * @param expression IASTExpression + */ public void setExpression( IASTExpression expression ); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializerList.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializerList.java index ebcdcc12d07..7020f91ea78 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializerList.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializerList.java @@ -18,13 +18,22 @@ package org.eclipse.cdt.core.dom.ast; */ public interface IASTInitializerList extends IASTInitializer { - public ASTNodeProperty NESTED_INITIALIZER = new ASTNodeProperty( "Nested Initializer" ); //$NON-NLS-1$ + /** + * NESTED_INITIALIZER describes the relationship between an IASTInitializerList and its sub-IASTInitializers. + */ + public static final ASTNodeProperty NESTED_INITIALIZER = new ASTNodeProperty( "Nested Initializer" ); //$NON-NLS-1$ + /** * Get the list of initializers. * - * @return + * @return IASTInitializer[] array of initializers */ public IASTInitializer[] getInitializers(); + /** + * Add an initializer to the initializer list. + * + * @param initializer IASTInitializer + */ public void addInitializer( IASTInitializer initializer ); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTLabelStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTLabelStatement.java index 68cb15a4228..2a70e3fab63 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTLabelStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTLabelStatement.java @@ -26,6 +26,11 @@ public interface IASTLabelStatement extends IASTStatement { */ public IASTName getName(); + /** + * Set the name for a label. + * + * @param name + */ public void setName(IASTName name); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTLiteralExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTLiteralExpression.java index 27ac1066bad..73a291b9e9b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTLiteralExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTLiteralExpression.java @@ -17,15 +17,45 @@ package org.eclipse.cdt.core.dom.ast; */ public interface IASTLiteralExpression extends IASTExpression { + /** + * An integer literal e.g. 5 + */ public static final int lk_integer_constant = 0; + /** + * A floating point literal e.g. 6.0 + */ public static final int lk_float_constant = 1; + /** + * A char literal e.g. 'abc' + */ public static final int lk_char_constant = 2; + /** + * A string literal e.g. "abcdefg" + */ public static final int lk_string_literal = 3; + /** + * A constant defined for subclasses to extend from. + */ public static final int lk_last = lk_string_literal; + /** + * Get the literal expression kind. + * + * @return int + */ public int getKind(); + /** + * Set the literal expression kind. + * + * @param value int + */ public void setKind( int value ); + /** + * Set the value of the literal expression. + * + * @param value + */ public void setValue( String value ); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTMacroExpansion.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTMacroExpansion.java index 5eb52323d1b..02c7a943ef6 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTMacroExpansion.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTMacroExpansion.java @@ -11,6 +11,10 @@ package org.eclipse.cdt.core.dom.ast; /** + * A Macro expansion is a node location. + * Nodes that have locations that arrive through the expansion of preprocessor macros + * will refer to these type of objects. + * * @author Doug Schaefer */ public interface IASTMacroExpansion extends IASTNodeLocation { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTInitializerList.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTInitializerList.java index f32b312c25f..0c1e782c1a2 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTInitializerList.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTInitializerList.java @@ -26,7 +26,7 @@ public class CASTInitializerList extends CASTNode implements * @see org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration#getDeclarators() */ public IASTInitializer[] getInitializers() { - if( initializers == null ) return IASTInitializer.EMPTY_INIALIZER_ARRAY; + if( initializers == null ) return IASTInitializer.EMPTY_INITIALIZER_ARRAY; removeNullInitializers(); return initializers; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTInitializerList.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTInitializerList.java index f881f8b3c3c..92ee1560fa8 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTInitializerList.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTInitializerList.java @@ -26,7 +26,7 @@ public class CPPASTInitializerList extends CPPASTNode implements * @see org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration#getDeclarators() */ public IASTInitializer [] getInitializers() { - if( initializers == null ) return IASTInitializer.EMPTY_INIALIZER_ARRAY; + if( initializers == null ) return IASTInitializer.EMPTY_INITIALIZER_ARRAY; removeNullInitializers(); return initializers; }