public interface PsiIfStatement extends PsiStatement
if
or if ... else
statement.Iconable.IconFlags, Iconable.LastComputedIcon
ARRAY_FACTORY, EMPTY_ARRAY
ICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITY
Modifier and Type | Method and Description |
---|---|
PsiExpression |
getCondition()
Returns the expression representing the condition of the statement.
|
PsiStatement |
getElseBranch()
Returns the statement which is executed when the condition is true.
|
PsiKeyword |
getElseElement()
Returns the
else keyword of the statement. |
PsiJavaToken |
getLParenth()
Returns the opening parenthesis enclosing the statement condition.
|
PsiJavaToken |
getRParenth()
Returns the closing parenthesis enclosing the statement condition.
|
PsiStatement |
getThenBranch()
Returns the statement which is executed when the condition is true.
|
void |
setElseBranch(PsiStatement statement)
Sets the statement which is executed when the condition is false to the specified value.
|
void |
setThenBranch(PsiStatement statement)
Sets the statement which is executed when the condition is true to the specified value.
|
accept, acceptChildren, add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, checkAdd, checkDelete, copy, delete, deleteChildRange, findElementAt, findReferenceAt, getChildren, getContainingFile, getContext, getCopyableUserData, getFirstChild, getLanguage, getLastChild, getManager, getNavigationElement, getNextSibling, getNode, getOriginalElement, getOwnReferences, getParent, getPrevSibling, getProject, getReference, getReferences, getResolveScope, getStartOffsetInParent, getText, getTextLength, getTextOffset, getTextRange, getTextRangeInParent, getUseScope, isEquivalentTo, isPhysical, isValid, isWritable, processDeclarations, putCopyableUserData, replace, textContains, textMatches, textMatches, textToCharArray, toString
getUserData, putUserData
PsiExpression getCondition()
PsiStatement getThenBranch()
PsiStatement getElseBranch()
else
part or is incomplete.PsiKeyword getElseElement()
else
keyword of the statement.else
part.void setElseBranch(PsiStatement statement) throws IncorrectOperationException
else
keyword if required.statement
- the statement to use as the else branch.IncorrectOperationException
- if the modification fails for some reason (for example,
the containing file is read-only).void setThenBranch(PsiStatement statement) throws IncorrectOperationException
statement
- the statement to use as the then branch.IncorrectOperationException
- if the modification fails for some reason (for example,
the containing file is read-only).PsiJavaToken getLParenth()
PsiJavaToken getRParenth()