diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFieldDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFieldDeclarator.java
index f46c45159d7..cc9ac041405 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFieldDeclarator.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFieldDeclarator.java
@@ -18,7 +18,11 @@ package org.eclipse.cdt.core.dom.ast;
*/
public interface IASTFieldDeclarator extends IASTDeclarator {
- ASTNodeProperty FIELD_SIZE = new ASTNodeProperty( "BitField Size"); //$NON-NLS-1$
+ /**
+ * FIELD_SIZE
represents the relationship between a IASTFieldDeclarator
and its IASTExpression
.
+ */
+ public static final ASTNodeProperty FIELD_SIZE = new ASTNodeProperty( "BitField Size"); //$NON-NLS-1$
+
/**
* This returns the number of bits if this is a bit field.
* If it is not a bit field, it returns null.
@@ -27,6 +31,10 @@ public interface IASTFieldDeclarator extends IASTDeclarator {
*/
public IASTExpression getBitFieldSize();
+ /**
+ * Set the bitfield size.
+ * @param size IASTExpression
+ */
public void setBitFieldSize( IASTExpression size );
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFieldReference.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFieldReference.java
index 110e5cfd343..5df642b5029 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFieldReference.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFieldReference.java
@@ -11,11 +11,21 @@
package org.eclipse.cdt.core.dom.ast;
/**
+ * This interface represents expressions that access a field reference.
+ * e.g. a.b => a is the expression, b is the field name.
+ * e.g. a()->def => a() is the expression, def is the field name.
+ *
* @author Doug Schaefer
*/
public interface IASTFieldReference extends IASTExpression {
+ /**
+ * FIELD_OWNER
represents the relationship between a IASTFieldReference
and its IASTExpression
field owner.
+ */
public static final ASTNodeProperty FIELD_OWNER = new ASTNodeProperty( "Field Owner"); //$NON-NLS-1$
+ /**
+ * FIELD_NAME
represents the relationship between a IASTFieldReference
and its IASTName
field name.
+ */
public static final ASTNodeProperty FIELD_NAME = new ASTNodeProperty( "Field Name"); //$NON-NLS-1$
/**
@@ -25,15 +35,25 @@ public interface IASTFieldReference extends IASTExpression {
*/
public IASTExpression getFieldOwner();
+ /**
+ * Set the expression for the object containing the field.
+ *
+ * @param expression
+ */
public void setFieldOwner( IASTExpression expression );
/**
* This returns the name of the field being dereferenced.
*
- * @return the name of the field
+ * @return the name of the field (IASTName
)
*/
public IASTName getFieldName();
+ /**
+ * Set the name of the field.
+ *
+ * @param name IASTName
+ */
public void setFieldName( IASTName name );
/**
@@ -44,6 +64,10 @@ public interface IASTFieldReference extends IASTExpression {
*/
public boolean isPointerDereference();
+ /**
+ * Set whether or not this is a pointer dereference (default == no).
+ * @param value boolean
+ */
public void setIsPointerDereference( boolean value );
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTForStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTForStatement.java
index 5f5a527575c..57d73f1871b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTForStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTForStatement.java
@@ -18,54 +18,103 @@ package org.eclipse.cdt.core.dom.ast;
*/
public interface IASTForStatement extends IASTStatement {
+ /**
+ * INITEXPRESSION
represents the relationship between a IASTForStatement
and its IASTExpression
initializer.
+ */
public static final ASTNodeProperty INITEXPRESSION = new ASTNodeProperty("initExpression"); //$NON-NLS-1$
+ /**
+ * INITDECLARATION
represents the relationship between a IASTForStatement
and its IASTDeclaration
initializer.
+ */
public static final ASTNodeProperty INITDECLARATION = new ASTNodeProperty("initDeclaration"); //$NON-NLS-1$
+ /**
+ * CONDITION
represents the relationship between a IASTForStatement
and its IASTExpression
condition.
+ */
public static final ASTNodeProperty CONDITION = new ASTNodeProperty("condition"); //$NON-NLS-1$
+ /**
+ * ITERATION
represents the relationship between a IASTForStatement
and its IASTExpression
iteration expression.
+ */
public static final ASTNodeProperty ITERATION = new ASTNodeProperty("iteration"); //$NON-NLS-1$
+ /**
+ * BODY
represents the relationship between a IASTForStatement
and its IASTStatement
body.
+ */
public static final ASTNodeProperty BODY = new ASTNodeProperty("body"); //$NON-NLS-1$
/**
- * The initial expression for the loop. Returns null if there is
+ * Get the initial expression for the loop. Returns null if there is
* none. You can not have both an initial expression and an initial
* declaration.
*
- * @return
+ * @return IASTExpression
*/
public IASTExpression getInitExpression();
+ /**
+ * Set the initial expression for the loop.
+ *
+ * @param expression IASTExpression
+ */
public void setInit(IASTExpression expression);
/**
- * The initial declaration for the loop. Returns null if there is
+ * Get the initial declaration for the loop. Returns null if there is
* none. You can not have both an initial declaration and an initial
* declaration.
*
- * @return
+ * @return IASTDeclaration
*/
public IASTDeclaration getInitDeclaration();
+ /**
+ * Set the intiial declaration for the loop.
+ *
+ * @param declaration IASTDeclaration
+ */
public void setInit(IASTDeclaration declaration);
/**
- * The condition for the loop.
+ * Get the condition expression for the loop.
*
- * @return
+ * @return IASTExpression
*/
public IASTExpression getCondition();
+ /**
+ * Set the condition expression for the loop.
+ *
+ * @param condition IASTExpression
+ */
public void setCondition(IASTExpression condition);
/**
- * The expression that is evaluated after the completion of an iteration
+ * Get the expression that is evaluated after the completion of an iteration
* of the loop.
*
- * @return
+ * @return IASTExpression
*/
public IASTExpression getIterationExpression();
+ /**
+ * Set the expression that is evaluated after the completion of an iteration of the loop.
+ *
+ * @param iterator IASTExpression
+ */
public void setIterationExpression(IASTExpression iterator);
+ /**
+ * Get the statements that this for loop controls.
+ *
+ * @return IASTStatement
+ */
public IASTStatement getBody();
+ /**
+ * Set the body of the for loop.
+ *
+ * @param statement IASTStatement
+ */
public void setBody( IASTStatement statement );
+ /**
+ * Get the IScope
represented by this for loop.
+ * @return IScope
+ */
public IScope getScope();
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFunctionCallExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFunctionCallExpression.java
index a9229a037f4..664b91dd347 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFunctionCallExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFunctionCallExpression.java
@@ -10,16 +10,42 @@
package org.eclipse.cdt.core.dom.ast;
/**
+ * This interface represents a function call expression.
+ * f( x ) : f is the function name expression, x is the parameter expression.
+ *
* @author jcamelon
*/
public interface IASTFunctionCallExpression extends IASTExpression {
+
+ /**
+ * FUNCTION_NAME
represents the relationship between a IASTFunctionCallExpression
and its IASTExpression
(function name).
+ */
public static final ASTNodeProperty FUNCTION_NAME = new ASTNodeProperty( "Function Name"); //$NON-NLS-1$
+ /**
+ * Set the function name expression.
+ * @param expression IASTExpression
representing the function name
+ */
public void setFunctionNameExpression( IASTExpression expression );
+ /**
+ * Get the function name expression.
+ * @return IASTExpression
representing the function name
+ */
public IASTExpression getFunctionNameExpression();
+ /**
+ * PARAMETERS
represents the relationship between a IASTFunctionCallExpression
and its IASTExpression
(parameters).
+ */
public static final ASTNodeProperty PARAMETERS = new ASTNodeProperty( "Parameters"); //$NON-NLS-1$
+ /**
+ * Set the parameters expression.
+ * @param expression IASTExpression
representing the parameters
+ */
public void setParameterExpression( IASTExpression expression );
+ /**
+ * Get the parameter expression.
+ * @return IASTExpression
representing the parameters
+ */
public IASTExpression getParameterExpression();
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFunctionDefinition.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFunctionDefinition.java
index 8789327b1a2..c0171e2b829 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFunctionDefinition.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFunctionDefinition.java
@@ -17,38 +17,65 @@ package org.eclipse.cdt.core.dom.ast;
*/
public interface IASTFunctionDefinition extends IASTDeclaration {
- ASTNodeProperty DECL_SPECIFIER = new ASTNodeProperty( "Decl Specifier"); //$NON-NLS-1$
- ASTNodeProperty DECLARATOR = new ASTNodeProperty( "Declarator"); //$NON-NLS-1$
- ASTNodeProperty FUNCTION_BODY = new ASTNodeProperty( "Function Body"); //$NON-NLS-1$
+ /**
+ * DECL_SPECIFIER
represents the relationship between a IASTFunctionDefinition
and its IASTDeclSpecifier
.
+ */
+ public static final ASTNodeProperty DECL_SPECIFIER = new ASTNodeProperty( "Decl Specifier"); //$NON-NLS-1$
+ /**
+ * DECLARATOR
represents the relationship between a IASTFunctionDefinition
and its IASTFunctionDeclarator
.
+ */
+ public static final ASTNodeProperty DECLARATOR = new ASTNodeProperty( "Declarator"); //$NON-NLS-1$
+ /**
+ * FUNCTION_BODY
represents the relationship between a IASTFunctionDefinition
and its IASTStatement
.
+ */
+ public static final ASTNodeProperty FUNCTION_BODY = new ASTNodeProperty( "Function Body"); //$NON-NLS-1$
/**
- * The decl specifier for the function.
+ * Get the decl specifier for the function.
*
* @return
*/
public IASTDeclSpecifier getDeclSpecifier();
+ /**
+ * Set the decl specifier for the function.
+ *
+ * @param declSpec
+ */
public void setDeclSpecifier( IASTDeclSpecifier declSpec );
/**
- * The declarator for the function.
+ * Get the declarator for the function.
*
* @return
*/
public IASTFunctionDeclarator getDeclarator();
+ /**
+ * Set the declarator for the function.
+ *
+ * @param declarator
+ */
public void setDeclarator( IASTFunctionDeclarator declarator );
/**
- * This is the body of the function. This is usually a compound statement
+ * Get the body of the function. This is usually a compound statement
* but C++ also has a function try block.
*
* @return
*/
public IASTStatement getBody();
+ /**
+ * Set the body of the function.
+ * @param statement
+ */
public void setBody( IASTStatement statement );
+ /**
+ * Get the logical IScope that the function definition body represents.
+ * @return IScope
representing function body.
+ */
public IScope getScope();
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFunctionStyleMacroParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFunctionStyleMacroParameter.java
index 50323303a98..c1ea4f437bd 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFunctionStyleMacroParameter.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFunctionStyleMacroParameter.java
@@ -11,13 +11,30 @@
package org.eclipse.cdt.core.dom.ast;
/**
+ * This interface represents the name of a function style macro parameter.
+ * This is not an IASTName, as there are not any bindings for
+ *
* @author jcamelon
*/
public interface IASTFunctionStyleMacroParameter extends IASTNode {
- public static final IASTFunctionStyleMacroParameter[] EMPTY_PARAMETER_ARRAY = new IASTFunctionStyleMacroParameter[0];
-
- public String getParameter();
- public void setParameter( String value );
-
+ /**
+ * Constant EMPTY_PARAMETER_ARRAY
is used to return anempty array.
+ */
+ public static final IASTFunctionStyleMacroParameter[] EMPTY_PARAMETER_ARRAY = new IASTFunctionStyleMacroParameter[0];
+
+ /**
+ * Get the parameter name.
+ *
+ * @return String name
+ */
+ public String getParameter();
+
+ /**
+ * Set the parameter name.
+ *
+ * @param value String
+ */
+ public void setParameter(String value);
+
}