mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[workspace model] IDEA-298714 Remove old code
GitOrigin-RevId: 62e2949640fcea6be542ceb36fcd174c25f97d2d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
91f1bfac48
commit
b90e7ecd88
+1
-1
@@ -71,6 +71,6 @@ interface WorkspaceFacetContributor<T: WorkspaceEntity> {
|
||||
}
|
||||
|
||||
companion object {
|
||||
val EP_NAME: ExtensionPointName<WorkspaceFacetContributor<WorkspaceEntity>> = ExtensionPointName.create("com.intellij.workspaceModel.facetBridgeContributor")
|
||||
val EP_NAME: ExtensionPointName<WorkspaceFacetContributor<WorkspaceEntity>> = ExtensionPointName.create("com.intellij.workspaceModel.facetContributor")
|
||||
}
|
||||
}
|
||||
@@ -317,7 +317,7 @@
|
||||
<projectService serviceInterface="com.intellij.facet.FacetFinder" serviceImplementation="com.intellij.facet.impl.FacetFinderImpl"/>
|
||||
<projectService serviceImplementation="com.intellij.facet.impl.FacetEventsPublisher" preload="await"/>
|
||||
<projectService serviceImplementation="com.intellij.workspaceModel.ide.impl.legacyBridge.facet.FacetEntityChangeListener"/>
|
||||
<workspaceModel.facetBridgeContributor implementation="com.intellij.workspaceModel.ide.impl.legacyBridge.facet.FacetEntityContributor" />
|
||||
<workspaceModel.facetContributor implementation="com.intellij.workspaceModel.ide.impl.legacyBridge.facet.FacetEntityContributor" />
|
||||
|
||||
<projectService serviceInterface="com.intellij.facet.ProjectFacetManager"
|
||||
serviceImplementation="com.intellij.facet.impl.ProjectFacetManagerImpl"/>
|
||||
|
||||
@@ -13,9 +13,7 @@
|
||||
<extensionPoint name="customEntityProjectModelInfoProvider"
|
||||
interface="com.intellij.openapi.roots.impl.CustomEntityProjectModelInfoProvider"
|
||||
dynamic="true"/>
|
||||
<extensionPoint name="workspaceModel.moduleSettingsContributor" interface="com.intellij.workspaceModel.ide.ModuleSettingsContributor"
|
||||
dynamic="true"/>
|
||||
<extensionPoint name="workspaceModel.facetBridgeContributor" interface="com.intellij.workspaceModel.ide.legacyBridge.WorkspaceFacetContributor"
|
||||
<extensionPoint name="workspaceModel.facetContributor" interface="com.intellij.workspaceModel.ide.legacyBridge.WorkspaceFacetContributor"
|
||||
dynamic="true"/>
|
||||
</extensionPoints>
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.workspaceModel.ide
|
||||
|
||||
import com.intellij.openapi.extensions.ExtensionPointName
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.workspaceModel.ide.legacyBridge.FacetBridge
|
||||
import com.intellij.workspaceModel.storage.EntitySource
|
||||
import com.intellij.workspaceModel.storage.EntityStorage
|
||||
import com.intellij.workspaceModel.storage.MutableEntityStorage
|
||||
import com.intellij.workspaceModel.storage.bridgeEntities.api.FacetEntity
|
||||
import com.intellij.workspaceModel.storage.bridgeEntities.api.ModuleEntity
|
||||
|
||||
//TODO:: Rework it
|
||||
interface ModuleSettingsContributor {
|
||||
fun addSettings(project: Project) { }
|
||||
fun addSettings(project: Project, module: ModuleEntity, entitySource: EntitySource, mutableStorage: MutableEntityStorage) { }
|
||||
fun getFacetBridge(moduleEntity: ModuleEntity, entityStorage: EntityStorage): FacetBridge<*>?
|
||||
|
||||
companion object {
|
||||
val EP_NAME: ExtensionPointName<ModuleSettingsContributor> = ExtensionPointName.create("com.intellij.workspaceModel.moduleSettingsContributor")
|
||||
}
|
||||
}
|
||||
-7
@@ -43,13 +43,6 @@ class DefaultFacetEntitySerializer: CustomFacetRelatedEntitySerializer<FacetEnti
|
||||
}
|
||||
|
||||
if (existingFacet == null) {
|
||||
val logger = logger<DefaultFacetEntitySerializer>()
|
||||
logger.info("Add facet entity ${facetState.name}:${facetState.facetType}")
|
||||
logger.info("Stack Trace facet Add")
|
||||
val stackTrace = Thread.currentThread().stackTrace
|
||||
for (stackTraceElement in stackTrace) {
|
||||
logger.info(stackTraceElement.toString())
|
||||
}
|
||||
facetEntity = builder.addFacetEntity(facetState.name, facetState.facetType, configurationXmlTag, moduleEntity, underlyingFacet, entitySource)
|
||||
}
|
||||
|
||||
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.idea.maven.importing.workspaceModel
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.project.isExternalStorageEnabled
|
||||
import com.intellij.workspaceModel.ide.JpsFileEntitySource
|
||||
import com.intellij.workspaceModel.ide.JpsImportedEntitySource
|
||||
import com.intellij.workspaceModel.ide.ModuleSettingsContributor
|
||||
import com.intellij.workspaceModel.storage.EntitySource
|
||||
import com.intellij.workspaceModel.storage.MutableEntityStorage
|
||||
import com.intellij.workspaceModel.storage.bridgeEntities.api.ModuleEntity
|
||||
import org.jetbrains.idea.maven.importing.MavenRootModelAdapter
|
||||
import org.jetbrains.idea.maven.project.MavenProject
|
||||
|
||||
class ModuleSettingsImporter {
|
||||
fun configureSettingsForModule(project: Project, moduleEntity: ModuleEntity, mavenProject: MavenProject) {
|
||||
val entitySource = calculateEntitySource(project, moduleEntity)
|
||||
// TODO:: Rework it
|
||||
ModuleSettingsContributor.EP_NAME.forEachExtensionSafe { settingsContributor ->
|
||||
settingsContributor.addSettings(project, moduleEntity, entitySource, MutableEntityStorage.create())
|
||||
}
|
||||
// TODO:: Only one usage in the plugins at EjbFacetImporter an zero at external plugins
|
||||
// setupFacet(f, mavenProject)
|
||||
}
|
||||
|
||||
private fun calculateEntitySource(project: Project, moduleEntity: ModuleEntity): EntitySource {
|
||||
val moduleSource = moduleEntity.entitySource
|
||||
val externalSource = MavenRootModelAdapter.getMavenExternalSource()
|
||||
return when {
|
||||
moduleSource is JpsFileEntitySource ->
|
||||
JpsImportedEntitySource(moduleSource, externalSource.id, project.isExternalStorageEnabled)
|
||||
moduleSource is JpsImportedEntitySource && moduleSource.externalSystemId != externalSource.id ->
|
||||
JpsImportedEntitySource(moduleSource.internalFile, externalSource.id, project.isExternalStorageEnabled)
|
||||
else -> moduleSource
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user