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.
Summary: | Patch for: History/source switch in SQL Command view is not useful | ||
---|---|---|---|
Product: | db | Reporter: | everflux <everflux> |
Component: | Code | Assignee: | Libor Fischmeistr <lfischmeistr> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mmirilovic |
Priority: | P3 | Keywords: | PATCH_AVAILABLE |
Version: | 7.3 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
everflux
2013-01-12 18:22:57 UTC
*** 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 |