views:

66

answers:

1

Is there a way to create a new class in a desired location without using the mouse in IntelliJ?

I understand there is no keyboard binding in the default keymap.

+1  A: 

If you are already in the Project View, press Alt+Insert (New) | Class. Project View can be activated via Alt+1.

You can also do it from the Navigation Bar, press Alt+Home, then choose package with arrow keys, then press Alt+Insert.

Another useful shortcut is View | Select In (Alt+F1), Project (1), then Alt+Insert to create a class near the existing one or use arrow keys to navigate through the packages.

And yet another way is to just type the class name in the existing code where you want to use it, IDEA will highlight it in red as it doesn't exist yet, then press Alt+Enter for the Intention Actions pop-up, choose Create Class.

CrazyCoder
Thanks CrazyCoder. You are indeed Crazy. BTW, are you crazy enough to use IntelliJ debugger without the mouse? It can not be done i tell you! I'm talking about full navigation around the debugging windows.
JavaRocky
Probably you can't do everything with keyboard in debugger, but most things are possible. Alt+5 activates the panel, Tab switches between Frames/Variables/Watches, Up/Down in Frames changes frame, F2 in Variables edits variables, Insert in Watches adds Watch, other common keys also work (like delete/arrows, etc). Some actions have no default shortcuts and need to be assigned in Settings | Keymap.
CrazyCoder
I agree that not everything is possible with keyboard only with the debugger.CrazyCoder, i challenge you to unplug your keyboard and work with IntelliJ!!!
JavaRocky

related questions