From 2d772e74486d6a21eb3577ef5d54d0a2114cb23d Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Tue, 20 Sep 2016 13:16:45 +0200 Subject: [PATCH] =?UTF-8?q?DataSourceStorage=20=E2=80=94=20do=20not=20use?= =?UTF-8?q?=20Project.DIRECTORY=5FSTORE=5FFOLDER?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../configuration-store-impl/src/ProjectStoreImpl.kt | 9 +++------ .../openapi/components/impl/stores/IProjectStore.java | 3 +++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/platform/configuration-store-impl/src/ProjectStoreImpl.kt b/platform/configuration-store-impl/src/ProjectStoreImpl.kt index 9ebfeb1b1991..011f8c246e57 100644 --- a/platform/configuration-store-impl/src/ProjectStoreImpl.kt +++ b/platform/configuration-store-impl/src/ProjectStoreImpl.kt @@ -231,12 +231,9 @@ abstract class ProjectStoreBase(override final val project: ProjectImpl) : Compo return FileUtil.isAncestor(PathUtilRt.getParentPath(projectFilePath), filePath, false) } - override fun getDirectoryStoreFile(): VirtualFile? { - if (!isDirectoryBased) { - return null - } - return PathUtilRt.getParentPath(projectFilePath).nullize()?.let { LocalFileSystem.getInstance().findFileByPath(it) } - } + override fun getDirectoryStorePath() = if (!isDirectoryBased) null else PathUtilRt.getParentPath(projectFilePath).nullize() + + override fun getDirectoryStoreFile() = directoryStorePath?.let { LocalFileSystem.getInstance().findFileByPath(it) } } private open class ProjectStoreImpl(project: ProjectImpl, private val pathMacroManager: PathMacroManager) : ProjectStoreBase(project) { diff --git a/platform/projectModel-impl/src/com/intellij/openapi/components/impl/stores/IProjectStore.java b/platform/projectModel-impl/src/com/intellij/openapi/components/impl/stores/IProjectStore.java index 76eb897b701b..1147389e90bd 100644 --- a/platform/projectModel-impl/src/com/intellij/openapi/components/impl/stores/IProjectStore.java +++ b/platform/projectModel-impl/src/com/intellij/openapi/components/impl/stores/IProjectStore.java @@ -58,4 +58,7 @@ public interface IProjectStore extends IComponentStore { @Nullable VirtualFile getDirectoryStoreFile(); + + @Nullable + String getDirectoryStorePath(); }