Summary: | [Workbench] Null is converted in an empty StructuredSelection | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Dirk Baeumer <dirk_baeumer> |
Component: | UI | Assignee: | Platform-UI-Inbox <Platform-UI-Inbox> |
Status: | RESOLVED INVALID | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | n.a.edgar |
Version: | 2.0 | Keywords: | investigate, needinfo |
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: | |||
Bug Depends on: | |||
Bug Blocks: | 7383 |
Description
Dirk Baeumer
2002-01-17 05:45:19 EST
We have a workaround for this but which will fail if a someone emits an empty structured selection on purpose. Opt to raise to P2 Randy, could you investigate this one? selectionChanged should only be called once. We need to ensure that propogating null is allowed by the existing contracts and won't break existing clients. The spec for IActionDelegate.selectionChanged indicates that null is a valid selection. However the following two classes in my workbench do not check for null: org.eclipse.jdt.internal.debug.ui.actions.WatchpointAction org.eclipse.debug.internal.ui.actions.CopyVariablesToClipboardActionDelegate Agree that we should not be magically turning null into an empty selection. The null selection is fired because the selection service listens for part deactivation/activation and does not know that one will be followed by the other. This would require a change in the way we notify of part activation changes. I think it is now too late in the cycle for 2.0 to make such a changes. Suggest defer. Defer Reopen to investigate History lesson: although we spec'ed that null could be passed, we originally did not pass null in the case of no selection (i.e. when the active part does not implement ISelectionProvider), but instead converted it to the empty selection. When we added the support to distinguish between no selection and empty selection, we did that using the mix-in interface INullSelectionListener. If the listener implements INullSelectionListener, we do pass null rather than converting to the empty selection (as per the spec for ISelectionListener.selectionChanged). There is no plan to work on this currently As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you. |