This question already has answers here:
Eclipse comment/uncomment shortcut?
(18 answers)
Closed 7 years ago.
Hello I needed to know how do I uncomment out code in eclipse? I know Crtl+Shift+C will comment out a set of code how do I undo that?
Here You have all shortcuts for Eclipse:
http://www.shortcutworld.com/en/win/Eclipse.html
As You can see on point 7, its Ctrl + Shift + \.
As Already said, It is the same shortcut to comment and uncomment.
I Would like to precise the most important, IMHO, shortcut in Eclipse : ctrl + shift + l which lists all the shortcuts.
To comment any code, select it and press Ctrl + 7.
Use again to undo.
Related
I already made an investigation about the topic, and actually, you can find the answer in the official documentation of JetBrains or just going to File -> Settings -> Keymap. However, I can't implement that solution, which is CTRL + SHIFT + /.
I don't have a "/" key in my keyboard, but the combination of the number 7 and SHITF makes the "/" key, so what I do is to press CTRL + SHIFT + 7 trying to comment an entire block of code but nothing happens. Doesn't matter if I select English or Spanish in the Prefered Languages panel of Windows, I cannot comment several lines at the same time using that combination.
I know probably I am doing something very very dumb, but honestly, I have been stuck like 20 minutes trying to figure out what I am doing wrong and I am starting to lose any hope.
Sorry for making a dumb question dear folks, but I would really appreciate if you can help me with this.
Just add any keyboard shortcut that works on your system in Settings | Keymap:
Normally you would expect just hovering over a method it would show a popup of the return type.
How do you get this information in intellij ultimate?
Hit Ctrl + Q (or ⌃J on Mac) when cursor is on a method declaration or call. It will show you the pop-up you want. As a bonus: Ctrl + Shift + I will display method body as well in a pop-up.
You hover it and hold down CTRL in windows or CMD in Mac
Try Ctrl + Space for quick definitionAlso Ctrl + Shift + P may help
In intellij, Go to Help > Productivity Guide
you will find a list of useful shortcuts to increase productivity
Regarding, this question in mac Press option+command+V to get the list of names that you can choose
Ctrl+ J in mac for getting the documentation
Find screenshots for ease:-
Ctrl+Shift+P works great with extra bonus by highlighting relevant return expression (IntelliJ 2020.2.3 CE)
Hot key for that: Ctrl + Shift + P
Toolbar: "View->Type Info"
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I was searching for a shortcut in Eclipse which would show the references of the selected Java class elsewhere. Presently I right click on the Java class and select References.
It would be great if I could be told the shortcut for this.
Is there a guide which I could refer to, to find out the most-used Eclipse shortcuts ?
Finding references in Eclipse is done by the CTRL + SHIFT + G keyboard shortcut. Just makes sure the mouse cursor is on the class and use the key combination. The same shortcut works for method or variables.
To find all References of selected item in Workspace : CTRL + SHIFT + G
To find all References of selected item in Current class : CTRL + U
Learning Eclipse Shortcuts
If you are starting out with Eclipse Shortcuts, I would suggest that it might not we worthwhile trying to learn them by just reading them.
Suggested strategy to remember shortcuts
Try this out :
Identify the one activity/action that you do most often.
Examples :
Open Resource (CTRL + SHIFT + R) which allows you to search for and open a file in the workspace.
Switch Between Tabs (CTRL + Page Up or Page Down )
Once you have identified the oft-used activity above, USE IT as often as possible ( which shouldn't be difficult given the fact that we identified an oft-used action to start with)
Repeat :)
Tip - Shortcut groups
It might be useful to remember shortcut Groups. Many a time you'll find that they are intuitive and easily lend themselves to memorization.
Example - The Execute Group of Shortcuts
Eclipse has this concept of multi-key shortcuts (something that I had not come across before Eclipse) which require you to press a sequence of Characters ( such as Alt + Shift + X) and then another Character after it. This allows the 'grouping' of related shortcuts.
For instance to Execute pretty much anything you first press ALT + SHIFT + X and then another character depending upon what you are executing. Thus, one would use the following combinations :
ALT + SHIFT + X, J : To execute the main method of a Java class
ALT + SHIFT + X, T : To run a Junit Test (this would run a specific test or all the test in the class depending upon the position of the cursor when this shortcut is pressed)
The above are easy to remember as Alt + Shift + X ecute, a J ava class or a JUnit T est.
Now the beauty of this is, once you are used to the above shortcuts you change X ecute to D ebug and just like that you have two new shortcuts to Run a Java class or JUnit test in debug mode.
I wish I could word this question better. Partly I just don't know the name of what I'm looking for.
With Visual Studio and Windows forms you can add an ampersand to create a "shortcut" key to a button by pressing Alt + [That Letter]. Like My &Button ... Alt + B would be the shortcut.
Is there an equivalent of this in Java SWING? I am using NetBeans IDE 6.9.1.
Thank you all!
That's called a mnemonic.
Use setMnemonic (javadoc)
See http://download.oracle.com/javase/tutorial/uiswing/components/menu.html#mnemonic
You use JMenutItem.setMnemonic(); I don't think there's a handy-dandy shortcut like the ampersand.
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Hidden features of Eclipse
I've just discovered that if you type sysout then hold ctrl and press space it changes to System.out.println()
you can also indent the code properly.
select the code you want to format and press ctrl +shift+ 'F'
this will indent your data properly.