@NotNull
public static VirtualFile[] getResourceRoots(@NotNull Module module) {
// all module source roots
VirtualFile[] result = ModuleRootManager.getInstance(module).getSourceRoots();
// alternate paths
WicketForgeFacet wicketForgeFacet = WicketForgeFacet.getInstance(module);
if (wicketForgeFacet != null) {
List<VirtualFile> alternateFiles = new SmartList<VirtualFile>();
// add all valid alternate paths to list
for (VirtualFilePointer virtualFilePointer : wicketForgeFacet.getResourcePaths()) {
VirtualFile virtualFile = virtualFilePointer.getFile();
if (virtualFile != null && virtualFile.isValid()) {
alternateFiles.add(virtualFile);
}
}