Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 321575

Summary: [Sync view] 'Show In' context menu item not available on multi-selection
Product: [Eclipse Project] Platform Reporter: Dani Megert <daniel_megert>
Component: TeamAssignee: Tomasz Zarna <tomasz.zarna>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P4    
Version: 3.7   
Target Milestone: 3.7 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Fix v01
none
mylyn/context/zip
none
Fix v02
none
Fix v03
none
Context menus in Sync view for an outgoing Java change
none
Fix v04 none

Description Dani Megert CLA 2010-08-03 06:59:14 EDT
I20100802-1800.

1. select two files (or folder, or mixed type) in the Synchronize view
2. context menu
==> bummer: 'Show In' missing.
Comment 1 Tomasz Zarna CLA 2010-08-03 07:09:58 EDT
Created attachment 175767 [details]
Fix v01
Comment 2 Tomasz Zarna CLA 2010-08-03 07:10:01 EDT
Created attachment 175768 [details]
mylyn/context/zip
Comment 3 Tomasz Zarna CLA 2010-08-10 07:03:26 EDT
The patch is no good. It doesn't work when a mix of plain and Java projects is selected in model sync with All Models on. It works fine in any other case.
Comment 4 Tomasz Zarna CLA 2010-08-24 10:59:36 EDT
Created attachment 177325 [details]
Fix v02

Fix that makes ResourceModelActionProvider work for objects adapting to IResource. Action provider must be enabled for each element in the selection, so in case when we had a mix of JavaProjects and IProjects neither ResourceModelActionProvider nor RefactoringSynchronizationActionProvider was enabled. The change still needs to be checked if it doesn't introduce any side-effects.
Comment 5 Tomasz Zarna CLA 2010-09-14 04:57:37 EDT
(In reply to comment #4)
> The change still needs to be checked if it doesn't introduce any side-effects.

Haven't found time to verify that, moving to M3. Sorry.
Comment 6 Tomasz Zarna CLA 2010-10-09 08:22:01 EDT
Created attachment 180546 [details]
Fix v03

Fix v02 wasn't good neither. Using ResourceModelContentProvider for all nodes adapting to IResource broke the Sync view when in All Models mode. The view didn't diplay children for Java projects.

The new fix still tries to adapt nodes to IResource but this time it will enable the action provider only, not the content provider like in the previous patch.
Comment 7 Tomasz Zarna CLA 2010-10-09 08:29:25 EDT
Created attachment 180547 [details]
Context menus in Sync view for an outgoing Java change

So far, the only side effect I have observed is the extra menu group for Java changes in the Sync view. But it looks more like a feature rather than a bug.
Comment 8 Tomasz Zarna CLA 2010-10-11 07:34:59 EDT
Created attachment 180593 [details]
Fix v04

One more thing, 'Show In' should not be available when one of the selected resources doesn't exist. So far, this was true only when all selected resources were files.
Comment 9 Tomasz Zarna CLA 2010-10-12 11:53:03 EDT
Fix v04 applied to HEAD. Available in builds >=N20101012-2000.
Comment 10 Dani Megert CLA 2010-10-14 02:29:21 EDT
Verified in N20101013-2000.
Thanks Tomek!