This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 80317

Summary: Class View displays item from another project
Product: cnd Reporter: Maria Tishkova <mromashova>
Component: NavigationAssignee: Alexander Simon <alexvsimon>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P1    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Maria Tishkova 2006-07-14 15:30:43 UTC
NetBeans 5.0 and cnd  from
http://smetiste.czech.sun.com/builds/cdp/promo_f/latest/installers/ for July
14th were used

OS: solaris x86 (sqao25)

Steps to reproduce:

1. Run netbeans with fresh user dir
2. Create Makefile project for litesql (add source folders src and include)
3. Create Welcome sample project with the same project location litesql project has
4. Wait paring is finished
5. Open Class View -> looks OK
6. Open welcome.h header file and add the following lines:
class Test{
public:
 int g;
} 
save welcome.h file --> main function is doubled in class view
7. Open datetime.cpp file from folder library of litesql project -> Look at
class view for Welcome project: namespace litesql is appeared!!!

And if you will now open files from litesql project all declaration from opened
file will be appeared in Welcome project node of Class View. Even if close Class
View and open it again it will be still broken for Welcome project.
Comment 1 soldatov 2006-08-15 10:24:12 UTC
I can reproduce it more simple way:

- Create "Args" sample project
- Select "printf" function in args.c file
- Press Alt-g (hyperlink)
- Open Class View tab
==> Class View contain items from stdio.h (stdio_iso.h) into "Args" node
- Move cursor at 32-th line, type "pr" and press ctrl-space (code completion)
==> Code Comletion list contain 2 "printf()" items
Comment 2 Alexander Simon 2006-09-07 15:20:03 UTC
fixed by:
 - new method resolveFile for CsmModel
 - moved responsibility on resolving file from CsmUtilities to ModelImpl

CVS log:
Checking in modelutil/src/org/netbeans/modules/cnd/modelutil/CsmUtilities.java;
/shared/data/ccvs/repository/cnd/modelutil/src/org/netbeans/modules/cnd/modelutil/CsmUtilities.java,v
 <--  CsmUtilities.java
new revision: 1.2.2.2; previous revision: 1.2.2.1
done
Checking in
modelimpl/src/org/netbeans/modules/cnd/modelimpl/csm/core/ModelImpl.java;
/shared/data/ccvs/repository/cnd/modelimpl/src/org/netbeans/modules/cnd/modelimpl/csm/core/ModelImpl.java,v
 <--  ModelImpl.java
new revision: 1.2.2.2; previous revision: 1.2.2.1
done
Checking in modelapi/src/org/netbeans/modules/cnd/api/model/CsmModel.java;
/shared/data/ccvs/repository/cnd/modelapi/src/org/netbeans/modules/cnd/api/model/CsmModel.java,v
 <--  CsmModel.java
new revision: 1.2.2.2; previous revision: 1.2.2.1
done