Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Content assist in Eclipse Kepler unreliable.
Content assist in Eclipse Kepler unreliable. [message #1104908] Mon, 09 September 2013 00:53 Go to next message
Ash H is currently offline Ash H
Messages: 3
Registered: September 2013
Junior Member
I've just recently installed Eclipse (Kepler) on my Windows 7, 64bit machine, (no prior version of Eclipse installed). I've been extremely surprised and impressed with the IDE so far, for the price it is just excellent.

I've just got back into Java development after many years, therefore I'm going to to rely heavily on Content Assist to learn the Java framework libraries and API. But it is not working reliably.

I've configured Content Assist to Auto display (no Ctrl-Space required) and on a delay of 0ms. It is triggered on the entry of a '.' or a '('.

To reproduce my issue, in a java code file type:

Color c = new Color(


Result: No Content Assist window is displayed. Content assist also no longer works when typing the '.' after an object.

If I save and close the file, and then re-open it, Content Assist works again. That is until I type the same code above.

Note: The same problem does not happen if I try to create say a Date object. Very strange.

For newcomers to Java this is quite painful as Code Assist is a valuable way to learn the API.

Just wanted to get some feedback here first, before I consider raising a bug.

Re: Content assist in Eclipse Kepler unreliable. [message #1105202 is a reply to message #1104908] Mon, 09 September 2013 09:59 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1217
Registered: July 2009
Senior Member
Have you added the import for the specific Color class that you are using prior to attempting content assist? Content assist needs to be able to identify the specific type in order to provide suggestions.
Re: Content assist in Eclipse Kepler unreliable. [message #1105512 is a reply to message #1105202] Mon, 09 September 2013 20:31 Go to previous messageGo to next message
Ash H is currently offline Ash H
Messages: 3
Registered: September 2013
Junior Member
David, I'm using the standard Color class. i.e. java.awt.Color. The Date class I mentioned is from java.util.Date.

I've also tested this with a very basic custom class that contains nothing but a constructor with one integer parameter and a method. Content assist works fine on this class constructor until I try creating an instance of the java.awt.Color class (as above). After that Content Assist doesn't work on any class.

It seems to be a "per file" issue. If I tab to another open file and try the same procedure, Content Assist initially works until I try typing same Color constructor code. As soon as I do that Content Assist stops working for that file only.
Re: Content assist in Eclipse Kepler unreliable. [message #1105960 is a reply to message #1105512] Tue, 10 September 2013 09:55 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1217
Registered: July 2009
Senior Member
Is there an import statement for java.awt.Color or java.awt.* at the top of your source file. This is required for the Color class to be resolved.
Re: Content assist in Eclipse Kepler unreliable. [message #1125582 is a reply to message #1104908] Fri, 04 October 2013 13:17 Go to previous message
K Dakshin is currently offline K Dakshin
Messages: 1
Registered: October 2013
Junior Member
Hi, I'm new to Java too, and for me the problem is when I use the import function.

If I want to import java.io.InputStreamReader, when I type "java.io." it just displays one item, "java.io.*"

When I press Ctrl+Space thrice, it shows a list containing all the classes inside java.io, which is what I want when I type "java.io."

Is there any way to make this appear at first instead of having to press it thrice?

Thanks in advance!
Previous Topic:Hamcrest conflict with JUnit runner - signed/unsigned jars
Next Topic:Java int[] Array [I@24a1a602]
Goto Forum:
  


Current Time: Mon Oct 07 06:07:07 EDT 2013

Powered by FUDForum. Page generated in 0.02251 seconds