We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Searializer behaves wrong for unordered groups
serializing existing models with unordered groups and adding a new element to an existing * part leads to an invalid model
Model: 'model' site=ID '{' ( xxxxValue=XXXXValue? & properties+=PropertyAssignment* ) '}' ; XXXXValue: "xxxx" "=" value=INT ; PropertyAssignment: name=ID "=" value=INT ;
import com.google.inject.Inject import org.eclipse.xtext.serializer.ISerializer import org.eclipse.xtext.testing.InjectWith import org.eclipse.xtext.testing.XtextRunner import org.eclipse.xtext.testing.util.ParseHelper import org.junit.Assert import org.junit.Test import org.junit.runner.RunWith import org.xtext.example.mydsl3.myDsl.Model import org.xtext.example.mydsl3.myDsl.MyDslFactory import static org.junit.Assert.assertEquals @RunWith(XtextRunner) @InjectWith(MyDslInjectorProvider) class MyDslParsingTest{ @Inject ParseHelper<Model> parseHelper @Inject extension ISerializer serializer @Test def void loadModel() { val result = parseHelper.parse(''' model mymodel { yyyy = 1 xxxx = 2 } ''') Assert.assertNotNull(result) println(result.eResource.errors) result.properties += MyDslFactory.eINSTANCE.createPropertyAssignment => [ name = "xxxxx" value = 1 ] val ser = result.serialize println(ser) println(parseHelper.parse(ser).eResource.errors) assertEquals(0, parseHelper.parse(ser).eResource.errors.size) } }
The text was updated successfully, but these errors were encountered:
workaround: throw away node model before serializing
https://github.com/eclipse/xtext-core/blob/f9b6d1bebe09dc5775d45671d255384a8160015c/org.eclipse.xtext.testing/src/org/eclipse/xtext/testing/serializer/SerializerTestHelper.java#L145
Sorry, something went wrong.
No branches or pull requests
Searializer behaves wrong for unordered groups
serializing existing models with unordered groups and adding a new element to an existing * part leads to an invalid model
The text was updated successfully, but these errors were encountered: