result.addAll(Arrays.asList(roots));
}
}
private ClassPath getSources() {
NbJavaModel currentModel = javaExt.getCurrentModel();
NbJavaModule mainModule = currentModel.getMainModule();
Set<FileObject> srcRoots = new LinkedHashSet<>();
Set<File> runtimeDependencies = new HashSet<>(100);
addSourcesOfModule(mainModule, srcRoots);
getBinaryRuntimeDependencies(mainModule, runtimeDependencies);
for (JavaProjectReference projectRef: currentModel.getAllDependencies()) {
NbJavaModule module = projectRef.tryGetModule();
if (module != null) {
addSourcesOfModule(module, srcRoots);
getBinaryRuntimeDependencies(module, runtimeDependencies);
}