protegeproject / protege

Protege Desktop
http://protege.stanford.edu
Other
1.01k stars 231 forks source link

Closing preferences results in lots of ONTOLOGY_CLASSIFIED events #564

Open ykazakov opened 7 years ago

ykazakov commented 7 years ago

If I open Protege preferences and close them without doing any changes, this triggers lots of ONTOLOGY_CLASSIFIED events. This is because applyPreferences() calls applyChanges() on every panel of the preferences, and, for example, this method for DisplayedInferencesPreferencePanel sends ReasonerPreferences.fireChanged() for every configuration option, which then sends through the listener of OWLModelManager the ONTOLOGY_CLASSIFIED event. Overall, there are dozens of events sent even without performing any changes in preferences. I wonder if they are really necessary?

Background: I am trying to use the ONTOLOGY_CLASSIFIED event to refresh an explanation for entailment, but after saving preferences it freezes while trying to redraw it 40 times or so. I guess in Protege itself the entailments should also be redrawn on every such event, are they?

ykazakov commented 7 years ago

Actually, it is not at all clear why ONTOLOGY_CLASSIFIED events are fired on changes in preferences. Logically, they should fire after the reasoner has classified the ontology, isn't it?