From 86847abcece4760836621cbc719e56bb1fd65ba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Tue, 2 Jul 2019 15:24:49 +0200 Subject: [PATCH] [core-api] fix deprecation problems GitOrigin-RevId: d3a4a73a13ad7024956ffd1ffa5b69b64cfe8e2e --- .../intellij/openapi/project/DumbModePermission.java | 5 ++++- .../intellij/openapi/project/ProjectCoreUtil.java | 12 ++++++++---- .../src/com/intellij/util/PlatformIcons.java | 6 +++--- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/platform/core-api/src/com/intellij/openapi/project/DumbModePermission.java b/platform/core-api/src/com/intellij/openapi/project/DumbModePermission.java index c0faa2684159..e87f94931fbf 100644 --- a/platform/core-api/src/com/intellij/openapi/project/DumbModePermission.java +++ b/platform/core-api/src/com/intellij/openapi/project/DumbModePermission.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. @@ -15,6 +15,9 @@ */ package com.intellij.openapi.project; +/** + * @deprecated obsolete API + */ @Deprecated public enum DumbModePermission { MAY_START_MODAL, diff --git a/platform/core-api/src/com/intellij/openapi/project/ProjectCoreUtil.java b/platform/core-api/src/com/intellij/openapi/project/ProjectCoreUtil.java index b803be552766..c85d7f98d13b 100644 --- a/platform/core-api/src/com/intellij/openapi/project/ProjectCoreUtil.java +++ b/platform/core-api/src/com/intellij/openapi/project/ProjectCoreUtil.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. @@ -24,8 +24,11 @@ import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; - public class ProjectCoreUtil { + + /** + * @deprecated for internal use only, see {@link #theOnlyOpenProject()} + */ @Deprecated @ApiStatus.Internal public static volatile Project theProject; @@ -42,8 +45,9 @@ public class ProjectCoreUtil { /** * For internal usage only. - * Please use {@link com.intellij.psi.PsiElement#getProject()} or {@link com.intellij.openapi.project.ProjectManager#getOpenProjects()} instead. - * @return the only open project if there is one, null if no projects open, or several projects are open, or default project is created + * + * @return the only open project if there is one, {@code null} if no projects open, or several projects are open, or default project is created + * @deprecated Please use {@link com.intellij.psi.PsiElement#getProject()} or {@link com.intellij.openapi.project.ProjectManager#getOpenProjects()} instead. */ @Deprecated @ApiStatus.Internal diff --git a/platform/core-api/src/com/intellij/util/PlatformIcons.java b/platform/core-api/src/com/intellij/util/PlatformIcons.java index ad8fe7ae3d14..ccf903aae9a2 100644 --- a/platform/core-api/src/com/intellij/util/PlatformIcons.java +++ b/platform/core-api/src/com/intellij/util/PlatformIcons.java @@ -46,7 +46,7 @@ public interface PlatformIcons { Icon ASPECT_ICON = AllIcons.Nodes.Aspect; /** - * @deprecated {@link AllIcons.Nodes#Tag} + * @deprecated use {@link AllIcons.Nodes#Tag} */ @Deprecated Icon ADVICE_ICON = AllIcons.Nodes.Tag; @@ -106,13 +106,13 @@ public interface PlatformIcons { Icon IMPORT_ICON = AllIcons.ToolbarDecorator.Import; /** - * @use {@link #FOLDER_ICON} + * @deprecated use {@link #FOLDER_ICON} */ @Deprecated Icon DIRECTORY_CLOSED_ICON = FOLDER_ICON; /** - * @use {@link #FOLDER_ICON} + * @deprecated use {@link #FOLDER_ICON} */ @Deprecated Icon DIRECTORY_OPEN_ICON = FOLDER_ICON;