Bug 27462 [startup] SearchPlugin is loaded when Java plug-in gets loaded
The Java UI plugin eagerly activates the Search plugin. There are 2 reason: 1) ISearchPageScore adapter that is registered 2) fSearchResultViewEntryAdapterFactory we should investigate whether we can reduce this plugin activation.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaElementAdapterFactory.java
}
    	}
    	try {
    		return element.getCorrespondingResource();
    	} catch (JavaModelException e) {
    		if (element instanceof ICompilationUnit)
    			return element.getResource(); 
    		else	
    			return null;	
    	}
    }
    /*
     * @see org.eclipse.ui.IContributorResourceAdapter#getAdaptedResource(org.eclipse.core.runtime.IAdaptable)
     */
    public IResource getAdaptedResource(IAdaptable adaptable) {
        return getResource((IJavaElement)adaptable);
    }
	
	private IResource getProject(IJavaElement element) {
		return element.getJavaProject().getProject();
	}
	private IPropertySource getProperties(IJavaElement element) {
		IResource resource= getResource(element);
		if (resource == null)
			return new JavaElementProperties(element);
		if (resource.getType() == IResource.FILE)
			return new FilePropertySource((IFile) resource);
		return new ResourcePropertySource((IResource) resource);
	}
}