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 202486 - Autocompletion for boost::tr1::shared_ptr doesn't work
Summary: Autocompletion for boost::tr1::shared_ptr doesn't work
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Completion (show other bugs)
Version: 7.0
Hardware: All All
: P2 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-22 11:38 UTC by dnikitin
Modified: 2011-09-30 09:22 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
test case (109.50 KB, application/x-tar)
2011-09-22 17:00 UTC, Vladimir Voskresensky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dnikitin 2011-09-22 11:38:25 UTC
Product Version: NetBeans IDE 7.0.1 (Build oss-platform-build-66-on-20110921)
Java: 1.6.0_23; Java HotSpot(TM) 64-Bit Server VM 19.0-b09
System: Linux version 2.6.32-21-generic running on amd64; UTF-8; en_US (nb)
----------------------------------------------------------------

open source file from bug201811

codecompletion for  boost::tr1::shared_ptr does not work.

but it works in oss-platform-build-59, so it's regression.
Comment 1 Vladimir Voskresensky 2011-09-22 16:31:15 UTC
It's not a regression, it's instability caused by random ordering of libraries.
I mean:
std ns could be from boost or from /usr/include/c++/4.1.2
if the latest was chosen => no tr1 in it
if the first => tr1 will be found

closing and reopening project with clean userdir sometimes shows all as fine, sometimes with errors
Comment 2 dnikitin 2011-09-22 16:55:41 UTC
Should I reopen bug201811 because Code assistance may randomly not to work correctly?
Comment 3 Vladimir Voskresensky 2011-09-22 17:00:27 UTC
Created attachment 111058 [details]
test case

open App project and in main file either NS1::NS2 or NS1::NS3 is unresolved
Comment 4 Vladimir Voskresensky 2011-09-22 17:04:22 UTC
(In reply to comment #2)
> Should I reopen bug201811 because Code assistance may randomly not to work
> correctly?
I would say no. Because fix done for bug201811 solves code completion for variables defined as
boost::tr1::shared_ptr var;
and used as 
var.x

 while this bug is about sometimes randomly shown tr1 as unresolved (or missed tr1 in completion of std::)
Comment 5 dnikitin 2011-09-22 17:07:59 UTC
NB: 
Let tr1 is not found.

Does Code Assistance->Reparse Project solve problem? It seems it does, but
codecompletion doesn't start working.
Comment 6 Vladimir Voskresensky 2011-09-22 17:11:38 UTC
(In reply to comment #5)
> NB: 
> Let tr1 is not found.
> 
> Does Code Assistance->Reparse Project solve problem? It seems it does, but
> codecompletion doesn't start working.
In fact problem is just hidden, but not solved. If you close file and reopen file => error should be visible or do you have situation when hyperlink for shared_ptr works while shared_ptr is missed in completion list of std::tr1:: ?
Comment 7 Vladimir Voskresensky 2011-09-23 13:21:14 UTC
fixed:
http://hg.netbeans.org/cnd-main/rev/8ab2349f2b1c

we need synthetic ns in context of project if detected one was from library, because if ns is from project => it's libraries are always checked.
Comment 8 Vladimir Voskresensky 2011-09-23 13:21:49 UTC
this fix is needed to solve user's problem described in CR_7082062
Comment 9 Vladimir Voskresensky 2011-09-23 14:58:00 UTC
tests
http://hg.netbeans.org/cnd-main/rev/686e70de4111
Comment 10 Quality Engineering 2011-09-24 14:02:17 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/8ab2349f2b1c
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #202486  -  Autocompletion for boost::tr1::shared_ptr doesn't work
Comment 11 nnnnnk 2011-09-27 11:18:40 UTC
Reviewed. Fix is correct and safe.
Comment 12 dnikitin 2011-09-27 12:52:12 UTC
verified in NetBeans IDE Dev (Build cnd-build-5958-on-20110927)
Comment 13 Vladimir Voskresensky 2011-09-27 15:24:48 UTC
integrated into releases/release701_fixes 
http://hg.netbeans.org/releases/rev/e5ce9021e048
Comment 14 Quality Engineering 2011-09-29 22:45:57 UTC
Integrated into 'releases'
Changeset: http://hg.netbeans.org/releases/rev/e5ce9021e048
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #202486  -  Autocompletion for boost::tr1::shared_ptr doesn't work
(transplanted from 8ab2349f2b1c58752753ac416e82bb667632d7ef)
Comment 15 dnikitin 2011-09-30 09:22:28 UTC
verified in patch2 (NetBeans IDE 7.0.1 (Build 201109292036))