From 4d668ffa2854427aa155ffd7380d400a6c7223ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Thu, 13 Jun 2019 18:18:20 +0200 Subject: [PATCH] [platform-api] fix deprecation problems GitOrigin-RevId: 45b825e0330d0d2d49de86a6250da10265d71abf --- .../execution/filters/BrowserHyperlinkInfo.java | 7 +++++-- .../src/com/intellij/ide/GeneralSettings.java | 6 ++++++ .../src/com/intellij/ide/SelectInManager.java | 4 ++-- .../intellij/ide/actions/ActionsCollector.java | 3 +++ .../ide/passwordSafe/PasswordStorage.java | 3 +++ .../ide/util/treeView/AbstractTreeBuilder.java | 7 +++---- .../intellij/ide/util/treeView/TreeState.java | 4 ++-- .../com/intellij/ide/wizard/AbstractWizard.java | 3 +++ .../openapi/actionSystem/ActionGroupUtil.java | 6 ++++-- .../openapi/actionSystem/DataConstants.java | 2 +- .../openapi/actionSystem/PlatformDataKeys.java | 3 +++ .../openapi/actionSystem/ex/ActionUtil.java | 4 +++- .../openapi/diff/ActionButtonPresentation.java | 1 + .../openapi/options/ConfigurableGroup.java | 4 +++- .../intellij/openapi/ui/ComponentValidator.java | 4 +++- .../com/intellij/openapi/ui/DialogWrapper.java | 15 ++++++++++++--- .../openapi/ui/popup/JBPopupFactory.java | 6 ++++++ .../com/intellij/openapi/wm/StatusBarWidget.java | 6 ++++++ .../intellij/openapi/wm/ToolWindowManager.java | 10 +++++----- .../src/com/intellij/ui/CheckboxTreeBase.java | 9 ++++----- .../src/com/intellij/ui/IdeBorderFactory.java | 11 ++++------- .../com/intellij/ui/RawCommandLineEditor.java | 7 +++++-- .../com/intellij/ui/RowEditableTableModel.java | 8 ++++---- .../src/com/intellij/ui/SearchTextField.java | 11 +++++++++++ .../intellij/ui/components/JBSlidingPanel.java | 16 ++++++++++++++-- .../components/fields/ExtendableTextField.java | 2 +- .../src/com/intellij/ui/table/TableView.java | 5 ++--- .../src/com/intellij/ui/tabs/TabsListener.java | 8 ++++---- .../intellij/ui/tabs/newImpl/JBEditorTabs.java | 2 +- .../ui/tabs/newImpl/JBEditorTabsPainter.java | 1 + .../src/com/intellij/ui/treeStructure/Tree.java | 3 +++ .../filtered/FilteringTreeBuilder.java | 3 +++ .../com/intellij/util/net/HttpConfigurable.java | 10 +++++++++- .../com/intellij/util/ui/AsyncProcessIcon.java | 3 +++ .../src/com/intellij/util/ui/Tree.java | 5 ++--- .../src/com/intellij/util/ui/tree/TreeUtil.java | 3 +-- 36 files changed, 146 insertions(+), 59 deletions(-) diff --git a/platform/platform-api/src/com/intellij/execution/filters/BrowserHyperlinkInfo.java b/platform/platform-api/src/com/intellij/execution/filters/BrowserHyperlinkInfo.java index c3bd368a7f94..4e17c1df1c35 100644 --- a/platform/platform-api/src/com/intellij/execution/filters/BrowserHyperlinkInfo.java +++ b/platform/platform-api/src/com/intellij/execution/filters/BrowserHyperlinkInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 JetBrains s.r.o. + * Copyright 2000-2019 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ import com.intellij.ide.BrowserUtil; import com.intellij.openapi.project.Project; /** - * Consider to use OpenUrlHyperlinkInfo. + * Consider to use {@link com.intellij.ide.browsers.OpenUrlHyperlinkInfo}. */ public class BrowserHyperlinkInfo implements HyperlinkInfo { private final String myUrl; @@ -33,6 +33,9 @@ public class BrowserHyperlinkInfo implements HyperlinkInfo { BrowserUtil.browse(myUrl); } + /** + * @deprecated use {@link BrowserUtil#browse(String)} + */ @Deprecated public static void openUrl(String url) { BrowserUtil.browse(url); diff --git a/platform/platform-api/src/com/intellij/ide/GeneralSettings.java b/platform/platform-api/src/com/intellij/ide/GeneralSettings.java index f18555bc3663..a6347e23c85d 100644 --- a/platform/platform-api/src/com/intellij/ide/GeneralSettings.java +++ b/platform/platform-api/src/com/intellij/ide/GeneralSettings.java @@ -215,12 +215,18 @@ public final class GeneralSettings implements PersistentStateComponent> consumer) { diff --git a/platform/platform-api/src/com/intellij/ide/wizard/AbstractWizard.java b/platform/platform-api/src/com/intellij/ide/wizard/AbstractWizard.java index 093875ff61fe..591847cecb91 100644 --- a/platform/platform-api/src/com/intellij/ide/wizard/AbstractWizard.java +++ b/platform/platform-api/src/com/intellij/ide/wizard/AbstractWizard.java @@ -538,6 +538,9 @@ public abstract class AbstractWizard extends DialogWrapper { return myCancelButton; } + /** + * @deprecated unused + */ @Deprecated protected JButton getFinishButton() { return new JButton(); diff --git a/platform/platform-api/src/com/intellij/openapi/actionSystem/ActionGroupUtil.java b/platform/platform-api/src/com/intellij/openapi/actionSystem/ActionGroupUtil.java index 706bc8576898..0d155a0dc2d7 100644 --- a/platform/platform-api/src/com/intellij/openapi/actionSystem/ActionGroupUtil.java +++ b/platform/platform-api/src/com/intellij/openapi/actionSystem/ActionGroupUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 JetBrains s.r.o. + * Copyright 2000-2019 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,8 +30,10 @@ public class ActionGroupUtil { return action2presentation.computeIfAbsent(action, k -> action.getTemplatePresentation().clone()); } + /** + * @deprecated use {@link #isGroupEmpty(ActionGroup, AnActionEvent, boolean)} instead + */ @Deprecated - // Use #isGroupEmpty with isModalContext instead public static boolean isGroupEmpty(@NotNull ActionGroup actionGroup, @NotNull AnActionEvent e) { return isGroupEmpty(actionGroup, e, new HashMap<>(), false); } diff --git a/platform/platform-api/src/com/intellij/openapi/actionSystem/DataConstants.java b/platform/platform-api/src/com/intellij/openapi/actionSystem/DataConstants.java index a00ecc171eb0..6288ed92411f 100644 --- a/platform/platform-api/src/com/intellij/openapi/actionSystem/DataConstants.java +++ b/platform/platform-api/src/com/intellij/openapi/actionSystem/DataConstants.java @@ -21,7 +21,7 @@ import org.jetbrains.annotations.NonNls; * Identifiers for data items which can be returned from {@link DataContext#getData(String)} and * {@link DataProvider#getData(String)}. * - * @deprecated {@link DataKeys} and {@link DataKey#getData} should be used instead + * @deprecated use {@link DataKeys} and {@link DataKey#getData} instead */ @Deprecated public interface DataConstants { diff --git a/platform/platform-api/src/com/intellij/openapi/actionSystem/PlatformDataKeys.java b/platform/platform-api/src/com/intellij/openapi/actionSystem/PlatformDataKeys.java index 59eadb186d73..699d27c4849b 100644 --- a/platform/platform-api/src/com/intellij/openapi/actionSystem/PlatformDataKeys.java +++ b/platform/platform-api/src/com/intellij/openapi/actionSystem/PlatformDataKeys.java @@ -50,6 +50,9 @@ public class PlatformDataKeys extends CommonDataKeys { */ public static final DataKey IS_MODAL_CONTEXT = DataKey.create("isModalContext"); + /** + * @deprecated see {@link com.intellij.diff.tools.util.DiffDataKeys} + */ @Deprecated public static final DataKey DIFF_VIEWER = DataKey.create("diffViewer"); diff --git a/platform/platform-api/src/com/intellij/openapi/actionSystem/ex/ActionUtil.java b/platform/platform-api/src/com/intellij/openapi/actionSystem/ex/ActionUtil.java index fbc11a2c3b7a..a98cf1512113 100644 --- a/platform/platform-api/src/com/intellij/openapi/actionSystem/ex/ActionUtil.java +++ b/platform/platform-api/src/com/intellij/openapi/actionSystem/ex/ActionUtil.java @@ -199,8 +199,10 @@ public class ActionUtil { return false; } + /** + * @deprecated use {@link #performDumbAwareUpdate(boolean, AnAction, AnActionEvent, boolean)} instead + */ @Deprecated - // Use #performDumbAwareUpdate with isModalContext instead public static boolean performDumbAwareUpdate(@NotNull AnAction action, @NotNull AnActionEvent e, boolean beforeActionPerformed) { return performDumbAwareUpdate(false, action, e, beforeActionPerformed); } diff --git a/platform/platform-api/src/com/intellij/openapi/diff/ActionButtonPresentation.java b/platform/platform-api/src/com/intellij/openapi/diff/ActionButtonPresentation.java index 7fe7591bd5df..3ed7b742d5e1 100644 --- a/platform/platform-api/src/com/intellij/openapi/diff/ActionButtonPresentation.java +++ b/platform/platform-api/src/com/intellij/openapi/diff/ActionButtonPresentation.java @@ -24,6 +24,7 @@ import com.intellij.openapi.ui.Messages; * @see com.intellij.diff.util.DiffUserDataKeysEx#MERGE_CANCEL_MESSAGE * @see com.intellij.diff.util.DiffUserDataKeysEx#MERGE_CANCEL_HANDLER * @see com.intellij.diff.util.DiffUserDataKeysEx#MERGE_ACTION_CAPTIONS + * @deprecated kept for API compatibility */ @Deprecated public abstract class ActionButtonPresentation { diff --git a/platform/platform-api/src/com/intellij/openapi/options/ConfigurableGroup.java b/platform/platform-api/src/com/intellij/openapi/options/ConfigurableGroup.java index 092ced37714d..51b53a0ec8f1 100644 --- a/platform/platform-api/src/com/intellij/openapi/options/ConfigurableGroup.java +++ b/platform/platform-api/src/com/intellij/openapi/options/ConfigurableGroup.java @@ -4,7 +4,9 @@ package com.intellij.openapi.options; public interface ConfigurableGroup extends Configurable.Composite { String getDisplayName(); - /** No one uses it */ + /** + * @deprecated unused + */ @Deprecated default String getShortName() { return null; } } diff --git a/platform/platform-api/src/com/intellij/openapi/ui/ComponentValidator.java b/platform/platform-api/src/com/intellij/openapi/ui/ComponentValidator.java index ccf2819d1866..98da2bbf8ed2 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/ComponentValidator.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/ComponentValidator.java @@ -74,7 +74,9 @@ public class ComponentValidator { this.parentDisposable = parentDisposable; } - // @deprecated Use {@link ComponentValidator#withValidator(Supplier)} instead + /** + * @deprecated Use {@link ComponentValidator#withValidator(Supplier)} instead + */ @Deprecated public ComponentValidator withValidator(@NotNull Consumer validator) { this.validator = () -> { diff --git a/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java b/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java index 3c8406e8f445..caf1da34746f 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java @@ -266,7 +266,7 @@ public abstract class DialogWrapper { * when we do not have a project to figure out which window * is more suitable as an owner for the dialog. *

- * Instead, use {@link DialogWrapper#DialogWrapper(Project, boolean, boolean)} + * @deprecated use {@link DialogWrapper#DialogWrapper(Project, boolean, boolean)} */ @Deprecated protected DialogWrapper(boolean canBeParent, boolean applicationModalIfPossible) { @@ -827,7 +827,7 @@ public abstract class DialogWrapper { return DialogWrapperPeerFactory.getInstance().createPeer(this, parent, canBeParent); } - /** Dialogs with no parents are discouraged. */ + /** @deprecated Dialogs with no parents are discouraged. */ @Deprecated @NotNull protected DialogWrapperPeer createPeer(boolean canBeParent, boolean applicationModalIfPossible) { @@ -1421,18 +1421,27 @@ public abstract class DialogWrapper { } } + /** + * @deprecated unused + */ @Deprecated @SuppressWarnings("SpellCheckingInspection") protected boolean isNorthStrictedToPreferredSize() { return true; } + /** + * @deprecated unused + */ @Deprecated @SuppressWarnings("SpellCheckingInspection") protected boolean isCenterStrictedToPreferredSize() { return false; } + /** + * @deprecated unused + */ @Deprecated @SuppressWarnings("SpellCheckingInspection") protected boolean isSouthStrictedToPreferredSize() { @@ -1753,7 +1762,7 @@ public abstract class DialogWrapper { return 0L; } - /** deprecated pointless (equals {@link #isOK} */ + /** @deprecated unused (equals {@link #isOK}) */ @Deprecated public boolean isToDispatchTypeAhead() { return isOK(); diff --git a/platform/platform-api/src/com/intellij/openapi/ui/popup/JBPopupFactory.java b/platform/platform-api/src/com/intellij/openapi/ui/popup/JBPopupFactory.java index f99bbb89568b..ff3fc2864c7e 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/popup/JBPopupFactory.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/popup/JBPopupFactory.java @@ -94,6 +94,9 @@ public abstract class JBPopupFactory { Runnable onNo, int defaultOptionIndex); + /** + * @deprecated use {@link #createActionsStep(ActionGroup, DataContext, String, boolean, boolean, String, Component, boolean, int, boolean)} + */ @Deprecated @NotNull public ListPopupStep createActionsStep(@NotNull ActionGroup actionGroup, @@ -106,6 +109,9 @@ public abstract class JBPopupFactory { return createActionsStep(actionGroup, dataContext, null, showNumbers, showDisabledActions, title, component, honorActionMnemonics, 0, false); } + /** + * @deprecated use {@link #createActionsStep(ActionGroup, DataContext, String, boolean, boolean, String, Component, boolean, int, boolean)} + */ @Deprecated @NotNull public ListPopupStep createActionsStep(@NotNull ActionGroup actionGroup, diff --git a/platform/platform-api/src/com/intellij/openapi/wm/StatusBarWidget.java b/platform/platform-api/src/com/intellij/openapi/wm/StatusBarWidget.java index 67db8fed6a36..e6090321b2c4 100644 --- a/platform/platform-api/src/com/intellij/openapi/wm/StatusBarWidget.java +++ b/platform/platform-api/src/com/intellij/openapi/wm/StatusBarWidget.java @@ -46,6 +46,9 @@ public interface StatusBarWidget extends Disposable { @NotNull String getText(); + /** + * @deprecated unused + */ @NotNull @Deprecated default String getMaxPossibleText() { return ""; } @@ -60,6 +63,9 @@ public interface StatusBarWidget extends Disposable { @Nullable String getSelectedValue(); + /** + * @deprecated unused + */ @NotNull @Deprecated default String getMaxValue() { return ""; } diff --git a/platform/platform-api/src/com/intellij/openapi/wm/ToolWindowManager.java b/platform/platform-api/src/com/intellij/openapi/wm/ToolWindowManager.java index f18ae3a8876a..a5582936a14e 100644 --- a/platform/platform-api/src/com/intellij/openapi/wm/ToolWindowManager.java +++ b/platform/platform-api/src/com/intellij/openapi/wm/ToolWindowManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. + * Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. */ package com.intellij.openapi.wm; @@ -38,14 +38,14 @@ public abstract class ToolWindowManager { * @exception IllegalArgumentException if the same window is already installed or one * of the parameters is {@code null}. * @return tool window - * @deprecated {@link ToolWindowManager#registerToolWindow(String, boolean, ToolWindowAnchor)} + * @deprecated use {@link ToolWindowManager#registerToolWindow(String, boolean, ToolWindowAnchor)} */ @Deprecated @NotNull public abstract ToolWindow registerToolWindow(@NotNull String id, @NotNull JComponent component, @NotNull ToolWindowAnchor anchor); /** - * @deprecated {@link ToolWindowManager#registerToolWindow(String, boolean, ToolWindowAnchor)} + * @deprecated use {@link ToolWindowManager#registerToolWindow(String, boolean, ToolWindowAnchor)} */ @Deprecated @NotNull @@ -55,7 +55,7 @@ public abstract class ToolWindowManager { @NotNull Disposable parentDisposable); /** - * @deprecated {@link ToolWindowManager#registerToolWindow(String, boolean, ToolWindowAnchor)} + * @deprecated use {@link ToolWindowManager#registerToolWindow(String, boolean, ToolWindowAnchor)} */ @Deprecated @NotNull @@ -65,7 +65,7 @@ public abstract class ToolWindowManager { @NotNull Disposable parentDisposable, boolean canWorkInDumbMode); /** - * @deprecated {@link ToolWindowManager#registerToolWindow(String, boolean, ToolWindowAnchor)} + * @deprecated use {@link ToolWindowManager#registerToolWindow(String, boolean, ToolWindowAnchor)} */ @Deprecated @NotNull diff --git a/platform/platform-api/src/com/intellij/ui/CheckboxTreeBase.java b/platform/platform-api/src/com/intellij/ui/CheckboxTreeBase.java index 7ab5e2734eab..a8262eb6006f 100644 --- a/platform/platform-api/src/com/intellij/ui/CheckboxTreeBase.java +++ b/platform/platform-api/src/com/intellij/ui/CheckboxTreeBase.java @@ -248,9 +248,9 @@ public class CheckboxTreeBase extends Tree { } /** - * @see CheckboxTreeCellRendererBase#customizeRenderer(JTree, Object, boolean, boolean, boolean, int, boolean) - * @deprecated + * @deprecated use {@link CheckboxTreeCellRendererBase#customizeRenderer(JTree, Object, boolean, boolean, boolean, int, boolean)} */ + @SuppressWarnings({"DeprecatedIsStillUsed", "unused"}) @Deprecated public void customizeCellRenderer(JTree tree, Object value, @@ -271,9 +271,8 @@ public class CheckboxTreeBase extends Tree { } /** - * Don't use this enum. Left for API compatibility. - * @see ThreeStateCheckBox.State - * @deprecated + * @see State + * @deprecated Don't use this enum. Left for API compatibility. */ @Deprecated public enum NodeState { diff --git a/platform/platform-api/src/com/intellij/ui/IdeBorderFactory.java b/platform/platform-api/src/com/intellij/ui/IdeBorderFactory.java index 24dcab75af2e..19ef22626675 100644 --- a/platform/platform-api/src/com/intellij/ui/IdeBorderFactory.java +++ b/platform/platform-api/src/com/intellij/ui/IdeBorderFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 JetBrains s.r.o. + * Copyright 2000-2019 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -75,8 +75,7 @@ public class IdeBorderFactory { } /** - * @deprecated - * @see JBUI.Borders#empty() + * @deprecated use {@link JBUI.Borders#empty()} */ @Deprecated public static Border createEmptyBorder() { @@ -84,8 +83,7 @@ public class IdeBorderFactory { } /** - * @deprecated - * @see JBUI.Borders#empty(int) + * @deprecated use {@link JBUI.Borders#empty(int)} */ @Deprecated public static Border createEmptyBorder(int thickness) { @@ -93,8 +91,7 @@ public class IdeBorderFactory { } /** - * @deprecated - * @see JBUI.Borders#empty(int, int, int, int) + * @deprecated use {@link JBUI.Borders#empty(int, int, int, int)} */ @Deprecated public static Border createEmptyBorder(int top, int left, int bottom, int right) { diff --git a/platform/platform-api/src/com/intellij/ui/RawCommandLineEditor.java b/platform/platform-api/src/com/intellij/ui/RawCommandLineEditor.java index 1c4a10896bad..601ecc5a7c16 100644 --- a/platform/platform-api/src/com/intellij/ui/RawCommandLineEditor.java +++ b/platform/platform-api/src/com/intellij/ui/RawCommandLineEditor.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2019 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,13 +50,16 @@ public class RawCommandLineEditor extends JPanel implements TextAccessor { InsertPathAction.addTo(myEditor, descriptor, insertSystemDependentPaths); } + /** + * @deprecated Won't be used anymore as dialog is replaced with lightweight popup + */ @Deprecated public String getDialogCaption() { return myDialogCaption; } /** - * Won't be used anymore as dialog is replaced with lightweight popup + * @deprecated Won't be used anymore as dialog is replaced with lightweight popup */ @Deprecated public void setDialogCaption(String dialogCaption) { diff --git a/platform/platform-api/src/com/intellij/ui/RowEditableTableModel.java b/platform/platform-api/src/com/intellij/ui/RowEditableTableModel.java index a43e0a17b8f0..5b64966a9423 100644 --- a/platform/platform-api/src/com/intellij/ui/RowEditableTableModel.java +++ b/platform/platform-api/src/com/intellij/ui/RowEditableTableModel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2019 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,13 +20,13 @@ import javax.swing.table.TableModel; /** * @author dsl * @author Konstantin Bulenkov - * - * @deprecated - * @see com.intellij.util.ui.EditableModel + * @deprecated use {@link com.intellij.util.ui.EditableModel} */ @Deprecated public interface RowEditableTableModel extends TableModel { void addRow(); + void removeRow(int index); + void exchangeRows(int oldIndex, int newIndex); } diff --git a/platform/platform-api/src/com/intellij/ui/SearchTextField.java b/platform/platform-api/src/com/intellij/ui/SearchTextField.java index f9b2c0a2c5c9..72688185607e 100644 --- a/platform/platform-api/src/com/intellij/ui/SearchTextField.java +++ b/platform/platform-api/src/com/intellij/ui/SearchTextField.java @@ -209,12 +209,20 @@ public class SearchTextField extends JPanel { } } + /** + * @deprecated unused + */ @Deprecated + @SuppressWarnings("unused") protected boolean isSearchControlUISupported() { return true; } + /** + * @deprecated unused + */ @Deprecated + @SuppressWarnings("unused") protected boolean hasIconsOutsideOfTextField() { return false; } @@ -494,6 +502,9 @@ public class SearchTextField extends JPanel { return false; } + /** + * @deprecated unused + */ @Deprecated @SuppressWarnings("unused") public void setSearchIcon(final Icon icon) { diff --git a/platform/platform-api/src/com/intellij/ui/components/JBSlidingPanel.java b/platform/platform-api/src/com/intellij/ui/components/JBSlidingPanel.java index a3de60b4be3d..a06020d84549 100644 --- a/platform/platform-api/src/com/intellij/ui/components/JBSlidingPanel.java +++ b/platform/platform-api/src/com/intellij/ui/components/JBSlidingPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2019 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ import java.util.ArrayList; * @author Konstantin Bulenkov */ public class JBSlidingPanel extends JBPanel { - private final ArrayList> mySlides = new ArrayList<>(); + private final ArrayList> mySlides = new ArrayList<>(); private int mySelectedIndex = -1; public JBSlidingPanel() { @@ -75,24 +75,36 @@ public class JBSlidingPanel extends JBPanel { return callback; } + /** + * @deprecated MUST use {@link #add((String, Component))} + */ @Override @Deprecated public Component add(Component comp) { throw new AddMethodIsNotSupportedException(); } + /** + * @deprecated MUST use {@link #add((String, Component))} + */ @Override @Deprecated public Component add(Component comp, int index) { throw new AddMethodIsNotSupportedException(); } + /** + * @deprecated MUST use {@link #add((String, Component))} + */ @Override @Deprecated public void add(Component comp, Object constraints) { throw new AddMethodIsNotSupportedException(); } + /** + * @deprecated MUST use {@link #add((String, Component))} + */ @Override @Deprecated public void add(Component comp, Object constraints, int index) { diff --git a/platform/platform-api/src/com/intellij/ui/components/fields/ExtendableTextField.java b/platform/platform-api/src/com/intellij/ui/components/fields/ExtendableTextField.java index 76ffd7b33966..1e1ab1f73a45 100644 --- a/platform/platform-api/src/com/intellij/ui/components/fields/ExtendableTextField.java +++ b/platform/platform-api/src/com/intellij/ui/components/fields/ExtendableTextField.java @@ -85,7 +85,7 @@ public class ExtendableTextField extends JBTextField implements ExtendableTextCo } /** - * Temporary solution to support icons in the text component for different L&F. + * @deprecated Temporary solution to support icons in the text component for different L&F. * This method replaces non-supported UI with Darcula UI. * * @param ui an object to paint this text component diff --git a/platform/platform-api/src/com/intellij/ui/table/TableView.java b/platform/platform-api/src/com/intellij/ui/table/TableView.java index 91c03003a075..21ebe87da095 100644 --- a/platform/platform-api/src/com/intellij/ui/table/TableView.java +++ b/platform/platform-api/src/com/intellij/ui/table/TableView.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2019 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -55,8 +55,7 @@ public class TableView extends BaseTableView implements ItemsProvider, Sel } /** - * use {@link #setModelAndUpdateColumns(com.intellij.util.ui.ListTableModel)} instead - * @param model + * @deprecated use {@link #setModelAndUpdateColumns(ListTableModel)} instead */ @Deprecated public void setModel(final ListTableModel model) { diff --git a/platform/platform-api/src/com/intellij/ui/tabs/TabsListener.java b/platform/platform-api/src/com/intellij/ui/tabs/TabsListener.java index 0afcbc0fbb7b..b4c5160f8b44 100644 --- a/platform/platform-api/src/com/intellij/ui/tabs/TabsListener.java +++ b/platform/platform-api/src/com/intellij/ui/tabs/TabsListener.java @@ -1,4 +1,4 @@ -// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.ui.tabs; import org.jetbrains.annotations.NotNull; @@ -9,15 +9,15 @@ public interface TabsListener { default void beforeSelectionChanged(TabInfo oldSelection, TabInfo newSelection) { } - + default void tabRemoved(@NotNull TabInfo tabToRemove) { } - + default void tabsMoved() { } /** - * Use {@link TabsListener} directly + * @deprecated use {@link TabsListener} directly */ @Deprecated class Adapter implements TabsListener { diff --git a/platform/platform-api/src/com/intellij/ui/tabs/newImpl/JBEditorTabs.java b/platform/platform-api/src/com/intellij/ui/tabs/newImpl/JBEditorTabs.java index be7810a7e24f..36323b1ffaa4 100644 --- a/platform/platform-api/src/com/intellij/ui/tabs/newImpl/JBEditorTabs.java +++ b/platform/platform-api/src/com/intellij/ui/tabs/newImpl/JBEditorTabs.java @@ -27,7 +27,7 @@ import java.util.function.Supplier; */ public class JBEditorTabs extends JBTabsImpl implements JBEditorTabsBase { /** - * @Deprecated use {@link #myTabPainter}. + * @deprecated use {@link #myTabPainter}. */ @Deprecated protected JBEditorTabsPainter myDefaultPainter = new DefaultEditorTabsPainter(this); diff --git a/platform/platform-api/src/com/intellij/ui/tabs/newImpl/JBEditorTabsPainter.java b/platform/platform-api/src/com/intellij/ui/tabs/newImpl/JBEditorTabsPainter.java index a65730ce4623..76fde0bad688 100644 --- a/platform/platform-api/src/com/intellij/ui/tabs/newImpl/JBEditorTabsPainter.java +++ b/platform/platform-api/src/com/intellij/ui/tabs/newImpl/JBEditorTabsPainter.java @@ -9,6 +9,7 @@ import com.intellij.util.ui.UIUtil; import java.awt.*; /** + * @deprecated left for API compatibility * @author Konstantin Bulenkov */ @Deprecated diff --git a/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java b/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java index 6d417d300a33..b6e40630b75a 100644 --- a/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java +++ b/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java @@ -746,6 +746,9 @@ public class Tree extends JTree implements ComponentWithEmptyText, ComponentWith } } + /** + * @deprecated no effect + */ @Deprecated public final void setLineStyleAngled() { } diff --git a/platform/platform-api/src/com/intellij/ui/treeStructure/filtered/FilteringTreeBuilder.java b/platform/platform-api/src/com/intellij/ui/treeStructure/filtered/FilteringTreeBuilder.java index 2f07250115a3..4a81b5f32982 100644 --- a/platform/platform-api/src/com/intellij/ui/treeStructure/filtered/FilteringTreeBuilder.java +++ b/platform/platform-api/src/com/intellij/ui/treeStructure/filtered/FilteringTreeBuilder.java @@ -113,6 +113,9 @@ public class FilteringTreeBuilder extends AbstractTreeBuilder { return true; } + /** + * @deprecated use {@link #refilter(Object, boolean, boolean)} + */ @NotNull @Deprecated public ActionCallback refilter() { diff --git a/platform/platform-api/src/com/intellij/util/net/HttpConfigurable.java b/platform/platform-api/src/com/intellij/util/net/HttpConfigurable.java index f1fdf826b7fa..2690b2628749 100644 --- a/platform/platform-api/src/com/intellij/util/net/HttpConfigurable.java +++ b/platform/platform-api/src/com/intellij/util/net/HttpConfigurable.java @@ -153,6 +153,9 @@ public class HttpConfigurable implements PersistentStateComponent