Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » CrossLinking(Advice on easier crosslinking, and possible suggestions)
CrossLinking [message #663480] Tue, 05 April 2011 09:39 Go to next message
George Lawie is currently offline George LawieFriend
Messages: 10
Registered: December 2010
Junior Member
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 20:28 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
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?
Previous Topic:Diagnostic vs. Diagnostic...
Next Topic:[Xtend2] Error compiling abstract Xtend class
Goto Forum:
  


Current Time: Wed Sep 25 13:37:47 GMT 2024

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

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

Back to the top