Closed MrDolch closed 7 months ago
This fixed the issue for me locally:
diff --git a/src/main/java/software/xdev/saveactions/processors/GlobalProcessor.java b/src/main/java/software/xdev/saveactions/processors/GlobalProcessor.java
index c161f7a..a823eaf 100644
--- a/src/main/java/software/xdev/saveactions/processors/GlobalProcessor.java
+++ b/src/main/java/software/xdev/saveactions/processors/GlobalProcessor.java
@@ -87,7 +87,7 @@ public enum GlobalProcessor implements Processor
@Override
public int getOrder()
{
- return 0;
+ return this.action == Action.reformat || this.action == Action.reformatChangedCode ? 3 : 0;
}
Thank you for the report, I can confirm the problem.
I think that GlobalProcessor
should generally always be executed last.
Thank you very much!
No problem :)
The fix is available in Version 1.2.0 which, which is already on the marketplace, however JetBrains needs to review each version. So this will likely take 1-2 days until this shows up.
I use the Save-Action-X plugin to force the reformatting of my code immediately after editing. I also use the
Java Inspection and Quick Fix
options to automatically addfinal
to parameters and variables.The problem is that the
Java Inspection and Quick Fix
-actions change the length of the lines, but the reformatting depends on the line lengths. Therefore, I have to execute the save actions twice to get the final result.The solution would be to always call the reformat action after all other code changing actions.