From f2ac27eafd575af4e9b720d91a5ab3150e2f7f6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Wed, 26 Jun 2019 16:42:50 +0200 Subject: [PATCH] [lang-impl] fix deprecation problems GitOrigin-RevId: ef4c284fb6a5cdee9c24f7c310068d07657b3fc3 --- .../intellij/psi/codeStyle/CodeStyleManager.java | 6 +++--- .../codeInsight/CodeInsightSettings.java | 4 ++++ .../codeInsight/CodeInsightUtilBase.java | 4 +++- .../codeInsight/TargetElementUtilBase.java | 3 +++ .../codeInsight/completion/CompletionData.java | 5 ++--- .../completion/impl/CamelHumpMatcher.java | 4 ++-- .../codeInsight/editorActions/TypedHandler.java | 6 ++++-- .../codeInsight/hint/ElementLocationUtil.java | 5 ++++- .../codeInsight/lookup/LookupValueFactory.java | 4 ++-- .../lookup/impl/LookupCellRenderer.java | 6 ++++++ .../navigation/ListBackgroundUpdaterTask.java | 7 +++++-- .../template/impl/TemplateManagerImpl.java | 3 +++ .../offlineViewer/OfflineViewParseUtil.java | 8 +++++++- .../com/intellij/execution/ConsoleFolding.java | 15 +++++++-------- .../console/ConsoleHistoryController.java | 3 +++ .../editorHeaderActions/ShowMoreOptions.java | 4 ++++ .../src/com/intellij/find/impl/FindDialog.java | 12 ++++++------ .../src/com/intellij/ide/CopyPasteUtil.java | 5 +++++ .../com/intellij/ide/actions/GotoActionBase.java | 3 +++ .../ide/actions/GotoRelatedFileAction.java | 8 +++----- .../runAnything/groups/RunAnythingHelpGroup.java | 9 +++++---- .../runAnything/items/RunAnythingItem.java | 3 ++- .../runAnything/ui/RunAnythingScrollingUtil.java | 8 ++++++++ .../ide/fileTemplates/FileTemplateManager.java | 8 ++++++-- .../ide/hierarchy/HierarchyTreeBuilder.java | 5 +++++ .../ide/navigationToolbar/ui/AquaNavBarUI.java | 5 ++++- .../navigationToolbar/ui/NavBarUIManager.java | 7 +++++-- .../impl/AbstractProjectViewPane.java | 6 ++++++ .../ide/projectView/impl/ProjectViewTree.java | 2 +- .../intellij/ide/scratch/LRUPopupBuilder.java | 3 +++ .../intellij/ide/todo/AllTodosTreeBuilder.java | 16 +++++++++------- .../intellij/ide/util/FileStructurePopup.java | 5 ++++- .../ide/util/gotoByName/ChooseByNameBase.java | 3 +++ .../formatter/DocumentBasedFormattingModel.java | 3 +++ .../source/codeStyle/CodeStyleManagerImpl.java | 3 --- .../impl/source/codeStyle/IndentHelperImpl.java | 2 +- .../refactoring/BaseRefactoringProcessor.java | 3 +++ .../invertBoolean/InvertBooleanDelegate.java | 2 +- .../intellij/refactoring/ui/ConflictsDialog.java | 3 +++ 39 files changed, 151 insertions(+), 60 deletions(-) diff --git a/platform/core-api/src/com/intellij/psi/codeStyle/CodeStyleManager.java b/platform/core-api/src/com/intellij/psi/codeStyle/CodeStyleManager.java index 29ee212b9f3d..e39055fb3984 100644 --- a/platform/core-api/src/com/intellij/psi/codeStyle/CodeStyleManager.java +++ b/platform/core-api/src/com/intellij/psi/codeStyle/CodeStyleManager.java @@ -220,19 +220,19 @@ public abstract class CodeStyleManager { public abstract String getLineIndent(@NotNull Document document, int offset); /** - * @deprecated + * @deprecated obsolete */ @Deprecated public abstract Indent getIndent(String text, FileType fileType); /** - * @deprecated + * @deprecated obsolete */ @Deprecated public abstract String fillIndent(Indent indent, FileType fileType); /** - * @deprecated + * @deprecated obsolete */ @Deprecated public abstract Indent zeroIndent(); diff --git a/platform/lang-impl/src/com/intellij/codeInsight/CodeInsightSettings.java b/platform/lang-impl/src/com/intellij/codeInsight/CodeInsightSettings.java index b893ad69a4d5..5b1268a136fd 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/CodeInsightSettings.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/CodeInsightSettings.java @@ -90,6 +90,7 @@ public class CodeInsightSettings implements PersistentStateComponent, C /** * @deprecated use accessors instead */ + @Deprecated public boolean SELECT_AUTOPOPUP_SUGGESTIONS_BY_CHARS; public boolean isSelectAutopopupSuggestionsByChars() { @@ -109,6 +110,9 @@ public class CodeInsightSettings implements PersistentStateComponent, C public boolean AUTOCOMPLETE_ON_CODE_COMPLETION = true; public boolean AUTOCOMPLETE_ON_SMART_TYPE_COMPLETION = true; + /** + * @deprecated unused + */ @Deprecated public boolean AUTOCOMPLETE_COMMON_PREFIX = true; diff --git a/platform/lang-impl/src/com/intellij/codeInsight/CodeInsightUtilBase.java b/platform/lang-impl/src/com/intellij/codeInsight/CodeInsightUtilBase.java index 4f0f9f822cb5..968093605adc 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/CodeInsightUtilBase.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/CodeInsightUtilBase.java @@ -82,7 +82,9 @@ public class CodeInsightUtilBase extends CodeInsightUtilCore { return !status.hasReadonlyFiles(); } - // returns true on success + /** + * @deprecated use {@link EditorModificationUtil#checkModificationAllowed(Editor)} + */ @Deprecated public static boolean prepareEditorForWrite(@NotNull Editor editor) { return EditorModificationUtil.checkModificationAllowed(editor); diff --git a/platform/lang-impl/src/com/intellij/codeInsight/TargetElementUtilBase.java b/platform/lang-impl/src/com/intellij/codeInsight/TargetElementUtilBase.java index d7b0ab53dadf..830dafaadb12 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/TargetElementUtilBase.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/TargetElementUtilBase.java @@ -47,6 +47,9 @@ public abstract class TargetElementUtilBase { return TargetElementUtil.adjustOffset(file, document, offset); } + /** + * @deprecated use {@link TargetElementUtil#inVirtualSpace(Editor, int)} + */ @ApiStatus.ScheduledForRemoval(inVersion = "2020.1") @Deprecated public static boolean inVirtualSpace(@NotNull Editor editor, int offset) { diff --git a/platform/lang-impl/src/com/intellij/codeInsight/completion/CompletionData.java b/platform/lang-impl/src/com/intellij/codeInsight/completion/CompletionData.java index 5e8f29a34250..fa71711a998b 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/completion/CompletionData.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/completion/CompletionData.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.codeInsight.completion; @@ -52,8 +52,7 @@ public class CompletionData { } /** - * @deprecated - * @see CompletionContributor + * @deprecated see {@link CompletionContributor} */ @Deprecated protected void registerVariant(CompletionVariant variant){ diff --git a/platform/lang-impl/src/com/intellij/codeInsight/completion/impl/CamelHumpMatcher.java b/platform/lang-impl/src/com/intellij/codeInsight/completion/impl/CamelHumpMatcher.java index d0239d53ea89..77df8c87af87 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/completion/impl/CamelHumpMatcher.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/completion/impl/CamelHumpMatcher.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.codeInsight.completion.impl; import com.intellij.codeInsight.CodeInsightSettings; @@ -155,7 +155,7 @@ public class CamelHumpMatcher extends PrefixMatcher { } /** - * In an ideal world, all tests would use the same settings as production, i.e. middle matching. + * @deprecated In an ideal world, all tests would use the same settings as production, i.e. middle matching. * If you see a usage of this method which can be easily removed (i.e. it's easy to make a test pass without it * by modifying test expectations slightly), please do it */ diff --git a/platform/lang-impl/src/com/intellij/codeInsight/editorActions/TypedHandler.java b/platform/lang-impl/src/com/intellij/codeInsight/editorActions/TypedHandler.java index 51bc59e370b5..bef943c0a311 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/editorActions/TypedHandler.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/editorActions/TypedHandler.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.codeInsight.editorActions; @@ -117,7 +117,9 @@ public class TypedHandler extends TypedActionHandlerBase { return quoteHandlers.get(fileType); } - /** @see QuoteHandlerEP */ + /** + * @deprecated use {@link QuoteHandlerEP} + */ @Deprecated public static void registerQuoteHandler(@NotNull FileType fileType, @NotNull QuoteHandler quoteHandler) { quoteHandlers.put(fileType, quoteHandler); diff --git a/platform/lang-impl/src/com/intellij/codeInsight/hint/ElementLocationUtil.java b/platform/lang-impl/src/com/intellij/codeInsight/hint/ElementLocationUtil.java index 03d824da7be3..c32a91883134 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/hint/ElementLocationUtil.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/hint/ElementLocationUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 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. @@ -33,6 +33,9 @@ public class ElementLocationUtil { private ElementLocationUtil() { } + /** + * @deprecated use {@link #renderElementLocation(PsiElement, Ref)} + */ @Deprecated public static void customizeElementLabel(final PsiElement element, final JLabel label) { Ref ref = new Ref<>(); diff --git a/platform/lang-impl/src/com/intellij/codeInsight/lookup/LookupValueFactory.java b/platform/lang-impl/src/com/intellij/codeInsight/lookup/LookupValueFactory.java index e90c888ad20b..8868ee366030 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/lookup/LookupValueFactory.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/lookup/LookupValueFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 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. @@ -24,8 +24,8 @@ import javax.swing.*; import java.awt.*; /** + * @deprecated use {@link LookupElementBuilder} * @author Dmitry Avdeev - * Use {@link com.intellij.codeInsight.lookup.LookupElementBuilder} */ @Deprecated public class LookupValueFactory { diff --git a/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupCellRenderer.java b/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupCellRenderer.java index c68a52acdf39..03e9528a072b 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupCellRenderer.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupCellRenderer.java @@ -58,9 +58,15 @@ public class LookupCellRenderer implements ListCellRenderer { private final FontMetrics myNormalMetrics; private final FontMetrics myBoldMetrics; + /** + * @deprecated unused + */ @Deprecated public static final Color FOREGROUND_COLOR = JBColor.namedColor("CompletionPopup.foreground", JBColor.foreground()); + /** + * @deprecated unused + */ @Deprecated public static final Color SELECTED_FOREGROUND_COLOR = JBColor.namedColor("CompletionPopup.selectionForeground", new JBColor(JBColor.WHITE, JBColor.foreground())); diff --git a/platform/lang-impl/src/com/intellij/codeInsight/navigation/ListBackgroundUpdaterTask.java b/platform/lang-impl/src/com/intellij/codeInsight/navigation/ListBackgroundUpdaterTask.java index 70a3dd82c1c8..1fa4b55b4368 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/navigation/ListBackgroundUpdaterTask.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/navigation/ListBackgroundUpdaterTask.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. @@ -43,11 +43,14 @@ public abstract class ListBackgroundUpdaterTask extends BackgroundUpdaterTask { public ListBackgroundUpdaterTask(@Nullable final Project project, @NotNull final String title) { this(project, title, null); } - + public ListBackgroundUpdaterTask(@Nullable final Project project, @NotNull final String title, @Nullable Comparator comparator) { super(project, title, comparator); } + /** + * @deprecated please use {@link BackgroundUpdaterTask} + */ @Deprecated public void init(@NotNull AbstractPopup popup, @NotNull Object component, @NotNull Ref usageView) { myPopup = popup; diff --git a/platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateManagerImpl.java b/platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateManagerImpl.java index 535b1cbb7c9e..7f03fbc7d190 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateManagerImpl.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateManagerImpl.java @@ -70,6 +70,9 @@ public class TemplateManagerImpl extends TemplateManager implements Disposable { public void dispose() { } + /** + * @deprecated use {@link #setTemplateTesting(Disposable)} + */ @TestOnly @Deprecated public static void setTemplateTesting(Project project, Disposable parentDisposable) { diff --git a/platform/lang-impl/src/com/intellij/codeInspection/offlineViewer/OfflineViewParseUtil.java b/platform/lang-impl/src/com/intellij/codeInspection/offlineViewer/OfflineViewParseUtil.java index a3a5366429f1..cbb800a5fcd0 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/offlineViewer/OfflineViewParseUtil.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/offlineViewer/OfflineViewParseUtil.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.codeInspection.offlineViewer; @@ -31,6 +31,9 @@ public class OfflineViewParseUtil { return parse(new FileReader(problemFile)); } + /** + * @deprecated use {@link #parse(File)} or {@link #parse(Reader)} + */ @Deprecated public static Map> parse(String problemText) { return parse(new StringReader(problemText)); @@ -111,6 +114,9 @@ public class OfflineViewParseUtil { return parseProfileName(new FileReader(descriptorFile)); } + /** + * @deprecated use {@link #parseProfileName(File)} or {@link #parseProfileName(Reader)} + */ @Deprecated @Nullable public static String parseProfileName(String descriptorText) { diff --git a/platform/lang-impl/src/com/intellij/execution/ConsoleFolding.java b/platform/lang-impl/src/com/intellij/execution/ConsoleFolding.java index 1b37e1cf839a..b7511a4c9325 100644 --- a/platform/lang-impl/src/com/intellij/execution/ConsoleFolding.java +++ b/platform/lang-impl/src/com/intellij/execution/ConsoleFolding.java @@ -1,3 +1,4 @@ +// 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.execution; import com.intellij.openapi.extensions.ExtensionPointName; @@ -16,7 +17,7 @@ public abstract class ConsoleFolding { /** * @param project current project * @param line line to check whether it should be folded or not - * @return true if line should be folded, false if not + * @return {@code true} if line should be folded, {@code false} if not */ public boolean shouldFoldLine(@NotNull Project project, @NotNull String line) { return shouldFoldLine(line); @@ -33,21 +34,19 @@ public abstract class ConsoleFolding { } /** - * Deprecated since 2018.1. Use {@link #shouldFoldLine(Project, String)} instead. - * * @param line to check if should be folded - * @return true is line should be folded, false if not + * @return {@code true} if line should be folded, {@code false} if not + * @deprecated since 2018.1. Use {@link #shouldFoldLine(Project, String)} instead. */ @Deprecated - public boolean shouldFoldLine(@NotNull String line) { return false; } + public boolean shouldFoldLine(@SuppressWarnings("unused") @NotNull String line) { return false; } /** - * Deprecated since 2018.1. Use {@link #getPlaceholderText(Project, List)} instead. - * * @param lines to fold * @return placeholder for lines + * @deprecated since 2018.1. Use {@link #getPlaceholderText(Project, List)} instead. */ @Deprecated @Nullable - public String getPlaceholderText(@NotNull List lines) { return null; } + public String getPlaceholderText(@SuppressWarnings("unused") @NotNull List lines) { return null; } } diff --git a/platform/lang-impl/src/com/intellij/execution/console/ConsoleHistoryController.java b/platform/lang-impl/src/com/intellij/execution/console/ConsoleHistoryController.java index 466ec69407ed..45026f7b5ef3 100644 --- a/platform/lang-impl/src/com/intellij/execution/console/ConsoleHistoryController.java +++ b/platform/lang-impl/src/com/intellij/execution/console/ConsoleHistoryController.java @@ -70,6 +70,9 @@ public class ConsoleHistoryController implements Disposable { private ModelHelper myHelper; private long myLastSaveStamp; + /** + * @deprecated use {@link #ConsoleHistoryController(ConsoleRootType, String, LanguageConsoleView)} or {@link #ConsoleHistoryController(ConsoleRootType, String, LanguageConsoleView, ConsoleHistoryModel)} + */ @Deprecated public ConsoleHistoryController(@NotNull String type, @Nullable String persistenceId, @NotNull LanguageConsoleView console) { this(new ConsoleRootType(type, null) { }, persistenceId, console); diff --git a/platform/lang-impl/src/com/intellij/find/editorHeaderActions/ShowMoreOptions.java b/platform/lang-impl/src/com/intellij/find/editorHeaderActions/ShowMoreOptions.java index 632d390bf0d9..7c5ea1c8396d 100644 --- a/platform/lang-impl/src/com/intellij/find/editorHeaderActions/ShowMoreOptions.java +++ b/platform/lang-impl/src/com/intellij/find/editorHeaderActions/ShowMoreOptions.java @@ -1,3 +1,4 @@ +// 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.find.editorHeaderActions; import com.intellij.openapi.actionSystem.*; @@ -11,6 +12,9 @@ import java.awt.event.InputEvent; import java.awt.event.KeyEvent; public class ShowMoreOptions extends AnAction implements DumbAware { + /** + * @deprecated unused, use configurable shortcut {@code ShowFilterPopup} + */ @Deprecated public static final Shortcut SHORT_CUT = new KeyboardShortcut(KeyStroke.getKeyStroke(KeyEvent.VK_F, InputEvent.ALT_DOWN_MASK | InputEvent.CTRL_DOWN_MASK), null); diff --git a/platform/lang-impl/src/com/intellij/find/impl/FindDialog.java b/platform/lang-impl/src/com/intellij/find/impl/FindDialog.java index eb3e5275f3c1..29bc2e7135b0 100644 --- a/platform/lang-impl/src/com/intellij/find/impl/FindDialog.java +++ b/platform/lang-impl/src/com/intellij/find/impl/FindDialog.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.find.impl; @@ -7,19 +7,19 @@ import org.jetbrains.annotations.NotNull; import javax.swing.*; -public class FindDialog { +public class FindDialog { /** - * @deprecated - * @see com.intellij.find.impl.FindInProjectUtil#initFileFilter(javax.swing.JComboBox, javax.swing.JCheckBox) + * @deprecated use {@link FindInProjectUtil#initFileFilter(JComboBox, JCheckBox)} */ + @Deprecated public static void initFileFilter(@NotNull final JComboBox fileFilter, @NotNull final JCheckBox useFileFilter) { FindInProjectUtil.initFileFilter(fileFilter, useFileFilter); } /** - * @deprecated - * @see FindInProjectUtil#getPresentableName(com.intellij.find.FindModel.SearchContext) + * @deprecated use {@link FindInProjectUtil#getPresentableName(FindModel.SearchContext)} */ + @Deprecated public static String getPresentableName(@NotNull FindModel.SearchContext searchContext) { return FindInProjectUtil.getPresentableName(searchContext); } diff --git a/platform/lang-impl/src/com/intellij/ide/CopyPasteUtil.java b/platform/lang-impl/src/com/intellij/ide/CopyPasteUtil.java index 6291cac7a17e..d6cf4355b758 100644 --- a/platform/lang-impl/src/com/intellij/ide/CopyPasteUtil.java +++ b/platform/lang-impl/src/com/intellij/ide/CopyPasteUtil.java @@ -21,6 +21,7 @@ import com.intellij.openapi.Disposable; import com.intellij.openapi.application.Application; import com.intellij.openapi.ide.CopyPasteManager; import com.intellij.psi.PsiElement; +import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull; import java.awt.datatransfer.Transferable; @@ -46,7 +47,11 @@ public class CopyPasteUtil { public static class DefaultCopyPasteListener implements CopyPasteManager.ContentChangedListener { private final Consumer consumer; + /** + * @deprecated use {@link #DefaultCopyPasteListener(Consumer)} + */ @Deprecated + @ApiStatus.ScheduledForRemoval public DefaultCopyPasteListener(AbstractTreeUpdater updater) { this(element -> updater.addSubtreeToUpdateByElement(element)); } diff --git a/platform/lang-impl/src/com/intellij/ide/actions/GotoActionBase.java b/platform/lang-impl/src/com/intellij/ide/actions/GotoActionBase.java index 5ce733cda227..651f7bec4744 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/GotoActionBase.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/GotoActionBase.java @@ -190,6 +190,9 @@ public abstract class GotoActionBase extends AnAction { ChooseByNameModelEx.getItemProvider(model, getPsiContext(e))); } + /** + * @deprecated use other overloaded methods + */ @Deprecated protected void showNavigationPopup(AnActionEvent e, ChooseByNameModel model, diff --git a/platform/lang-impl/src/com/intellij/ide/actions/GotoRelatedFileAction.java b/platform/lang-impl/src/com/intellij/ide/actions/GotoRelatedFileAction.java index 9a20751530ca..ef1af70e08b3 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/GotoRelatedFileAction.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/GotoRelatedFileAction.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 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. @@ -23,17 +23,15 @@ import org.jetbrains.annotations.ApiStatus; import java.util.List; /** - * @deprecated API compatibility. Utility methods moved to NavigationUtil. - * todo [neuro] REMOVE-ME when September Ends.. * @author gregsh + * @deprecated API compatibility. Utility methods moved to NavigationUtil. */ @Deprecated @ApiStatus.ScheduledForRemoval(inVersion = "2015") public class GotoRelatedFileAction { /** - * @deprecated - * @see com.intellij.codeInsight.navigation.NavigationUtil#getRelatedItemsPopup(java.util.List, String) + * @deprecated use {@link NavigationUtil#getRelatedItemsPopup(List, String)} */ @Deprecated public static JBPopup createPopup(List items, final String title) { diff --git a/platform/lang-impl/src/com/intellij/ide/actions/runAnything/groups/RunAnythingHelpGroup.java b/platform/lang-impl/src/com/intellij/ide/actions/runAnything/groups/RunAnythingHelpGroup.java index 8a63642bb76b..85d61732b62b 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/runAnything/groups/RunAnythingHelpGroup.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/runAnything/groups/RunAnythingHelpGroup.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.ide.actions.runAnything.groups; import com.intellij.ide.actions.runAnything.activity.RunAnythingProvider; @@ -29,8 +29,10 @@ public class RunAnythingHelpGroup

extends RunAnyt myProviders = providers; } + /** + * @deprecated API compatibility + */ @Deprecated - //leave it for compatibility reasons public RunAnythingHelpGroup() { } @NotNull @@ -42,8 +44,7 @@ public class RunAnythingHelpGroup

extends RunAnyt /** * Returns collections of providers each of them is expecting to provide not null {@link RunAnythingProvider#getHelpItem(DataContext)} * See also {@code RunAnythingProviderBase.getHelp*()} methods. - *

- * Deprecated - please use {@link RunAnythingProvider#getHelpGroupTitle()} instead + * @deprecated please use {@link RunAnythingProvider#getHelpGroupTitle()} instead */ @Deprecated @NotNull diff --git a/platform/lang-impl/src/com/intellij/ide/actions/runAnything/items/RunAnythingItem.java b/platform/lang-impl/src/com/intellij/ide/actions/runAnything/items/RunAnythingItem.java index 22a5076892e3..714074f30e1c 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/runAnything/items/RunAnythingItem.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/runAnything/items/RunAnythingItem.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.ide.actions.runAnything.items; import org.jetbrains.annotations.NotNull; @@ -21,6 +21,7 @@ public abstract class RunAnythingItem { * Creates current item {@link Component} * * @param isSelected true if item is selected in the list + * @deprecated use {@link #createComponent(String, Icon, boolean, boolean)} */ @Deprecated @Nullable diff --git a/platform/lang-impl/src/com/intellij/ide/actions/runAnything/ui/RunAnythingScrollingUtil.java b/platform/lang-impl/src/com/intellij/ide/actions/runAnything/ui/RunAnythingScrollingUtil.java index 392258471abc..9664672c4bf7 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/runAnything/ui/RunAnythingScrollingUtil.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/runAnything/ui/RunAnythingScrollingUtil.java @@ -14,9 +14,17 @@ import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; public class RunAnythingScrollingUtil { + + /** + * @deprecated unused + */ @NonNls @Deprecated protected static final String SELECT_PREVIOUS_ROW_ACTION_ID = ListActions.Up.ID; + + /** + * @deprecated unused + */ @NonNls @Deprecated protected static final String SELECT_NEXT_ROW_ACTION_ID = ListActions.Down.ID; diff --git a/platform/lang-impl/src/com/intellij/ide/fileTemplates/FileTemplateManager.java b/platform/lang-impl/src/com/intellij/ide/fileTemplates/FileTemplateManager.java index 01b13ee444e4..0c60958d4e73 100644 --- a/platform/lang-impl/src/com/intellij/ide/fileTemplates/FileTemplateManager.java +++ b/platform/lang-impl/src/com/intellij/ide/fileTemplates/FileTemplateManager.java @@ -57,7 +57,9 @@ public abstract class FileTemplateManager{ @NotNull protected FileTemplateManager checkInitialized() { return this; } - /** Use {@link #getInstance(Project)} instead */ + /** + * @deprecated Use {@link #getInstance(Project)} instead + */ @Deprecated public static FileTemplateManager getInstance(){ return getDefaultInstance(); @@ -94,7 +96,9 @@ public abstract class FileTemplateManager{ @NotNull public abstract Properties getDefaultProperties(); - /** Use {@link #getDefaultProperties()} instead */ + /** + * @deprecated use {@link #getDefaultProperties()} instead + */ @NotNull @Deprecated public Properties getDefaultProperties(@NotNull Project project) { diff --git a/platform/lang-impl/src/com/intellij/ide/hierarchy/HierarchyTreeBuilder.java b/platform/lang-impl/src/com/intellij/ide/hierarchy/HierarchyTreeBuilder.java index 7e0247678de5..0b1ceba1e566 100644 --- a/platform/lang-impl/src/com/intellij/ide/hierarchy/HierarchyTreeBuilder.java +++ b/platform/lang-impl/src/com/intellij/ide/hierarchy/HierarchyTreeBuilder.java @@ -17,7 +17,12 @@ package com.intellij.ide.hierarchy; import com.intellij.ide.util.treeView.AbstractTreeBuilder; +import org.jetbrains.annotations.ApiStatus; +/** + * @deprecated (to be removed in IDEA 2018) + */ +@ApiStatus.ScheduledForRemoval(inVersion = "2018") @Deprecated public class HierarchyTreeBuilder extends AbstractTreeBuilder { HierarchyTreeBuilder() { diff --git a/platform/lang-impl/src/com/intellij/ide/navigationToolbar/ui/AquaNavBarUI.java b/platform/lang-impl/src/com/intellij/ide/navigationToolbar/ui/AquaNavBarUI.java index 54559326a52c..c7cc97ac8bde 100644 --- a/platform/lang-impl/src/com/intellij/ide/navigationToolbar/ui/AquaNavBarUI.java +++ b/platform/lang-impl/src/com/intellij/ide/navigationToolbar/ui/AquaNavBarUI.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. @@ -18,6 +18,7 @@ package com.intellij.ide.navigationToolbar.ui; import com.intellij.ui.ColorUtil; import com.intellij.ui.Gray; import com.intellij.util.ui.UIUtil; +import org.jetbrains.annotations.ApiStatus; import java.awt.*; @@ -25,6 +26,8 @@ import java.awt.*; * @deprecated will be removed 2020.1 * @author Konstantin Bulenkov */ +@ApiStatus.ScheduledForRemoval(inVersion = "2020.1") +@Deprecated public class AquaNavBarUI extends AbstractNavBarUI { @Override public void doPaintWrapperPanel(Graphics2D g, Rectangle bounds, boolean mainToolbarVisible) { diff --git a/platform/lang-impl/src/com/intellij/ide/navigationToolbar/ui/NavBarUIManager.java b/platform/lang-impl/src/com/intellij/ide/navigationToolbar/ui/NavBarUIManager.java index c3f6466215fc..fb2ccd4b88f6 100644 --- a/platform/lang-impl/src/com/intellij/ide/navigationToolbar/ui/NavBarUIManager.java +++ b/platform/lang-impl/src/com/intellij/ide/navigationToolbar/ui/NavBarUIManager.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. @@ -16,6 +16,7 @@ package com.intellij.ide.navigationToolbar.ui; import com.intellij.util.ui.UIUtil; +import org.jetbrains.annotations.ApiStatus; /** * @author Konstantin Bulenkov @@ -23,8 +24,10 @@ import com.intellij.util.ui.UIUtil; public class NavBarUIManager { public static final NavBarUI COMMON = new CommonNavBarUI(); /** - * @deprecated will be removal in 2020.1 + * @deprecated will be removed in 2020.1 */ + @ApiStatus.ScheduledForRemoval(inVersion = "2020.1") + @Deprecated public static final NavBarUI AQUA = COMMON; public static final NavBarUI DARCULA = new DarculaNavBarUI(); diff --git a/platform/lang-impl/src/com/intellij/ide/projectView/impl/AbstractProjectViewPane.java b/platform/lang-impl/src/com/intellij/ide/projectView/impl/AbstractProjectViewPane.java index 212ef2cec4b1..c728573505ca 100644 --- a/platform/lang-impl/src/com/intellij/ide/projectView/impl/AbstractProjectViewPane.java +++ b/platform/lang-impl/src/com/intellij/ide/projectView/impl/AbstractProjectViewPane.java @@ -123,6 +123,9 @@ public abstract class AbstractProjectViewPane implements DataProvider, Disposabl Disposer.register(project, this); } + /** + * @deprecated unused + */ @Deprecated protected final void fireTreeChangeListener() { } @@ -801,6 +804,9 @@ public abstract class AbstractProjectViewPane implements DataProvider, Disposabl return myTreeBuilder.getUi().getReady(requestor); } + /** + * @deprecated temporary API + */ @TestOnly @Deprecated @NotNull diff --git a/platform/lang-impl/src/com/intellij/ide/projectView/impl/ProjectViewTree.java b/platform/lang-impl/src/com/intellij/ide/projectView/impl/ProjectViewTree.java index e6661da4c91f..4894f63e3134 100644 --- a/platform/lang-impl/src/com/intellij/ide/projectView/impl/ProjectViewTree.java +++ b/platform/lang-impl/src/com/intellij/ide/projectView/impl/ProjectViewTree.java @@ -102,7 +102,7 @@ public class ProjectViewTree extends DnDAwareTree { } /** - * Not every tree employs {@link DefaultMutableTreeNode} so + * @deprecated Not every tree employs {@link DefaultMutableTreeNode} so * use {@link #getSelectionPaths()} or {@link TreeUtil#getSelectedPathIfOne(JTree)} directly. */ @Deprecated diff --git a/platform/lang-impl/src/com/intellij/ide/scratch/LRUPopupBuilder.java b/platform/lang-impl/src/com/intellij/ide/scratch/LRUPopupBuilder.java index 3dd3257e1612..7e4c7336a9ef 100644 --- a/platform/lang-impl/src/com/intellij/ide/scratch/LRUPopupBuilder.java +++ b/platform/lang-impl/src/com/intellij/ide/scratch/LRUPopupBuilder.java @@ -70,6 +70,9 @@ public abstract class LRUPopupBuilder { }); } + /** + * @deprecated use {@link #forFileLanguages(Project, String, Language, Consumer)} + */ @Deprecated @NotNull public static ListPopup forFileLanguages(@NotNull Project project, diff --git a/platform/lang-impl/src/com/intellij/ide/todo/AllTodosTreeBuilder.java b/platform/lang-impl/src/com/intellij/ide/todo/AllTodosTreeBuilder.java index ebf189684110..383e5e25d56b 100644 --- a/platform/lang-impl/src/com/intellij/ide/todo/AllTodosTreeBuilder.java +++ b/platform/lang-impl/src/com/intellij/ide/todo/AllTodosTreeBuilder.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. @@ -17,27 +17,29 @@ package com.intellij.ide.todo; import com.intellij.openapi.project.Project; +import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull; import javax.swing.*; import javax.swing.tree.DefaultTreeModel; -public class AllTodosTreeBuilder extends TodoTreeBuilder{ +public class AllTodosTreeBuilder extends TodoTreeBuilder { /** - * To be deleted in 2020.1 + * @deprecated To remove in 2020.1 */ + @ApiStatus.ScheduledForRemoval(inVersion = "2020.1") @Deprecated - public AllTodosTreeBuilder(JTree tree,DefaultTreeModel treeModel,Project project){ + public AllTodosTreeBuilder(JTree tree, DefaultTreeModel treeModel, Project project) { this(tree, project); } - public AllTodosTreeBuilder(JTree tree, Project project){ + public AllTodosTreeBuilder(JTree tree, Project project) { super(tree, project); } - + @Override @NotNull - protected TodoTreeStructure createTreeStructure(){ + protected TodoTreeStructure createTreeStructure() { return new AllTodosTreeStructure(myProject); } } diff --git a/platform/lang-impl/src/com/intellij/ide/util/FileStructurePopup.java b/platform/lang-impl/src/com/intellij/ide/util/FileStructurePopup.java index 101f78228efa..4e76aaeaf999 100644 --- a/platform/lang-impl/src/com/intellij/ide/util/FileStructurePopup.java +++ b/platform/lang-impl/src/com/intellij/ide/util/FileStructurePopup.java @@ -124,7 +124,10 @@ public class FileStructurePopup implements Disposable, TreeActionsOwner { private boolean myCanClose = true; private boolean myDisposed; - /** @noinspection unused*/ + /** + * @noinspection unused + * @deprecated use {@link #FileStructurePopup(Project, FileEditor, StructureViewModel)} + */ @Deprecated public FileStructurePopup(@NotNull Project project, @NotNull FileEditor fileEditor, diff --git a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java index 66593b372084..06cdfe182e00 100644 --- a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java +++ b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java @@ -1046,6 +1046,9 @@ public abstract class ChooseByNameBase implements ChooseByNameViewModel { } } + /** + * @deprecated unused + */ @Deprecated public boolean hasPostponedAction() { return false; diff --git a/platform/lang-impl/src/com/intellij/psi/formatter/DocumentBasedFormattingModel.java b/platform/lang-impl/src/com/intellij/psi/formatter/DocumentBasedFormattingModel.java index e4fb0d304f60..efb4538c135d 100644 --- a/platform/lang-impl/src/com/intellij/psi/formatter/DocumentBasedFormattingModel.java +++ b/platform/lang-impl/src/com/intellij/psi/formatter/DocumentBasedFormattingModel.java @@ -31,6 +31,9 @@ public class DocumentBasedFormattingModel implements FormattingModelEx { private final FileType myFileType; private final PsiFile myFile; + /** + * @deprecated use other CTORs + */ @Deprecated public DocumentBasedFormattingModel(final Block rootBlock, @NotNull final Document document, diff --git a/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleManagerImpl.java b/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleManagerImpl.java index fd3db198e7af..71572518ff4f 100644 --- a/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleManagerImpl.java +++ b/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleManagerImpl.java @@ -600,7 +600,6 @@ public class CodeStyleManagerImpl extends CodeStyleManager implements Formatting } @Override - @Deprecated public Indent getIndent(String text, FileType fileType) { int indent = IndentHelperImpl.getIndent(CodeStyle.getSettings(myProject).getIndentOptions(fileType), text, true); int indentLevel = indent / IndentHelperImpl.INDENT_FACTOR; @@ -609,7 +608,6 @@ public class CodeStyleManagerImpl extends CodeStyleManager implements Formatting } @Override - @Deprecated public String fillIndent(Indent indent, FileType fileType) { IndentImpl indent1 = (IndentImpl)indent; int indentLevel = indent1.getIndentLevel(); @@ -636,7 +634,6 @@ public class CodeStyleManagerImpl extends CodeStyleManager implements Formatting } @Override - @Deprecated public Indent zeroIndent() { return new IndentImpl(CodeStyle.getSettings(myProject), 0, 0, null); } diff --git a/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/IndentHelperImpl.java b/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/IndentHelperImpl.java index ea101c5c16e9..09c43577df4f 100644 --- a/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/IndentHelperImpl.java +++ b/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/IndentHelperImpl.java @@ -143,7 +143,7 @@ public class IndentHelperImpl extends IndentHelper { } /** - * @Depreacted Do not use the implementation, see {@link IndentHelper} + * @depreacted Do not use the implementation, see {@link IndentHelper} */ @Deprecated public static int getIndent(Project project, FileType fileType, String text, boolean includeNonSpace) { diff --git a/platform/lang-impl/src/com/intellij/refactoring/BaseRefactoringProcessor.java b/platform/lang-impl/src/com/intellij/refactoring/BaseRefactoringProcessor.java index f6b6e17bd270..e44b9ba57e7d 100644 --- a/platform/lang-impl/src/com/intellij/refactoring/BaseRefactoringProcessor.java +++ b/platform/lang-impl/src/com/intellij/refactoring/BaseRefactoringProcessor.java @@ -619,6 +619,9 @@ public abstract class BaseRefactoringProcessor implements Runnable { } } + /** + * @deprecated use {@link #showConflicts(MultiMap, UsageInfo[])} + */ @Deprecated protected boolean showConflicts(@NotNull MultiMap conflicts) { return showConflicts(conflicts, null); diff --git a/platform/lang-impl/src/com/intellij/refactoring/invertBoolean/InvertBooleanDelegate.java b/platform/lang-impl/src/com/intellij/refactoring/invertBoolean/InvertBooleanDelegate.java index 54751bda49a0..8d9471c6db62 100644 --- a/platform/lang-impl/src/com/intellij/refactoring/invertBoolean/InvertBooleanDelegate.java +++ b/platform/lang-impl/src/com/intellij/refactoring/invertBoolean/InvertBooleanDelegate.java @@ -80,7 +80,7 @@ public abstract class InvertBooleanDelegate { /** * Use {@link #collectForeignElementsToInvert(PsiElement, PsiElement, Language, Collection)} instead - * To be removed in 2018.3 + * @deprecated To be removed in 2018.3 */ @Deprecated @ApiStatus.ScheduledForRemoval(inVersion = "2018.3") diff --git a/platform/lang-impl/src/com/intellij/refactoring/ui/ConflictsDialog.java b/platform/lang-impl/src/com/intellij/refactoring/ui/ConflictsDialog.java index a45bb0d96da0..9fe360ea6bc8 100644 --- a/platform/lang-impl/src/com/intellij/refactoring/ui/ConflictsDialog.java +++ b/platform/lang-impl/src/com/intellij/refactoring/ui/ConflictsDialog.java @@ -67,6 +67,9 @@ public class ConflictsDialog extends DialogWrapper{ init(); } + /** + * @deprecated use other CTORs + */ @Deprecated public ConflictsDialog(Project project, String... conflictDescriptions) { super(project, true);