mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
shortcurt for one-module project
This commit is contained in:
+7
-2
@@ -156,8 +156,13 @@ public class ProjectRootManagerImpl extends ProjectRootManagerEx implements Pers
|
||||
@NotNull
|
||||
public VirtualFile[] getContentRoots() {
|
||||
final List<VirtualFile> result = new ArrayList<>();
|
||||
for (Module module : getModuleManager().getModules()) {
|
||||
final VirtualFile[] contentRoots = ModuleRootManager.getInstance(module).getContentRoots();
|
||||
Module[] modules = getModuleManager().getModules();
|
||||
for (Module module : modules) {
|
||||
VirtualFile[] contentRoots = ModuleRootManager.getInstance(module).getContentRoots();
|
||||
if (modules.length == 1) {
|
||||
return contentRoots;
|
||||
}
|
||||
|
||||
ContainerUtil.addAll(result, contentRoots);
|
||||
}
|
||||
return VfsUtilCore.toVirtualFileArray(result);
|
||||
|
||||
Reference in New Issue
Block a user