Compiler&plugin deprecations cleanup: string operations.
This commit is contained in:
+2
-2
@@ -163,7 +163,7 @@ public class OperatorToFunctionIntention : JetSelfTargetingIntention<JetExpressi
|
||||
val parent = element.getParent()
|
||||
val array = element.getArrayExpression()!!.getText()
|
||||
val indices = element.getIndicesNode()
|
||||
val indicesText = indices.getText()?.trim("[","]") ?: throw AssertionError("Indices node of ArrayExpression shouldn't be null: JetArrayAccessExpression = ${element.getText()}")
|
||||
val indicesText = indices.getText()?.removeSurrounding("[","]") ?: throw AssertionError("Indices node of ArrayExpression shouldn't be null: JetArrayAccessExpression = ${element.getText()}")
|
||||
|
||||
val transformation : String
|
||||
val replaced : JetElement
|
||||
@@ -185,7 +185,7 @@ public class OperatorToFunctionIntention : JetSelfTargetingIntention<JetExpressi
|
||||
private fun convertCall(element: JetCallExpression): JetExpression {
|
||||
val callee = element.getCalleeExpression()!!
|
||||
val arguments = element.getValueArgumentList()
|
||||
val argumentString = arguments?.getText()?.trim("(", ")")
|
||||
val argumentString = arguments?.getText()?.removeSurrounding("(", ")")
|
||||
val funcLitArgs = element.getFunctionLiteralArguments()
|
||||
val calleeText = callee.getText()
|
||||
val transformation = "$calleeText.${OperatorConventions.INVOKE.asString()}" +
|
||||
|
||||
+1
-1
@@ -88,7 +88,7 @@ public class CreateIncrementalCompilationBackup: AnAction("Create backup for deb
|
||||
for (rev in revisions) {
|
||||
val label = rev.getLabel()
|
||||
if (label != null && label.startsWith(HISTORY_LABEL_PREFIX)) {
|
||||
val patchFile = File(patchesDir, label.trimLeading(HISTORY_LABEL_PREFIX) + ".patch")
|
||||
val patchFile = File(patchesDir, label.removePrefix(HISTORY_LABEL_PREFIX) + ".patch")
|
||||
|
||||
indicator.setText("Creating patch $patchFile")
|
||||
indicator.setFraction(PATCHES_FRACTION * patchesCreated / PATCHES_TO_CREATE)
|
||||
|
||||
@@ -72,7 +72,7 @@ object KDocRenderer {
|
||||
}
|
||||
to.append("<dl><dt><b>${title}:</b></dt>")
|
||||
tags.forEach {
|
||||
to.append("<dd><code>${it.getSubjectName()}</code> - ${markdownToHtml(it.getContent().trimLeading())}</dd>")
|
||||
to.append("<dd><code>${it.getSubjectName()}</code> - ${markdownToHtml(it.getContent().trimStart())}</dd>")
|
||||
}
|
||||
to.append("</dl>\n")
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public abstract class AbstractDataFlowValueRenderingTest: JetLightCodeInsightFix
|
||||
val info = expression.analyze().getDataFlowInfo(expression)
|
||||
|
||||
val allValues = (info.getCompleteTypeInfo().keySet() + info.getCompleteNullabilityInfo().keySet()).toSet()
|
||||
val actual = allValues.map { renderDataFlowValue(it) }.filterNotNull().sort().makeString("\n")
|
||||
val actual = allValues.map { renderDataFlowValue(it) }.filterNotNull().sort().joinToString("\n")
|
||||
|
||||
JetTestUtils.assertEqualsToFile(File(FileUtil.getNameWithoutExtension(fileName) + ".txt"), actual)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user