Refactored "Change to constructor invocation" and new "Add constructor parameters and use them" quickfixes into one factory, making the first one always available

This commit is contained in:
Valentin Kipyatkov
2015-05-08 20:27:39 +03:00
parent cd419c2ddf
commit a5dabac296
10 changed files with 136 additions and 207 deletions
@@ -1,6 +1,5 @@
#quick fix messages
add.function.body=Add function body
change.to.constructor.invocation=Change to constructor invocation
add.return.type=Add return type declaration
change.accessor.type=Change accessor type
change.getter.type=Change getter type to {0}
@@ -28,8 +28,8 @@ public abstract class JetIntentionActionsFactory {
public fun createActions(diagnostic: Diagnostic): List<IntentionAction> {
if (diagnostic.getPsiElement().getContainingFile() is JetCodeFragment && !isApplicableForCodeFragment()) {
return Collections.emptyList()
return emptyList()
}
return doCreateActions(diagnostic) ?: Collections.emptyList()
return doCreateActions(diagnostic) ?: emptyList()
}
}