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.
[ BUILD # : 201301102100 ] [ JDK VERSION : other ] In the SQL Command view - as in other files - the user can switch between the "source" and "history" view. In the SQL Command view this feature provides no functionality, instead a grey are is displayed showing "No history available". Expected behaviour: Showing either the SQL history which can be access by ctrl+alt+shift+h, or hiding the "source" and "history" buttons from the top of the view.
*** Bug 232807 has been marked as a duplicate of this bug. ***
I'm not sure whether this is a solution, but it should work. The idea: A console window is defined by the URL of the primary file (prefix "nbfs://"). If a console file is detected, not a 'normal' MultiView based TopComponent is created, but the SQLClonableEditor is directly build. This could be problematic if more MultiViewElements for text/x-sql elements are build. # This patch file was generated by NetBeans IDE # It uses platform neutral UTF-8 encoding and \n newlines. --- Base (BASE) +++ Locally Modified (Based On LOCAL) @@ -85,9 +85,9 @@ import org.openide.text.CloneableEditorSupport; import org.openide.text.DataEditorSupport; import org.openide.util.*; +import org.openide.util.lookup.Lookups; import org.openide.windows.CloneableOpenSupport; import org.openide.windows.CloneableTopComponent; -import org.openide.windows.IOContainer; import org.openide.xml.XMLUtil; /** @@ -174,8 +174,13 @@ @Override protected Pane createPane() { - Pane pane = (CloneableEditorSupport.Pane) MultiViews.createCloneableMultiView( + Pane pane; + if(getDataObject().getPrimaryFile().toURL().toExternalForm().startsWith("nbfs://")) { + pane = new SQLCloneableEditor(Lookups.fixed(this, getDataObject())); + } else { + pane = (CloneableEditorSupport.Pane) MultiViews.createCloneableMultiView( SQLDataLoader.SQL_MIME_TYPE, getDataObject()); + } return pane; }
Thank you Matthias for the patch. I think it's the best (the simplest) solution. Patch applied: http://hg.netbeans.org/core-main/rev/5604010d8986
Integrated into 'main-silver', will be available in build *201311220002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/5604010d8986 User: Libor Fischmeistr <lfischmeistr@netbeans.org> Log: #224791: Patch for: History/source switch in SQL Command view is not useful