tags:

views:

1293

answers:

4

Hey,

The problem is I cant get autocompletion to work on eclipse. Im working on the project on svn. I set up projet in eclipse by going into File->Import->Checkout As a Project->New Project Wizard. I choose Enterprise Java Application and its being downloaded. And everything seems to work fine exept I dont get autocompletion but message:"this compilation unit is not on the build path of a java project". Ive googled it but everyone says that project must be Java project. But hey it is! What is the problem?

Thanks

Update

Hey,

The catalog structure on svn looks like this:

-Project_name
  -application
     -META-INF
       application.xml
       MANIFEST.MF
  +build
  +db
  +deploy
  +dist
  +lib
  +properties
  +script
  -src
     -META-INF
        someother.xml (datasource info)
        persistence.xml
        folder hierarchy with source files (should be package)
  -web
     some folders
          .
          .
     files
       .
       .
     -WEB-INF
        faces-config.xml
        jboss-web.xml
        web.xml
     build_win.xml

How to tell eclipse where is source files folder where is application.xml and other configuration xml files? How to set it up so I can start working on this finally.. Thanks

A: 

Like the message says, is the file somewhere on the project's Java Build Path (e.g. a Source folder)?

nitind
A: 

Your source files should be in a structure with a 'package' icon in the Package Explorer view (in the menu under Window > Show View > Package Explorer or press Ctrl+3 and type pack), like this:

Java project in Eclipse

If they are not, select the folder containing your root package (src in the image above) and select Use as Source Folder from the context menu (right click).

Fabian Steeg
But it's Java Enterprise project. When I click right on any folder, there is no such thing as Use as Source Folder.
l245c4l
@l245c4l: Try doing it in the *Package Explorer* view (edited my answer to add details).
Fabian Steeg
No it doesnt work either. There is no such element in menu. Check out my question again, I updated it so there is svn project structure now. Thanks for your time.
l245c4l
A: 

Heck, I got the exact same problem and the suggested solutions didn't work. Any clues? How can I turn a folder into a source folder in Eclipse 3.5?

Ruben
A: 

Did you have your .project file in your folders?

I got the same problem. Than i realized that I didn't have the .project file.

yakup