Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328829 - [Xtext-uml] Dealing with semantic errors before saving in the xtext specific editor
Summary: [Xtext-uml] Dealing with semantic errors before saving in the xtext specific ...
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Arnaud Cuccuru CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-27 09:52 EDT by David Servat CLA
Modified: 2010-11-09 17:06 EST (History)
1 user (show)

See Also:


Attachments
Patch for org.eclipse.xtext.gmf.glue (10.80 KB, patch)
2010-10-28 10:07 EDT, Arnaud Cuccuru CLA
sebastien.gerard: iplog+
Details | Diff
patch for org.eclipse.papyrus.connectionpointreference.editor.xtext.ui.patch (1.23 KB, patch)
2010-10-28 10:08 EDT, Arnaud Cuccuru CLA
sebastien.gerard: iplog+
Details | Diff
Patch for org.eclipse.papyrus.constraintwithvsl.editor.xtext.ui (1.46 KB, patch)
2010-10-28 10:09 EDT, Arnaud Cuccuru CLA
sebastien.gerard: iplog+
Details | Diff
Patch for org.eclipse.papyrus.marte.vsl (1.16 KB, patch)
2010-10-28 10:09 EDT, Arnaud Cuccuru CLA
sebastien.gerard: iplog+
Details | Diff
Patch for org.eclipse.papyrus.message.editor.xtext.ui (1.07 KB, patch)
2010-10-28 10:10 EDT, Arnaud Cuccuru CLA
sebastien.gerard: iplog+
Details | Diff
Patch for org.eclipse.papyrus.property.editor.xtext (2.99 KB, patch)
2010-10-28 10:11 EDT, Arnaud Cuccuru CLA
sebastien.gerard: iplog+
Details | Diff
Patch for org.eclipse.papyrus.property.editor.xtext.ui (1.31 KB, patch)
2010-10-28 10:12 EDT, Arnaud Cuccuru CLA
sebastien.gerard: iplog+
Details | Diff
Patch for org.eclipse.papyrus.state.editor.xtext (3.32 KB, patch)
2010-10-28 10:12 EDT, Arnaud Cuccuru CLA
sebastien.gerard: iplog+
Details | Diff
Patch for org.eclipse.papyrus.state.editor.xtext.ui (1.26 KB, patch)
2010-10-28 10:13 EDT, Arnaud Cuccuru CLA
sebastien.gerard: iplog+
Details | Diff
Patch for org.eclipse.papyrus.stereotypeapplicationwithvsl.editor.xtext (6.70 KB, patch)
2010-10-28 10:14 EDT, Arnaud Cuccuru CLA
sebastien.gerard: iplog+
Details | Diff
Patch for org.eclipse.papyrus.stereotypeapplicationwithvsl.editor.xtext.ui (1.31 KB, patch)
2010-10-28 10:15 EDT, Arnaud Cuccuru CLA
sebastien.gerard: iplog+
Details | Diff
Patch for org.eclipse.papyrus.transition.editor.xtext.ui (1.17 KB, patch)
2010-10-28 10:15 EDT, Arnaud Cuccuru CLA
sebastien.gerard: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Servat CLA 2010-10-27 09:52:33 EDT
There should be a dedicated support for semantic error (not only parsing error) before allowing a save, using the xtext editor.

An example of incorrect behavior is the following: when one removes a submachine reference on a submachineState, if ConnectionPointReferences exist, an error is shown in the editor, yet the save is performed (even in cases when user press ESC), yielding to inconsistent model.

Only parsing errors seem to be taken into account in the xtext-gmf glue, see PopupXtextEditorHelper::isDocumentHasErrors
Comment 1 Arnaud Cuccuru CLA 2010-10-28 10:07:09 EDT
Created attachment 181939 [details]
Patch for org.eclipse.xtext.gmf.glue

Adapted to ignore saving when ESC is pressed, and to take into account semantic validation before saving. If validation fails, no reconciliation happens.
Comment 2 Arnaud Cuccuru CLA 2010-10-28 10:08:23 EDT
Created attachment 181940 [details]
patch for org.eclipse.papyrus.connectionpointreference.editor.xtext.ui.patch

Adapted to take into account changes of org.eclipse.xtext.gmf.glue
Comment 3 Arnaud Cuccuru CLA 2010-10-28 10:09:05 EDT
Created attachment 181941 [details]
Patch for org.eclipse.papyrus.constraintwithvsl.editor.xtext.ui

Adapted to take into account changes of org.eclipse.xtext.gmf.glue
Comment 4 Arnaud Cuccuru CLA 2010-10-28 10:09:39 EDT
Created attachment 181942 [details]
Patch for org.eclipse.papyrus.marte.vsl

Adapted to take into account changes of org.eclipse.xtext.gmf.glue
Comment 5 Arnaud Cuccuru CLA 2010-10-28 10:10:54 EDT
Created attachment 181944 [details]
Patch for org.eclipse.papyrus.message.editor.xtext.ui

Adapted to take into account changes of org.eclipse.xtext.gmf.glue
Comment 6 Arnaud Cuccuru CLA 2010-10-28 10:11:26 EDT
Created attachment 181945 [details]
Patch for org.eclipse.papyrus.property.editor.xtext

Adapted to take into account changes of org.eclipse.xtext.gmf.glue
Comment 7 Arnaud Cuccuru CLA 2010-10-28 10:12:04 EDT
Created attachment 181946 [details]
Patch for org.eclipse.papyrus.property.editor.xtext.ui

Adapted to take into account changes of org.eclipse.xtext.gmf.glue
Comment 8 Arnaud Cuccuru CLA 2010-10-28 10:12:42 EDT
Created attachment 181947 [details]
Patch for org.eclipse.papyrus.state.editor.xtext

Adapted to take into account changes of org.eclipse.xtext.gmf.glue
Comment 9 Arnaud Cuccuru CLA 2010-10-28 10:13:36 EDT
Created attachment 181949 [details]
Patch for org.eclipse.papyrus.state.editor.xtext.ui

Adapted to take into account changes of org.eclipse.xtext.gmf.glue
Comment 10 Arnaud Cuccuru CLA 2010-10-28 10:14:05 EDT
Created attachment 181950 [details]
Patch for org.eclipse.papyrus.stereotypeapplicationwithvsl.editor.xtext

Adapted to take into account changes of org.eclipse.xtext.gmf.glue
Comment 11 Arnaud Cuccuru CLA 2010-10-28 10:15:03 EDT
Created attachment 181954 [details]
Patch for org.eclipse.papyrus.stereotypeapplicationwithvsl.editor.xtext.ui

Adapted to take into account changes of org.eclipse.xtext.gmf.glue
Comment 12 Arnaud Cuccuru CLA 2010-10-28 10:15:41 EDT
Created attachment 181955 [details]
Patch for org.eclipse.papyrus.transition.editor.xtext.ui

Adapted to take into account changes of org.eclipse.xtext.gmf.glue
Comment 13 Arnaud Cuccuru CLA 2010-10-28 10:16:33 EDT
The patches in attachment should resolve these bugs.
Comment 14 David Servat CLA 2010-10-28 14:11:52 EDT
Fixed with Arnaud Cuccuru patches applied