Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Cross-reference to duplicated classes
Cross-reference to duplicated classes [message #629446] Tue, 28 September 2010 10:26 Go to next message
nataly is currently offline natalyFriend
Messages: 5
Registered: July 2010
Junior Member
Hello all!

In my dsl I have cross-reference to the parent class, like this:
Declaration : 'class' name=CLASS_NAME (':' superType=[Declaration|CLASS_NAME])?

for example class A : B

In my target project class B is declared several times in different files. So I get the error "Couldn't resolve reference to Declaration" (reference to the class B).

I want this link to reference any one of duplicated classed (it doesn't matter what specifically) and show warning instead of error.

How it can be done? User guide has very little information about customizing hyperlinks.

Thank you in advance for any help.
Re: Cross-reference to duplicated classes [message #629470 is a reply to message #629446] Tue, 28 September 2010 12:23 Go to previous message
Meinte Boersma is currently offline Meinte BoersmaFriend
Messages: 434
Registered: July 2009
Location: Leiden, Netherlands
Senior Member
You might try and do this through scoping, by picking exactly one of the B classes and returning that as the only item in scope -I think the defaults require to have distinct names (EObjectDescription#name in fact) in the scope. Then, you validate the Declaration by checking whether the linked class has a duplicate name.


Previous Topic:[Solved] Resolve all Proxy URIs in a ResourceSet
Next Topic:xbase
Goto Forum:
  


Current Time: Thu Apr 25 04:30:36 GMT 2024

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

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

Back to the top