Bug 546920 - FileDocumentProvider.createElementInfo(Object) should not refresh unconditionally
Summary: FileDocumentProvider.createElementInfo(Object) should not refresh uncondition...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.8.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.12 M3   Edit
Assignee: Andrey Loskutov CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-02 09:28 EDT by Andrey Loskutov CLA
Modified: 2019-05-03 11:42 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Loskutov CLA 2019-05-02 09:28:12 EDT
See https://github.com/eclipse/xtext-eclipse/issues/264.
As long as a build is running users cannot open any Xtext based editors.

The only reason for this XText ticket is *unconditional* attempt of org.eclipse.ui.editors.text.FileDocumentProvider.createElementInfo(Object) to call org.eclipse.ui.editors.text.FileDocumentProvider.refreshFile(IFile) which will open a "user task is waiting" progress dialog if any other workspace task (like build) is already running. If users aren't aware that the can safely cancel this task, they will wait and wait and wait... In our case they could wait hours...

We should simply do what the workaround in XText does and check IF we need to do a refresh before we start a blocking task.

I will provide a patch in a moment.
Comment 1 Eclipse Genie CLA 2019-05-02 10:09:15 EDT
New Gerrit change created: https://git.eclipse.org/r/141516
Comment 3 Andrey Loskutov CLA 2019-05-03 11:42:12 EDT
Verified with I20190502-1800.