From 641d6c8b44256e24d139e26cc06a9320e253ca05 Mon Sep 17 00:00:00 2001 From: "Maxim.Kolmakov" Date: Tue, 27 Jun 2017 17:09:24 +0200 Subject: [PATCH] [gui-test] Greenify --- .../intellij/testGuiFramework/generators/Generators.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/platform/testGuiFramework/src/com/intellij/testGuiFramework/generators/Generators.kt b/platform/testGuiFramework/src/com/intellij/testGuiFramework/generators/Generators.kt index 5740f590c49f..c2d020517e1b 100644 --- a/platform/testGuiFramework/src/com/intellij/testGuiFramework/generators/Generators.kt +++ b/platform/testGuiFramework/src/com/intellij/testGuiFramework/generators/Generators.kt @@ -13,6 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +@file:Suppress("unused") + package com.intellij.testGuiFramework.generators import com.intellij.framework.PresentableVersion @@ -433,10 +435,10 @@ class MacMessageGenerator : LocalContextCodeGenerator() { private fun acceptMacSheetPanel(cmp: Component): Boolean { if (cmp !is JComponent) return false - if (!(Messages.canShowMacSheetPanel() && (cmp as JComponent).rootPane.parent is JDialog)) return false + if (!(Messages.canShowMacSheetPanel() && cmp.rootPane.parent is JDialog)) return false val panel = cmp.rootPane.contentPane as JPanel - if (panel.javaClass.name.startsWith(SheetController::class.java.name) && panel.isShowing()) { + if (panel.javaClass.name.startsWith(SheetController::class.java.name) && panel.isShowing) { val controller = MessagesFixture.findSheetController(panel) val sheetPanel = field("mySheetPanel").ofType(JPanel::class.java).`in`(controller).get() if (sheetPanel === panel) { @@ -597,7 +599,7 @@ object Utils { } fun convertSimpleTreeItemToPath(tree: SimpleTree, itemName: String): String { - val searchableNodeRef = Ref.create(); + val searchableNodeRef = Ref.create() val searchableNode: TreeNode? TreeUtil.traverse(tree.model.root as TreeNode) { node -> val valueFromNode = SettingsTreeFixture.getValueFromNode(tree, node) @@ -631,7 +633,7 @@ object Utils { } } - throw ComponentLookupException("Unable to find bounded label in ${hierarchyLevel - 1} level(s) from ${component.toString()}") + throw ComponentLookupException("Unable to find bounded label in ${hierarchyLevel - 1} level(s) from $component") }