What are the available shortcuts for eclipse?

I wanted to know how labels can be used for labels, for example, when we wanted to write this

System.out.println(); , then we just write syso and press ctrl+space then we get System.out.println () ;. I do not need shortcuts, for example, to copy ctrl + c or to cut ctrl + X

screenshot of templates

enter image description here

+4
source share
5 answers

These are called "editor templates" and you can see the full list in

 Window --> Preferences --> Java --> Editor --> Templates 

You can also create your own, with various placeholders, for example. I have one isequalto defined as follows:

 ${:importStatic(org.fest.assertions.api.Assertions.assertThat)}assertThat(${actual}).isEqualTo(${expected}); 

This will automatically add static imports and add cursor positions that can be navigated using TAB. This can be called by typing isequalto (or just ise ) and ctrl + SPACE.

For try / catch bock, just type try and ctrl + SPACE.

+6
source

The shortcuts you refer to are called templates.

You can view them all in the IDE or make your own:

Window> Settings> Java> Editor> Templates

Basically, to use any of these patterns, enter their name and then CTRL + SPACE . Once you have enough name that will be different from the name like syso , you can use CTRL + SPACE . Therefore, you may not need to enter the entire name.

+1
source

What you are looking for is not shortcuts, but Templates.

Open a window → Settings → Java → Editor → Templates and you will see a complete list.

You can even add your own templates.

+1
source

Go to help menu in Eclipse

enter image description here

And click the Help button

enter image description here

+1
source

see Short Eclipse Abbreviations

It may be for Eclipse 3, but these shortcuts have been standardized for a while.

+1
source

Source: https://habr.com/ru/post/1502763/


All Articles