Bug 305600 - Content Assist doesn't work
Summary: Content Assist doesn't work
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: All Windows Vista
: P3 normal (vote)
Target Milestone: 3.6 M7   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2010-03-11 17:25 EST by Fawzi CLA
Modified: 2010-04-26 12:18 EDT (History)
4 users (show)

See Also:


Attachments
Screen shot of Eclipse (54.76 KB, image/x-png)
2010-03-12 13:50 EST, Fawzi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fawzi CLA 2010-03-11 17:25:00 EST
Build Identifier: I20100129-1300

With the new option to edit java files using Eclipse, Content Assist doesn't work.
I associated a java file with Eclipse. When I double-click on the file from Windows, the file is opened but Content Assist does not work. It's not triggered with a "." and Ctrl+Space displays a window without any suggestions.

Reproducible: Always

Steps to Reproduce:
1.Associate a Java file with Eclipse using "--launcher.openFile" option.
2.Double-Click a Java file. Eclipse is launched and the file is opened.
3.Try using Content Assist.
Comment 1 Remy Suen CLA 2010-03-11 17:37:56 EST
If the file is not a file that's known by the Eclipse workspace, then no contextual information can be deduced from the file. This is like using 'File > Open...' to open a random file.
Comment 2 Paul Webster CLA 2010-03-11 17:52:26 EST
(In reply to comment #0)
> Build Identifier: I20100129-1300
> 
> With the new option to edit java files using Eclipse, Content Assist doesn't
> work.

Remy is correct.  Is the file in your workspace?  It seems reasonable that file would work.  If the file is not in your workspace, then you will not get code assist for most of the things you do.

PW
Comment 3 Fawzi CLA 2010-03-11 21:07:33 EST
I'm using this to simply edit a Java file so I don't have a workspace. Why is this hard to do? Other editors have been doing since the 90's.
It should be able to support Content Assist since it knows that it's a Java file.
Comment 4 Remy Suen CLA 2010-03-11 21:28:18 EST
(In reply to comment #3)
> Why is this hard to do?

JDT, please advise.
Comment 5 Olivier Thomann CLA 2010-03-12 10:54:11 EST
It works for me. I do get some code assist working. I tried on XP as I don't have a Windows Vista machine.
The compiler is not working as the builder is off, but code assist seems to work ok.
Without further details, I am afraid there is not much I can do.
Comment 6 Fawzi CLA 2010-03-12 13:50:36 EST
Created attachment 161913 [details]
Screen shot of Eclipse
Comment 7 Fawzi CLA 2010-03-12 13:51:34 EST
I'm using Vista 64.
Please take a look at the attached image.
Comment 8 Olivier Thomann CLA 2010-03-12 14:12:41 EST
Have you tried to do Ctrl + space more than once ? I'll try to find a Vista 64bits platform to try myself.
Comment 9 Fawzi CLA 2010-03-12 14:38:28 EST
(In reply to comment #8)
> Have you tried to do Ctrl + space more than once ? I'll try to find a Vista
> 64bits platform to try myself.

Yes, I have tried it.
Comment 10 Olivier Thomann CLA 2010-03-16 11:37:53 EDT
It worked for me using I20100311-1616 on Vista 64.
I opened a file with this contents:

public class X {
	public static void main(String[] args) {
	}
}

And I could get code assist working fine.
What VM are you using?

Closing as WORKSFORME.
Reopen if you can provide steps to let me reproduce this issue.
Comment 11 Fawzi CLA 2010-03-16 22:07:57 EDT
(In reply to comment #10)
> It worked for me using I20100311-1616 on Vista 64.
> I opened a file with this contents:
> public class X {
>     public static void main(String[] args) {
>     }
> }
> And I could get code assist working fine.
> What VM are you using?
> Closing as WORKSFORME.
> Reopen if you can provide steps to let me reproduce this issue.

Thanks for trying. I'me using Java 1.6 and the issue is still reproducible as you can see in the previously attached image.
Comment 12 Remy Suen CLA 2010-03-17 10:00:22 EDT
(In reply to comment #11)
> Thanks for trying. I'me using Java 1.6 and the issue is still reproducible as
> you can see in the previously attached image.

Fawzi, there are several Java 6 VMs out there with varying versions from different vendors (Sun's HotSpot, IBM, JRockit, etc.).

Please check your 'Installed JREs' preference page to see what you have listed there as well as what is being used to actually launch Eclipse.
Comment 13 Frederic Fusier CLA 2010-04-26 12:18:58 EDT
Verified for 3.6M7