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 187070

Summary: do not use findDeclaration() and findClassifier() methods for model resolving
Product: cnd Reporter: Alexander Simon <alexvsimon>
Component: Code ModelAssignee: Alexander Simon <alexvsimon>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Solaris   
Issue Type: DEFECT Exception Reporter:
Attachments: patch

Description Alexander Simon 2010-06-02 08:00:38 UTC
Code model supports multiply declarations and definitions.
But at resolving time code model resolves declaration <--> definition by methods:
CsmProject.findDeclaration() and CsmProject.findClassifier().
It results in unpredictable resolving of correspondent declaration/definition and unpredictable parser error highlighting.
Model should use CsmProject.findDeclarations() and CsmProject.findClassifiers() and select declaration/definition by visibility containing files.
Comment 1 Alexander Simon 2010-06-02 08:08:24 UTC
Created attachment 99743 [details]
patch
Comment 2 Alexander Simon 2010-06-02 08:34:04 UTC
For example see 3 declaration/definitions of class Client_i in ACE-TAO:
ACE_wrappers/TAO/orbsvcs/tests/Time/Client_i.cpp
ACE_wrappers/TAO/examples/Simple/chat/Client_i.cpp
ACE_wrappers/TAO/performance-tests/Cubit/TAO/MT_Cubit/client.cpp
Due to random matching declaration<->definition IDE has unpredictable error highlighting and navigation.
Proposed paths fixes this problems.
But paths has a side effect: degradation of inaccuracy on boost test project.
Need an additional investigation.
Comment 3 Alexander Simon 2010-06-02 10:54:32 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/625c818ecffe
Comment 4 Quality Engineering 2010-06-03 06:13:07 UTC
Integrated into 'main-golden', will be available in build *201006030001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/625c818ecffe
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed BZ#187070 do not use findDeclaration() and findClassifier() methods for model resolving