}
private static void processJavaCompletionProposal(IContentAssistProposalRecorder recorder,
ICompletionProposal comProposal, String packageName, char enclosingChar) {
if (comProposal instanceof JavaCompletionProposal) {
JavaCompletionProposal prop = (JavaCompletionProposal) comProposal;
recorder.recordProposal(prop.getImage(), prop.getRelevance(), prop.getDisplayString(), prop
.getReplacementString(), prop.getJavaElement());
}
else if (comProposal instanceof LazyJavaTypeCompletionProposal) {
LazyJavaTypeCompletionProposal prop = (LazyJavaTypeCompletionProposal) comProposal;
if (prop.getQualifiedTypeName().equals(packageName + "." + CLASS_NAME)
|| prop.getQualifiedTypeName().equals(CLASS_NAME)) {
return;
}
if (prop.getJavaElement() instanceof IType) {
// Make sure that JDT's type filter preferences are applied
if (TypeFilter.isFiltered((IType) prop.getJavaElement())) {
return;
}
String replacementString = ((IType) prop.getJavaElement()).getFullyQualifiedName(enclosingChar);
recorder.recordProposal(prop.getImage(), prop.getRelevance(), prop.getDisplayString(),
replacementString, prop.getJavaElement());
}
}
else if (comProposal instanceof LazyJavaCompletionProposal) {
LazyJavaCompletionProposal prop = (LazyJavaCompletionProposal) comProposal;
recorder.recordProposal(prop.getImage(), prop.getRelevance(), prop.getDisplayString(), prop
.getReplacementString(), prop.getJavaElement());
}
}