diff --git a/.idea/modules.xml b/.idea/modules.xml index 3171f67e2354..706748ba397b 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -1039,6 +1039,7 @@ + diff --git a/build/bazel-generated-file-list.txt b/build/bazel-generated-file-list.txt index 1d1c0006eae0..5eea06e2cf5d 100644 --- a/build/bazel-generated-file-list.txt +++ b/build/bazel-generated-file-list.txt @@ -669,6 +669,7 @@ platform/util/troveCompileOnly platform/util/xmlDom platform/util/zip platform/vcs-api +platform/vcs-api/shared platform/vcs-api/vcs-api-core platform/vcs-impl platform/vcs-impl/exec diff --git a/platform/platform-resources/src/META-INF/vcs-modules-shared.xml b/platform/platform-resources/src/META-INF/vcs-modules-shared.xml index 4b80182e9768..01d5b485facf 100644 --- a/platform/platform-resources/src/META-INF/vcs-modules-shared.xml +++ b/platform/platform-resources/src/META-INF/vcs-modules-shared.xml @@ -1,6 +1,7 @@ + diff --git a/platform/vcs-api/BUILD.bazel b/platform/vcs-api/BUILD.bazel index f0fab8801dc3..088b2ce52441 100644 --- a/platform/vcs-api/BUILD.bazel +++ b/platform/vcs-api/BUILD.bazel @@ -28,8 +28,12 @@ jvm_library( "//platform/core-api:core", "//platform/core-ui", "@lib//:caffeine", + "//platform/vcs-api/shared", + ], + exports = [ + "//platform/vcs-api/vcs-api-core:vcs-core", + "//platform/vcs-api/shared", ], - exports = ["//platform/vcs-api/vcs-api-core:vcs-core"], runtime_deps = [ ":vcs_resources", "//platform/backend", diff --git a/platform/vcs-api/api-dump.txt b/platform/vcs-api/api-dump.txt index 599752f86001..eed4ec52f9bc 100644 --- a/platform/vcs-api/api-dump.txt +++ b/platform/vcs-api/api-dump.txt @@ -696,19 +696,6 @@ com.intellij.openapi.vcs.actions.VcsContext - a:getSelectedIOFile():java.io.File - a:getSelectedIOFiles():java.io.File[] - getSelectedUnversionedFilePaths():java.util.List -com.intellij.openapi.vcs.actions.VcsContextFactory -- a:createFilePath(com.intellij.openapi.vfs.VirtualFile,java.lang.String,Z):com.intellij.openapi.vcs.FilePath -- a:createFilePath(java.lang.String,Z):com.intellij.openapi.vcs.FilePath -- a:createFilePath(java.nio.file.Path,Z):com.intellij.openapi.vcs.FilePath -- a:createFilePathOn(com.intellij.openapi.vfs.VirtualFile):com.intellij.openapi.vcs.FilePath -- a:createFilePathOn(com.intellij.openapi.vfs.VirtualFile,java.lang.String):com.intellij.openapi.vcs.FilePath -- a:createFilePathOn(java.io.File):com.intellij.openapi.vcs.FilePath -- a:createFilePathOn(java.io.File,Z):com.intellij.openapi.vcs.FilePath -- a:createFilePathOnNonLocal(java.lang.String,Z):com.intellij.openapi.vcs.FilePath -- a:createLocalChangeList(com.intellij.openapi.project.Project,java.lang.String):com.intellij.openapi.vcs.changes.LocalChangeList -- s:getInstance():com.intellij.openapi.vcs.actions.VcsContextFactory -f:com.intellij.openapi.vcs.actions.VcsContextFactory$SERVICE -- s:getInstance():com.intellij.openapi.vcs.actions.VcsContextFactory com.intellij.openapi.vcs.actions.VcsQuickListContentProvider - sf:EP_NAME:com.intellij.openapi.extensions.ExtensionPointName - getNotInVcsActions(com.intellij.openapi.project.Project,com.intellij.openapi.actionSystem.AnActionEvent):java.util.List @@ -901,10 +888,6 @@ com.intellij.openapi.vcs.changes.BinaryContentRevision - com.intellij.openapi.vcs.changes.ByteBackedContentRevision - a:getBinaryContent():B[] - getContentAsBytes():B[] -com.intellij.openapi.vcs.changes.ChangeList -- a:getChanges():java.util.Collection -- a:getComment():java.lang.String -- a:getName():java.lang.String c:com.intellij.openapi.vcs.changes.ChangeListAdapter - com.intellij.openapi.vcs.changes.ChangeListListener - ():V @@ -920,17 +903,6 @@ c:com.intellij.openapi.vcs.changes.ChangeListAdapter - changesMoved(java.util.Collection,com.intellij.openapi.vcs.changes.ChangeList,com.intellij.openapi.vcs.changes.ChangeList):V - changesRemoved(java.util.Collection,com.intellij.openapi.vcs.changes.ChangeList):V - defaultListChanged(com.intellij.openapi.vcs.changes.ChangeList,com.intellij.openapi.vcs.changes.ChangeList):V -f:com.intellij.openapi.vcs.changes.ChangeListChange -- com.intellij.openapi.vcs.changes.Change -- sf:Companion:com.intellij.openapi.vcs.changes.ChangeListChange$Companion -- sf:HASHING_STRATEGY:com.intellij.util.containers.HashingStrategy -- (com.intellij.openapi.vcs.changes.Change,java.lang.String,java.lang.String):V -- (com.intellij.openapi.vcs.changes.ContentRevision,com.intellij.openapi.vcs.changes.ContentRevision,com.intellij.openapi.vcs.FileStatus,com.intellij.openapi.vcs.changes.Change,java.lang.String,java.lang.String):V -- f:getChange():com.intellij.openapi.vcs.changes.Change -- f:getChangeListId():java.lang.String -- f:getChangeListName():java.lang.String -f:com.intellij.openapi.vcs.changes.ChangeListChange$Companion -- f:replaceChangeContents(com.intellij.openapi.vcs.changes.Change,com.intellij.openapi.vcs.changes.ContentRevision,com.intellij.openapi.vcs.changes.ContentRevision):com.intellij.openapi.vcs.changes.Change com.intellij.openapi.vcs.changes.ChangeListDecorator - sf:EP_NAME:com.intellij.openapi.extensions.ProjectExtensionPointName - a:decorateChangeList(com.intellij.openapi.vcs.changes.LocalChangeList,com.intellij.ui.ColoredTreeCellRenderer,Z,Z,Z):V @@ -1085,7 +1057,6 @@ f:com.intellij.openapi.vcs.changes.ChangesUtil - s:iterateAfterRevisionFiles(java.lang.Iterable):com.intellij.util.containers.JBIterable - s:iterateFiles(java.lang.Iterable):com.intellij.util.containers.JBIterable - s:iteratePaths(java.lang.Iterable):com.intellij.util.containers.JBIterable -- s:iteratePathsCaseSensitive(com.intellij.openapi.vcs.changes.Change):com.intellij.util.containers.JBIterable - s:loadContentRevision(com.intellij.openapi.vcs.changes.ContentRevision):B[] - s:markInternalOperation(com.intellij.openapi.vfs.VirtualFile,Z):V - s:markInternalOperation(java.lang.Iterable,Z):V @@ -1172,11 +1143,6 @@ com.intellij.openapi.vcs.changes.FilePathIconProvider - sf:EP_NAME:com.intellij.openapi.extensions.ExtensionPointName - getIcon(com.intellij.openapi.vcs.FilePath,com.intellij.openapi.project.Project):javax.swing.Icon - getIcon(com.intellij.openapi.vcs.FilePath,Z,com.intellij.openapi.project.Project):javax.swing.Icon -f:com.intellij.openapi.vcs.changes.FilePathsHelper -- s:convertPath(com.intellij.openapi.vcs.FilePath):java.lang.String -- s:convertPath(java.lang.String):java.lang.String -- s:convertPath(java.lang.String,java.lang.String):java.lang.String -- s:convertWithLastSeparator(com.intellij.openapi.vcs.FilePath):java.lang.String e:com.intellij.openapi.vcs.changes.IgnoreSettingsType - java.lang.Enum - sf:FILE:com.intellij.openapi.vcs.changes.IgnoreSettingsType @@ -1223,20 +1189,6 @@ com.intellij.openapi.vcs.changes.IgnoredFileProvider - a:getIgnoredFiles(com.intellij.openapi.project.Project):java.util.Set - a:getIgnoredGroupDescription():java.lang.String - a:isIgnoredFile(com.intellij.openapi.project.Project,com.intellij.openapi.vcs.FilePath):Z -com.intellij.openapi.vcs.changes.InclusionListener -- java.util.EventListener -- a:inclusionChanged():V -com.intellij.openapi.vcs.changes.InclusionModel -- a:addInclusion(java.util.Collection):V -- a:addInclusionListener(com.intellij.openapi.vcs.changes.InclusionListener):V -- a:clearInclusion():V -- a:getInclusion():java.util.Set -- a:getInclusionState(java.lang.Object):com.intellij.util.ui.ThreeStateCheckBox$State -- a:isInclusionEmpty():Z -- a:removeInclusion(java.util.Collection):V -- a:removeInclusionListener(com.intellij.openapi.vcs.changes.InclusionListener):V -- a:retainInclusion(java.util.Collection):V -- a:setInclusion(java.util.Collection):V e:com.intellij.openapi.vcs.changes.InvokeAfterUpdateMode - java.lang.Enum - sf:BACKGROUND_CANCELLABLE:com.intellij.openapi.vcs.changes.InvokeAfterUpdateMode @@ -1251,46 +1203,12 @@ e:com.intellij.openapi.vcs.changes.InvokeAfterUpdateMode - isSynchronous():Z - s:valueOf(java.lang.String):com.intellij.openapi.vcs.changes.InvokeAfterUpdateMode - s:values():com.intellij.openapi.vcs.changes.InvokeAfterUpdateMode[] -a:com.intellij.openapi.vcs.changes.LocalChangeList -- com.intellij.openapi.vcs.changes.ChangeList -- java.lang.Cloneable -- sf:OLD_DEFAULT_NAME:java.lang.String -- ():V -- a:copy():com.intellij.openapi.vcs.changes.LocalChangeList -- s:createEmptyChangeList(com.intellij.openapi.project.Project,java.lang.String):com.intellij.openapi.vcs.changes.LocalChangeList -- s:getAllDefaultNames():java.util.List -- a:getChanges():java.util.Collection -- a:getComment():java.lang.String -- a:getData():java.lang.Object -- s:getDefaultName():java.lang.String -- getId():java.lang.String -- a:getName():java.lang.String -- hasDefaultName():Z -- isBlank():Z -- a:isDefault():Z -- a:isReadOnly():Z -- a:setComment(java.lang.String):V com.intellij.openapi.vcs.changes.LocalChangeListsLoadedListener - a:processLoadedLists(java.util.List):V a:com.intellij.openapi.vcs.changes.LocalCommitExecutor - com.intellij.ide.HelpIdProvider - com.intellij.openapi.vcs.changes.CommitExecutor - ():V -c:com.intellij.openapi.vcs.changes.LocallyDeletedChange -- (com.intellij.openapi.vcs.FilePath):V -- equals(java.lang.Object):Z -- getAddIcon():javax.swing.Icon -- getDescription():java.lang.String -- getPath():com.intellij.openapi.vcs.FilePath -- getPresentableUrl():java.lang.String -- hashCode():I -f:com.intellij.openapi.vcs.changes.LogicalLock -- (Z,java.lang.String,java.lang.String,java.util.Date,java.util.Date):V -- getComment():java.lang.String -- getCreationDate():java.util.Date -- getExpirationDate():java.util.Date -- getOwner():java.lang.String -- isIsLocal():Z f:com.intellij.openapi.vcs.changes.TextRevisionNumber - com.intellij.openapi.vcs.history.ShortVcsRevisionNumber - (java.lang.String):V diff --git a/platform/vcs-api/intellij.platform.vcs.iml b/platform/vcs-api/intellij.platform.vcs.iml index 58fc72b6b594..2cbdbbbe1a38 100644 --- a/platform/vcs-api/intellij.platform.vcs.iml +++ b/platform/vcs-api/intellij.platform.vcs.iml @@ -24,5 +24,6 @@ + \ No newline at end of file diff --git a/platform/vcs-api/resources/intellij.platform.vcs.xml b/platform/vcs-api/resources/intellij.platform.vcs.xml index 36e78c2b4c70..343cca6a1045 100644 --- a/platform/vcs-api/resources/intellij.platform.vcs.xml +++ b/platform/vcs-api/resources/intellij.platform.vcs.xml @@ -1,5 +1,6 @@ + \ No newline at end of file diff --git a/platform/vcs-api/shared/BUILD.bazel b/platform/vcs-api/shared/BUILD.bazel new file mode 100644 index 000000000000..88c2ec8da798 --- /dev/null +++ b/platform/vcs-api/shared/BUILD.bazel @@ -0,0 +1,30 @@ +### auto-generated section `build intellij.platform.vcs.shared` start +load("@rules_jvm//:jvm.bzl", "jvm_library", "jvm_resources") + +jvm_resources( + name = "shared_resources", + files = glob(["resources/**/*"]), + strip_prefix = "resources" +) + +jvm_library( + name = "shared", + module_name = "intellij.platform.vcs.shared", + visibility = ["//visibility:public"], + srcs = glob(["src/**/*.kt", "src/**/*.java"], allow_empty = True), + deps = [ + "//platform/core-api:core", + "//platform/util", + "//platform/editor-ui-api:editor-ui", + "//platform/ide-core", + "//platform/diff-api:diff", + "//platform/util/diff", + "@lib//:kotlin-stdlib", + "//platform/vcs-api/vcs-api-core:vcs-core", + "//platform/analysis-api:analysis", + "//platform/core-ui", + "//platform/util:util-ui", + ], + runtime_deps = [":shared_resources"] +) +### auto-generated section `build intellij.platform.vcs.shared` end \ No newline at end of file diff --git a/platform/vcs-api/shared/api-dump.txt b/platform/vcs-api/shared/api-dump.txt new file mode 100644 index 000000000000..3f5fad183ab8 --- /dev/null +++ b/platform/vcs-api/shared/api-dump.txt @@ -0,0 +1,76 @@ +com.intellij.openapi.vcs.actions.VcsContextFactory +- a:createFilePath(com.intellij.openapi.vfs.VirtualFile,java.lang.String,Z):com.intellij.openapi.vcs.FilePath +- a:createFilePath(java.lang.String,Z):com.intellij.openapi.vcs.FilePath +- a:createFilePath(java.nio.file.Path,Z):com.intellij.openapi.vcs.FilePath +- a:createFilePathOn(com.intellij.openapi.vfs.VirtualFile):com.intellij.openapi.vcs.FilePath +- a:createFilePathOn(com.intellij.openapi.vfs.VirtualFile,java.lang.String):com.intellij.openapi.vcs.FilePath +- a:createFilePathOn(java.io.File):com.intellij.openapi.vcs.FilePath +- a:createFilePathOn(java.io.File,Z):com.intellij.openapi.vcs.FilePath +- a:createFilePathOnNonLocal(java.lang.String,Z):com.intellij.openapi.vcs.FilePath +- a:createLocalChangeList(com.intellij.openapi.project.Project,java.lang.String):com.intellij.openapi.vcs.changes.LocalChangeList +- s:getInstance():com.intellij.openapi.vcs.actions.VcsContextFactory +f:com.intellij.openapi.vcs.actions.VcsContextFactory$SERVICE +- s:getInstance():com.intellij.openapi.vcs.actions.VcsContextFactory +com.intellij.openapi.vcs.changes.ChangeList +- a:getChanges():java.util.Collection +- a:getComment():java.lang.String +- a:getName():java.lang.String +f:com.intellij.openapi.vcs.changes.ChangeListChange +- com.intellij.openapi.vcs.changes.Change +- sf:Companion:com.intellij.openapi.vcs.changes.ChangeListChange$Companion +- sf:HASHING_STRATEGY:com.intellij.util.containers.HashingStrategy +- (com.intellij.openapi.vcs.changes.Change,java.lang.String,java.lang.String):V +- (com.intellij.openapi.vcs.changes.ContentRevision,com.intellij.openapi.vcs.changes.ContentRevision,com.intellij.openapi.vcs.FileStatus,com.intellij.openapi.vcs.changes.Change,java.lang.String,java.lang.String):V +- f:getChange():com.intellij.openapi.vcs.changes.Change +- f:getChangeListId():java.lang.String +- f:getChangeListName():java.lang.String +f:com.intellij.openapi.vcs.changes.ChangeListChange$Companion +- f:replaceChangeContents(com.intellij.openapi.vcs.changes.Change,com.intellij.openapi.vcs.changes.ContentRevision,com.intellij.openapi.vcs.changes.ContentRevision):com.intellij.openapi.vcs.changes.Change +com.intellij.openapi.vcs.changes.InclusionListener +- java.util.EventListener +- a:inclusionChanged():V +com.intellij.openapi.vcs.changes.InclusionModel +- a:addInclusion(java.util.Collection):V +- a:addInclusionListener(com.intellij.openapi.vcs.changes.InclusionListener):V +- a:clearInclusion():V +- a:getInclusion():java.util.Set +- a:getInclusionState(java.lang.Object):com.intellij.util.ui.ThreeStateCheckBox$State +- a:isInclusionEmpty():Z +- a:removeInclusion(java.util.Collection):V +- a:removeInclusionListener(com.intellij.openapi.vcs.changes.InclusionListener):V +- a:retainInclusion(java.util.Collection):V +- a:setInclusion(java.util.Collection):V +a:com.intellij.openapi.vcs.changes.LocalChangeList +- com.intellij.openapi.vcs.changes.ChangeList +- java.lang.Cloneable +- sf:OLD_DEFAULT_NAME:java.lang.String +- ():V +- a:copy():com.intellij.openapi.vcs.changes.LocalChangeList +- s:createEmptyChangeList(com.intellij.openapi.project.Project,java.lang.String):com.intellij.openapi.vcs.changes.LocalChangeList +- s:getAllDefaultNames():java.util.List +- a:getChanges():java.util.Collection +- a:getComment():java.lang.String +- a:getData():java.lang.Object +- s:getDefaultName():java.lang.String +- getId():java.lang.String +- a:getName():java.lang.String +- hasDefaultName():Z +- isBlank():Z +- a:isDefault():Z +- a:isReadOnly():Z +- a:setComment(java.lang.String):V +c:com.intellij.openapi.vcs.changes.LocallyDeletedChange +- (com.intellij.openapi.vcs.FilePath):V +- equals(java.lang.Object):Z +- getAddIcon():javax.swing.Icon +- getDescription():java.lang.String +- getPath():com.intellij.openapi.vcs.FilePath +- getPresentableUrl():java.lang.String +- hashCode():I +f:com.intellij.openapi.vcs.changes.LogicalLock +- (Z,java.lang.String,java.lang.String,java.util.Date,java.util.Date):V +- getComment():java.lang.String +- getCreationDate():java.util.Date +- getExpirationDate():java.util.Date +- getOwner():java.lang.String +- isIsLocal():Z diff --git a/platform/vcs-api/shared/intellij.platform.vcs.shared.iml b/platform/vcs-api/shared/intellij.platform.vcs.shared.iml new file mode 100644 index 000000000000..ad431a509576 --- /dev/null +++ b/platform/vcs-api/shared/intellij.platform.vcs.shared.iml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/platform/vcs-api/shared/resources/intellij.platform.vcs.shared.xml b/platform/vcs-api/shared/resources/intellij.platform.vcs.shared.xml new file mode 100644 index 000000000000..36e78c2b4c70 --- /dev/null +++ b/platform/vcs-api/shared/resources/intellij.platform.vcs.shared.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/actions/VcsContextFactory.java b/platform/vcs-api/shared/src/com/intellij/openapi/vcs/actions/VcsContextFactory.java similarity index 98% rename from platform/vcs-api/src/com/intellij/openapi/vcs/actions/VcsContextFactory.java rename to platform/vcs-api/shared/src/com/intellij/openapi/vcs/actions/VcsContextFactory.java index 888c9e8862f8..65b1ed8cc3a5 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/actions/VcsContextFactory.java +++ b/platform/vcs-api/shared/src/com/intellij/openapi/vcs/actions/VcsContextFactory.java @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.actions; import com.intellij.openapi.application.ApplicationManager; diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/ChangeList.java b/platform/vcs-api/shared/src/com/intellij/openapi/vcs/changes/ChangeList.java similarity index 68% rename from platform/vcs-api/src/com/intellij/openapi/vcs/changes/ChangeList.java rename to platform/vcs-api/shared/src/com/intellij/openapi/vcs/changes/ChangeList.java index 464104bec3fc..6a9babaf9860 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/ChangeList.java +++ b/platform/vcs-api/shared/src/com/intellij/openapi/vcs/changes/ChangeList.java @@ -1,4 +1,4 @@ -// 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. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes; import com.intellij.openapi.util.NlsSafe; diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/ChangeListChange.kt b/platform/vcs-api/shared/src/com/intellij/openapi/vcs/changes/ChangeListChange.kt similarity index 93% rename from platform/vcs-api/src/com/intellij/openapi/vcs/changes/ChangeListChange.kt rename to platform/vcs-api/shared/src/com/intellij/openapi/vcs/changes/ChangeListChange.kt index 982117be7fff..d3a0984186d2 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/ChangeListChange.kt +++ b/platform/vcs-api/shared/src/com/intellij/openapi/vcs/changes/ChangeListChange.kt @@ -1,4 +1,4 @@ -// 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. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes import com.intellij.openapi.util.NlsSafe diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/InclusionModel.kt b/platform/vcs-api/shared/src/com/intellij/openapi/vcs/changes/InclusionModel.kt similarity index 83% rename from platform/vcs-api/src/com/intellij/openapi/vcs/changes/InclusionModel.kt rename to platform/vcs-api/shared/src/com/intellij/openapi/vcs/changes/InclusionModel.kt index cb8ec769f424..3734036efa8c 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/InclusionModel.kt +++ b/platform/vcs-api/shared/src/com/intellij/openapi/vcs/changes/InclusionModel.kt @@ -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-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes import com.intellij.util.ui.ThreeStateCheckBox diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/LocalChangeList.java b/platform/vcs-api/shared/src/com/intellij/openapi/vcs/changes/LocalChangeList.java similarity index 97% rename from platform/vcs-api/src/com/intellij/openapi/vcs/changes/LocalChangeList.java rename to platform/vcs-api/shared/src/com/intellij/openapi/vcs/changes/LocalChangeList.java index 7b0c2f8248cd..0812dad880cb 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/LocalChangeList.java +++ b/platform/vcs-api/shared/src/com/intellij/openapi/vcs/changes/LocalChangeList.java @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes; import com.intellij.openapi.project.Project; diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/LocallyDeletedChange.java b/platform/vcs-api/shared/src/com/intellij/openapi/vcs/changes/LocallyDeletedChange.java similarity index 95% rename from platform/vcs-api/src/com/intellij/openapi/vcs/changes/LocallyDeletedChange.java rename to platform/vcs-api/shared/src/com/intellij/openapi/vcs/changes/LocallyDeletedChange.java index ffa0f5725d9d..c6de0056cd95 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/LocallyDeletedChange.java +++ b/platform/vcs-api/shared/src/com/intellij/openapi/vcs/changes/LocallyDeletedChange.java @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes; import com.intellij.openapi.util.NlsSafe; diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/LogicalLock.java b/platform/vcs-api/shared/src/com/intellij/openapi/vcs/changes/LogicalLock.java similarity index 93% rename from platform/vcs-api/src/com/intellij/openapi/vcs/changes/LogicalLock.java rename to platform/vcs-api/shared/src/com/intellij/openapi/vcs/changes/LogicalLock.java index 1ad6a961c053..ce13718adb5f 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/LogicalLock.java +++ b/platform/vcs-api/shared/src/com/intellij/openapi/vcs/changes/LogicalLock.java @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes; import com.intellij.openapi.util.NlsSafe; diff --git a/platform/vcs-api/shared/src/com/intellij/platform/vcs/VcsUtil.kt b/platform/vcs-api/shared/src/com/intellij/platform/vcs/VcsUtil.kt new file mode 100644 index 000000000000..b1cf963922b2 --- /dev/null +++ b/platform/vcs-api/shared/src/com/intellij/platform/vcs/VcsUtil.kt @@ -0,0 +1,13 @@ +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +package com.intellij.platform.vcs + +import com.intellij.openapi.vcs.FilePath +import com.intellij.openapi.vcs.actions.VcsContextFactory +import com.intellij.openapi.vfs.VirtualFile +import org.jetbrains.annotations.ApiStatus + +@ApiStatus.Internal +object VcsUtil { + @JvmStatic + fun getFilePath(file: VirtualFile): FilePath = VcsContextFactory.getInstance().createFilePathOn(file) +} \ No newline at end of file diff --git a/platform/vcs-api/shared/src/com/intellij/platform/vcs/changes/ChangesDataKeys.kt b/platform/vcs-api/shared/src/com/intellij/platform/vcs/changes/ChangesDataKeys.kt new file mode 100644 index 000000000000..04a4d83be503 --- /dev/null +++ b/platform/vcs-api/shared/src/com/intellij/platform/vcs/changes/ChangesDataKeys.kt @@ -0,0 +1,33 @@ +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +package com.intellij.platform.vcs.changes + +import com.intellij.openapi.ListSelection +import com.intellij.openapi.actionSystem.DataKey +import com.intellij.openapi.vcs.FilePath +import com.intellij.openapi.vcs.changes.Change +import com.intellij.openapi.vfs.VirtualFile +import org.jetbrains.annotations.ApiStatus + +@ApiStatus.Internal +object ChangesDataKeys { + @JvmField + val CHANGES: DataKey> = DataKey.create("vcs.Change") + + @JvmField + val SELECTED_CHANGES: DataKey> = DataKey.create("ChangeListView.SelectedChange") + + @JvmField + val SELECTED_CHANGES_IN_DETAILS: DataKey> = DataKey.create("ChangeListView.SelectedChangesWithMovedSubtrees") + + @JvmField + val CHANGES_SELECTION: DataKey> = DataKey.create("vcs.ChangesSelection") + + @JvmField + val CHANGE_LEAD_SELECTION: DataKey> = DataKey.create("ChangeListView.ChangeLeadSelection") + + @JvmField + val FILE_PATHS: DataKey> = DataKey.create("VCS_FILE_PATHS") + + @JvmField + val VIRTUAL_FILES: DataKey> = DataKey.create("VCS_VIRTUAL_FILES") +} diff --git a/platform/vcs-api/shared/src/com/intellij/platform/vcs/changes/ChangesUtil.kt b/platform/vcs-api/shared/src/com/intellij/platform/vcs/changes/ChangesUtil.kt new file mode 100644 index 000000000000..1c8275b23faa --- /dev/null +++ b/platform/vcs-api/shared/src/com/intellij/platform/vcs/changes/ChangesUtil.kt @@ -0,0 +1,71 @@ +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +package com.intellij.platform.vcs.changes + +import com.intellij.openapi.fileEditor.OpenFileDescriptor +import com.intellij.openapi.project.Project +import com.intellij.openapi.vcs.FilePath +import com.intellij.openapi.vcs.changes.Change +import com.intellij.openapi.vfs.VirtualFile +import com.intellij.pom.Navigatable +import com.intellij.util.containers.HashingStrategy +import com.intellij.util.containers.JBIterable +import com.intellij.util.containers.toArray +import org.jetbrains.annotations.ApiStatus +import java.util.* + +@ApiStatus.Internal +object ChangesUtil { + @JvmField + val CASE_SENSITIVE_FILE_PATH_HASHING_STRATEGY: HashingStrategy = object : HashingStrategy { + override fun hashCode(path: FilePath?): Int { + return if (path != null) Objects.hash(path.getPath(), path.isDirectory()) else 0 + } + + override fun equals(path1: FilePath?, path2: FilePath?): Boolean { + if (path1 === path2) return true + if (path1 == null || path2 == null) return false + + return path1.isDirectory() == path2.isDirectory() && path1.getPath() == path2.getPath() + } + } + + @JvmStatic + fun getFilePath(change: Change): FilePath { + val revision = change.afterRevision ?: change.beforeRevision + requireNotNull(revision) { "Change $change doesn't have before or after revisions" } + return revision.getFile() + } + + @JvmStatic + fun getAfterPath(change: Change): FilePath? = change.afterRevision?.getFile() + + @JvmStatic + fun getBeforePath(change: Change): FilePath? = change.beforeRevision?.getFile() + + @JvmStatic + fun equalsCaseSensitive(path1: FilePath?, path2: FilePath?): Boolean { + return CASE_SENSITIVE_FILE_PATH_HASHING_STRATEGY.equals(path1, path2) + } + + @JvmStatic + fun getNavigatableArray(project: Project, files: Iterable): Array { + return files.asSequence() + .filter { file -> !file.isDirectory() } + .map { file -> OpenFileDescriptor(project, file) } + .toList() + .toArray(Navigatable.EMPTY_NAVIGATABLE_ARRAY) + } + + @JvmStatic + fun iteratePathsCaseSensitive(change: Change): JBIterable { + val beforePath = getBeforePath(change) + val afterPath = getAfterPath(change) + + if (equalsCaseSensitive(beforePath, afterPath)) { + return JBIterable.of(beforePath) + } + else { + return JBIterable.of(beforePath, afterPath).filterNotNull() + } + } +} \ No newline at end of file diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/VcsDataKeys.java b/platform/vcs-api/src/com/intellij/openapi/vcs/VcsDataKeys.java index 3c478cba2f30..82580971e2b0 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/VcsDataKeys.java +++ b/platform/vcs-api/src/com/intellij/openapi/vcs/VcsDataKeys.java @@ -12,6 +12,7 @@ import com.intellij.openapi.vcs.history.VcsHistoryProvider; import com.intellij.openapi.vcs.history.VcsHistorySession; import com.intellij.openapi.vcs.history.VcsRevisionNumber; import com.intellij.openapi.vfs.VirtualFile; +import com.intellij.platform.vcs.changes.ChangesDataKeys; import com.intellij.util.Consumer; import com.intellij.vcs.commit.CommitWorkflowHandler; import com.intellij.vcs.commit.CommitWorkflowUi; @@ -33,13 +34,13 @@ public interface VcsDataKeys { DataKey VCS_VIRTUAL_FILE = DataKey.create("VCS_VIRTUAL_FILE"); DataKey FILE_PATH = DataKey.create("FILE_PATH"); - @ApiStatus.Internal DataKey> FILE_PATHS = DataKey.create("VCS_FILE_PATHS"); + @ApiStatus.Internal DataKey> FILE_PATHS = ChangesDataKeys.FILE_PATHS; /** * Lazily iterable {@link com.intellij.openapi.actionSystem.CommonDataKeys#VIRTUAL_FILE_ARRAY}. * * @see com.intellij.openapi.vcs.VcsVirtualFilesRule */ - DataKey> VIRTUAL_FILES = DataKey.create("VCS_VIRTUAL_FILES"); + DataKey> VIRTUAL_FILES = ChangesDataKeys.VIRTUAL_FILES; DataKey CHANGE_LISTS = DataKey.create("vcs.ChangeList"); /** @@ -47,15 +48,15 @@ public interface VcsDataKeys { * * @see #SELECTED_CHANGES */ - DataKey CHANGES = DataKey.create("vcs.Change"); + DataKey CHANGES = ChangesDataKeys.CHANGES; /** * Selected changes only. */ - DataKey SELECTED_CHANGES = DataKey.create("ChangeListView.SelectedChange"); + DataKey SELECTED_CHANGES = ChangesDataKeys.SELECTED_CHANGES; /** * Same as {@link #SELECTED_CHANGES}. */ - DataKey SELECTED_CHANGES_IN_DETAILS = DataKey.create("ChangeListView.SelectedChangesWithMovedSubtrees"); + DataKey SELECTED_CHANGES_IN_DETAILS = ChangesDataKeys.SELECTED_CHANGES_IN_DETAILS; /** * For multiple selection, return selected changes. * For singular selection, return all changes and set selected index. @@ -64,7 +65,7 @@ public interface VcsDataKeys { * @see com.intellij.openapi.vcs.changes.VcsChangesSelectionRule * @see com.intellij.openapi.vcs.changes.ui.VcsTreeModelData#getListSelectionOrAll */ - DataKey> CHANGES_SELECTION = DataKey.create("vcs.ChangesSelection"); + DataKey> CHANGES_SELECTION = ChangesDataKeys.CHANGES_SELECTION; /** * Explicitly selected changes. *

@@ -72,7 +73,7 @@ public interface VcsDataKeys { * This key will return selected nodes only. * This difference might be important when {@link AbstractVcs#areDirectoriesVersionedItems()} is {@code true}. */ - DataKey CHANGE_LEAD_SELECTION = DataKey.create("ChangeListView.ChangeLeadSelection"); + DataKey CHANGE_LEAD_SELECTION = ChangesDataKeys.CHANGE_LEAD_SELECTION; DataKey CURRENT_CHANGE = DataKey.create("vcs.CurrentChange"); DataKey CURRENT_UNVERSIONED = DataKey.create("ChangeListView.CurrentUnversionedFile"); diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/ChangesUtil.java b/platform/vcs-api/src/com/intellij/openapi/vcs/changes/ChangesUtil.java index 3877622cfa38..ad75410bf332 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/ChangesUtil.java +++ b/platform/vcs-api/src/com/intellij/openapi/vcs/changes/ChangesUtil.java @@ -3,7 +3,6 @@ package com.intellij.openapi.vcs.changes; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.application.ReadAction; -import com.intellij.openapi.fileEditor.OpenFileDescriptor; import com.intellij.openapi.progress.ProcessCanceledException; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Key; @@ -25,25 +24,10 @@ import org.jetbrains.annotations.Unmodifiable; import java.io.File; import java.util.*; -import static java.util.Objects.hash; - public final class ChangesUtil { private static final Key INTERNAL_OPERATION_KEY = Key.create("internal vcs operation"); - public static final HashingStrategy CASE_SENSITIVE_FILE_PATH_HASHING_STRATEGY = new HashingStrategy<>() { - @Override - public int hashCode(@Nullable FilePath path) { - return path != null ? hash(path.getPath(), path.isDirectory()) : 0; - } - - @Override - public boolean equals(@Nullable FilePath path1, @Nullable FilePath path2) { - if (path1 == path2) return true; - if (path1 == null || path2 == null) return false; - - return path1.isDirectory() == path2.isDirectory() && path1.getPath().equals(path2.getPath()); - } - }; + public static final HashingStrategy CASE_SENSITIVE_FILE_PATH_HASHING_STRATEGY = com.intellij.platform.vcs.changes.ChangesUtil.CASE_SENSITIVE_FILE_PATH_HASHING_STRATEGY; public static final Comparator CHANGELIST_COMPARATOR = Comparator.comparingInt(list -> list.isDefault() ? -1 : 0) @@ -52,23 +36,15 @@ public final class ChangesUtil { private ChangesUtil() { } public static @NotNull FilePath getFilePath(@NotNull Change change) { - ContentRevision revision = change.getAfterRevision(); - if (revision == null) { - revision = change.getBeforeRevision(); - assert revision != null; - } - - return revision.getFile(); + return com.intellij.platform.vcs.changes.ChangesUtil.getFilePath(change); } public static @Nullable FilePath getBeforePath(@NotNull Change change) { - ContentRevision revision = change.getBeforeRevision(); - return revision == null ? null : revision.getFile(); + return com.intellij.platform.vcs.changes.ChangesUtil.getBeforePath(change); } public static @Nullable FilePath getAfterPath(@NotNull Change change) { - ContentRevision revision = change.getAfterRevision(); - return revision == null ? null : revision.getFile(); + return com.intellij.platform.vcs.changes.ChangesUtil.getAfterPath(change); } public static @Nullable AbstractVcs getVcsForChange(@NotNull Change change, @NotNull Project project) { @@ -127,23 +103,11 @@ public final class ChangesUtil { } public static @NotNull JBIterable iteratePaths(@NotNull Iterable changes) { - return JBIterable.from(changes).flatMap(ChangesUtil::iteratePathsCaseSensitive); + return JBIterable.from(changes).flatMap(com.intellij.platform.vcs.changes.ChangesUtil::iteratePathsCaseSensitive); } public static boolean equalsCaseSensitive(@Nullable FilePath path1, @Nullable FilePath path2) { - return CASE_SENSITIVE_FILE_PATH_HASHING_STRATEGY.equals(path1, path2); - } - - public static @NotNull JBIterable iteratePathsCaseSensitive(@NotNull Change change) { - FilePath beforePath = getBeforePath(change); - FilePath afterPath = getAfterPath(change); - - if (equalsCaseSensitive(beforePath, afterPath)) { - return JBIterable.of(beforePath); - } - else { - return JBIterable.of(beforePath, afterPath).filterNotNull(); - } + return com.intellij.platform.vcs.changes.ChangesUtil.equalsCaseSensitive(path1, path2); } public static @NotNull JBIterable iterateFiles(@NotNull Iterable changes) { @@ -165,11 +129,7 @@ public final class ChangesUtil { } public static Navigatable @NotNull [] getNavigatableArray(@NotNull Project project, @NotNull Iterable files) { - return JBIterable.from(files) - .filter(file -> !file.isDirectory()) - .map(file -> new OpenFileDescriptor(project, file)) - .toList() - .toArray(Navigatable.EMPTY_NAVIGATABLE_ARRAY); + return com.intellij.platform.vcs.changes.ChangesUtil.getNavigatableArray(project, files); } public static @Nullable LocalChangeList getChangeListIfOnlyOne(@NotNull Project project, Change @Nullable [] changes) { diff --git a/platform/vcs-impl/api-dump.txt b/platform/vcs-impl/api-dump.txt index 0b06a82d3f94..2604d8967aa9 100644 --- a/platform/vcs-impl/api-dump.txt +++ b/platform/vcs-impl/api-dump.txt @@ -1709,10 +1709,6 @@ f:com.intellij.openapi.vcs.changes.issueLinks.IssueLinkHtmlRenderer - s:formatTextIntoHtml(com.intellij.openapi.project.Project,java.lang.String):java.lang.String - s:formatTextWithLinks(com.intellij.openapi.project.Project,java.lang.String):java.lang.String - s:formatTextWithLinks(com.intellij.openapi.project.Project,java.lang.String,com.intellij.util.containers.Convertor):java.lang.String -c:com.intellij.openapi.vcs.changes.issueLinks.IssueLinkRenderer -- (com.intellij.openapi.project.Project,com.intellij.ui.SimpleColoredComponent):V -- appendTextWithLinks(java.lang.String):java.util.List -- appendTextWithLinks(java.lang.String,com.intellij.ui.SimpleTextAttributes):java.util.List c:com.intellij.openapi.vcs.changes.issueLinks.TableLinkMouseListener - com.intellij.openapi.vcs.changes.issueLinks.AbstractBaseTagMouseListener - ():V @@ -2153,29 +2149,6 @@ c:com.intellij.openapi.vcs.changes.shelf.UnshelveWithDialogAction - actionPerformed(com.intellij.openapi.actionSystem.AnActionEvent):V - getActionUpdateThread():com.intellij.openapi.actionSystem.ActionUpdateThread - update(com.intellij.openapi.actionSystem.AnActionEvent):V -a:com.intellij.openapi.vcs.changes.ui.AbstractChangesBrowserFilePathNode -- com.intellij.ide.util.treeView.PathElementIdProvider -- com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -- sf:Companion:com.intellij.openapi.vcs.changes.ui.AbstractChangesBrowserFilePathNode$Companion -- (java.lang.Object,com.intellij.openapi.vcs.FileStatus):V -- compareUserObjects(java.lang.Object):I -- pa:filePath(java.lang.Object):com.intellij.openapi.vcs.FilePath -- getBackgroundColor(com.intellij.openapi.project.Project):java.awt.Color -- getFlattenedElements():java.util.List -- f:getOriginText():java.lang.String -- getPathElementId():java.lang.String -- f:getRelativeFilePath(com.intellij.openapi.project.Project,com.intellij.openapi.vcs.FilePath):java.lang.String -- p:getRelativePath(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,com.intellij.openapi.vcs.FilePath):java.lang.String -- getSortWeight():I -- f:getStatus():com.intellij.openapi.vcs.FileStatus -- getTextPresentation():java.lang.String -- p:isDirectory():Z -- p:isFile():Z -- p:originPath(java.lang.Object):com.intellij.openapi.vcs.FilePath -- render(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,Z,Z,Z):V -- sf:safeCastToFilePath(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):com.intellij.openapi.vcs.FilePath -f:com.intellij.openapi.vcs.changes.ui.AbstractChangesBrowserFilePathNode$Companion -- f:safeCastToFilePath(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):com.intellij.openapi.vcs.FilePath a:com.intellij.openapi.vcs.changes.ui.AsyncChangesBrowserBase - com.intellij.openapi.vcs.changes.ui.ChangesBrowserBase - (com.intellij.openapi.project.Project,Z,Z):V @@ -2235,25 +2208,6 @@ c:com.intellij.openapi.vcs.changes.ui.AsyncChangesTreeImpl$VirtualFiles - p:buildTreeModel(com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicyFactory,java.util.List):javax.swing.tree.DefaultTreeModel com.intellij.openapi.vcs.changes.ui.AsyncChangesTreeModel - a:buildTreeModel(com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicyFactory,kotlin.coroutines.Continuation):java.lang.Object -a:com.intellij.openapi.vcs.changes.ui.BaseChangesGroupingPolicy -- com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicy -- sf:Companion:com.intellij.openapi.vcs.changes.ui.BaseChangesGroupingPolicy$Companion -- ():V -- sf:getCachingRoot(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode,com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -- pf:getNextPolicy():com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicy -- sf:markCachingRoot(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):V -- pf:resolveVirtualFile(com.intellij.openapi.vcs.changes.ui.StaticFilePath):com.intellij.openapi.vfs.VirtualFile -- f:setNextGroupingPolicy(com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicy):V -- pf:setNextPolicy(com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicy):V -f:com.intellij.openapi.vcs.changes.ui.BaseChangesGroupingPolicy$Companion -- f:getCachingRoot(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode,com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -- f:markCachingRoot(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):V -a:com.intellij.openapi.vcs.changes.ui.BaseInclusionModel -- com.intellij.openapi.vcs.changes.InclusionModel -- ():V -- addInclusionListener(com.intellij.openapi.vcs.changes.InclusionListener):V -- pf:fireInclusionChanged():V -- removeInclusionListener(com.intellij.openapi.vcs.changes.InclusionListener):V c:com.intellij.openapi.vcs.changes.ui.BooleanCommitOption - com.intellij.openapi.options.UiDslUnnamedConfigurable$Simple - com.intellij.openapi.vcs.ui.RefreshableOnComponent @@ -2347,9 +2301,6 @@ f:com.intellij.openapi.vcs.changes.ui.ChangeListViewerDialog - s:show(com.intellij.openapi.project.Project,java.lang.String,com.intellij.openapi.vcs.changes.ui.LoadingCommittedChangeListPanel,com.intellij.openapi.vcs.impl.BackgroundableActionLock,Z):V - s:showDialog(com.intellij.openapi.project.Project,java.lang.String,com.intellij.openapi.vcs.changes.ui.LoadingCommittedChangeListPanel):V - s:tryFocusExistingDialog(com.intellij.openapi.vcs.impl.BackgroundableActionLock):Z -com.intellij.openapi.vcs.changes.ui.ChangeNodeDecorator -- a:decorate(com.intellij.openapi.vcs.changes.Change,com.intellij.ui.SimpleColoredComponent,Z):V -- a:preDecorate(com.intellij.openapi.vcs.changes.Change,com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,Z):V a:com.intellij.openapi.vcs.changes.ui.ChangesBrowserBase - javax.swing.JPanel - com.intellij.openapi.actionSystem.UiCompatibleDataProvider @@ -2408,32 +2359,6 @@ c:com.intellij.openapi.vcs.changes.ui.ChangesBrowserChangeListNode - getSortWeight():I - getTextPresentation():java.lang.String - render(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,Z,Z,Z):V -c:com.intellij.openapi.vcs.changes.ui.ChangesBrowserChangeNode -- com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -- com.intellij.openapi.vcs.changes.issueLinks.TreeLinkMouseListener$HaveTooltip -- p:(com.intellij.openapi.project.Project,com.intellij.openapi.vcs.changes.Change,com.intellij.openapi.vcs.changes.ui.ChangeNodeDecorator):V -- compareUserObjects(com.intellij.openapi.vcs.changes.Change):I -- getSortWeight():I -- getTextPresentation():java.lang.String -- getTooltip():java.lang.String -- p:isDirectory():Z -- p:isFile():Z -- render(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,Z,Z,Z):V -c:com.intellij.openapi.vcs.changes.ui.ChangesBrowserFileNode -- com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -- java.lang.Comparable -- (com.intellij.openapi.project.Project,com.intellij.openapi.vfs.VirtualFile):V -- compareTo(com.intellij.openapi.vcs.changes.ui.ChangesBrowserFileNode):I -- getSortWeight():I -- getTextPresentation():java.lang.String -- p:isDirectory():Z -- p:isFile():Z -- render(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,Z,Z,Z):V -c:com.intellij.openapi.vcs.changes.ui.ChangesBrowserFilePathNode -- com.intellij.openapi.vcs.changes.ui.AbstractChangesBrowserFilePathNode -- (com.intellij.openapi.vcs.FilePath):V -- (com.intellij.openapi.vcs.FilePath,com.intellij.openapi.vcs.FileStatus):V -- p:filePath(com.intellij.openapi.vcs.FilePath):com.intellij.openapi.vcs.FilePath c:com.intellij.openapi.vcs.changes.ui.ChangesBrowserModuleNode - com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode - com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$NodeWithFilePath @@ -2444,187 +2369,6 @@ c:com.intellij.openapi.vcs.changes.ui.ChangesBrowserModuleNode - getSortWeight():I - getTextPresentation():java.lang.String - render(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,Z,Z,Z):V -a:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -- javax.swing.tree.DefaultMutableTreeNode -- com.intellij.openapi.util.UserDataHolderEx -- psf:CHANGE_LIST_SORT_WEIGHT:I -- psf:CHANGE_SORT_WEIGHT:I -- psf:CONFLICTS_SORT_WEIGHT:I -- psf:DEFAULT_CHANGE_LIST_SORT_WEIGHT:I -- psf:DEFAULT_SORT_WEIGHT:I -- psf:DELETED_SORT_WEIGHT:I -- psf:DIRECTORY_PATH_SORT_WEIGHT:I -- psf:FILE_PATH_SORT_WEIGHT:I -- sf:IGNORED_FILES_TAG:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag -- psf:IGNORED_SORT_WEIGHT:I -- sf:LOCALLY_DELETED_NODE_TAG:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag -- sf:LOCKED_FOLDERS_TAG:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag -- sf:LOGICALLY_LOCKED_TAG:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag -- sf:MODIFIED_WITHOUT_EDITING_TAG:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag -- psf:MODULE_SORT_WEIGHT:I -- psf:REPOSITORY_SORT_WEIGHT:I -- psf:RESOLVED_CONFLICTS_SORT_WEIGHT:I -- sf:SWITCHED_FILES_TAG:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag -- sf:SWITCHED_ROOTS_TAG:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag -- sf:TO_TEXT_CONVERTER:com.intellij.util.containers.Convertor -- sf:UNVERSIONED_FILES_TAG:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag -- psf:UNVERSIONED_SORT_WEIGHT:I -- psf:VIRTUAL_FILE_SORT_WEIGHT:I -- p:(java.lang.Object):V -- p:appendCount(com.intellij.ui.ColoredTreeCellRenderer):V -- p:appendParentPath(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,com.intellij.openapi.vcs.FilePath):V -- p:appendParentPath(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,com.intellij.openapi.vfs.VirtualFile):V -- p:appendUpdatingState(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer):V -- ps:compareFileNames(java.lang.String,java.lang.String):I -- s:compareFilePaths(com.intellij.openapi.vcs.FilePath,com.intellij.openapi.vcs.FilePath):I -- compareUserObjects(java.lang.Object):I -- s:createChange(com.intellij.openapi.project.Project,com.intellij.openapi.vcs.changes.Change):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -- s:createFile(com.intellij.openapi.project.Project,com.intellij.openapi.vfs.VirtualFile):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -- s:createFilePath(com.intellij.openapi.vcs.FilePath):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -- s:createFilePath(com.intellij.openapi.vcs.FilePath,com.intellij.openapi.vcs.FileStatus):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -- s:createLocallyDeleted(com.intellij.openapi.vcs.changes.LocallyDeletedChange):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -- s:createLockedFolders(com.intellij.openapi.project.Project):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -- s:createLogicallyLocked(com.intellij.openapi.project.Project,com.intellij.openapi.vfs.VirtualFile,com.intellij.openapi.vcs.changes.LogicalLock):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -- s:createRoot():com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -- getAllChangesUnder():java.util.List -- getAllObjectsUnder(java.lang.Class):java.util.List -- getBackgroundColor(com.intellij.openapi.project.Project):java.awt.Color -- ps:getBackgroundColorFor(com.intellij.openapi.project.Project,java.lang.Object):java.awt.Color -- p:getCountText():java.lang.String -- getDirectoryCount():I -- getFileCount():I -- getParent():com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -- getSortWeight():I -- getTextPresentation():java.lang.String -- getUserData(com.intellij.openapi.util.Key):java.lang.Object -- getUserObject():java.lang.Object -- insert(javax.swing.tree.MutableTreeNode,I):V -- p:isDirectory():Z -- p:isFile():Z -- isMeaningfulNode():Z -- iterateFilePathsUnder():com.intellij.util.containers.JBIterable -- iterateFilesUnder():com.intellij.util.containers.JBIterable -- iterateNodeChildren():com.intellij.util.containers.JBIterable -- f:markAsHelperNode():V -- putUserData(com.intellij.openapi.util.Key,java.lang.Object):V -- putUserDataIfAbsent(com.intellij.openapi.util.Key,java.lang.Object):java.lang.Object -- remove(I):V -- render(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,Z,Z,Z):V -- render(javax.swing.JTree,com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,Z,Z,Z):V -- replace(com.intellij.openapi.util.Key,java.lang.Object,java.lang.Object):Z -- p:resetCounters():V -- setUserObject(java.lang.Object):V -- shouldExpandByDefault():Z -- traverse():com.intellij.util.containers.JBIterable -- traverseObjectsUnder():com.intellij.util.containers.JBIterable -com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$NodeWithFilePath -- a:getNodeFilePath():com.intellij.openapi.vcs.FilePath -com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag -- a:toString():java.lang.String -c:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$TagImpl -- com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag -- (java.lang.String):V -a:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$ValueTag -- com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag -- f:value:java.lang.Object -- (java.lang.Object):V -- f:equals(java.lang.Object):Z -- p:getValue():java.lang.Object -- f:hashCode():I -c:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$VcsBundleTag -- com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag -- (java.lang.String):V -c:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$WrapperTag -- com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$ValueTag -- s:wrap(java.lang.Object):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag -c:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer -- com.intellij.ui.ColoredTreeCellRenderer -- (com.intellij.openapi.project.Project,com.intellij.openapi.util.BooleanGetter,Z):V -- appendFileName(com.intellij.openapi.vfs.VirtualFile,java.lang.String,java.awt.Color):V -- appendTextWithIssueLinks(java.lang.String,com.intellij.ui.SimpleTextAttributes):V -- clear():V -- customizeCellRenderer(javax.swing.JTree,java.lang.Object,Z,Z,Z,I,Z):V -- p:doPaintFragmentBackground(java.awt.Graphics2D,I,java.awt.Color,I,I,I,I):V -- getProject():com.intellij.openapi.project.Project -- isShowFlatten():Z -- isShowingLocalChanges():Z -- setBackgroundInsets(com.intellij.util.ui.JBInsets):V -- setIcon(com.intellij.openapi.vcs.FilePath,Z):V -c:com.intellij.openapi.vcs.changes.ui.ChangesBrowserSpecificFilePathsNode -- com.intellij.openapi.vcs.changes.ui.ChangesBrowserSpecificNode -- p:(java.lang.Object,java.util.Collection,java.lang.Runnable):V -c:com.intellij.openapi.vcs.changes.ui.ChangesBrowserSpecificFilesNode -- com.intellij.openapi.vcs.changes.ui.ChangesBrowserSpecificNode -- p:(java.lang.Object,java.util.Collection,java.lang.Runnable):V -a:com.intellij.openapi.vcs.changes.ui.ChangesBrowserSpecificNode -- com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -- pf:myDialogShower:java.lang.Runnable -- pf:myIsMany:Z -- p:(java.lang.Object,java.util.Collection,I,java.lang.Runnable):V -- getDirectoryCount():I -- getFileCount():I -- isManyFiles():Z -- s:isManyFiles(java.util.Collection):Z -- render(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,Z,Z,Z):V -- f:setAttributes(com.intellij.ui.SimpleTextAttributes):V -c:com.intellij.openapi.vcs.changes.ui.ChangesBrowserStringNode -- com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -- (java.lang.String):V -- (java.lang.String,com.intellij.ui.SimpleTextAttributes):V -- getTextPresentation():java.lang.String -- render(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,Z,Z,Z):V -f:com.intellij.openapi.vcs.changes.ui.ChangesBrowserUnversionedFilesNode -- com.intellij.openapi.vcs.changes.ui.ChangesBrowserSpecificFilePathsNode -- (com.intellij.openapi.project.Project,java.util.List):V -- getSortWeight():I -- getTextPresentation():java.lang.String -- render(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,Z,Z,Z):V -com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicy -- getParentNodeFor(com.intellij.openapi.vcs.changes.ui.StaticFilePath,com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -- getParentNodeFor(com.intellij.openapi.vcs.changes.ui.StaticFilePath,com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode,com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -- setNextGroupingPolicy(com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicy):V -c:com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicy$CompatibilityPlaceholderChangesBrowserNode -- com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -- render(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,Z,Z,Z):V -a:com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicyFactory -- sf:EP_NAME:com.intellij.openapi.extensions.ExtensionPointName -- ():V -- a:createGroupingPolicy(com.intellij.openapi.project.Project,javax.swing.tree.DefaultTreeModel):com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicy -f:com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicyFactoryEPBean -- com.intellij.serviceContainer.BaseKeyedLazyInstance -- implementationClass:java.lang.String -- key:java.lang.String -- weight:I -c:com.intellij.openapi.vcs.changes.ui.ChangesGroupingSupport -- sf:Companion:com.intellij.openapi.vcs.changes.ui.ChangesGroupingSupport$Companion -- sf:DIRECTORY_GROUPING:java.lang.String -- sf:KEY:com.intellij.openapi.actionSystem.DataKey -- sf:MODULE_GROUPING:java.lang.String -- sf:NONE_GROUPING:java.lang.String -- sf:PROP_GROUPING_KEYS:java.lang.String -- sf:REPOSITORY_GROUPING:java.lang.String -- (com.intellij.openapi.project.Project,java.lang.Object,Z):V -- f:addPropertyChangeListener(java.beans.PropertyChangeListener):V -- sf:findFactory(java.lang.String):com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicyFactory -- f:get(java.lang.String):Z -- sf:getFactory(java.lang.String):com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicyFactory -- f:getGrouping():com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicyFactory -- f:getGroupingKeys():java.util.Set -- f:getProject():com.intellij.openapi.project.Project -- f:getShowConflictsNode():Z -- isAvailable(java.lang.String):Z -- f:isDirectory():Z -- f:isNone():Z -- f:removePropertyChangeListener(java.beans.PropertyChangeListener):V -- f:set(java.lang.String,Z):V -- f:setGroupingKeysOrSkip(java.util.Collection):V -f:com.intellij.openapi.vcs.changes.ui.ChangesGroupingSupport$Companion -- f:findFactory(java.lang.String):com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicyFactory -- f:getFactory(java.lang.String):com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicyFactory -f:com.intellij.openapi.vcs.changes.ui.ChangesGroupingSupport$Disabled -- com.intellij.openapi.vcs.changes.ui.ChangesGroupingSupport -- (com.intellij.openapi.project.Project,java.lang.Object):V -- isAvailable(java.lang.String):Z a:com.intellij.openapi.vcs.changes.ui.ChangesListView - com.intellij.openapi.vcs.changes.ui.ChangesTree - com.intellij.ide.dnd.DnDAware @@ -2664,105 +2408,6 @@ a:com.intellij.openapi.vcs.changes.ui.ChangesListView - setPaintBusy(Z):V - s:toHijackedChange(com.intellij.openapi.project.Project,com.intellij.openapi.vfs.VirtualFile):com.intellij.openapi.vcs.changes.Change - uiDataSnapshot(com.intellij.openapi.actionSystem.DataSink):V -a:com.intellij.openapi.vcs.changes.ui.ChangesTree -- com.intellij.ui.treeStructure.Tree -- com.intellij.openapi.actionSystem.UiCompatibleDataProvider -- sf:ALWAYS_KEEP:com.intellij.openapi.vcs.changes.ui.ChangesTree$TreeStateStrategy -- sf:ALWAYS_RESET:com.intellij.openapi.vcs.changes.ui.ChangesTree$TreeStateStrategy -- sf:DEFAULT_GROUPING_KEYS:java.util.List -- sf:DO_NOTHING:com.intellij.openapi.vcs.changes.ui.ChangesTree$TreeStateStrategy -- sf:EXPAND_NODES_THRESHOLD:I -- psf:GROUPING_KEYS:java.lang.String -- sf:GROUP_BY_ACTION_GROUP:java.lang.String -- sf:KEEP_NON_EMPTY:com.intellij.openapi.vcs.changes.ui.ChangesTree$TreeStateStrategy -- sf:KEEP_SELECTED_OBJECTS:com.intellij.openapi.vcs.changes.ui.ChangesTree$TreeStateStrategy -- pf:myProject:com.intellij.openapi.project.Project -- pf:myShowConflictsNode:Z -- (com.intellij.openapi.project.Project,Z,Z):V -- p:(com.intellij.openapi.project.Project,Z,Z,Z,Z):V -- addGroupingChangeListener(java.beans.PropertyChangeListener):V -- addSelectionListener(java.lang.Runnable):V -- addSelectionListener(java.lang.Runnable,com.intellij.openapi.Disposable):V -- createCollapseAllAction(Z):com.intellij.openapi.actionSystem.AnAction -- createExpandAllAction(Z):com.intellij.openapi.actionSystem.AnAction -- excludeChange(java.lang.Object):V -- excludeChanges(java.util.Collection):V -- expandAll():V -- expandDefaults():V -- getDoubleClickHandler():com.intellij.util.Processor -- getEnterKeyHandler():com.intellij.util.Processor -- getFileColorForPath(javax.swing.tree.TreePath):java.awt.Color -- getGrouping():com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicyFactory -- getGroupingSupport():com.intellij.openapi.vcs.changes.ui.ChangesGroupingSupport -- p:getIncludableUserObjects(com.intellij.openapi.vcs.changes.ui.VcsTreeModelData):java.util.List -- getIncludedSet():java.util.Set -- getInclusionModel():com.intellij.openapi.vcs.changes.InclusionModel -- p:getNodeStatus(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):com.intellij.util.ui.ThreeStateCheckBox$State -- getPreferredFocusedComponent():javax.swing.JComponent -- getProject():com.intellij.openapi.project.Project -- getRoot():com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -- getToggleClickCount():I -- getTreeExpander():com.intellij.ide.TreeExpander -- getTreeStateStrategy():com.intellij.openapi.vcs.changes.ui.ChangesTree$TreeStateStrategy -- includeChange(java.lang.Object):V -- includeChanges(java.util.Collection):V -- p:installGroupingSupport():com.intellij.openapi.vcs.changes.ui.ChangesGroupingSupport -- s:installGroupingSupport(com.intellij.openapi.vcs.changes.ui.ChangesGroupingSupport,java.util.function.Supplier,java.util.function.Consumer,java.lang.Runnable):V -- ps:installGroupingSupport(com.intellij.openapi.vcs.changes.ui.ChangesTree,com.intellij.openapi.vcs.changes.ui.ChangesGroupingSupport,java.lang.String,java.util.List):V -- ps:installGroupingSupport(com.intellij.openapi.vcs.changes.ui.ChangesTree,com.intellij.openapi.vcs.changes.ui.ChangesGroupingSupport,java.util.function.Supplier,java.util.function.Consumer):V -- installPopupHandler(com.intellij.openapi.actionSystem.ActionGroup):V -- p:installTreeLinkHandler(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer):V -- isFileColorsEnabled():Z -- isHighlightProblems():Z -- p:isIncludable(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):Z -- isIncluded(java.lang.Object):Z -- p:isInclusionEnabled(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):Z -- p:isInclusionVisible(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):Z -- isKeepTreeState():Z -- isModelUpdateInProgress():Z -- isScrollToSelection():Z -- isShowCheckboxes():Z -- isShowFlatten():Z -- onGroupingChanged():V -- p:processEvent(java.awt.AWTEvent):V -- a:rebuildTree():V -- rebuildTree(com.intellij.openapi.vcs.changes.ui.ChangesTree$TreeStateStrategy):V -- removeGroupingChangeListener(java.beans.PropertyChangeListener):V -- resetTreeState():V -- selectFile(com.intellij.openapi.vcs.FilePath):V -- selectFile(com.intellij.openapi.vfs.VirtualFile):V -- setDoubleClickAndEnterKeyHandler(java.lang.Runnable):V -- setDoubleClickHandler(com.intellij.util.Processor):V -- setEmptyText(java.lang.String):V -- setEnterKeyHandler(com.intellij.util.Processor):V -- setIncludedChanges(java.util.Collection):V -- setInclusionListener(java.lang.Runnable):V -- setInclusionModel(com.intellij.openapi.vcs.changes.InclusionModel):V -- setKeepTreeState(Z):V -- setScrollToSelection(Z):V -- setSelectedChanges(java.util.Collection):V -- setSelectionMode(I):V -- setShowCheckboxes(Z):V -- setTreeExpander(com.intellij.ide.TreeExpander):V -- setTreeStateStrategy(com.intellij.openapi.vcs.changes.ui.ChangesTree$TreeStateStrategy):V -- setUI(javax.swing.plaf.TreeUI):V -- p:toggleChanges(java.util.Collection):Z -- uiDataSnapshot(com.intellij.openapi.actionSystem.DataSink):V -- p:updateTreeModel(javax.swing.tree.DefaultTreeModel):V -- p:updateTreeModel(javax.swing.tree.DefaultTreeModel,com.intellij.openapi.vcs.changes.ui.ChangesTree$TreeStateStrategy):V -com.intellij.openapi.vcs.changes.ui.ChangesTree$TreeStateStrategy -- a:restoreState(com.intellij.openapi.vcs.changes.ui.ChangesTree,java.lang.Object,Z):V -- a:saveState(com.intellij.openapi.vcs.changes.ui.ChangesTree):java.lang.Object -c:com.intellij.openapi.vcs.changes.ui.ChangesTreeCellRenderer -- com.intellij.ui.CellRendererPanel -- javax.swing.tree.TreeCellRenderer -- (com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer):V -- getAccessibleContext():javax.accessibility.AccessibleContext -- getPreferredSize():java.awt.Dimension -- pf:getTextRenderer():com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer -- getToolTipText():java.lang.String -- getTreeCellRendererComponent(javax.swing.JTree,java.lang.Object,Z,Z,Z,I,Z):java.awt.Component -- pf:paintComponent(java.awt.Graphics):V a:com.intellij.openapi.vcs.changes.ui.ChangesTreeDiffPreviewHandler - ():V - f:collectDiffProducers(com.intellij.openapi.vcs.changes.ui.ChangesTree,Z):com.intellij.openapi.ListSelection @@ -2899,10 +2544,6 @@ com.intellij.openapi.vcs.changes.ui.ChangesViewContentProvider - initTabContent(com.intellij.ui.content.Content):V com.intellij.openapi.vcs.changes.ui.ChangesViewContentProvider$Preloader - preloadTabContent(com.intellij.ui.content.Content):V -com.intellij.openapi.vcs.changes.ui.ChangesViewModelBuilder -- a:insertChanges(java.util.Collection,com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):V -- a:insertFilesIntoNode(java.util.Collection,com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):V -- a:insertSubtreeRoot(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):com.intellij.openapi.vcs.changes.ui.ChangesViewModelBuilder a:com.intellij.openapi.vcs.changes.ui.CommitChangeListDialog - com.intellij.openapi.ui.DialogWrapper - com.intellij.openapi.ui.ComponentContainer @@ -3022,19 +2663,6 @@ f:com.intellij.openapi.vcs.changes.ui.DefaultCommitChangeListDialog - addChangeListListener(com.intellij.vcs.commit.SingleChangeListCommitWorkflowUi$ChangeListListener,com.intellij.openapi.Disposable):V - getBrowser():com.intellij.openapi.vcs.changes.ui.CommitDialogChangesBrowser - f:getWorkflow():com.intellij.vcs.commit.SingleChangeListCommitWorkflow -f:com.intellij.openapi.vcs.changes.ui.DefaultInclusionModel -- com.intellij.openapi.vcs.changes.ui.BaseInclusionModel -- ():V -- (com.intellij.util.containers.HashingStrategy):V -- b:(com.intellij.util.containers.HashingStrategy,I,kotlin.jvm.internal.DefaultConstructorMarker):V -- addInclusion(java.util.Collection):V -- clearInclusion():V -- getInclusion():java.util.Set -- getInclusionState(java.lang.Object):com.intellij.util.ui.ThreeStateCheckBox$State -- isInclusionEmpty():Z -- removeInclusion(java.util.Collection):V -- retainInclusion(java.util.Collection):V -- setInclusion(java.util.Collection):V com.intellij.openapi.vcs.changes.ui.EditChangelistSupport - sf:EP_NAME:com.intellij.openapi.extensions.ExtensionPointName - a:addControls(javax.swing.JPanel,com.intellij.openapi.vcs.changes.LocalChangeList):com.intellij.util.Consumer @@ -3073,10 +2701,6 @@ c:com.intellij.openapi.vcs.changes.ui.LoadingCommittedChangeListPanel$Changelist - f:changeList:com.intellij.openapi.vcs.versionBrowser.CommittedChangeList - f:toSelect:com.intellij.openapi.vcs.FilePath - (com.intellij.openapi.vcs.versionBrowser.CommittedChangeList,com.intellij.openapi.vcs.FilePath):V -f:com.intellij.openapi.vcs.changes.ui.NoneChangesGroupingFactory -- com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicyFactory -- sf:INSTANCE:com.intellij.openapi.vcs.changes.ui.NoneChangesGroupingFactory -- createGroupingPolicy(com.intellij.openapi.project.Project,javax.swing.tree.DefaultTreeModel):com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicy com.intellij.openapi.vcs.changes.ui.PresentableChange - a:getFilePath():com.intellij.openapi.vcs.FilePath - a:getFileStatus():com.intellij.openapi.vcs.FileStatus @@ -3168,15 +2792,6 @@ c:com.intellij.openapi.vcs.changes.ui.SimpleChangesBrowser - setChangeNodeDecorator(com.intellij.openapi.vcs.changes.ui.ChangeNodeDecorator):V - setChangesToDisplay(java.util.Collection):V - setIncludedChanges(java.util.Collection):V -a:com.intellij.openapi.vcs.changes.ui.SimpleChangesGroupingPolicy -- com.intellij.openapi.vcs.changes.ui.BaseChangesGroupingPolicy -- sf:Companion:com.intellij.openapi.vcs.changes.ui.SimpleChangesGroupingPolicy$Companion -- (javax.swing.tree.DefaultTreeModel):V -- pa:createGroupRootNode(java.lang.Object):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -- pa:getGroupRootValueFor(com.intellij.openapi.vcs.changes.ui.StaticFilePath,com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):java.lang.Object -- f:getModel():javax.swing.tree.DefaultTreeModel -- f:getParentNodeFor(com.intellij.openapi.vcs.changes.ui.StaticFilePath,com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode,com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -f:com.intellij.openapi.vcs.changes.ui.SimpleChangesGroupingPolicy$Companion f:com.intellij.openapi.vcs.changes.ui.SimpleTreeDiffRequestProcessor - com.intellij.openapi.vcs.changes.ui.TreeHandlerDiffRequestProcessor - (com.intellij.openapi.project.Project,java.lang.String,com.intellij.openapi.vcs.changes.ui.ChangesTree,com.intellij.openapi.Disposable):V @@ -3188,21 +2803,6 @@ a:com.intellij.openapi.vcs.changes.ui.SimpleTreeEditorDiffPreview - p:hasContent():Z - returnFocusToTree():V - updateDiffAction(com.intellij.openapi.actionSystem.AnActionEvent):V -c:com.intellij.openapi.vcs.changes.ui.StaticFilePath -- (com.intellij.openapi.vcs.FilePath):V -- getFilePath():com.intellij.openapi.vcs.FilePath -- getKey():java.lang.String -- getParent():com.intellij.openapi.vcs.changes.ui.StaticFilePath -- getPath():java.lang.String -- getVf():com.intellij.openapi.vfs.VirtualFile -- isDirectory():Z -- resolve():com.intellij.openapi.vfs.VirtualFile -c:com.intellij.openapi.vcs.changes.ui.TagChangesBrowserNode -- com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -- (com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag,com.intellij.ui.SimpleTextAttributes,Z):V -- getTextPresentation():java.lang.String -- render(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,Z,Z,Z):V -- shouldExpandByDefault():Z c:com.intellij.openapi.vcs.changes.ui.TreeActionsToolbarPanel - javax.swing.JPanel - (com.intellij.openapi.actionSystem.ActionToolbar,com.intellij.openapi.actionSystem.ActionGroup,javax.swing.JComponent):V @@ -3316,37 +2916,6 @@ a:com.intellij.openapi.vcs.changes.ui.VcsToolWindowFactory - p:setEmptyState(com.intellij.openapi.project.Project,com.intellij.util.ui.StatusText):V - f:shouldBeAvailable(com.intellij.openapi.project.Project):Z - p:updateState(com.intellij.openapi.wm.ToolWindow):V -a:com.intellij.openapi.vcs.changes.ui.VcsTreeModelData -- ():V -- s:all(javax.swing.JTree):com.intellij.openapi.vcs.changes.ui.VcsTreeModelData -- s:all(javax.swing.tree.TreeModel):com.intellij.openapi.vcs.changes.ui.VcsTreeModelData -- s:allUnder(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):com.intellij.openapi.vcs.changes.ui.VcsTreeModelData -- s:allUnderTag(javax.swing.JTree,java.lang.Object):com.intellij.openapi.vcs.changes.ui.VcsTreeModelData -- s:exactlySelected(javax.swing.JTree):com.intellij.openapi.vcs.changes.ui.VcsTreeModelData -- s:findTagNode(javax.swing.JTree,java.lang.Object):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode -- s:getListSelectionOrAll(javax.swing.JTree):com.intellij.openapi.ListSelection -- s:included(com.intellij.openapi.vcs.changes.ui.ChangesTree):com.intellij.openapi.vcs.changes.ui.VcsTreeModelData -- s:includedUnderTag(com.intellij.openapi.vcs.changes.ui.ChangesTree,java.lang.Object):com.intellij.openapi.vcs.changes.ui.VcsTreeModelData -- f:iterateNodes():com.intellij.util.containers.JBIterable -- a:iterateRawNodes():com.intellij.util.containers.JBIterable -- f:iterateRawUserObjects():com.intellij.util.containers.JBIterable -- f:iterateRawUserObjects(java.lang.Class):com.intellij.util.containers.JBIterable -- f:iterateUserObjects():com.intellij.util.containers.JBIterable -- f:iterateUserObjects(java.lang.Class):com.intellij.util.containers.JBIterable -- s:mapToExactVirtualFile(com.intellij.openapi.vcs.changes.ui.VcsTreeModelData):com.intellij.util.containers.JBIterable -- s:mapUserObjectToFilePath(java.lang.Object):com.intellij.openapi.vcs.FilePath -- f:nodesStream():java.util.stream.Stream -- s:selected(javax.swing.JTree):com.intellij.openapi.vcs.changes.ui.VcsTreeModelData -- s:selectedUnderTag(javax.swing.JTree,java.lang.Object):com.intellij.openapi.vcs.changes.ui.VcsTreeModelData -- s:uiDataSnapshot(com.intellij.openapi.actionSystem.DataSink,com.intellij.openapi.project.Project,javax.swing.JTree):V -- f:userObjects():java.util.List -- f:userObjects(java.lang.Class):java.util.List -- f:userObjectsStream(java.lang.Class):java.util.stream.Stream -c:com.intellij.openapi.vcs.changes.ui.VirtualFileHierarchicalComparator -- java.util.Comparator -- ():V -- compare(com.intellij.openapi.vfs.VirtualFile,com.intellij.openapi.vfs.VirtualFile):I -- s:getInstance():com.intellij.openapi.vcs.changes.ui.VirtualFileHierarchicalComparator c:com.intellij.openapi.vcs.changes.ui.VirtualFileListCellRenderer - com.intellij.ui.ColoredListCellRenderer - pf:myProject:com.intellij.openapi.project.Project diff --git a/platform/vcs-impl/resources/META-INF/VcsExtensions.xml b/platform/vcs-impl/resources/META-INF/VcsExtensions.xml index 7461dfc15aae..608865c7b323 100644 --- a/platform/vcs-impl/resources/META-INF/VcsExtensions.xml +++ b/platform/vcs-impl/resources/META-INF/VcsExtensions.xml @@ -368,6 +368,9 @@ + + diff --git a/platform/vcs-impl/resources/intellij.platform.vcs.impl.xml b/platform/vcs-impl/resources/intellij.platform.vcs.impl.xml index 13fd1925d2a2..f69c4d1300de 100644 --- a/platform/vcs-impl/resources/intellij.platform.vcs.impl.xml +++ b/platform/vcs-impl/resources/intellij.platform.vcs.impl.xml @@ -6,6 +6,7 @@ + diff --git a/platform/vcs-impl/shared/BUILD.bazel b/platform/vcs-impl/shared/BUILD.bazel index b1dbab897891..437a2fd5daa6 100644 --- a/platform/vcs-impl/shared/BUILD.bazel +++ b/platform/vcs-impl/shared/BUILD.bazel @@ -29,6 +29,11 @@ jvm_library( "//platform/platform-impl:ide-impl", "//platform/core-ui", "//platform/util/coroutines", + "//platform/vcs-api/vcs-api-core:vcs-core", + "//platform/editor-ui-api:editor-ui", + "//platform/lang-impl", + "//platform/util/concurrency", + "//platform/vcs-api/shared", ], runtime_deps = [":shared_resources"] ) diff --git a/platform/vcs-impl/shared/api-dump.txt b/platform/vcs-impl/shared/api-dump.txt index 8cfde151cd04..bbb9f21d8135 100644 --- a/platform/vcs-impl/shared/api-dump.txt +++ b/platform/vcs-impl/shared/api-dump.txt @@ -28,6 +28,440 @@ c:com.intellij.openapi.vcs.IssueNavigationLink - hashCode():I - setIssueRegexp(java.lang.String):V - setLinkRegexp(java.lang.String):V +f:com.intellij.openapi.vcs.changes.FilePathsHelper +- s:convertPath(com.intellij.openapi.vcs.FilePath):java.lang.String +- s:convertPath(java.lang.String):java.lang.String +- s:convertPath(java.lang.String,java.lang.String):java.lang.String +- s:convertWithLastSeparator(com.intellij.openapi.vcs.FilePath):java.lang.String +c:com.intellij.openapi.vcs.changes.issueLinks.IssueLinkRenderer +- (com.intellij.openapi.project.Project,com.intellij.ui.SimpleColoredComponent):V +- appendTextWithLinks(java.lang.String):java.util.List +- appendTextWithLinks(java.lang.String,com.intellij.ui.SimpleTextAttributes):java.util.List +a:com.intellij.openapi.vcs.changes.ui.AbstractChangesBrowserFilePathNode +- com.intellij.ide.util.treeView.PathElementIdProvider +- com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +- sf:Companion:com.intellij.openapi.vcs.changes.ui.AbstractChangesBrowserFilePathNode$Companion +- (java.lang.Object,com.intellij.openapi.vcs.FileStatus):V +- compareUserObjects(java.lang.Object):I +- pa:filePath(java.lang.Object):com.intellij.openapi.vcs.FilePath +- getBackgroundColor(com.intellij.openapi.project.Project):java.awt.Color +- getFlattenedElements():java.util.List +- f:getOriginText():java.lang.String +- getPathElementId():java.lang.String +- f:getRelativeFilePath(com.intellij.openapi.project.Project,com.intellij.openapi.vcs.FilePath):java.lang.String +- p:getRelativePath(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,com.intellij.openapi.vcs.FilePath):java.lang.String +- getSortWeight():I +- f:getStatus():com.intellij.openapi.vcs.FileStatus +- getTextPresentation():java.lang.String +- p:isDirectory():Z +- p:isFile():Z +- p:originPath(java.lang.Object):com.intellij.openapi.vcs.FilePath +- render(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,Z,Z,Z):V +- sf:safeCastToFilePath(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):com.intellij.openapi.vcs.FilePath +f:com.intellij.openapi.vcs.changes.ui.AbstractChangesBrowserFilePathNode$Companion +- f:safeCastToFilePath(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):com.intellij.openapi.vcs.FilePath +a:com.intellij.openapi.vcs.changes.ui.BaseChangesGroupingPolicy +- com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicy +- sf:Companion:com.intellij.openapi.vcs.changes.ui.BaseChangesGroupingPolicy$Companion +- ():V +- sf:getCachingRoot(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode,com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +- pf:getNextPolicy():com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicy +- sf:markCachingRoot(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):V +- pf:resolveVirtualFile(com.intellij.openapi.vcs.changes.ui.StaticFilePath):com.intellij.openapi.vfs.VirtualFile +- f:setNextGroupingPolicy(com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicy):V +- pf:setNextPolicy(com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicy):V +f:com.intellij.openapi.vcs.changes.ui.BaseChangesGroupingPolicy$Companion +- f:getCachingRoot(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode,com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +- f:markCachingRoot(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):V +a:com.intellij.openapi.vcs.changes.ui.BaseInclusionModel +- com.intellij.openapi.vcs.changes.InclusionModel +- ():V +- addInclusionListener(com.intellij.openapi.vcs.changes.InclusionListener):V +- pf:fireInclusionChanged():V +- removeInclusionListener(com.intellij.openapi.vcs.changes.InclusionListener):V +com.intellij.openapi.vcs.changes.ui.ChangeNodeDecorator +- a:decorate(com.intellij.openapi.vcs.changes.Change,com.intellij.ui.SimpleColoredComponent,Z):V +- a:preDecorate(com.intellij.openapi.vcs.changes.Change,com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,Z):V +c:com.intellij.openapi.vcs.changes.ui.ChangesBrowserChangeNode +- com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +- com.intellij.openapi.vcs.changes.issueLinks.TreeLinkMouseListener$HaveTooltip +- (com.intellij.openapi.project.Project,com.intellij.openapi.vcs.changes.Change,com.intellij.openapi.vcs.changes.ui.ChangeNodeDecorator):V +- compareUserObjects(com.intellij.openapi.vcs.changes.Change):I +- getSortWeight():I +- getTextPresentation():java.lang.String +- getTooltip():java.lang.String +- p:isDirectory():Z +- p:isFile():Z +- render(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,Z,Z,Z):V +c:com.intellij.openapi.vcs.changes.ui.ChangesBrowserFileNode +- com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +- java.lang.Comparable +- (com.intellij.openapi.project.Project,com.intellij.openapi.vfs.VirtualFile):V +- compareTo(com.intellij.openapi.vcs.changes.ui.ChangesBrowserFileNode):I +- getSortWeight():I +- getTextPresentation():java.lang.String +- p:isDirectory():Z +- p:isFile():Z +- render(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,Z,Z,Z):V +c:com.intellij.openapi.vcs.changes.ui.ChangesBrowserFilePathNode +- com.intellij.openapi.vcs.changes.ui.AbstractChangesBrowserFilePathNode +- (com.intellij.openapi.vcs.FilePath):V +- (com.intellij.openapi.vcs.FilePath,com.intellij.openapi.vcs.FileStatus):V +- p:filePath(com.intellij.openapi.vcs.FilePath):com.intellij.openapi.vcs.FilePath +a:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +- javax.swing.tree.DefaultMutableTreeNode +- com.intellij.openapi.util.UserDataHolderEx +- psf:CHANGE_LIST_SORT_WEIGHT:I +- psf:CHANGE_SORT_WEIGHT:I +- psf:CONFLICTS_SORT_WEIGHT:I +- psf:DEFAULT_CHANGE_LIST_SORT_WEIGHT:I +- psf:DEFAULT_SORT_WEIGHT:I +- psf:DELETED_SORT_WEIGHT:I +- psf:DIRECTORY_PATH_SORT_WEIGHT:I +- psf:FILE_PATH_SORT_WEIGHT:I +- sf:IGNORED_FILES_TAG:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag +- psf:IGNORED_SORT_WEIGHT:I +- sf:LOCALLY_DELETED_NODE_TAG:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag +- sf:LOCKED_FOLDERS_TAG:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag +- sf:LOGICALLY_LOCKED_TAG:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag +- sf:MODIFIED_WITHOUT_EDITING_TAG:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag +- psf:MODULE_SORT_WEIGHT:I +- psf:REPOSITORY_SORT_WEIGHT:I +- psf:RESOLVED_CONFLICTS_SORT_WEIGHT:I +- sf:SWITCHED_FILES_TAG:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag +- sf:SWITCHED_ROOTS_TAG:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag +- sf:TO_TEXT_CONVERTER:com.intellij.util.containers.Convertor +- sf:UNVERSIONED_FILES_TAG:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag +- psf:UNVERSIONED_SORT_WEIGHT:I +- psf:VIRTUAL_FILE_SORT_WEIGHT:I +- p:(java.lang.Object):V +- p:appendCount(com.intellij.ui.ColoredTreeCellRenderer):V +- p:appendParentPath(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,com.intellij.openapi.vcs.FilePath):V +- p:appendParentPath(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,com.intellij.openapi.vfs.VirtualFile):V +- p:appendUpdatingState(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer):V +- ps:compareFileNames(java.lang.String,java.lang.String):I +- s:compareFilePaths(com.intellij.openapi.vcs.FilePath,com.intellij.openapi.vcs.FilePath):I +- compareUserObjects(java.lang.Object):I +- s:createChange(com.intellij.openapi.project.Project,com.intellij.openapi.vcs.changes.Change):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +- s:createFile(com.intellij.openapi.project.Project,com.intellij.openapi.vfs.VirtualFile):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +- s:createFilePath(com.intellij.openapi.vcs.FilePath):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +- s:createFilePath(com.intellij.openapi.vcs.FilePath,com.intellij.openapi.vcs.FileStatus):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +- s:createLocallyDeleted(com.intellij.openapi.vcs.changes.LocallyDeletedChange):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +- s:createLockedFolders(com.intellij.openapi.project.Project):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +- s:createLogicallyLocked(com.intellij.openapi.project.Project,com.intellij.openapi.vfs.VirtualFile,com.intellij.openapi.vcs.changes.LogicalLock):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +- s:createRoot():com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +- getAllChangesUnder():java.util.List +- getAllObjectsUnder(java.lang.Class):java.util.List +- getBackgroundColor(com.intellij.openapi.project.Project):java.awt.Color +- ps:getBackgroundColorFor(com.intellij.openapi.project.Project,java.lang.Object):java.awt.Color +- p:getCountText():java.lang.String +- getDirectoryCount():I +- getFileCount():I +- getParent():com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +- getSortWeight():I +- getTextPresentation():java.lang.String +- getUserData(com.intellij.openapi.util.Key):java.lang.Object +- getUserObject():java.lang.Object +- insert(javax.swing.tree.MutableTreeNode,I):V +- p:isDirectory():Z +- p:isFile():Z +- isMeaningfulNode():Z +- iterateFilePathsUnder():com.intellij.util.containers.JBIterable +- iterateFilesUnder():com.intellij.util.containers.JBIterable +- iterateNodeChildren():com.intellij.util.containers.JBIterable +- f:markAsHelperNode():V +- putUserData(com.intellij.openapi.util.Key,java.lang.Object):V +- putUserDataIfAbsent(com.intellij.openapi.util.Key,java.lang.Object):java.lang.Object +- remove(I):V +- render(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,Z,Z,Z):V +- render(javax.swing.JTree,com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,Z,Z,Z):V +- replace(com.intellij.openapi.util.Key,java.lang.Object,java.lang.Object):Z +- p:resetCounters():V +- setUserObject(java.lang.Object):V +- shouldExpandByDefault():Z +- traverse():com.intellij.util.containers.JBIterable +- traverseObjectsUnder():com.intellij.util.containers.JBIterable +com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$NodeWithFilePath +- a:getNodeFilePath():com.intellij.openapi.vcs.FilePath +com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag +- a:toString():java.lang.String +c:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$TagImpl +- com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag +- (java.lang.String):V +a:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$ValueTag +- com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag +- f:value:java.lang.Object +- (java.lang.Object):V +- f:equals(java.lang.Object):Z +- p:getValue():java.lang.Object +- f:hashCode():I +c:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$VcsBundleTag +- com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag +- (java.lang.String):V +c:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$WrapperTag +- com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$ValueTag +- s:wrap(java.lang.Object):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag +c:com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer +- com.intellij.ui.ColoredTreeCellRenderer +- (com.intellij.openapi.project.Project,com.intellij.openapi.util.BooleanGetter,Z):V +- appendFileName(com.intellij.openapi.vfs.VirtualFile,java.lang.String,java.awt.Color):V +- appendTextWithIssueLinks(java.lang.String,com.intellij.ui.SimpleTextAttributes):V +- clear():V +- customizeCellRenderer(javax.swing.JTree,java.lang.Object,Z,Z,Z,I,Z):V +- p:doPaintFragmentBackground(java.awt.Graphics2D,I,java.awt.Color,I,I,I,I):V +- getProject():com.intellij.openapi.project.Project +- isShowFlatten():Z +- isShowingLocalChanges():Z +- setBackgroundInsets(com.intellij.util.ui.JBInsets):V +- setIcon(com.intellij.openapi.vcs.FilePath,Z):V +c:com.intellij.openapi.vcs.changes.ui.ChangesBrowserSpecificFilePathsNode +- com.intellij.openapi.vcs.changes.ui.ChangesBrowserSpecificNode +- p:(java.lang.Object,java.util.Collection,java.lang.Runnable):V +c:com.intellij.openapi.vcs.changes.ui.ChangesBrowserSpecificFilesNode +- com.intellij.openapi.vcs.changes.ui.ChangesBrowserSpecificNode +- p:(java.lang.Object,java.util.Collection,java.lang.Runnable):V +a:com.intellij.openapi.vcs.changes.ui.ChangesBrowserSpecificNode +- com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +- pf:myDialogShower:java.lang.Runnable +- pf:myIsMany:Z +- p:(java.lang.Object,java.util.Collection,I,java.lang.Runnable):V +- getDirectoryCount():I +- getFileCount():I +- isManyFiles():Z +- s:isManyFiles(java.util.Collection):Z +- render(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,Z,Z,Z):V +- f:setAttributes(com.intellij.ui.SimpleTextAttributes):V +c:com.intellij.openapi.vcs.changes.ui.ChangesBrowserStringNode +- com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +- (java.lang.String):V +- (java.lang.String,com.intellij.ui.SimpleTextAttributes):V +- getTextPresentation():java.lang.String +- render(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,Z,Z,Z):V +f:com.intellij.openapi.vcs.changes.ui.ChangesBrowserUnversionedFilesNode +- com.intellij.openapi.vcs.changes.ui.ChangesBrowserSpecificFilePathsNode +- (com.intellij.openapi.project.Project,java.util.List):V +- getSortWeight():I +- getTextPresentation():java.lang.String +- render(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,Z,Z,Z):V +com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicy +- getParentNodeFor(com.intellij.openapi.vcs.changes.ui.StaticFilePath,com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +- getParentNodeFor(com.intellij.openapi.vcs.changes.ui.StaticFilePath,com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode,com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +- setNextGroupingPolicy(com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicy):V +c:com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicy$CompatibilityPlaceholderChangesBrowserNode +- com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +- render(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,Z,Z,Z):V +a:com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicyFactory +- sf:EP_NAME:com.intellij.openapi.extensions.ExtensionPointName +- ():V +- a:createGroupingPolicy(com.intellij.openapi.project.Project,javax.swing.tree.DefaultTreeModel):com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicy +f:com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicyFactoryEPBean +- com.intellij.serviceContainer.BaseKeyedLazyInstance +- implementationClass:java.lang.String +- key:java.lang.String +- weight:I +c:com.intellij.openapi.vcs.changes.ui.ChangesGroupingSupport +- sf:Companion:com.intellij.openapi.vcs.changes.ui.ChangesGroupingSupport$Companion +- sf:DIRECTORY_GROUPING:java.lang.String +- sf:KEY:com.intellij.openapi.actionSystem.DataKey +- sf:MODULE_GROUPING:java.lang.String +- sf:NONE_GROUPING:java.lang.String +- sf:PROP_GROUPING_KEYS:java.lang.String +- sf:REPOSITORY_GROUPING:java.lang.String +- (com.intellij.openapi.project.Project,java.lang.Object,Z):V +- f:addPropertyChangeListener(java.beans.PropertyChangeListener):V +- sf:findFactory(java.lang.String):com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicyFactory +- f:get(java.lang.String):Z +- f:getGrouping():com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicyFactory +- f:getGroupingKeys():java.util.Set +- f:getProject():com.intellij.openapi.project.Project +- f:getShowConflictsNode():Z +- isAvailable(java.lang.String):Z +- f:isDirectory():Z +- f:isNone():Z +- f:removePropertyChangeListener(java.beans.PropertyChangeListener):V +- f:set(java.lang.String,Z):V +- f:setGroupingKeysOrSkip(java.util.Collection):V +f:com.intellij.openapi.vcs.changes.ui.ChangesGroupingSupport$Companion +- f:findFactory(java.lang.String):com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicyFactory +f:com.intellij.openapi.vcs.changes.ui.ChangesGroupingSupport$Disabled +- com.intellij.openapi.vcs.changes.ui.ChangesGroupingSupport +- (com.intellij.openapi.project.Project,java.lang.Object):V +- isAvailable(java.lang.String):Z +a:com.intellij.openapi.vcs.changes.ui.ChangesTree +- com.intellij.ui.treeStructure.Tree +- com.intellij.openapi.actionSystem.UiCompatibleDataProvider +- sf:ALWAYS_KEEP:com.intellij.openapi.vcs.changes.ui.ChangesTree$TreeStateStrategy +- sf:ALWAYS_RESET:com.intellij.openapi.vcs.changes.ui.ChangesTree$TreeStateStrategy +- sf:DEFAULT_GROUPING_KEYS:java.util.List +- sf:DO_NOTHING:com.intellij.openapi.vcs.changes.ui.ChangesTree$TreeStateStrategy +- sf:EXPAND_NODES_THRESHOLD:I +- psf:GROUPING_KEYS:java.lang.String +- sf:GROUP_BY_ACTION_GROUP:java.lang.String +- sf:KEEP_NON_EMPTY:com.intellij.openapi.vcs.changes.ui.ChangesTree$TreeStateStrategy +- sf:KEEP_SELECTED_OBJECTS:com.intellij.openapi.vcs.changes.ui.ChangesTree$TreeStateStrategy +- pf:myProject:com.intellij.openapi.project.Project +- pf:myShowConflictsNode:Z +- (com.intellij.openapi.project.Project,Z,Z):V +- p:(com.intellij.openapi.project.Project,Z,Z,Z,Z):V +- addGroupingChangeListener(java.beans.PropertyChangeListener):V +- addSelectionListener(java.lang.Runnable):V +- addSelectionListener(java.lang.Runnable,com.intellij.openapi.Disposable):V +- createCollapseAllAction(Z):com.intellij.openapi.actionSystem.AnAction +- createExpandAllAction(Z):com.intellij.openapi.actionSystem.AnAction +- excludeChange(java.lang.Object):V +- excludeChanges(java.util.Collection):V +- expandAll():V +- expandDefaults():V +- getDoubleClickHandler():com.intellij.util.Processor +- getEnterKeyHandler():com.intellij.util.Processor +- getFileColorForPath(javax.swing.tree.TreePath):java.awt.Color +- getGrouping():com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicyFactory +- getGroupingSupport():com.intellij.openapi.vcs.changes.ui.ChangesGroupingSupport +- p:getIncludableUserObjects(com.intellij.openapi.vcs.changes.ui.VcsTreeModelData):java.util.List +- getIncludedSet():java.util.Set +- getInclusionModel():com.intellij.openapi.vcs.changes.InclusionModel +- p:getNodeStatus(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):com.intellij.util.ui.ThreeStateCheckBox$State +- getPreferredFocusedComponent():javax.swing.JComponent +- getProject():com.intellij.openapi.project.Project +- getRoot():com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +- getToggleClickCount():I +- getTreeExpander():com.intellij.ide.TreeExpander +- getTreeStateStrategy():com.intellij.openapi.vcs.changes.ui.ChangesTree$TreeStateStrategy +- includeChange(java.lang.Object):V +- includeChanges(java.util.Collection):V +- p:installGroupingSupport():com.intellij.openapi.vcs.changes.ui.ChangesGroupingSupport +- s:installGroupingSupport(com.intellij.openapi.vcs.changes.ui.ChangesGroupingSupport,java.util.function.Supplier,java.util.function.Consumer,java.lang.Runnable):V +- ps:installGroupingSupport(com.intellij.openapi.vcs.changes.ui.ChangesTree,com.intellij.openapi.vcs.changes.ui.ChangesGroupingSupport,java.lang.String,java.util.List):V +- ps:installGroupingSupport(com.intellij.openapi.vcs.changes.ui.ChangesTree,com.intellij.openapi.vcs.changes.ui.ChangesGroupingSupport,java.util.function.Supplier,java.util.function.Consumer):V +- installPopupHandler(com.intellij.openapi.actionSystem.ActionGroup):V +- p:installTreeLinkHandler(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer):V +- isFileColorsEnabled():Z +- isHighlightProblems():Z +- p:isIncludable(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):Z +- isIncluded(java.lang.Object):Z +- p:isInclusionEnabled(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):Z +- p:isInclusionVisible(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):Z +- isKeepTreeState():Z +- isModelUpdateInProgress():Z +- isScrollToSelection():Z +- isShowCheckboxes():Z +- isShowFlatten():Z +- onGroupingChanged():V +- p:processEvent(java.awt.AWTEvent):V +- a:rebuildTree():V +- rebuildTree(com.intellij.openapi.vcs.changes.ui.ChangesTree$TreeStateStrategy):V +- removeGroupingChangeListener(java.beans.PropertyChangeListener):V +- resetTreeState():V +- selectFile(com.intellij.openapi.vcs.FilePath):V +- selectFile(com.intellij.openapi.vfs.VirtualFile):V +- setDoubleClickAndEnterKeyHandler(java.lang.Runnable):V +- setDoubleClickHandler(com.intellij.util.Processor):V +- setEmptyText(java.lang.String):V +- setEnterKeyHandler(com.intellij.util.Processor):V +- setIncludedChanges(java.util.Collection):V +- setInclusionListener(java.lang.Runnable):V +- setInclusionModel(com.intellij.openapi.vcs.changes.InclusionModel):V +- setKeepTreeState(Z):V +- setScrollToSelection(Z):V +- setSelectedChanges(java.util.Collection):V +- setSelectionMode(I):V +- setShowCheckboxes(Z):V +- setTreeExpander(com.intellij.ide.TreeExpander):V +- setTreeStateStrategy(com.intellij.openapi.vcs.changes.ui.ChangesTree$TreeStateStrategy):V +- setUI(javax.swing.plaf.TreeUI):V +- p:toggleChanges(java.util.Collection):Z +- uiDataSnapshot(com.intellij.openapi.actionSystem.DataSink):V +- p:updateTreeModel(javax.swing.tree.DefaultTreeModel):V +- p:updateTreeModel(javax.swing.tree.DefaultTreeModel,com.intellij.openapi.vcs.changes.ui.ChangesTree$TreeStateStrategy):V +com.intellij.openapi.vcs.changes.ui.ChangesTree$TreeStateStrategy +- a:restoreState(com.intellij.openapi.vcs.changes.ui.ChangesTree,java.lang.Object,Z):V +- a:saveState(com.intellij.openapi.vcs.changes.ui.ChangesTree):java.lang.Object +c:com.intellij.openapi.vcs.changes.ui.ChangesTreeCellRenderer +- com.intellij.ui.CellRendererPanel +- javax.swing.tree.TreeCellRenderer +- (com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer):V +- getAccessibleContext():javax.accessibility.AccessibleContext +- getPreferredSize():java.awt.Dimension +- pf:getTextRenderer():com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer +- getToolTipText():java.lang.String +- getTreeCellRendererComponent(javax.swing.JTree,java.lang.Object,Z,Z,Z,I,Z):java.awt.Component +- pf:paintComponent(java.awt.Graphics):V +com.intellij.openapi.vcs.changes.ui.ChangesViewModelBuilder +- a:insertChanges(java.util.Collection,com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):V +- a:insertFilesIntoNode(java.util.Collection,com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):V +- a:insertSubtreeRoot(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):com.intellij.openapi.vcs.changes.ui.ChangesViewModelBuilder +f:com.intellij.openapi.vcs.changes.ui.DefaultInclusionModel +- com.intellij.openapi.vcs.changes.ui.BaseInclusionModel +- ():V +- (com.intellij.util.containers.HashingStrategy):V +- b:(com.intellij.util.containers.HashingStrategy,I,kotlin.jvm.internal.DefaultConstructorMarker):V +- addInclusion(java.util.Collection):V +- clearInclusion():V +- getInclusion():java.util.Set +- getInclusionState(java.lang.Object):com.intellij.util.ui.ThreeStateCheckBox$State +- isInclusionEmpty():Z +- removeInclusion(java.util.Collection):V +- retainInclusion(java.util.Collection):V +- setInclusion(java.util.Collection):V +f:com.intellij.openapi.vcs.changes.ui.NoneChangesGroupingFactory +- com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicyFactory +- sf:INSTANCE:com.intellij.openapi.vcs.changes.ui.NoneChangesGroupingFactory +- createGroupingPolicy(com.intellij.openapi.project.Project,javax.swing.tree.DefaultTreeModel):com.intellij.openapi.vcs.changes.ui.ChangesGroupingPolicy +a:com.intellij.openapi.vcs.changes.ui.SimpleChangesGroupingPolicy +- com.intellij.openapi.vcs.changes.ui.BaseChangesGroupingPolicy +- sf:Companion:com.intellij.openapi.vcs.changes.ui.SimpleChangesGroupingPolicy$Companion +- (javax.swing.tree.DefaultTreeModel):V +- pa:createGroupRootNode(java.lang.Object):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +- pa:getGroupRootValueFor(com.intellij.openapi.vcs.changes.ui.StaticFilePath,com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):java.lang.Object +- f:getModel():javax.swing.tree.DefaultTreeModel +- f:getParentNodeFor(com.intellij.openapi.vcs.changes.ui.StaticFilePath,com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode,com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +f:com.intellij.openapi.vcs.changes.ui.SimpleChangesGroupingPolicy$Companion +c:com.intellij.openapi.vcs.changes.ui.StaticFilePath +- (com.intellij.openapi.vcs.FilePath):V +- getFilePath():com.intellij.openapi.vcs.FilePath +- getKey():java.lang.String +- getParent():com.intellij.openapi.vcs.changes.ui.StaticFilePath +- getPath():java.lang.String +- getVf():com.intellij.openapi.vfs.VirtualFile +- isDirectory():Z +- resolve():com.intellij.openapi.vfs.VirtualFile +c:com.intellij.openapi.vcs.changes.ui.TagChangesBrowserNode +- com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +- (com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode$Tag,com.intellij.ui.SimpleTextAttributes,Z):V +- getTextPresentation():java.lang.String +- render(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer,Z,Z,Z):V +- shouldExpandByDefault():Z +a:com.intellij.openapi.vcs.changes.ui.VcsTreeModelData +- ():V +- s:all(javax.swing.JTree):com.intellij.openapi.vcs.changes.ui.VcsTreeModelData +- s:all(javax.swing.tree.TreeModel):com.intellij.openapi.vcs.changes.ui.VcsTreeModelData +- s:allUnder(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode):com.intellij.openapi.vcs.changes.ui.VcsTreeModelData +- s:allUnderTag(javax.swing.JTree,java.lang.Object):com.intellij.openapi.vcs.changes.ui.VcsTreeModelData +- s:exactlySelected(javax.swing.JTree):com.intellij.openapi.vcs.changes.ui.VcsTreeModelData +- s:findTagNode(javax.swing.JTree,java.lang.Object):com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode +- s:getListSelectionOrAll(javax.swing.JTree):com.intellij.openapi.ListSelection +- s:included(com.intellij.openapi.vcs.changes.ui.ChangesTree):com.intellij.openapi.vcs.changes.ui.VcsTreeModelData +- s:includedUnderTag(com.intellij.openapi.vcs.changes.ui.ChangesTree,java.lang.Object):com.intellij.openapi.vcs.changes.ui.VcsTreeModelData +- f:iterateNodes():com.intellij.util.containers.JBIterable +- a:iterateRawNodes():com.intellij.util.containers.JBIterable +- f:iterateRawUserObjects():com.intellij.util.containers.JBIterable +- f:iterateRawUserObjects(java.lang.Class):com.intellij.util.containers.JBIterable +- f:iterateUserObjects():com.intellij.util.containers.JBIterable +- f:iterateUserObjects(java.lang.Class):com.intellij.util.containers.JBIterable +- s:mapToExactVirtualFile(com.intellij.openapi.vcs.changes.ui.VcsTreeModelData):com.intellij.util.containers.JBIterable +- s:mapUserObjectToFilePath(java.lang.Object):com.intellij.openapi.vcs.FilePath +- f:nodesStream():java.util.stream.Stream +- s:selected(javax.swing.JTree):com.intellij.openapi.vcs.changes.ui.VcsTreeModelData +- s:selectedUnderTag(javax.swing.JTree,java.lang.Object):com.intellij.openapi.vcs.changes.ui.VcsTreeModelData +- s:uiDataSnapshot(com.intellij.openapi.actionSystem.DataSink,com.intellij.openapi.project.Project,javax.swing.JTree):V +- f:userObjects():java.util.List +- f:userObjects(java.lang.Class):java.util.List +- f:userObjectsStream(java.lang.Class):java.util.stream.Stream +c:com.intellij.openapi.vcs.changes.ui.VirtualFileHierarchicalComparator +- java.util.Comparator +- ():V +- compare(com.intellij.openapi.vfs.VirtualFile,com.intellij.openapi.vfs.VirtualFile):I +- s:getInstance():com.intellij.openapi.vcs.changes.ui.VirtualFileHierarchicalComparator com.intellij.platform.vcs.impl.shared.changes.DiffPreviewUpdateProcessor - a:clear():V - a:getComponent():javax.swing.JComponent diff --git a/platform/vcs-impl/shared/exposed-third-party-api.txt b/platform/vcs-impl/shared/exposed-third-party-api.txt new file mode 100644 index 000000000000..1ff3abdfef32 --- /dev/null +++ b/platform/vcs-impl/shared/exposed-third-party-api.txt @@ -0,0 +1 @@ +kotlin/jvm/internal/DefaultConstructorMarker diff --git a/platform/vcs-impl/shared/intellij.platform.vcs.impl.shared.iml b/platform/vcs-impl/shared/intellij.platform.vcs.impl.shared.iml index c637ddd74e0c..af1ffa5133d2 100644 --- a/platform/vcs-impl/shared/intellij.platform.vcs.impl.shared.iml +++ b/platform/vcs-impl/shared/intellij.platform.vcs.impl.shared.iml @@ -49,5 +49,10 @@ + + + + + \ No newline at end of file diff --git a/platform/vcs-impl/shared/resources/intellij.platform.vcs.impl.shared.xml b/platform/vcs-impl/shared/resources/intellij.platform.vcs.impl.shared.xml index 8a30e9441930..e7078021ecb5 100644 --- a/platform/vcs-impl/shared/resources/intellij.platform.vcs.impl.shared.xml +++ b/platform/vcs-impl/shared/resources/intellij.platform.vcs.impl.shared.xml @@ -1,4 +1,9 @@ + + + + + diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangeListOwner.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ChangeListOwner.java similarity index 78% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangeListOwner.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ChangeListOwner.java index 5731fb645614..84f3fae761a8 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangeListOwner.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ChangeListOwner.java @@ -1,4 +1,4 @@ -// 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. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes; import com.intellij.openapi.project.Project; diff --git a/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ChangesTreeCompatibilityProvider.kt b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ChangesTreeCompatibilityProvider.kt new file mode 100644 index 000000000000..bf3669593943 --- /dev/null +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ChangesTreeCompatibilityProvider.kt @@ -0,0 +1,64 @@ +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +package com.intellij.openapi.vcs.changes + +import com.intellij.openapi.actionSystem.AnActionEvent +import com.intellij.openapi.components.service +import com.intellij.openapi.project.Project +import com.intellij.openapi.util.NlsSafe +import com.intellij.openapi.vcs.FilePath +import com.intellij.openapi.vcs.FileStatus +import com.intellij.openapi.vcs.changes.ui.ChangeListDragBean +import com.intellij.openapi.vcs.changes.ui.ChangesBrowserLockedFoldersNode +import com.intellij.openapi.vfs.VirtualFile +import com.intellij.util.application +import org.jetbrains.annotations.ApiStatus +import java.awt.Color +import java.awt.event.MouseEvent +import javax.swing.Icon + +/** + * Temporary interface to allow moving changes tree code to the shared module. + * Should be reconsidered and replaced with proper services. + */ +@ApiStatus.Obsolete +@ApiStatus.Internal +interface ChangesTreeCompatibilityProvider { + fun getBackgroundColorFor(project: Project, obj: Any?): Color? + + fun getPresentablePath(project: Project?, path: VirtualFile, useRelativeRootPaths: Boolean, acceptEmptyPath: Boolean): @NlsSafe String + + fun getPresentablePath(project: Project?, path: FilePath, useRelativeRootPaths: Boolean, acceptEmptyPath: Boolean): @NlsSafe String + + fun getFileStatus(project: Project, file: VirtualFile): FileStatus + + fun getLockedFilesCleanupWorker(project: Project, lockedFoldersNode: ChangesBrowserLockedFoldersNode): Runnable? + + fun getIcon(project: Project?, filePath: FilePath, isDirectory: Boolean): Icon? + + fun logInclusionToggle(project: Project, exclude: Boolean, event: MouseEvent) + + fun logInclusionToggle(project: Project, exclude: Boolean, event: AnActionEvent) + + fun logFileSelected(project: Project, event: MouseEvent) + + fun getSwitchedBranch(project: Project, file: VirtualFile): @NlsSafe String? + + fun showResolveConflictsDialog(project: Project, changes: List) + + fun acceptIgnoredFilesDrop(project: Project, dragOwner: ChangeListOwner, dragBean: ChangeListDragBean) + + fun showIgnoredViewDialog(project: Project) + + fun isIgnoredInUpdateMode(project: Project): Boolean + + fun showUnversionedViewDialog(project: Project) + + fun isUnversionedInUpdateMode(project: Project): Boolean + + fun resolveLocalFile(path: String): VirtualFile? + + companion object { + @JvmStatic + fun getInstance(): ChangesTreeCompatibilityProvider = application.service() + } +} \ No newline at end of file diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/FilePathsHelper.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/FilePathsHelper.java similarity index 96% rename from platform/vcs-api/src/com/intellij/openapi/vcs/changes/FilePathsHelper.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/FilePathsHelper.java index 9e45a114444a..50467f629515 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/FilePathsHelper.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/FilePathsHelper.java @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes; import com.intellij.openapi.util.NlsSafe; diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/HierarchicalFilePathComparator.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/HierarchicalFilePathComparator.java similarity index 77% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/HierarchicalFilePathComparator.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/HierarchicalFilePathComparator.java index 606bc77b317e..d7f6048c1e63 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/HierarchicalFilePathComparator.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/HierarchicalFilePathComparator.java @@ -1,22 +1,7 @@ -/* - * Copyright 2000-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes; import com.intellij.ide.util.treeView.FileNameComparator; -import com.intellij.openapi.util.SystemInfo; import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vcs.FilePath; import com.intellij.util.text.CharSequenceSubSequence; @@ -33,8 +18,6 @@ import java.util.Comparator; public class HierarchicalFilePathComparator implements Comparator { public static final HierarchicalFilePathComparator CASE_SENSITIVE = new HierarchicalFilePathComparator(false); public static final HierarchicalFilePathComparator CASE_INSENSITIVE = new HierarchicalFilePathComparator(true); - public static final HierarchicalFilePathComparator SYSTEM_CASE_SENSITIVE = SystemInfo.isFileSystemCaseSensitive ? CASE_SENSITIVE - : CASE_INSENSITIVE; public static final HierarchicalFilePathComparator NATURAL = new HierarchicalFilePathComparator(true) { @Override diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/issueLinks/IssueLinkRenderer.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/issueLinks/IssueLinkRenderer.java similarity index 97% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/issueLinks/IssueLinkRenderer.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/issueLinks/IssueLinkRenderer.java index 89a318c80aff..fa84022e5f1e 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/issueLinks/IssueLinkRenderer.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/issueLinks/IssueLinkRenderer.java @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.issueLinks; import com.intellij.openapi.project.Project; diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/BaseChangesGroupingPolicy.kt b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/BaseChangesGroupingPolicy.kt similarity index 79% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/BaseChangesGroupingPolicy.kt rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/BaseChangesGroupingPolicy.kt index 167ae1305ddc..cd1ecb8bcb2d 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/BaseChangesGroupingPolicy.kt +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/BaseChangesGroupingPolicy.kt @@ -1,6 +1,7 @@ -// Copyright 2000-2018 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-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui +import com.intellij.openapi.vcs.changes.ui.TreeModelBuilderKeys.IS_CACHING_ROOT import com.intellij.openapi.vfs.VirtualFile abstract class BaseChangesGroupingPolicy : ChangesGroupingPolicy { @@ -19,14 +20,14 @@ abstract class BaseChangesGroupingPolicy : ChangesGroupingPolicy { companion object { @JvmStatic fun markCachingRoot(node: ChangesBrowserNode<*>) { - TreeModelBuilder.IS_CACHING_ROOT.set(node, true) + IS_CACHING_ROOT.set(node, true) } @JvmStatic fun getCachingRoot(node: ChangesBrowserNode<*>?, subtreeRoot: ChangesBrowserNode<*>): ChangesBrowserNode<*> { var parent = node while (parent != null) { - if (TreeModelBuilder.IS_CACHING_ROOT.get(parent) == true) { + if (IS_CACHING_ROOT.get(parent) == true) { return parent } parent = parent.parent diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangeListDragBean.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangeListDragBean.java similarity index 91% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangeListDragBean.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangeListDragBean.java index a309bdb84a6f..cc1020cac9ae 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangeListDragBean.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangeListDragBean.java @@ -1,4 +1,4 @@ -// Copyright 2000-2021 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-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangeNodeDecorator.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangeNodeDecorator.java similarity index 75% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangeNodeDecorator.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangeNodeDecorator.java index 81447577a139..3d659e733a23 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangeNodeDecorator.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangeNodeDecorator.java @@ -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-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; import com.intellij.openapi.vcs.changes.Change; diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserChangeNode.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserChangeNode.java similarity index 89% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserChangeNode.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserChangeNode.java index 96b37cc2d8f7..4b69c9e09563 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserChangeNode.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserChangeNode.java @@ -1,4 +1,4 @@ -// Copyright 2000-2018 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-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; @@ -9,10 +9,10 @@ import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.vcs.FilePath; import com.intellij.openapi.vcs.VcsBundle; import com.intellij.openapi.vcs.changes.Change; -import com.intellij.openapi.vcs.changes.ChangeListManager; -import com.intellij.openapi.vcs.changes.ChangesUtil; +import com.intellij.openapi.vcs.changes.ChangesTreeCompatibilityProvider; import com.intellij.openapi.vcs.changes.issueLinks.TreeLinkMouseListener; import com.intellij.openapi.vfs.VirtualFile; +import com.intellij.platform.vcs.changes.ChangesUtil; import com.intellij.ui.SimpleTextAttributes; import com.intellij.util.SlowOperations; import org.jetbrains.annotations.Nls; @@ -29,7 +29,7 @@ public class ChangesBrowserChangeNode extends ChangesBrowserNode impleme private final @Nullable ChangeNodeDecorator myDecorator; private final @Nullable @Nls String myAdditionalText; - protected ChangesBrowserChangeNode(@Nullable Project project, @NotNull Change userObject, @Nullable ChangeNodeDecorator decorator) { + public ChangesBrowserChangeNode(@Nullable Project project, @NotNull Change userObject, @Nullable ChangeNodeDecorator decorator) { super(userObject); myProject = project; myDecorator = decorator; @@ -94,7 +94,7 @@ public class ChangesBrowserChangeNode extends ChangesBrowserNode impleme private void appendSwitched(@NotNull ChangesBrowserNodeRenderer renderer, @Nullable VirtualFile file) { if (file != null && myProject != null && !myProject.isDefault() && !myProject.isDisposed()) { - String branch = ChangeListManager.getInstance(myProject).getSwitchedBranch(file); + String branch = ChangesTreeCompatibilityProvider.getInstance().getSwitchedBranch(myProject, file); if (branch != null) { String switchedToBranch = "[" + VcsBundle.message("changes.switched.to.branch.name", branch) + "]"; renderer.append(spaceAndThinSpace() + switchedToBranch, SimpleTextAttributes.REGULAR_ATTRIBUTES); diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserConflictsNode.kt b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserConflictsNode.kt similarity index 69% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserConflictsNode.kt rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserConflictsNode.kt index 135282517977..664e5980e164 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserConflictsNode.kt +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserConflictsNode.kt @@ -2,10 +2,8 @@ package com.intellij.openapi.vcs.changes.ui import com.intellij.openapi.project.Project -import com.intellij.openapi.vcs.AbstractVcsHelper import com.intellij.openapi.vcs.VcsBundle -import com.intellij.openapi.vcs.changes.ChangesUtil -import com.intellij.openapi.vcs.merge.MergeConflictManager +import com.intellij.openapi.vcs.changes.ChangesTreeCompatibilityProvider import com.intellij.ui.SimpleTextAttributes import com.intellij.util.FontUtil import org.jetbrains.annotations.ApiStatus @@ -20,14 +18,11 @@ class ChangesBrowserConflictsNode(val project: Project) override fun render(renderer: ChangesBrowserNodeRenderer, selected: Boolean, expanded: Boolean, hasFocus: Boolean) { renderer.append(VcsBundle.message("changes.nodetitle.merge.conflicts"), SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES) renderer.append(FontUtil.spaceAndThinSpace(), SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES) - if (!MergeConflictManager.isNonModalMergeEnabled(project)) { - renderer.append(VcsBundle.message("changes.nodetitle.merge.conflicts.resolve.link.label"), SimpleTextAttributes.LINK_BOLD_ATTRIBUTES, - Runnable { showResolveConflictsDialog() }) - } + renderer.append(VcsBundle.message("changes.nodetitle.merge.conflicts.resolve.link.label"), SimpleTextAttributes.LINK_BOLD_ATTRIBUTES, Runnable { showResolveConflictsDialog() }) } private fun showResolveConflictsDialog() { - AbstractVcsHelper.getInstance(project).showMergeDialog(ChangesUtil.iterateFiles(allChangesUnder).toList()) + ChangesTreeCompatibilityProvider.getInstance().showResolveConflictsDialog(project, allChangesUnder) } override fun getTextPresentation(): String { diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserFileNode.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserFileNode.java similarity index 89% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserFileNode.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserFileNode.java index e88b11305cb9..992e1ee1a11b 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserFileNode.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserFileNode.java @@ -1,18 +1,17 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; import com.intellij.openapi.application.AccessToken; import com.intellij.openapi.project.Project; import com.intellij.openapi.vcs.FileStatus; -import com.intellij.openapi.vcs.changes.ChangeListManager; +import com.intellij.openapi.vcs.changes.ChangesTreeCompatibilityProvider; import com.intellij.openapi.vfs.VirtualFile; +import com.intellij.platform.vcs.VcsUtil; import com.intellij.util.SlowOperations; -import com.intellij.vcsUtil.VcsUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; - public class ChangesBrowserFileNode extends ChangesBrowserNode implements Comparable { private final @Nullable Project myProject; private final String myName; @@ -79,6 +78,6 @@ public class ChangesBrowserFileNode extends ChangesBrowserNode impl private @NotNull FileStatus getFileStatus() { if (myProject == null || myProject.isDisposed()) return FileStatus.NOT_CHANGED; - return ChangeListManager.getInstance(myProject).getStatus(getUserObject()); + return ChangesTreeCompatibilityProvider.getInstance().getFileStatus(myProject, getUserObject()); } } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserFilePathNode.kt b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserFilePathNode.kt similarity index 94% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserFilePathNode.kt rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserFilePathNode.kt index 57997a422317..579db2b3e58c 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserFilePathNode.kt +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserFilePathNode.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui import com.intellij.ide.util.treeView.PathElementIdProvider @@ -12,11 +12,11 @@ import com.intellij.openapi.vcs.FilePath import com.intellij.openapi.vcs.FileStatus import com.intellij.openapi.vcs.VcsBundle import com.intellij.openapi.vcs.changes.Change -import com.intellij.openapi.vcs.changes.ChangesUtil +import com.intellij.openapi.vcs.changes.ChangesTreeCompatibilityProvider import com.intellij.openapi.vcs.impl.PlatformVcsPathPresenter.getPresentableRelativePath +import com.intellij.platform.vcs.changes.ChangesUtil import com.intellij.ui.SimpleTextAttributes import com.intellij.util.FontUtil -import com.intellij.vcsUtil.VcsUtil import org.jetbrains.annotations.ApiStatus import org.jetbrains.annotations.Nls import java.awt.Color @@ -78,7 +78,7 @@ abstract class AbstractChangesBrowserFilePathNode( return if (isLocal) FileUtil.toSystemDependentName(prettyPath) else prettyPath } else if (isLocal) { - return VcsUtil.getPresentablePath(project, path, true, false) + return ChangesTreeCompatibilityProvider.getInstance().getPresentablePath(project, path, true, false) } else { return path.path diff --git a/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserIgnoredFilesNode.kt b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserIgnoredFilesNode.kt new file mode 100644 index 000000000000..5bd3912eacda --- /dev/null +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserIgnoredFilesNode.kt @@ -0,0 +1,37 @@ +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. + +package com.intellij.openapi.vcs.changes.ui + +import com.intellij.openapi.project.Project +import com.intellij.openapi.vcs.FilePath +import com.intellij.openapi.vcs.changes.ChangeListOwner +import com.intellij.openapi.vcs.changes.ChangesTreeCompatibilityProvider +import org.jetbrains.annotations.ApiStatus +import org.jetbrains.annotations.Nls + +@ApiStatus.Internal +class ChangesBrowserIgnoredFilesNode(private val project: Project, + files: List) + : ChangesBrowserSpecificFilePathsNode(ChangesBrowserNode.IGNORED_FILES_TAG, files, + { ChangesTreeCompatibilityProvider.getInstance().showIgnoredViewDialog(project) }) { + + override fun render(renderer: ChangesBrowserNodeRenderer, selected: Boolean, expanded: Boolean, hasFocus: Boolean) { + super.render(renderer, selected, expanded, hasFocus) + if (!project.isDisposed && ChangesTreeCompatibilityProvider.getInstance().isIgnoredInUpdateMode(project)) { + appendUpdatingState(renderer) + } + } + + @ApiStatus.Internal + override fun canAcceptDrop(dragBean: ChangeListDragBean) = dragBean.unversionedFiles.isNotEmpty() + + @ApiStatus.Internal + override fun acceptDrop(dragOwner: ChangeListOwner, dragBean: ChangeListDragBean) { + ChangesTreeCompatibilityProvider.getInstance().acceptIgnoredFilesDrop(project, dragOwner, dragBean) + } + + @Nls + override fun getTextPresentation(): String = getUserObject().toString() //NON-NLS + + override fun getSortWeight(): Int = ChangesBrowserNode.IGNORED_SORT_WEIGHT +} \ No newline at end of file diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserLocallyDeletedNode.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserLocallyDeletedNode.java similarity index 96% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserLocallyDeletedNode.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserLocallyDeletedNode.java index bf82c1167da5..502f2206cbc7 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserLocallyDeletedNode.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserLocallyDeletedNode.java @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; import com.intellij.openapi.vcs.FilePath; diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserLockedFoldersNode.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserLockedFoldersNode.java similarity index 58% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserLockedFoldersNode.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserLockedFoldersNode.java index f4df18ac3ad3..4b72fad42e54 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserLockedFoldersNode.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserLockedFoldersNode.java @@ -1,9 +1,9 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; import com.intellij.openapi.project.Project; import com.intellij.openapi.vcs.VcsBundle; -import com.intellij.openapi.vcs.changes.ChangeProvider; +import com.intellij.openapi.vcs.changes.ChangesTreeCompatibilityProvider; import com.intellij.openapi.vcs.changes.issueLinks.TreeLinkMouseListener; import com.intellij.ui.JBColor; import com.intellij.ui.SimpleTextAttributes; @@ -11,12 +11,12 @@ import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.NotNull; -import static com.intellij.openapi.vcs.changes.ChangesUtil.processVirtualFilesByVcs; import static com.intellij.ui.SimpleTextAttributes.*; import static com.intellij.util.FontUtil.spaceAndThinSpace; @ApiStatus.Internal -public class ChangesBrowserLockedFoldersNode extends ChangesBrowserNode implements TreeLinkMouseListener.HaveTooltip { +public class ChangesBrowserLockedFoldersNode extends ChangesBrowserNode + implements TreeLinkMouseListener.HaveTooltip { private static final @NotNull SimpleTextAttributes CLEANUP_LINK_ATTRIBUTES = new SimpleTextAttributes(STYLE_UNDERLINE, JBColor.RED); @@ -36,32 +36,16 @@ public class ChangesBrowserLockedFoldersNode extends ChangesBrowserNode myNode; - - private CleanupWorker(@NotNull Project project, @NotNull ChangesBrowserNode node) { - myProject = project; - myNode = node; - } - - @Override - public void run() { - processVirtualFilesByVcs(myProject, myNode.iterateFilesUnder().toList(), (vcs, files) -> { - ChangeProvider provider = vcs.getChangeProvider(); - if (provider != null) { - provider.doCleanup(files); - } - }); - } - } } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserLogicallyLockedFile.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserLogicallyLockedFile.java similarity index 66% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserLogicallyLockedFile.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserLogicallyLockedFile.java index 06aa0b358aa8..15c36eb0e6e9 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserLogicallyLockedFile.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserLogicallyLockedFile.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; import com.intellij.openapi.project.Project; diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserNode.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserNode.java similarity index 92% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserNode.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserNode.java index e0f7e406e61e..ddb69051c0cc 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserNode.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserNode.java @@ -14,18 +14,13 @@ import com.intellij.openapi.vcs.FileStatus; import com.intellij.openapi.vcs.VcsBundle; import com.intellij.openapi.vcs.changes.*; import com.intellij.openapi.vfs.VirtualFile; -import com.intellij.openapi.vfs.newvfs.VfsPresentationUtil; import com.intellij.ui.ColoredTreeCellRenderer; -import com.intellij.ui.DirtyUI; import com.intellij.ui.JBColor; import com.intellij.ui.SimpleTextAttributes; -import com.intellij.util.ObjectUtils; import com.intellij.util.SlowOperations; import com.intellij.util.containers.Convertor; import com.intellij.util.containers.JBIterable; import com.intellij.util.ui.tree.TreeUtil; -import com.intellij.vcsUtil.VcsImplUtil; -import com.intellij.vcsUtil.VcsUtil; import org.jetbrains.annotations.*; import javax.swing.*; @@ -80,19 +75,19 @@ public abstract class ChangesBrowserNode extends DefaultMutableTreeNode imple } @ApiStatus.Internal - final @Nullable Color getBackgroundColorCached() { + public final @Nullable Color getBackgroundColorCached() { Color backgroundColor = myBackgroundColor; return backgroundColor == UNKNOWN_COLOR ? null : backgroundColor; } @ApiStatus.Internal - final boolean hasBackgroundColorCached() { + public final boolean hasBackgroundColorCached() { Color backgroundColor = myBackgroundColor; return backgroundColor != UNKNOWN_COLOR; } @ApiStatus.Internal - final boolean cacheBackgroundColor(@NotNull Project project) { + public final boolean cacheBackgroundColor(@NotNull Project project) { Color backgroundColor = myBackgroundColor; if (backgroundColor != UNKNOWN_COLOR) return false; @@ -355,7 +350,7 @@ public abstract class ChangesBrowserNode extends DefaultMutableTreeNode imple protected void appendParentPath(@NotNull ChangesBrowserNodeRenderer renderer, @Nullable FilePath parentPath) { if (parentPath != null) { - String presentablePath = VcsUtil.getPresentablePath(renderer.getProject(), parentPath, true, true); + String presentablePath = ChangesTreeCompatibilityProvider.getInstance().getPresentablePath(renderer.getProject(), parentPath, true, true); if (presentablePath.isEmpty()) return; renderer.append(spaceAndThinSpace() + presentablePath, SimpleTextAttributes.GRAYED_ATTRIBUTES); } @@ -363,7 +358,7 @@ public abstract class ChangesBrowserNode extends DefaultMutableTreeNode imple protected void appendParentPath(@NotNull ChangesBrowserNodeRenderer renderer, @Nullable VirtualFile parentPath) { if (parentPath != null) { - String presentablePath = VcsUtil.getPresentablePath(renderer.getProject(), parentPath, true, true); + String presentablePath = ChangesTreeCompatibilityProvider.getInstance().getPresentablePath(renderer.getProject(), parentPath, true, true); if (presentablePath.isEmpty()) return; renderer.append(spaceAndThinSpace() + presentablePath, SimpleTextAttributes.GRAYED_ATTRIBUTES); } @@ -378,28 +373,8 @@ public abstract class ChangesBrowserNode extends DefaultMutableTreeNode imple return getBackgroundColorFor(project, getUserObject()); } - @DirtyUI protected static @Nullable Color getBackgroundColorFor(@NotNull Project project, @Nullable Object object) { - VirtualFile file; - if (object instanceof FilePath) { - file = getScopeVirtualFileFor((FilePath)object); - } - else if (object instanceof Change) { - file = getScopeVirtualFileFor(ChangesUtil.getFilePath((Change)object)); - } - else { - file = ObjectUtils.tryCast(object, VirtualFile.class); - } - - if (file != null) { - return VfsPresentationUtil.getFileBackgroundColor(project, file); - } - return null; - } - - private static @Nullable VirtualFile getScopeVirtualFileFor(@NotNull FilePath filePath) { - if (filePath.isNonLocal()) return null; - return VcsImplUtil.findValidParentAccurately(filePath); + return ChangesTreeCompatibilityProvider.getInstance().getBackgroundColorFor(project, object); } public boolean shouldExpandByDefault() { diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserNodeCopyProvider.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserNodeCopyProvider.java similarity index 96% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserNodeCopyProvider.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserNodeCopyProvider.java index 7bce163ec5cc..96f3e621744a 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserNodeCopyProvider.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserNodeCopyProvider.java @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; import com.intellij.ide.CopyProvider; diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserNodeRenderer.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserNodeRenderer.java similarity index 88% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserNodeRenderer.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserNodeRenderer.java index 79818826e231..14c52e3bbba3 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserNodeRenderer.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserNodeRenderer.java @@ -1,20 +1,18 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.BooleanGetter; import com.intellij.openapi.util.NlsSafe; import com.intellij.openapi.vcs.FilePath; -import com.intellij.openapi.vcs.changes.FilePathIconProvider; +import com.intellij.openapi.vcs.changes.ChangesTreeCompatibilityProvider; import com.intellij.openapi.vcs.changes.issueLinks.IssueLinkRenderer; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.ui.ColoredTreeCellRenderer; import com.intellij.ui.DirtyUI; import com.intellij.ui.SimpleTextAttributes; import com.intellij.ui.speedSearch.SpeedSearchUtil; -import com.intellij.util.PlatformIcons; import com.intellij.util.ui.JBInsets; -import com.intellij.vcsUtil.VcsUtil; import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -103,17 +101,7 @@ public class ChangesBrowserNodeRenderer extends ColoredTreeCellRenderer { * @param isDirectory directory flag is specified explicitly, as {@link FilePath#isDirectory()} can be unreliable */ public void setIcon(@NotNull FilePath filePath, boolean isDirectory) { - Icon icon = FilePathIconProvider.EP_NAME.computeSafeIfAny(provider -> provider.getIcon(filePath, isDirectory, myProject)); - if (icon != null) { - setIcon(icon); - return; - } - - if (isDirectory) { - setIcon(PlatformIcons.FOLDER_ICON); - return; - } - setIcon(VcsUtil.getIcon(myProject, filePath)); + setIcon(ChangesTreeCompatibilityProvider.getInstance().getIcon(myProject, filePath, isDirectory)); } public void setBackgroundInsets(@Nullable JBInsets backgroundInsets) { diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserResolvedConflictsNode.kt b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserResolvedConflictsNode.kt similarity index 89% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserResolvedConflictsNode.kt rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserResolvedConflictsNode.kt index b3ef712e1b5c..d7e257d5188a 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserResolvedConflictsNode.kt +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserResolvedConflictsNode.kt @@ -4,11 +4,13 @@ package com.intellij.openapi.vcs.changes.ui import com.intellij.openapi.project.Project import com.intellij.openapi.vcs.VcsBundle import com.intellij.ui.SimpleTextAttributes +import org.jetbrains.annotations.ApiStatus @JvmField internal val RESOLVED_CONFLICTS_NODE_TAG: ChangesBrowserNode.Tag = object : ChangesBrowserNode.Tag {} -internal class ChangesBrowserResolvedConflictsNode( +@ApiStatus.Internal +class ChangesBrowserResolvedConflictsNode( val project: Project, private val attributes: SimpleTextAttributes = SimpleTextAttributes.REGULAR_ATTRIBUTES, ) : TagChangesBrowserNode(RESOLVED_CONFLICTS_NODE_TAG, attributes, true) { diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserRootNode.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserRootNode.java similarity index 89% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserRootNode.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserRootNode.java index b5663a19963f..df5f0399bd47 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserRootNode.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserRootNode.java @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; import org.jetbrains.annotations.ApiStatus; diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserSpecificFilePathsNode.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserSpecificFilePathsNode.java similarity index 90% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserSpecificFilePathsNode.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserSpecificFilePathsNode.java index 0fc4c990ff60..3c0d61f9b01c 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserSpecificFilePathsNode.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserSpecificFilePathsNode.java @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; import com.intellij.openapi.vcs.FilePath; diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserSpecificFilesNode.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserSpecificFilesNode.java similarity index 91% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserSpecificFilesNode.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserSpecificFilesNode.java index 609ef003bb4f..b07693a183e4 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserSpecificFilesNode.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserSpecificFilesNode.java @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; import com.intellij.openapi.vfs.VirtualFile; diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserSpecificNode.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserSpecificNode.java similarity index 97% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserSpecificNode.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserSpecificNode.java index 146bd0f7591e..b5f7626b154b 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserSpecificNode.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserSpecificNode.java @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; import com.intellij.openapi.util.registry.Registry; diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserStringNode.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserStringNode.java similarity index 86% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserStringNode.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserStringNode.java index 84558aa3e3bc..b0d709807ffc 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserStringNode.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserStringNode.java @@ -1,4 +1,4 @@ -// 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. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; import com.intellij.ui.SimpleTextAttributes; diff --git a/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserUnversionedFilesNode.kt b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserUnversionedFilesNode.kt new file mode 100644 index 000000000000..fef34d83ba85 --- /dev/null +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserUnversionedFilesNode.kt @@ -0,0 +1,25 @@ +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +package com.intellij.openapi.vcs.changes.ui + +import com.intellij.openapi.project.Project +import com.intellij.openapi.vcs.FilePath +import com.intellij.openapi.vcs.changes.ChangesTreeCompatibilityProvider +import org.jetbrains.annotations.Nls + +class ChangesBrowserUnversionedFilesNode(private val project: Project, + files: List) + : ChangesBrowserSpecificFilePathsNode(UNVERSIONED_FILES_TAG, files, + { ChangesTreeCompatibilityProvider.getInstance().showUnversionedViewDialog(project) }) { + + override fun render(renderer: ChangesBrowserNodeRenderer, selected: Boolean, expanded: Boolean, hasFocus: Boolean) { + super.render(renderer, selected, expanded, hasFocus) + if (!project.isDisposed && ChangesTreeCompatibilityProvider.getInstance().isUnversionedInUpdateMode(project)) { + appendUpdatingState(renderer) + } + } + + @Nls + override fun getTextPresentation(): String = getUserObject().toString() //NON-NLS + + override fun getSortWeight(): Int = UNVERSIONED_SORT_WEIGHT +} \ No newline at end of file diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesComparator.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesComparator.java similarity index 95% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesComparator.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesComparator.java index d86a43ed9473..4382f83802b6 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesComparator.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesComparator.java @@ -1,14 +1,14 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; import com.intellij.ide.util.treeView.FileNameComparator; import com.intellij.openapi.vcs.FilePath; import com.intellij.openapi.vcs.changes.Change; import com.intellij.openapi.vcs.changes.ChangeListChange; -import com.intellij.openapi.vcs.changes.ChangesUtil; import com.intellij.openapi.vcs.changes.HierarchicalFilePathComparator; import com.intellij.openapi.vfs.VirtualFile; -import com.intellij.vcsUtil.VcsUtil; +import com.intellij.platform.vcs.VcsUtil; +import com.intellij.platform.vcs.changes.ChangesUtil; import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull; diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesFileNameDecorator.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesFileNameDecorator.java similarity index 82% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesFileNameDecorator.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesFileNameDecorator.java index 3a25679d9627..df725565f55d 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesFileNameDecorator.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesFileNameDecorator.java @@ -1,4 +1,4 @@ -// Copyright 2000-2021 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-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; import com.intellij.openapi.project.Project; diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesGroupingPolicy.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesGroupingPolicy.java similarity index 97% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesGroupingPolicy.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesGroupingPolicy.java index e68fe57e263e..198cd38daa9f 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesGroupingPolicy.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesGroupingPolicy.java @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; import com.intellij.icons.AllIcons; diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesGroupingPolicyFactory.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesGroupingPolicyFactory.java similarity index 90% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesGroupingPolicyFactory.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesGroupingPolicyFactory.java index 44d522726ed2..a74af047eb63 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesGroupingPolicyFactory.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesGroupingPolicyFactory.java @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; import com.intellij.openapi.extensions.ExtensionPointName; diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesGroupingPolicyFactoryEPBean.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesGroupingPolicyFactoryEPBean.java similarity index 94% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesGroupingPolicyFactoryEPBean.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesGroupingPolicyFactoryEPBean.java index 56d202041ec4..5e0a7ab0b69e 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesGroupingPolicyFactoryEPBean.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesGroupingPolicyFactoryEPBean.java @@ -1,4 +1,4 @@ -// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; import com.intellij.openapi.extensions.RequiredElement; diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesGroupingSupport.kt b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesGroupingSupport.kt similarity index 93% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesGroupingSupport.kt rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesGroupingSupport.kt index d9b3838a96fb..4f8196a547f1 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesGroupingSupport.kt +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesGroupingSupport.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2021 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-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui import com.intellij.concurrency.ConcurrentCollectionFactory @@ -94,11 +94,6 @@ open class ChangesGroupingSupport(val project: Project, source: Any, val showCon const val REPOSITORY_GROUPING = "repository" // NON-NLS const val NONE_GROUPING = "none" // NON-NLS - @JvmStatic - fun getFactory(key: String): ChangesGroupingPolicyFactory { - return findFactory(key) ?: NoneChangesGroupingFactory - } - @JvmStatic fun findFactory(key: String): ChangesGroupingPolicyFactory? { val availableFactories = GroupingPolicyFactoryHolder.getInstance().factories diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTree.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesTree.java similarity index 97% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTree.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesTree.java index 211fff787e86..c444e3a5bba3 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTree.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesTree.java @@ -20,13 +20,14 @@ import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.vcs.FilePath; import com.intellij.openapi.vcs.VcsBundle; import com.intellij.openapi.vcs.changes.Change; -import com.intellij.openapi.vcs.changes.ChangesUtil; +import com.intellij.openapi.vcs.changes.ChangesTreeCompatibilityProvider; import com.intellij.openapi.vcs.changes.InclusionListener; import com.intellij.openapi.vcs.changes.InclusionModel; import com.intellij.openapi.vcs.changes.issueLinks.TreeLinkMouseListener; -import com.intellij.openapi.vcs.merge.MergeConflictManager; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.openapi.wm.impl.IdeGlassPaneImpl; +import com.intellij.platform.vcs.VcsUtil; +import com.intellij.platform.vcs.changes.ChangesUtil; import com.intellij.ui.ClickListener; import com.intellij.ui.PopupHandler; import com.intellij.ui.SmartExpander; @@ -41,8 +42,6 @@ import com.intellij.util.containers.TreeTraversal; import com.intellij.util.ui.JBUI; import com.intellij.util.ui.UpdateScaleHelper; import com.intellij.util.ui.tree.TreeUtil; -import com.intellij.vcs.commit.CommitSessionCollector; -import com.intellij.vcsUtil.VcsUtil; import org.intellij.lang.annotations.JdkConstants; import org.intellij.lang.annotations.Language; import org.jetbrains.annotations.*; @@ -211,9 +210,6 @@ public abstract class ChangesTree extends Tree implements UiCompatibleDataProvid setSelectionPath(path); List selected = getIncludableUserObjects(selected(ChangesTree.this)); - if (MergeConflictManager.isForceIncludeResolvedConflicts()) { - selected = ContainerUtil.filter(selected, item -> !MergeConflictManager.getInstance(myProject).isResolvedConflict(item)); - } boolean exclude = toggleChanges(selected); logInclusionToggleEvents(exclude, event); return true; @@ -848,7 +844,7 @@ public abstract class ChangesTree extends Tree implements UiCompatibleDataProvid private void installCommitSessionEventsListeners() { addSelectionListener(() -> { if (myEventProcessingInProgress instanceof MouseEvent && shouldLogCommitSessionEvents()) { - CommitSessionCollector.getInstance(myProject).logFileSelected((MouseEvent)myEventProcessingInProgress); + ChangesTreeCompatibilityProvider.getInstance().logFileSelected(myProject, (MouseEvent)myEventProcessingInProgress); } }); } @@ -856,14 +852,14 @@ public abstract class ChangesTree extends Tree implements UiCompatibleDataProvid @ApiStatus.Internal public void logInclusionToggleEvents(boolean exclude, @NonNls MouseEvent event) { if (shouldLogCommitSessionEvents()) { - CommitSessionCollector.getInstance(myProject).logInclusionToggle(exclude, event); + ChangesTreeCompatibilityProvider.getInstance().logInclusionToggle(myProject, exclude, event); } } @ApiStatus.Internal public void logInclusionToggleEvents(boolean exclude, @NotNull AnActionEvent event) { if (shouldLogCommitSessionEvents()) { - CommitSessionCollector.getInstance(myProject).logInclusionToggle(exclude, event); + ChangesTreeCompatibilityProvider.getInstance().logInclusionToggle(myProject, exclude, event); } } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTreeCellRenderer.kt b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesTreeCellRenderer.kt similarity index 98% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTreeCellRenderer.kt rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesTreeCellRenderer.kt index 421dad83e567..88d2bc14612f 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTreeCellRenderer.kt +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesTreeCellRenderer.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui import com.intellij.openapi.actionSystem.ActionManager diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTreeHandlers.kt b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesTreeHandlers.kt similarity index 91% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTreeHandlers.kt rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesTreeHandlers.kt index b48e0db302b0..ae8762425d2c 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTreeHandlers.kt +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesTreeHandlers.kt @@ -1,4 +1,4 @@ -// 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. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui import com.intellij.ui.DoubleClickListener diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTreeModel.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesTreeModel.java similarity index 92% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTreeModel.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesTreeModel.java index 795ac96e0dc6..60ede2686d8b 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTreeModel.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesTreeModel.java @@ -1,4 +1,4 @@ -// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; import org.jetbrains.annotations.ApiStatus; diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesViewModelBuilder.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesViewModelBuilder.java similarity index 80% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesViewModelBuilder.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesViewModelBuilder.java index 84d83a047dec..e85fee1fb817 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesViewModelBuilder.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/ChangesViewModelBuilder.java @@ -1,4 +1,4 @@ -// 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. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; import com.intellij.openapi.vcs.changes.Change; diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/DefaultChangesGroupingPolicy.kt b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/DefaultChangesGroupingPolicy.kt similarity index 89% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/DefaultChangesGroupingPolicy.kt rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/DefaultChangesGroupingPolicy.kt index 0f55690d60ff..7cf99734b2ff 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/DefaultChangesGroupingPolicy.kt +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/DefaultChangesGroupingPolicy.kt @@ -1,9 +1,9 @@ -// 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-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui import com.intellij.openapi.project.Project import com.intellij.openapi.vcs.FileStatus -import com.intellij.openapi.vcs.changes.ChangeListManager +import com.intellij.openapi.vcs.changes.ChangesTreeCompatibilityProvider import org.jetbrains.annotations.ApiStatus import javax.swing.tree.DefaultTreeModel @@ -38,7 +38,7 @@ class DefaultChangesGroupingPolicy(val project: Project, model: DefaultTreeModel private fun isMergeConflict(nodePath: StaticFilePath, node: ChangesBrowserNode<*>): Boolean { if (node is ChangesGroupingPolicy.CompatibilityPlaceholderChangesBrowserNode) { val vFile = nodePath.resolve() ?: return false - val status = ChangeListManager.getInstance(project).getStatus(vFile) + val status = ChangesTreeCompatibilityProvider.getInstance().getFileStatus(project, vFile) return isMergeConflict(status) } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/DefaultInclusionModel.kt b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/DefaultInclusionModel.kt similarity index 94% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/DefaultInclusionModel.kt rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/DefaultInclusionModel.kt index 6bd317794af4..2b6399404a0f 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/DefaultInclusionModel.kt +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/DefaultInclusionModel.kt @@ -1,4 +1,4 @@ -// 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. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui import com.intellij.openapi.vcs.changes.InclusionListener @@ -7,7 +7,6 @@ import com.intellij.util.EventDispatcher import com.intellij.util.containers.CollectionFactory import com.intellij.util.containers.HashingStrategy import com.intellij.util.ui.ThreeStateCheckBox -import com.intellij.vcsUtil.VcsUtil import org.jetbrains.annotations.ApiStatus import java.util.* import java.util.concurrent.locks.ReentrantReadWriteLock @@ -75,7 +74,7 @@ class DefaultInclusionModel( override fun removeInclusion(items: Collection) { val wasChanged = lock.write { - VcsUtil.removeAllFromSet(inclusion, items) + items.fold(false) { acc, element -> acc || inclusion.remove(element) } } if (wasChanged) fireInclusionChanged() } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/FixedHeightSampleChangesBrowserNode.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/FixedHeightSampleChangesBrowserNode.java similarity index 92% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/FixedHeightSampleChangesBrowserNode.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/FixedHeightSampleChangesBrowserNode.java index 6c34efd62b0a..bd5190f40d36 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/FixedHeightSampleChangesBrowserNode.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/FixedHeightSampleChangesBrowserNode.java @@ -1,4 +1,4 @@ -// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; import com.intellij.icons.AllIcons; diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/GroupingPolicyFactoryHolder.kt b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/GroupingPolicyFactoryHolder.kt similarity index 100% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/GroupingPolicyFactoryHolder.kt rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/GroupingPolicyFactoryHolder.kt diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/SimpleChangesGroupingPolicy.kt b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/SimpleChangesGroupingPolicy.kt similarity index 80% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/SimpleChangesGroupingPolicy.kt rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/SimpleChangesGroupingPolicy.kt index 7b70284be0e4..f31067f06bff 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/SimpleChangesGroupingPolicy.kt +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/SimpleChangesGroupingPolicy.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui import com.intellij.openapi.util.NotNullLazyKey @@ -6,9 +6,11 @@ import org.jetbrains.annotations.ApiStatus import javax.swing.tree.DefaultTreeModel abstract class SimpleChangesGroupingPolicy(val model: DefaultTreeModel) : BaseChangesGroupingPolicy() { - final override fun getParentNodeFor(nodePath: StaticFilePath, - node: ChangesBrowserNode<*>, - subtreeRoot: ChangesBrowserNode<*>): ChangesBrowserNode<*>? { + final override fun getParentNodeFor( + nodePath: StaticFilePath, + node: ChangesBrowserNode<*>, + subtreeRoot: ChangesBrowserNode<*>, + ): ChangesBrowserNode<*>? { val nextPolicyGroup = nextPolicy?.getParentNodeFor(nodePath, node, subtreeRoot) val grandParent = nextPolicyGroup ?: subtreeRoot val cachingRoot = getCachingRoot(grandParent, subtreeRoot) @@ -25,8 +27,8 @@ abstract class SimpleChangesGroupingPolicy(val model: DefaultTreeModel) GROUP_NODE_CACHE.getValue(cachingRoot)[groupNodeValue] = groupNode if (groupNode is ChangesBrowserNode.NodeWithFilePath) { - val staticFilePath = TreeModelBuilder.staticFrom(groupNode.nodeFilePath) - TreeModelBuilder.DIRECTORY_CACHE.getValue(groupNode)[staticFilePath.key] = groupNode + val staticFilePath = StaticFilePath(groupNode.nodeFilePath) + TreeModelBuilderKeys.DIRECTORY_CACHE.getValue(groupNode)[staticFilePath.key] = groupNode } return groupNode diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/StaticFilePath.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/StaticFilePath.java similarity index 86% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/StaticFilePath.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/StaticFilePath.java index cf83a7c36853..5d5bb1da76e3 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/StaticFilePath.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/StaticFilePath.java @@ -1,9 +1,9 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; import com.intellij.openapi.vcs.FilePath; +import com.intellij.openapi.vcs.changes.ChangesTreeCompatibilityProvider; import com.intellij.openapi.vcs.changes.FilePathsHelper; -import com.intellij.openapi.vfs.LocalFileSystem; import com.intellij.openapi.vfs.VirtualFile; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -53,6 +53,6 @@ public class StaticFilePath { } public @Nullable VirtualFile resolve() { - return LocalFileSystem.getInstance().findFileByPath(getPath()); + return ChangesTreeCompatibilityProvider.getInstance().resolveLocalFile(getPath()); } } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/TagChangesBrowserNode.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/TagChangesBrowserNode.java similarity index 88% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/TagChangesBrowserNode.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/TagChangesBrowserNode.java index 0151ac0242c0..be7ab5c36d92 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/TagChangesBrowserNode.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/TagChangesBrowserNode.java @@ -1,4 +1,4 @@ -// 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. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; import com.intellij.ui.SimpleTextAttributes; diff --git a/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/TreeModelBuilderKeys.kt b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/TreeModelBuilderKeys.kt new file mode 100644 index 000000000000..da3f83b4a821 --- /dev/null +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/TreeModelBuilderKeys.kt @@ -0,0 +1,24 @@ +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +package com.intellij.openapi.vcs.changes.ui + +import com.intellij.openapi.util.Key +import com.intellij.openapi.util.NotNullLazyKey +import org.jetbrains.annotations.ApiStatus + +@ApiStatus.Internal +object TreeModelBuilderKeys { + /** + * Node grouping forms hierarchical structure. + * For example, one module may have multiple content roots - and these roots may belong to different git repositories. + * In this case, root caching should be performed at the particular repository node instead of a subtreeRoot + * (this way each repository node will get its own module group node inside). + * + * + * Prefer using [BaseChangesGroupingPolicy] methods or implementing [SimpleChangesGroupingPolicy] instead of using it directly. + */ + @JvmField + val IS_CACHING_ROOT: Key = Key.create("ChangesTree.IsCachingRoot") + + @JvmField + val DIRECTORY_CACHE: NotNullLazyKey>, ChangesBrowserNode<*>> = NotNullLazyKey.createLazyKey("ChangesTree.DirectoryCache") { mutableMapOf() } +} \ No newline at end of file diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/VcsTreeModelData.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/VcsTreeModelData.java similarity index 91% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/VcsTreeModelData.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/VcsTreeModelData.java index 069743670558..373239cded84 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/VcsTreeModelData.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/VcsTreeModelData.java @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; import com.intellij.ide.FileSelectInContext; @@ -8,15 +8,16 @@ import com.intellij.openapi.actionSystem.CommonDataKeys; import com.intellij.openapi.actionSystem.DataSink; import com.intellij.openapi.project.Project; import com.intellij.openapi.vcs.FilePath; -import com.intellij.openapi.vcs.VcsDataKeys; import com.intellij.openapi.vcs.changes.Change; -import com.intellij.openapi.vcs.changes.ChangesUtil; import com.intellij.openapi.vfs.VirtualFile; +import com.intellij.platform.vcs.VcsUtil; +import com.intellij.platform.vcs.changes.ChangesDataKeys; +import com.intellij.platform.vcs.changes.ChangesUtil; import com.intellij.util.ObjectUtils; import com.intellij.util.containers.ContainerUtil; import com.intellij.util.containers.JBIterable; import com.intellij.util.containers.JBTreeTraverser; -import com.intellij.vcsUtil.VcsUtil; +import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -290,15 +291,15 @@ public abstract class VcsTreeModelData { sink.set(CommonDataKeys.PROJECT, project); Change[] changes = mapToChange(selected(tree)).toArray(Change.EMPTY_CHANGE_ARRAY); - sink.set(VcsDataKeys.CHANGES, + sink.set(ChangesDataKeys.CHANGES, changes.length != 0 ? changes : mapToChange(all(tree)).toArray(Change.EMPTY_CHANGE_ARRAY)); - sink.set(VcsDataKeys.SELECTED_CHANGES, changes); - sink.set(VcsDataKeys.SELECTED_CHANGES_IN_DETAILS, changes); - sink.set(VcsDataKeys.CHANGES_SELECTION, + sink.set(ChangesDataKeys.SELECTED_CHANGES, changes); + sink.set(ChangesDataKeys.SELECTED_CHANGES_IN_DETAILS, changes); + sink.set(ChangesDataKeys.CHANGES_SELECTION, getListSelectionOrAll(tree).map(entry -> ObjectUtils.tryCast(entry, Change.class))); - sink.set(VcsDataKeys.CHANGE_LEAD_SELECTION, + sink.set(ChangesDataKeys.CHANGE_LEAD_SELECTION, mapToChange(exactlySelected(tree)).toArray(Change.EMPTY_CHANGE_ARRAY)); - sink.set(VcsDataKeys.FILE_PATHS, mapToFilePath(selected(tree))); + sink.set(ChangesDataKeys.FILE_PATHS, mapToFilePath(selected(tree))); VcsTreeModelData treeSelection = selected(tree); VcsTreeModelData exactSelection = exactlySelected(tree); @@ -308,7 +309,7 @@ public abstract class VcsTreeModelData { if (file == null) return null; return new FileSelectInContext(project, file, null); }); - sink.lazy(VcsDataKeys.VIRTUAL_FILES, () -> { + sink.lazy(ChangesDataKeys.VIRTUAL_FILES, () -> { return mapToVirtualFile(treeSelection); }); sink.lazy(CommonDataKeys.VIRTUAL_FILE, () -> { @@ -329,7 +330,8 @@ public abstract class VcsTreeModelData { .filter(Change.class); } - static @NotNull JBIterable mapToNavigatableFile(@NotNull VcsTreeModelData data) { + @ApiStatus.Internal + public static @NotNull JBIterable mapToNavigatableFile(@NotNull VcsTreeModelData data) { return data.iterateUserObjects() .flatMap(entry -> { if (entry instanceof Change) { @@ -348,7 +350,8 @@ public abstract class VcsTreeModelData { .filter(VirtualFile::isValid); } - static @Nullable VirtualFile findSelectedVirtualFile(@NotNull JTree tree) { + @ApiStatus.Internal + public static @Nullable VirtualFile findSelectedVirtualFile(@NotNull JTree tree) { TreePath leadSelectionPath = tree.getLeadSelectionPath(); if (leadSelectionPath == null) return null; return treePathToVirtualFile(leadSelectionPath); @@ -360,11 +363,13 @@ public abstract class VcsTreeModelData { return virtualFile; } - static @NotNull JBIterable mapToVirtualFile(@NotNull VcsTreeModelData data) { + @ApiStatus.Internal + public static @NotNull JBIterable mapToVirtualFile(@NotNull VcsTreeModelData data) { return mapObjectToVirtualFile(data.iterateUserObjects()); } - static @NotNull JBIterable mapObjectToVirtualFile(@NotNull JBIterable userObjects) { + @ApiStatus.Internal + public static @NotNull JBIterable mapObjectToVirtualFile(@NotNull JBIterable userObjects) { return userObjects .map(VcsTreeModelData::objectToVirtualFile) .filterNotNull() @@ -385,7 +390,8 @@ public abstract class VcsTreeModelData { return null; } - static @NotNull JBIterable mapToFilePath(@NotNull VcsTreeModelData data) { + @ApiStatus.Internal + public static @NotNull JBIterable mapToFilePath(@NotNull VcsTreeModelData data) { return data.iterateUserObjects() .map(VcsTreeModelData::mapUserObjectToFilePath) .filterNotNull(); diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/VirtualFileHierarchicalComparator.java b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/VirtualFileHierarchicalComparator.java similarity index 86% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/VirtualFileHierarchicalComparator.java rename to platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/VirtualFileHierarchicalComparator.java index 12964fd19321..2630c5025dc1 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/VirtualFileHierarchicalComparator.java +++ b/platform/vcs-impl/shared/src/com/intellij/openapi/vcs/changes/ui/VirtualFileHierarchicalComparator.java @@ -1,4 +1,4 @@ -// Copyright 2000-2018 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-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.changes.ui; import com.intellij.openapi.vfs.VirtualFile; diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/BackendChangesTreeCompatibilityProvider.kt b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/BackendChangesTreeCompatibilityProvider.kt new file mode 100644 index 000000000000..eb7c07391d97 --- /dev/null +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/BackendChangesTreeCompatibilityProvider.kt @@ -0,0 +1,126 @@ +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +package com.intellij.openapi.vcs.changes.ui + +import com.intellij.ide.DataManager +import com.intellij.openapi.actionSystem.AnActionEvent +import com.intellij.openapi.project.Project +import com.intellij.openapi.ui.popup.JBPopupFactory +import com.intellij.openapi.util.NlsSafe +import com.intellij.openapi.vcs.AbstractVcsHelper +import com.intellij.openapi.vcs.FilePath +import com.intellij.openapi.vcs.FileStatus +import com.intellij.openapi.vcs.changes.* +import com.intellij.openapi.vcs.changes.ignore.actions.IgnoreFileActionGroup +import com.intellij.openapi.vfs.LocalFileSystem +import com.intellij.openapi.vfs.VirtualFile +import com.intellij.openapi.vfs.newvfs.VfsPresentationUtil +import com.intellij.platform.vcs.changes.ChangesUtil.getFilePath +import com.intellij.ui.awt.RelativePoint +import com.intellij.ui.treeStructure.Tree +import com.intellij.util.PlatformIcons +import com.intellij.vcs.commit.CommitSessionCollector +import com.intellij.vcsUtil.VcsImplUtil +import com.intellij.vcsUtil.VcsUtil +import com.intellij.vcsUtil.VcsUtil.getVcsFor +import java.awt.Color +import java.awt.event.MouseEvent +import javax.swing.Icon +import javax.swing.tree.TreePath + +internal class BackendChangesTreeCompatibilityProvider : ChangesTreeCompatibilityProvider { + override fun getBackgroundColorFor(project: Project, obj: Any?): Color? { + val file = when (obj) { + is FilePath -> getScopeVirtualFileFor(obj) + is Change -> getScopeVirtualFileFor(getFilePath(obj)) + else -> obj as? VirtualFile? + } + + return if (file != null) VfsPresentationUtil.getFileBackgroundColor(project, file) else null + } + + override fun getPresentablePath(project: Project?, path: VirtualFile, useRelativeRootPaths: Boolean, acceptEmptyPath: Boolean): @NlsSafe String = + VcsUtil.getPresentablePath(project, path, true, true) + + override fun getIcon(project: Project?, filePath: FilePath, isDirectory: Boolean): Icon? { + val icon = FilePathIconProvider.EP_NAME.computeSafeIfAny({ provider -> provider.getIcon(filePath, isDirectory, project) }) + if (icon != null) { + return icon + } + + if (isDirectory) { + return PlatformIcons.FOLDER_ICON + } + + return VcsUtil.getIcon(project, filePath) + } + + override fun getFileStatus(project: Project, file: VirtualFile): FileStatus = + ChangeListManager.getInstance(project).getStatus(file) + + override fun getPresentablePath(project: Project?, path: FilePath, useRelativeRootPaths: Boolean, acceptEmptyPath: Boolean): @NlsSafe String = + VcsUtil.getPresentablePath(project, path, true, true) + + override fun getLockedFilesCleanupWorker(project: Project, lockedFoldersNode: ChangesBrowserLockedFoldersNode): Runnable = + Runnable { + ChangesUtil.processVirtualFilesByVcs(project, lockedFoldersNode.iterateFilesUnder().toList(), { vcs, files -> + vcs.changeProvider?.doCleanup(files) + }) + } + + override fun logInclusionToggle(project: Project, exclude: Boolean, event: MouseEvent) { + CommitSessionCollector.getInstance(project).logInclusionToggle(exclude, event) + } + + override fun logInclusionToggle(project: Project, exclude: Boolean, event: AnActionEvent) { + CommitSessionCollector.getInstance(project).logInclusionToggle(exclude, event) + } + + override fun logFileSelected(project: Project, event: MouseEvent) { + CommitSessionCollector.getInstance(project).logFileSelected(event) + } + + override fun getSwitchedBranch(project: Project, file: VirtualFile): @NlsSafe String? = + ChangeListManager.getInstance(project).getSwitchedBranch(file) + + override fun showResolveConflictsDialog(project: Project, changes: List) { + AbstractVcsHelper.getInstance(project).showMergeDialog(ChangesUtil.iterateFiles(changes).toList()) + } + + override fun showIgnoredViewDialog(project: Project) { + if (!project.isDisposed) IgnoredViewDialog(project).show() + } + + override fun isIgnoredInUpdateMode(project: Project): Boolean { + return ChangeListManagerImpl.getInstanceImpl(project).isIgnoredInUpdateMode + } + + override fun showUnversionedViewDialog(project: Project) { + if (!project.isDisposed) UnversionedViewDialog(project).show() + } + + override fun isUnversionedInUpdateMode(project: Project): Boolean { + return ChangeListManagerImpl.getInstanceImpl(project).isUnversionedInUpdateMode + } + + override fun resolveLocalFile(path: String): VirtualFile? = LocalFileSystem.getInstance().findFileByPath(path) + + private fun getScopeVirtualFileFor(filePath: FilePath): VirtualFile? { + if (filePath.isNonLocal()) return null + return VcsImplUtil.findValidParentAccurately(filePath) + } + + override fun acceptIgnoredFilesDrop(project: Project, dragOwner: ChangeListOwner, dragBean: ChangeListDragBean) { + val tree = dragBean.sourceComponent as? Tree ?: return + val vcs = dragBean.unversionedFiles.firstNotNullOfOrNull { file -> getVcsFor(project, file) } ?: return + + val ignoreFileType = VcsIgnoreManagerImpl.getInstanceImpl(project).findIgnoreFileType(vcs) ?: return + val ignoreGroup = IgnoreFileActionGroup(ignoreFileType) + + val popup = JBPopupFactory.getInstance().createActionGroupPopup( + null, ignoreGroup, DataManager.getInstance().getDataContext(dragBean.sourceComponent), + JBPopupFactory.ActionSelectionAid.SPEEDSEARCH, false) + tree.getPathBounds(TreePath(dragBean.targetNode.path))?.let { dropBounds -> + popup.show(RelativePoint(dragBean.sourceComponent, dropBounds.location)) + } + } +} diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserIgnoredFilesNode.kt b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserIgnoredFilesNode.kt deleted file mode 100644 index d14ad46e65e4..000000000000 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserIgnoredFilesNode.kt +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2000-2009 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.intellij.openapi.vcs.changes.ui - -import com.intellij.ide.DataManager -import com.intellij.openapi.project.Project -import com.intellij.openapi.ui.popup.JBPopupFactory -import com.intellij.openapi.vcs.AbstractVcs -import com.intellij.openapi.vcs.FilePath -import com.intellij.openapi.vcs.changes.ChangeListManagerImpl -import com.intellij.openapi.vcs.changes.ChangeListOwner -import com.intellij.openapi.vcs.changes.IgnoredViewDialog -import com.intellij.openapi.vcs.changes.VcsIgnoreManagerImpl -import com.intellij.openapi.vcs.changes.ignore.actions.IgnoreFileActionGroup -import com.intellij.ui.awt.RelativePoint -import com.intellij.ui.treeStructure.Tree -import com.intellij.vcsUtil.VcsUtil -import org.jetbrains.annotations.ApiStatus -import org.jetbrains.annotations.Nls -import javax.swing.tree.TreePath - - -@ApiStatus.Internal -class ChangesBrowserIgnoredFilesNode(private val project: Project, - files: List) - : ChangesBrowserSpecificFilePathsNode(ChangesBrowserNode.IGNORED_FILES_TAG, files, - { if (!project.isDisposed) IgnoredViewDialog(project).show() }) { - - override fun render(renderer: ChangesBrowserNodeRenderer, selected: Boolean, expanded: Boolean, hasFocus: Boolean) { - super.render(renderer, selected, expanded, hasFocus) - if (!project.isDisposed && ChangeListManagerImpl.getInstanceImpl(project).isIgnoredInUpdateMode) { - appendUpdatingState(renderer) - } - } - - @ApiStatus.Internal - override fun canAcceptDrop(dragBean: ChangeListDragBean) = dragBean.unversionedFiles.isNotEmpty() - - @ApiStatus.Internal - override fun acceptDrop(dragOwner: ChangeListOwner, dragBean: ChangeListDragBean) { - val tree = dragBean.sourceComponent as? Tree ?: return - - val vcs = dragBean.unversionedFiles.getVcs() ?: return - - val ignoreFileType = VcsIgnoreManagerImpl.getInstanceImpl(project).findIgnoreFileType(vcs) ?: return - val ignoreGroup = IgnoreFileActionGroup(ignoreFileType) - - val popup = JBPopupFactory.getInstance().createActionGroupPopup( - null, ignoreGroup, DataManager.getInstance().getDataContext(dragBean.sourceComponent), - JBPopupFactory.ActionSelectionAid.SPEEDSEARCH, false) - tree.getPathBounds(TreePath(dragBean.targetNode.path))?.let { dropBounds -> - popup.show(RelativePoint(dragBean.sourceComponent, dropBounds.location)) - } - } - - @Nls - override fun getTextPresentation(): String = getUserObject().toString() //NON-NLS - - override fun getSortWeight(): Int = ChangesBrowserNode.IGNORED_SORT_WEIGHT - - private fun List.getVcs(): AbstractVcs? = firstNotNullOfOrNull { file -> VcsUtil.getVcsFor(project, file) } -} \ No newline at end of file diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserUnversionedFilesNode.kt b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserUnversionedFilesNode.kt deleted file mode 100644 index 042141bf05ec..000000000000 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserUnversionedFilesNode.kt +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2000-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.intellij.openapi.vcs.changes.ui - -import com.intellij.openapi.project.Project -import com.intellij.openapi.vcs.FilePath -import com.intellij.openapi.vcs.changes.ChangeListManagerImpl -import com.intellij.openapi.vcs.changes.UnversionedViewDialog -import org.jetbrains.annotations.Nls - -class ChangesBrowserUnversionedFilesNode(private val project: Project, - files: List) - : ChangesBrowserSpecificFilePathsNode(UNVERSIONED_FILES_TAG, files, - { if (!project.isDisposed) UnversionedViewDialog(project).show() }) { - - override fun render(renderer: ChangesBrowserNodeRenderer, selected: Boolean, expanded: Boolean, hasFocus: Boolean) { - super.render(renderer, selected, expanded, hasFocus) - if (!project.isDisposed && ChangeListManagerImpl.getInstanceImpl(project).isUnversionedInUpdateMode) { - appendUpdatingState(renderer) - } - } - - @Nls - override fun getTextPresentation(): String = getUserObject().toString() //NON-NLS - - override fun getSortWeight(): Int = UNVERSIONED_SORT_WEIGHT -} \ No newline at end of file diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/TreeModelBuilder.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/TreeModelBuilder.java index a626b39adf86..e97f9fdbc0ff 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/TreeModelBuilder.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/TreeModelBuilder.java @@ -32,6 +32,7 @@ import java.util.*; import java.util.function.Function; import static com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode.createLockedFolders; +import static com.intellij.openapi.vcs.changes.ui.TreeModelBuilderKeys.IS_CACHING_ROOT; import static com.intellij.util.ObjectUtils.notNull; import static com.intellij.util.containers.ContainerUtil.sorted; import static java.util.Comparator.comparing; @@ -40,21 +41,9 @@ import static java.util.Comparator.comparingInt; @SuppressWarnings("UnusedReturnValue") public class TreeModelBuilder implements ChangesViewModelBuilder { public static final Key>> PATH_NODE_BUILDER = Key.create("ChangesTree.PathNodeBuilder"); - public static final NotNullLazyKey>, ChangesBrowserNode> DIRECTORY_CACHE = - NotNullLazyKey.createLazyKey("ChangesTree.DirectoryCache", node -> new HashMap<>()); + public static final NotNullLazyKey>, ChangesBrowserNode> DIRECTORY_CACHE = TreeModelBuilderKeys.DIRECTORY_CACHE; private static final Key GROUPING_POLICY = Key.create("ChangesTree.GroupingPolicy"); - /** - * Node grouping forms hierarchical structure. - * For example, one module may have multiple content roots - and these roots may belong to different git repositories. - * In this case, root caching should be performed at the particular repository node instead of a subtreeRoot - * (this way each repository node will get its own module group node inside). - *

- * Prefer using {@link BaseChangesGroupingPolicy} methods or implementing {@link SimpleChangesGroupingPolicy} instead of using it directly. - */ - @ApiStatus.Internal - public static final Key IS_CACHING_ROOT = Key.create("ChangesTree.IsCachingRoot"); - /** * The helper UserData keys that will be cleaned at the end of the tree building to reduce memory footprint. */ diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/merge/MultipleFileMergeDialog.kt b/platform/vcs-impl/src/com/intellij/openapi/vcs/merge/MultipleFileMergeDialog.kt index 24ebcd6c0746..ff19a15b2245 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/merge/MultipleFileMergeDialog.kt +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/merge/MultipleFileMergeDialog.kt @@ -231,7 +231,8 @@ open class MultipleFileMergeDialog( private fun updateTree(treeStateStrategy: TreeTableStateStrategy) { val factory = when { - project != null && groupByDirectory -> ChangesGroupingSupport.getFactory(ChangesGroupingSupport.DIRECTORY_GROUPING) + project != null && groupByDirectory -> ChangesGroupingSupport.findFactory(ChangesGroupingSupport.DIRECTORY_GROUPING) + ?: NoneChangesGroupingFactory else -> NoneChangesGroupingFactory } val model = TreeModelBuilder.buildFromVirtualFiles(project, factory, unresolvedFiles) diff --git a/plugins/git-features-trainer/BUILD.bazel b/plugins/git-features-trainer/BUILD.bazel index 69c381eb69ae..b7f8810a6fa5 100644 --- a/plugins/git-features-trainer/BUILD.bazel +++ b/plugins/git-features-trainer/BUILD.bazel @@ -33,6 +33,7 @@ jvm_library( "//plugins/git4idea/shared", "//platform/lang-impl", "//platform/dvcs-impl/shared", + "//platform/vcs-impl/shared", ], runtime_deps = [":vcs-git-featuresTrainer_resources"] ) @@ -70,6 +71,7 @@ jvm_library( "//platform/testFramework", "//platform/testFramework:testFramework_test_lib", "//platform/dvcs-impl/shared", + "//platform/vcs-impl/shared", ], runtime_deps = [":vcs-git-featuresTrainer_resources"] ) diff --git a/plugins/git-features-trainer/intellij.vcs.git.featuresTrainer.iml b/plugins/git-features-trainer/intellij.vcs.git.featuresTrainer.iml index efe172fd595f..ecf880fe5f79 100644 --- a/plugins/git-features-trainer/intellij.vcs.git.featuresTrainer.iml +++ b/plugins/git-features-trainer/intellij.vcs.git.featuresTrainer.iml @@ -31,5 +31,6 @@ + \ No newline at end of file diff --git a/plugins/github/github-core/BUILD.bazel b/plugins/github/github-core/BUILD.bazel index 04e49f843ca3..6d0f74ae9637 100644 --- a/plugins/github/github-core/BUILD.bazel +++ b/plugins/github/github-core/BUILD.bazel @@ -77,6 +77,7 @@ jvm_library( "@lib//:gson", "//platform/dvcs-impl/shared", "//platform/ide-core-impl", + "//platform/vcs-impl/shared", ], runtime_deps = [ ":vcs-github_resources", @@ -163,6 +164,7 @@ jvm_library( "@lib//:vcs-github-apollographql-apollo-ast-jvm", "//platform/dvcs-impl/shared", "//platform/ide-core-impl", + "//platform/vcs-impl/shared", ], runtime_deps = [ ":vcs-github_resources", diff --git a/plugins/github/github-core/intellij.vcs.github.iml b/plugins/github/github-core/intellij.vcs.github.iml index 0dcde0797421..1b7e73f41514 100644 --- a/plugins/github/github-core/intellij.vcs.github.iml +++ b/plugins/github/github-core/intellij.vcs.github.iml @@ -135,5 +135,6 @@ + \ No newline at end of file diff --git a/plugins/gitlab/gitlab-core/BUILD.bazel b/plugins/gitlab/gitlab-core/BUILD.bazel index 80dcc880454b..23755d38601a 100644 --- a/plugins/gitlab/gitlab-core/BUILD.bazel +++ b/plugins/gitlab/gitlab-core/BUILD.bazel @@ -64,6 +64,7 @@ jvm_library( "//platform/util/coroutines", "//platform/dvcs-impl/shared", "//platform/ide-core-impl", + "//platform/vcs-impl/shared", ], runtime_deps = [ ":vcs-gitlab_resources", @@ -133,6 +134,7 @@ jvm_library( "@lib//:io-mockk-jvm", "//platform/dvcs-impl/shared", "//platform/ide-core-impl", + "//platform/vcs-impl/shared", ], runtime_deps = [ ":vcs-gitlab_resources", diff --git a/plugins/gitlab/gitlab-core/intellij.vcs.gitlab.iml b/plugins/gitlab/gitlab-core/intellij.vcs.gitlab.iml index 19018d021c84..45246b377699 100644 --- a/plugins/gitlab/gitlab-core/intellij.vcs.gitlab.iml +++ b/plugins/gitlab/gitlab-core/intellij.vcs.gitlab.iml @@ -81,5 +81,6 @@ + \ No newline at end of file diff --git a/plugins/kotlin/project-configuration/BUILD.bazel b/plugins/kotlin/project-configuration/BUILD.bazel index 02b9454a5cef..a5030fff3990 100644 --- a/plugins/kotlin/project-configuration/BUILD.bazel +++ b/plugins/kotlin/project-configuration/BUILD.bazel @@ -59,6 +59,7 @@ jvm_library( "@lib//:maven-resolver-provider", "//platform/util", "//platform/workspace/storage", + "//platform/vcs-impl/shared", ], runtime_deps = [":project-configuration_resources"] ) diff --git a/plugins/kotlin/project-configuration/kotlin.project-configuration.iml b/plugins/kotlin/project-configuration/kotlin.project-configuration.iml index d4a3098f274f..89ce6ee41a31 100644 --- a/plugins/kotlin/project-configuration/kotlin.project-configuration.iml +++ b/plugins/kotlin/project-configuration/kotlin.project-configuration.iml @@ -54,5 +54,6 @@ + \ No newline at end of file diff --git a/plugins/svn4idea/BUILD.bazel b/plugins/svn4idea/BUILD.bazel index 4bf6f0a75b92..14f996c0c2be 100644 --- a/plugins/svn4idea/BUILD.bazel +++ b/plugins/svn4idea/BUILD.bazel @@ -43,6 +43,7 @@ jvm_library( "//platform/core-ui", "//platform/platform-util-io:ide-util-io", "//platform/external-process-auth-helper", + "//platform/vcs-impl/shared", ], runtime_deps = [ ":vcs-svn_resources", diff --git a/plugins/svn4idea/intellij.vcs.svn.iml b/plugins/svn4idea/intellij.vcs.svn.iml index d09195fefe4b..8dc7f44ec004 100644 --- a/plugins/svn4idea/intellij.vcs.svn.iml +++ b/plugins/svn4idea/intellij.vcs.svn.iml @@ -41,5 +41,6 @@ + \ No newline at end of file