|Re: Stopping error "Duplicate Constrct 'foo' in Struct 'bar'" for function that take diffe [message #675039 is a reply to message #674976]
||Mon, 30 May 2011 06:20
| Alexander Nittka
Registered: July 2009
the workflow for generating the language infrastructure contains JavaValidatorFragmen that by default has a diplicate name check enabled. Simply comment out the line
composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
or adapt the NamesAreUniqueValidationHelper so that it does not trigger for functions.
My feeling is that adding the parameter types to the name of the function (which you could do via implementing your own IQualifiedNameProvider) is not a good idea. It might make the scoping a bit complicated. My first approach would be to implement my own duplicate name check which takes parameter types into account. You might also have a look at the Xtend2 code. They will have solved the same problem there.
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to firstname.lastname@example.org
Powered by FUDForum
. Page generated in 0.11900 seconds