-
Notifications
You must be signed in to change notification settings - Fork 57
-
Notifications
You must be signed in to change notification settings - Fork 57
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
NetBeans does not show packages or classes for secondary source directories in build/ #132
Comments
Currently, source roots are only displayed if their directory exist when being listed. I plan to fix this sometime in the future (automatically hide and display nodes as they are created or removed) but until then, you can select "Source roots/Create source roots" in the project's context menu, |
I did a full refresh of the project node after running the task that generated the build/* source directories. I also tried 'refresh project node' and 'refresh folder' on the visible source roots. The source group(s) are displayed, and there is a . but the real packages within those are not present. If I find-usages on a symbol which is referenced in one of the invisible files, netbeans finds it, and can open it from the usages view, but ctrl-shift-1 to "find in projects" does says "The document node could not be found in the projects tab." |
If the file is within the source folder and the package node itself is displayed, then I'm almost certain that it is a bug in NetBeans because that node is created by a single NB call in JavaExtensionNodes. |
If I use a netbeans-ant project, and add these dirs to project.xml as extra source dirs, it works (mostly) fine. Restarting netbeans cold does not cause a refresh. |
Does you path contain a symbolic link? |
No. It's entirely simple. inherit-main-java is created by a Sync task right before compileJava, so the filesystem looks as trivial as possible to netbeans - I'm copying the sources around rather than linking to a single copy. But once it's created, it's a simple, regular directory with files in it, just like any other. |
This issue is rather strange, can you provide a very simple example project which I can use to reproduce the issue? |
I will try. Leave it with me, please, and thank you for your attention. |
I have a similar issue within RxJava under NetBeans IDE 8.0 (Build 201403101706). The rxjava-core works but when I open any of the sub projects such as rx-java-contrib/rxjava-string, all the source files are marked with error and opening them shows it can't find the classes from rxjava-core. Running the clean & build on the root however succeeds. |
I can confirm the very same behavior. I generate sources to build/generated-sources and the corresponding node in the project explorer stays empty as in above screenshot. If I change the path where the files are generated to src/generated-sources it will be able to show the files, so this must somehow be linked to placing the files in build/. |
This should be fixed in master (reopen if anyone still experiences this issue). |
I have lots of generated sources in build/generated-sources/[...]. Netbeans cannot show the packages or sources in these build/* directories, although they do work in the src/* directories.
Examples of plugins which generate these build/generated-sources directories include gradle-velocity-plugin, gradle-sablecc-plugin, gradle-jaxb-plugin, and so forth.
This may be related to #130 but I've raised it separately, as it's quite a distinct bug: The sources aren't shared, and they are within the project root.
The text was updated successfully, but these errors were encountered: