*/
public static IJavaProject getProject(ISelection selection) throws EvolizerException {
IJavaProject project = null;
if (selection instanceof ITreeSelection) {
ITreeSelection treeSelection = (ITreeSelection) selection;
// select project from first selected element
project = ((IJavaElement) treeSelection.getFirstElement()).getJavaProject();
} else if (selection instanceof IStructuredSelection) {
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
project = ((IJavaElement) structuredSelection.getFirstElement()).getJavaProject();
} else {
throw new EvolizerException("Could not determine the project from the selection");