| Summary: | Problems with extending the menu's of results in Remote Search View | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] Target Management | Reporter: | Kevin Doyle <kjdoyle> | ||||
| Component: | RSE | Assignee: | David McKnight <dmcknigh> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Martin Oberhuber <mober.at+eclipse> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | kjdoyle, rdibugs | ||||
| Version: | 3.0.1 | ||||||
| Target Milestone: | 3.1 M3 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 256286 | ||||||
| Attachments: |
|
||||||
|
Description
Kevin Doyle
Created attachment 118400 [details]
patch to use dummy selection provider until the real provider is avaible
The problem is that when the search view part is first created, there is no view (just an empty shell). When the part is activated, Eclipse retrieves the site's selection provider but, at this point, the search view does not have a search going on, so it doesn't have a viewer nor a selection provider. Even if the selection provider is set after that (i.e. when addSearchResult()) is called and a viewer is created), because the selection service (i.e. AbstractSelectionService) does not reset the active part, we're left in a state where the provider is null. In order to avoid that problem this patch creates a dummy selection provider that defers to the actual provider if one exists. Once AbstractSelectionService.setActivePart() gets called again later on, the actual select provider should get picked up.
I'm not sure whether this is the best solution. If there is a clean way to get a call to AbstractSelectionService.setActivePart() after we do the getSite().setSelectionProvider() then it might be preferable.
Could you try this out and see if the patch helps?
I've committed the code to cvs. Patch works. Thanks Dave. Can we backport? (In reply to comment #3) > Patch works. Thanks Dave. Can we backport? > Kevin, I think for this to work in 3.0.2 we need a backport for bug 242431. Is that something you're planning? (In reply to comment #4) > Kevin, I think for this to work in 3.0.2 we need a backport for bug 242431. Is > that something you're planning? > As we discussed this works for me without the need to backport bug 242431. |