constraints = new LinkedList<Constraint>();
this.rels = rels;
}
public void populate(IProgressMonitor monitor) throws CoreException {
SearchEngine engine = new SearchEngine();
SearchPattern pattern = SearchPattern.createPattern("Constraint", IJavaSearchConstants.ANNOTATION_TYPE, IJavaSearchConstants.ANNOTATION_TYPE_REFERENCE, SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE);
SearchParticipant[] participants = new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()};
IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
ConstraintRequestor consReq = new ConstraintRequestor(rels);
engine.search(pattern, participants, scope, consReq, monitor);
constraints.addAll(consReq.getConstraints());
CallbackRequestor callRequest = new CallbackRequestor(rels);
pattern = SearchPattern.createPattern("Callback", IJavaSearchConstants.ANNOTATION_TYPE, IJavaSearchConstants.ANNOTATION_TYPE_REFERENCE, SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE);
engine.search(pattern, participants, scope, callRequest, monitor);
constraints.addAll(callRequest.getConstraints());
EffectRequestor effReq = new EffectRequestor(rels);
for (Relation rel : rels) {
pattern = SearchPattern.createPattern(rel.getName(), IJavaSearchConstants.ANNOTATION_TYPE, IJavaSearchConstants.ANNOTATION_TYPE_REFERENCE, SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE);
engine.search(pattern, participants, scope, effReq, monitor);
}
constraints.addAll(effReq.getConstraints());
}