More consistent intention texts 2

This commit is contained in:
Valentin Kipyatkov
2015-07-21 15:23:30 +03:00
parent 6339ad4ec6
commit 16ae9e3861
4 changed files with 4 additions and 4 deletions
@@ -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
@@ -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? {