mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
refactoring [git]: Add API-dump for git4idea and fix exposed APIs
GitOrigin-RevId: 5d70def8197d91d9b3764684b270cbdf5c6ff07d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
829ca68d5a
commit
4b1d52f6dd
@@ -0,0 +1,131 @@
|
||||
f:git4idea.annotate.GitAnnotationProvider
|
||||
- com.intellij.vcs.AnnotationProviderEx
|
||||
- com.intellij.vcs.CacheableAnnotationProvider
|
||||
- *:cache(com.intellij.openapi.vcs.FilePath,com.intellij.openapi.vcs.history.VcsRevisionNumber,git4idea.annotate.GitFileAnnotation):V
|
||||
- *:getCached(com.intellij.openapi.vcs.FilePath,com.intellij.openapi.vcs.history.VcsRevisionNumber,com.intellij.openapi.vfs.VirtualFile,com.intellij.openapi.vfs.VirtualFile):git4idea.annotate.GitFileAnnotation
|
||||
*:git4idea.annotate.GitAnnotationProvider$GitRawAnnotationProvider
|
||||
- sf:EP_NAME:com.intellij.openapi.extensions.ProjectExtensionPointName
|
||||
- a:annotate(com.intellij.openapi.project.Project,com.intellij.openapi.vfs.VirtualFile,com.intellij.openapi.vcs.FilePath,com.intellij.openapi.vcs.history.VcsRevisionNumber,com.intellij.openapi.vfs.VirtualFile):git4idea.annotate.GitFileAnnotation
|
||||
- annotate(com.intellij.openapi.vfs.VirtualFile,com.intellij.openapi.vcs.history.VcsFileRevision):git4idea.annotate.GitFileAnnotation
|
||||
- a:getId():java.lang.String
|
||||
- s:isDefault(java.lang.String):Z
|
||||
*:git4idea.changes.GitBranchComparisonResult
|
||||
- *sf:Companion:git4idea.changes.GitBranchComparisonResult$Companion
|
||||
- a:getBaseSha():java.lang.String
|
||||
- a:getChanges():java.util.List
|
||||
- a:getChangesByCommits():java.util.Map
|
||||
- a:getCommits():java.util.List
|
||||
- a:getHeadSha():java.lang.String
|
||||
- a:getMergeBaseSha():java.lang.String
|
||||
- a:getPatchesByChange():java.util.Map
|
||||
*f:git4idea.changes.GitBranchComparisonResult$Companion
|
||||
- f:create(com.intellij.openapi.project.Project,com.intellij.openapi.vfs.VirtualFile,java.lang.String,java.lang.String,java.util.List,java.util.List):git4idea.changes.GitBranchComparisonResult
|
||||
f:git4idea.changes.GitBranchComparisonResultKt
|
||||
- *sf:createVcsChange(com.intellij.collaboration.util.RefComparisonChange,com.intellij.openapi.project.Project):com.intellij.openapi.vcs.changes.Change
|
||||
- *sf:findCumulativeChange(git4idea.changes.GitBranchComparisonResult,java.lang.String,java.lang.String):com.intellij.collaboration.util.RefComparisonChange
|
||||
- *sf:getDiffComputer(git4idea.changes.GitTextFilePatchWithHistory):com.intellij.diff.util.DiffUserDataKeysEx$DiffComputer
|
||||
*f:git4idea.changes.GitCommitShaWithPatches
|
||||
- <init>(java.lang.String,java.util.List,java.util.List):V
|
||||
- equals(java.lang.Object):Z
|
||||
- f:getParents():java.util.List
|
||||
- f:getPatches():java.util.List
|
||||
- f:getSha():java.lang.String
|
||||
- hashCode():I
|
||||
*:git4idea.changes.GitFileHistory
|
||||
- java.util.Comparator
|
||||
- a:compare(java.lang.String,java.lang.String):I
|
||||
- a:contains(java.lang.String,java.lang.String):Z
|
||||
- a:findFirstParent(java.lang.String):java.lang.String
|
||||
- a:findStartCommit():java.lang.String
|
||||
- a:getPatchesBetween(java.lang.String,java.lang.String):java.util.List
|
||||
*f:git4idea.changes.GitTextFilePatchWithHistory
|
||||
- *sf:Companion:git4idea.changes.GitTextFilePatchWithHistory$Companion
|
||||
- <init>(com.intellij.openapi.diff.impl.patch.TextFilePatch,Z,git4idea.changes.GitFileHistory):V
|
||||
- f:contains(java.lang.String,java.lang.String):Z
|
||||
- f:forcefullyMapLine(java.lang.String,I,com.intellij.diff.util.Side):java.lang.Integer
|
||||
- f:getFileHistory():git4idea.changes.GitFileHistory
|
||||
- f:getPatch():com.intellij.openapi.diff.impl.patch.TextFilePatch
|
||||
- f:isCumulative():Z
|
||||
- f:mapLine(java.lang.String,I,com.intellij.diff.util.Side):kotlin.Pair
|
||||
*f:git4idea.changes.GitTextFilePatchWithHistory$Companion
|
||||
*:git4idea.checkout.GitCheckoutListener
|
||||
- com.intellij.openapi.vcs.CheckoutProvider$Listener
|
||||
- *sf:Companion:git4idea.checkout.GitCheckoutListener$Companion
|
||||
- a:checkoutFailed(git4idea.commands.GitCommandResult):V
|
||||
- s:wrap(com.intellij.openapi.vcs.CheckoutProvider$Listener):git4idea.checkout.GitCheckoutListener
|
||||
*f:git4idea.checkout.GitCheckoutListener$Companion
|
||||
- f:wrap(com.intellij.openapi.vcs.CheckoutProvider$Listener):git4idea.checkout.GitCheckoutListener
|
||||
*f:git4idea.commit.GitMyRecentCommitsProvider
|
||||
- *sf:Companion:git4idea.commit.GitMyRecentCommitsProvider$Companion
|
||||
- <init>(com.intellij.openapi.project.Project,kotlinx.coroutines.CoroutineScope):V
|
||||
- f:getRecentCommits(com.intellij.openapi.vfs.VirtualFile,I,kotlin.coroutines.Continuation):java.lang.Object
|
||||
*f:git4idea.commit.GitMyRecentCommitsProvider$Companion
|
||||
- f:getInstance(com.intellij.openapi.project.Project):git4idea.commit.GitMyRecentCommitsProvider
|
||||
git4idea.push.GitPushListener
|
||||
- *:onCompleted(git4idea.repo.GitRepository,git4idea.push.GitPushRepoResult,java.util.Map):V
|
||||
f:git4idea.push.GitPushNotificationCustomizerKt
|
||||
- *sf:isSuccessful(git4idea.push.GitPushRepoResult):Z
|
||||
*f:git4idea.remote.hosting.GitCodeReviewUtils
|
||||
- sf:INSTANCE:git4idea.remote.hosting.GitCodeReviewUtils
|
||||
- f:fetch(git4idea.repo.GitRepository,git4idea.repo.GitRemote,java.lang.String,kotlin.coroutines.Continuation):java.lang.Object
|
||||
- f:testIsAncestor(git4idea.repo.GitRepository,java.lang.String,java.lang.String,kotlin.coroutines.Continuation):java.lang.Object
|
||||
- f:testRevisionsExist(git4idea.repo.GitRepository,java.util.List,kotlin.coroutines.Continuation):java.lang.Object
|
||||
*:git4idea.remote.hosting.HostedGitRepositoryMapping
|
||||
- a:getRemote():git4idea.remote.GitRemoteUrlCoordinates
|
||||
- a:getRepository():git4idea.remote.hosting.HostedRepositoryCoordinates
|
||||
*:git4idea.remote.hosting.HostedRepositoryCoordinates
|
||||
- a:getServerPath():com.intellij.collaboration.api.ServerPath
|
||||
- a:getWebURI():java.net.URI
|
||||
*a:git4idea.remote.hosting.http.HostedGitAuthenticationFailureManager
|
||||
- com.intellij.openapi.Disposable
|
||||
- <init>(kotlin.jvm.functions.Function0,kotlinx.coroutines.CoroutineScope):V
|
||||
- dispose():V
|
||||
- f:ignoreAccount(java.lang.String,com.intellij.collaboration.auth.Account):V
|
||||
- f:isAccountIgnored(java.lang.String,com.intellij.collaboration.auth.Account):Z
|
||||
*a:git4idea.remote.hosting.http.SilentHostedGitHttpAuthDataProvider
|
||||
- git4idea.remote.GitHttpAuthDataProvider
|
||||
- *sf:Companion:git4idea.remote.hosting.http.SilentHostedGitHttpAuthDataProvider$Companion
|
||||
- <init>():V
|
||||
- forgetPassword(com.intellij.openapi.project.Project,java.lang.String,com.intellij.util.AuthData):V
|
||||
- a:getAccountLogin(com.intellij.collaboration.auth.ServerAccount,java.lang.String,kotlin.coroutines.Continuation):java.lang.Object
|
||||
- a:getAccountManager():com.intellij.collaboration.auth.AccountManager
|
||||
- getAuthData(com.intellij.openapi.project.Project,java.lang.String):com.intellij.util.AuthData
|
||||
- getAuthData(com.intellij.openapi.project.Project,java.lang.String,java.lang.String):com.intellij.util.AuthData
|
||||
- a:getAuthFailureManager(com.intellij.openapi.project.Project):git4idea.remote.hosting.http.HostedGitAuthenticationFailureManager
|
||||
- a:getDefaultAccountHolder(com.intellij.openapi.project.Project):com.intellij.collaboration.auth.DefaultAccountHolder
|
||||
- a:getProviderId():java.lang.String
|
||||
- isSilent():Z
|
||||
*f:git4idea.remote.hosting.http.SilentHostedGitHttpAuthDataProvider$Companion
|
||||
- f:getAccountsWithTokens(com.intellij.collaboration.auth.AccountManager,git4idea.remote.hosting.http.HostedGitAuthenticationFailureManager,java.lang.String,kotlin.coroutines.Continuation):java.lang.Object
|
||||
*f:git4idea.repo.GitConfigurationCache
|
||||
- git4idea.repo.GitConfigurationCacheBase
|
||||
- *sf:Companion:git4idea.repo.GitConfigurationCache$Companion
|
||||
- <init>():V
|
||||
- sf:getInstance():git4idea.repo.GitConfigurationCache
|
||||
*f:git4idea.repo.GitConfigurationCache$Companion
|
||||
- f:getInstance():git4idea.repo.GitConfigurationCache
|
||||
*f:git4idea.repo.GitProjectConfigurationCache
|
||||
- git4idea.repo.GitConfigurationCacheBase
|
||||
- *sf:Companion:git4idea.repo.GitProjectConfigurationCache$Companion
|
||||
- <init>(com.intellij.openapi.project.Project):V
|
||||
- f:clearForRepo(git4idea.repo.GitRepository):V
|
||||
- sf:getInstance(com.intellij.openapi.project.Project):git4idea.repo.GitProjectConfigurationCache
|
||||
- f:getProject():com.intellij.openapi.project.Project
|
||||
- f:readRepositoryConfig(com.intellij.openapi.vfs.VirtualFile,java.lang.String):java.lang.String
|
||||
*f:git4idea.repo.GitProjectConfigurationCache$Companion
|
||||
- f:getInstance(com.intellij.openapi.project.Project):git4idea.repo.GitProjectConfigurationCache
|
||||
*f:git4idea.repo.GitProjectConfigurationCache$RepositoryConfigKey
|
||||
- git4idea.repo.GitRepositoryConfigKey
|
||||
- <init>(com.intellij.openapi.vfs.VirtualFile,java.lang.String):V
|
||||
- f:component1():com.intellij.openapi.vfs.VirtualFile
|
||||
- f:component2():java.lang.String
|
||||
- f:copy(com.intellij.openapi.vfs.VirtualFile,java.lang.String):git4idea.repo.GitProjectConfigurationCache$RepositoryConfigKey
|
||||
- bs:copy$default(git4idea.repo.GitProjectConfigurationCache$RepositoryConfigKey,com.intellij.openapi.vfs.VirtualFile,java.lang.String,I,java.lang.Object):git4idea.repo.GitProjectConfigurationCache$RepositoryConfigKey
|
||||
- equals(java.lang.Object):Z
|
||||
- f:getKey():java.lang.String
|
||||
- getRoot():com.intellij.openapi.vfs.VirtualFile
|
||||
- hashCode():I
|
||||
f:git4idea.ui.branch.GitCurrentBranchPresenter$Companion
|
||||
- *f:getPRESENTATION_UPDATED():com.intellij.util.messages.Topic
|
||||
*:git4idea.ui.branch.GitCurrentBranchPresenter$PresentationUpdatedListener
|
||||
- a:presentationUpdated():V
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
kotlin/jvm/internal/DefaultConstructorMarker
|
||||
kotlinx/serialization/descriptors/SerialDescriptor
|
||||
kotlinx/serialization/encoding/Decoder
|
||||
kotlinx/serialization/encoding/Encoder
|
||||
kotlinx/serialization/internal/GeneratedSerializer
|
||||
@@ -8,7 +8,7 @@ import com.intellij.internal.statistic.eventLog.events.EventFields
|
||||
import com.intellij.internal.statistic.eventLog.events.EventId
|
||||
import com.intellij.internal.statistic.service.fus.collectors.CounterUsagesCollector
|
||||
|
||||
object GitBranchesUsageCollector : CounterUsagesCollector() {
|
||||
internal object GitBranchesUsageCollector : CounterUsagesCollector() {
|
||||
override fun getGroup(): EventLogGroup = GROUP
|
||||
|
||||
private const val VERSION = 2
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.intellij.internal.statistic.eventLog.events.EventFields
|
||||
import com.intellij.internal.statistic.service.fus.collectors.CounterUsagesCollector
|
||||
import com.intellij.openapi.project.Project
|
||||
|
||||
object GitRefreshUsageCollector : CounterUsagesCollector() {
|
||||
internal object GitRefreshUsageCollector : CounterUsagesCollector() {
|
||||
override fun getGroup(): EventLogGroup = GROUP
|
||||
|
||||
private val GROUP: EventLogGroup = EventLogGroup("git.status.refresh", 1)
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.intellij.internal.statistic.eventLog.events.EventFields
|
||||
import com.intellij.internal.statistic.service.fus.collectors.CounterUsagesCollector
|
||||
import com.intellij.openapi.project.Project
|
||||
|
||||
object GitStashUsageCollector : CounterUsagesCollector() {
|
||||
internal object GitStashUsageCollector : CounterUsagesCollector() {
|
||||
override fun getGroup(): EventLogGroup = GROUP
|
||||
|
||||
private val GROUP: EventLogGroup = EventLogGroup("stash.interactions", 4)
|
||||
|
||||
@@ -9,7 +9,7 @@ import git4idea.repo.GitRepository
|
||||
import java.util.function.Supplier
|
||||
|
||||
abstract class GitSingleBranchAction(dynamicText: Supplier<@NlsActions.ActionText String>) : GitSingleRefAction<GitBranch>(dynamicText) {
|
||||
override val refClass = GitBranch::class
|
||||
override val refClass = GitBranch::class.java
|
||||
|
||||
constructor() : this(Presentation.NULL_STRING)
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.intellij.openapi.actionSystem.AnActionEvent
|
||||
import com.intellij.openapi.project.DumbAwareAction
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.util.NlsActions
|
||||
import com.intellij.util.ReflectionUtil
|
||||
import com.intellij.vcs.git.actions.GitSingleRefActions
|
||||
import com.intellij.vcs.git.actions.branch.GitBranchActionToBeWrapped
|
||||
import com.intellij.vcs.git.workingTrees.GitWorkingTreesUtil
|
||||
@@ -29,7 +30,7 @@ abstract class GitSingleRefAction<T : GitReference>(
|
||||
) : GitBranchActionToBeWrapped, DumbAwareAction(dynamicText) {
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
protected open val refClass: KClass<T> = GitReference::class as KClass<T>
|
||||
protected open val refClass: Class<T> = GitReference::class.java as Class<T>
|
||||
|
||||
override fun getActionUpdateThread(): ActionUpdateThread {
|
||||
return ActionUpdateThread.BGT
|
||||
@@ -70,7 +71,7 @@ abstract class GitSingleRefAction<T : GitReference>(
|
||||
else -> null
|
||||
}
|
||||
|
||||
return refClass.safeCast(ref)
|
||||
return if (refClass.isInstance(ref)) refClass.cast(ref) else null
|
||||
}
|
||||
|
||||
private fun isEnabledAndVisible(project: Project?, repositories: List<GitRepository>?, ref: T?): Boolean =
|
||||
@@ -106,3 +107,4 @@ abstract class GitSingleRefAction<T : GitReference>(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,5 +7,5 @@ import git4idea.actions.ref.GitSingleRefAction
|
||||
import java.util.function.Supplier
|
||||
|
||||
internal abstract class GitSingleTagAction(dynamicText: Supplier<@NlsActions.ActionText String>) : GitSingleRefAction<GitTag>(dynamicText) {
|
||||
override val refClass = GitTag::class
|
||||
override val refClass = GitTag::class.java
|
||||
}
|
||||
@@ -8,11 +8,13 @@ import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.vcs.log.VcsLogUi;
|
||||
import com.intellij.vcs.log.data.VcsLogData;
|
||||
import git4idea.repo.GitRepositoryManager;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@ApiStatus.Internal
|
||||
@Service(Service.Level.PROJECT)
|
||||
public final class CherryPickedCommitsHighlighterHolder implements Disposable {
|
||||
private final @NotNull Project myProject;
|
||||
|
||||
@@ -41,6 +41,7 @@ import git4idea.ui.branch.GitMultiRootBranchConfig;
|
||||
import it.unimi.dsi.fastutil.Hash;
|
||||
import it.unimi.dsi.fastutil.objects.ObjectOpenCustomHashSet;
|
||||
import one.util.streamex.StreamEx;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.CalledInAny;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
@@ -283,6 +284,7 @@ public final class GitBranchUtil {
|
||||
return collectCommon(groups, null);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public static @NotNull <T> List<T> collectCommon(@NotNull Stream<? extends Collection<T>> groups,
|
||||
Hash.@Nullable Strategy<? super T> hashingStrategy) {
|
||||
List<T> common = new ArrayList<>();
|
||||
|
||||
@@ -11,7 +11,7 @@ import it.unimi.dsi.fastutil.ints.IntOpenHashSet
|
||||
import it.unimi.dsi.fastutil.ints.IntSet
|
||||
import java.util.regex.Pattern
|
||||
|
||||
fun IndexDataGetter.match(root: VirtualFile,
|
||||
internal fun IndexDataGetter.match(root: VirtualFile,
|
||||
sourceBranchCommits: IntSet,
|
||||
targetBranchCommits: IntSet,
|
||||
reliable: Boolean = true): IntSet {
|
||||
|
||||
@@ -14,7 +14,7 @@ import git4idea.i18n.GitBundle.message
|
||||
import git4idea.repo.GitRepository
|
||||
import org.jetbrains.annotations.Nls
|
||||
|
||||
internal enum class EmptyCherryPickResolutionStrategy {
|
||||
enum class EmptyCherryPickResolutionStrategy {
|
||||
SKIP, CREATE_EMPTY
|
||||
}
|
||||
|
||||
|
||||
@@ -148,6 +148,7 @@ public final class GitCommand {
|
||||
return myName;
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public @NotNull LockingPolicy lockingPolicy() {
|
||||
return myLocking;
|
||||
}
|
||||
|
||||
@@ -13,12 +13,14 @@ import com.intellij.openapi.util.text.StringUtilRt
|
||||
import git4idea.http.GitAskPassApp
|
||||
import git4idea.http.GitAskPassAppHandler
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
import java.nio.file.Path
|
||||
import java.util.UUID
|
||||
|
||||
/**
|
||||
* Provides the authentication mechanism for Git HTTP connections.
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
abstract class GitHttpAuthService(coroutineScope: CoroutineScope) : ExternalProcessHandlerService<GitAskPassAppHandler>(
|
||||
"intellij-git-askpass",
|
||||
GitAskPassApp::class.java,
|
||||
|
||||
@@ -5,11 +5,13 @@ import com.intellij.externalProcessAuthHelper.AuthenticationGate;
|
||||
import com.intellij.externalProcessAuthHelper.AuthenticationMode;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.Collection;
|
||||
|
||||
@ApiStatus.Internal
|
||||
class GitHttpAuthServiceImpl extends GitHttpAuthService {
|
||||
GitHttpAuthServiceImpl(CoroutineScope coroutineScope) {
|
||||
super(coroutineScope);
|
||||
|
||||
@@ -104,7 +104,7 @@ internal open class InlineErrorNotifier(private val inlineComponent: InlineCompo
|
||||
}
|
||||
}
|
||||
|
||||
class GitExecutableInlineComponent(private val container: BorderLayoutPanel,
|
||||
internal class GitExecutableInlineComponent(private val container: BorderLayoutPanel,
|
||||
private val modalityState: ModalityState,
|
||||
private val panelToValidate: JPanel?) : InlineComponent {
|
||||
|
||||
|
||||
@@ -75,6 +75,7 @@ import com.intellij.util.ui.JBUI
|
||||
import com.intellij.util.ui.UIUtil
|
||||
import git4idea.GitUtil
|
||||
import git4idea.i18n.GitBundle
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
import org.jetbrains.annotations.Nls
|
||||
import org.jetbrains.annotations.NonNls
|
||||
import java.awt.BasicStroke
|
||||
@@ -315,10 +316,12 @@ class GitStageLineStatusTracker(
|
||||
}
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
override fun addListener(listener: LineStatusTrackerListener) {
|
||||
listeners.addListener(listener)
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
override fun removeListener(listener: LineStatusTrackerListener) {
|
||||
listeners.removeListener(listener)
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ import java.io.IOException
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
@Service(Service.Level.PROJECT)
|
||||
class GitIndexFileSystemRefresher(private val project: Project) : Disposable {
|
||||
internal class GitIndexFileSystemRefresher(private val project: Project) : Disposable {
|
||||
private val executor = AppExecutorUtil.createBoundedApplicationPoolExecutor("Git index file system refresher", 1)
|
||||
private val disposable = Disposer.newDisposable("Git Index File System")
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import java.io.InputStream
|
||||
import java.io.OutputStream
|
||||
import java.util.Objects
|
||||
|
||||
class GitIndexVirtualFile(
|
||||
internal class GitIndexVirtualFile(
|
||||
private val project: Project,
|
||||
val root: VirtualFile,
|
||||
val filePath: FilePath,
|
||||
|
||||
@@ -52,7 +52,7 @@ class GitLogIndexer(private val project: Project,
|
||||
}
|
||||
}
|
||||
|
||||
class GitCompressedDetails(private val metadata: VcsCommitMetadata,
|
||||
internal class GitCompressedDetails(private val metadata: VcsCommitMetadata,
|
||||
private val changes: List<Int2ObjectMap<Change.Type>>,
|
||||
private val renames: List<Int2IntMap>) : VcsCommitMetadata by metadata, VcsLogIndexer.CompressedDetails {
|
||||
override fun getModifiedPaths(parent: Int) = changes[parent]
|
||||
|
||||
@@ -402,7 +402,7 @@ class GitLogProvider(private val project: Project) : VcsLogProvider, VcsIndexabl
|
||||
private val LOG = logger<GitLogProvider>()
|
||||
|
||||
@JvmField
|
||||
val DONT_CONSIDER_SHA: it.unimi.dsi.fastutil.Hash.Strategy<VcsRef> = object : it.unimi.dsi.fastutil.Hash.Strategy<VcsRef> {
|
||||
internal val DONT_CONSIDER_SHA: it.unimi.dsi.fastutil.Hash.Strategy<VcsRef> = object : it.unimi.dsi.fastutil.Hash.Strategy<VcsRef> {
|
||||
override fun hashCode(ref: VcsRef?): Int {
|
||||
if (ref == null) return 0
|
||||
return 31 * ref.name.hashCode() + ref.type.hashCode()
|
||||
|
||||
@@ -21,7 +21,7 @@ import git4idea.history.GitLogUtil
|
||||
import it.unimi.dsi.fastutil.ints.IntOpenHashSet
|
||||
import it.unimi.dsi.fastutil.ints.IntSet
|
||||
|
||||
class GitLogCommandFilterer(private val project: Project,
|
||||
internal class GitLogCommandFilterer(private val project: Project,
|
||||
private val storage: VcsLogStorage,
|
||||
private val progress: VcsLogProgress) : VcsLogFilterer, Disposable {
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.jetbrains.concurrency.toPromise
|
||||
/**
|
||||
* Checks that VCS log is fully indexed on project closing
|
||||
*/
|
||||
class CheckGitLogIndexedCommand(text: String, line: Int) : AbstractCommand(text, line) {
|
||||
internal class CheckGitLogIndexedCommand(text: String, line: Int) : AbstractCommand(text, line) {
|
||||
|
||||
companion object {
|
||||
const val PREFIX = CMD_PREFIX + "checkGitLogIndexing"
|
||||
|
||||
@@ -33,7 +33,7 @@ import kotlin.io.path.exists
|
||||
* %filterVcsLogTab -name <user_name> -path<slash/divided/path>
|
||||
* Example - '%filterVcsLogTab -name "Alexander Kass -path 'srs/SomeImpl.java'"
|
||||
*/
|
||||
class FilterVcsLogTabCommand(text: String, line: Int) : PerformanceCommandCoroutineAdapter(text, line) {
|
||||
internal class FilterVcsLogTabCommand(text: String, line: Int) : PerformanceCommandCoroutineAdapter(text, line) {
|
||||
|
||||
companion object {
|
||||
const val NAME = "filterVcsLogTab"
|
||||
|
||||
@@ -14,6 +14,7 @@ import git4idea.branch.GitBranchUtil
|
||||
import git4idea.branch.GitBrancher
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
import org.jetbrains.concurrency.Promise
|
||||
import org.jetbrains.concurrency.await
|
||||
import org.jetbrains.concurrency.toPromise
|
||||
@@ -24,6 +25,7 @@ import org.jetbrains.concurrency.toPromise
|
||||
* Example: %gitCheckout master
|
||||
* Example: %gitCheckout origin/1.1.11 1.1.11
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
class GitCheckoutCommand(text: String, line: Int) : AbstractCommand(text, line, true) {
|
||||
companion object {
|
||||
const val PREFIX = "${CMD_PREFIX}gitCheckout"
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public final class GitCommandProvider implements CommandProvider {
|
||||
final class GitCommandProvider implements CommandProvider {
|
||||
@Override
|
||||
public @NotNull Map<String, CreateCommand> getCommands() {
|
||||
return Map.ofEntries(
|
||||
|
||||
@@ -25,7 +25,7 @@ import kotlinx.coroutines.withContext
|
||||
* Command for committing file changes to git
|
||||
* Example - %gitCommit src/TheBestJavaClass.java, The Best Commit Ever
|
||||
*/
|
||||
class GitCommitCommand(text: String, line: Int) : PerformanceCommandCoroutineAdapter(text, line) {
|
||||
internal class GitCommitCommand(text: String, line: Int) : PerformanceCommandCoroutineAdapter(text, line) {
|
||||
|
||||
companion object {
|
||||
const val NAME = "gitCommit"
|
||||
|
||||
@@ -14,7 +14,7 @@ import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.sync.Mutex
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
class GitRollbackCommand(text: String, line: Int) : PerformanceCommandCoroutineAdapter(text, line) {
|
||||
internal class GitRollbackCommand(text: String, line: Int) : PerformanceCommandCoroutineAdapter(text, line) {
|
||||
companion object {
|
||||
const val NAME = "gitRollbackFile"
|
||||
const val PREFIX = "$CMD_PREFIX$NAME"
|
||||
|
||||
@@ -18,7 +18,7 @@ import kotlinx.coroutines.withContext
|
||||
import org.jetbrains.annotations.TestOnly
|
||||
import kotlin.time.Duration.Companion.minutes
|
||||
|
||||
class GitShowVcsWidgetCommand(text: String, line: Int) : PerformanceCommandCoroutineAdapter(text, line) {
|
||||
internal class GitShowVcsWidgetCommand(text: String, line: Int) : PerformanceCommandCoroutineAdapter(text, line) {
|
||||
companion object {
|
||||
const val NAME = "gitShowBranchWidget"
|
||||
const val PREFIX = CMD_PREFIX + NAME
|
||||
|
||||
@@ -15,7 +15,7 @@ import com.jetbrains.performancePlugin.commands.PerformanceCommandCoroutineAdapt
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
class ShowFileAnnotationCommand(text: String, line: Int) : PerformanceCommandCoroutineAdapter(text, line) {
|
||||
internal class ShowFileAnnotationCommand(text: String, line: Int) : PerformanceCommandCoroutineAdapter(text, line) {
|
||||
|
||||
companion object {
|
||||
const val NAME = "showFileAnnotation"
|
||||
|
||||
@@ -23,9 +23,11 @@ import com.jetbrains.performancePlugin.commands.PerformanceCommandCoroutineAdapt
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.suspendCancellableCoroutine
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
import kotlin.coroutines.resume
|
||||
|
||||
|
||||
@ApiStatus.Internal
|
||||
class ShowFileHistoryCommand(text: String, line: Int) : PerformanceCommandCoroutineAdapter(text, line) {
|
||||
override suspend fun doExecute(context: PlaybackContext) {
|
||||
val logManager = VcsProjectLog.awaitLogIsReady(context.project)
|
||||
|
||||
@@ -14,7 +14,7 @@ import kotlinx.coroutines.withContext
|
||||
* @see com.intellij.vcs.log.impl.VcsLogManager.isLogUpToDate
|
||||
* @see com.intellij.vcs.log.impl.VcsLogManager.scheduleUpdate
|
||||
*/
|
||||
class WaitForVcsLogUpdateCommand(text: String, line: Int) : PerformanceCommandCoroutineAdapter(text, line) {
|
||||
internal class WaitForVcsLogUpdateCommand(text: String, line: Int) : PerformanceCommandCoroutineAdapter(text, line) {
|
||||
companion object {
|
||||
const val NAME = "waitForVcsLogUpdate"
|
||||
const val PREFIX = CMD_PREFIX + NAME
|
||||
|
||||
@@ -27,7 +27,7 @@ import java.nio.file.Files
|
||||
* Example of infinity waiting - %waitVcsLogIndexing
|
||||
* Example of timed waiting with throwing exception on expiration - %waitVcsLogIndexing 5s
|
||||
*/
|
||||
class WaitVcsLogIndexingCommand(text: String, line: Int) : PerformanceCommandCoroutineAdapter(text, line) {
|
||||
internal class WaitVcsLogIndexingCommand(text: String, line: Int) : PerformanceCommandCoroutineAdapter(text, line) {
|
||||
companion object {
|
||||
const val NAME = "waitVcsLogIndexing"
|
||||
const val PREFIX = CMD_PREFIX + NAME
|
||||
|
||||
@@ -114,7 +114,7 @@ public class GitPushOperation {
|
||||
return ForceMode.NONE;
|
||||
}
|
||||
|
||||
public GitPushOperation(@NotNull Project project,
|
||||
GitPushOperation(@NotNull Project project,
|
||||
@NotNull GitPushSupport pushSupport,
|
||||
@NotNull @Unmodifiable Map<GitRepository, PushSpec<GitPushSource, GitPushTarget>> pushSpecs,
|
||||
@Nullable GitPushTagMode tagMode,
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.jetbrains.annotations.PropertyKey
|
||||
import java.awt.event.KeyEvent
|
||||
import java.util.function.Supplier
|
||||
|
||||
internal open class GitRebaseEntry(val action: Action, val commit: String, val subject: String) {
|
||||
open class GitRebaseEntry(val action: Action, val commit: String, val subject: String) {
|
||||
override fun toString() = "$action $commit $subject"
|
||||
|
||||
sealed class Action(val command: String,
|
||||
|
||||
@@ -5,19 +5,19 @@ import git4idea.rebase.GitRebaseEntry
|
||||
import kotlin.math.max
|
||||
import kotlin.math.min
|
||||
|
||||
internal class GitRebaseTodoModel<T : GitRebaseEntry>(initialState: List<Element<T>>) {
|
||||
class GitRebaseTodoModel<T : GitRebaseEntry>(initialState: List<Element<T>>) {
|
||||
private val rows = ElementList(initialState)
|
||||
|
||||
val elements: List<Element<T>>
|
||||
get() = rows.elements
|
||||
|
||||
fun canPick(indices: List<Int>) = anyOfType(indices) { it !is Type.NonUnite.KeepCommit.Pick && it !is Type.NonUnite.UpdateRef }
|
||||
fun canPick(indices: List<Int>): Boolean = anyOfType(indices) { it !is Type.NonUnite.KeepCommit.Pick && it !is Type.NonUnite.UpdateRef }
|
||||
|
||||
fun pick(indices: List<Int>) {
|
||||
keepCommitAction(indices, Type.NonUnite.KeepCommit.Pick)
|
||||
}
|
||||
|
||||
fun canEdit(indices: List<Int>) = anyOfType(indices) { it !is Type.NonUnite.KeepCommit.Edit && it !is Type.NonUnite.UpdateRef }
|
||||
fun canEdit(indices: List<Int>): Boolean = anyOfType(indices) { it !is Type.NonUnite.KeepCommit.Edit && it !is Type.NonUnite.UpdateRef }
|
||||
|
||||
fun edit(indices: List<Int>) {
|
||||
keepCommitAction(indices, Type.NonUnite.KeepCommit.Edit)
|
||||
@@ -29,7 +29,7 @@ internal class GitRebaseTodoModel<T : GitRebaseEntry>(initialState: List<Element
|
||||
keepCommitAction(listOf(index), Type.NonUnite.KeepCommit.Reword(message))
|
||||
}
|
||||
|
||||
fun canDrop(indices: List<Int>) = anyOfType(indices) { it !is Type.NonUnite.Drop && it !is Type.NonUnite.UpdateRef }
|
||||
fun canDrop(indices: List<Int>): Boolean = anyOfType(indices) { it !is Type.NonUnite.Drop && it !is Type.NonUnite.UpdateRef }
|
||||
|
||||
fun drop(indices: List<Int>) {
|
||||
val elements = indices.map { rows[it] }.filter { it.type != Type.NonUnite.UpdateRef }
|
||||
@@ -338,7 +338,7 @@ internal class GitRebaseTodoModel<T : GitRebaseEntry>(initialState: List<Element
|
||||
val children: List<UniteChild<T>>
|
||||
get() = _children
|
||||
|
||||
val uniteGroup
|
||||
val uniteGroup: List<Element<T>>
|
||||
get() = listOf(this) + _children
|
||||
|
||||
fun addChild(child: UniteChild<T>) {
|
||||
@@ -351,9 +351,9 @@ internal class GitRebaseTodoModel<T : GitRebaseEntry>(initialState: List<Element
|
||||
}
|
||||
}
|
||||
|
||||
fun lastChildIndex() = _children.lastOrNull()?.index ?: index
|
||||
fun lastChildIndex(): Int = _children.lastOrNull()?.index ?: index
|
||||
|
||||
fun newChildIndex() = lastChildIndex() + 1
|
||||
fun newChildIndex(): Int = lastChildIndex() + 1
|
||||
|
||||
fun removeChild(child: UniteChild<T>) {
|
||||
_children.remove(child)
|
||||
|
||||
+2
-2
@@ -9,7 +9,7 @@ import org.jetbrains.annotations.Nls
|
||||
/**
|
||||
* Represents a request to resolve conflicts in a code review locally.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@ApiStatus.Internal
|
||||
class ResolveConflictsLocallyCoordinates(
|
||||
val headRemoteDescriptor: HostedGitRepositoryRemote,
|
||||
val headRefName: String,
|
||||
@@ -17,7 +17,7 @@ class ResolveConflictsLocallyCoordinates(
|
||||
val baseRefName: String
|
||||
)
|
||||
|
||||
@ApiStatus.Experimental
|
||||
@ApiStatus.Internal
|
||||
enum class BaseOrHead(val text: @Nls String) {
|
||||
Base(CollaborationToolsBundle.message("review.details.resolve-conflicts.base")),
|
||||
Head(CollaborationToolsBundle.message("review.details.resolve-conflicts.head"));
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import git4idea.i18n.GitBundle
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
import org.jetbrains.annotations.Nls
|
||||
|
||||
@ApiStatus.Experimental
|
||||
@ApiStatus.Internal
|
||||
object ResolveConflictsLocallyDialogComponentFactory {
|
||||
private fun ResolveConflictsMethod.toMessage(): @Nls String = when (this) {
|
||||
ResolveConflictsMethod.REBASE -> GitBundle.message("rebasing.merge.commits.button.rebase")
|
||||
|
||||
@@ -25,13 +25,13 @@ import kotlinx.coroutines.flow.stateIn
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
|
||||
@ApiStatus.Experimental
|
||||
@ApiStatus.Internal
|
||||
enum class ResolveConflictsMethod {
|
||||
REBASE,
|
||||
MERGE;
|
||||
}
|
||||
|
||||
@ApiStatus.Experimental
|
||||
@ApiStatus.Internal
|
||||
interface ResolveConflictsLocallyViewModel<Error : Any> {
|
||||
/**
|
||||
* Whether there are conflicts that need to be resolved before merging.
|
||||
|
||||
@@ -36,7 +36,7 @@ import kotlin.time.Duration.Companion.seconds
|
||||
|
||||
private typealias SharedRefUtil = GitRefUtil
|
||||
|
||||
class GitRepositoryApiImpl : GitRepositoryApi {
|
||||
internal class GitRepositoryApiImpl : GitRepositoryApi {
|
||||
override suspend fun getRepositoriesEvents(projectId: ProjectId): Flow<GitRepositoryEvent> =
|
||||
projectScopedCallbackFlow(projectId) { project, messageBusConnection ->
|
||||
val synchronizer = Synchronizer(project, this)
|
||||
|
||||
@@ -75,6 +75,7 @@ public interface GitRepository extends Repository {
|
||||
GitUntrackedFilesHolder getUntrackedFilesHolder();
|
||||
|
||||
@NotNull
|
||||
@ApiStatus.Internal
|
||||
GitResolvedMergeConflictsFilesHolder getResolvedConflictsFilesHolder();
|
||||
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.intellij.openapi.vfs.VfsUtil;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.util.ObjectUtils;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -246,6 +247,7 @@ public final class GitRepositoryFiles {
|
||||
return file(myMergeSquashPath);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public void updateCustomPaths(@NotNull GitConfig.Core core) {
|
||||
String hooksPath = core.getHooksPath();
|
||||
if (hooksPath != null) {
|
||||
|
||||
@@ -100,6 +100,7 @@ class GitRepositoryImpl private constructor(
|
||||
return untrackedFilesHolder
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
override fun getResolvedConflictsFilesHolder(): GitResolvedMergeConflictsFilesHolder {
|
||||
return resolvedFilesHolder
|
||||
}
|
||||
|
||||
@@ -19,11 +19,11 @@ import git4idea.util.GitFileUtils
|
||||
import java.io.File
|
||||
import java.nio.file.Path
|
||||
|
||||
class GitSilentFileAdderProviderImpl(private val project: Project) : GitSilentFileAdderProvider {
|
||||
internal class GitSilentFileAdderProviderImpl(private val project: Project) : GitSilentFileAdderProvider {
|
||||
override fun create(): GitSilentFileAdder = GitSilentFileAdderImpl(project)
|
||||
}
|
||||
|
||||
class GitSilentFileAdderImpl(private val project: Project) : GitSilentFileAdder {
|
||||
private class GitSilentFileAdderImpl(private val project: Project) : GitSilentFileAdder {
|
||||
private val gitVcs = GitVcs.getInstance(project)
|
||||
private val vcsManager = ProjectLevelVcsManager.getInstance(project)
|
||||
private val vcsFileListenerContextHelper = VcsFileListenerContextHelper.getInstance(project)
|
||||
|
||||
@@ -22,6 +22,7 @@ import git4idea.i18n.GitBundle;
|
||||
import git4idea.rebase.GitSingleCommitEditingAction;
|
||||
import git4idea.repo.GitRepository;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -32,6 +33,7 @@ import static git4idea.GitNotificationIdsHolder.COULD_NOT_LOAD_CHANGES_OF_COMMIT
|
||||
import static git4idea.reset.GitResetMode.SOFT;
|
||||
import static java.util.Collections.singletonMap;
|
||||
|
||||
@ApiStatus.Internal
|
||||
public class GitUncommitAction extends GitSingleCommitEditingAction {
|
||||
private static final Logger LOG = Logger.getInstance(GitUncommitAction.class);
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.awt.Graphics
|
||||
import java.awt.Graphics2D
|
||||
import javax.swing.JPanel
|
||||
|
||||
class GitStashBranchComponent(val tree: ChangesTree, iconCache: LabelIconCache) : JPanel() {
|
||||
internal class GitStashBranchComponent(val tree: ChangesTree, iconCache: LabelIconCache) : JPanel() {
|
||||
private val labelPainter = LabelPainter(tree, iconCache)
|
||||
|
||||
private val rightGap get() = UIUtil.getScrollBarWidth()
|
||||
|
||||
Reference in New Issue
Block a user