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.

View | Details | Raw Unified | Return to bug 232353
Collapse All | Expand All

(-)a/java.source/src/org/netbeans/api/java/source/WorkingCopy.java (-5 / +3 lines)
Lines 550-558 Link Here
550
                @Override
550
                @Override
551
                public Void scan(Tree tree, Void p) {
551
                public Void scan(Tree tree, Void p) {
552
                    if (changes.containsKey(tree) || docChanges.containsKey(tree)) {
552
                    if (changes.containsKey(tree) || docChanges.containsKey(tree)) {
553
                        boolean clearCurrentParent = false;
554
                        if (currentParent == null) {
553
                        if (currentParent == null) {
555
                            clearCurrentParent = true;
556
                            currentParent = getParentPath(getCurrentPath(), tree);
554
                            currentParent = getParentPath(getCurrentPath(), tree);
557
                            if (currentParent.getParentPath() != null && currentParent.getParentPath().getLeaf().getKind() == Kind.COMPILATION_UNIT) {
555
                            if (currentParent.getParentPath() != null && currentParent.getParentPath().getLeaf().getKind() == Kind.COMPILATION_UNIT) {
558
                                currentParent = currentParent.getParentPath();
556
                                currentParent = currentParent.getParentPath();
Lines 573-584 Link Here
573
                        } else {
571
                        } else {
574
                            super.scan(tree, p);
572
                            super.scan(tree, p);
575
                        }
573
                        }
576
                        if (clearCurrentParent) {
577
                            currentParent = null;
578
                        }
579
                    } else {
574
                    } else {
580
                        super.scan(tree, p);
575
                        super.scan(tree, p);
581
                    }
576
                    }
577
                    if (currentParent != null && currentParent.getLeaf() == tree) {
578
                        currentParent = null;
579
                    }
582
                    return null;
580
                    return null;
583
                }
581
                }
584
582

Return to bug 232353