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

Bug 327154

Summary: [Compatibility] Synchronize with CVS triggers save on saveables even if they are not dirty
Product: [Eclipse Project] e4 Reporter: Deepak Azad <deepakazad>
Component: UIAssignee: Remy Suen <remy.suen>
Status: VERIFIED FIXED QA Contact: Remy Suen <remy.suen>
Severity: major    
Priority: P3 CC: remy.suen
Version: 1.0   
Target Milestone: 4.1 M3   
Hardware: All   
OS: All   
Whiteboard:

Description Deepak Azad CLA 2010-10-06 14:41:44 EDT
I20101001-0854

- Fresh workspace
- Check out 'o.e.ui.editors' from CVS
- Enable Save Actions : Preferences > Java > Editor > Save Actions (Format all Lines, Organize imports, Additional actions)
- Open few files in java editor (I had opened the first 5 files in the first package DefaultEncodingSupport.java, DocumentReader.java,EditorsUI.java, EncodingActionGroup.java, FileBufferOperationAction.java)
- Synchronize 'o.e.ui.editors' with CVS, you will have outgoing changes in all the open editors because of the Save Action

This does not happen with 3.x (I20101005-0800). 

Marking as major as this is just frustrating...
Comment 1 Remy Suen CLA 2010-10-06 21:14:11 EDT
Problematic stack trace in question. Fixed in CVS HEAD. Thanks for the bug report, Deepak!

Thread [main] (Suspended (breakpoint at line 1244 in CompilationUnitEditor))	
	CompilationUnitEditor.doSave(IProgressMonitor) line: 1244	
	AbstractTextEditor$TextEditorSavable.doSave(IProgressMonitor) line: 7009	
	AbstractTextEditor$TextEditorSavable(Saveable).doSave(IProgressMonitor, IShellProvider) line: 214	
	Workbench$53.run(IProgressMonitor) line: 3283	
	ModalContext.runInCurrentThread(IRunnableWithProgress, IProgressMonitor) line: 464	
	ModalContext.run(IRunnableWithProgress, boolean, IProgressMonitor, Display) line: 372	
	WorkbenchWindow$8.run() line: 1487	
	BusyIndicator.showWhile(Display, Runnable) line: 70	
	WorkbenchWindow.run(boolean, boolean, IRunnableWithProgress) line: 1484	
	Workbench.saveAll(IShellProvider, IRunnableContext, ISaveableFilter, boolean) line: 3275	
	IDE$1.run() line: 1272	
	SafeRunner.run(ISafeRunnable) line: 42	
	IDE.saveAllEditors(IResource[], boolean) line: 1261	
	CVSAction$6.run() line: 573	
	UISynchronizer(Synchronizer).syncExec(Runnable) line: 179	
	UISynchronizer.syncExec(Runnable) line: 150	
	Display.syncExec(Runnable) line: 4584	
	SyncAction(CVSAction).saveAllEditors() line: 568	
	SyncAction(CVSAction).beginExecution(IAction) line: 216	
	SyncAction(WorkspaceAction).beginExecution(IAction) line: 56	
	SyncAction(CVSAction).run(IAction) line: 111	
	SyncAction(TeamAction).runWithEvent(IAction, Event) line: 549
Comment 2 Remy Suen CLA 2010-10-26 10:19:11 EDT
Verified on Windows XP with I20101025-1602.

Non-dirty editors are not saved but dirty editors are saved it seems. See bug 328720.

Thanks again for finding this, Deepak.