Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Running ParsingTest in intellij
Running ParsingTest in intellij [message #1723793] Thu, 18 February 2016 05:28 Go to next message
pranay roy is currently offline pranay royFriend
Messages: 196
Registered: January 2016
Senior Member
HI,
I am trying to run individual test cases from the Auto-created "parsing test.xtend".In intellij I do not see a "run as" for the particular class. Moreover, When I try to debug the test the breakpoint does not stop at the test.

However, When I put the breakpoint in the generated java test class it stops . And it is also identified as a test class and I can run individual tests.

What could be the issue with the "xtend" test class. I wish to debug directy in the test i write in xtend and not in java. Please suggest.

[Updated on: Thu, 18 February 2016 05:28]

Report message to a moderator

Re: Running ParsingTest in intellij [message #1723796 is a reply to message #1723793] Thu, 18 February 2016 07:05 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
hi,

if you run java you can anyway set the breakpoint in xtend and it will stop there.
for the missing run command please file a enhancement request


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Running ParsingTest in intellij [message #1723797 is a reply to message #1723796] Thu, 18 February 2016 07:31 Go to previous messageGo to next message
pranay roy is currently offline pranay royFriend
Messages: 196
Registered: January 2016
Senior Member
Thanks for the reply. Breakpoint does not stop in xtend . If I set in java it stops. !
Re: Running ParsingTest in intellij [message #1723798 is a reply to message #1723797] Thu, 18 February 2016 07:39 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
are you sure the Java classes where built correct.
i have no idea how to get intellij proper Setup but in my case
next to the Java files there are YourClassName.java._trace files created


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Running ParsingTest in intellij [message #1723802 is a reply to message #1723798] Thu, 18 February 2016 07:52 Go to previous messageGo to next message
pranay roy is currently offline pranay royFriend
Messages: 196
Registered: January 2016
Senior Member
Yes The java classes are built correctly. I can debug the class. I dont know why the breakpoint does not stop in xtend. Also, the java class is created when I mvn clean install. Is it the normal behaviour or it should be created as I change the xtend file .
Re: Running ParsingTest in intellij [message #1723803 is a reply to message #1723802] Thu, 18 February 2016 07:58 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
maybe @sven efftinge can give us a clue. in my case xtend compiler builds this stuff automatically

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Running ParsingTest in intellij [message #1723805 is a reply to message #1723803] Thu, 18 February 2016 08:01 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
p.S:

i saw that i i restarted intellij and then open and edting and xtend file intelij asks if it should handle the xtend files in this project


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Running ParsingTest in intellij [message #1723808 is a reply to message #1723805] Thu, 18 February 2016 08:23 Go to previous messageGo to next message
pranay roy is currently offline pranay royFriend
Messages: 196
Registered: January 2016
Senior Member
I am confused ,what to do:(
Re: Running ParsingTest in intellij [message #1723811 is a reply to message #1723805] Thu, 18 February 2016 08:28 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
to test

(1) file new Project
(2) java, tick xtend, use libary, create, next
(3) enter a name, finish (new window)

create a xtend class

package my

/**
 * Created by dietrich on 18.02.16.
 */
class Main {

    def static void main(String[] args) {
        System.out.println("Hello")
        System.out.println("Hello")
        System.out.println("Hello")
        System.out.println("Hello")
        System.out.println("Hello")
        System.out.println("Hello")
    }
}


run the generated main
set breakpoint in xtend
debug the generated main


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Running ParsingTest in intellij [message #1723814 is a reply to message #1723811] Thu, 18 February 2016 08:41 Go to previous messageGo to next message
pranay roy is currently offline pranay royFriend
Messages: 196
Registered: January 2016
Senior Member
Well ,this works .but in my xtext project I dont even get the option to run as --debug,etc..

[Updated on: Thu, 18 February 2016 08:45]

Report message to a moderator

Re: Running ParsingTest in intellij [message #1723816 is a reply to message #1723814] Thu, 18 February 2016 09:01 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
as i sead you have to call debug on the generated Java file

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Running ParsingTest in intellij [message #1723819 is a reply to message #1723816] Thu, 18 February 2016 09:19 Go to previous messageGo to next message
pranay roy is currently offline pranay royFriend
Messages: 196
Registered: January 2016
Senior Member
So i can't debug an xtend test?. only debug the java.? Also ,this java test class is not geting generated on the fly. I have to clean install to generate .Is it usual for the setting in xtext project? :/
Re: Running ParsingTest in intellij [message #1723823 is a reply to message #1723819] Thu, 18 February 2016 09:33 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
hi,

i cannot answer this.

what i can tell you.

- there is no run or debug command on xtend files. please open a ticket for this.
- if you debug the generated Java file and set a breakpoint in the xtend file, the the flow will stop in the xtend file
- to get this running the xtend builder must run "somehow" automatically. on my Setup this happens
(there is a xtend facet in the Projects iml)

i create the Project using the wizard and do a grade clean and a grade build first and a refresh all grade Projects besore startng editing

since i am not what deep into intellij that is all what i personally can do

can you please file a bug if he "somehow" automatically does not work in your Setup
with detailed seteps what you are exactly doing when creating the xtext Project.


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Access to the proposal provider through the Xtext Web application
Next Topic:How to reference available methods of a JvmTypeReference (Xbase)
Goto Forum:
  


Current Time: Sat Apr 20 02:04:20 GMT 2024

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

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

Back to the top