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.
In order to minimize the migration work for other to do the multiview should work with existing CloneableEditorSupport subclasses and alas also with EditorSupport (because java team is pretty busy and is not expected to spend some time on migration during promoD). The major concern is ability to embed CloneableEditor as one element in multiview and correct implementation of (Cloneable)EditorSupport.getOpenedPanes() Please write test suite to verify the level of compatibility.
I could not find any current tests focusing on EditorSupport/CloneableEditorSupport behaviour. How can I then define compatibility then? can the current CloneableEditorSupportTest be of any help?
CloneableEditorSupportTest defines basic behaviour and should give you an idea how to write tests. You can use it as inspiration, but you cannot just plug into it. Moreover it does not focus on getEditorPanes() functionality at all. However the interaction between multiview and the support will be unique anyway, reuse of the old tests is hard to imagine.
Weel, I was more interested in the used contract between API user and the API. And the test interation is simplified compared to real-life example. Also clearly shows what is actually supported.
Created attachment 14259 [details] Introducing CES.Pane to allow other TopComponents to implement it and delegate to CloneableEditor
reassigning
http://openide.netbeans.org/source/browse/openide/src/org/openide/text/?only_with_tag=multiview_march2004 files in openide.text that changed. NnDocument, CloneableEditorSupport and CloneableEditor changed APIs. EditorSupport rewritten, changes verified by implementing basic MultiView impl for form module. Test not written yet.
test written.
I'd like to suggest some changes: 1. when doing assert in other thread then the original one that executed the test, the failure is never reported (aka invokeLater+assert) 2. override method runInEQ() and you do not need to mangle with AWT anymore. CloneableOpenSupport seems to do Mutex.EVENT.writeAccess which is synchronous when run from AWT thread 3. suggestion for test. Make sure that: Line line = support.getLineSet().getCurrent(0); line.show(Line.SHOW_SHOW); calls to yourTopComponent.requestActivated()
done
Fine.