public static IJavaSearchScope createSearchScope ( IJavaProject project , Class < ? > type , boolean onlySubTypes ) { try { final IType superType = project . findType ( type . getName ( ) ) ; return SearchEngine . createStrictHierarchyScope ( project , superType , // only sub types onlySubTypes , // include the type true , null ) ; } catch ( JavaModelException e ) { SARLEclipsePlugin . getDefault ( ) . log ( e ) ; } return SearchEngine . createJavaSearchScope ( new IJavaElement [ ] { project } ) ; }
Creates a searching scope including only one project .