File tree Expand file tree Collapse file tree 6 files changed +14
-18
lines changed
main/java/software/xdev/saveactions
test/java/software/xdev/saveactions/integration Expand file tree Collapse file tree 6 files changed +14
-18
lines changed Original file line number Diff line number Diff line change 1- ## 1.0.6
1+ ## 1.1.0
2+ * Removed "Remove unused suppress warning annotation"
3+ * This option never worked #64
4+ * Allows usage of the plugin with IntelliJ Idea 2024+ #63
5+ * If you used this option you should remove the line `` <option value="suppressAnnotation" /> `` inside `` saveactions_settings.xml ``
26* Allow compilation with Java 21
37
48## 1.0.5
Original file line number Diff line number Diff line change 22pluginGroup =software.xdev.saveactions
33pluginName =Save Actions - XDEV Edition
44# SemVer format -> https://semver.org
5- pluginVersion =1.0.6 -SNAPSHOT
5+ pluginVersion =1.1.0 -SNAPSHOT
66# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
77platformType =IC
88platformVersion =2023.1
Original file line number Diff line number Diff line change 44import java .util .Set ;
55import java .util .stream .Stream ;
66
7+ import static java .util .stream .Collectors .toSet ;
78import static software .xdev .saveactions .model .ActionType .activation ;
89import static software .xdev .saveactions .model .ActionType .build ;
910import static software .xdev .saveactions .model .ActionType .global ;
1011import static software .xdev .saveactions .model .ActionType .java ;
11- import static java .util .stream .Collectors .toSet ;
1212
1313public enum Action {
1414
@@ -100,9 +100,6 @@ public enum Action {
100100 explicitTypeCanBeDiamond ("Remove explicit generic type for diamond" ,
101101 java , false ),
102102
103- suppressAnnotation ("Remove unused suppress warning annotation" ,
104- java , false ),
105-
106103 unnecessarySemicolon ("Remove unnecessary semicolon" ,
107104 java , false ),
108105
Original file line number Diff line number Diff line change 1010import java .util .ArrayList ;
1111import java .util .HashSet ;
1212import java .util .List ;
13+ import java .util .Objects ;
1314import java .util .Set ;
1415
1516@ State (name = "SaveActionSettings" , storages = {@ com .intellij .openapi .components .Storage ("saveactions_settings.xml" )})
@@ -52,6 +53,12 @@ public Storage getState() {
5253 public void loadState (@ NotNull Storage state ) {
5354 firstLaunch = false ;
5455 XmlSerializerUtil .copyBean (state , this );
56+
57+ // Remove null values that might have been caused by non-parsable values
58+ actions .removeIf (Objects ::isNull );
59+ exclusions .removeIf (Objects ::isNull );
60+ inclusions .removeIf (Objects ::isNull );
61+ quickLists .removeIf (Objects ::isNull );
5562 }
5663
5764 public Set <Action > getActions () {
Original file line number Diff line number Diff line change 77import com .intellij .psi .PsiFile ;
88import com .siyeh .ig .classlayout .FinalPrivateMethodInspection ;
99import com .siyeh .ig .inheritance .MissingOverrideAnnotationInspection ;
10- import com .siyeh .ig .maturity .SuppressionAnnotationInspection ;
1110import com .siyeh .ig .performance .MethodMayBeStaticInspection ;
1211import com .siyeh .ig .style .ControlFlowStatementWithoutBracesInspection ;
1312import com .siyeh .ig .style .FieldMayBeFinalInspection ;
@@ -99,9 +98,6 @@ public enum JavaProcessor implements Processor {
9998 explicitTypeCanBeDiamond (Action .explicitTypeCanBeDiamond ,
10099 ExplicitTypeCanBeDiamondInspection ::new ),
101100
102- suppressAnnotation (Action .suppressAnnotation ,
103- SuppressionAnnotationInspection ::new ),
104-
105101 unnecessarySemicolon (Action .unnecessarySemicolon ,
106102 UnnecessarySemicolonInspection ::new ),
107103
Original file line number Diff line number Diff line change 1717import static software .xdev .saveactions .model .Action .methodMayBeStatic ;
1818import static software .xdev .saveactions .model .Action .missingOverrideAnnotation ;
1919import static software .xdev .saveactions .model .Action .singleStatementInBlock ;
20- import static software .xdev .saveactions .model .Action .suppressAnnotation ;
2120import static software .xdev .saveactions .model .Action .unnecessaryFinalOnLocalVariableOrParameter ;
2221import static software .xdev .saveactions .model .Action .unnecessarySemicolon ;
2322import static software .xdev .saveactions .model .Action .unnecessaryThis ;
@@ -150,13 +149,6 @@ void should_explicitTypeCanBeDiamond_removes_explicit_diamond() {
150149 assertSaveAction (ActionTestFile .ExplicitTypeCanBeDiamond_KO , ActionTestFile .ExplicitTypeCanBeDiamond_OK );
151150 }
152151
153- @ Test
154- void should_suppressAnnotation_remove_unnecessary_suppress_warning_annotation () {
155- storage .setEnabled (activate , true );
156- storage .setEnabled (suppressAnnotation , true );
157- assertSaveAction (ActionTestFile .SuppressAnnotation_KO , ActionTestFile .SuppressAnnotation_OK );
158- }
159-
160152 @ Test
161153 void should_unnecessarySemicolon_remove_unnecessary_semicolon () {
162154 storage .setEnabled (activate , true );
You can’t perform that action at this time.
0 commit comments