GitOrigin-RevId: 96021f1b831167474b151c8ce0e318276bcdc7c6
This commit is contained in:
Alexey Kudravtsev
2022-08-03 08:34:16 +00:00
committed by intellij-monorepo-bot
parent 6fbab6ab16
commit 5224aa124a
5 changed files with 7 additions and 6 deletions
@@ -9,9 +9,10 @@ import com.intellij.psi.PsiFile;
import org.jetbrains.annotations.NotNull;
public abstract class MutablyNamedIntention extends Intention {
private @IntentionName String text = null;
private @IntentionName String text;
protected abstract @IntentionName String getTextForElement(PsiElement element);
@NotNull
protected abstract @IntentionName String getTextForElement(@NotNull PsiElement element);
@Override
@NotNull
@@ -21,7 +21,7 @@ import org.jetbrains.plugins.groovy.lang.psi.impl.utils.ParenthesesUtils;
public class DemorgansLawIntention extends MutablyNamedIntention {
@Override
protected @IntentionName String getTextForElement(PsiElement element) {
protected @IntentionName @NotNull String getTextForElement(@NotNull PsiElement element) {
final GrBinaryExpression binaryExpression = (GrBinaryExpression)element;
final IElementType tokenType = binaryExpression.getOperationTokenType();
if (GroovyTokenTypes.mLAND.equals(tokenType)) {
@@ -18,7 +18,7 @@ import org.jetbrains.plugins.groovy.lang.psi.impl.utils.ComparisonUtils;
public class FlipComparisonIntention extends MutablyNamedIntention {
@Override
protected @IntentionName String getTextForElement(PsiElement element) {
protected @IntentionName @NotNull String getTextForElement(@NotNull PsiElement element) {
final GrBinaryExpression binaryExpression = (GrBinaryExpression) element;
final IElementType tokenType = binaryExpression.getOperationTokenType();
final String comparison = ComparisonUtils.getStringForComparison(tokenType);
@@ -18,7 +18,7 @@ import org.jetbrains.plugins.groovy.lang.psi.impl.PsiImplUtil;
public class FlipConjunctionIntention extends MutablyNamedIntention {
@Override
protected @IntentionName String getTextForElement(PsiElement element) {
protected @IntentionName @NotNull String getTextForElement(@NotNull PsiElement element) {
final GrBinaryExpression binaryExpression = (GrBinaryExpression)element;
final IElementType tokenType = binaryExpression.getOperationTokenType();
final String conjunction = getConjunction(tokenType);
@@ -17,7 +17,7 @@ import org.jetbrains.plugins.groovy.lang.psi.impl.utils.ComparisonUtils;
public class NegateComparisonIntention extends MutablyNamedIntention {
@Override
protected @IntentionName String getTextForElement(PsiElement element) {
protected @IntentionName @NotNull String getTextForElement(@NotNull PsiElement element) {
final GrBinaryExpression binaryExpression = (GrBinaryExpression) element;
final IElementType tokenType = binaryExpression.getOperationTokenType();
final String comparison = ComparisonUtils.getStringForComparison(tokenType);