Community
Participate
Working Groups
usecase: I wanna change a method, but need to assess the risk and assure others, so I want to write out something describing * who uses that method * how they would need to change (if at all) I know I can get the users of a method from Call Hierarchy, so I select the method and C-A-h. Unfortunately the method is widely used, so CH returns many items in its treeview. problem: when I try to shift-click them all, in order to do Copy to Clipboard, I only succeed in selecting the final item. Instead I am required to do for each item of interest select it right-click>Copy to Clipboard paste into document solution: * allow selection of multiple items in CH * allow Copy to Clipboard to be an operation on multiple items in CH, with results like the above for-loop.
Markus, is there a reason why we don't support multi select ?
I don't see a reason why we could not support multiselect in the Call Hierarchy, except for problems with the "Copy to Clipboard" action. For the "Copy to Clipboard" action, there are two possible implementations: A) *This is already implemented and works*. Copy the item text of the selected node and all its expanded subnodes. Tom, you can just go one node up in the tree and copy it while it is expanded. B) Copy the item texts of those items which are currently selected in the tree. This can become weird when items from different branches are selected, e.g. void m1() { } void mX() { m1(); } void mY() { m1(); } void m3() { mY(); } ... with m3() and mX() selected in the caller hierarchy: m1() : void - p.A mY() : void - p.A m3() : void - p.A <-- selected mX() : void - p.A <-- selected What would you expect in the clipboard? Something like this? m3() : void - p.A mX() : void - p.A
Created attachment 16465 [details] a sample CH view, used in comment 3
Comment #2 From Markus Keller 2004-12-08 06:45 ------- >> I don't see a reason why we could not support multiselect in the >> Call Hierarchy, except for problems with the "Copy to Clipboard" >> action. >> For the "Copy to Clipboard" action, there are two possible >> implementations: >> A) *This is already implemented and works*. Copy the item text of >> the selected node and all its expanded subnodes. Tom, you can just >> go one node up in the tree and copy it while it is expanded. Interesting! See a sample JPEG [sample80419.jpg]: * if I collapse the top item (getDefaultSuperclassName(IActionRegionData)), select it, and rclick>Copy to Clipboard, I get > getDefaultSuperclassName(IActionRegionData) - com.ibm.etools.struts.wizards.wrf.WizardUtils * if I expand the top item, select it (and only it), and rclick>Copy to Clipboard, I get > getDefaultSuperclassName(IActionRegionData) - com.ibm.etools.struts.wizards.wrf.WizardUtils > getDefaultSuperclassName(IStrutsRegionData) - com.ibm.etools.struts.wizards.wrf.StrutsRegionDataPage > getActions() - com.ibm.etools.struts.wizards.actions.GenericActionRegionData > handleNewModelSelected(String) - com.ibm.etools.struts.wizards.actions.GenericActionRegionDataPage > getDefaultSuperclassName(IActionMappingRegionData) - com.ibm.etools.struts.wizards.wrf.WizardUtils Useful to know, but perhaps you will agree that it is not particularly intuitive? >> B) Copy the item texts of those items which are currently selected >> in the tree. This can become weird when items from different >> branches are selected, e.g. >> void m1() { } >> void mX() { m1(); } >> void mY() { m1(); } >> void m3() { mY(); } >> ... with m3() and mX() selected in the caller hierarchy: >> m1() : void - p.A >> mY() : void - p.A >> m3() : void - p.A <-- selected >> mX() : void - p.A <-- selected >> What would you expect in the clipboard? Something like this? >> m3() : void - p.A >> mX() : void - p.A Better yet (quoting added in order to illustrate "line up") >> m3() : void - p.A >> mX() : void - p.A but the mechanism (indentation) would do nicely.
Renamed "Copy to Clipboard" to "Copy Expanded Hierarchy" and enabled multiselection in the hierarchy tree. The implementation of B) from comment 2 will need more work. Currently, the Copy action (Ctrl+C) just copies the selected methods' names and parameter types