@Override
public NavigationResult next(UINavigationContext context) throws Exception
{
UIContext uiContext = context.getUIContext();
Map<Object, Object> attributeMap = uiContext.getAttributeMap();
ResourceCollection resourceCollection = new ResourceCollection();
if (targets.getValue() != null)
{
for (JavaClassSource klass : targets.getValue())
{
Project project = getSelectedProject(uiContext);
JavaSourceFacet javaSource = project.getFacet(JavaSourceFacet.class);
Resource<?> resource = javaSource.getJavaResource(klass);
if (resource != null)
{
resourceCollection.addToCollection(resource);
}
}
}
attributeMap.put(ResourceCollection.class, resourceCollection);