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 40504
Collapse All | Expand All

(-)ResultView.java (+1 lines)
Lines 395-400 Link Here
395
    void setModel(ResultModel resultModel) {
395
    void setModel(ResultModel resultModel) {
396
        if (this.resultModel != null) {
396
        if (this.resultModel != null) {
397
            this.resultModel.removeChangeListener(this);
397
            this.resultModel.removeChangeListener(this);
398
            this.resultModel.close();
398
        }
399
        }
399
        
400
        
400
        this.resultModel = resultModel;
401
        this.resultModel = resultModel;
(-)ResultModel.java (+13 lines)
Lines 105-110 Link Here
105
        root = new ResultRootNode();
105
        root = new ResultRootNode();
106
    }
106
    }
107
107
108
    /** Clean the allocated resources. */
109
    public void close() {
110
        root.clear();
111
    }
108
    
112
    
109
    /** Accept nodes. Some nodes were found by engine. */
113
    /** Accept nodes. Some nodes were found by engine. */
110
    public synchronized boolean acceptFoundObjects(Object[] foundObjects) {
114
    public synchronized boolean acceptFoundObjects(Object[] foundObjects) {
Lines 311-316 Link Here
311
            setDisplayName(NbBundle.getBundle(ResultModel.class).getString("TEXT_SEARCHING___"));
315
            setDisplayName(NbBundle.getBundle(ResultModel.class).getString("TEXT_SEARCHING___"));
312
        }
316
        }
313
317
318
        /** Cleanup. */ 
319
        public void clear() {
320
            ResultRootChildren children = (ResultRootChildren)getChildren();
321
            Node nodes[] = children.getNodes();
322
            for (int i=0; i<nodes.length; i++)
323
                if (nodes[i] instanceof FoundNode)
324
                    ((FoundNode)nodes[i]).removeFromSearch();
325
            children.remove (nodes);
326
        }
314
327
315
        /** Adds founds objects to root node. */
328
        /** Adds founds objects to root node. */
316
        public void addFoundObjects(Object[] foundObjects) {
329
        public void addFoundObjects(Object[] foundObjects) {

Return to bug 40504