Most Java developers that use Eclipse are aware of (and probably thankful for) its content assistance. That is the little popup that comes up and helps us with method names, parameter lists, fields, etc..
By default, Eclipse automatically brings up content assist after a few milliseconds when you type in the “.” (dot) after an object reference. In the example above, I typed in “this.” and after 200 milliseconds I was prompted by the content assistant (also known as code assist or code completion in some other environments/tools). You can also invoke content assist manually by hitting CTRL-Space (again a default setting) anywhere in a text editor.
Configuring Content Assist Auto Activation
You can configure the default content assist settings. From the Window option on the menu bar in Eclipse, select Preferences.
This causes the Preferences window to appear. Locate Java -> Editor -> Content Assist in the preferences options on the left in this window. By selecting this option in the Preferences window, you are presented with a number of Content Assist options. At the bottom of the options, notice the delay and activation trigger.
Content Assist in Eclipse for .NET/Visual Studio Developers
I had a number of .NET students in a recent Java class. They are more accustomed to “code complete” as they refer to it (also known as IntelliSense). In their world, code completion is not limited to things after the “dot.” They wanted to see content assistant automatically help any place in the code. For example, in the Visual Studio picture below, I type any character (like the character “u” shown) and up pops IntelliSense.
We found a way to do this with the auto activation preferences in Eclipse. Simply type in all characters – that is “.abcdefghijklmnopqrstuvwxyz” – in the Auto activation triggers for Java field. This causes content assist to fire for any character you enter into the editors. Java regulars might find this to be too much interference, but .NET developers will find it more to their way of developing and quite helpful as they learn the Java language and APIs.
If we can help you learn any Java or .NET technology, give us a ring. Intertech has been training people in software development technologies for 20+ years. See our training curriculum at http://www.intertech.com/Courses/CourseCategory.aspx.