|
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 Messages: 1193 Registered: July 2009 |
Senior Member |
|
|
Hi,
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.
Alex
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@itemis.de
|
|
|
Powered by
FUDForum. Page generated in 0.03073 seconds