Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Java import statement hints
Java import statement hints [message #1759764] Tue, 18 April 2017 09:35 Go to next message
Gus GF is currently offline Gus GFFriend
Messages: 6
Registered: June 2015
Junior Member
I'm learning Java and am importing a package to try out the Calendar class.
import java.util.Calendar.*;


The problem is quite often the template proposal window that comes up seems to be inconsistent and a class that I know exists is sometimes offered and sometimes not in the proposal window. Please see attached images and you will see what I mean.

Why is this and how can I correct it?

index.php/fa/29072/0/
index.php/fa/29073/0/
  • Attachment: Capture1.PNG
    (Size: 35.25KB, Downloaded 376 times)
  • Attachment: Capture0.PNG
    (Size: 44.24KB, Downloaded 383 times)


I am using Luna Service Release 2 (4.4.2) on Linux Mint 17 Cinnamon 64-bit.

[Updated on: Tue, 18 April 2017 09:36]

Report message to a moderator

Re: Java import statement hints [message #1759771 is a reply to message #1759764] Tue, 18 April 2017 11:18 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31907
Registered: July 2009
Senior Member
Yes, it seems often it wants to propose package names, and once it starts proposing package names, even typing a "." will then show only package names and not class names. After you type a "." you can hit Ctrl-space a bunch of times to cycle through the proposal types, and then it shows class. In general though, I never ever try to complete imports in this way. I just use a class in context and then complete it there, which then generated the appropriate import. So I'd suggest you get out of the habit of ever typing an import statement and trying to complete it. Just start typing the name of the class at the point where you want to use it, and complete it there...

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Java import statement hints [message #1759782 is a reply to message #1759771] Tue, 18 April 2017 13:23 Go to previous message
Gus GF is currently offline Gus GFFriend
Messages: 6
Registered: June 2015
Junior Member
Yes that seems to work and saves me having to write import statements. Thanks for the suggestion Smile

I am using Luna Service Release 2 (4.4.2) on Linux Mint 17 Cinnamon 64-bit.
Previous Topic:Permissions problems in my workspace (self-caused, self-resolved)
Next Topic:The nested constructor "new A(new B(x))"
Goto Forum:
  


Current Time: Fri Jun 18 06:55:42 GMT 2021

Powered by FUDForum. Page generated in 0.03348 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top