diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/savedPatches/SavedPatchesTree.kt b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/savedPatches/SavedPatchesTree.kt index db1ff8c141ab..7773a784379a 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/savedPatches/SavedPatchesTree.kt +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/savedPatches/SavedPatchesTree.kt @@ -3,7 +3,6 @@ package com.intellij.openapi.vcs.changes.savedPatches import com.intellij.ide.util.treeView.TreeState import com.intellij.openapi.Disposable -import com.intellij.openapi.actionSystem.CommonDataKeys import com.intellij.openapi.project.Project import com.intellij.openapi.util.ClearableLazyValue import com.intellij.openapi.util.Disposer @@ -65,7 +64,6 @@ class SavedPatchesTree(project: Project, val selectedObjects = selectedPatchObjects() val data = visibleProvidersList.firstNotNullOfOrNull { provider -> provider.getData(dataId, selectedObjects) } if (data != null) return data - if (CommonDataKeys.PROJECT.`is`(dataId)) return myProject return super.getData(dataId) } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTree.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTree.java index ae599927e05f..94a9b6066b5b 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTree.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTree.java @@ -814,6 +814,9 @@ public abstract class ChangesTree extends Tree implements DataProvider { @Nullable @Override public Object getData(@NotNull String dataId) { + if (CommonDataKeys.PROJECT.is(dataId)) { + return myProject; + } if (PlatformDataKeys.COPY_PROVIDER.is(dataId)) { return myTreeCopyProvider; }