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

(-)CloneableEditor.java (+2 lines)
Lines 212-217 Link Here
212
                caret.setDot(cursorPosition);
212
                caret.setDot(cursorPosition);
213
            }
213
            }
214
        }
214
        }
215
	
216
	support.ensureAnnotationsLoaded();
215
    }
217
    }
216
218
217
    protected CloneableTopComponent createClonedObject() {
219
    protected CloneableTopComponent createClonedObject() {
(-)CloneableEditorSupport.java (+14 lines)
Lines 286-291 Link Here
286
                
286
                
287
        return positionManager;
287
        return positionManager;
288
    }
288
    }
289
290
    private boolean annotationsLoaded;
291
292
    void ensureAnnotationsLoaded() {
293
        if (!annotationsLoaded) {
294
	    annotationsLoaded = true;
295
            Line.Set lines = getLineSet();
296
	    Lookup.Result result = Lookup.getDefault().lookup(new Lookup.Template(AnnotationProvider.class));
297
            for (Iterator it = result.allInstances().iterator(); it.hasNext(); ) {
298
                AnnotationProvider act = (AnnotationProvider)it.next();
299
                act.annotate(lines, lookup);
300
            }
301
	}
302
    }
289
    
303
    
290
    /** Overrides superclass method, first processes document preparation.
304
    /** Overrides superclass method, first processes document preparation.
291
     * @see #prepareDocument */
305
     * @see #prepareDocument */

Return to bug 41345