Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursive "steals" run/debug in junit java-file #149

Closed
kolstae opened this issue Dec 4, 2013 · 12 comments
Closed

Cursive "steals" run/debug in junit java-file #149

kolstae opened this issue Dec 4, 2013 · 12 comments
Milestone

Comments

@kolstae
Copy link

kolstae commented Dec 4, 2013

No longer possible to run/debug junit test with cursive enabled.

cursive-repl

Only workaround I have found, is to disable the cursive-plugin.

@vmarcinko
Copy link

It's not just junit-related, it also steals running plain java class via main() method

@cursive-ide
Copy link
Owner

I see - that's definitely a problem. Just to clarify - you can still actually run these configurations, right? You just can't create them using the context menu? I'm assuming this is a mixed Clojure/Java project managed with Leiningen?

@kolstae
Copy link
Author

kolstae commented Dec 4, 2013

Yes I'm still able to run an existing config, but not create from the context-menu.
This is a pure Java-project. No leiningen config or clojure code.

@kolstae
Copy link
Author

kolstae commented Dec 4, 2013

Just noticed a workaround. I triggered a manual re-import of the maven project, and the context-menu was restored to it's "normal" state. Save/Run/Debug test reappeared.

@cursive-ide
Copy link
Owner

I can't reproduce this - which version of IntelliJ are you running? I'm using a test Java-only project with a main class and a test class - in v13 it always offers me the right option, in v12 it shows me a popup menu so I can choose.

screen shot 2013-12-04 at 9 26 52 pm

@kolstae
Copy link
Author

kolstae commented Dec 4, 2013

I'm running v13 with cursive-plugin v0.1.09

I'm not able to reproduce it either ...
I tried opening a few other java-only projects, but I'm not seeing the problem anymore.

@vmarcinko
Copy link

Here is screenshot from my IDEA 12:1.6 in pure java project:
nocreateapp

There is no create new app option in context menu.

When I disable Cursive plugin, everything is back to normal.

@vmarcinko
Copy link

Just to clarify, there are other ways to create configuration from project tab, or by right-click on main class tab, but not on editor context menu

@cursive-ide
Copy link
Owner

Ok, I think I can see what's going on. The ordering logic has changed in v13 so the results are quite different in v12 and v13, and they seem a little erratic. I'll look at this tomorrow.

@cursive-ide
Copy link
Owner

Actually, I think I have a fix which should work for both. I'll test this tomorrow.

@hoppke
Copy link

hoppke commented Dec 5, 2013

I don't think v13 has much to do with it (or it's more than one issue). I remember having to disable clojure plugins to get back Ctrl-Shift-F10 for Java code before Cursive was born. I think Cursive inherited some bug(s) from the original Leiningen/LaClojure plugins.

Anyhow, I am getting this issue now on v12 (ultimate) + cursive 0.1.09 + maven integration & maven integration extension plugins.

I have a pure Maven project, java only, no clojure code. Can't easily run main() because the only options appearing in the context/run menus are about REPL. Of course I can manually add a run configuration and use that, but it's awkward. Reimporting the POMs (via the Maven Projects tab) doesn't help.

I've tried creating a new project from scratch by importing a POM, no change. As soon as I touch Ctrl-Shift-F10 in a main() intellij says "synchronising leiningen project" (ooh, intellij, why do you think it's a leiningen project?) and then proceeds to create a repl.

If there's any log or debug file I can capture in my intellij to help you diagnose this, let me know.

@cursive-ide
Copy link
Owner

Yes, there's definitely a bug there - I think I have it fixed, so it should be in the next drop. I got a bit distracted and haven't had a chance to test properly, but fingers crossed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants