Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Update 2.5.3 to 2.6.2 - ECollections.sort() Question
Update 2.5.3 to 2.6.2 - ECollections.sort() Question [message #1412046] Mon, 25 August 2014 06:48
Eclipse GuestFriend
Messages: 93
Registered: February 2013
Location: Vienna
Member
I'm updating my Xtext Project from 2.5.3 to 2.6.2. Now i've got a problem with my sorting quickfix. Before the update ECollections::sort() works fine.

After the update this happens:

Before quickfix:
AttributeList {
		TAttribute Date

		TAttribute Time

		TAttribute State

		LicenseNumber {
			Description ""
			Column LICENSE
			Type Number
		}
}


After quickfix (xtext 2.5.3):
AttributeList {
		LicenseNumber {
			Description ""
			Column LICENSE
			Type Number
		}

		TAttribut State

		TAttribut Date

		TAttribut Time
}


After quickfix (xtext 2.6.2):
AttributeList {
		LicenseNumber {
			Description ""
			Column LICENSE
			Type Number
		}

	TAttribute StateTAttribute Date

		TAttribute Time
}


Grammar for the both attribut types:
Attribute:
	name=ValidID '{'
		('Description' beschreibung=STRING)? 
		'Column' column=ValidID 
		'Type' type=PersistenceType
	'}' 
;

TAttributeReference:
	('TAttribute' tAttribute=[TechnicalAttribute])
	|
	( 
	'TAttribute' tAttribute=[TechnicalAttribute] '{'
		('Description' description=STRING)?
			('Column' column=ValidID)?
			('Type' type=PersistenceType)?
	'}'	
	)		
;


The quickfix implementation
@Fix(PersistenzXtendValidator::ISSUE_CODE_WRONG_ORDER)
	def fixWrongOrder(Issue issue, IssueResolutionAcceptor acceptor) {
		acceptor.accept(issue, "Sort", "Sort", null,
			[ element, context |
				val entitaet = element as BasisEntitaet
				ECollections::sort(entitaet.attribute, entitaetAttributComparator)
			])
	}



The Order is still correct, but the serialization failed. The attributes mixed together and the model is invalid.

Maybe someone has a hint why this could happen.

Thanks
Previous Topic:How to test NatTable using swtbot?
Next Topic:How to implement efficient type inferrer/provider?
Goto Forum:
  


Current Time: Mon Dec 16 01:48:02 GMT 2019

Powered by FUDForum. Page generated in 0.01288 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top