Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to leverage _trace to properly configure "Open Source/Generated File"
How to leverage _trace to properly configure "Open Source/Generated File" [message #1776967] Thu, 23 November 2017 10:29 Go to next message
Steve Hostettler is currently offline Steve HostettlerFriend
Messages: 81
Registered: June 2016
Member
Hi all,

looking for some guidelines, examples on how to leverage the _trace files to properly configure "Open Source/Generated File"

I do have one dsl files that produces 2 java files. The traces seem like they are properly mapped but when I do Open Generated for a given line in the DSL file it proposes 2 java files. I would like to narrow it down to one.

Similarly when from a given region in java I do open source, it does not position the cursor correctly.

Any hint?
Re: How to leverage _trace to properly configure "Open Source/Generated File" [message #1776969 is a reply to message #1776967] Thu, 23 November 2017 10:32 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
am not sure how you generate. can you give more context? cannot reproduce

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How to leverage _trace to properly configure "Open Source/Generated File" [message #1776971 is a reply to message #1776969] Thu, 23 November 2017 10:40 Go to previous messageGo to next message
Steve Hostettler is currently offline Steve HostettlerFriend
Messages: 81
Registered: June 2016
Member
Thanks for your reply, I attached the files.
  • Attachment: temp.zip
    (Size: 2.00KB, Downloaded 62 times)
Re: How to leverage _trace to properly configure "Open Source/Generated File" [message #1776976 is a reply to message #1776971] Thu, 23 November 2017 11:11 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
but you generate two files?!?!?!? so its normal behaviour

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How to leverage _trace to properly configure "Open Source/Generated File" [message #1776977 is a reply to message #1776976] Thu, 23 November 2017 11:16 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
=> debug OpenGeneratedFileHandler

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How to leverage _trace to properly configure "Open Source/Generated File" [message #1776978 is a reply to message #1776977] Thu, 23 November 2017 11:23 Go to previous messageGo to next message
Steve Hostettler is currently offline Steve HostettlerFriend
Messages: 81
Registered: June 2016
Member
What do you mean? Yes I do generate two files but I want the cursor to be positioned in the right line of the source file. I will debug OpenGeneratedFileHandler
Thanks
Re: How to leverage _trace to properly configure "Open Source/Generated File" [message #1776980 is a reply to message #1776978] Thu, 23 November 2017 11:42 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
in xtend in have the same behaviour

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How to leverage _trace to properly configure "Open Source/Generated File" [message #1777001 is a reply to message #1776980] Thu, 23 November 2017 14:15 Go to previous messageGo to next message
Steve Hostettler is currently offline Steve HostettlerFriend
Messages: 81
Registered: June 2016
Member
Yes I confirm, that findDerivedResources does not take into account where the cursor is positioned in the source file to look it up. So actually, it does not use the traces to look it up.
Hopefully this will not be a problem to enable debugging.

Would you mind pointing me to some resources to enable debugging? Right now I cannot add breakpoints in the DSL.

I guess that it should in turn add breakpoint in the underlying java code

[Updated on: Thu, 23 November 2017 14:22]

Report message to a moderator

Re: How to leverage _trace to properly configure "Open Source/Generated File" [message #1777009 is a reply to message #1777001] Thu, 23 November 2017 15:09 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
i am working on a blog post for this. but it will take some days for it to be finished.


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How to leverage _trace to properly configure "Open Source/Generated File" [message #1777012 is a reply to message #1777009] Thu, 23 November 2017 15:18 Go to previous messageGo to next message
Steve Hostettler is currently offline Steve HostettlerFriend
Messages: 81
Registered: June 2016
Member
Great thanks, let me know whether I can help.
Re: How to leverage _trace to properly configure "Open Source/Generated File" [message #1777016 is a reply to message #1777012] Thu, 23 November 2017 15:48 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
well the code is working. just the "writing" needs to be finished

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How to leverage _trace to properly configure "Open Source/Generated File" [message #1777475 is a reply to message #1777016] Wed, 29 November 2017 14:48 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
here is the blog post: https://blogs.itemis.com/en/debugging-dsls-in-xtext-and-eclipse

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Building dependent resources
Next Topic:Parsing Exponent Expression
Goto Forum:
  


Current Time: Thu Apr 18 00:47:25 GMT 2024

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

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

Back to the top