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

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!
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: 13939
Registered: July 2009
Senior Member

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

Need professional support for Xtext, Xpand, EMF?
Go to:
Twitter : @chrdietrich
Blog :
Previous Topic:Initialization in Xtext Validation
Next Topic:Scoping problem across multiple files
Goto Forum:

Current Time: Thu May 13 06:53:32 GMT 2021

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

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

Back to the top