use of edu.stanford.bmir.protege.web.shared.dispatch.actions.CreateNamedIndividualsAction in project webprotege by protegeproject.
the class IndividualsListPresenter method handleCreateIndividuals.
private void handleCreateIndividuals() {
controller.clear();
controller.setEntityType(EntityType.NAMED_INDIVIDUAL);
controller.setCreateEntityHandler(createFromText -> {
dispatchServiceManager.execute(new CreateNamedIndividualsAction(projectId, currentType, createFromText), result -> {
Set<OWLNamedIndividualData> individuals = result.getIndividuals();
view.addListData(individuals);
if (!individuals.isEmpty()) {
OWLNamedIndividualData next = individuals.iterator().next();
view.setSelectedIndividual(next);
}
});
});
WebProtegeDialog.showDialog(controller);
}
Aggregations