More consistent intention texts 2
This commit is contained in:
@@ -33,7 +33,7 @@ import org.jetbrains.kotlin.resolve.calls.callUtil.getResolvedCall
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameUnsafe
|
||||
import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode
|
||||
|
||||
public class AddForLoopIndicesIntention : JetSelfTargetingRangeIntention<JetForExpression>(javaClass(), "Add indices to for-loop"), LowPriorityAction {
|
||||
public class AddForLoopIndicesIntention : JetSelfTargetingRangeIntention<JetForExpression>(javaClass(), "Add indices to 'for' loop"), LowPriorityAction {
|
||||
private val WITH_INDEX_FQ_NAME = "kotlin.withIndex"
|
||||
|
||||
override fun applicabilityRange(element: JetForExpression): TextRange? {
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.jetbrains.kotlin.resolve.DescriptorUtils
|
||||
import org.jetbrains.kotlin.resolve.calls.callUtil.getResolvedCall
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.ExpressionReceiver
|
||||
|
||||
public class ConvertForEachToForLoopIntention : JetSelfTargetingOffsetIndependentIntention<JetSimpleNameExpression>(javaClass(), "Replace with a for-loop") {
|
||||
public class ConvertForEachToForLoopIntention : JetSelfTargetingOffsetIndependentIntention<JetSimpleNameExpression>(javaClass(), "Replace with a 'for' loop") {
|
||||
override fun isApplicableTo(element: JetSimpleNameExpression): Boolean {
|
||||
if (element.getReferencedName() != "forEach") return false
|
||||
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import org.jetbrains.kotlin.psi.createExpressionByPattern
|
||||
import org.jetbrains.kotlin.psi.psiUtil.contentRange
|
||||
import org.jetbrains.kotlin.psi.psiUtil.endOffset
|
||||
|
||||
public class ConvertToForEachFunctionCallIntention : JetSelfTargetingIntention<JetForExpression>(javaClass(), "Replace with a forEach function call") {
|
||||
public class ConvertToForEachFunctionCallIntention : JetSelfTargetingIntention<JetForExpression>(javaClass(), "Replace with a 'forEach' function call") {
|
||||
override fun isApplicableTo(element: JetForExpression, caretOffset: Int): Boolean {
|
||||
val rParen = element.getRightParenthesis() ?: return false
|
||||
if (caretOffset > rParen.endOffset) return false // available only on the loop header, not in the body
|
||||
|
||||
@@ -40,7 +40,7 @@ public class RemoveForLoopIndicesInspection : IntentionBasedInspection<JetForExp
|
||||
get() = ProblemHighlightType.LIKE_UNUSED_SYMBOL
|
||||
}
|
||||
|
||||
public class RemoveForLoopIndicesIntention : JetSelfTargetingRangeIntention<JetForExpression>(javaClass(), "Remove indices in for-loop") {
|
||||
public class RemoveForLoopIndicesIntention : JetSelfTargetingRangeIntention<JetForExpression>(javaClass(), "Remove indices in 'for' loop") {
|
||||
private val WITH_INDEX_FQ_NAME = "kotlin.withIndex"
|
||||
|
||||
override fun applicabilityRange(element: JetForExpression): TextRange? {
|
||||
|
||||
Reference in New Issue
Block a user