From a6dad2a4337c7757ddd5f5c91cc7a78f30393ab6 Mon Sep 17 00:00:00 2001 From: "Denis.Zhdanov" Date: Thu, 24 May 2012 17:26:07 +0400 Subject: [PATCH] Green code policy is applied --- .../RequestFocusInEditorComponentCmd.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/commands/RequestFocusInEditorComponentCmd.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/commands/RequestFocusInEditorComponentCmd.java index 96c0f77c6384..7a772e7aed34 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/commands/RequestFocusInEditorComponentCmd.java +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/commands/RequestFocusInEditorComponentCmd.java @@ -28,6 +28,7 @@ import com.intellij.openapi.wm.IdeFocusManager; import com.intellij.openapi.wm.impl.FloatingDecorator; import com.intellij.openapi.wm.impl.IdeFrameImpl; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import javax.swing.*; import java.awt.*; @@ -98,7 +99,7 @@ public final class RequestFocusInEditorComponentCmd extends FinalizableCommand{ // if owner is active window or it has active child window which isn't floating decorator then // don't bring owner window to font. If we will make toFront every time then it's possible // the following situation: - // 1. user prform refactoring + // 1. user perform refactoring // 2. "Do not show preview" dialog is popping up. // 3. At that time "preview" tool window is being activated and modal "don't show..." dialog // isn't active. @@ -125,14 +126,15 @@ public final class RequestFocusInEditorComponentCmd extends FinalizableCommand{ * @return first active window from hierarchy with specified roots. Returns null * if there is no active window in the hierarchy. */ - private Window getActiveWindow(final Window[] windows){ - for(int i=0;i