GitOrigin-RevId: 287aea12d2e53e4114a500c67d161d633d701fbb
This commit is contained in:
Vladimir Krivosheev
2020-01-16 08:11:51 +00:00
committed by intellij-monorepo-bot
parent d3f45401ae
commit fb5aeeb209
3 changed files with 7 additions and 7 deletions
@@ -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.<br/>
* * Returns {@code null} for default project.
* Returns {@code null} for default project.
* <b>Note:</b> 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;
}
@@ -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
@@ -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)
}