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 126408 - Refresh button on 'Usage' view does not work correctly
Summary: Refresh button on 'Usage' view does not work correctly
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-31 16:39 UTC by dnikitin
Modified: 2009-03-06 20:32 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dnikitin 2008-01-31 16:39:18 UTC
Product Version: NetBeans IDE Dev (Build 200801310006)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05
System: Linux version 2.6.20-16-generic running on i386; UTF-8; en_US (nb)
-----------------------------------------------------------

to reproduce:
1) run NB with fresh user dir, create Welcome project
2) invoke 'Find Usage' for argc (43:17)
==> Usage top component appears with the result. It's Ok.
3) add new empty line in source file and save changes.
4) click 'Refresh' button on 'Usage' component

==> 
java.lang.AssertionError: null object for UID DeclarationUID:KeyBasedUID on OffsDeclKey: main[f 2127-2436]
{/export1/NetBeansProjects/Welcome_17/welcome.cc; /export1/NetBeansProjects/Welcome_17N}
	at org.netbeans.modules.cnd.modelimpl.csm.VariableImpl._getScope(VariableImpl.java:278)
	at org.netbeans.modules.cnd.modelimpl.csm.VariableImpl.getScope(VariableImpl.java:243)
	at
org.netbeans.modules.cnd.modelimpl.impl.services.ReferenceRepositoryImpl.getDeclarationScope(ReferenceRepositoryImpl.java:335)
	at org.netbeans.modules.cnd.modelimpl.impl.services.ReferenceRepositoryImpl.getReferences(ReferenceRepositoryImpl.java:123)
	at org.netbeans.modules.cnd.refactoring.plugins.CsmWhereUsedQueryPlugin.processQuery(CsmWhereUsedQueryPlugin.java:148)
	at org.netbeans.modules.cnd.refactoring.plugins.CsmWhereUsedQueryPlugin.prepare(CsmWhereUsedQueryPlugin.java:86)
	at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare(AbstractRefactoring.java:380)
	at org.netbeans.modules.refactoring.api.AbstractRefactoring.prepare(AbstractRefactoring.java:202)
	at org.netbeans.modules.refactoring.spi.impl.ParametersPanel$Prepare.run(ParametersPanel.java:765)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Comment 1 dnikitin 2008-01-31 16:44:05 UTC
Sometimes, after step 4) the assertion is not thrown but Usages  view is empty:
'Usages of Variable argc: [0 occurrences]'
Comment 2 Vladimir Voskresensky 2008-02-18 17:01:47 UTC
fixed asserts
it's better to use new query instead of Refresh in most cases (even in Java)

log: 
http://hg.netbeans.org/main?cmd=changeset;node=59ded0449f99
Comment 3 dnikitin 2008-02-26 13:40:52 UTC
Verified in NetBeans IDE Dev (Build 200802251204)
Comment 4 dnikitin 2009-02-25 12:01:26 UTC
Product Version: NetBeans IDE Dev (Build 200902231810)
Java: 1.6.0_05; Java HotSpot(TM) Client VM 10.0-b19
System: Linux version 2.6.20-17-generic running on i386; UTF-8; en_US

NB 6.7 M2
-------------------------------------------------------------------

empty Usage view after Refresh
Comment 5 Vladimir Voskresensky 2009-03-05 21:36:40 UTC
now it should report once about invalidated object
after cancel it shows 0 usages 
(all as in Java)
http://hg.netbeans.org/main?cmd=changeset;node=9a0409e409fc
Comment 6 Quality Engineering 2009-03-06 20:32:37 UTC
Integrated into 'main-golden', will be available in build *200903061429* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/9a0409e409fc
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: additional fix for IZ#126408: Refresh button on 'Usage' view does not work correctly