/**
* Attempts to load <code>resourceName</code> from the provided {@link ResourceLookup}.
*/
private static HashSet<String> load(ResourceLookup resourceLookup, String resourceName)
{
final IResource resource = resourceLookup.getFirst(resourceName);
if (resource == null)
{
throw new RuntimeException(
"No resource named " + resourceName +
" in resource lookup locations: " +
Arrays.toString(resourceLookup.getLocators()));
}
else
{
try
{
return load(resource);
}
catch (IOException e)
{
throw new RuntimeException(
"Resource named " + resourceName +
" failed to load from: " + resource.toString());
}
}
}