Bug 438338 - Java auto-complete not working with RSE
Summary: Java auto-complete not working with RSE
Status: REOPENED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: dsdp.tm.rse-inbox CLA
QA Contact: David Dykstal CLA
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2014-06-27 03:30 EDT by Ashutosh Mantry CLA
Modified: 2014-07-16 01:45 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ashutosh Mantry CLA 2014-06-27 03:30:19 EDT
Hi,
My local system is Mac and remote system is linux. There is a maven project in my remote system. When I try to use RSE on my local system and ssh to remote linux, then the auto-complete for that maven project does not work. It contains java files in src folder. It says the compilation unit is not in the build path of java project. Please help me fix this. It urgent.
Thanks
Comment 1 Ashutosh Mantry CLA 2014-07-01 02:01:07 EDT
Please help me with this. Its urgent
Comment 2 Sarika Sinha CLA 2014-07-01 04:22:14 EDT
Can you elaborate the problem with the help of the guideline ?

http://www.eclipse.org/eclipse/platform-text/development/bug-incomplete.htm

Which view/editor you are trying to use where auto complete is not working ?
Comment 3 Ashutosh Mantry CLA 2014-07-01 11:04:10 EDT
Ok, so when i go to RSE perspective(under Window-> Open Perspective) and connect to remote linux box, it lists the files present in my root box under My Files. Now there is a maven project there. The source file in that maven project is a java file. I am able to edit that file and the changes are reflected in the remote box as well. However, the auto-complete feature for that java file is not working. It says compilation unit is not in the build path of java project.
I even tried to edit a simple java file ( and not a java file under maven project) but the auto-complete still does not work.
Please let me know if you require some other info.
Thanks
Comment 4 Dani Megert CLA 2014-07-02 05:21:57 EDT
Java tooling works on a Java project. It does not work on a *.java file that's outside such a project.
Comment 5 Ashutosh Mantry CLA 2014-07-02 06:32:55 EDT
That should not be the case, because referring to my comment#3 "I even tried to edit a simple java file ( and not a java file under maven project) but the auto-complete still does not work."
Even if I create a simple java project in my remote linux box, and I do RSE from my local box to remote box, even then the auto-complete does not work.

Secondly, when I install eclipse in my remote linux box then auto-complete works for a *.java file under a maven project, differing from comment#4.

Thanks
Comment 6 Dani Megert CLA 2014-07-02 07:45:56 EDT

*** This bug has been marked as a duplicate of bug 251496 ***
Comment 7 Ashutosh Mantry CLA 2014-07-02 08:12:01 EDT
I have already tried all the steps mentioned in the duplicate bug and then at the end I have raised this ticket.
The problem does not seem to go. I have Dynamic Languages Toolkit - Core framework as well as Remote Development Support.
I will again mention the steps that I am doing:
Remote linux box: ABC
First I switch over to RSE perspective > New Connection
ABC appears under remote Systems.
ABC > Sftp files > My Home > Random_project

Random_project is a simple java project having Random_project.java. When I open this and try to edit it, the auto-complete does not work. It says "This compilation unit is not under build path of java project"

Thanks
Comment 8 Ashutosh Mantry CLA 2014-07-11 08:47:35 EDT
Any updates here ??
Thanks
Comment 9 David McKnight CLA 2014-07-14 16:24:33 EDT
(In reply to Ashutosh Mantry from comment #8)
> Any updates here ??
> Thanks

When using RSE to edit remote files, note that the remote folders are not projects.  The project associated with remote files is a hidden one called the "RemoteSystemTempFiles" project.  I'm guessing that the java content assist probably requires that the containing project has a java nature.  What happens if you add the java project nature to the RemoteSystemTempFiles project?
Comment 10 Ashutosh Mantry CLA 2014-07-15 03:49:32 EDT
I have already tried that. I added the following to .project file under RemoteSystemTempFiles project:
<nature>org.eclipse.jdt.core.javanature</nature>
But this does not seem to work.
It does not have any effect.
Thanks
Comment 11 David McKnight CLA 2014-07-15 10:24:35 EDT
(In reply to Ashutosh Mantry from comment #10)
> I have already tried that. I added the following to .project file under
> RemoteSystemTempFiles project:
> <nature>org.eclipse.jdt.core.javanature</nature>
> But this does not seem to work.
> It does not have any effect.
> Thanks

If you want to get more than just template content assist entries, I think you'll also need a .classpath file in the RemoteSystemTempFiles project.  

For example:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
</classpath>
Comment 12 David McKnight CLA 2014-07-15 10:30:04 EDT
With that said, if you're looking for project-specific content assist support, then you should probably create an actual java project for this.  If you need to include remote source files, you can create linked folders via RSE and then later make them java source folders.
Comment 13 Ashutosh Mantry CLA 2014-07-16 01:45:25 EDT
Currently, there is no .classpath file in the RemoteSystemTempFiles project. Should I create one ? If yes, what would be its value. Is it the one mentioned in comment#11 .

It would be great if you can elaborate a bit more on your comment#12 or any steps on how it needs to be done.
Thanks