|
Re: CrossLinking [message #663612 is a reply to message #663480] |
Tue, 05 April 2011 20:28 |
Ed Willink Messages: 7670 Registered: July 2009 |
Senior Member |
|
|
Hi George
That seems like the wrong solution to me.
Shouldn't the be an InternationalizationFragment or BuiltInFragment that
allows the spelling of "name" and "ID" and "importURI" etc to be configured,
possibly to null to suppress built-in functionality.
Regards
Ed Willink
On 05/04/2011 10:39, George Lawie wrote:
> Hey,
>
> In a grammar I've been working with, there's been some trouble with
> crosslinking but it got sorted out in the end. It's based on an
> existing model that's mostly in French... so while Xtext is brilliant
> when you have features called name, it's not as awesome when they're
> all called nom.
>
> More generically, a colleague and I were thinking of two possible
> enhancements:
>
> Xtext can somehow take the Label Feature from the EClass and use that
> to synchronise when linking, and/or;
> the grammar notation for crosslinking could be extended. The current
> crossreferencing syntax is '[' type=TypeRef ('|'
> ^terminal=CrossReferenceableTerminal )? ']' but I was thinking it
> could be extended to '[' type=TypeRef ('|'
> ^terminal=CrossReferenceableTerminal ('|' featureName=featureName)? )?
> ']' which would allow references=[MyRule|EString|nom] for example,
> which would override the default search for a feature called name in
> MyRule. This would make it easier to crosslink to features in a rule
> that aren't called name.
> Are either of these possible with Xtext 2.0, or are they ideas that
> would be worth suggesting on the Bugzilla?
|
|
|
Powered by
FUDForum. Page generated in 0.25312 seconds