Bug 69548 - Non-C resources not visible in C/C++ projects nature in C/C++ Project View even if Filter is set to show non- C resource
Summary: Non-C resources not visible in C/C++ projects nature in C/C++ Project View ev...
Status: VERIFIED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 critical (vote)
Target Milestone: 2.0.1   Edit
Assignee: David Inglis CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-07 18:51 EDT by Magda Bologa CLA
Modified: 2009-01-09 16:54 EST (History)
3 users (show)

See Also:


Attachments
Filter issue (112.50 KB, image/pjpeg)
2004-07-07 18:52 EDT, Magda Bologa CLA
no flags Details
Error log from my "dirty old" workspace (54.87 KB, text/plain)
2004-07-09 17:28 EDT, Brent Nicolle CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Magda Bologa CLA 2004-07-07 18:51:39 EDT
This is pretty bad defect - set severity to critical...
You are not able to see Non-C resources in C/C++ projects from C/C++ Project 
View (even if Filter is set to show non- C resource)

User might want to see different file type (other that C resources) from C/C++ 
Project view and open this resource in default editor.

As workaround user has to go to Navigator View to do this, but then switch back 
to C/C++ Projects View to see C/C++ elements (e.g. classes,e emnu,.. declared 
in a C++ file).

Steps:
1. Create C or C++ project and add a new file test.txt from the project context 
menu in C/C++ Project View

Actual: notice that the test.txt is not displayed in the C/C++ Project view 
under your project

Make sure the CDT Filter is set to show all resources (select the Filters 
option from Filter tool in C/C++ Projects View and deselect all to include 
everything in the view (see attached jpg)

Actual: stillthe test.txt is not displayed in the C/C++ Project view under your 
project

Supporting: 
- Happens with any file type 
- In projects other than C/C++ nature does not happen (e.g Java projects)

Tesetd with:
-  Eclipse Platform/Version: 3.0.0/Build id: 200406251208
- Eclipse C/C++ Development Tools/Version: 2.0.0/Build id: 200406301134
Comment 1 Magda Bologa CLA 2004-07-07 18:52:13 EDT
Created attachment 13038 [details]
Filter issue
Comment 2 Magda Bologa CLA 2004-07-08 12:07:36 EDT
Changed priority to P1 (I didn't notice that you have two fields: 'Severity' 
and 'Priority' to set.

Note that the filter worked OK with CDT v2.0.0/Build id: 20040621
Comment 3 Magda Bologa CLA 2004-07-09 12:22:26 EDT
I've tried a couple of installs (of the same build) on W2K SP3 OS), and, ON 
SOME of them, I could see (on and off) other file non-C resources, for C++ 
Managed Make projects.
Note this problem is reproducible all the time with C++ Standard Make Projects 
and (even on the same eclipse install) might appear on and off with Managed 
Make Projects
Comment 4 Magda Bologa CLA 2004-07-09 13:38:02 EDT
 I cannot give the exact steps when the non-C resources will show  up in C/C++ 
Project View and when will not show up,  since I get  these inconsistent 
behavior (e.g. C++ managed projects on and off...) :((
So far, with any of these installs  (CDT 2.0 GA 200406301134/with Eclipse GA 
200406251208 ), I get the problem  - Mainly in imported C/C++ Projects and new 
C++ Standard Make projects, but also on and off in Managed Make projects, 
especially after I add some C/C++ resources in these projects (e.g. C++ 
classes, .h, .cpp files...)

The problem is annoying (especially when it hapens on and off with some files, 
even for the same project!).
As I mentioned earlier I never ran into this with CDT v2.0.0/Build id: 
200406210818 - the CDT filter in C/C++ Project View worked OK
Comment 5 Alain Magloire CLA 2004-07-09 13:57:05 EDT
Allright let see what's wrong.
Comment 6 Alain Magloire CLA 2004-07-09 15:54:58 EDT
Ok Magda, I've hamer on this for 10 minutes
and could not reproduce it.  Or you located at Rational/Ottawa
maybe some of the IBM/Rational testers can try to reproduce it.
I'm Cc:ing brent he's usually all "gung-ho" about this type of
hard to find bugs/behaviour.  Now note I've got the head branch.
I did not have the 2.0 GA at hand .. unfortunate ... I'm trying
to find a machine here where it is install.
Comment 7 Brent Nicolle CLA 2004-07-09 17:21:43 EDT
Very easy to repro on Eclipse 3.0, CDT 2.0 GA.

Create a new Std Make Project.
Create a new file "bug.vomit" using the New File Wizard.
The new file is not visible in the C/C++ Projects view.

Close the project, reopen the project, and "bug.vomit"
is found again.  (If that's any consolation, Magda...)
Comment 8 Brent Nicolle CLA 2004-07-09 17:28:17 EDT
Created attachment 13117 [details]
Error log from my "dirty old" workspace

> Very easy to repro on Eclipse 3.0, CDT 2.0 GA.

... unless you start with a clean workspace.  ;-)
I just retried and didn't see it.

So, here's my "old workspace" error log.
Maybe that'll help shed some light.
Comment 9 Magda Bologa CLA 2004-07-10 09:09:10 EDT
The workaround to Close/re-open Project seams to work consistenly. Thanks Brent 
for the workaround :)

This is a consolation ;-)
Comment 10 Alain Magloire CLA 2004-07-12 10:57:04 EDT
> The workaround to Close/re-open Project seams to work consistenly. Thanks Brent 
> for the workaround :)

> This is a consolation ;-)

Well .. not for me 8-(
I just can not reproduce this !!!

How about if you try from a brand new workspace.
Do not use the old workspace (.i.e the old metadata).
Try eclipse with a new completely new workspace ...
Do you still see the weird behaviour ?
Comment 11 Brent Nicolle CLA 2004-07-12 11:35:31 EDT
I think what you need is two projects open,
in my case one Mgd C++ the other Std C++.
I turned off Build automatically.

1. Create a Std C++ project and a Mgd C++ project.
2. Add file "a.bug" to Std C++ project... problem occurs.

You get out of the bad state by closing and reopening the Std C++ project.
You can get back into the bad state by updating Mgd C++ project
(say by adding a new class to it).
Comment 12 Brent Nicolle CLA 2004-07-12 11:42:30 EDT
BTW, comment 11 was done with a brand new workspace.
No errors in the log, no loitering background processes.
I could even turn off the indexer in both projects,
close both, reopen std, reopen mgd, and reproduce bug.
Comment 13 Magda Bologa CLA 2004-07-12 12:49:55 EDT
I am using clean workspace or new one and get the problem :(
Comment 14 Alain Magloire CLA 2004-07-15 13:09:23 EDT
Magda,
  dinglis was able to reproduce it and comming with a propose
fix for the head.

Dave, I would recommand we move the test:
if (current == null) {
 parent = current;
}

To the 2.0.1 branch also.

Reassigning
Comment 15 David Inglis CLA 2004-07-15 13:17:26 EDT
fixed in both HEAD and branch
Comment 16 Tanya Wolff CLA 2004-08-27 14:01:54 EDT
Verified in CDT 2.0.1 build 20040826 & CDT 2.1.0 build 20040827
Magda, please update status to verified.
Comment 17 Alain Magloire CLA 2004-08-27 14:20:12 EDT
Thanks