Does XCode's codesense work outside of a project?

63 Views Asked by At

I like to edit .java files in Xcode because it is simple. I don't have to start a new project or anything in order to edit my .java files. However, I would like to have codesense work (alt+click on a class name for example) in the document window. I alt+click a class name, but it says no symbol found. I downloaded eclipse and found the same problem. In eclipse it works great, but only if I set up a whole project.

I know it might seem old-fashioned, but I'm just beginning java programming. For beginning projects, it is good to learn how to compile a .java file and run its class file from the command line in terminal. I prefer this way for now, but I really need the little box with class method suggestions to pop-up...

Any suggestions?

1

There are 1 best solutions below

1
On BEST ANSWER

Any tool which does this will need you to set up a project because it works by indexing your project. Xcode looks into the source, headers, and frameworks that you use in your project to find the definitions and declarations of the symbols in your code. Without the project that tells it which source, headers, and frameworks to look into, it can't work. So no, there's no way to do that with Xcode, and I doubt there would be with any other tool for the same reason.