From a834a7647e14043c8f8c36de3a3ae4e896d4bf84 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Mon, 19 Jun 2023 00:02:53 +0200 Subject: [PATCH] cleanup GitOrigin-RevId: 71e3469247019a6662871e0244873f32ba69b959 --- .../com/intellij/openapi/wm/impl/ProjectFrameHelper.kt | 9 +++------ .../com/intellij/openapi/wm/impl/WindowManagerImpl.kt | 6 +++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/ProjectFrameHelper.kt b/platform/platform-impl/src/com/intellij/openapi/wm/impl/ProjectFrameHelper.kt index 717dc1af85fc..32b10a4c45b1 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/ProjectFrameHelper.kt +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/ProjectFrameHelper.kt @@ -12,6 +12,7 @@ import com.intellij.openapi.application.* import com.intellij.openapi.application.impl.LaterInvocator import com.intellij.openapi.components.serviceIfCreated import com.intellij.openapi.diagnostic.Logger +import com.intellij.openapi.diagnostic.debug import com.intellij.openapi.diagnostic.logger import com.intellij.openapi.fileEditor.FileEditorManager import com.intellij.openapi.fileEditor.ex.FileEditorManagerEx @@ -321,16 +322,12 @@ open class ProjectFrameHelper internal constructor( rootPane.putClientProperty(INIT_BOUNDS_KEY, null) if (bounds is Rectangle) { ProjectFrameBounds.getInstance(project!!).markDirty(bounds) - if (IDE_FRAME_EVENT_LOG.isDebugEnabled) { // avoid unnecessary concatenation - IDE_FRAME_EVENT_LOG.debug("Applied init bounds for full screen from client property: $bounds") - } + IDE_FRAME_EVENT_LOG.debug { "Applied init bounds for full screen from client property: $bounds" } } } else { ProjectFrameBounds.getInstance(project!!).markDirty(frame.bounds) - if (IDE_FRAME_EVENT_LOG.isDebugEnabled) { // avoid unnecessary concatenation - IDE_FRAME_EVENT_LOG.debug("Applied init bounds for non-fullscreen from the frame: ${frame.bounds}") - } + IDE_FRAME_EVENT_LOG.debug { "Applied init bounds for non-fullscreen from the frame: ${frame.bounds}" } } } diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/WindowManagerImpl.kt b/platform/platform-impl/src/com/intellij/openapi/wm/impl/WindowManagerImpl.kt index 3500c1e2ac99..09a4957c66a5 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/WindowManagerImpl.kt +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/WindowManagerImpl.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. @file:Suppress("ReplaceGetOrSet", "ReplacePutWithAssignment") package com.intellij.openapi.wm.impl @@ -46,7 +46,7 @@ import javax.swing.JWindow private val LOG = logger() @JvmField -internal val IDE_FRAME_EVENT_LOG = Logger.getInstance("ide.frame.events") +internal val IDE_FRAME_EVENT_LOG: Logger = Logger.getInstance("ide.frame.events") @NonNls private const val FOCUSED_WINDOW_PROPERTY_NAME = "focusedWindow" @@ -506,7 +506,7 @@ internal class FrameStateListener(private val defaultFrameInfoHelper: FrameInfoH // Component moved during project loading - update myDefaultFrameInfo directly. // Cannot mark as dirty and compute later, because to convert user space info to device space, // we need graphicsConfiguration, but we can get graphicsConfiguration only from frame, - // but later, when getStateModificationCount or getState is called, may be no frame at all. + // but later, when getStateModificationCount or getState is called, there may be no frame at all. defaultFrameInfoHelper.updateFrameInfo(frameHelper, frame) } else if (!project.isDisposed) {