Skip to main content



      Home
Home » Modeling » TMF (Xtext) » CrossLinking(Advice on easier crosslinking, and possible suggestions)
CrossLinking [message #663480] Tue, 05 April 2011 05:39 Go to next message
Eclipse UserFriend
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?
Re: CrossLinking [message #663612 is a reply to message #663480] Tue, 05 April 2011 16:28 Go to previous message
Eclipse UserFriend
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?
Previous Topic:Diagnostic vs. Diagnostic...
Next Topic:[Xtend2] Error compiling abstract Xtend class
Goto Forum:
  


Current Time: Mon Jul 07 12:49:36 EDT 2025

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

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

Back to the top