Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 317652

Summary: The source folder cannot be a nested folder of the project
Product: [Tools] CDT Reporter: pizhou <pizhoupeter>
Component: cdt-coreAssignee: Project Inbox <cdt-core-inbox>
Status: ASSIGNED --- QA Contact: Jonah Graham <jonah>
Severity: normal    
Priority: P3 CC: elaskavaia.cdt, jamesblackburn+eclipse
Version: 6.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
The source folder as a nested folder none

Description pizhou CLA 2010-06-23 01:52:24 EDT
Build Identifier: 6.0.0.200909110608

When the source folder is a nested folder of the project, some source files cannot be shown correctly in the project explorer.

Reproducible: Always

Steps to Reproduce:
1.  Create a Hello World C++ project "bb"
2.  The source folder by default is "src", create another source folder "testmethod/src" with the source folder wizard.
3. In the project explorer, drag and drop "bb.cpp" in source foler "src" to "testmethod/src".
4. Delete the source folder "src".
5 . Right click on the source folder "testmethod/src" in project explorer, not the folder and create a source file "aa.cpp".
6.  But the file "aa.cpp" does not show as a child of the source folder "testmethod/src".
7. If you build the project, however,  the project explorer will be refreshed, and "aa.cpp" now is shown as a child of the source folder "testmethod/src".

I debugged the code, it seems that:
1. The class "DeltaProcessor" doesn't handle the  resource change event properly.
2.  When building the project, the builder "Scanner Configuration Builder" refreshes the model CModelManager.

Also, I'd like to know if this behavior (a source folder "testmethod/src") is supported by CDT.
Comment 1 Andrew Gvozdev CLA 2010-06-23 09:42:01 EDT
I followed your steps but cannot reproduce it neither in 7.0 nor in 6.0.0. aa.cpp appears under testmethod/src after step 6 for me like that:
- bb
  - testmethod/src
    + aa.cpp
    + bb.cpp
Comment 2 Elena Laskavaia CLA 2010-06-23 10:13:12 EDT
I think it is refresh problem. Not related to source folder.
Currently my refresh on notifications totally broken - if I create new file or
move file from other place it does not refresh at all.
Comment 3 pizhou CLA 2010-06-23 22:31:03 EDT
Created attachment 172566 [details]
The source folder as a nested folder
Comment 4 pizhou CLA 2010-06-23 22:32:41 EDT
I have just downloaded the eclipse c/c++ IDE for Galileo eclipse-cpp-galileo-SR2-linux-gtk-x86_64.tar.gz, My OS is:Red Hat Enterprise Linux Client release 5.3 (Tikanga)

This issue can be reproduced.

In the uploaded attachment, aa.cpp is just created and is opened in the editor, but is not shown as a child of the source folder "testmethod/src" in the left project explorer.






(In reply to comment #1)
> I followed your steps but cannot reproduce it neither in 7.0 nor in 6.0.0.
> aa.cpp appears under testmethod/src after step 6 for me like that:
> - bb
>   - testmethod/src
>     + aa.cpp
>     + bb.cpp
Comment 5 pizhou CLA 2010-06-24 04:31:58 EDT
If aa.cpp is shown in the project explorer, you can delete it and you may find that it is still displayed as a child of the source folder "testmethod/src", which is not expected.
(In reply to comment #1)
> I followed your steps but cannot reproduce it neither in 7.0 nor in 6.0.0.
> aa.cpp appears under testmethod/src after step 6 for me like that:
> - bb
>   - testmethod/src
>     + aa.cpp
>     + bb.cpp
Comment 6 pizhou CLA 2010-06-29 02:56:01 EDT
I'd like to know first that if it is a bug or this behavior(creating a source folder as a nested folder in the project) is not supported. 

(In reply to comment #2)
> I think it is refresh problem. Not related to source folder.
> Currently my refresh on notifications totally broken - if I create new file or
> move file from other place it does not refresh at all.
Comment 7 James Blackburn CLA 2010-06-29 05:25:58 EDT
I can reproduce an oddity as well using the otlined steps.  After step 6 the file shows up under the source folder, but not under the non-source folder...
Comment 8 James Blackburn CLA 2010-06-29 05:27:03 EDT
Doesn't seem major though as it looks like an odd UI issue.