Bug 219570 - [Sync View] "Link with Editor" for Synchronize view
Summary: [Sync View] "Link with Editor" for Synchronize view
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.6 M3   Edit
Assignee: Tomasz Zarna CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 249919 284083 (view as bug list)
Depends on: 291215
Blocks:
  Show dependency tree
 
Reported: 2008-02-20 05:16 EST by Dani Megert CLA
Modified: 2009-10-28 04:40 EDT (History)
3 users (show)

See Also:


Attachments
Fix v01 (19.52 KB, patch)
2009-10-01 07:27 EDT, Tomasz Zarna CLA
no flags Details | Diff
mylyn/context/zip (57.18 KB, application/octet-stream)
2009-10-01 07:27 EDT, Tomasz Zarna CLA
no flags Details
Fix v02 (17.77 KB, patch)
2009-10-01 10:53 EDT, Tomasz Zarna CLA
no flags Details | Diff
Fix v03 (17.16 KB, patch)
2009-10-02 11:34 EDT, Tomasz Zarna CLA
no flags Details | Diff
Fix v04 (17.65 KB, patch)
2009-10-05 04:32 EDT, Tomasz Zarna CLA
no flags Details | Diff
Fix v05 (17.70 KB, patch)
2009-10-16 06:14 EDT, Tomasz Zarna CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2008-02-20 05:16:48 EST
I20080219-1124

Due to low bandwidth I often start my update or commit work by clicking on several files in the Synchronize view. This way other files load and comparison starts while I review the changes of the first file.

Now, my problem is that when I switch to another compare editor, the file is not automatically selected in the Synchronize view.

