| Summary: | [Markers] (regression) Task and Problems view should have selection provider | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Dani Megert <daniel_megert> |
| Component: | IDE | Assignee: | Platform-UI-Inbox <Platform-UI-Inbox> |
| Status: | VERIFIED WORKSFORME | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | markus.kell.r, remy.suen, Tod_Creasey |
| Version: | 3.0 | Keywords: | api, helpwanted |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Dani Megert
This used to work in 2.1 and should be addressed for M9. The old TaskList had the following public API: /** * API method which sets the current selection of this viewer. * * @param selection a structured selection of <code>IMarker</code> objects * @param reveal <code>true</code> to reveal the selection, <false> otherwise */ public void setSelection(ISelection selection, boolean reveal) This apparently is still there on the new TaskView. ProblemView does not have such a method. However, both these classes are internal. In 2.1, TaskList set its viewer as the selection provider on its site. The new views should do this as well. However ISelectionProvider.setSelection does not have a reveal flag, and the default implementation in ContentViewer is to -not- reveal. I propose: - Change the marker views to set their viewer as the selection provider on the site. - Add a new, public MarkerUtil class with a method to show and reveal a marker. It will pick the best view, show it, and tell it to show the marker. This way, clients are not bound to the particular view id for showing a particular kind of marker. Actually, the original comment indicated that they didn't want to open the view, so this should be optional. The suggested utility class already exists: MarkerViewUtil. Should still hook up the selection providers. Dani: using MarkerViewUtil.showMarker(page, marker, false); in AbstractDecoratedTextEditor#updateMarkerViews(..) works for me. Nevertheless, the SelectionProvider would still make sense. Update code in AbstractDecoratedTextEditor#updateMarkerViews(..) Is this still a problem? Both the TaskList and the TableView (which is a superclass of the ProblemView) seems to be calling getSite().setSelectionProvider(ISelectionProvider). This how we do it now yes. Verified in 3.4 M2. |