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

(-)/tmp/AttributesUtilities.java (-3 / +13 lines)
Lines 191-196 Link Here
191
        /** Creates a new instance of SmartAttributeSet */
191
        /** Creates a new instance of SmartAttributeSet */
192
        private Immutable(HashMap<Object, Object> attribs) {
192
        private Immutable(HashMap<Object, Object> attribs) {
193
            this.attribs = attribs == null ? new HashMap<Object, Object>() : attribs;
193
            this.attribs = attribs == null ? new HashMap<Object, Object>() : attribs;
194
            Object resolver = this.attribs.get(AttributeSet.ResolveAttribute);
195
            if(resolver instanceof AttributeSet){
196
            	setResolveParent((AttributeSet)resolver);
197
            }else{
198
            	//broken or null resolver key. Ignore (log if different class maybe ?)
199
            }
194
        }
200
        }
195
201
196
        public synchronized void setResolveParent(AttributeSet parent) {
202
        public synchronized void setResolveParent(AttributeSet parent) {
Lines 373-381 Link Here
373
            }
379
            }
374
            
380
            
375
            for(AttributeSet delegate : delegates) {
381
            for(AttributeSet delegate : delegates) {
376
                if (delegate.isDefined(key)) {
382
            	AttributeSet current = delegate;
377
                    return delegate.getAttribute(key);
383
            	while (current != null) {
378
                }
384
            		if (current.isDefined(key)) {
385
            			return current.getAttribute(key);
386
            		}
387
            		current = current.getResolveParent();
388
            	}
379
            }
389
            }
380
            
390
            
381
            return null;
391
            return null;

Return to bug 133605