| Summary: | Select All in Expression view does not send notifications | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Daniel Friederich <danielfriederich> |
| Component: | Debug | Assignee: | Platform-Debug-Inbox <platform-debug-inbox> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | curtis.windatt.public, darin.eclipse |
| Version: | 3.3 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
A fix which works for me is to explicitly repeat the selection in
rg.eclipse.debug.internal.ui.actions.SelectAllAction
/**
* @see IActionDelegate#run(IAction)
*/
public void run(IAction action){
if (!(getView() instanceof IDebugView)) {
return;
}
Viewer viewer = ((IDebugView) getView()).getViewer();
Control control = viewer.getControl();
if (control instanceof Tree) {
((Tree)control).selectAll();
}
// ensure that the selection change callback is fired.
// as in SelectAllBreakpointsAction
IWorkbenchPartSite site = getView().getSite();
if (site != null) {
ISelectionProvider selectionProvider= site.getSelectionProvider();
if (selectionProvider != null) {
ISelection sel= selectionProvider.getSelection();
if (sel != null) {
selectionProvider.setSelection(sel);
}
}
}
}
I don't think this is especially elegant, but its basically the same as it is done for the SelectAllBreakpointsAction already.
That fix assumes that the bug is in the debug UI, not sure if it is not in the SWT instead. I did not see where that part of the SWT behavior is explicitly defined.
Might be related to Bug 148553. When looking into the sources noted that it was actually fixed already as bug 195160 :-) I did search for a bug previously, but I failed to find it. *** This bug has been marked as a duplicate of bug 195160 *** sorry, last comment went to the wrong bug. (In reply to comment #2) > Might be related to Bug 148553. > Yes, they are related. The fix in this bug also worked for the 148553 bug, basically both cases are suffering from a missing selection notification. The observed behavior though is a bit different, so I did not mark this one as duplicate. Fixed in 3.5 *** This bug has been marked as a duplicate of bug 255153 *** |
Build ID: I20070621-1340 Steps To Reproduce: 1. start eclipse, open Expression view. 2. remove all existing expressions 3. Using the context menu, add an expression "1" 4. Using the context menu, add an expression "2" 5. Using the context menu, Select All. 6. BUG: in context menu, Remove is disabled (also in Toolbar) This bug only happens if there was no expression selected, that's why step 2 deleted all existing ones. 7. Select the first expression 1 8. Using the context menu, Select All. 9. Select Delete from context menu 10. Bug. only expression "1" got deleted. More information: The problem is that the select all action is just calling into SWT's Tree control and calls SelectAll. org.eclipse.debug.internal.ui.actions.SelectAllAction: if (control instanceof Tree) { ((Tree)control).selectAll(); } Now SWT does not send out any selection changed notification for this. I'm not sure if SWT is supposed to do this, if so, its a SWT bug. If not its a debugger UI bug. I will attach a fix triggering the change notification from the debugger UI as the same thing is already done for the breakpoint select all action.