}
}
if (first) { // empty proposal list
if (TGlobal.errors(g) > 0) {
result.add(new ErrorProposal(
"No proposals available, please correct syntax errors first.", offset));
}
else if (pref.length() > 0) {
result.add(new ErrorProposal(
"No proposals available, maybe prefix \"" + pref + "\" too restrictive?", offset));
}
else {
result.add(new ErrorProposal(
"Can't help you here. Sorry.", offset));
}
}
} else {
result.add(new ErrorProposal(
"No proposals available - syntax errors", offset));
}
return result.toArray(new ICompletionProposal[result.size()]);
}