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 257465 - SQLCloneableEditor - splitter for resultset tabs do not remember its postition
Summary: SQLCloneableEditor - splitter for resultset tabs do not remember its postition
Status: VERIFIED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Show Data (show other bugs)
Version: 8.2
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: matthias42
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-07 20:50 UTC by NukemBy
Modified: 2016-01-22 10:13 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Patch: SQLCloneableEditor-remember-splitter-position (1.98 KB, text/plain)
2016-01-07 20:50 UTC, NukemBy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NukemBy 2016-01-07 20:50:31 UTC
Created attachment 158053 [details]
Patch: SQLCloneableEditor-remember-splitter-position

When executing SQL statements NetBeans show output resultsets in the SQL editor pane. There is few problems problems with this:

- default size consume too much space by default - half of the vertical size of the SQL editor

- when i reposition splitter and then execute SQL code having some error, bottom pane with resultset disappears - after fixing SQL and running it again page reappears with resultset, but in its default size - half of the SQL editor window. 

Repositioning of the splitter each time to get back some place for text is really annoying.


I've created the patch with following changes:

- default size of bottom pane is to fit 3 rows of output data
- upon closing of the botton pane, its size is remembered to show up next time (in context of the parent SQL editor window)
Comment 1 matthias42 2016-01-17 17:08:57 UTC
I decided to follow the suggestion to save the divider position, but I did not change the default size. The default size and a good proportion depends heavily on the intended use-case. The suggested change focuses on SQL development, while the current version gives more room to show the result of SQLs. As both approaches are valid I did not change the default size calculation.

The change was pushed as:

http://hg.netbeans.org/core-main/rev/ad3661950958

In the next few days a nightly build will be produced that contains the fix. By then a message will be posted here. Please check that nightly and if you find this fixed, please change status of this issue to VERIFIED. If not please specify what did not work.
Comment 2 Quality Engineering 2016-01-19 02:26:54 UTC
Integrated into 'main-silver', will be available in build *201601190002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/ad3661950958
User: Matthias Blaesing <matthias42@netbeans.org>
Log: #257465: Save divider location in between SQL executions
Comment 3 NukemBy 2016-01-21 20:53:39 UTC
Hello, 

I've checked changes done to SQL staff so far. Work OK. Thanks very much.

- - - - - - - - - - - - - - - - - - 

Re: "The default size and a good proportion depends heavily on the intended use-case. ..."

Yes, it really "heavily depends" on the use-cases, but result pane eating half of the screen in each new window is really annoying in my scenarios and I have new idea about this - allocate initial height of results pane to the number of rows being displayed. This will more-or-less auto-adapt to usage scenario.

When simple 'select * from something' returns 2 rows - there is no much sense to show additionally 20 empty rows, what happens currently with splitter in default location at the middle. So algorithm can be like following: 

- if result pane is displayed for the first time - allocate height to display (TotalRows + 2) rows of data, '+2' - to have better visibility that there is no more data

- if height of result pane is larger than half of the editors space - truncate it

- - - - - - - - - - - - - - - - - - 

PS: My version of code contained that line during initialization of splitter
        splitter.setResizeWeight(1);

which says to splitter that it needs to allocate 100% of 'new' space to the top component when window size changes. Top component is 'text editor' and it is 'more natural' to resize text area than results pane when window is resized, IMHO.
Comment 4 matthias42 2016-01-21 22:19:43 UTC
Thank you for confirming the fix - changing the status to VERIFIED then.

With regard to the further comments we enter the realm of opinions. I really can understand your position, but then I can also argue the opposite case. In addition to that adding more intelligence to the splitting algorithm introduces further dependencies and complexity into the editor.

So sorry. For now it will stay this way.
Comment 5 NukemBy 2016-01-22 10:13:34 UTC
Yes, UX is very 'disputable' thing. Since point of this issue is resolved I'll create another one, which can be solved at spare time :)