Merge pull request #170 from ykazakov/master

Thanks a lot for the contribution Yevgeny!
Esse commit está contido em:
Matthew Horridge
2015-03-30 13:01:06 -07:00
2 arquivos alterados com 17 adições e 4 exclusões
@@ -116,9 +116,10 @@ public class DisplayedInferencePreferences {
if (isShowInferences() && isEnabled(task)) {
startClock(task);
try {
implementation.run();
}
finally {
implementation.run();
} catch (UnsupportedOperationException ignore) {
} finally {
stopClock(task);
}
}
@@ -67,8 +67,11 @@ public class OWLReasonerManagerImpl implements OWLReasonerManager {
public void ontologiesChanged(List<? extends OWLOntologyChange> changes) throws OWLException {
OWLReasoner reasoner = getCurrentReasoner();
if (reasoner instanceof NoOpReasoner || reasoner.getBufferingMode() != BufferingMode.NON_BUFFERING)
return;
return;
OWLOntology activeOntology = owlModelManager.getActiveOntology();
Set<OWLOntology> importClosure = null;
boolean needsRefresh = false;
for (OWLOntologyChange change : changes) {
if (change instanceof AnnotationChange)
continue;
@@ -76,6 +79,15 @@ public class OWLReasonerManagerImpl implements OWLReasonerManager {
continue;
if (change instanceof OWLAxiomChange && !change.getAxiom().isLogicalAxiom())
continue;
OWLOntology changedOntology = change.getOntology();
if (!changedOntology.equals(activeOntology)) {
if (importClosure == null) {
importClosure = activeOntology.getImportsClosure();
}
if (!importClosure.contains(changedOntology)) {
continue;
}
}
// otherwise
needsRefresh = true;
break;