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

(-)a/openide.text/test/unit/src/org/openide/text/CloneableEditorDocumentGCTest.java (+18 lines)
Lines 55-61 Link Here
55
import java.util.Date;
55
import java.util.Date;
56
import java.util.List;
56
import java.util.List;
57
import javax.swing.text.Document;
57
import javax.swing.text.Document;
58
import javax.swing.text.EditorKit;
58
import org.netbeans.junit.NbTestCase;
59
import org.netbeans.junit.NbTestCase;
60
import org.openide.text.Line.Set;
59
import org.openide.util.Exceptions;
61
import org.openide.util.Exceptions;
60
import org.openide.util.Lookup;
62
import org.openide.util.Lookup;
61
import org.openide.windows.CloneableOpenSupport;
63
import org.openide.windows.CloneableOpenSupport;
Lines 92-97 Link Here
92
94
93
    private static final Object LOCK = new Object();
95
    private static final Object LOCK = new Object();
94
    private boolean waiting;
96
    private boolean waiting;
97
    private boolean isNbLikeEditorKit;
95
    
98
    
96
    public CloneableEditorDocumentGCTest(String s) {
99
    public CloneableEditorDocumentGCTest(String s) {
97
        super(s);
100
        super(s);
Lines 158-163 Link Here
158
            LOCK.notifyAll();
161
            LOCK.notifyAll();
159
        }
162
        }
160
    }
163
    }
164
165
    public void testDocumentGCedOnNbLike () throws Exception {
166
        isNbLikeEditorKit = true;
167
        testDocumentGCed();
168
    }
161
    
169
    
162
    //
170
    //
163
    // Implementation of the CloneableEditorSupport.Env
171
    // Implementation of the CloneableEditorSupport.Env
Lines 240-245 Link Here
240
        public CES (Env env, Lookup l) {
248
        public CES (Env env, Lookup l) {
241
            super (env, l);
249
            super (env, l);
242
        }
250
        }
251
252
        protected @Override EditorKit createEditorKit() {
253
            EditorKit retValue;
254
            if (isNbLikeEditorKit) {
255
                retValue = new NbLikeEditorKit();
256
            } else {
257
                retValue = super.createEditorKit();
258
            }
259
            return retValue;
260
        }
243
        
261
        
244
        public CloneableTopComponent.Ref getRef () {
262
        public CloneableTopComponent.Ref getRef () {
245
            return allEditors;
263
            return allEditors;

Return to bug 174713