rename
This commit is contained in:
@@ -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);
|
||||
|
||||
+5
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user