CSearchQuery query = new CSearchPatternQuery(
scope, scopeDesc, pattern, caseSensitive, type | context);
ArrayList<Position> results = new ArrayList<Position>();
if (query != null){
query.run(new NullProgressMonitor());
CSearchResult result = (CSearchResult)query.getSearchResult();
for (Object e : result.getElements()){
Method method = CSearchElement.class.getDeclaredMethod("getLocation");
method.setAccessible(true);
IIndexFileLocation location = (IIndexFileLocation)method.invoke(e);