public static void checkProposals(ICompletionProposal[] proposals, int repOffset, int repLen, int prefixLen) {
for(ICompletionProposal completionProposal : proposals) {
if(completionProposal instanceof ScriptTemplateProposal) {
continue;
}
DeeCompletionProposal proposal = (DeeCompletionProposal) completionProposal;
String defName = proposal.namedElement.getExtendedName();
assertTrue(repOffset == proposal.getReplacementOffset());
assertTrue(repLen == proposal.getReplacementLength());
if(prefixLen != DONT_CHECK) {
String repStr = defName.substring(prefixLen);
if(repStr.indexOf('(') != -1) {
repStr = repStr.substring(0, repStr.indexOf('('));
}
assertTrue(repStr.equals(proposal.getReplacementString()));
}
}
}