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

(-)src/org/openide/actions/NewTemplateAction.java (-2 / +12 lines)
Lines 439-444 Link Here
439
        }
439
        }
440
        
440
        
441
        public DataFolder getRootFolder () {
441
        public DataFolder getRootFolder () {
442
            if (rootFolder == null) {
443
                // if rootFolder is null then initialize folder
444
                doSetKeys ();
445
            }
442
            return rootFolder;
446
            return rootFolder;
443
        }
447
        }
444
               
448
               
Lines 514-525 Link Here
514
        /** Updates the keys.
518
        /** Updates the keys.
515
         */
519
         */
516
        private void updateKeys () {
520
        private void updateKeys () {
521
            // post task, because updateKeys might be in Mutex.readAccess
517
            RequestProcessor.getDefault().post(new Runnable() {
522
            RequestProcessor.getDefault().post(new Runnable() {
518
                public void run() {
523
                public void run() {
519
                    rootFolder = wizard.getTemplatesFolder ();
524
                    doSetKeys ();
520
                    setKeys (rootFolder.getNodeDelegate ().getChildren ().getNodes (true));
521
                }
525
                }
522
            });
526
            });
527
        }
528
        
529
        // don't call from Mutex.readMutex
530
        private void doSetKeys () {
531
            rootFolder = wizard.getTemplatesFolder ();
532
            setKeys (rootFolder.getNodeDelegate ().getChildren ().getNodes (true));
523
        }
533
        }
524
        
534
        
525
        /** Fired when the order of children is changed.
535
        /** Fired when the order of children is changed.

Return to bug 31019