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

Bug 464336

Summary: Editor does not auto-save after quick fix applies edit
Product: [ECD] Orion Reporter: Curtis Windatt <curtis.windatt.public>
Component: ClientAssignee: Silenio Quarti <Silenio_Quarti>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: libingw, Michael_Rennie, Silenio_Quarti
Version: 8.0   
Target Milestone: 9.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Curtis Windatt CLA 2015-04-09 17:17:50 EDT
1) Turn auto-save on
2) Execute a quick fix that makes a text edit (remove unused var for example)
Result
Editor is marked dirty, no save happens

If you perform another text edit or perform undo operation the editor saves (See Bug 463291 for other weirdness with auto-save and undo).
Comment 1 Silenio Quarti CLA 2015-04-09 18:15:05 EDT
I cannot reproduce this. Any missing steps?
Comment 2 Michael Rennie CLA 2015-04-13 13:50:46 EDT
I can reproduce this as well.

Consider the following snippet:

/* eslint-disable no-eval, no-unused-params, no-unused-vars */
function f(one) {
    loop: do{
        foo.bar = 10;
        foo.bar.toExponential(3);
        //empty
        continue loop;
    } while(true)
    
} 

after it lints you should see an error on 'foo'. Apply the fix to add it to eslint directive, the editor is marked dirty and no save happens.
Comment 3 Michael Rennie CLA 2015-04-13 13:59:32 EDT
The trick to reproduce seems to be to reload the page and the first thing you do is apply the fix.

Steps:
1. use the snippet from comment #2
2. save it without the fix
3. reload the page, and once linting is finished apply the fix, without doing anything else first
4. the editor will not save

If you have edited the file and then apply the fix, saving works as expected.
Comment 4 Silenio Quarti CLA 2015-05-12 17:29:07 EDT
Idle detection failed because there were no key events at all.

Fixed

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=e9296eb0a004a57f2fd1bd5bcf514c9752041119