[Pharo-project] Searching for references
Hi folks. Today I were talking with Noury and from our point of view, there is a bug in the Class references. Forget about refactoring browser. Right now, if you look for the references of a class, it ONLY searches literal matches in the source code of methods. It doesn't take into account for example if you have subclasses. In the abstract speaking, if there are subclasses, isn't that considered a reference ? Even more, the tool would be much more useful if it can find such information. Several times, I look for references of a class I don't know and that I think it can be removed. I look references, zero. Excellent, I can removed. But then....I realized it has a subclass and that class is referenced in 200000 places...fresh example: DummySuperclassOfColorPickerMorph. In summary, it would be great if subclasses can be tacking into account also. Or at least I don't know, create another menu entry for that... I am the only one who think that ? what is your opinion ? Cheers Mariano
Forget about refactoring browser. Right now, if you look for the references of a class, it ONLY searches literal matches in the source code of methods. It doesn't take into account for example if you have subclasses. In the abstract speaking, if there are subclasses, isn't that considered a reference ?
If you use the refactoring browser to remove it will warn you about that situation. Maybe the normal remove should warn about subclasses too, like the rm in unix does.
In summary, it would be great if subclasses can be tacking into account also. Or at least I don't know, create another menu entry for that...
There is already a menu item, it is called 'show hierarchy'. I guess the tools don't display these kind of references because then you suddenly have two different kinds of objects as a result: methods and classes. Lukas -- Lukas Renggli http://www.lukas-renggli.ch
On Mar 24, 2010, at 10:35 PM, Mariano Martinez Peck wrote:
Hi folks. Today I were talking with Noury and from our point of view, there is a bug in the Class references.
Forget about refactoring browser. Right now, if you look for the references of a class, it ONLY searches literal matches in the source code of methods. It doesn't take into account for example if you have subclasses. In the abstract speaking, if there are subclasses, isn't that considered a reference ?
Yes I agree got bitten by this one.
Even more, the tool would be much more useful if it can find such information. Several times, I look for references of a class I don't know and that I think it can be removed. I look references, zero. Excellent, I can removed. But then....I realized it has a subclass and that class is referenced in 200000 places...fresh example: DummySuperclassOfColorPickerMorph.
In summary, it would be great if subclasses can be tacking into account also. Or at least I don't know, create another menu entry for that...
I am the only one who think that ? what is your opinion ?
Cheers
Mariano _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (3)
-
Lukas Renggli -
Mariano Martinez Peck -
Stéphane Ducasse