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 67906826647..11faa3f8b08 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
@@ -6,18 +6,17 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Doug Schaefer (IBM) - Initial API and implementation
+ * Doug Schaefer (IBM) - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.core.dom.ast;
/**
- * The if statement including the optional else clause.
+ * The 'if' statement including the optional else clause.
*
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTIfStatement extends IASTStatement {
-
/**
* CONDITION
represents the relationship between an
* IASTIfStatement
and its nested IASTExpression
.
@@ -40,14 +39,16 @@ public interface IASTIfStatement extends IASTStatement {
public static final ASTNodeProperty ELSE = new ASTNodeProperty("IASTIfStatement.ELSE - IASTStatement (else) for IASTIfStatement"); //$NON-NLS-1$
/**
- * Get the condition in the if statement.
+ * Returns the condition in the if statement.
*
- * @return the condition IASTExpression
+ * @return the condition IASTExpression
. May return null
if the 'if'
+ * statement has condition declaration instead of condition expression
+ * (see {@link org.eclipse.cdt.core.dom.ast.cpp.ICPPASTIfStatement}).
*/
public IASTExpression getConditionExpression();
/**
- * Set the condition in the if statement.
+ * Sets the condition in the if statement.
*
* @param condition
* IASTExpression
@@ -55,14 +56,14 @@ public interface IASTIfStatement extends IASTStatement {
public void setConditionExpression(IASTExpression condition);
/**
- * Get the statement that is executed if the condition is true.
+ * Returns the statement that is executed if the condition is true.
*
* @return the then clause IASTStatement
*/
public IASTStatement getThenClause();
/**
- * Set the statement that is executed if the condition is true.
+ * Sets the statement that is executed if the condition is true.
*
* @param thenClause
* IASTStatement
@@ -70,7 +71,7 @@ public interface IASTIfStatement extends IASTStatement {
public void setThenClause(IASTStatement thenClause);
/**
- * Get the statement that is executed if the condition is false. This clause
+ * Returns 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 IASTStatement
@@ -78,7 +79,7 @@ public interface IASTIfStatement extends IASTStatement {
public IASTStatement getElseClause();
/**
- * Set the else clause.
+ * Sets the else clause.
*
* @param elseClause
* IASTStatement
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTIfStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTIfStatement.java
index 7beba63747a..b92519009d3 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTIfStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTIfStatement.java
@@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM - Initial API and implementation
+ * IBM - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.core.dom.ast.cpp;
@@ -15,17 +15,28 @@ import org.eclipse.cdt.core.dom.ast.IASTIfStatement;
import org.eclipse.cdt.core.dom.ast.IScope;
/**
+ * The 'if' statement including the optional else clause.
*
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICPPASTIfStatement extends IASTIfStatement {
-
+ /**
+ * Returns the condition declaration. The condition declaration and the condition expression are
+ * mutually exclusive.
+ *
+ * @return the condition declaration, or null
if the 'if' statement doesn't
+ * have a condition declaration.
+ */
public IASTDeclaration getConditionDeclaration();
- public void setConditionDeclaration( IASTDeclaration d );
+
+ /**
+ * Sets the condition declaration.
+ */
+ public void setConditionDeclaration(IASTDeclaration d);
/**
- * Get the implicit IScope
represented by this if statement
+ * Returns the implicit IScope
represented by this if statement
*
* @return IScope
*/