boolean hasExtension = false;
Iterator itp = fProcessors.iterator();
while (itp.hasNext() && (!hasPresenter || !hasExtension)) {
IContentAssistProcessor p = (IContentAssistProcessor) itp.next();
IContextInformationValidator v = p.getContextInformationValidator();
if (v != null) {
hasValidator = true;
if (v instanceof IContextInformationPresenter) {
hasPresenter = true;
}
if (v instanceof ISubjectControlContextInformationPresenter || v instanceof ISubjectControlContextInformationValidator) {
hasExtension = true;
}
}
}
CompoundContentAssistValidator validator = null;
if (hasPresenter && hasExtension)
validator = new CompoundContentAssistValidatorPresenterEx();
else if (hasPresenter)
validator = new CompoundContentAssistValidatorPresenter();
else if (hasExtension)
validator = new CompoundContentAssistValidatorEx();
else if (hasValidator)
validator = new CompoundContentAssistValidator();
if (validator != null)
for (Iterator it = fProcessors.iterator(); it.hasNext();) {
IContentAssistProcessor p = (IContentAssistProcessor) it.next();
IContextInformationValidator v = p.getContextInformationValidator();
if (v != null)
validator.add(v);
}
return validator;