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

Bug 345552

Summary: [TCF][File system] Edit the remote files with a proper editor
Product: [Tools] TCF Reporter: Uwe Stieber <uwe.st>
Component: TargetAssignee: William Chen <william.chen>
Status: RESOLVED FIXED QA Contact: Uwe Stieber <uwe.st>
Severity: enhancement    
Priority: P3 CC: cdtdoug, martin.gutschelhofer, mober.at+eclipse
Version: unspecified   
Target Milestone: 0.6.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 345387    
Bug Blocks:    
Attachments:
Description Flags
Design Proposal for concurrent modification in Target Explorer.
uwe.st: iplog+
The patch to fix this bug. uwe.st: iplog+

Description Uwe Stieber CLA 2011-05-12 04:48:39 EDT
For text type files, editing the remote file in either the Eclipse internal default editor or the system editor should become possible. In order to do this:

- A local copy of the remote file is required. The relative directory structure should be honored to allow editing of files with the same name from different directories in parallel without conflicts.
- The modification time and a MD5 checksum should be stored for the file at the time the local snapshot is taken. This information are used to detect concurrent editing of the file.
- Need a user preference to configure auto sync vs. manual sync of the modified file.
    * Auto sync == Local version will be copied back to the remote file system on save
    * Manual sync == User has to press a "Submit" or "Sync" button on top of the editor
- For manual sync, a decorator is needed to signal the user that local and remote file copies are not in sync. The decorator should be clear enough to tell which side is newer.
- If concurrent modification is detected, the user should decide what to do. Nice to have: Offer a merge between the local modified and remote modified version

Difficulty: Encoding differences between local host and remote target.
Comment 1 William Chen CLA 2011-09-29 02:15:59 EDT
Created attachment 204244 [details]
Design Proposal for concurrent modification in Target Explorer.

This is the design document for the concurrent modification problem in Target Explorer. Please have a review.
Comment 2 William Chen CLA 2011-09-29 02:17:04 EDT
Created attachment 204245 [details]
The patch to fix this bug.

This is a patch to fix the bug. Please have a review.
Comment 3 William Chen CLA 2011-09-29 02:18:50 EDT
I, William Chen, declare that I developed attached code from scratch, without referencing any 3rd party materials except material licensed under the EPL. I am authorized by my employer to make this contribution under the EPL.
Comment 4 William Chen CLA 2011-09-29 02:22:39 EDT
Hi Uwe,

Here's the patch for this bug and a design proposal on how the concurrent modification in Target Explorer is handled in this patch. Please have a review.

Thanks!

-William
Comment 5 Uwe Stieber CLA 2011-10-04 04:42:00 EDT
Committed patch to HEAD