protegeproject / protege

Protege Desktop
http://protege.stanford.edu
Other
969 stars 229 forks source link

Improve the ID range policy feature #1179

Closed gouttegd closed 6 months ago

gouttegd commented 8 months ago

This PR attempts to fix the problems caused by the incompatibility between the “remember last ID between Protégé sessions” feature and the support for ID range policy files, highlighted in #1108.

First, it adds a new option to the “New entities” settings dialog to disable the support for ID range policy files – that is, to make Protégé ignore such files completely, as it was doing prior to version 5.6.0. This allows users that are annoyed by that feature to be no longer affected by it if they so wish, without having to remove or rename the -idranges.owl files in their ontologies.

Second, when an ID range policy is in effect and the “remember last ID between Protégé sessions” feature is enabled, the last used ID will now be saved under a name that is dependent on the policy currently in use. This means that Protégé will “remember” not only one single last ID globally, but one last ID for each ID range policy. This fixes the #1108 issue proper.

Third, when an ontology is reloaded (e.g. with File > Reload), the ID range policy will be reloaded as well. This allows to make sure any changes to the policy file is taken into account without having to close Protégé and opening it again. This also allows, for example, users who have more than one range assigned to them (or users who mistakenly selected the wrong range when prompted) to switch to another range by having Protégé display the range selection dialog again, without having to close Protégé and opening it again.

gouttegd commented 6 months ago

Been working with that patch for the past 6 weeks now without issue.