Iterator<?> iterator;
for (iterator = treeSelection.iterator(); iterator.hasNext();) {
Object selectedObject = iterator.next();
if (!(selectedObject instanceof RepositoryFile))
continue;
RepositoryFile repositoryFile = (RepositoryFile) selectedObject;
IRepositoryResource resource = repositoryFile
.getRepositoryResource();
resources.add(resource);
}
}