Running IDEA 12.1.1 on a new MacBook Pro to which I migrated using my Time Machine backup.
Everything works properly, except that right-clicking a test class does not display the Run options (Run as JUnit / Specs2 / ScataTest etc).
I tried invalidating caches and re-importing the project from the POM files, to no avail. I am able to run the tests by manually creating a run configuration.
I saw this SO thread but I'm reluctant to completely obliterate my IDEA installation unless no other options is available.
Has anyone experienced this or has an idea what I can do to resolve the issue?
Hi, just a guess, but could you make sure the source root is mark as a test source root? (Go to the project window, find this class, then find the source root directory. Then right click, choose "Mark Directory As" menu item, and then click "Test Source Root".)
(With my settings, the test classes now have a pale light green background and I can right-click on a test class and see the Run/Debug menu items for it.)
Yes, of course it is. I also tried unmarking and remarking, no go. This is definitely something to do with the move to the new computer and the way Apple implements migration usin Time Machine restore.
Could you provide a sample project which shows the problem at your environment?
Right clicking the test class in this project on my computer doesn't display the Run option in the context menu. However, I sent this project to a colleague, and it does display the option on his machine. Meaning, it's something with my local copy of IDEA or its settings.
Your project works just fine at my environment - ContextMenuTest is successfully run via context menu action.
Please try to execute 'main menu | file | invalidate caches' and check if it helps.
Also provide your idea.log (main menu | help | show log), it might contain relevant error messages.
As I already wrote in my original post, I tried invalidating caches.
Log file attached.
The log shows the problem:
2013-04-23 11:37:33,108  ERROR - penapi.actionSystem.impl.Utils - update failed for AnAction with ID=RunClass
I.e. there was an error during preparing 'run' action for the context menu. Checking further
Apparently re-installing IDEA did solve the issue, as opposed to the experience of the guy form the SO post. Not that it explains what caused the issue originally, but at least my problem is solved
It looks like your IJ binaries were somehow broken because I've just checked that IU 12.1.1 has that method at the binary distribution (namely, $IJ_HOME/lib/openapi.jar).