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.
Summary: | [72cat] Reduced tree view for projects collapse the folder after any file operation | ||
---|---|---|---|
Product: | platform | Reporter: | Michel Graciano <hmichel> |
Component: | Nodes | Assignee: | Jaroslav Tulach <jtulach> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | crazyjavahacking, everflux, jglick, markiewb |
Priority: | P3 | ||
Version: | 7.2 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 53192 | ||
Attachments: | Test case |
Description
Michel Graciano
2012-04-27 13:09:11 UTC
There do seem to be some cases where nodes are collapsed unnecessarily, though not in all cases. Can investigate. Created attachment 118894 [details]
Test case
Seems to be a bug in ChildFactory (or ultimately perhaps Children.Keys); after refreshing keys so that the new key list overlaps the old one, some - but not all - of the nodes are spuriously recreated: junit.framework.ComparisonFailure: expected:<[1, 2, 3, []4]> but was:<[1, 2, 3, [2, 3, ]4]> at org.openide.nodes.ChildFactoryTest.testNodeRecreation(ChildFactoryTest.java:342) Note that calling refresh(true) makes the test pass, as does passing false to Children.create. Holding strong refs to created Node's does not make the test pass, nor does calling c.addNotify(), nor does making ChildrenArray.map nonweak. *** Bug 213087 has been marked as a duplicate of this bug. *** ergonomics#6126d7fd456d I should probably mark the resolution "invalid" as I fixed the behavior by fixing the test... Then it is still a bug that nodes are unnecessarily recreated when you do not batch the key additions. The real ChildFactory, for reduced tree view, intentionally calls add(...) rather than addAll(...), so that nodes are displayed incrementally as they are computed. Anyway you cannot close a bug about an actual user problem by writing a test. If there is something in java.project which is implemented incorrectly according to documented behavior in openide.nodes, explain what that is and reassign, so the problem can be fixed. Integrated into 'main-golden', will be available in build *201206150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/6126d7fd456d User: Jaroslav Tulach <jtulach@netbeans.org> Log: #211847: [72cat] Reduced tree view for projects collapse the folder after any file operation If you batch whole result and add it to the parameter of createKeys at once, the refresh behaves as expected. It is IMHO a high visible usability problem. I hope it can be fixed for 7.3. *** Bug 217833 has been marked as a duplicate of this bug. *** It is very annoying that refactoring (including Rename refactoring, Move refactoring and sometimes Remove class as well) is always closing package nodes in Reduced Tree package view. I used to close not necessary package nodes when focusing on code and this "behavior" is very annoying making the Reduced Tree package view almost unusable (for big nested package hierarchies). ergonomics#0df9cb6108b7 Integrated into 'main-golden', will be available in build *201211090001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/0df9cb6108b7 User: Jaroslav Tulach <jtulach@netbeans.org> Log: #211847: Prevent incremental refresh when the nodes are already computed and the size is lower than expected v. Build 20121109-beb7bf2aea3f |