public class SimplifyBooleanExpressionFix extends LocalQuickFixOnPsiElement
myEndElement, myStartElement
EMPTY_ARRAY
Constructor and Description |
---|
SimplifyBooleanExpressionFix(PsiExpression subExpression,
boolean subExpressionValue) |
Modifier and Type | Method and Description |
---|---|
static boolean |
canBeSimplified(PsiExpression expression) |
PsiExpression |
ensureCodeBlock(Project project,
PsiExpression subExpression) |
static java.lang.Boolean |
getConstBoolean(PsiExpression operand) |
java.lang.String |
getFamilyName() |
static java.lang.String |
getFamilyNameText() |
static java.lang.String |
getIntentionText(PsiExpression expression,
boolean constantValue) |
java.lang.String |
getText() |
void |
invoke(Project project,
PsiFile file,
PsiElement startElement,
PsiElement endElement) |
boolean |
isAvailable() |
static void |
simplifyExpression(PsiExpression expression) |
applyFix, applyFix, getEndElement, getName, getStartElement, isAvailable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getElementToMakeWritable
startInWriteAction
public SimplifyBooleanExpressionFix(PsiExpression subExpression, boolean subExpressionValue)
public java.lang.String getText()
getText
in class LocalQuickFixOnPsiElement
public static java.lang.String getIntentionText(PsiExpression expression, boolean constantValue)
public java.lang.String getFamilyName()
QuickFix.getName()
.public boolean isAvailable()
isAvailable
in class LocalQuickFixOnPsiElement
public void invoke(Project project, PsiFile file, PsiElement startElement, PsiElement endElement)
invoke
in class LocalQuickFixOnPsiElement
public PsiExpression ensureCodeBlock(Project project, PsiExpression subExpression)
public static void simplifyExpression(PsiExpression expression) throws IncorrectOperationException
IncorrectOperationException
public static boolean canBeSimplified(PsiExpression expression)
public static java.lang.Boolean getConstBoolean(PsiExpression operand)
public static java.lang.String getFamilyNameText()