Skip to content

Commit c9d7ab3

Browse files
committed
private functions not needed
1 parent f254b7a commit c9d7ab3

File tree

1 file changed

+0
-59
lines changed

1 file changed

+0
-59
lines changed

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/dependencies/DefaultModuleDependenciesService.kt

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -58,63 +58,4 @@ class DefaultModuleDependenciesService(
5858
}
5959
}
6060
}
61-
62-
private fun getSourceRoots(module: Module): List<String> {
63-
val sourceRoots = mutableListOf<String>()
64-
65-
// Get all source roots from content entries
66-
ModuleRootManager.getInstance(module).contentEntries
67-
.flatMap { contentEntry ->
68-
contentEntry.sourceFolders
69-
.filter { !it.isTestSource }
70-
.mapNotNull { it.file?.path }
71-
}
72-
.forEach { path -> sourceRoots.add(path) }
73-
74-
return sourceRoots
75-
}
76-
77-
private fun createJavaParams(module: Module): SyncModuleDependenciesParams {
78-
val sourceRoots = getSourceRoots(module)
79-
val dependencies = mutableListOf<String>()
80-
81-
// Get library dependencies
82-
ModuleRootManager.getInstance(module).orderEntries().forEachLibrary { library ->
83-
library.getUrls(OrderRootType.CLASSES).forEach { url ->
84-
dependencies.add(VfsUtil.urlToPath(url))
85-
}
86-
true
87-
}
88-
89-
return SyncModuleDependenciesParams(
90-
moduleName = module.name,
91-
programmingLanguage = "Java",
92-
files = sourceRoots,
93-
dirs = dependencies,
94-
includePatterns = emptyList(),
95-
excludePatterns = emptyList()
96-
)
97-
}
98-
99-
private fun createPythonParams(module: Module): SyncModuleDependenciesParams {
100-
val sourceRoots = getSourceRoots(module)
101-
val dependencies = mutableListOf<String>()
102-
103-
// Get Python packages
104-
PythonSdkUtil.findPythonSdk(module)?.let { sdk ->
105-
val packageManager = PythonPackageManager.forSdk(module.project, sdk)
106-
packageManager.installedPackages.forEach { pkg ->
107-
dependencies.add(pkg.name)
108-
}
109-
}
110-
111-
return SyncModuleDependenciesParams(
112-
moduleName = module.name,
113-
programmingLanguage = "Python",
114-
files = sourceRoots,
115-
dirs = dependencies,
116-
includePatterns = emptyList(),
117-
excludePatterns = emptyList()
118-
)
119-
}
12061
}

0 commit comments

Comments
 (0)