if (workspaceResource != null && workspaceResource.exists()) {
if (workspaceResource instanceof IContainer) {
return getModuleResources(relativeModuleResourcePath,
(IContainer) workspaceResource);
} else if (workspaceResource instanceof IFile) {
return new IModuleResource[] { new ModuleFile(
(IFile) workspaceResource,
workspaceResource.getName(),
relativeModuleResourcePath) };
}
}
// Others check if it is an external file
else if (publishableFile != null && publishableFile.exists()
&& publishableFile.isFile()) {
// Try creating a module if the file system file exists
return new IModuleResource[] { new ModuleFile(
publishableFile, publishableFile.getName(),
relativeModuleResourcePath) };
}
}
}