This commit is contained in:
svtk
2011-10-25 17:40:36 +04:00
parent 2984cfa959
commit f7950f9469
7 changed files with 11 additions and 11 deletions
@@ -23,4 +23,4 @@ remove.cast=Remove cast
remove.elvis.operator=Remove elvis operator
replace.operation.in.binary.expression=Replace operation in a binary expression
replace.cast.with.static.assert=Replace a cast with a static assert
replace.to.dot.call=Replace to dot call
replace.with.dot.call=Replace with dot call
@@ -81,7 +81,7 @@ public class QuickFixes {
add(Errors.USELESS_ELVIS, RemoveRightPartOfBinaryExpressionFix.createRemoveElvisOperatorFactory());
add(Errors.UNNECESSARY_SAFE_CALL, ReplaceSafeCallToDotCall.createFactory());
add(Errors.UNNECESSARY_SAFE_CALL, ReplaceSafeCallWithDotCall.createFactory());
JetIntentionActionFactory<JetModifierList> removeRedundantModifierFactory = RemoveModifierFix.createRemoveModifierFromListFactory(true);
add(Errors.REDUNDANT_MODIFIER, removeRedundantModifierFactory);
@@ -13,22 +13,22 @@ import org.jetbrains.jet.plugin.JetBundle;
/**
* @author svtk
*/
public class ReplaceSafeCallToDotCall extends JetIntentionAction<JetElement> {
public class ReplaceSafeCallWithDotCall extends JetIntentionAction<JetElement> {
public ReplaceSafeCallToDotCall(@NotNull JetElement element) {
public ReplaceSafeCallWithDotCall(@NotNull JetElement element) {
super(element);
}
@NotNull
@Override
public String getText() {
return JetBundle.message("replace.to.dot.call");
return JetBundle.message("replace.with.dot.call");
}
@NotNull
@Override
public String getFamilyName() {
return JetBundle.message("replace.to.dot.call");
return JetBundle.message("replace.with.dot.call");
}
@Override
@@ -56,7 +56,7 @@ public class ReplaceSafeCallToDotCall extends JetIntentionAction<JetElement> {
@Override
public JetIntentionAction<JetElement> createAction(DiagnosticWithPsiElement diagnostic) {
assert diagnostic.getPsiElement() instanceof JetElement;
return new ReplaceSafeCallToDotCall((JetElement) diagnostic.getPsiElement());
return new ReplaceSafeCallWithDotCall((JetElement) diagnostic.getPsiElement());
}
};
}
@@ -1,4 +1,4 @@
// "Replace to dot call" "true"
// "Replace with dot call" "true"
fun foo(a: Any) {
<caret>a.equals(0)
}
@@ -1,4 +1,4 @@
// "Replace to dot call" "true"
// "Replace with dot call" "true"
fun foo(a: Any) {
when (a) {
.equals(0) => true
@@ -1,4 +1,4 @@
// "Replace to dot call" "true"
// "Replace with dot call" "true"
fun foo(a: Any) {
a<caret>?.equals(0)
}
@@ -1,4 +1,4 @@
// "Replace to dot call" "true"
// "Replace with dot call" "true"
fun foo(a: Any) {
when (a) {
<caret>?.equals(0) => true