I created a pkg-config-0.25 project:
- get source code
- created a build subdirectory inside
- configured and built it in this directory
(I did all above in console)
Then, in IDE:
- create a project from binary
- pointed to that binary, pressed finish
The project is created. Project metadata by default is put in NetBeansProject.
Project view contains pkg-config-0.25 files.
But files view contain only nbproject!
In fact source root is added to project.
See Project properties->General->Source Folders.
Or close and open the project.
It seems something wrong in source root listeners.
Please reevaluate bug.
it looks like a duplicate of the bug #197134
Yes, the effect seems to be the same as in bug #197134. However bug #197134 was fixed in 2011, and since that time this defect did not repeat. At least I checked NB 8.0 and 8.1. So this looks like regression in dev.
Now after your comment I also see that source root is shown in Project Properties (although for me as a user this does not matter - while its absence in Files view does).
What makes me think that it's probably not a P2 is that after reopen both roots are shown.
I don't yet know the fix, but I do know the exact change set that led to this behaviour. It's
user: Tomas Zezula <firstname.lastname@example.org>
date: Fri Jun 17 10:56:23 2016 +0200
summary: #255220:org.openide.explorer.view.TreeView$ExplorerTree$GuardedActions.<init>: LowPerformance took 25968 ms.
This can be reproduced even easier:
- create a sample C/C++ project (I tried Welcome)
- go to project properties, "General" category, add a folder that resides outside of the project to "Source Folders" field, press "OK"
- Files pane does not contain this folder
After the project is reopened, File pane shows this folder OK
Created attachment 161908 [details]
I thought this (adding listeners not after, but *before* getting source groups) will fix, but it didn't
Tomas, can you have a look, please, why your commit could break source roots.
Fixed jet-main b815ca9972c6
Please verify, I will transplant the fix into nb 8.2.
Thank you so much for fixing this! I verified your changeset (although not in jet-main, but in cnd-main context - it takes too long to clone entire netbeans repo). It works fine.
Thanks a lot Vladimir!
I will transplant the fix into NB 8.2
Integrated into 'main-silver', will be available in build *201609130002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Tomas Zezula <email@example.com>
Log: #267258:Sources are absent in files view for a newly created project from binary
Transplanted into NB 8.2 e884c15ca7e1