mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[maven] import to workspace model: don't create duplicating sources roots (IDEA-284414)
GitOrigin-RevId: 75451f034c88a85ccbdc9b917faf598c38731f10
This commit is contained in:
committed by
intellij-monorepo-bot
parent
19dc802c2c
commit
5cb55734be
+4
-1
@@ -251,7 +251,10 @@ class WorkspaceModuleImporter(
|
||||
private fun addGeneratedJavaSourceFolder(path: String, type: JavaSourceRootType, contentRootEntity: ContentRootEntity) {
|
||||
if (File(path).list().isNullOrEmpty()) return
|
||||
|
||||
val sourceRootEntity = builder.addSourceRootEntity(contentRootEntity, virtualFileUrlManager.fromPath(path),
|
||||
val url = virtualFileUrlManager.fromPath(path)
|
||||
if (contentRootEntity.sourceRoots.any { it.url == url }) return
|
||||
|
||||
val sourceRootEntity = builder.addSourceRootEntity(contentRootEntity, url,
|
||||
SourceRootPropertiesHelper.findSerializer(type)?.typeId!!,
|
||||
contentRootEntity.entitySource)
|
||||
builder.addJavaSourceRootEntity(sourceRootEntity, true, "")
|
||||
|
||||
Reference in New Issue
Block a user