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

(-)a/openide.loaders/src/org/openide/loaders/FolderLookup.java (+4 lines)
Lines 414-419 Link Here
414
                return;
414
                return;
415
            }
415
            }
416
            
416
            
417
            if (template.getType().getSimpleName().contains("LookupProvider")) {
418
                System.err.println("trying to obtain " + template.getType());
419
            }
420
            
417
            // do not wait in folder recognizer, but in all other cases
421
            // do not wait in folder recognizer, but in all other cases
418
            if (
422
            if (
419
                !FolderList.isFolderRecognizerThread() &&
423
                !FolderList.isFolderRecognizerThread() &&
(-)a/openide.util.lookup/src/org/openide/util/lookup/ProxyLookup.java (+13 lines)
Lines 539-544 Link Here
539
         * @return the collection or set of the objects
539
         * @return the collection or set of the objects
540
         */
540
         */
541
        private Collection computeResult(int indexToCache, boolean callBeforeLookup) {
541
        private Collection computeResult(int indexToCache, boolean callBeforeLookup) {
542
            Collection c = computeResultIMpl(indexToCache, callBeforeLookup);
543
            if (this.weakL.result.template.getType().getSimpleName().contains("LookupProvider")) {
544
                System.err.print("lookup: " + this.weakL.result.proxy.getClass());
545
                System.err.println("@" + Integer.toHexString(System.identityHashCode(this.weakL.result.proxy)));
546
                System.err.println("  thread: " + Thread.currentThread().getName());
547
                for (Lookup  lkp : this.data.getLookups(false)) {
548
                    System.err.println("  delegates to " + lkp.getClass() + "@" + Integer.toHexString(System.identityHashCode(lkp)));
549
                }
550
                System.err.println("  ret: " + c);
551
            }
552
            return c;
553
        }
554
        private Collection computeResultIMpl(int indexToCache, boolean callBeforeLookup) {
542
            Collection cachedResult = null;
555
            Collection cachedResult = null;
543
            synchronized (proxy()) {
556
            synchronized (proxy()) {
544
                Collection[] cc = getCache();
557
                Collection[] cc = getCache();
(-)a/settings/src/org/netbeans/modules/settings/RecognizeInstanceObjects.java (-5 / +13 lines)
Lines 113-119 Link Here
113
        private final String path;
113
        private final String path;
114
        
114
        
115
        public OverObjects(String path) {
115
        public OverObjects(String path) {
116
            super(delegates(path));
116
            super(delegates(null, path));
117
            this.path = path;
117
            this.path = path;
118
            try {
118
            try {
119
                ModuleSystem ms = Main.getModuleSystem(false);
119
                ModuleSystem ms = Main.getModuleSystem(false);
Lines 135-141 Link Here
135
        }
135
        }
136
        
136
        
137
        @SuppressWarnings("deprecation")
137
        @SuppressWarnings("deprecation")
138
        private static Lookup[] delegates(String path) {
138
        private static Lookup[] delegates(Lookup prevFolderLkp, String path) {
139
            ClassLoader loader = Lookup.getDefault().lookup(ClassLoader.class);
139
            ClassLoader loader = Lookup.getDefault().lookup(ClassLoader.class);
140
            LOG.log(Level.FINEST, "lkp loader: {0}", loader);
140
            LOG.log(Level.FINEST, "lkp loader: {0}", loader);
141
            if (loader == null) {
141
            if (loader == null) {
Lines 157-168 Link Here
157
            } else {
157
            } else {
158
                s = path;
158
                s = path;
159
            }
159
            }
160
            return new Lookup[] {new org.openide.loaders.FolderLookup(DataFolder.findFolder(fo), s).getLookup(), base};
160
            if (prevFolderLkp == null) {
161
                prevFolderLkp = new org.openide.loaders.FolderLookup(DataFolder.findFolder(fo), s).getLookup();
162
            }
163
            return new Lookup[] {prevFolderLkp, base};
164
        }
165
        
166
        Lookup extractFolderLkp() {
167
            Lookup[] arr = getLookups();
168
            return arr.length == 2 ? arr[0] : null;
161
        }
169
        }
162
    
170
    
163
        @Override
171
        @Override
164
        public void propertyChange(PropertyChangeEvent ev) {
172
        public void propertyChange(PropertyChangeEvent ev) {
165
            setLookups(delegates(path));
173
            setLookups(delegates(extractFolderLkp(), path));
166
        }
174
        }
167
175
168
        @Override
176
        @Override
Lines 191-197 Link Here
191
        }
199
        }
192
        private void ch(FileEvent e) {
200
        private void ch(FileEvent e) {
193
            if ((e.getFile().getPath() + "/").startsWith(path)) { // NOI18N
201
            if ((e.getFile().getPath() + "/").startsWith(path)) { // NOI18N
194
                setLookups(delegates(path));
202
                setLookups(delegates(extractFolderLkp(), path));
195
            }
203
            }
196
        }
204
        }
197
205

Return to bug 232400