Chinh Nguyen Huu
Chinh Nguyen Huu

Reputation: 133

How to make eclipse IDE more flexible?

I am new on Eclipse from Keil C. I have few tips to make a quick code on Keil but I can't find it on Eclipse. Can anyone help me, please?

  1. Outlining

enter image description here

To Collapse/Expand All Definition like this

enter image description here

  1. Find all in project

To find a string in all project at the moment. enter image description here

  1. Go to Definition/Reference of a functions or variables

To jump immediately to it. enter image description here

  1. Text completion (important for me) This tip makes me very fast coding. I will set up a keyword delegate with a text, document or any string. Next, I using keystrokes (Ctrl + Shift + Space) to appear completely string. Example: I type "cm" -> press keystrokes above it transform to /* | */ where | char is a location of the cursor after the text appeared and I continue typing my comment into it.

enter image description here

I'm very grateful for any help.

Upvotes: 0

Views: 114

Answers (1)

RoM
RoM

Reputation: 86

You can see all of the Eclipse shortcuts via Help -> Show Active Keybindings, or with the shortcut Ctrl+Shift+L. There you can also find some of the answers:

  1. Collapse All: Ctrl+Shift+/, Expand All: Ctrl+Shift+*
  2. Mark desired project in Project Explorer, then call menu Search -> File and search with scope to "Enclosing Project"
  3. Hold Ctrl and do left mouse click on method/variable to go to its definition
  4. Ctrl + Space to show Template proposals. You can create new templates via menu Window -> Preferences -> Java -> Editor -> Templates. Eclipse menu for adding code templates

For your example: Click on "New...". Enter "cm" as name, "Enter a new comment" as description and as pattern "/*${cursor}*/" (please find other available variables by clicking on the button "Insert Variable..."). Eclipse mask for new code template

Confirm with "OK" and close Preferences-Window with click on "Apply and Close". That's it! :-)

Upvotes: 2

Related Questions