Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Warning for unused declarations
Warning for unused declarations [message #1681492] Tue, 17 March 2015 10:34 Go to next message
kon f is currently offline kon fFriend
Messages: 152
Registered: March 2012
Senior Member
Hey,

I've created a DSL where input files are declared in the header of a file. Certain element can then reference the declared files later on. I would like to show a warning to the user if certain file declarations are unused.

Can I somehow proof if the declared file is at least once referenced in the document starting from the declared file? Or do I have to start vice versa (starting from the elements that reference the input file)?

I found this topic in the xtext forum, but it could not solve my issue Sad

Thank you!
kon
Re: Warning for unused declarations [message #1681503 is a reply to message #1681492] Tue, 17 March 2015 10:39 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
Hi,

you can try to use the Xtext Index (IResourceDescriptions) and the list IResourceDescription to find out the ReferenceDescriptions that point to your Object


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Initialization in Xtext Validation
Next Topic:Scoping problem across multiple files
Goto Forum:
  


Current Time: Thu Mar 28 16:20:24 GMT 2024

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

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

Back to the top