diff --git a/java/execution/impl/src/com/intellij/execution/MethodListDlg.java b/java/execution/impl/src/com/intellij/execution/MethodListDlg.java index 2dff880ad1af..3fbf3b5115fb 100644 --- a/java/execution/impl/src/com/intellij/execution/MethodListDlg.java +++ b/java/execution/impl/src/com/intellij/execution/MethodListDlg.java @@ -25,6 +25,7 @@ import com.intellij.psi.PsiSubstitutor; import com.intellij.psi.util.PsiFormatUtil; import com.intellij.ui.*; import com.intellij.ui.components.JBList; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import javax.swing.*; @@ -51,7 +52,7 @@ public class MethodListDlg extends DialogWrapper { createList(psiClass.getAllMethods(), filter); myWholePanel.add(ScrollPaneFactory.createScrollPane(myList)); myList.setCellRenderer(new ColoredListCellRenderer() { - protected void customizeCellRenderer(final JList list, final Object value, final int index, final boolean selected, final boolean hasFocus) { + protected void customizeCellRenderer(@NotNull final JList list, final Object value, final int index, final boolean selected, final boolean hasFocus) { final PsiMethod psiMethod = (PsiMethod)value; append(PsiFormatUtil.formatMethod(psiMethod, PsiSubstitutor.EMPTY, PsiFormatUtil.SHOW_NAME, 0), StructureNodeRenderer.applyDeprecation(psiMethod, SimpleTextAttributes.REGULAR_ATTRIBUTES)); diff --git a/java/idea-ui/src/com/intellij/facet/impl/ui/libraries/LibraryOptionsPanel.java b/java/idea-ui/src/com/intellij/facet/impl/ui/libraries/LibraryOptionsPanel.java index 6c9862398b3d..15f961246bec 100644 --- a/java/idea-ui/src/com/intellij/facet/impl/ui/libraries/LibraryOptionsPanel.java +++ b/java/idea-ui/src/com/intellij/facet/impl/ui/libraries/LibraryOptionsPanel.java @@ -250,7 +250,7 @@ public class LibraryOptionsPanel implements Disposable { }); myExistingLibraryComboBox.setRenderer(new ColoredListCellRenderer(myExistingLibraryComboBox) { @Override - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { if (value == null) { append("[No library selected]"); } diff --git a/java/java-impl/src/com/intellij/codeInspection/java18StreamApi/AddMethodsDialog.java b/java/java-impl/src/com/intellij/codeInspection/java18StreamApi/AddMethodsDialog.java index 376d3a38b82a..b89db939b902 100644 --- a/java/java-impl/src/com/intellij/codeInspection/java18StreamApi/AddMethodsDialog.java +++ b/java/java-impl/src/com/intellij/codeInspection/java18StreamApi/AddMethodsDialog.java @@ -70,7 +70,7 @@ public class AddMethodsDialog extends DialogWrapper { myTemplatesCombo.setEnabled(false); myTemplatesCombo.setRenderer(new ColoredListCellRenderer() { @Override - protected void customizeCellRenderer(JList list, + protected void customizeCellRenderer(@NotNull JList list, PseudoLambdaReplaceTemplate template, int index, boolean selected, diff --git a/java/java-impl/src/com/intellij/codeInspection/java18StreamApi/StaticPseudoFunctionalStyleMethodOptions.java b/java/java-impl/src/com/intellij/codeInspection/java18StreamApi/StaticPseudoFunctionalStyleMethodOptions.java index e4842067e3bb..98d14e325a77 100644 --- a/java/java-impl/src/com/intellij/codeInspection/java18StreamApi/StaticPseudoFunctionalStyleMethodOptions.java +++ b/java/java-impl/src/com/intellij/codeInspection/java18StreamApi/StaticPseudoFunctionalStyleMethodOptions.java @@ -123,7 +123,7 @@ public class StaticPseudoFunctionalStyleMethodOptions { final JBList list = new JBList(myElements); list.setCellRenderer(new ColoredListCellRenderer() { @Override - protected void customizeCellRenderer(JList list, PipelineElement element, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, PipelineElement element, int index, boolean selected, boolean hasFocus) { final String classFQName = element.getHandlerClass(); final String[] split = classFQName.split("\\."); final int classShortNameIndex = classFQName.length() - split[split.length - 1].length(); diff --git a/java/java-impl/src/com/intellij/unscramble/ThreadDumpPanel.java b/java/java-impl/src/com/intellij/unscramble/ThreadDumpPanel.java index e84a09a485d0..73183568b0b2 100644 --- a/java/java-impl/src/com/intellij/unscramble/ThreadDumpPanel.java +++ b/java/java-impl/src/com/intellij/unscramble/ThreadDumpPanel.java @@ -266,7 +266,7 @@ public class ThreadDumpPanel extends JPanel implements DataProvider { private static class ThreadListCellRenderer extends ColoredListCellRenderer { @Override - protected void customizeCellRenderer(final JList list, final Object value, final int index, final boolean selected, final boolean hasFocus) { + protected void customizeCellRenderer(@NotNull final JList list, final Object value, final int index, final boolean selected, final boolean hasFocus) { ThreadState threadState = (ThreadState) value; setIcon(getThreadStateIcon(threadState)); if (!selected) { diff --git a/java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaClassInheritorsSearcher.java b/java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaClassInheritorsSearcher.java index 1b73af8d347e..e8e3e172926e 100644 --- a/java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaClassInheritorsSearcher.java +++ b/java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaClassInheritorsSearcher.java @@ -108,12 +108,17 @@ public class JavaClassInheritorsSearcher extends QueryExecutorBase> CACHE = HighlightingCaches.getInstance(project).ALL_SUB_CLASSES; Iterable cached = CACHE.get(baseClass); if (cached == null) { - cached = computeAllSubClasses(project, baseClass); // it's almost empty now, no big deal + Iterable computed = computeAllSubClasses(project, baseClass);// it's almost empty now, no big deal // for non-physical elements ignore the cache completely because non-physical elements created so often/unpredictably so I can't figure out when to clear caches in this case - if (ApplicationManager.getApplication().runReadAction((Computable)baseClass::isPhysical)) { + boolean isPhysical = ApplicationManager.getApplication().runReadAction((Computable)baseClass::isPhysical); + if (isPhysical) { // make sure concurrent calls of this method always return the same collection to avoid expensive duplicate work - cached = ConcurrencyUtil.cacheOrGet(CACHE, baseClass, cached); + cached = ConcurrencyUtil.cacheOrGet(CACHE, baseClass, computed); } + else { + cached = computed; + } + int i = 0; } return cached; } @@ -209,7 +214,7 @@ public class JavaClassInheritorsSearcher extends QueryExecutorBase() { - @Override - public boolean execute(@NotNull final PsiElement element) { - startFindUsages(element); - return false; - } + chooseAmbiguousTargetAndPerform(project, editor, element -> { + startFindUsages(element); + return false; }); } else { @@ -93,12 +90,9 @@ public class FindUsagesAction extends AnAction { int offset = editor.getCaretModel().getOffset(); boolean chosen = GotoDeclarationAction.chooseAmbiguousTarget(editor, offset, processor, FindBundle.message("find.usages.ambiguous.title"), null); if (!chosen) { - ApplicationManager.getApplication().invokeLater(new Runnable() { - @Override - public void run() { - if (editor.isDisposed() || !editor.getComponent().isShowing()) return; - HintManager.getInstance().showErrorHint(editor, FindBundle.message("find.no.usages.at.cursor.error")); - } + ApplicationManager.getApplication().invokeLater(() -> { + if (editor.isDisposed() || !editor.getComponent().isShowing()) return; + HintManager.getInstance().showErrorHint(editor, FindBundle.message("find.no.usages.at.cursor.error")); }, project.getDisposed()); } } diff --git a/platform/lang-impl/src/com/intellij/find/actions/FindUsagesInFileAction.java b/platform/lang-impl/src/com/intellij/find/actions/FindUsagesInFileAction.java index ffd44b0c0c37..2b2a3e3e924d 100644 --- a/platform/lang-impl/src/com/intellij/find/actions/FindUsagesInFileAction.java +++ b/platform/lang-impl/src/com/intellij/find/actions/FindUsagesInFileAction.java @@ -35,7 +35,6 @@ import com.intellij.usages.UsageTarget; import com.intellij.usages.UsageView; public class FindUsagesInFileAction extends AnAction { - public FindUsagesInFileAction() { setInjectedContext(true); } diff --git a/platform/lang-impl/src/com/intellij/find/actions/PingEDT.java b/platform/lang-impl/src/com/intellij/find/actions/PingEDT.java index 56f78ed05c71..7ab4e44c0eff 100644 --- a/platform/lang-impl/src/com/intellij/find/actions/PingEDT.java +++ b/platform/lang-impl/src/com/intellij/find/actions/PingEDT.java @@ -65,10 +65,10 @@ class PingEDT { } }; - public PingEDT(@NotNull @NonNls String name, - @NotNull Condition shutUpCondition, - int maxUnitOfWorkThresholdMs, - @NotNull Runnable pingAction) { + PingEDT(@NotNull @NonNls String name, + @NotNull Condition shutUpCondition, + int maxUnitOfWorkThresholdMs, + @NotNull Runnable pingAction) { myName = name; myShutUpCondition = shutUpCondition; myMaxUnitOfWorkThresholdMs = maxUnitOfWorkThresholdMs; diff --git a/platform/lang-impl/src/com/intellij/find/actions/ShowUsagesTableCellRenderer.java b/platform/lang-impl/src/com/intellij/find/actions/ShowUsagesTableCellRenderer.java index 95f591e2346e..8f811f9ada41 100644 --- a/platform/lang-impl/src/com/intellij/find/actions/ShowUsagesTableCellRenderer.java +++ b/platform/lang-impl/src/com/intellij/find/actions/ShowUsagesTableCellRenderer.java @@ -81,7 +81,7 @@ class ShowUsagesTableCellRenderer implements TableCellRenderer { textChunks.append(">..."); return textComponentSpanningWholeRow(textChunks, panelBackground, panelForeground, column, list); } - else if (usage == ShowUsagesAction.USAGES_OUTSIDE_SCOPE_SEPARATOR) { + if (usage == ShowUsagesAction.USAGES_OUTSIDE_SCOPE_SEPARATOR) { textChunks.append("...<"); textChunks.append(UsageViewManagerImpl.outOfScopeMessage(myOutOfScopeUsages.get(), mySearchScope), SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES); textChunks.append(">..."); @@ -108,7 +108,7 @@ class ShowUsagesTableCellRenderer implements TableCellRenderer { appendGroupText(list, (GroupNode)usageNode.getParent(), panel, fileBgColor, isSelected); return panel; } - else if (usage != ShowUsagesAction.MORE_USAGES_SEPARATOR && usage != ShowUsagesAction.USAGES_OUTSIDE_SCOPE_SEPARATOR) { + if (usage != ShowUsagesAction.MORE_USAGES_SEPARATOR && usage != ShowUsagesAction.USAGES_OUTSIDE_SCOPE_SEPARATOR) { UsagePresentation presentation = usage.getPresentation(); TextChunk[] text = presentation.getText(); diff --git a/platform/lang-impl/src/com/intellij/find/actions/UsageListCellRenderer.java b/platform/lang-impl/src/com/intellij/find/actions/UsageListCellRenderer.java index de7a86a3825a..6ebedd7e2055 100644 --- a/platform/lang-impl/src/com/intellij/find/actions/UsageListCellRenderer.java +++ b/platform/lang-impl/src/com/intellij/find/actions/UsageListCellRenderer.java @@ -44,7 +44,7 @@ public class UsageListCellRenderer extends ColoredListCellRenderer { } @Override - protected void customizeCellRenderer(final JList list, + protected void customizeCellRenderer(@NotNull final JList list, final Object value, final int index, final boolean selected, diff --git a/platform/lang-impl/src/com/intellij/framework/detection/impl/exclude/DetectionExcludesConfigurable.java b/platform/lang-impl/src/com/intellij/framework/detection/impl/exclude/DetectionExcludesConfigurable.java index fb21c709765d..e8fb0748a802 100644 --- a/platform/lang-impl/src/com/intellij/framework/detection/impl/exclude/DetectionExcludesConfigurable.java +++ b/platform/lang-impl/src/com/intellij/framework/detection/impl/exclude/DetectionExcludesConfigurable.java @@ -79,7 +79,7 @@ public class DetectionExcludesConfigurable implements Configurable { } @Override - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { setIconTextGap(4); if (value instanceof ExcludeListItem) { ((ExcludeListItem)value).renderItem(this); diff --git a/platform/lang-impl/src/com/intellij/ide/commander/ColoredCommanderRenderer.java b/platform/lang-impl/src/com/intellij/ide/commander/ColoredCommanderRenderer.java index 313fc5bade8e..0cc95f431d03 100644 --- a/platform/lang-impl/src/com/intellij/ide/commander/ColoredCommanderRenderer.java +++ b/platform/lang-impl/src/com/intellij/ide/commander/ColoredCommanderRenderer.java @@ -51,7 +51,7 @@ final class ColoredCommanderRenderer extends ColoredListCellRenderer { } @Override - protected void customizeCellRenderer(final JList list, final Object value, final int index, final boolean selected, final boolean hasFocus) { + protected void customizeCellRenderer(@NotNull final JList list, final Object value, final int index, final boolean selected, final boolean hasFocus) { // Fix GTK background if (UIUtil.isUnderGTKLookAndFeel()){ final Color background = selected ? UIUtil.getTreeSelectionBackground() : UIUtil.getTreeTextBackground(); diff --git a/platform/lang-impl/src/com/intellij/ide/util/NavigationItemListCellRenderer.java b/platform/lang-impl/src/com/intellij/ide/util/NavigationItemListCellRenderer.java index 617f4c18688c..15977b5e5810 100644 --- a/platform/lang-impl/src/com/intellij/ide/util/NavigationItemListCellRenderer.java +++ b/platform/lang-impl/src/com/intellij/ide/util/NavigationItemListCellRenderer.java @@ -41,6 +41,7 @@ import com.intellij.util.IconUtil; import com.intellij.util.text.Matcher; import com.intellij.util.text.MatcherHolder; import com.intellij.util.ui.UIUtil; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import javax.swing.*; @@ -124,7 +125,7 @@ public class NavigationItemListCellRenderer extends OpaquePanel implements ListC @Override protected void customizeCellRenderer( - JList list, + @NotNull JList list, Object value, int index, boolean selected, diff --git a/platform/lang-impl/src/com/intellij/ide/util/PsiElementListCellRenderer.java b/platform/lang-impl/src/com/intellij/ide/util/PsiElementListCellRenderer.java index b0da58a68f62..8128542ba001 100644 --- a/platform/lang-impl/src/com/intellij/ide/util/PsiElementListCellRenderer.java +++ b/platform/lang-impl/src/com/intellij/ide/util/PsiElementListCellRenderer.java @@ -121,7 +121,7 @@ public abstract class PsiElementListCellRenderer extends J } @Override - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { Color bgColor = UIUtil.getListBackground(); Color color = list.getForeground(); setPaintFocusBorder(hasFocus && UIUtil.isToUseDottedCellBorder() && myFocusBorderEnabled); diff --git a/platform/lang-impl/src/com/intellij/openapi/fileEditor/impl/http/JumpFromRemoteFileToLocalAction.java b/platform/lang-impl/src/com/intellij/openapi/fileEditor/impl/http/JumpFromRemoteFileToLocalAction.java index 242698032a77..8deb3028d709 100644 --- a/platform/lang-impl/src/com/intellij/openapi/fileEditor/impl/http/JumpFromRemoteFileToLocalAction.java +++ b/platform/lang-impl/src/com/intellij/openapi/fileEditor/impl/http/JumpFromRemoteFileToLocalAction.java @@ -72,7 +72,7 @@ class JumpFromRemoteFileToLocalAction extends AnAction { //noinspection unchecked list.setCellRenderer(new ColoredListCellRenderer() { @Override - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { FileAppearanceService.getInstance().forVirtualFile((VirtualFile)value).customize(this); } }); diff --git a/platform/lang-impl/src/com/intellij/tools/OutputFiltersDialog.java b/platform/lang-impl/src/com/intellij/tools/OutputFiltersDialog.java index 3233028ed214..f10582508a57 100644 --- a/platform/lang-impl/src/com/intellij/tools/OutputFiltersDialog.java +++ b/platform/lang-impl/src/com/intellij/tools/OutputFiltersDialog.java @@ -55,7 +55,7 @@ public class OutputFiltersDialog extends DialogWrapper { myFiltersList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); myFiltersList.setCellRenderer(new ColoredListCellRenderer() { @Override - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { FilterInfo info = (FilterInfo)value; append(info.getName(), SimpleTextAttributes.REGULAR_ATTRIBUTES); } diff --git a/platform/lang-impl/src/com/intellij/ui/debugger/extensions/FocusDebugger.java b/platform/lang-impl/src/com/intellij/ui/debugger/extensions/FocusDebugger.java index 7454cfab8890..6fc650fa35e1 100644 --- a/platform/lang-impl/src/com/intellij/ui/debugger/extensions/FocusDebugger.java +++ b/platform/lang-impl/src/com/intellij/ui/debugger/extensions/FocusDebugger.java @@ -26,6 +26,7 @@ import com.intellij.ui.SimpleColoredText; import com.intellij.ui.SimpleTextAttributes; import com.intellij.ui.components.JBList; import com.intellij.ui.debugger.UiDebuggerExtension; +import org.jetbrains.annotations.NotNull; import javax.swing.*; import javax.swing.event.ListSelectionEvent; @@ -167,7 +168,7 @@ public class FocusDebugger implements UiDebuggerExtension, PropertyChangeListene static class FocusElementRenderer extends ColoredListCellRenderer { @Override - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { clear(); final FocusElement element = (FocusElement)value; final SimpleColoredText text = element.getText(); diff --git a/platform/lang-impl/src/com/intellij/ui/popup/util/ItemWrapperListRenderer.java b/platform/lang-impl/src/com/intellij/ui/popup/util/ItemWrapperListRenderer.java index 78e6f1f0f7d0..6af25afafd44 100644 --- a/platform/lang-impl/src/com/intellij/ui/popup/util/ItemWrapperListRenderer.java +++ b/platform/lang-impl/src/com/intellij/ui/popup/util/ItemWrapperListRenderer.java @@ -17,6 +17,7 @@ package com.intellij.ui.popup.util; import com.intellij.openapi.project.Project; import com.intellij.ui.ColoredListCellRenderer; +import org.jetbrains.annotations.NotNull; import javax.swing.*; @@ -30,7 +31,7 @@ public class ItemWrapperListRenderer extends ColoredListCellRenderer { } @Override - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { if (value instanceof ItemWrapper) { final ItemWrapper wrapper = (ItemWrapper)value; wrapper.setupRenderer(this, myProject, selected); diff --git a/platform/platform-api/src/com/intellij/openapi/ui/SelectFromListDialog.java b/platform/platform-api/src/com/intellij/openapi/ui/SelectFromListDialog.java index 85ec4f269086..adf40e277d4c 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/SelectFromListDialog.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/SelectFromListDialog.java @@ -61,7 +61,7 @@ public class SelectFromListDialog extends DialogWrapper { myList.setSelectedIndex(0); myList.setCellRenderer(new ColoredListCellRenderer(){ - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { append(myToStringAspect.getToStirng(value), new SimpleTextAttributes(SimpleTextAttributes.STYLE_PLAIN, list.getForeground())); } diff --git a/platform/platform-api/src/com/intellij/ui/ColoredListCellRendererWrapper.java b/platform/platform-api/src/com/intellij/ui/ColoredListCellRendererWrapper.java index fb14f59e33a3..de99727f3f18 100644 --- a/platform/platform-api/src/com/intellij/ui/ColoredListCellRendererWrapper.java +++ b/platform/platform-api/src/com/intellij/ui/ColoredListCellRendererWrapper.java @@ -26,7 +26,7 @@ import javax.swing.*; */ public abstract class ColoredListCellRendererWrapper extends ColoredListCellRenderer { @Override - protected final void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected final void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { @SuppressWarnings("unchecked") final T t = (T)value; doCustomize(list, t, index, selected, hasFocus); } diff --git a/platform/platform-impl/src/com/intellij/ide/actions/Switcher.java b/platform/platform-impl/src/com/intellij/ide/actions/Switcher.java index bac50a141a4d..f08eb8d0983c 100644 --- a/platform/platform-impl/src/com/intellij/ide/actions/Switcher.java +++ b/platform/platform-impl/src/com/intellij/ide/actions/Switcher.java @@ -505,7 +505,7 @@ public class Switcher extends AnAction implements DumbAware { } @Override - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { setPaintFocusBorder(false); super.customizeCellRenderer(list, value, index, selected, hasFocus); } @@ -1205,7 +1205,7 @@ public class Switcher extends AnAction implements DumbAware { mySwitcherPanel = switcherPanel; } - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { if (value instanceof FileInfo) { Project project = mySwitcherPanel.project; VirtualFile virtualFile = ((FileInfo)value).getFirst(); diff --git a/platform/platform-impl/src/com/intellij/ide/actions/SwitcherToolWindowsListRenderer.java b/platform/platform-impl/src/com/intellij/ide/actions/SwitcherToolWindowsListRenderer.java index 7aed887c254b..228e87022eaa 100644 --- a/platform/platform-impl/src/com/intellij/ide/actions/SwitcherToolWindowsListRenderer.java +++ b/platform/platform-impl/src/com/intellij/ide/actions/SwitcherToolWindowsListRenderer.java @@ -23,6 +23,7 @@ import com.intellij.ui.SimpleTextAttributes; import com.intellij.ui.SpeedSearchBase; import com.intellij.util.IconUtil; import com.intellij.util.PlatformIcons; +import org.jetbrains.annotations.NotNull; import javax.swing.*; import java.awt.*; @@ -44,7 +45,7 @@ class SwitcherToolWindowsListRenderer extends ColoredListCellRenderer { myPinned = pinned; } - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { hide = false; setPaintFocusBorder(false); if (value instanceof ToolWindow) { diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/actions/ContentChooser.java b/platform/platform-impl/src/com/intellij/openapi/editor/actions/ContentChooser.java index fac506846fea..d671a791db7e 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/actions/ContentChooser.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/actions/ContentChooser.java @@ -343,7 +343,7 @@ public abstract class ContentChooser extends DialogWrapper { private class MyListCellRenderer extends ColoredListCellRenderer { @Override - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { setIcon(myListEntryIcon); if (myUseIdeaEditor) { int max = list.getModel().getSize(); diff --git a/platform/platform-impl/src/com/intellij/openapi/fileChooser/ex/FileChooserDialogImpl.java b/platform/platform-impl/src/com/intellij/openapi/fileChooser/ex/FileChooserDialogImpl.java index 862e13655e6a..a2b6dba33a61 100644 --- a/platform/platform-impl/src/com/intellij/openapi/fileChooser/ex/FileChooserDialogImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/fileChooser/ex/FileChooserDialogImpl.java @@ -254,7 +254,7 @@ public class FileChooserDialogImpl extends DialogWrapper implements FileChooserD }; files.setCellRenderer(new ColoredListCellRenderer() { @Override - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { final String path = value.toString(); append(path); final VirtualFile file = LocalFileSystem.getInstance().findFileByIoFile(new File(path)); diff --git a/platform/platform-impl/src/com/intellij/openapi/vcs/readOnlyHandler/FileListRenderer.java b/platform/platform-impl/src/com/intellij/openapi/vcs/readOnlyHandler/FileListRenderer.java index e2777ac5454e..52520da6b076 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vcs/readOnlyHandler/FileListRenderer.java +++ b/platform/platform-impl/src/com/intellij/openapi/vcs/readOnlyHandler/FileListRenderer.java @@ -20,11 +20,12 @@ import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.ui.ColoredListCellRenderer; import com.intellij.ui.SimpleTextAttributes; +import org.jetbrains.annotations.NotNull; import javax.swing.*; public class FileListRenderer extends ColoredListCellRenderer { - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { // paint selection only as a focus rectangle mySelected = false; setBackground(null); diff --git a/platform/platform-impl/src/com/intellij/ui/FinderRecursivePanel.java b/platform/platform-impl/src/com/intellij/ui/FinderRecursivePanel.java index f1581b5dcde1..d2bed47b7693 100644 --- a/platform/platform-impl/src/com/intellij/ui/FinderRecursivePanel.java +++ b/platform/platform-impl/src/com/intellij/ui/FinderRecursivePanel.java @@ -395,7 +395,7 @@ public abstract class FinderRecursivePanel extends JBSplitter implements Data } @Override - protected final void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected final void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { } }; } diff --git a/platform/platform-impl/src/com/intellij/util/ui/ListModelEditor.java b/platform/platform-impl/src/com/intellij/util/ui/ListModelEditor.java index 67005649dcb7..e90d938b6323 100644 --- a/platform/platform-impl/src/com/intellij/util/ui/ListModelEditor.java +++ b/platform/platform-impl/src/com/intellij/util/ui/ListModelEditor.java @@ -100,7 +100,7 @@ public class ListModelEditor extends ListModelEditorBase { private class MyListCellRenderer extends ColoredListCellRenderer { @Override - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { setBackground(UIUtil.getListBackground(selected)); if (value != null) { //noinspection unchecked diff --git a/platform/structuralsearch/source/com/intellij/structuralsearch/plugin/ui/ExistingTemplatesComponent.java b/platform/structuralsearch/source/com/intellij/structuralsearch/plugin/ui/ExistingTemplatesComponent.java index 22d342457c3e..6f32cecc9c13 100644 --- a/platform/structuralsearch/source/com/intellij/structuralsearch/plugin/ui/ExistingTemplatesComponent.java +++ b/platform/structuralsearch/source/com/intellij/structuralsearch/plugin/ui/ExistingTemplatesComponent.java @@ -242,7 +242,7 @@ public class ExistingTemplatesComponent { } @Override - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean focus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean focus) { if (!(value instanceof Configuration)) { return; } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/committed/ColumnFilteringStrategy.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/committed/ColumnFilteringStrategy.java index cd4dbfc03b61..3f36de925da9 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/committed/ColumnFilteringStrategy.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/committed/ColumnFilteringStrategy.java @@ -64,7 +64,7 @@ public class ColumnFilteringStrategy implements ChangeListFilteringStrategy { } }); myValueList.setCellRenderer(new ColoredListCellRenderer() { - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { if (index == 0) { append(value.toString(), SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES); } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/IgnoredSettingsPanel.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/IgnoredSettingsPanel.java index 7c467ed558b3..a9c9b575c827 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/IgnoredSettingsPanel.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/IgnoredSettingsPanel.java @@ -174,7 +174,7 @@ public class IgnoredSettingsPanel implements SearchableConfigurable, Configurabl } private static class MyCellRenderer extends ColoredListCellRenderer { - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { if (UIUtil.isUnderGTKLookAndFeel()) { final Color background = selected ? UIUtil.getTreeSelectionBackground() : UIUtil.getTreeTextBackground(); UIUtil.changeBackGround(this, background); diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/VirtualFileListCellRenderer.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/VirtualFileListCellRenderer.java index 568ae4c281eb..a16b8693f5fc 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/VirtualFileListCellRenderer.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/VirtualFileListCellRenderer.java @@ -25,6 +25,7 @@ import com.intellij.ui.ColoredListCellRenderer; import com.intellij.ui.SimpleTextAttributes; import com.intellij.util.PlatformIcons; import com.intellij.util.ui.UIUtil; +import org.jetbrains.annotations.NotNull; import javax.swing.*; import java.io.File; @@ -48,7 +49,7 @@ public class VirtualFileListCellRenderer extends ColoredListCellRenderer { } @Override - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { final FilePath path = TreeModelBuilder.getPathForObject(value); renderIcon(path); final FileStatus fileStatus = myIgnoreFileStatus ? FileStatus.NOT_CHANGED : getStatus(value, path); diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/configurable/VcsConfigurationsDialog.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/configurable/VcsConfigurationsDialog.java index 059b7b892eab..b3dcc481c180 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/configurable/VcsConfigurationsDialog.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/configurable/VcsConfigurationsDialog.java @@ -28,6 +28,7 @@ import com.intellij.openapi.vcs.impl.VcsDescriptor; import com.intellij.openapi.vcs.impl.projectlevelman.AllVcses; import com.intellij.ui.ColoredListCellRenderer; import com.intellij.ui.SimpleTextAttributes; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import javax.swing.*; @@ -46,7 +47,7 @@ public class VcsConfigurationsDialog extends DialogWrapper{ private final Map myVcsNameToConfigurableMap = new HashMap(); private static final ColoredListCellRenderer VCS_LIST_RENDERER = new ColoredListCellRenderer() { - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { String name = value == null ? NONE : ((VcsDescriptor) value).getDisplayName(); append(name, new SimpleTextAttributes(SimpleTextAttributes.STYLE_PLAIN, list.getForeground())); } diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/BreakpointChooser.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/BreakpointChooser.java index 7854321bb6ee..fb5b3ea842c6 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/BreakpointChooser.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/BreakpointChooser.java @@ -121,7 +121,7 @@ public class BreakpointChooser { }); myComboBox.setRenderer(new ItemWrapperListRenderer(project, null) { @Override - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { super.customizeCellRenderer(list, value, index, selected, hasFocus); if (selected) { if (hackedSelection.get() != value) { diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/ExpressionInputComponent.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/ExpressionInputComponent.java index b3802ad1c587..1e4b9e7a937c 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/ExpressionInputComponent.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/ExpressionInputComponent.java @@ -110,7 +110,7 @@ public class ExpressionInputComponent extends EvaluationInputComponent { protected ListCellRenderer getListElementRenderer() { return new ColoredListCellRenderer() { @Override - protected void customizeCellRenderer(JList list, XExpression value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, XExpression value, int index, boolean selected, boolean hasFocus) { append(value.getExpression()); } }; diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/frame/XDebuggerFramesList.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/frame/XDebuggerFramesList.java index 44c6537a0591..557a67451408 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/frame/XDebuggerFramesList.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/frame/XDebuggerFramesList.java @@ -152,7 +152,7 @@ public class XDebuggerFramesList extends DebuggerFramesList { } @Override - protected void customizeCellRenderer(final JList list, + protected void customizeCellRenderer(@NotNull final JList list, final Object value, final int index, final boolean selected, diff --git a/plugins/ant/src/com/intellij/lang/ant/config/impl/configuration/AntUIUtil.java b/plugins/ant/src/com/intellij/lang/ant/config/impl/configuration/AntUIUtil.java index accb63bb52d9..913ccc744d59 100644 --- a/plugins/ant/src/com/intellij/lang/ant/config/impl/configuration/AntUIUtil.java +++ b/plugins/ant/src/com/intellij/lang/ant/config/impl/configuration/AntUIUtil.java @@ -37,6 +37,7 @@ import com.intellij.util.config.AbstractProperty; import com.intellij.util.ui.AbstractTableCellEditor; import com.intellij.util.ui.CellEditorComponentWithBrowseButton; import icons.AntIcons; +import org.jetbrains.annotations.NotNull; import javax.swing.*; import javax.swing.text.BadLocationException; @@ -66,7 +67,7 @@ public class AntUIUtil { }; } - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { AntInstallation ant = (AntInstallation)value; if (ant == null) return; AbstractProperty.AbstractPropertyContainer container = myEditor.getProperties(ant); @@ -81,7 +82,7 @@ public class AntUIUtil { myConfiguration = configuration; } - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { if (value == null) return; customizeReference((AntReference)value, this, myConfiguration); } @@ -107,7 +108,7 @@ public class AntUIUtil { public static class ClasspathRenderer extends ColoredListCellRenderer { - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { AntClasspathEntry entry = (AntClasspathEntry)value; entry.getAppearance().customize(this); } @@ -171,7 +172,7 @@ public class AntUIUtil { myProjectJdkName = projectJdkName != null ? projectJdkName : ""; } - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { String jdkName = (String)value; if (jdkName == null || jdkName.length() == 0) jdkName = ""; Sdk jdk = GlobalAntConfiguration.findJdk(jdkName); diff --git a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/ui/experts/checkout/ChooseCheckoutMode.java b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/ui/experts/checkout/ChooseCheckoutMode.java index fbe04c31d9df..77d745325707 100644 --- a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/ui/experts/checkout/ChooseCheckoutMode.java +++ b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/ui/experts/checkout/ChooseCheckoutMode.java @@ -76,7 +76,7 @@ public class ChooseCheckoutMode extends WizardStep { super("###", wizard); myCheckoutModeList.setCellRenderer(new ColoredListCellRenderer() { @Override - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { final CheckoutStrategy checkoutStrategy = (CheckoutStrategy)value; append(checkoutStrategy.getResult().getAbsolutePath(), new SimpleTextAttributes(SimpleTextAttributes.STYLE_PLAIN, list.getForeground())); setIcon(PlatformIcons.DIRECTORY_CLOSED_ICON); diff --git a/plugins/devkit/src/actions/NewActionDialog.java b/plugins/devkit/src/actions/NewActionDialog.java index d3a155f7dbdd..6137353130da 100644 --- a/plugins/devkit/src/actions/NewActionDialog.java +++ b/plugins/devkit/src/actions/NewActionDialog.java @@ -262,7 +262,7 @@ public class NewActionDialog extends DialogWrapper implements ActionData { } private static class MyActionRenderer extends ColoredListCellRenderer { - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { AnAction group = (AnAction) value; append(ActionManager.getInstance().getId(group), SimpleTextAttributes.REGULAR_ATTRIBUTES); String text = group.getTemplatePresentation().getText(); diff --git a/plugins/devkit/src/testAssistant/TestDataNavigationHandler.java b/plugins/devkit/src/testAssistant/TestDataNavigationHandler.java index a4f969cdea46..63f2ae20e208 100644 --- a/plugins/devkit/src/testAssistant/TestDataNavigationHandler.java +++ b/plugins/devkit/src/testAssistant/TestDataNavigationHandler.java @@ -121,7 +121,7 @@ public class TestDataNavigationHandler implements GutterIconNavigationHandler getLocaleRenderer() { return new ColoredListCellRenderer() { @Override - protected void customizeCellRenderer(JList list, Locale locale, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Locale locale, int index, boolean selected, boolean hasFocus) { if (PropertiesUtil.DEFAULT_LOCALE == locale) { append("Default locale"); } else { diff --git a/plugins/properties/src/com/intellij/lang/properties/editor/inspections/incomplete/IncompletePropertyInspectionOptionsPanel.java b/plugins/properties/src/com/intellij/lang/properties/editor/inspections/incomplete/IncompletePropertyInspectionOptionsPanel.java index 91aedacd5a12..7c6cd9c41eb4 100644 --- a/plugins/properties/src/com/intellij/lang/properties/editor/inspections/incomplete/IncompletePropertyInspectionOptionsPanel.java +++ b/plugins/properties/src/com/intellij/lang/properties/editor/inspections/incomplete/IncompletePropertyInspectionOptionsPanel.java @@ -23,6 +23,7 @@ import com.intellij.openapi.ui.Messages; import com.intellij.openapi.util.text.StringUtil; import com.intellij.ui.*; import com.intellij.ui.components.JBList; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import javax.swing.*; @@ -69,7 +70,7 @@ public class IncompletePropertyInspectionOptionsPanel { }).createPanel(); myList.setCellRenderer(new ColoredListCellRenderer() { @Override - protected void customizeCellRenderer(JList list, String suffix, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, String suffix, int index, boolean selected, boolean hasFocus) { append(suffix); final Locale locale = PropertiesUtil.getLocale("_" + suffix + ".properties"); if (locale != PropertiesUtil.DEFAULT_LOCALE) { diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/update/MultipleRootEditorWithSplitter.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/update/MultipleRootEditorWithSplitter.java index 83beea8b4614..f68c527b2e3a 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/update/MultipleRootEditorWithSplitter.java +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/update/MultipleRootEditorWithSplitter.java @@ -26,6 +26,7 @@ import com.intellij.ui.components.JBList; import com.intellij.util.ui.AdjustComponentWhenShown; import com.intellij.util.ui.UIUtil; import org.jetbrains.annotations.NonNls; +import org.jetbrains.annotations.NotNull; import javax.swing.*; import javax.swing.event.ListSelectionEvent; @@ -82,7 +83,7 @@ public class MultipleRootEditorWithSplitter extends JPanel { myList.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION); myList.setCellRenderer(new ColoredListCellRenderer(){ - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { if (value instanceof FilePath) { final FilePath path = ((FilePath)value); if (path.getVirtualFile() != null) { diff --git a/plugins/tasks/tasks-core/src/com/intellij/tasks/actions/ChooseStacktraceDialog.java b/plugins/tasks/tasks-core/src/com/intellij/tasks/actions/ChooseStacktraceDialog.java index 1eeee125ada4..584a3f1cfb3d 100644 --- a/plugins/tasks/tasks-core/src/com/intellij/tasks/actions/ChooseStacktraceDialog.java +++ b/plugins/tasks/tasks-core/src/com/intellij/tasks/actions/ChooseStacktraceDialog.java @@ -25,6 +25,7 @@ import com.intellij.ui.ColoredListCellRenderer; import com.intellij.unscramble.AnalyzeStacktraceUtil; import com.intellij.util.ArrayUtil; import com.intellij.util.containers.ContainerUtil; +import org.jetbrains.annotations.NotNull; import javax.swing.*; import javax.swing.event.ListSelectionEvent; @@ -58,7 +59,7 @@ public class ChooseStacktraceDialog extends DialogWrapper { myList.setModel(new CollectionListModel(list)); myList.setCellRenderer(new ColoredListCellRenderer() { @Override - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { if (value instanceof Description) { append("Description"); } diff --git a/plugins/tasks/tasks-core/src/com/intellij/tasks/config/TaskRepositoriesConfigurable.java b/plugins/tasks/tasks-core/src/com/intellij/tasks/config/TaskRepositoriesConfigurable.java index 02b599ed1340..54978e3ba32a 100644 --- a/plugins/tasks/tasks-core/src/com/intellij/tasks/config/TaskRepositoriesConfigurable.java +++ b/plugins/tasks/tasks-core/src/com/intellij/tasks/config/TaskRepositoriesConfigurable.java @@ -165,7 +165,7 @@ public class TaskRepositoriesConfigurable extends BaseConfigurable implements Co myRepositoriesList.setCellRenderer(new ColoredListCellRenderer() { @Override - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { TaskRepository repository = (TaskRepository)value; setIcon(repository.getIcon()); append(repository.getPresentableName(), SimpleTextAttributes.REGULAR_ATTRIBUTES); diff --git a/plugins/ui-designer-core/src/com/intellij/designer/palette/PaletteItemsComponent.java b/plugins/ui-designer-core/src/com/intellij/designer/palette/PaletteItemsComponent.java index cecf8126b114..19b2d4bac018 100644 --- a/plugins/ui-designer-core/src/com/intellij/designer/palette/PaletteItemsComponent.java +++ b/plugins/ui-designer-core/src/com/intellij/designer/palette/PaletteItemsComponent.java @@ -28,6 +28,7 @@ import com.intellij.ui.ColoredListCellRenderer; import com.intellij.ui.SimpleTextAttributes; import com.intellij.ui.components.JBList; import com.intellij.util.ui.UIUtil; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import javax.swing.*; @@ -68,7 +69,7 @@ public class PaletteItemsComponent extends JBList { ColoredListCellRenderer renderer = new ColoredListCellRenderer() { @Override - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { clear(); PaletteItem item = (PaletteItem)value; diff --git a/plugins/ui-designer/src/com/intellij/ide/palette/impl/PaletteComponentList.java b/plugins/ui-designer/src/com/intellij/ide/palette/impl/PaletteComponentList.java index 77b58a922a87..92f24e11330e 100644 --- a/plugins/ui-designer/src/com/intellij/ide/palette/impl/PaletteComponentList.java +++ b/plugins/ui-designer/src/com/intellij/ide/palette/impl/PaletteComponentList.java @@ -30,6 +30,7 @@ import com.intellij.ui.components.JBList; import com.intellij.util.ui.PlatformColors; import com.intellij.util.ui.UIUtil; import org.jetbrains.annotations.NonNls; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import javax.swing.*; @@ -264,7 +265,7 @@ public class PaletteComponentList extends JBList { } private static class ComponentCellRenderer extends ColoredListCellRenderer { - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { PaletteItem paletteItem = (PaletteItem) value; clear(); paletteItem.customizeCellRenderer(this, selected, hasFocus); diff --git a/plugins/ui-designer/src/com/intellij/uiDesigner/propertyInspector/editors/FontEditorDialog.java b/plugins/ui-designer/src/com/intellij/uiDesigner/propertyInspector/editors/FontEditorDialog.java index 12e923d63d39..139d801810cc 100644 --- a/plugins/ui-designer/src/com/intellij/uiDesigner/propertyInspector/editors/FontEditorDialog.java +++ b/plugins/ui-designer/src/com/intellij/uiDesigner/propertyInspector/editors/FontEditorDialog.java @@ -92,7 +92,7 @@ public class FontEditorDialog extends DialogWrapper { }); mySwingFontList.setListData(collectSwingFontDescriptors()); mySwingFontList.setCellRenderer(new ColoredListCellRenderer() { - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { FontDescriptor descriptor = (FontDescriptor) value; clear(); append(descriptor.getSwingFont(), diff --git a/plugins/ui-designer/src/com/intellij/uiDesigner/propertyInspector/renderers/ColorRenderer.java b/plugins/ui-designer/src/com/intellij/uiDesigner/propertyInspector/renderers/ColorRenderer.java index bb414248f8e9..ee69a492122f 100644 --- a/plugins/ui-designer/src/com/intellij/uiDesigner/propertyInspector/renderers/ColorRenderer.java +++ b/plugins/ui-designer/src/com/intellij/uiDesigner/propertyInspector/renderers/ColorRenderer.java @@ -22,6 +22,7 @@ import com.intellij.uiDesigner.propertyInspector.PropertyRenderer; import com.intellij.uiDesigner.radComponents.RadRootContainer; import com.intellij.util.ui.UIUtil; import icons.UIDesignerIcons; +import org.jetbrains.annotations.NotNull; import javax.swing.*; import java.awt.*; @@ -66,7 +67,7 @@ public class ColorRenderer extends ColoredListCellRenderer implements PropertyRe } } - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { prepareComponent((ColorDescriptor) value, selected); } } diff --git a/plugins/ui-designer/src/com/intellij/uiDesigner/propertyInspector/renderers/ComponentRenderer.java b/plugins/ui-designer/src/com/intellij/uiDesigner/propertyInspector/renderers/ComponentRenderer.java index ec834d1d811b..590e02e3f47a 100644 --- a/plugins/ui-designer/src/com/intellij/uiDesigner/propertyInspector/renderers/ComponentRenderer.java +++ b/plugins/ui-designer/src/com/intellij/uiDesigner/propertyInspector/renderers/ComponentRenderer.java @@ -24,6 +24,7 @@ import com.intellij.uiDesigner.UIDesignerBundle; import com.intellij.uiDesigner.componentTree.ComponentTree; import com.intellij.uiDesigner.propertyInspector.PropertyRenderer; import com.intellij.util.ui.UIUtil; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import javax.swing.*; @@ -75,7 +76,7 @@ public class ComponentRenderer extends ColoredListCellRenderer implements Proper } } - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { renderComponent((RadComponent) value, false); } } diff --git a/plugins/ui-designer/src/com/intellij/uiDesigner/wizard/BeanPropertyListCellRenderer.java b/plugins/ui-designer/src/com/intellij/uiDesigner/wizard/BeanPropertyListCellRenderer.java index 2ba8a741aaec..96ee228d45f1 100644 --- a/plugins/ui-designer/src/com/intellij/uiDesigner/wizard/BeanPropertyListCellRenderer.java +++ b/plugins/ui-designer/src/com/intellij/uiDesigner/wizard/BeanPropertyListCellRenderer.java @@ -18,6 +18,7 @@ package com.intellij.uiDesigner.wizard; import com.intellij.ui.ColoredListCellRenderer; import com.intellij.ui.SimpleTextAttributes; import com.intellij.uiDesigner.UIDesignerBundle; +import org.jetbrains.annotations.NotNull; import javax.swing.*; @@ -35,7 +36,7 @@ final class BeanPropertyListCellRenderer extends ColoredListCellRenderer{ } protected void customizeCellRenderer( - final JList list, + @NotNull final JList list, final Object value, final int index, final boolean selected, diff --git a/xml/impl/src/com/intellij/codeInsight/daemon/impl/analysis/XmlNSRenderer.java b/xml/impl/src/com/intellij/codeInsight/daemon/impl/analysis/XmlNSRenderer.java index 895a7a9ff8f4..ec6890e9d435 100644 --- a/xml/impl/src/com/intellij/codeInsight/daemon/impl/analysis/XmlNSRenderer.java +++ b/xml/impl/src/com/intellij/codeInsight/daemon/impl/analysis/XmlNSRenderer.java @@ -20,6 +20,7 @@ import com.intellij.openapi.editor.colors.EditorColorsManager; import com.intellij.openapi.editor.colors.EditorColorsScheme; import com.intellij.ui.ColoredListCellRenderer; import com.intellij.ui.SimpleTextAttributes; +import org.jetbrains.annotations.NotNull; import javax.swing.*; import java.awt.*; @@ -37,7 +38,7 @@ public class XmlNSRenderer extends ColoredListCellRenderer { } @Override - protected void customizeCellRenderer(final JList list, + protected void customizeCellRenderer(@NotNull final JList list, final Object value, final int index, final boolean selected, diff --git a/xml/impl/src/com/intellij/ide/browsers/actions/BaseOpenInBrowserAction.java b/xml/impl/src/com/intellij/ide/browsers/actions/BaseOpenInBrowserAction.java index fef95a602470..f8c59ecbc587 100644 --- a/xml/impl/src/com/intellij/ide/browsers/actions/BaseOpenInBrowserAction.java +++ b/xml/impl/src/com/intellij/ide/browsers/actions/BaseOpenInBrowserAction.java @@ -197,7 +197,7 @@ public abstract class BaseOpenInBrowserAction extends DumbAwareAction { final JBList list = new JBList(urls); list.setCellRenderer(new ColoredListCellRenderer() { @Override - protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) { + protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { // todo icons looks good, but is it really suitable for all URLs providers? setIcon(AllIcons.Nodes.Servlet); append(((Url)value).toDecodedForm());