in org.apache.easyant4e/src/org/apache/easyant4e/natures/AddEasyAntNatureAction.java [61:75]
public void selectionChanged(IAction action, ISelection selection) {
if (selection instanceof StructuredSelection) {
StructuredSelection structuredSelection = (StructuredSelection) selection;
if (!structuredSelection.isEmpty() && structuredSelection.getFirstElement() instanceof IProject) {
IProject project = (IProject) structuredSelection.getFirstElement();
if (project.isAccessible()) {
this.selectedProject = project;
if (action != null) {
action.setEnabled(!easyantProjectService.hasEasyAntNature(project));
}
}
}
}
}