Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Cross-reference to duplicated classes
Cross-reference to duplicated classes [message #629446] Tue, 28 September 2010 06:26 Go to next message
Eclipse UserFriend
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 08:23 Go to previous message
Eclipse UserFriend
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: Mon Jul 07 20:39:31 EDT 2025

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

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

Back to the top