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 ``
2
6
* Allow compilation with Java 21
3
7
4
8
## 1.0.5
Original file line number Diff line number Diff line change 2
2
pluginGroup =software.xdev.saveactions
3
3
pluginName =Save Actions - XDEV Edition
4
4
# SemVer format -> https://semver.org
5
- pluginVersion =1.0.6 -SNAPSHOT
5
+ pluginVersion =1.1.0 -SNAPSHOT
6
6
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
7
7
platformType =IC
8
8
platformVersion =2023.1
Original file line number Diff line number Diff line change 4
4
import java .util .Set ;
5
5
import java .util .stream .Stream ;
6
6
7
+ import static java .util .stream .Collectors .toSet ;
7
8
import static software .xdev .saveactions .model .ActionType .activation ;
8
9
import static software .xdev .saveactions .model .ActionType .build ;
9
10
import static software .xdev .saveactions .model .ActionType .global ;
10
11
import static software .xdev .saveactions .model .ActionType .java ;
11
- import static java .util .stream .Collectors .toSet ;
12
12
13
13
public enum Action {
14
14
@@ -100,9 +100,6 @@ public enum Action {
100
100
explicitTypeCanBeDiamond ("Remove explicit generic type for diamond" ,
101
101
java , false ),
102
102
103
- suppressAnnotation ("Remove unused suppress warning annotation" ,
104
- java , false ),
105
-
106
103
unnecessarySemicolon ("Remove unnecessary semicolon" ,
107
104
java , false ),
108
105
Original file line number Diff line number Diff line change 10
10
import java .util .ArrayList ;
11
11
import java .util .HashSet ;
12
12
import java .util .List ;
13
+ import java .util .Objects ;
13
14
import java .util .Set ;
14
15
15
16
@ State (name = "SaveActionSettings" , storages = {@ com .intellij .openapi .components .Storage ("saveactions_settings.xml" )})
@@ -52,6 +53,12 @@ public Storage getState() {
52
53
public void loadState (@ NotNull Storage state ) {
53
54
firstLaunch = false ;
54
55
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 );
55
62
}
56
63
57
64
public Set <Action > getActions () {
Original file line number Diff line number Diff line change 7
7
import com .intellij .psi .PsiFile ;
8
8
import com .siyeh .ig .classlayout .FinalPrivateMethodInspection ;
9
9
import com .siyeh .ig .inheritance .MissingOverrideAnnotationInspection ;
10
- import com .siyeh .ig .maturity .SuppressionAnnotationInspection ;
11
10
import com .siyeh .ig .performance .MethodMayBeStaticInspection ;
12
11
import com .siyeh .ig .style .ControlFlowStatementWithoutBracesInspection ;
13
12
import com .siyeh .ig .style .FieldMayBeFinalInspection ;
@@ -99,9 +98,6 @@ public enum JavaProcessor implements Processor {
99
98
explicitTypeCanBeDiamond (Action .explicitTypeCanBeDiamond ,
100
99
ExplicitTypeCanBeDiamondInspection ::new ),
101
100
102
- suppressAnnotation (Action .suppressAnnotation ,
103
- SuppressionAnnotationInspection ::new ),
104
-
105
101
unnecessarySemicolon (Action .unnecessarySemicolon ,
106
102
UnnecessarySemicolonInspection ::new ),
107
103
Original file line number Diff line number Diff line change 17
17
import static software .xdev .saveactions .model .Action .methodMayBeStatic ;
18
18
import static software .xdev .saveactions .model .Action .missingOverrideAnnotation ;
19
19
import static software .xdev .saveactions .model .Action .singleStatementInBlock ;
20
- import static software .xdev .saveactions .model .Action .suppressAnnotation ;
21
20
import static software .xdev .saveactions .model .Action .unnecessaryFinalOnLocalVariableOrParameter ;
22
21
import static software .xdev .saveactions .model .Action .unnecessarySemicolon ;
23
22
import static software .xdev .saveactions .model .Action .unnecessaryThis ;
@@ -150,13 +149,6 @@ void should_explicitTypeCanBeDiamond_removes_explicit_diamond() {
150
149
assertSaveAction (ActionTestFile .ExplicitTypeCanBeDiamond_KO , ActionTestFile .ExplicitTypeCanBeDiamond_OK );
151
150
}
152
151
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
-
160
152
@ Test
161
153
void should_unnecessarySemicolon_remove_unnecessary_semicolon () {
162
154
storage .setEnabled (activate , true );
You can’t perform that action at this time.
0 commit comments