boolean (IntentionAction intention) { String intentionText = intention.getText(); String familyName = intention.getFamilyName(); boolean isCommentChangingAction = intentionText.startsWith("Replace with end-of-line comment") || intentionText.startsWith("Replace with block comment") || intentionText.equals("Replace with Javadoc comment") || intentionText.startsWith("Remove //noinspection") || intentionText.startsWith("Convert to Basic Latin") || intentionText.startsWith("Unwrap 'if' statement") ||//remove ifs content intentionText.startsWith("Remove 'if' statement") ||//remove content of the if with everything inside intentionText.equals("Remove 'while' statement") || intentionText.startsWith("Unimplement Class") || intentionText.startsWith("Unimplement Interface") ||//remove methods in batch intentionText.startsWith("Suppress with 'NON-NLS' comment") || intentionText.startsWith("Move comment to separate line") ||//merge comments on same line intentionText.startsWith("Remove redundant arguments to call") ||//removes arg with all comments inside intentionText.startsWith("Convert to 'enum'") ||//removes constructor with javadoc? intentionText.startsWith("Remove redundant constructor") || intentionText.startsWith("Remove block marker comment") || intentionText.startsWith("Remove redundant method") || intentionText.startsWith("Delete unnecessary import") || intentionText.startsWith("Delete empty class initializer") || intentionText.startsWith("Replace with 'throws Exception'") || intentionText.startsWith("Replace unicode escape with character") || intentionText.startsWith("Remove 'serialVersionUID' field") || intentionText.startsWith("Remove unnecessary") || intentionText.startsWith("Remove 'try-finally' block") || intentionText.startsWith("Fix doc comment") || intentionText.startsWith("Add Javadoc") || intentionText.startsWith("Replace qualified name with import") ||//may change references in javadoc, making refs always qualified in javadoc makes them expand on "reformat" intentionText.startsWith("Qualify with outer class") ||// may change links in javadoc intentionText.contains("'ordering inconsistent with equals'") ||//javadoc will be changed intentionText.matches("Simplify '.*' to .*") || intentionText.matches("Move '.*' to Javadoc ''@throws'' tag") || intentionText.matches("Remove '.*' from '.*' throws list") || intentionText.matches(JavaAnalysisBundle.message("inspection.redundant.type.remove.quickfix")) || intentionText.matches("Remove .+ suppression") || familyName.equals("Fix typo") || familyName.equals("Reformat the whole file"); // may update @noinspection lines return !isCommentChangingAction; }