Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Hyperlinks - more than one possible hyperlink destinations?
Hyperlinks - more than one possible hyperlink destinations? [message #811080] Thu, 01 March 2012 22:57 Go to next message
Mikka Missing name is currently offline Mikka Missing nameFriend
Messages: 2
Registered: November 2011
Junior Member
Hi everybody,

I'm trying to provide hyperlinks for the most of the language elements of my xtext project. But now I stuck with hyperlinks that may have more than one possible destination:

Type1: 
    name=ID value=Value;

Type2:
    name=ID value=Value;

Type3:
    value=[Type1] | value=[Type2];


As you can see, Type3 consists of an instance of Type1 OR Type2 and should link to them (by using the square bracket syntax). When I try to generate the workflow/classes (via the 'Generate<Language>.mwe2' file) a FileNotFoundException is thrown because 'Internal<Language>Lexer.java' was not generated.


I tried it with following constructs:
Type3:
    value=[Type1] | value=[Type2];

Type3:
    value=([Type1] | [Type2]);

Type3:
    type1=[Type1] | type2=[Type2];


Is there a possibility to use hyperlinks for those constructs?

Kind regards,
Mikka
Re: Hyperlinks - more than one possible hyperlink destinations? [message #811299 is a reply to message #811080] Fri, 02 March 2012 06:51 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13468
Registered: July 2009
Senior Member
Hi you have to introduce a common super type

Type1OrType2: Type1 | Type2;

And reference this common supertype

Type3: ref=[Type1OrType2]


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Case insensitive and warnings
Next Topic:Multiple-variable declaration randomly broken up to many single-variable declarations
Goto Forum:
  


Current Time: Wed Jun 03 10:55:03 GMT 2020

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

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

Back to the top