change to Internal to discourage usage

GitOrigin-RevId: 6a5efbd344fa6a12cf8e30bebb4d12c07934796b
This commit is contained in:
Alexey Kudravtsev
2019-06-13 18:12:37 +03:00
committed by intellij-monorepo-bot
parent af86231036
commit cbf13dbe39
2 changed files with 7 additions and 1 deletions
@@ -27,7 +27,7 @@ import org.jetbrains.annotations.Nullable;
public class ProjectCoreUtil {
@Deprecated
@ApiStatus.Experimental
@ApiStatus.Internal
public static volatile Project theProject;
public static boolean isProjectOrWorkspaceFile(@NotNull VirtualFile file) {
@@ -41,8 +41,12 @@ 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
*/
@Deprecated
@ApiStatus.Internal
@Nullable
public static Project theOnlyOpenProject() {
return theProject;
@@ -133,12 +133,14 @@ public interface ApplicationEx extends Application {
/** DO NOT USE */
@Deprecated
@ApiStatus.Internal
default void executeByImpatientReader(@NotNull Runnable runnable) throws ApplicationUtil.CannotRunReadActionException {
runnable.run();
}
/** DO NOT USE */
@Deprecated
@ApiStatus.Internal
default boolean isInImpatientReader() {
return false;
}