diff -r f387e9b341e3 openide.text/src/org/openide/text/CloneableEditorSupport.java --- a/openide.text/src/org/openide/text/CloneableEditorSupport.java Wed Sep 10 14:10:47 2008 +0200 +++ b/openide.text/src/org/openide/text/CloneableEditorSupport.java Fri Sep 12 16:44:20 2008 +0200 @@ -520,8 +520,9 @@ switch (documentStatus) { case DOCUMENT_NO: documentStatus = DOCUMENT_LOADING; - - return prepareDocument(false); + Task t = prepareDocument(false); + setDoc(getDoc(), false); + return t; default: @@ -558,7 +559,7 @@ final StyledDocument[] docToLoad = { getDoc() }; if (docToLoad[0] == null) { docToLoad[0] = createStyledDocument(kit); - setDoc(docToLoad[0], false); + setDoc(docToLoad[0], true); // here would be the testability hook for issue 56413 // (Deadlock56413Test), but I use the reflection in the test @@ -717,7 +718,9 @@ return redirect.openDocument(); } synchronized (getLock()) { - return openDocumentCheckIOE(); + StyledDocument doc = openDocumentCheckIOE(); + setDoc(doc,false); + return doc; } } @@ -801,7 +804,9 @@ } try { - return openDocumentCheckIOE(); + StyledDocument doc = openDocumentCheckIOE(); + setDoc(doc,false); + return doc; } catch (IOException e) { return null; }