How can I enable the auto-suggestion feature in Eclipse…
In Eclipse, you can enable auto-suggestion feature by following these steps:
- Open Eclipse and then open your project.
- Click on the “Window” from the menu bar and select “Preferences”.
- In the pop-up dialog box, expand the “Java” folder and select “Editor”.
- In the right-hand tab, select “Content Assist”.
- In the “Content Assist” tab, check the box for “Enable auto activation” and adjust the “Auto activation delay” to specify when you want the auto suggestions to appear (in milliseconds, with the default set at 200ms).
- In the “Auto activation triggers for Java” text box, enter the characters that will trigger the automatic prompts. The default is “.” and “->”, but you can add other symbols as needed.
- Click on the “Apply” or “OK” button to save the changes.
Now, as you write code, whenever you type characters that trigger auto-suggestions, Eclipse will automatically display a list of relevant suggestions to help you complete the code.