I wanted to know the different eclipse shortcuts available like when we wanted to write this
System.out.println();
then we simply write syso
and hit ctrl+space
then we get System.out.println();.I do not want shortcuts like for copy ctrl+c or to cut ctrl +X
screenshot of templates
These are called "editor templates", and you can see the full list in
Window --> Preferences --> Java --> Editor --> Templates
You can also create your own there, with various placeholders, e.g. I have one isequalto
defined like this:
${:importStatic(org.fest.assertions.api.Assertions.assertThat)}assertThat(${actual}).isEqualTo(${expected});
This will automatically add a static import and add cursor positions that can be navigated to with TAB. This can be invoked by typing isequalto
(or just ise
) and ctrl+SPACE.
For a try/catch bock, just type try
and ctrl+SPACE.
What you're looking for are not shortcuts, but Templates.
Open Window -> Preferences -> Java -> Editor -> Templates and you'll see the full list.
You can even add your own templates.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With