Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change eclipse suggestions order and content

Tags:

eclipse

I installed the Eclipse Neon but feels bad with its code suggestions.

Take the code template as an example, usually I type main and press <ALT> + / to show the suggestions. In the old versions, the main method template shows at the first one. However, the top N is occupied by many Main* class main, it doesn't make sense for me.

Is there any way to change it ?

  • how to remove any Main* class's suggestions
  • how to let the code template move to top

eclipse suggests

like image 628
qrtt1 Avatar asked Apr 14 '17 03:04

qrtt1


People also ask

How do I turn off Eclipse suggestions?

Open menu Window, then Preferences. Follow path Java -> Editor -> Content assist. Now mess around with the settings to find your ideal setup. I believe what you'll want is to deactivate Insert single proposals automatically.

What is Content Assist in Eclipse?

The Content Assist feature enables the selection and insertion of existing code elements to complete partially entered code. The Content Assist preferences page allows you to configure your Content Assist preferences.

How is Content Assist activated in eclipse?

To enable the Content Assist window to open automatically, go to the Content Assist Preferences page, accessed from Window | Preferences | PHP | Editor | Content Assist and mark the 'Enable auto-activation' checkbox.


Video Answer


2 Answers

Not exactly what you need, but the most approximate solution I know is that you can press CTRL+SPACE repeatedly to browse the content assist list. The first list Eclipse shows is the default proposals. But if you press CTRL+SPACE again and again, Eclipse will show a more specific list each time.

Go to Window > Preferences > Java > Editor > Content assist > Advanced.

The upper list allows you to select (not to sort, sorry!) the contents that will show up as default proposals. This is where you read this unordered, unpractical list of contents. Then, if you press CTRL+SPACE again, Eclipse will show the poposals by categories. The order for these categories to show can be set by the lower list in this window: Content assist cycling.

like image 187
Little Santi Avatar answered Nov 13 '22 15:11

Little Santi


Don't know if this will be relevant any more, but i ended up here looking exactly for this, and later found out a solution. This might be linked to a specific Eclipse version (i use Oxygen right now) Go to Window > Preferences > Java > Editor > Content assist and you will find an option that let you select between relevance and alphabetically. here's the screenshot

like image 32
Jaime Rey Avatar answered Nov 13 '22 14:11

Jaime Rey