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.

Bug 213905 - Clone tab is missing result window, result output on wrong tab
Summary: Clone tab is missing result window, result output on wrong tab
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Libor Fischmeistr
URL:
Keywords: PATCH_AVAILABLE
Depends on:
Blocks:
 
Reported: 2012-06-10 13:56 UTC by everflux
Modified: 2014-01-21 02:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
proposed patch v1 (4.84 KB, patch)
2014-01-19 15:40 UTC, matthias42
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description everflux 2012-06-10 13:56:07 UTC
[ BUILD # : 201206100001 ]
[ JDK VERSION : 1.7.4 ]

When using right-click -> "clone" on an SQL Command tab, a new command tab is
created, but it is missing the SQL result tab. Instead the result gets directed
to the result tab of the original SQL command tab.
Comment 1 matthias42 2014-01-19 15:40:27 UTC
Created attachment 144122 [details]
proposed patch v1

The problem is in the way the results from the execution are published to the editor window (SQLEditorSupport#setResultsToEditors). The result can only belong to one editor window (Swing compontents  may only be present once in the compontent tree).

Which editor windows would receive the result would be non-deterministic. So the attached patch changes the way the target for the result is determined. If possible the responsible editor window is passed through the executor run and later used to find the "right" target.

So if you have only one editor, nothing changes, the one passed editor is the only one, that would have been found before this change, if there are two or more clones, only the right editor gets the result.

After cloning there is only the text area there. Once another SQL execution is triggered, there will be the clones, that have the same SQL, but might have different result window contents.
Comment 2 Libor Fischmeistr 2014-01-20 10:11:47 UTC
Fix applied - http://hg.netbeans.org/core-main/rev/a8329d42cbbe

Thanks for it.
Comment 3 Quality Engineering 2014-01-21 02:56:29 UTC
Integrated into 'main-silver', will be available in build *201401210001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/a8329d42cbbe
User: Libor Fischmeistr <lfischmeistr@netbeans.org>
Log: #213905: Clone tab is missing result window, result output on wrong tab