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.
Current: When executing several queries on different databases, for each query a new tab is opened. When hovering over one tab a text will appea like following: 'with myWith as ( select column1, column2, column3 ...' Exected: - For each tab also the database should be shown in the 'hover text' - The text should be trimmed such that all multiple whitespaces are removed eg. 'DB1: with myWith as (select column1, column2, column3 ...' Product Version = NetBeans IDE 7.4 (Build 201310111528) Operating System = Linux version 3.8.0-31-generic running on amd64 Java; VM; Vendor = 1.7.0_45 Runtime = Java HotSpot(TM) 64-Bit Server VM 24.45-b08
Created attachment 148910 [details] proposed patch v1 Simplify the code (no need to postprocess tooltips multiple times)
Created attachment 148911 [details] proposed patch part 2 v1 Modify tooltip of Output Tab of SQL Result: Show database name used to invoke SQL and show complete SQL (without removing new lines).
IMHO: You cannot replace all multiple whitespaces with a single one. If you have a SQL query which contains multiple whitespaces in literals this procedure would alter the query
(In reply to markiewb from comment #3) > IMHO: You cannot replace all multiple whitespaces with a single one. You are right and I did not implement that (to be fair the patch changes the display, but does not completly follow the request presented here). There are two parts: 1. The "name" of the Tab-Component - after the patch that is whitespace reduced (multiple whitespaces are replaced by one space) and limited to 25 chars. 2. The tooltip - after the change it has the structure: DB: <NAME_OF_CONNECTION> <SQL_AS_TYPED> If the user inputs whitespace he most probably did it, because it was good for overview or better structured or ... > If you have a SQL query which contains multiple whitespaces in literals this > procedure would alter the query Nope - this changes the display, not the query itself.
*** Bug 202710 has been marked as a duplicate of this bug. ***
The patches were further modified and committed as: http://hg.netbeans.org/core-main/rev/9cd65bbf6712 http://hg.netbeans.org/core-main/rev/c4e63d4b0162 This is the result: - tooltips for results are fixed (before the fixes only the tooltip of the first result worked) - The name of the result tab is build from the sql by replacing all whitespace with one space and limit it to 25 chars - The tooltip shows the database connection formatted bold and the first 512 chars of the executed sql I decided against integrating the DB name into the result tab name, as in the common case one db connection is used and the db name takes significant space. I think this can be discussed into both directions, but I also think integrating the db name into the tooltip is a good compromise. In the next few hours/days nightly build should begin to carry this change. A message will be appended to this bug when that happens. Please help with QA and check that version if this meets your expectations (keeping my reasining above in mind). If you agree, that it is fixed, please change the status of this bug to VERIFIED. Thank you for helping!
Integrated into 'main-silver', will be available in build *201501310002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/9cd65bbf6712 User: Matthias Blaesing <matthias42@netbeans.org> Log: #237806: Part1: Simplify the code (no need to postprocess tooltips multiple times)