PhysiCell-Tools / PhysiCell-Studio

PhysiCell Studio is a graphical tool to allow easy editing of a (XML) model, create initial positions of cells, run a simulation, and visualize results. To contribute, fork and make PRs to the development branch.
GNU General Public License v3.0
21 stars 13 forks source link

Fix bug in find-replace for rules on name change; protect against reserved rules phrases #213

Closed drbergman closed 4 months ago

drbergman commented 4 months ago

Used the ~ operator and that is now deprecated for changing booleans (maybe it was when I implemented it?).

Also, now have what I believe is a more robust way to check that other types (cells or substrates) are not superstrings of the changed type and erroneously have their rules updated. Even if not more robust, it is more easily parseable.

Also protect against reserved words / phrases in the grammar that have spaces that could make them susceptible to being changed by renaming. For example, if a user simply names a substrate "0" and then changes the name, now a rule affecting "exit from cycle phase 0" will not be changed because it matches one of the keywords.