feature proposal: ctrl-click run button -> use current file

I find me doing this every time: I want to run a certain run configuration, and instead of just selecting it in the run config combobox I always use ctrl-N to navigate to the file in the editor - while this is not at all required. I could just choose the run config without opening the corresponding class in the editor.

But as I my brain seems to be wired this way, and it is a habit, I always wish there would be a way to quickly run the run config that exists for the file that is currently open in the editor. I know that I could do it by using right mouse, then run ..., but this is not quick enough ;) I would, as the subject says, like it if by ctrl-clicking the run icon (the play button), IDEA would search for an existing run configuration for the current class, and if it finds one, run it.

What do you think?

0
17 comments

If you're already typing (Ctrl+N, class name...) then simply press
CtrlShiftF10 to run the current class. That's much faster than moving
the hand to the mouse to do Ctrl+Click (which IMHO would be a very bad
thing to implement as it is already used for other things).

Michael Damberger wrote:

I find me doing this every time: I want to run a certain run configuration, and instead of just selecting it in the run config combobox I always use ctrl-N to navigate to the file in the editor - while this is not at all required. I could just choose the run config without opening the corresponding class in the editor.

But as I my brain seems to be wired this way, and it is a habit, I always wish there would be a way to quickly run the run config that exists for the file that is currently open in the editor. I know that I could do it by using right mouse, then run ..., but this is not quick enough ;) I would, as the subject says, like it if by ctrl-clicking the run icon (the play button), IDEA would search for an existing run configuration for the current class, and if it fins one, run it.

What do you think?

0

thanks, I did not know ctrl-shift F10 - will try to remember and use this.

ctrl-click on the run configurations play icon is not yet used, however ;)

0

Of course, if you're using Linux, you'll find that CTRLSHIFTF10 (or any numbered function key) won't ever make it to an application.

I wish there was a uniform set of alternatives for Linux users.


Randall Schulz

0

In the same territory, I filed this feature request some time back:
http://www.jetbrains.net/jira/browse/IDEABKL-3723
Basically, it is about more flexibility with the run icon, using it to run programs with the mouse.

0

That's a matter of configuration.

I'm on Linux, and all the default IDEA shortcuts work for me (including the new CtrlAltF7 for Find Usages).

I run KDE and have disabled the X server keys. I never need them anyway.

0

How do you switch virtual consoles?

(I use KDE, too.)

RRS

0

I cannot switch virtual consoles. Like I said: I don't use them anyway. I always use the same X session.

I do have multiple (6) desktops in KDE, if that is what you mean. I switch these using the Windows-key on my machine. I find that key ideal for all sorts of global shortcuts, like manipulating my media player (Amarok), quick-launching applications (katapult) or opening a konsole (yakuake). And, of course: switching desktops. These keys never interfere with application shortcuts,

Vincent

0

the dragging of the run icon sounds like a good idea

0

No, I don't mean KDE virtual desktops. I configure eight of those, but their use has one undesirable effect on IDEA: If I start IDEA up and don't keep its virtual desktop visible through its start-up processing, when it finally populates the window contents, it resets the left, and right dock sizes so each of them, as well as the file editing area, occupy equal portions, which is not how I set them and makes the dock areas too big and the file editing area too small.


But I don't see how a Linux user can forgo the possibility to access other virtual consoles, though.

Just out of curiosity, which Linux distribution do you run?


Randall Schulz

0

If I start IDEA up and don't keep its
virtual desktop visible through its start-up
processing, when it finally populates the window
contents, it resets the left, and right dock sizes so
each of them, as well as the file editing area,
occupy equal portions, which is not how I set them
and makes the dock areas too big and the file editing
area too small.


Try configuring the Window-Specific Settings for IDEA (click on the application icon in the Title Bar, select Advanced and then Special Window Settings, choose the Geometry tab):

  • Position: Forced to 0,0

  • Maximized Horizontally: Forced

  • Maximized Vertically: Forced


Works for me! I also have IDEA forced to a specific desktop. IDEA is in my .kde/Autostart folder, so it starts up when I log on.

But I don't see how a Linux user can forgo the
possibility to access other virtual consoles,
though.


Why not? What would I want to do in a virtual console that I can't do in an X terminal?

Just out of curiosity, which Linux distribution do
you run?


I run Mandriva 2008. I've read about all sorts of problems with IDEA with Ubuntu and Fedora Core, but I've never experienced these. I use the latest JDK to run IDEA and it works like a charm.

0

The problem I have is not about the sizing or placement of the IDEA window overall, but of the relative sizes of the left- and right-side docks and of the editing area. This is not something KDE's Window-Specific Settings can control. I do use Window-Specific Settings extensively, but they're irrelevant to this anomaly.

RRS

0

Apologies. I misunderstood.

As far as I can tell I don't have this problem.

0

CtrlShiftF10 has one problem for me.

In some configurations I want to edit the program parameters,
but CtrlShiftF10 runs immediately, even if I have "display settings before launch" checked.

0

I really still have a (minor, but yet existing ;) issue here:

my use case is that I have to run 2 configurations, repeatedl, very often
+ I like to "display settings before launch" for two reasons:
1. in one case i have to enter a program param each time
2. in the other case it just reassures me to see the settings, so that I know I'm running the right config

So... I have >10 run configs.
Each time I have to identify the right one in the combobox. This is exhausting! It drains my power ;)
And worse, each time I think - there must be a way to do this more conveniently!
In one of the cases I regularly have to edit the java class with the main method, toggling a certain method call, then run again. Therefore I ahve the class in the editor already, but Ctrl-Shift-F10 won't do, because it does not show me the settings.

So... I tried macro recording.
Action=Run.
Ok, the macro just runs the class in the editor AND shows the settings! ;)
The macro won't save any "paramaters" (which class to run) - not really useful normally, I would think, but in my case it helps me out ;)

I guess a plugin could also be written that just works like
ctrl-shift-f10 but shows the settings first...
Can anyone give me a hint about an estimation at how long it would take me to do this without any experience as a plugin writer? If it can with some probability in theroy be done in half a day or less, then i would try it...just to see how "configurable" IDEA really is... thanks!

0

well.... no, the macro does not really work.
Instead of selectRunConfig it records createRunConfig (deleting my program parameters)
Ok... so the plugin topic is more interesting now....

0

Michael,

I'm trying to do something somewhat similar. I have 2 different configs that I need to run all the time. I'm always switching between the two. One is a set of Junit tests and one is for running the GUI application. I just wish there was a way to assign one hotkey to run the junit configuration and an different hot key to run the main GUI. I would probably also need a set of hotkeys to start a debug session with the Junit tests or the GUI.

I have no REAL need to view the run/debug configuration window. The configs I have are static. You would think this would be simple with all the keyboard support in IDEA.

The way things are now, I just do shift-F10 or shift-F9 (for debugging) and navigate with arrow keys to the test or the app to run. This just seems like a needless activity that just gets in the way running the app.

Like you said, macros aren't detailed enough to specify which config to run. It just opens the same run config window. It is simple to assign a hotkey to an ant task, or just about anything else. You would think there would be a simple way to assign a hot key to a specifig run configuration. Am I missing something obvious here?

0

seems like it really is a missing functionality

0

Please sign in to leave a comment.