From dcf32052d0a4006e422ef7b771e00df3bc297572 Mon Sep 17 00:00:00 2001 From: Nikolay Chashnikov Date: Tue, 6 Apr 2021 16:59:03 +0300 Subject: [PATCH] [workspace model] add fileNameId property to toString for FileInDirectory class This is needed to have different representation for entity sources of different libraries (IDEA-265327). GitOrigin-RevId: 935314e28db4bad1f809993d3c897a46936c3189 --- .../src/com/intellij/workspaceModel/ide/jpsEntitySources.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform/workspaceModel/ide/src/com/intellij/workspaceModel/ide/jpsEntitySources.kt b/platform/workspaceModel/ide/src/com/intellij/workspaceModel/ide/jpsEntitySources.kt index d75dc5dbe409..5380333f1c95 100644 --- a/platform/workspaceModel/ide/src/com/intellij/workspaceModel/ide/jpsEntitySources.kt +++ b/platform/workspaceModel/ide/src/com/intellij/workspaceModel/ide/jpsEntitySources.kt @@ -75,6 +75,10 @@ sealed class JpsFileEntitySource : EntitySource { override fun hashCode(): Int { return directory.hashCode() * 31 * 31 + projectLocation.hashCode() * 31 + fileNameId } + + override fun toString(): String { + return "FileInDirectory(directory=$directory, fileNameId=$fileNameId, projectLocation=$projectLocation)" + } } }