Bug 62959 Search in enclosing project doesn't take project from editor
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
if (project != null)
				projects.add(project);
		}
	}
	private void collectConcernedProjects(Set projects, IWorkspace workspace) {
		IProject[] allProjects= workspace.getRoot().getProjects();
		for (int i= 0; i < allProjects.length; i++) {
			if (allProjects[i].isAccessible())
				projects.add(allProjects[i]);
		}
	}
	private IProject getProject(Object element) {
		if (element instanceof ISearchResultViewEntry)
			element= ((ISearchResultViewEntry)element).getGroupByKey();
		if (element instanceof IAdaptable) {
			IAdaptable adaptable= (IAdaptable)element;
			IProject project= (IProject) adaptable.getAdapter(IProject.class);
			if (project != null)
				return project;
			IResource resource= (IResource) adaptable.getAdapter(IResource.class);
			if (resource != null)
				project= resource.getProject();
			if (project != null)
				return project;
		}
		return null;
	}
	
}