Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext tracing
Xtext tracing [message #1858475] Tue, 04 April 2023 13:20 Go to next message
Frank Benoit is currently offline Frank BenoitFriend
Messages: 179
Registered: July 2009
Senior Member
Hi

I want to test tracing with Xtext, from the example found here:
https://www.typefox.io/blog/generate-traced-code-with-xtext

When I do use the @TracedAccessors annotations with my ecore factory, I get hundreds of warning:
Quote:

The generated method '....ImTemplate.MyDslTraceExtensions._generateName(ImStructType,
Function<String, String>)' is not associated with a source element.
The producing active annotation should use 'setPrimarySourceElement'.


One big difference of my model vs. the example model is, that it is no having a Xtext grammar, just a ecore file.
Is this related to the warnings?

regards
Frank
Re: Xtext tracing [message #1858477 is a reply to message #1858475] Tue, 04 April 2023 13:27 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14703
Registered: July 2009
Senior Member
no, this looks more like an issue with the impl of the aa.
if this is ignored, a warning or an error can be configured in the projects xtend compiler settings


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext tracing [message #1858478 is a reply to message #1858477] Tue, 04 April 2023 13:31 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14703
Registered: July 2009
Senior Member
=> add

context.setPrimarySourceElement(it, context.getPrimarySourceElement(annotatedClass));

to all 3 addMethod bodies in the processor might solved it


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Create a jar/war file in xtext with websupport
Next Topic:Identation in xtend template with tracing
Goto Forum:
  


Current Time: Sun Sep 01 04:04:26 GMT 2024

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

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

Back to the top