Skip to content
This repository has been archived by the owner on Nov 3, 2024. It is now read-only.

Commit

Permalink
backport changes/adapted changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
mplushnikov committed Sep 24, 2020
1 parent f7ce805 commit 92e9bda
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 17 deletions.
1 change: 0 additions & 1 deletion parts/pluginChanges.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<li>0.32
<ol>
<li>Fixed #761: EqualsAndHashCode: Wrong warning 'A method with one of those names already exists'</li>
<li>Fixed #802: [Only for IntelliJ>=2020.3] val mis-infers an Optional(T) as Optional(Object) after map.</li>
<li>Fixed #826: Error if using @FieldNameConstants in switch case</li>
<li>Fixed #858: Delombok produces duplicate @NonNull annotations on setters/getters</li>
<li>Fixed #933: Enable annotation processing warning showing everytime project is opened</li>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package de.plushnikov.intellij.plugin.extension;

import com.intellij.codeInsight.daemon.JavaErrorBundle;
import com.intellij.codeInsight.daemon.impl.HighlightInfo;
import com.intellij.codeInsight.daemon.impl.HighlightInfoFilter;
import com.intellij.codeInsight.intention.AddAnnotationFix;
Expand All @@ -17,7 +16,6 @@
import java.util.*;
import java.util.regex.Pattern;


public class LombokHighlightErrorFilter implements HighlightInfoFilter {
private static final Pattern LOMBOK_ANY_ANNOTATION_REQUIRED = Pattern.compile("Incompatible types\\. Found: '__*', required: 'lombok.*AnyAnnotation\\[\\]'");

Expand Down Expand Up @@ -144,7 +142,8 @@ public boolean accept(@NotNull PsiElement highlightedElement) {
CONSTANT_EXPRESSION_REQUIRED(HighlightSeverity.ERROR, CodeInsightColors.ERRORS_ATTRIBUTES) {
@Override
public boolean descriptionCheck(@Nullable String description) {
return JavaErrorBundle.message("constant.expression.required").equals(description);
// message("constant.expression.required")
return "Constant expression required".equals(description);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public void verifyParameter(@NotNull final PsiParameter psiParameter, @NotNull f
}
}

public boolean canInferType(@NotNull PsiTypeElement typeElement) {
private boolean canInferType(@NotNull PsiTypeElement typeElement) {
final PsiElement parent = typeElement.getParent();
return (parent instanceof PsiLocalVariable && isValOrVar((PsiLocalVariable) parent)) ||
(parent instanceof PsiParameter && isValOrVarForEach((PsiParameter) parent));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,6 @@ protected Set<String> transformModifiers(@NotNull PsiModifierList modifierList,
return result;
}

/**
* This method should be available in the next IntelliJ 203 Release
*/
// @Override
public boolean canInferType(@NotNull PsiTypeElement typeElement) {
if (!valProcessor.isEnabled(typeElement.getProject())) {
return false;
}
return valProcessor.canInferType(typeElement);
}

@Nullable
@Override
protected PsiType inferType(@NotNull PsiTypeElement typeElement) {
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/messages/lombokBundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ daemon.donate.content=<br/>\
Helpful? <b><a href="https://www.paypal.me/mplushnikov">Donate with PayPal</a></b><br/><br/>\
Fixes:<br/>\
- Fixed (<a href="https://github.com/mplushnikov/lombok-intellij-plugin/issues/761">#761</a>): EqualsAndHashCode: Wrong warning 'A method with one of those names already exists'<br/>\
- Fixed (<a href="https://github.com/mplushnikov/lombok-intellij-plugin/issues/802">#802</a>): val mis-infers an Optional(T) as Optional(Object) after map. Only for IntelliJ>=2020.3<br/>\
- Fixed (<a href="https://github.com/mplushnikov/lombok-intellij-plugin/issues/826">#826</a>): Error if using @FieldNameConstants in switch case<br/>\
- Fixed (<a href="https://github.com/mplushnikov/lombok-intellij-plugin/issues/858">#858</a>): Delombok produces duplicate @NonNull annotations on setters/getters<br/>\
- Fixed (<a href="https://github.com/mplushnikov/lombok-intellij-plugin/issues/933">#933</a>): Enable annotation processing warning showing everytime project is opened<br/>\
Expand Down

0 comments on commit 92e9bda

Please sign in to comment.