From c213d04a5a5e8896ae9d2d349595d90ffc12e55d Mon Sep 17 00:00:00 2001 From: Nadya Zabrodina Date: Tue, 28 Jun 2016 00:05:22 +0300 Subject: [PATCH] [shelf]: IDEA-112589 Unexpected clipboard content after Ctrl+C on shelf's files list --- .../openapi/vcs/changes/shelf/ShelvedBinaryFile.java | 4 ++++ .../intellij/openapi/vcs/changes/shelf/ShelvedChange.java | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedBinaryFile.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedBinaryFile.java index 67637e68c471..d934d9a635f2 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedBinaryFile.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedBinaryFile.java @@ -128,4 +128,8 @@ public class ShelvedBinaryFile implements JDOMExternalizable { result = 31 * result + (SHELVED_PATH != null ? SHELVED_PATH.hashCode() : 0); return result; } + + public String toString() { + return FileUtil.toSystemDependentName(BEFORE_PATH == null ? AFTER_PATH : BEFORE_PATH); + } } \ No newline at end of file diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChange.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChange.java index 590c6e970529..f6075b2eadfa 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChange.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChange.java @@ -34,6 +34,7 @@ import com.intellij.openapi.fileEditor.FileDocumentManager; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Comparing; import com.intellij.openapi.util.Computable; +import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.vcs.FilePath; import com.intellij.openapi.vcs.FileStatus; import com.intellij.openapi.vcs.VcsBundle; @@ -265,4 +266,8 @@ public class ShelvedChange { public String getPatchPath() { return myPatchPath; } + + public String toString() { + return FileUtil.toSystemDependentName(myBeforePath == null ? myAfterPath : myBeforePath); + } }