[es] IJPL-797 external.system.api.impl review internal API

Hide APIs. Common issues: action calls instead of API calls, unfortunate internal interfaces naming.

GitOrigin-RevId: d6eca755594ad495fc43dad737dbbdfff7854a48
This commit is contained in:
Nikita.Skvortsov
2024-07-17 12:11:30 +02:00
committed by intellij-monorepo-bot
parent c50186d5cc
commit 4e3dfb7d67
12 changed files with 27 additions and 371 deletions

View File

@@ -1,10 +1,3 @@
c:com.intellij.openapi.externalSystem.action.DetachExternalProjectAction
- com.intellij.openapi.externalSystem.action.ExternalSystemNodeAction
- <init>():V
- s:detachProject(com.intellij.openapi.project.Project,com.intellij.openapi.externalSystem.model.ProjectSystemId,com.intellij.openapi.externalSystem.model.project.ProjectData,com.intellij.openapi.externalSystem.view.ProjectNode):V
- p:isEnabled(com.intellij.openapi.actionSystem.AnActionEvent):Z
- perform(com.intellij.openapi.project.Project,com.intellij.openapi.externalSystem.model.ProjectSystemId,com.intellij.openapi.externalSystem.model.project.ProjectData,com.intellij.openapi.actionSystem.AnActionEvent):V
- update(com.intellij.openapi.actionSystem.AnActionEvent):V
a:com.intellij.openapi.externalSystem.action.ExternalSystemAction
- com.intellij.openapi.actionSystem.AnAction
- com.intellij.openapi.project.DumbAware
@@ -53,12 +46,6 @@ a:com.intellij.openapi.externalSystem.action.ExternalSystemToggleAction
- p:setText(com.intellij.openapi.actionSystem.AnActionEvent,java.lang.String):V
- p:setText(java.lang.String):V
- update(com.intellij.openapi.actionSystem.AnActionEvent):V
c:com.intellij.openapi.externalSystem.action.RefreshAllExternalProjectsAction
- com.intellij.openapi.project.DumbAwareAction
- <init>():V
- actionPerformed(com.intellij.openapi.actionSystem.AnActionEvent):V
- getActionUpdateThread():com.intellij.openapi.actionSystem.ActionUpdateThread
- update(com.intellij.openapi.actionSystem.AnActionEvent):V
f:com.intellij.openapi.externalSystem.autoimport.AutoImportProjectTrackerSettings
- com.intellij.openapi.components.PersistentStateComponent
- com.intellij.openapi.externalSystem.autoimport.ExternalSystemProjectTrackerSettings
@@ -80,165 +67,6 @@ f:com.intellij.openapi.externalSystem.autoimport.AutoImportProjectTrackerSetting
- f:getAutoReloadType():com.intellij.openapi.externalSystem.autoimport.ExternalSystemProjectTrackerSettings$AutoReloadType
- hashCode():I
- f:setAutoReloadType(com.intellij.openapi.externalSystem.autoimport.ExternalSystemProjectTrackerSettings$AutoReloadType):V
f:com.intellij.openapi.externalSystem.autoimport.HideProjectRefreshAction
- com.intellij.openapi.project.DumbAwareAction
- <init>():V
- actionPerformed(com.intellij.openapi.actionSystem.AnActionEvent):V
- getActionUpdateThread():com.intellij.openapi.actionSystem.ActionUpdateThread
- update(com.intellij.openapi.actionSystem.AnActionEvent):V
a:com.intellij.openapi.externalSystem.autoimport.ProjectBatchFileChangeListener
- com.intellij.ide.file.BatchFileChangeListener
- <init>(com.intellij.openapi.project.Project):V
- batchChangeCompleted():V
- f:batchChangeCompleted(com.intellij.openapi.project.Project):V
- f:batchChangeStarted(com.intellij.openapi.project.Project,java.lang.String):V
- batchChangeStarted(java.lang.String):V
f:com.intellij.openapi.externalSystem.autoimport.ProjectRefreshAction
- com.intellij.openapi.project.DumbAwareAction
- sf:Companion:com.intellij.openapi.externalSystem.autoimport.ProjectRefreshAction$Companion
- <init>():V
- actionPerformed(com.intellij.openapi.actionSystem.AnActionEvent):V
- getActionUpdateThread():com.intellij.openapi.actionSystem.ActionUpdateThread
- update(com.intellij.openapi.actionSystem.AnActionEvent):V
f:com.intellij.openapi.externalSystem.autoimport.ProjectRefreshAction$Companion
- f:refreshProject(com.intellij.openapi.project.Project):V
f:com.intellij.openapi.externalSystem.autoimport.ProjectRefreshAction$Manager
- sf:INSTANCE:com.intellij.openapi.externalSystem.autoimport.ProjectRefreshAction$Manager
- f:refreshProject(com.intellij.openapi.project.Project):V
f:com.intellij.openapi.externalSystem.autoimport.ProjectStatus
- sf:Companion:com.intellij.openapi.externalSystem.autoimport.ProjectStatus$Companion
- <init>():V
- <init>(java.lang.String):V
- b:<init>(java.lang.String,I,kotlin.jvm.internal.DefaultConstructorMarker):V
- f:getModificationType():com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType
- f:isDirty():Z
- f:isUpToDate():Z
- f:markBroken(J):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState
- f:markDirty(J,com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState
- bs:markDirty$default(com.intellij.openapi.externalSystem.autoimport.ProjectStatus,J,com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType,I,java.lang.Object):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState
- f:markModified(J,com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState
- bs:markModified$default(com.intellij.openapi.externalSystem.autoimport.ProjectStatus,J,com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType,I,java.lang.Object):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState
- f:markReverted(J):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState
- f:markSynchronized(J):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState
- f:update(com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState
f:com.intellij.openapi.externalSystem.autoimport.ProjectStatus$Companion
- f:merge(com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType,com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType):com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType
a:com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent
- sf:Companion:com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent$Companion
- a:getStamp():J
f:com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent$Break
- com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent
- <init>(J):V
- f:component1():J
- f:copy(J):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent$Break
- bs:copy$default(com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent$Break,J,I,java.lang.Object):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent$Break
- equals(java.lang.Object):Z
- getStamp():J
- hashCode():I
f:com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent$Companion
- f:externalInvalidate(J):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent$Invalidate
- f:externalModify(J):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent$Modify
f:com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent$Invalidate
- com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent
- <init>(J,com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType):V
- f:component1():J
- f:component2():com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType
- f:copy(J,com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent$Invalidate
- bs:copy$default(com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent$Invalidate,J,com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType,I,java.lang.Object):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent$Invalidate
- equals(java.lang.Object):Z
- getStamp():J
- f:getType():com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType
- hashCode():I
f:com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent$Modify
- com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent
- <init>(J,com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType):V
- f:component1():J
- f:component2():com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType
- f:copy(J,com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent$Modify
- bs:copy$default(com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent$Modify,J,com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType,I,java.lang.Object):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent$Modify
- equals(java.lang.Object):Z
- getStamp():J
- f:getType():com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType
- hashCode():I
f:com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent$Revert
- com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent
- <init>(J):V
- f:component1():J
- f:copy(J):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent$Revert
- bs:copy$default(com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent$Revert,J,I,java.lang.Object):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent$Revert
- equals(java.lang.Object):Z
- getStamp():J
- hashCode():I
f:com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent$Synchronize
- com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent
- <init>(J):V
- f:component1():J
- f:copy(J):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent$Synchronize
- bs:copy$default(com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent$Synchronize,J,I,java.lang.Object):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectEvent$Synchronize
- equals(java.lang.Object):Z
- getStamp():J
- hashCode():I
a:com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState
- a:getStamp():J
f:com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState$Broken
- com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState
- <init>(J):V
- f:component1():J
- f:copy(J):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState$Broken
- bs:copy$default(com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState$Broken,J,I,java.lang.Object):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState$Broken
- equals(java.lang.Object):Z
- getStamp():J
- hashCode():I
f:com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState$Dirty
- com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState
- <init>(J,com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType):V
- f:component1():J
- f:component2():com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType
- f:copy(J,com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState$Dirty
- bs:copy$default(com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState$Dirty,J,com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType,I,java.lang.Object):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState$Dirty
- equals(java.lang.Object):Z
- getStamp():J
- f:getType():com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType
- hashCode():I
f:com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState$Modified
- com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState
- <init>(J,com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType):V
- f:component1():J
- f:component2():com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType
- f:copy(J,com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState$Modified
- bs:copy$default(com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState$Modified,J,com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType,I,java.lang.Object):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState$Modified
- equals(java.lang.Object):Z
- getStamp():J
- f:getType():com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType
- hashCode():I
f:com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState$Reverted
- com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState
- <init>(J):V
- f:component1():J
- f:copy(J):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState$Reverted
- bs:copy$default(com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState$Reverted,J,I,java.lang.Object):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState$Reverted
- equals(java.lang.Object):Z
- getStamp():J
- hashCode():I
f:com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState$Synchronized
- com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState
- <init>(J):V
- f:component1():J
- f:copy(J):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState$Synchronized
- bs:copy$default(com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState$Synchronized,J,I,java.lang.Object):com.intellij.openapi.externalSystem.autoimport.ProjectStatus$ProjectState$Synchronized
- equals(java.lang.Object):Z
- getStamp():J
- hashCode():I
com.intellij.openapi.externalSystem.autoimport.changes.vfs.VirtualFileChangesListener
- sf:Companion:com.intellij.openapi.externalSystem.autoimport.changes.vfs.VirtualFileChangesListener$Companion
- apply():V
- init():V
- isProcessRecursively():Z
- isRelevant(com.intellij.openapi.vfs.VirtualFile,com.intellij.openapi.vfs.newvfs.events.VFileEvent):Z
- updateFile(com.intellij.openapi.vfs.VirtualFile,com.intellij.openapi.vfs.newvfs.events.VFileEvent):V
f:com.intellij.openapi.externalSystem.autoimport.changes.vfs.VirtualFileChangesListener$Companion
- f:installAsyncVirtualFileListener(com.intellij.openapi.externalSystem.autoimport.changes.vfs.VirtualFileChangesListener,com.intellij.openapi.Disposable):V
- f:installBulkVirtualFileListener(com.intellij.openapi.externalSystem.autoimport.changes.vfs.VirtualFileChangesListener,com.intellij.openapi.Disposable):V
a:com.intellij.openapi.externalSystem.dependency.analyzer.AbstractDependencyAnalyzerAction
- com.intellij.openapi.externalSystem.dependency.analyzer.DependencyAnalyzerAction
- <init>():V
@@ -265,13 +93,6 @@ a:com.intellij.openapi.externalSystem.dependency.analyzer.DependencyAnalyzerGoTo
- a:getNavigatable(com.intellij.openapi.actionSystem.AnActionEvent):com.intellij.pom.Navigatable
- f:getSystemId():com.intellij.openapi.externalSystem.model.ProjectSystemId
- update(com.intellij.openapi.actionSystem.AnActionEvent):V
f:com.intellij.openapi.externalSystem.dependency.analyzer.DependencyAnalyzerManager
- sf:Companion:com.intellij.openapi.externalSystem.dependency.analyzer.DependencyAnalyzerManager$Companion
- <init>(com.intellij.openapi.project.Project):V
- sf:getInstance(com.intellij.openapi.project.Project):com.intellij.openapi.externalSystem.dependency.analyzer.DependencyAnalyzerManager
- f:getOrCreate(com.intellij.openapi.externalSystem.model.ProjectSystemId):com.intellij.openapi.externalSystem.dependency.analyzer.DependencyAnalyzerView
f:com.intellij.openapi.externalSystem.dependency.analyzer.DependencyAnalyzerManager$Companion
- f:getInstance(com.intellij.openapi.project.Project):com.intellij.openapi.externalSystem.dependency.analyzer.DependencyAnalyzerManager
a:com.intellij.openapi.externalSystem.dependency.analyzer.DependencyAnalyzerOpenConfigAction
- com.intellij.openapi.project.DumbAwareAction
- <init>(com.intellij.openapi.externalSystem.model.ProjectSystemId):V
@@ -280,12 +101,6 @@ a:com.intellij.openapi.externalSystem.dependency.analyzer.DependencyAnalyzerOpen
- a:getConfigFile(com.intellij.openapi.actionSystem.AnActionEvent):com.intellij.openapi.vfs.VirtualFile
- f:getSystemId():com.intellij.openapi.externalSystem.model.ProjectSystemId
- update(com.intellij.openapi.actionSystem.AnActionEvent):V
a:com.intellij.openapi.externalSystem.dependency.analyzer.DummyDependencyAnalyzerContributor
- com.intellij.openapi.externalSystem.dependency.analyzer.DependencyAnalyzerContributor
- <init>(com.intellij.openapi.project.Project):V
- getDependencies(com.intellij.openapi.externalSystem.dependency.analyzer.DependencyAnalyzerProject):java.util.List
- getDependencyScopes(com.intellij.openapi.externalSystem.dependency.analyzer.DependencyAnalyzerProject):java.util.List
- getProjects():java.util.List
a:com.intellij.openapi.externalSystem.dependency.analyzer.ExternalSystemDependencyAnalyzerOpenConfigAction
- com.intellij.openapi.externalSystem.dependency.analyzer.DependencyAnalyzerOpenConfigAction
- <init>(com.intellij.openapi.externalSystem.model.ProjectSystemId):V
@@ -316,16 +131,6 @@ a:com.intellij.openapi.externalSystem.importing.ExternalProjectStructureCustomiz
- getPublicDataKeys():java.util.Set
- getRepresentationName(com.intellij.openapi.externalSystem.model.DataNode):com.intellij.openapi.util.Couple
- a:suggestIcon(com.intellij.openapi.externalSystem.model.DataNode,com.intellij.openapi.externalSystem.ExternalSystemUiAware):javax.swing.Icon
*f:com.intellij.openapi.externalSystem.importing.GAVStateComponent
- com.intellij.openapi.components.PersistentStateComponent
- <init>():V
- addMapping(java.lang.String,java.lang.String,java.lang.String,java.lang.String):V
- getMapping():java.util.Map
- getState():com.intellij.openapi.externalSystem.importing.GAVStateComponent$State
- loadState(com.intellij.openapi.externalSystem.importing.GAVStateComponent$State):V
*f:com.intellij.openapi.externalSystem.importing.GAVStateComponent$State
- f:moduleMapping:java.util.Set
- <init>():V
*c:com.intellij.openapi.externalSystem.issue.BuildIssueException
- com.intellij.openapi.externalSystem.model.ExternalSystemException
- com.intellij.build.issue.BuildIssueProvider

View File

@@ -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-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.openapi.externalSystem.action;
import com.intellij.icons.AllIcons;
@@ -20,6 +20,7 @@ import com.intellij.openapi.externalSystem.view.ProjectNode;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.module.ModuleManager;
import com.intellij.openapi.project.Project;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -27,6 +28,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@ApiStatus.Internal
public class DetachExternalProjectAction extends ExternalSystemNodeAction<ProjectData> {
public DetachExternalProjectAction() {

View File

@@ -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-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.openapi.externalSystem.action;
import com.intellij.openapi.actionSystem.ActionUpdateThread;
@@ -17,6 +17,7 @@ import com.intellij.openapi.fileEditor.FileDocumentManager;
import com.intellij.openapi.project.DumbAwareAction;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.text.StringUtil;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import java.util.ArrayList;
@@ -26,6 +27,7 @@ import java.util.List;
* Forces the ide to retrieve the most up-to-date info about the linked external projects and updates project state if necessary
* (e.g. imports missing libraries).
*/
@ApiStatus.Internal
public class RefreshAllExternalProjectsAction extends DumbAwareAction {
public RefreshAllExternalProjectsAction() {
getTemplatePresentation().setText(ExternalSystemBundle.messagePointer("action.refresh.all.projects.text", "External"));

View File

@@ -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-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.openapi.externalSystem.autoimport
import com.intellij.icons.AllIcons
@@ -6,7 +6,9 @@ import com.intellij.openapi.actionSystem.ActionUpdateThread
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.externalSystem.util.ExternalSystemBundle
import com.intellij.openapi.project.DumbAwareAction
import org.jetbrains.annotations.ApiStatus
@ApiStatus.Internal
class HideProjectRefreshAction : DumbAwareAction() {
override fun actionPerformed(e: AnActionEvent) {
val project = e.project ?: return

View File

@@ -1,9 +1,11 @@
// 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-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.openapi.externalSystem.autoimport
import com.intellij.ide.file.BatchFileChangeListener
import com.intellij.openapi.project.Project
import org.jetbrains.annotations.ApiStatus
@ApiStatus.Internal
abstract class ProjectBatchFileChangeListener(private val project: Project) : BatchFileChangeListener {
open fun batchChangeStarted(activityName: String?) {}

View File

@@ -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-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.openapi.externalSystem.autoimport
import com.intellij.icons.AllIcons
@@ -15,6 +15,7 @@ import com.intellij.openapi.util.NlsActions
import org.jetbrains.annotations.ApiStatus
import javax.swing.Icon
@ApiStatus.Internal
class ProjectRefreshAction : DumbAwareAction() {
override fun actionPerformed(e: AnActionEvent) {
val project = e.project ?: return

View File

@@ -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-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.openapi.externalSystem.autoimport
@@ -6,9 +6,11 @@ import com.intellij.openapi.diagnostic.Logger
import com.intellij.openapi.externalSystem.autoimport.ExternalSystemModificationType.*
import com.intellij.openapi.externalSystem.autoimport.ProjectStatus.ProjectEvent.*
import com.intellij.openapi.externalSystem.autoimport.ProjectStatus.ProjectState.*
import org.jetbrains.annotations.ApiStatus
import java.util.concurrent.atomic.AtomicReference
import kotlin.math.max
@ApiStatus.Internal
class ProjectStatus(private val debugName: String? = null) {
private var state = AtomicReference(Synchronized(-1) as ProjectState)

View File

@@ -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-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.openapi.externalSystem.autoimport.changes.vfs
import com.intellij.openapi.Disposable
@@ -8,7 +8,9 @@ import com.intellij.openapi.vfs.VirtualFile
import com.intellij.openapi.vfs.VirtualFileManager
import com.intellij.openapi.vfs.newvfs.BulkFileListener
import com.intellij.openapi.vfs.newvfs.events.VFileEvent
import org.jetbrains.annotations.ApiStatus
@ApiStatus.Internal
interface VirtualFileChangesListener {
fun isProcessRecursively(): Boolean = false

View File

@@ -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-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.openapi.externalSystem.dependency.analyzer
import com.intellij.openapi.components.Service
@@ -7,8 +7,10 @@ import com.intellij.openapi.externalSystem.model.ProjectSystemId
import com.intellij.openapi.fileEditor.FileEditorManager
import com.intellij.openapi.observable.util.whenDisposed
import com.intellij.openapi.project.Project
import org.jetbrains.annotations.ApiStatus
@Service(Service.Level.PROJECT)
@ApiStatus.Internal
class DependencyAnalyzerManager(private val project: Project) {
private val files = HashMap<ProjectSystemId, DependencyAnalyzerVirtualFile>()

View File

@@ -1,164 +0,0 @@
// 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.
package com.intellij.openapi.externalSystem.dependency.analyzer
import com.intellij.openapi.externalSystem.dependency.analyzer.DependencyAnalyzerDependency as Dependency
import com.intellij.openapi.externalSystem.util.ExternalSystemBundle
import com.intellij.openapi.project.Project
import com.intellij.openapi.project.modules
import com.intellij.openapi.util.NlsSafe
import com.intellij.openapi.util.text.StringUtil
import com.intellij.util.LocalTimeCounter
@Suppress("HardCodedStringLiteral", "unused")
abstract class DummyDependencyAnalyzerContributor(private val project: Project) : DependencyAnalyzerContributor {
private fun scope(name: @NlsSafe String) =
DAScope(name, StringUtil.toTitleCase(name))
override fun getProjects() =
project.modules.map { DAProject(it, it.name) }
override fun getDependencyScopes(externalProject: DependencyAnalyzerProject) = listOf(
scope("compile"),
scope("runtime"),
scope("provided"),
scope("test"),
scope("system"),
scope("import"),
scope("scope" + LocalTimeCounter.currentTime())
)
private fun getRoot(externalProject: DependencyAnalyzerProject): Dependency {
return createDependency(DAModule(externalProject.module.name), scope("compile"), null)
}
private fun getDependencies(dependency: Dependency): List<Dependency> {
return when (dependency.data.id) {
"parent1" -> listOf(
createDependency(DAArtifact("org.hamcrest", "hamcrest", "2.2"), scope("compile"), dependency),
createDependency(DAArtifact("org.hamcrest", "hamcrest-core", "2.2"), scope("runtime"), dependency),
createDependency(DAArtifact("org.junit.jupiter", "junit-jupiter-api", "5.8.0"), scope("provided"), dependency),
createDependency(DAArtifact("org.junit.jupiter", "junit-jupiter-engine", "5.8.0"), scope("test"), dependency),
createDependency(DAArtifact("org.junit.platform", "junit-platform-commons", "1.8.0"), scope("system"), dependency),
createDependency(DAArtifact("org.junit.platform", "junit-platform-engine", "1.8.0"), scope("import"), dependency)
)
"parent2" -> listOf(
createDependency(DAArtifact("org.hamcrest", "hamcrest-core", "1.3"), scope("compile"), dependency)
)
"module" -> listOf(
createDependency(DAModule("parent1"), scope("compile"), dependency),
createDependency(DAModule("parent2"), scope("compile"), dependency)
)
"org.hamcrest:hamcrest-core:2.2" -> listOf(
createDependency(DAArtifact("org.hamcrest", "hamcrest", "2.2"), scope("compile"), dependency)
)
"org.hamcrest:hamcrest-core:1.3" -> listOf(
createDependency(DAArtifact("org.hamcrest", "hamcrest", "1.3"), scope("compile"), dependency)
)
"org.junit.jupiter:junit-jupiter-api:5.8.0" -> listOf(
createDependency(DAArtifact("org.opentest4j", "opentest4j", "1.2.0"), scope("compile"), dependency),
createDependency(DAArtifact("org.junit.platform", "junit-platform-commons", "1.8.0"), scope("compile"), dependency),
createDependency(DAArtifact("org.apiguardian", "apiguardian-api", "1.1.2"), scope("compile"), dependency)
)
"org.junit.jupiter:junit-jupiter-engine:5.8.0" -> listOf(
createDependency(DAArtifact("org.junit.platform", "junit-platform-engine", "1.8.0"), scope("compile"), dependency),
createDependency(DAArtifact("org.junit.jupiter", "junit-jupiter-api", "5.8.0"), scope("compile"), dependency),
createDependency(DAArtifact("org.apiguardian", "apiguardian-api", "1.1.2"), scope("compile"), dependency)
)
"org.junit.platform:junit-platform-commons:1.8.0" -> listOf(
createDependency(DAArtifact("org.apiguardian", "apiguardian-api", "1.1.2"), scope("compile"), dependency)
)
"org.junit.platform:junit-platform-engine:1.8.0" -> listOf(
createDependency(DAArtifact("org.opentest4j", "opentest4j", "1.2.0"), scope("compile"), dependency),
createDependency(DAArtifact("org.junit.platform", "junit-platform-commons", "1.8.0"), scope("compile"), dependency),
createDependency(DAArtifact("org.apiguardian", "apiguardian-api", "1.1.2"), scope("compile"), dependency)
)
else -> emptyList()
}
}
override fun getDependencies(externalProject: DependencyAnalyzerProject): List<Dependency> {
val dependencies = ArrayList<Dependency>()
val queue = ArrayDeque<Dependency>()
queue.add(getRoot(externalProject))
while (queue.isNotEmpty()) {
val dependency = queue.removeFirst()
dependencies.add(dependency)
getDependencies(dependency)
.forEach(queue::addLast)
}
return dependencies
}
private fun getStatus(data: Dependency.Data, usage: Dependency?): List<Dependency.Status> {
when (data.id) {
"org.hamcrest:hamcrest-core:1.3" ->
if (matchesUsagePathPrefix(usage, "parent2", "module")) {
return listOf(createVersionConflict("2.2"), DAOmitted)
}
"org.hamcrest:hamcrest:1.3" ->
if (matchesUsagePathPrefix(usage, "org.hamcrest:hamcrest-core:1.3", "parent2", "module")) {
return listOf(createVersionConflict("2.2"), DAOmitted)
}
"org.hamcrest:hamcrest-core:2.2" -> {
if (matchesUsagePathPrefix(usage, "parent1", "module")) {
return listOf(createVersionConflict("1.3"))
}
if (!matchesUsagePathPrefix(usage, "parent1")) {
return listOf(DAOmitted)
}
}
"org.hamcrest:hamcrest:2.2" -> {
if (matchesUsagePathPrefix(usage, "org.hamcrest:hamcrest-core:2.2", "parent1", "module")) {
return listOf(createVersionConflict("1.3"))
}
if (!matchesUsagePathPrefix(usage, "parent1")) {
return listOf(DAOmitted)
}
}
"org.junit.jupiter:junit-jupiter-api:5.8.0" ->
if (!matchesUsagePathPrefix(usage, "parent1")) {
return listOf(DAOmitted)
}
"org.junit.jupiter:junit-jupiter-engine:5.8.0" ->
if (!matchesUsagePathPrefix(usage, "parent1")) {
return listOf(DAOmitted)
}
"org.junit.platform:junit-platform-commons:1.8.0" ->
if (!matchesUsagePathPrefix(usage, "parent1")) {
return listOf(DAOmitted)
}
"org.junit.platform:junit-platform-engine:1.8.0" ->
if (!matchesUsagePathPrefix(usage, "parent1")) {
return listOf(DAOmitted)
}
"org.opentest4j:opentest4j:1.2.0" ->
if (!matchesUsagePathPrefix(usage, "org.junit.jupiter:junit-jupiter-api:5.8.0", "parent1")) {
return listOf(DAOmitted)
}
"org.apiguardian:apiguardian-api:1.1.2" ->
if (!matchesUsagePathPrefix(usage, "org.junit.jupiter:junit-jupiter-api:5.8.0", "parent1")) {
return listOf(DAOmitted)
}
}
return emptyList()
}
private fun createDependency(data: Dependency.Data, scope: Dependency.Scope, usage: Dependency?) =
DADependency(data, scope, usage, getStatus(data, usage))
private fun createVersionConflict(conflictedVersion: String) =
DAWarning(ExternalSystemBundle.message("external.system.dependency.analyzer.warning.version.conflict", conflictedVersion))
private fun matchesUsagePathPrefix(dependency: Dependency?, vararg ids: String): Boolean {
if (ids.isEmpty()) return true
return dependency?.data?.id == ids.first() &&
matchesUsagePathPrefix(dependency.parent, *ids.drop(1).toTypedArray())
}
private val Dependency.Data.id
get() = when (this) {
is Dependency.Data.Module -> name
is Dependency.Data.Artifact -> "$groupId:$artifactId:$version"
}
}

View File

@@ -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-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.openapi.externalSystem.importing;
import com.intellij.openapi.components.PersistentStateComponent;
@@ -13,7 +13,7 @@ import org.jetbrains.annotations.Nullable;
import java.util.*;
@Service(Service.Level.PROJECT)
@ApiStatus.Experimental
@ApiStatus.Internal
@State(name = "ExternalSystem.GAVStateComponent", storages = @Storage("jps2ext.xml"))
public final class GAVStateComponent implements PersistentStateComponent<GAVStateComponent.State> {
public static final class State {

View File

@@ -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-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.openapi.externalSystem.importing;
import com.intellij.openapi.externalSystem.model.project.ProjectCoordinate;
@@ -8,7 +8,7 @@ import com.intellij.openapi.util.registry.Registry;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Nullable;
@ApiStatus.Experimental
@ApiStatus.Internal
final class JpsDependencyContributor implements ExternalSystemWorkspaceContributor {
@Override
public @Nullable ProjectCoordinate findProjectId(Module module) {