Bug 20327 - [CVS Sync View] ctrl-S doesn't work in sync view
Summary: [CVS Sync View] ctrl-S doesn't work in sync view
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 RC2   Edit
Assignee: Jean-Michel Lemieux CLA
QA Contact:
URL:
Whiteboard:
Keywords: readme
Depends on:
Blocks:
 
Reported: 2002-06-14 07:56 EDT by Philipe Mulet CLA
Modified: 2003-03-21 09:48 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2002-06-14 07:56:12 EDT
Build 20020612 - F3

When synchronizing with repo, the compare view doesn't support ctrl-S actions.
The save menu must be used instead.
Comment 1 Dirk Baeumer CLA 2002-06-14 12:21:07 EDT
This is a known limitation. Opt to doc it for 2.0
Comment 2 Andre Weinand CLA 2002-06-24 06:31:07 EDT
Since this is only a problem in the Synch view and not in a compare editor I 
suggest to doc this limitation for the Synch viewer.

Moved to Team for now.
Comment 3 James Moody CLA 2002-08-01 11:17:59 EDT
This is not only a problem in the sync view. It's a problem in any compare
editor that chooses to use the local save menu items from the compare framework.
For example, Compare With->Latest from Repository. These save menu items are
contributed by the compare framework, and should have accelerators attached to
them; either that, or hook into the global save action whenever one of the two
text merge editors has focus. I could be wrong, but I don't see how Team can fix
this. ContentMergeViewer.SaveAction is the class the implements this
functionality. Andre, please advise.
Comment 4 Andre Weinand CLA 2002-08-12 12:26:21 EDT
James, have you tried to implement your CompareEditor's isSaveNeeded() method so 
that it returns true whenever there are unsaved changes?
Comment 5 James Moody CLA 2002-08-12 14:51:13 EDT
Marking as 2.0.1.
Comment 6 Michael Valenta CLA 2002-08-21 12:48:28 EDT
This will not be done in 2.0.1. Marking 2.1
Comment 7 Kevin McGuire CLA 2003-02-20 13:34:56 EST
UI has recently put support in -- we should be able to do this now.
Comment 8 Kevin McGuire CLA 2003-02-20 16:47:44 EST
From note from Simon:

What you need to do...

1) SyncView should adapt to the ISaveablePart (or it can implement - your 
choice)
2) Implement the doSave(monitor) method to save the "input"
3) Implement the isDirty() method to return the dirty state of the "input"
4) Make sure isSaveAsAllowed() always return false.
5) When the "input" becomes dirty (or non-dirty), the SyncView needs to fire 
the PROP_DIRTY property (see fireProperty method on WorkbenchPart). When I 
hacked SyncView to test this new feature, I listened for changes from 
the "input" and then called fireProperty is it was the dirty state that had 
changed.
Comment 9 Andre Weinand CLA 2003-02-21 09:27:10 EST
Probably you can use some of the implementation of the CompareEditor in the compare 
plugin. It adapts the CompareEditorInput to an EditorPart which should be similar to your 
case.
Comment 10 Jean-Michel Lemieux CLA 2003-03-03 10:52:47 EST
Will be in I20030304.
Comment 11 Dani Megert CLA 2003-03-21 06:37:33 EST
I have to reopen this bug report. This is not fixed:

1. select a file in your workspace  which is under CVS control
2. compare with revision
3. change some text in the left pane
4. Ctrl+S
==> nothing happens.
Comment 12 Jean-Michel Lemieux CLA 2003-03-21 09:48:59 EST
I should of tested the ctrl-s in the compare view when fixing this bug. In any 
case, the intent for this bug was to add support to the sync view and that is 
fixed in RC2.

I have opened another PR for the compare view and are changing the title of 
this bug.

See new bug 35467.