From fb5aeeb20926fbd2d30c342b70a8d367d27c5d88 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Wed, 15 Jan 2020 19:26:44 +0100 Subject: [PATCH] cleanup GitOrigin-RevId: 287aea12d2e53e4114a500c67d161d633d701fbb --- .../src/com/intellij/openapi/project/Project.java | 9 ++++----- .../src/com/intellij/ide/RecentProjectsManagerBase.kt | 2 +- .../src/com/intellij/openapi/components/BaseState.kt | 3 ++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/platform/core-api/src/com/intellij/openapi/project/Project.java b/platform/core-api/src/com/intellij/openapi/project/Project.java index 499915a673c7..dc29ab9d0fd0 100644 --- a/platform/core-api/src/com/intellij/openapi/project/Project.java +++ b/platform/core-api/src/com/intellij/openapi/project/Project.java @@ -1,4 +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. +// Copyright 2000-2020 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.project; import com.intellij.openapi.components.ComponentManager; @@ -76,13 +76,12 @@ public interface Project extends ComponentManager, AreaInstance { /** * Returns presentable project path: * {@linkplain #getProjectFilePath()} for file-based projects, {@linkplain #getBasePath()} for directory-based ones.
- * * Returns {@code null} for default project. + * Returns {@code null} for default project. * Note: the word "presentable" here implies file system presentation, not a UI one. - * - * @return presentable project path */ @Nullable - default @SystemDependent String getPresentableUrl() { + @SystemDependent + default String getPresentableUrl() { return null; } diff --git a/platform/platform-impl/src/com/intellij/ide/RecentProjectsManagerBase.kt b/platform/platform-impl/src/com/intellij/ide/RecentProjectsManagerBase.kt index 562874e969ce..535eafd6c21c 100644 --- a/platform/platform-impl/src/com/intellij/ide/RecentProjectsManagerBase.kt +++ b/platform/platform-impl/src/com/intellij/ide/RecentProjectsManagerBase.kt @@ -263,7 +263,7 @@ open class RecentProjectsManagerBase : RecentProjectsManager(), PersistentStateC protected open fun getRecentProjectMetadata(path: String, project: Project): String? = null open fun getProjectPath(project: Project): String? { - return PathUtil.toSystemIndependentName(project.presentableUrl) + return FileUtilRt.toSystemIndependentName(project.presentableUrl ?: return null) } // open for Rider diff --git a/platform/projectModel-api/src/com/intellij/openapi/components/BaseState.kt b/platform/projectModel-api/src/com/intellij/openapi/components/BaseState.kt index 8e7fbfccd092..59c8f82cb622 100644 --- a/platform/projectModel-api/src/com/intellij/openapi/components/BaseState.kt +++ b/platform/projectModel-api/src/com/intellij/openapi/components/BaseState.kt @@ -1,4 +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. +// Copyright 2000-2020 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.components import com.intellij.openapi.diagnostic.logger @@ -121,6 +121,7 @@ abstract class BaseState : SerializationFilter, ModificationTracker { intIncrementModificationCount() } + @ApiStatus.Internal fun intIncrementModificationCount() { MOD_COUNT_UPDATER.incrementAndGet(this) }