Bug 288746 - Nodes disappear from the PExplorer C++ element tree on opening a class nested within a namespace
Summary: Nodes disappear from the PExplorer C++ element tree on opening a class nested...
Status: ASSIGNED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 6.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-07 08:46 EDT by Pavan V CLA
Modified: 2020-09-04 15:25 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pavan V CLA 2009-09-07 08:46:58 EDT
1. Create a C++ class with the following contents

#ifndef SIMPLECLASS_H_
#define SIMPLECLASS_H_

namespace NSpace{
class SimpleClass {
	class{
          int i;
	};
};
}

#endif /* SIMPLECLASS_H_ */

2. On the project explorer open the NSpace node and double click and open the SimpleClass.h file.

3. Close the file

4. Note that the NSpace node has collapsed. Try to open it now

5. Note that no children are listed under the node now.

This issue is seen only when an anonymous class is nested within the class. If I name the class, I don't see this issue.
Comment 1 Anton Leherbauer CLA 2009-09-10 09:18:47 EDT
(In reply to comment #0)
> 4. Note that the NSpace node has collapsed. Try to open it now

I cannot exactly reproduce this behavior, but I see that the nodes in the PE are somewhat stale as soon as you close the editor.  so, e.g. it is not possible to expand a node when the editor is closed and double clicking the node does not position to the element.
Comment 2 Pavan V CLA 2009-09-11 08:26:18 EDT
Agree, it doesn't happen always. But like you mentioned, unable to expand the node after the action. 

Our product has dependencies on the ICElement structure, and from time to time, we see that the CElementInfo object (cached as part of the ICElement structure) returns a wrong/stale state of the ICElement object (getChildren call on an ICelement object returns an empty array at times when there are children present). Feel, these issues may be related. 

I had raised another related issue #283821, which talks about the same issue.