Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Running ParsingTest in intellij
Running ParsingTest in intellij [message #1723793] Thu, 18 February 2016 00:28 Go to next message
Eclipse UserFriend
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 00:28] by Moderator

Re: Running ParsingTest in intellij [message #1723796 is a reply to message #1723793] Thu, 18 February 2016 02:05 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Running ParsingTest in intellij [message #1723797 is a reply to message #1723796] Thu, 18 February 2016 02:31 Go to previous messageGo to next message
Eclipse UserFriend
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 02:39 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Running ParsingTest in intellij [message #1723802 is a reply to message #1723798] Thu, 18 February 2016 02:52 Go to previous messageGo to next message
Eclipse UserFriend
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 02:58 Go to previous messageGo to next message
Eclipse UserFriend
maybe @sven efftinge can give us a clue. in my case xtend compiler builds this stuff automatically
Re: Running ParsingTest in intellij [message #1723805 is a reply to message #1723803] Thu, 18 February 2016 03:01 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Running ParsingTest in intellij [message #1723808 is a reply to message #1723805] Thu, 18 February 2016 03:23 Go to previous messageGo to next message
Eclipse UserFriend
I am confused ,what to do:(
Re: Running ParsingTest in intellij [message #1723811 is a reply to message #1723805] Thu, 18 February 2016 03:28 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Running ParsingTest in intellij [message #1723814 is a reply to message #1723811] Thu, 18 February 2016 03:41 Go to previous messageGo to next message
Eclipse UserFriend
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 03:45] by Moderator

Re: Running ParsingTest in intellij [message #1723816 is a reply to message #1723814] Thu, 18 February 2016 04:01 Go to previous messageGo to next message
Eclipse UserFriend
as i sead you have to call debug on the generated Java file
Re: Running ParsingTest in intellij [message #1723819 is a reply to message #1723816] Thu, 18 February 2016 04:19 Go to previous messageGo to next message
Eclipse UserFriend
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 04:33 Go to previous message
Eclipse UserFriend
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.
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: Sun Jul 27 09:41:29 EDT 2025

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

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

Back to the top