Community
Participate
Working Groups
The "Expand with Constructors" action in the Call Hierarchy should auto-expand the "[constructor] ..." node if there is only one. There's a 99% chance that the user wants to expand this constructor after choosing the action. I would also try how it feels if we do the same when a node is automatically expanded with constructors due to the view settings. I think it could be convenient too, but it could also become confusing.
Created attachment 176643 [details] patch Yes, I agree that the constructor node should automatically expand once 'Expand with Constructor' action is chosen and there is only one constructor, and to make the behaviour uniform I would make it the same way when the method/type is in the list to be expanded with constructors as well. Markus, is this what you had in mind?
Looks good, but I would rename CallHierarchyViewer#fConstructorMethodWrapper to fConstructorToExpand (and rename the setter as well). If you make the two other fields final and add an empty line in front of fConstructorMethodWrapper, then is much easier to understand that this field only keeps temporary state but the others are real properties of the viewer.
(In reply to comment #2) > Looks good, but I would rename CallHierarchyViewer#fConstructorMethodWrapper to > fConstructorToExpand (and rename the setter as well). > > If you make the two other fields final and add an empty line in front of > fConstructorMethodWrapper, then is much easier to understand that this field > only keeps temporary state but the others are real properties of the viewer. Patch committed to HEAD with above changes.
Verified for 3.7M2 on Linux with I20100914-0100.
Verified for 3.7 M2 with I20100913-1800.