There are two feature I'd like to see:
1. add the Synchronize view as 'Show In' target
2. add the commonly known 'Link with Editor' tool bar button and/or view menu item
Comment 1 Tomasz Zarna CLA 2008-02-20 09:10:11 EST
 (In reply to comment #0)
> I20080219-1124
> 
> Due to low bandwidth I often start my update or commit work by clicking on
> several files in the Synchronize view. This way other files load and comparison
> starts while I review the changes of the first file.
> 
> Now, my problem is that when I switch to another compare editor, the file is not
> automatically selected in the Synchronize view.

If I've understood you correctly after you switch to another compare editor the several files you clicked on in the Sync View are still selected. Would you like to loose the selection?

> There are two feature I'd like to see:
> 1. add the Synchronize view as 'Show In' target
> 2. add the commonly known 'Link with Editor' tool bar button and/or view menu
> item

Would you like them to have in both compare and non-compare editors?
Comment 2 Dani Megert CLA 2008-02-20 09:20:16 EST
>If I've understood you correctly after you switch to another compare editor the
>several files you clicked on in the Sync View are still selected. Would you
>like to loose the selection?
Yes, exactly as it works in all other views that allow linking. I don't have >1 selected as I clicked each of them to open the compare editor and hence only the last one was selected.

>Would you like them to have in both compare and non-compare editors?
I'm happy if it works with the compare editor but normally back-linking works for all editor parts.
Comment 3 Szymon Brandys CLA 2009-07-21 03:58:45 EDT
*** Bug 284083 has been marked as a duplicate of this bug. ***
Comment 4 Corneliud Dirmeier CLA 2009-08-11 05:26:56 EDT
Due to Style-Guidelines 7.21 and 13.3 both features should be implemented.
Comment 5 Tomasz Zarna CLA 2009-10-01 07:27:13 EDT
Created attachment 148515 [details]
Fix v01

Patch that adds linking when sync'ed using Workspace model (I guess with models turned off it will work as well). It's a working copy, so do not apply. It's still missing couple of things:
* IShowInTarget is not implemented yet
* linking doesn't work for editors that do not adapt to IFile.class
* only IFile or IStorageEditorInput based elements are selected in the sync tree when linking, won't work for Java Workspace sync for instance :/
Comment 6 Tomasz Zarna CLA 2009-10-01 07:27:19 EDT
Created attachment 148516 [details]
mylyn/context/zip
Comment 7 Tomasz Zarna CLA 2009-10-01 10:13:00 EDT
Do you think that making the "Link with Editor" action enabled only for non-model or Workspace model synchronizations is acceptable? For other types I would disable the action (for now) and file a separate bug to address it. This would make the fix, in it's current shape, available pretty soon.
Comment 8 Dani Megert CLA 2009-10-01 10:18:49 EDT
>Do you think that making the "Link with Editor" action enabled only for
>non-model or Workspace model synchronizations is acceptable?
For me yes, and since it's limited scope I would probably not even add a toolbar button but simply add it to the view menu.
Comment 9 Tomasz Zarna CLA 2009-10-01 10:30:41 EDT
Sounds good to me. And put it back on the toolbar with the other bug as soon as linking starts to work for all synchronizations (i.e. including models)?
Comment 10 Tomasz Zarna CLA 2009-10-01 10:53:21 EDT
Created attachment 148537 [details]
Fix v02

Sync view as "Show In" target available in Synchronize perspective.
Comment 11 Dani Megert CLA 2009-10-01 12:04:33 EDT
(In reply to comment #9)
> Sounds good to me. And put it back on the toolbar with the other bug as soon as
> linking starts to work for all synchronizations (i.e. including models)?
Yes, though I could also live without that button: I doubt people are going to toggle this frequently.
Comment 12 Corneliud Dirmeier CLA 2009-10-02 02:08:46 EDT
(In reply to comment #11)
> (In reply to comment #9)
> > Sounds good to me. And put it back on the toolbar with the other bug as soon as
> > linking starts to work for all synchronizations (i.e. including models)?
> Yes, though I could also live without that button: I doubt people are going to
> toggle this frequently.

In other views like Package-Explorer I use this button frequently. So a button in View-Toolbar would be useful. For first iteration a menu entry is admissible.
Comment 13 Dani Megert CLA 2009-10-02 02:16:11 EDT
>In other views like Package-Explorer I use this button frequently. 
Yes me too, but I guess I won't toggle it often in the Sync view, e.g. I also never disable it in the History view. Anyway, I also don't care if it's there by default. Just make sure to put it into an action set so, that I can remove it.
Comment 14 Dani Megert CLA 2009-10-02 04:36:39 EDT
>I also don't care if it's there by default. Just make sure to put it into an 
>action set so, that I can remove it.
Forget this! Action sets are only for the main toolbar.
Comment 15 Tomasz Zarna CLA 2009-10-02 11:34:46 EDT
Created attachment 148657 [details]
Fix v03

This is an updated version of the patch that imo is ready to be committed. However, it's still missing bunch of things (see bug 291212, bug 291213, bug 291214, bug 291215) so if you think any of these is a no-go for this patch to be applied  please let me know.
Comment 16 Markus Keller CLA 2009-10-02 12:31:13 EDT
I have not tried the patch, but when I glanced though it, I didn't see any command ID being used for the ToggleLinkingAction. IWorkbenchCommandConstants.NAVIGATE_TOGGLE_LINK_WITH_EDITOR should be used as actionDefinitionID.

In the Package Explorer, we handle activation in PackageExplorerActionGroup.setGlobalActionHandlers(IActionBars).
Comment 17 Tomasz Zarna CLA 2009-10-05 03:47:29 EDT
*** Bug 249919 has been marked as a duplicate of this bug. ***
Comment 18 Tomasz Zarna CLA 2009-10-05 04:32:05 EDT
Created attachment 148740 [details]
Fix v04

Added IWorkbenchCommandConstants.NAVIGATE_TOGGLE_LINK_WITH_EDITOR as
actionDefinitionID for ToggleLinkingAction.
Comment 19 Dani Megert CLA 2009-10-05 06:26:44 EDT
>so if you think any of these is a no-go for this patch to
>be applied  please let me know.

For me it's useless given the current limitations as
1. my main use case is to link from compare editor to view and not the other way
   around (not working due to bug 291213)
2. I use the old non-model based sync (bug 291215)
Comment 20 Tomasz Zarna CLA 2009-10-05 07:18:08 EDT
All right, at least I now know which bugs I should fix first. Thanks for the comment.
Comment 21 Tomasz Zarna CLA 2009-10-16 06:14:12 EDT
Created attachment 149732 [details]
Fix v05

Final version of the patch to be committed simultaneously with fixes for bug 291215, bug 291214 and bug 291213.
Comment 22 Tomasz Zarna CLA 2009-10-16 06:52:20 EDT
Applied to HEAD, available in builds >N20091015-2000. Bug 291213 no longer blocks this one.
Comment 23 Dani Megert CLA 2009-10-28 04:40:26 EDT
Verified in I20091027-0100: works great!

Remaining issue: the view menu action has not mnemonic (bug 293542 ).