mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
Apply "Kotlin | Assignment can be replaced with operator assignment" on whole project
^KTIJ-25352 GitOrigin-RevId: ed3283325767f207167717ca703a102f4eb50e66
This commit is contained in:
committed by
intellij-monorepo-bot
parent
964976859c
commit
eba859446f
@@ -181,7 +181,7 @@ class JdkUpdateTest : BareTestFixtureTestCase() {
|
||||
Assert.assertEquals(1, listOurActions().size)
|
||||
|
||||
runWriteAction {
|
||||
old1.jdk.sdkModificator.also { it.homePath = it.homePath + "-123" }.commitChanges()
|
||||
old1.jdk.sdkModificator.also { it.homePath += "-123" }.commitChanges()
|
||||
}
|
||||
service<JdkUpdaterNotifications>().showNotification(old1.jdk, old1.oldItem, old1.newItem)
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ fun convertHSLtoRGB(hslFloats: FloatArray, alpha: Float): Int {
|
||||
throw IllegalArgumentException(message)
|
||||
}
|
||||
// Formula needs all values between 0 - 1.
|
||||
h = h % 360.0f
|
||||
h %= 360.0f
|
||||
h /= 360f
|
||||
s /= 100f
|
||||
l /= 100f
|
||||
|
||||
@@ -205,7 +205,7 @@ private class CombinedSimpleDiffBlock(project: Project,
|
||||
someError = maxOf(e.gutterComponentEx.preferredSize.height - body.targetComponent.preferredSize.height, someError)
|
||||
}
|
||||
if (someError > 0) {
|
||||
preferredSize.height = preferredSize.height + someError
|
||||
preferredSize.height += someError
|
||||
}
|
||||
return preferredSize
|
||||
}
|
||||
|
||||
@@ -83,6 +83,6 @@ internal class OnChangePanel {
|
||||
|
||||
private fun log(component: JComponent, context: ChangeContext, text: String? = null) {
|
||||
val textLog = if (text == null) "" else "($text)"
|
||||
log.text = log.text + "component = ${component::class.java.name}$textLog, binding = ${context.binding}, event: ${context.event}\n"
|
||||
log.text += "component = ${component::class.java.name}$textLog, binding = ${context.binding}, event: ${context.event}\n"
|
||||
}
|
||||
}
|
||||
@@ -290,7 +290,7 @@ internal class ToolWindowDragHelper(parent: Disposable, @JvmField val dragSource
|
||||
else {
|
||||
dragMoreButtonNewSide = LEFT
|
||||
}
|
||||
bounds.width = bounds.width / 3
|
||||
bounds.width /= 3
|
||||
dropTargetHighlightComponent.bounds = bounds
|
||||
relocateImageDialog(event)
|
||||
return
|
||||
|
||||
@@ -504,8 +504,8 @@ internal open class ModuleImlFileEntitiesSerializer(internal val modulePath: Mod
|
||||
else {
|
||||
|
||||
(contentRoot as ContentRootEntity.Builder).apply {
|
||||
this.sourceRoots = this.sourceRoots + sourceRoots
|
||||
this.excludedUrls = this.excludedUrls + excludes
|
||||
this.sourceRoots += sourceRoots
|
||||
this.excludedUrls += excludes
|
||||
}
|
||||
// Add order of source roots
|
||||
if (sourceRootOrder != null) {
|
||||
|
||||
@@ -431,7 +431,7 @@ class DiffBuilderTest {
|
||||
val child = source addEntity XChildWithOptionalParentEntity(parentAndChildProperty, MySource)
|
||||
val parent = source addEntity XParentEntity(parentAndChildProperty, MySource)
|
||||
source.modifyEntity(parent) {
|
||||
this.optionalChildren = this.optionalChildren + child
|
||||
this.optionalChildren += child
|
||||
}
|
||||
|
||||
target.addDiff(source)
|
||||
|
||||
@@ -245,7 +245,7 @@ open class AttachToProcessDialog(
|
||||
return
|
||||
}
|
||||
if (isNonPrintable(e.keyCode)) return
|
||||
filterTextField.text = filterTextField.text + e.keyChar
|
||||
filterTextField.text += e.keyChar
|
||||
}
|
||||
}
|
||||
list.getFocusedComponent().addKeyListener(keyListener)
|
||||
|
||||
@@ -128,7 +128,7 @@ class StandaloneScriptRunConfigurationTest : KotlinCodeInsightTestCase() {
|
||||
val runConfiguration = createConfigurationFromElement(script, save = true) as KotlinStandaloneScriptRunConfiguration
|
||||
|
||||
Assert.assertEquals("script.kts", runConfiguration.name)
|
||||
runConfiguration.workingDirectory = runConfiguration.workingDirectory + "/customWorkingDirectory"
|
||||
runConfiguration.workingDirectory += "/customWorkingDirectory"
|
||||
val scriptVirtualFileBefore = script.containingFile.virtualFile
|
||||
val originalPath = scriptVirtualFileBefore.canonicalPath
|
||||
val originalWorkingDirectory = scriptVirtualFileBefore.parent.canonicalPath + "/customWorkingDirectory"
|
||||
|
||||
@@ -1215,7 +1215,7 @@ class JavaToJKTreeBuilder(
|
||||
}
|
||||
|
||||
else ->
|
||||
cases.lastOrNull()?.also { it.statements = it.statements + statement.toJK() } ?: run {
|
||||
cases.lastOrNull()?.also { it.statements += statement.toJK() } ?: run {
|
||||
cases += JKJavaClassicLabelSwitchCase(
|
||||
listOf(JKStubExpression()),
|
||||
listOf(statement.toJK())
|
||||
|
||||
Reference in New Issue
Block a user