Skip to content

Commit

Permalink
[ui] Do not display the editor's inconsistent state when the editor i…
Browse files Browse the repository at this point in the history
…s dirty.

Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Dec 16, 2018
1 parent e92505d commit 53f9864
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -115,7 +115,7 @@ public void modelChanged(IAnnotationModel model) {
super.modelChanged(model);
//FIXME: for helping to resolve #661
final XtextEditor editor = getEditor();
if (editor != null && editor.getInternalSourceViewer() != null) {
if (editor != null && !editor.isDirty() && editor.getInternalSourceViewer() != null) {
final IAnnotationModel currentModel = editor.getInternalSourceViewer().getAnnotationModel();
if (currentModel != null && currentModel == model) {
final Resource resource = getXtextResource();
Expand Down
Expand Up @@ -31,7 +31,7 @@
import org.eclipse.xtext.ui.resource.IStorage2UriMapper;
import org.eclipse.xtext.ui.resource.UriValidator;

/** Editor for SARL code.
/** Callback associated to the editor for configuring the SARL editor.
*
* @author $Author: sgalland$
* @version $FullVersion$
Expand Down

0 comments on commit 53f9864

Please sign in to comment.