Remove the override of EntityTreeModel
Currently, the class ptolemy.vergil.tree.EntityTreeModel is being overridden in sensor-view. This is to allow it to selectively ignore certain change requests. In this case, it needs to ignore the change requests through which Sensor actors are fired.
At the moment, this is accomplished by the following two part mechanism. The description of the change request in question (which was unused before, I think) is now '<group name="IGNORE_THIS_CHANGE"></group>'. EntityTreeModel is changed to ignore all change requests that contain the substring 'IGNORE_THIS_CHANGE'.
This is clearly imperfect. A cleaner method of marking certain change requests as 'to be discarded' by the EntityTreeModel class is needed. Alternatively, a refactoring so the plotting component does not use the EntityTreeModel class would also work.
#2 Updated by Derik Barseghian about 7 years ago
I looked into removing this override a few ways, but things got convoluted. I think the best idea is to discuss incorporating the small change needed into ptolemy's EntityTreeModel.
If we want this override removed for the upcoming sensor-view release, this would mean releasing a patch of ptolemy-kepler-2.3.
In hopes of keeping the sensor-view release simple I'd just as soon keep the override in for now. If/when we patch ptolemy-kepler with the change, we could patch sensor-view at that point to remove the override.
#3 Updated by Matt Jones about 7 years ago
I would argue that we should incorporate it now and issue the patch. Overrides consistently diverge over time from their source, and we suffer from not picking up bug fixes, etc. In general, I think we should strive to eliminate all overrides ebfore release. They are a nice feature for experimental development, but make maintenance difficult if they are released. They also make it so that modules that use overrides become incompatible with other modules that don't use the override -- much better to have only one definitive source for a class (in this case, the ptolemy module) so that modules remain compatible.
#4 Updated by Derik Barseghian about 7 years ago
Sean can you confirm: am I right in thinking the point of the override was to avoid collapsing the Outline and Plotting's 'Items of Interest' trees when the actors fire? Possibly also to avoid collapses when the user moves the actor around, or adjusts the actor's params?Turns out, from what I can tell, this override actually isn't doing anything useful. With or without the override, this is what happens:
- when firing, the trees don't collapse.
- when moving or adjusting an actor's params, the trees collapse.