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.
There should be a way for to create a more complicated user interface which contains the editor (as created by CloneableEditor or by NbDocument.CustomEditor). A way to do this is to add a wrapEditorComponent() method to CloneableEditorSupport, which would be called by CloneableEditor when it adds the editor component. A reason for this change is the UI of the SQL editor. The SQL editor will have two areas: one at the top, containing the editor itself, and one at the bottom, displaying the ResultSet obtained by executing the SQL statement in the editor. The SQL editor's CloneableEditorSupport.wrapEditorComponent() will return a JSplitPane whose top component will be the editor and the bottom one will be contain the UI displaying the ResultSet.
Created attachment 23082 [details] Proposed changes
It seems to me that you should be able to do what you need using NbDocument.CustomEditor. Or am I missing something?
Actually I took this approach first. But it would mean that the UI is created by the editor kit, and this is not correct. The UI should be created by the editor support, since the execute functionality (and showing the result) is inherent to the SQL DataObjects. And if you plug in a different editor kit, the SQL execution related functionality should stay there.
Created attachment 23091 [details] Added the missing issue number to apichanges.xml
No objections from me...
Ok, I understand now. No objections from me.
If there aren't any objections I will commit tomorrow.
Integrated. http://openide.netbeans.org/source/browse/openide/text/apichanges.xml?r1=1.4&r2=1.5 http://openide.netbeans.org/source/browse/openide/text/manifest.mf?r1=1.5&r2=1.6 http://openide.netbeans.org/source/browse/openide/text/src/org/openide/text/CloneableEditor.java?r1=1.4&r2=1.5 http://openide.netbeans.org/source/browse/openide/text/src/org/openide/text/CloneableEditorSupport.java?r1=1.4&r2=1.5 http://openide.netbeans.org/source/browse/openide/text/test/unit/src/org/openide/text/CloneableEditorSupportTest.java?r1=1.1&r2=1.2 http://openide.netbeans.org/source/browse/openide/text/test/unit/src/org/openide/text/NbLikeEditorKit.java?r1=1.1&r2=1.2 http://openide.netbeans.org/source/browse/openide/text/test/unit/src/org/openide/text/WrapEditorComponentTest.java?rev=1.1&content-type=text/vnd.viewcvs-markup
Nice URLs to the diffs. Have you generated them? How? If you assembled them manually you do not need to reply. Btw. there is a small mistake the "wrapEditorComponent" is since 6.4
Whoops, thank you for catching the mistake, I completely forgot about the @since tag.