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 177396

Summary: IndexingController.getRootDependencies() incorrectly returns empty map
Product: editor Reporter: Jan Lahoda <jlahoda>
Component: Parsing & IndexingAssignee: Tomas Zezula <tzezula>
Status: VERIFIED FIXED    
Severity: normal CC: alexvsimon, sustaining, vstejskal
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 90950    
Attachments: A prototype implementation of "Is overridden/implemented" annotations.

Description Jan Lahoda 2009-11-23 02:25:39 UTC
[recent build]

org.netbeans.modules.parsing.impl.indexing.friendapi.IndexingController.getRootDependencies() sometimes
returns incorrect empty map. To reproduce:
1. add "System.err.println("roots2Dependencies=" + roots2Dependencies.size());" into RepositoryUpdater$Controller.getRootDependencies()
to see the results. I will attach a patch that implements "Is overridden/implemented" annotations, which invokes this method when a Java file is opened
in editor.
2. Open java.source, java.editor and parsing.api modules, restart the IDE.
3. Close java.source module.
4. roots2Dependencies is "0", which is not correct, as java.editor and parsing.api modules are still open.
5. After reopening java.source module, roots2Dependencies was "15" in my case.
Comment 1 Jan Lahoda 2009-11-23 02:27:51 UTC
Created attachment 91504 [details]
A prototype implementation of "Is overridden/implemented" annotations.
Comment 2 Jan Lahoda 2009-11-24 05:17:33 UTC
Also breaks refactoring/find usages:
1. Open java.editor, java.source and parsing.api, when scan finishes, close java.editor.
2. Open ParserManager and find all usages of "parse" method - only occurrences inside parsing.api are found, occurrences in java.source are ignored.
3. Restart the IDE, perform Find Usages again - the occurrences of PM.parse in java.source are found.
Comment 3 Tomas Zezula 2009-11-25 09:35:42 UTC
Fixed in jet-main 9600fa4ed20b
Comment 4 Jiri Prox 2009-11-26 00:55:17 UTC
verified in trunk, please go on and integrate the fix into release68
thanks
Comment 5 Tomas Zezula 2009-11-26 01:55:39 UTC
Patch 1 candidate
Comment 6 Jiri Prox 2009-11-26 02:08:08 UTC
ok, I agree with patch 1 candidate. Marking as verified
Comment 7 Quality Engineering 2009-11-26 19:30:57 UTC
Integrated into 'main-golden', will be available in build *200911261400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/9600fa4ed20b
User: Tomas Zezula <tzezula@netbeans.org>
Log: #177396:IndexingController.getRootDependencies() incorrectly returns empty map
Comment 8 Jan Pokorsky 2009-12-16 03:43:47 UTC
*** Bug 178710 has been marked as a duplicate of this bug. ***
Comment 9 pgebauer 2009-12-16 09:03:34 UTC
The fix has been ported into the release68_fixes repository.
http://hg.netbeans.org/release68_fixes/rev/83a9ed7c3e9d
Comment 10 Peter Pis 2010-01-25 09:22:53 UTC
V.