summaryrefslogtreecommitdiff
path: root/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/OrderEnumeratorBase.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/projectModel-impl/src/com/intellij/openapi/roots/impl/OrderEnumeratorBase.java')
-rw-r--r--platform/projectModel-impl/src/com/intellij/openapi/roots/impl/OrderEnumeratorBase.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/OrderEnumeratorBase.java b/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/OrderEnumeratorBase.java
index 61a6aee9315b..b13df0560292 100644
--- a/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/OrderEnumeratorBase.java
+++ b/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/OrderEnumeratorBase.java
@@ -356,6 +356,38 @@ abstract class OrderEnumeratorBase extends OrderEnumerator implements OrderEnume
return false;
}
+ boolean addCustomRootsForModule(OrderRootType type,
+ ModuleRootModel rootModel,
+ Collection<VirtualFile> result,
+ boolean includeProduction,
+ boolean includeTests) {
+ for (OrderEnumerationHandler handler : myCustomHandlers) {
+ final List<String> urls = new ArrayList<String>();
+ final boolean added = handler.addCustomModuleRoots(type, rootModel, urls, includeProduction, includeTests);
+ for (String url : urls) {
+ ContainerUtil.addIfNotNull(VirtualFileManager.getInstance().findFileByUrl(url), result);
+ }
+
+ if (added) return true;
+ }
+ return false;
+ }
+
+ boolean addCustomRootUrlsForModule(OrderRootType type,
+ ModuleRootModel rootModel,
+ Collection<String> result,
+ boolean includeProduction,
+ boolean includeTests) {
+ for (OrderEnumerationHandler handler : myCustomHandlers) {
+ final List<String> urls = new ArrayList<String>();
+ final boolean added = handler.addCustomModuleRoots(type, rootModel, urls, includeProduction, includeTests);
+ result.addAll(urls);
+
+ if (added) return true;
+ }
+ return false;
+ }
+
@Override
public boolean isRuntimeOnly() {
return myRuntimeOnly;