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.
Scenario: - Restart IDE - Create Quote sample - Open module.cc - Select 37th line and 4th column - Call context menu and select Find Usages - Select "Find All Subtypes" and Press Find - Check Usages tab ==> [3 oocurences, 3 filtred] and empty tree If I call Find Usages again, then I see 3 nodes
Created attachment 137443 [details] screenshot
looks like race condition in platform, filtering and enable filers work simultaneously: "org.netbeans.modules.refactoring.spi.impl.ParametersPanel" org.netbeans.modules.cnd.refactoring.plugins.CsmWhereUsedQueryPlugin.enableFilters(CsmWhereUsedQueryPlugin.java:454) org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare2(AbstractRefactoring.java:445) org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare(AbstractRefactoring.java:421) org.netbeans.modules.refactoring.api.AbstractRefactoring.prepare(AbstractRefactoring.java:232) org.netbeans.modules.refactoring.spi.impl.ParametersPanel$Prepare$2.run(ParametersPanel.java:1017) org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432) org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2042) "org.netbeans.modules.refactoring.spi.impl.RefactoringPanel" org.netbeans.modules.cnd.refactoring.elements.CsmRefactoringElementImpl.filter(CsmRefactoringElementImpl.java:139) org.netbeans.modules.refactoring.api.RefactoringElement.include(RefactoringElement.java:193) org.netbeans.modules.refactoring.spi.impl.RefactoringPanel$4.run(RefactoringPanel.java:785) org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432) org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2042)
bug should be fixed in NB7.4 I think
(In reply to Egor Ushakov from comment #2) > looks like race condition in platform, filtering and enable filers work > simultaneously: This is as designed. When running find usages, the results are displayed immediately when they are found. Because they are displayed, the method filter() is called, but at that time enable() has not been called yet (from Javadoc: Enable filters in the supplied {@code FiltersDescription}. This method will be called after the plugins {@code RefactoringPlugin#prepare} method is called.) I updated your plugin to change filters at the beginning of the prepare method. This should be save for cnd, as the filters are not shared between plugins. changeset : 9b5ad552df7f author : Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org> date : Wed Aug 28 12:00:00 CEST 2013 summary : #231424 - empty tree in Usages tab at first time
great, thanks!