From a258ab75f6a0e2c2aae98875fa9db9b4cf0a01f6 Mon Sep 17 00:00:00 2001 From: Anton Makeev Date: Wed, 21 Dec 2011 16:54:48 +0100 Subject: [PATCH] not-nulls and cosmetics --- .../execution/console/LanguageConsoleImpl.java | 14 +++++++++----- .../com/intellij/xdebugger/XDebuggerTestUtil.java | 13 ++++++++----- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/execution/console/LanguageConsoleImpl.java b/platform/lang-impl/src/com/intellij/execution/console/LanguageConsoleImpl.java index da3d82636502..18f0c22cd82c 100644 --- a/platform/lang-impl/src/com/intellij/execution/console/LanguageConsoleImpl.java +++ b/platform/lang-impl/src/com/intellij/execution/console/LanguageConsoleImpl.java @@ -65,11 +65,15 @@ import com.intellij.util.ui.update.MergingUpdateQueue; import com.intellij.util.ui.update.Update; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import javax.swing.FocusManager; import javax.swing.*; import java.awt.*; -import java.awt.event.*; +import java.awt.event.ComponentAdapter; +import java.awt.event.ComponentEvent; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; import java.util.Collections; import java.util.concurrent.atomic.AtomicBoolean; @@ -612,10 +616,10 @@ public class LanguageConsoleImpl implements Disposable, TypeSafeDataProvider { }); } - public static void printToConsole(final LanguageConsoleImpl console, - final String string, - final ConsoleViewContentType mainType, - ConsoleViewContentType additionalType) { + public static void printToConsole(@NotNull final LanguageConsoleImpl console, + @NotNull final String string, + @NotNull final ConsoleViewContentType mainType, + @Nullable ConsoleViewContentType additionalType) { final TextAttributes mainAttributes = mainType.getAttributes(); final TextAttributes attributes; if (additionalType == null) { diff --git a/platform/xdebugger-impl/testSrc/com/intellij/xdebugger/XDebuggerTestUtil.java b/platform/xdebugger-impl/testSrc/com/intellij/xdebugger/XDebuggerTestUtil.java index 232bb48aca7b..16d141524036 100644 --- a/platform/xdebugger-impl/testSrc/com/intellij/xdebugger/XDebuggerTestUtil.java +++ b/platform/xdebugger-impl/testSrc/com/intellij/xdebugger/XDebuggerTestUtil.java @@ -166,19 +166,19 @@ public class XDebuggerTestUtil { assertVariableValue(findVar(vars, name), name, value); } - public static void assertVariableValueMatches(Collection vars, + public static void assertVariableValueMatches(@NotNull Collection vars, @Nullable String name, @Nullable String valuePattern) throws InterruptedException { assertVariableValueMatches(findVar(vars, name), name, valuePattern); } - public static void assertVariableValueMatches(XValue var, + public static void assertVariableValueMatches(@NotNull XValue var, @Nullable String name, @Nullable String valuePattern) throws InterruptedException { assertVariableValueMatches(var, name, null, valuePattern); } - public static void assertVariableValueMatches(XValue var, + public static void assertVariableValueMatches(@NotNull XValue var, @Nullable String name, @Nullable String type, @Nullable String valuePattern) throws InterruptedException { @@ -190,7 +190,9 @@ public class XDebuggerTestUtil { } } - public static void assertVariableTypeMatches(XValue var, String name, @Language("RegExp") String typePattern) throws InterruptedException { + public static void assertVariableTypeMatches(@NotNull XValue var, + @Nullable String name, + @Nullable @Language("RegExp") String typePattern) throws InterruptedException { XTestValueNode node = computePresentation(var); if (name != null) { Assert.assertEquals(name, node.myName); @@ -200,7 +202,8 @@ public class XDebuggerTestUtil { } } - public static void assertVariableFullValue(XValue var, @Nullable String value) throws InterruptedException { + public static void assertVariableFullValue(@NotNull XValue var, + @Nullable String value) throws InterruptedException { XTestValueNode node = computePresentation(var); final String[] result = new String[1];