From 881aa60d8a4358e71cbaae64bc01e95092e10e21 Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Mon, 26 Dec 2011 13:57:05 +0400 Subject: [PATCH] cleanup --- .../src/com/intellij/refactoring/ui/MethodCellRenderer.java | 4 +--- platform/core-api/src/com/intellij/psi/impl/ElementBase.java | 2 +- .../codeInsight/lookup/DefaultLookupItemRenderer.java | 5 ++--- .../src/com/intellij/openapi/ui/VerticalFlowLayout.java | 4 ++-- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/java/java-impl/src/com/intellij/refactoring/ui/MethodCellRenderer.java b/java/java-impl/src/com/intellij/refactoring/ui/MethodCellRenderer.java index 99cfd34f29b1..b7ddf433ecad 100644 --- a/java/java-impl/src/com/intellij/refactoring/ui/MethodCellRenderer.java +++ b/java/java-impl/src/com/intellij/refactoring/ui/MethodCellRenderer.java @@ -42,9 +42,7 @@ public class MethodCellRenderer extends DefaultListCellRenderer { PsiFormatUtil.SHOW_TYPE); setText(text); - final int flags = Iconable.ICON_FLAG_VISIBILITY; - - Icon icon = method.getIcon(flags); + Icon icon = method.getIcon(Iconable.ICON_FLAG_VISIBILITY); if(icon != null) setIcon(icon); return this; } diff --git a/platform/core-api/src/com/intellij/psi/impl/ElementBase.java b/platform/core-api/src/com/intellij/psi/impl/ElementBase.java index 9b9be421e145..f3a46d39df0f 100644 --- a/platform/core-api/src/com/intellij/psi/impl/ElementBase.java +++ b/platform/core-api/src/com/intellij/psi/impl/ElementBase.java @@ -150,7 +150,7 @@ public abstract class ElementBase extends UserDataHolderBase implements Iconable } public static boolean isNativeFileType(FileType fileType) { - return (fileType instanceof INativeFileType && ((INativeFileType) fileType).useNativeIcon()) || fileType instanceof UnknownFileType; + return fileType instanceof INativeFileType && ((INativeFileType) fileType).useNativeIcon() || fileType instanceof UnknownFileType; } protected Icon getAdjustedBaseIcon(Icon icon, int flags) { diff --git a/platform/lang-impl/src/com/intellij/codeInsight/lookup/DefaultLookupItemRenderer.java b/platform/lang-impl/src/com/intellij/codeInsight/lookup/DefaultLookupItemRenderer.java index 6d6d7b78ae94..bd6a7f45aed7 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/lookup/DefaultLookupItemRenderer.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/lookup/DefaultLookupItemRenderer.java @@ -61,7 +61,6 @@ public class DefaultLookupItemRenderer extends LookupElementRenderer Object o = item.getObject(); - int flags = Iconable.ICON_FLAG_VISIBILITY; if (!real) { if (item.getObject() instanceof String) { return EmptyIcon.ICON_0; @@ -71,7 +70,7 @@ public class DefaultLookupItemRenderer extends LookupElementRenderer } if (o instanceof Iconable && !(o instanceof PsiElement)) { - return ((Iconable)o).getIcon(flags); + return ((Iconable)o).getIcon(Iconable.ICON_FLAG_VISIBILITY); } if (o instanceof LookupValueWithPsiElement) { @@ -80,7 +79,7 @@ public class DefaultLookupItemRenderer extends LookupElementRenderer if (o instanceof PsiElement) { final PsiElement element = (PsiElement)o; if (element.isValid()) { - return element.getIcon(flags); + return element.getIcon(Iconable.ICON_FLAG_VISIBILITY); } } return null; diff --git a/platform/platform-api/src/com/intellij/openapi/ui/VerticalFlowLayout.java b/platform/platform-api/src/com/intellij/openapi/ui/VerticalFlowLayout.java index e80b9e36a4bd..782257819c0b 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/VerticalFlowLayout.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/VerticalFlowLayout.java @@ -24,8 +24,8 @@ public class VerticalFlowLayout extends FlowLayout implements Serializable { public static final int TOP = 0; private boolean myVerticalFill; private boolean myHorizontalFill; - private int vGap; - private int hGap; + private final int vGap; + private final int hGap; public VerticalFlowLayout() { this(TOP, 5, 5, true, false);