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

Bug 342823

Summary: [Xtend] deliver perfect Serializer!
Product: [Modeling] TMF Reporter: Sven Efftinge <sven.efftinge>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jan, karsten.thoms, kkreuzer, knut.wannheden, moritz.eysholdt
Version: 2.0.0Flags: sven.efftinge: indigo+
Target Milestone: SR2   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Sven Efftinge CLA 2011-04-14 07:47:16 EDT
Xtend needs to have a serializer running in negative time and error-free in all cases.
I'm looking at you Mr. Eysholdt :-)
Comment 1 Moritz Eysholdt CLA 2011-04-14 07:50:47 EDT
I'm on it!
Comment 2 Knut Wannheden CLA 2011-04-14 11:10:25 EDT
Sounds very promising!
Comment 3 Karsten Thoms CLA 2011-04-14 17:53:57 EDT
This scares me. Will it run as perfect as my Zip algo which crunches all files down to max 100 bytes (OK, Unzip algo still pending)?
Comment 4 Sven Efftinge CLA 2011-04-15 03:20:52 EDT
For sure you can safely delete your zip algo, since Moritz' serializer will also take care of your archives.
@Moritz: Shouldn't be a problem, is it? I mean the new architecture is quite flexible.
Comment 5 Moritz Eysholdt CLA 2011-04-15 04:11:43 EDT
as long as you can describe your archive's contents with an Xtext grammar, everything is possible...
Comment 6 Moritz Eysholdt CLA 2011-05-03 12:57:11 EDT
I've enabled the new serializer for xbase and xtend2:

SerializerFragment: is used in the workflows for Xbase, Xtype and Xtend2

Interesting files are:
org.eclipse.xtext.xbase.serializer.XbaseSemanticSequencer
org.eclipse.xtext.xtend2.serializer.Xtend2SemanticSequencer
org.eclipse.xtext.xbase.tests.serializer.XbaseSerializerTest
org.eclipse.xtext.xtend2.tests.serializer.SerializerTest

the generic sequencer can handle Xbase, except for:
- determine what kind of operation a BinaryOperation is.
- determine if an XClosure is a XShortClosure.
to handle these cases I've adapted the XbaseSemanticSequencer.

Thanks to AbstractXbaseEvaluationTest, the test for Xbase is pretty extensive. For Xtend2, however, I've got only one test case so far.
Comment 7 Sven Efftinge CLA 2011-05-04 02:41:35 EDT
Woohoo! That sounds pretty good. 
So we need tests for the different Xtend fetures, such as RichStrings, dispatch and create extensions.
We could use the AbstractXbaseEvaluationTest for Xtend too. It might not be that interesting but you ever know and it is relatively easy to do.

A first shot on the formatter would also be great :-)
Comment 8 Sebastian Zarnekow CLA 2011-05-04 06:11:42 EDT
Preliminary scheduled for 2.0RC1
Comment 9 Sven Efftinge CLA 2011-10-13 10:00:55 EDT
please open new bugzillas if concrete problems occur.
Comment 10 Karsten Thoms CLA 2017-09-19 17:52:56 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 11 Karsten Thoms CLA 2017-09-19 18:03:39 EDT
Closing all bugs that were set to RESOLVED before Neon.0