I want Eclipse to automatically suggest to me all possible options, while I'm writing some variable/class name or keyword, like in Flash Develop or Visual Studio.
Is it possible?
If not, with which Java IDE can I get this?
I'm specifically asking about a way to automatically get the same thing I get using CTRL + Space, while I'm typing.
Steps:
All the commands and variables which begin with that letter are now going to appear
Go to Windows--> Preference--->Java--->content assist--->Enable auto activation---(insert ._@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ in auto activation triggers for java)
I had a similar issue when I switched from IntellijIDEA to Eclipse. It can be done in the following steps. Go to Window > Preferences > Java > Editor > Content Assist and type ._abcdefghijklmnopqrstuvwxyzS in the Auto activation triggers for Java field
Window -> Preferences -> Java -> Editor -> content assist > enter
".abcdefghijklmnopqrstuvwxyz"
in the Auto activation triggers.
It will allow you to complete your code.
See if your settings are correct also:
Window -> Preferences -> Java -> Editor -> content assist. See if the "completion inserts" is checked off along with anything else there you want to help auto complete.
Use the Ctrl+Space
shortcut for getting all possible autocomplete options available in a particular context in the editor.
Auto Complete will also allow you to insert custom code templates into the editor, with placeholders for various inputs. For instance, attempting to auto complete the word "test" in a Java editor, in the context of a class body, will allow you to create a unit test that uses JUnit; you'll have to code the body of the method though. Some code templates like the former, come out of the box.
Configuration options of interest
.
character by default. When you have just keyed in typeA.
and you expect to see relevant members that can be accessed, the auto completion list will automatically popup with the appropriate members, on this trigger.Now in eclipse Neon this feature is present. No need of any special settings or configuation .On Ctrl+Space the code suggestion is available
Pressing Ctrl+Space opens up the auto-completion dialog in Eclipse. In the Java Perspective it opens automatically after you typed a .
(normally with a short delay).
Since you asked about other Java IDE, I suggest IntelliJ by JetBrains. Just look at it: not only does it support auto completion as you type, but also it support import package once you select the auto completion.
Before someone said "Eclipse is free", note that IntelliJ has free community edition as well: www.jetbrains.com/idea/download/
Yes. If the suggestion doesn't compare automatically, then press crtl + space button.
CTRL+Space
Its simple these are the steps: 1. first go to the following settings Window -> Preferences -> Java -> Editor -> content assist -> advanced 2. there will be two boxes having checkboxes. 3. check everthing in there and click apply. 4. now ofcourse when you'll be coding there will be auto code completion feature automatically.
Source: Stackoverflow.com