-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto completing from default JDK packages #16
Comments
Actually it already supports most of the default JDK packages, as you can see in the animation below (java.util.ArrayList at the end of animation). For method call autocompletion to work, you will have to enable the 'load class members' setting and just be patient because class loading is still unoptimized (see issue #13). JDK library is quite large and loading it may take a while, and project classes and libraries are loaded before JDK libraries. It may also be that the package failed to load JDK libraries on your system for some reason. In that case check the console log for errors: View -> Developer -> Developer Tools. |
You're wright. There exist some errors:
I believed the "./" definition of project path was understood by .classpath as pointed: |
I reorganized my .classpath anyway independent of the .classpath it generates an erroneous classpath by what I can see:
My .classpath:
If it help you I'm on Linux |
I've tested the package only on OS X and Windows so far :) I published a small patch that allows line breaks in a .classpath file and does some additional formatting. Please update and try if it fixes your problem. But the main problem might be with your classpath, because as far as I know the * should be used only for directories that contain jar files. So try one of the alternatives below. If .classpath file is located in /home/romulo/PhenoGlad/Github(git)/PhenoGlad and the absolute path used in classpath is /home/romulo/PhenoGlad/Github(git)/PhenoGlad/PhenoGlad(java)/.... then: ./PhenoGlad(java)/src/main/java/phenoglad/core: or if the correct absolute path really is /PhenoGlad(java)/.... then: /PhenoGlad(java)/src/main/java/phenoglad/core: You can also leave out all src-directories from classpath if they do not contain any .class files. |
I just noticed that "phenoglad" and "core" are package names. Classpath should only contain root directories, not package directories. So try these instead: ./PhenoGlad(java)/src/main/java: or /PhenoGlad(java)/src/main/java: |
I've tried both and still getting errors:
I'm not sure why, here is the tree view: updateAparently this work, even phenoglad being a package: ./PhenoGlad(java)/src/main/java/phenoglad: I removed I would like a lot to map packages from JavaFX, I'm thinking in putting the library in |
I tested it further, your sugestionas actually work, what happen is that, anytime I save a class with some error it become unable to find it without reopening Atom. |
Yes, you can either drop jfxrt.jar to your lib directory or reference the jfxrt.jar file directly in your .classpath file. I added a new issue for extlib support: #18 You are probably using linter-javac to compile your classes on save. It seems that linter-javac compiles classes only if none of the classes contain any errors. And once you fix the error, linter-javac will compile all classes but autocomplete-java will refresh only the class that you just saved. So it can be a bit tricky with linter-javac :/ You can get around this by running the "project refresh" command that I just implemented to the latest version. Default keybinding for it is "shift-ctrl-alt+R". |
You're wright I'm using linter-javac and your suggestion resolves it.
Result:
|
You found a bug :) I fixed it. Absolute paths should work now if you take an update. |
:) You're doing a great and quick job... Atom was in need of this package, java is a lot verbose and autocomplete is somewhat fundamental. |
Hi someone can help me, I have the next problem with Autocomplete-java: |
Is there any possibility the plugin can be aware of default JDK packages, Class, methods, etc?
The text was updated successfully, but these errors were encountered: