}
private List<AutoCompletionChoice> getNameOntologyAutocompletionChoices(OWLAPIProject project, ParserException e, EditorPosition fromPos, EditorPosition toPos, String lastWordPrefix) {
List<AutoCompletionChoice> choices = Lists.newArrayList();
if(e.isOntologyNameExpected()) {
WebProtegeOntologyIRIShortFormProvider sfp = new WebProtegeOntologyIRIShortFormProvider(project.getRootOntology());
for(OWLOntology ont : project.getRootOntology().getImportsClosure()) {
String ontologyName = sfp.getShortForm(ont);
if(lastWordPrefix.isEmpty() || ontologyName.toLowerCase().startsWith(lastWordPrefix)) {
choices.add(new AutoCompletionChoice(ontologyName, ontologyName, "cm-ontology-list", fromPos, toPos));
}
}
}