/**
* @see org.aspectj.org.eclipse.jdt.core.eval.IEvaluationContext#codeSelect(String, int, int, WorkingCopyOwner)
*/
public IJavaElement[] codeSelect(String codeSnippet, int offset, int length, WorkingCopyOwner owner) throws JavaModelException {
SearchableEnvironment environment = this.project.newSearchableNameEnvironment(owner);
SelectionRequestor requestor= new SelectionRequestor(environment.nameLookup, null); // null because there is no need to look inside the code snippet itself
this.context.select(
codeSnippet.toCharArray(),
offset,
offset + length - 1,
environment,
requestor,
this.project.getOptions(true)
);
return requestor.getElements();
}