// try {
ModelManager modelManager = workspace.getEditorKit().getModelManager();
if(modelManager instanceof OWLModelManager){
OWLOntologyManager manager = ((OWLModelManager)modelManager).getOWLOntologyManager();
ReasonerRegistry registry = HeraklesManager.getReasonerRegistry();
ReasonerAdapter adapter = null;
boolean isNewReasoner = false;
if(!registry.containsReasoner(name, host, port)){
adapter = registry.registerReasoner(manager, name, host, port);
pro = adapter.getReasonerProperties();
isNewReasoner = true;
} else {
adapter = registry.getReasoner(name, host, port);
pro = adapter.getReasonerProperties();
}
String type = pro.getProperty("name").toUpperCase();
if(isNewReasoner){
int index = config.addRemoteReasoner(type, name, host, port);