When working on ADS #13549, I found that ADS did not get tabbed panes restored correctly under some conditions if there are floating windows involved. I tried quite a few test cases, it seems that the problem can be described as this:
Test Scenario:
- Launch ADS without any tabs.
- Create N QA tabs.
- Make any number of QA tabs (say M QA tabs) floating where M <= N and leave the rest of N-M QA tabs docked.
- Close ADS and reopen it.
> If the very first QA tab was displayed in one of the M floating windows; then only the very first QA tab is restored and the rest of QA tabs are gone.
> If the very first QA tab was not displayed in one of the M floating windows; then those N-M QA tabs that used to be docked will be restored.
Since tabbed panes can be moved from one location to another in ADS, I did not try above test scenario in the condition where tabbed panes have been moved; will do that on Monday.
|
163 KB
@Sachin:
How to make a docked tab floating as well as how to restore a floating tab back to the tabbed pane are all handled by jide objects; including creation of floating window and moving multiple tabs (docked or floated) to the same floating window.
Tabs created by ADS tabbed pane (regardless whether tabs are floated or docked after created) are managed by jide object. To fix the problem described in this issue, it seems to me we need to restore floating tabs back to tabbed pane as docked tabs upon closing ADS frame so that ADS restore specific code will behave correctly. Based on this assumption, I did the followings:
After user confirmed to exit ADS, ADS will use jide APIs to locate all of floating tabs and restore them back to tabbed pane.
This seems to work but have some side effect which is described below using 4 simple scenarios:
Scenario 1 (Auto Restore):
(11) Open ADS without any tabs created.
(12) Create 2 Query Analyzer tabs: QA-1 and QA-2. QA-1 should be created before QA-2.
(13) Make QA-2 floating.
(14) Make QA-1 floating.
(15) Close and reopen ADS.
---> QA-1 and QA-2 are restored side by side in tabbed pane which is what we are looking for.
Scenario 2 (Auto Restore):
(21) Open ADS without any tabs created.
(22) Create 2 Query Analyzer tabs: QA-1 and QA-2. QA-1 should be created before QA-2.
(23) Make QA-1 floating.
(24) Make QA-2 floating.
(25) Close and reopen ADS.
---> QA-1 and QA-2 are NOT restored side by side in tabbed pane, they are restored in different split panes; see this screenshot for an example.
Scenario 3 (Manual Restore):
(31) Open ADS without any tabs created.
(32) Create 2 Query Analyzer tabs: QA-1 and QA-2. QA-1 should be created before QA-2.
(33) Make QA-1 floating.
(34) Make QA-2 floating.
Above 4 steps are exactly the same as steps 21-24.
(35) In QA-1 floating window, dock QA-1 back to tabbed pane.
(36) In QA-2 floating window, dock QA-2 back to tabbed pane.
---> QA-1 and QA-2 are NOT restored side by side in tabbed pane, the result is exactly the same as Scenario 2.
Scenario 4 (Manual Restore):
(41) Open ADS without any tabs created.
(42) Create 2 Query Analyzer tabs: QA-1 and QA-2. QA-1 should be created before QA-2.
(43) Make QA-1 floating.
(44) Make QA-2 floating.
Above 4 steps are exactly the same as steps 21-24.
(45) In QA-2 floating window, dock QA-2 back to tabbed pane.
(46) In QA-1 floating window, dock QA-1 back to tabbed pane.
---> QA-1 and QA-2 are restored side by side in tabbed pane, the result is exactly the same as Scenario 1.
It seems that whether to restore floating tabs side by side or in different split panes has something to do with the order to make tabs floating as well as the order to make floating tabs docked; this is all jide implementation and I did not look into it in details.
As of now, I made changes in my local environment so that floating tabs can be restored back to tabbed pane upon ADS closing; however tabs might not be restored side by side as described above and shown in this screenshot. If this behavior is okay, I will check in my changes. If you want me look into jide code in details, I can do that as well but it likely will be very time consuming. Please let me know.
The problem described in this issue is resolved along with fix for ADS #13549. See this comment for details.
The problem described in this issue is resolved along with fix for ADS #13549. See this comment for details.
Verified all scenarios in ADS-17.0.0-beta-24
Verified all scenarios in ADS-17.0.0-beta-24
Issue #13688 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build ADS 17.0.0-beta-24 |
No time estimate |
1 issue link |
is required by #13549
Issue #13549Review Workspace restore of ADS to see if Floating windows can be included |
@Sachin:
How to make a docked tab floating as well as how to restore a floating tab back to the tabbed pane are all handled by jide objects; including creation of floating window and moving multiple tabs (docked or floated) to the same floating window.
Tabs created by ADS tabbed pane (regardless whether tabs are floated or docked after created) are managed by jide object. To fix the problem described in this issue, it seems to me we need to restore floating tabs back to tabbed pane as docked tabs upon closing ADS frame so that ADS restore specific code will behave correctly. Based on this assumption, I did the followings:
After user confirmed to exit ADS, ADS will use jide APIs to locate all of floating tabs and restore them back to tabbed pane.
This seems to work but have some side effect which is described below using 4 simple scenarios:Scenario 1 (Auto Restore):
(11) Open ADS without any tabs created.
(12) Create 2 Query Analyzer tabs: QA-1 and QA-2. QA-1 should be created before QA-2.
(13) Make QA-2 floating.
(14) Make QA-1 floating.
(15) Close and reopen ADS.
---> QA-1 and QA-2 are restored side by side in tabbed pane which is what we are looking for.
Scenario 2 (Auto Restore):
(21) Open ADS without any tabs created.
(22) Create 2 Query Analyzer tabs: QA-1 and QA-2. QA-1 should be created before QA-2.
(23) Make QA-1 floating.
(24) Make QA-2 floating.
(25) Close and reopen ADS.
---> QA-1 and QA-2 are NOT restored side by side in tabbed pane, they are restored in different split panes; see this screenshot for an example.
Scenario 3 (Manual Restore):
(31) Open ADS without any tabs created.
(32) Create 2 Query Analyzer tabs: QA-1 and QA-2. QA-1 should be created before QA-2.
(33) Make QA-1 floating.
(34) Make QA-2 floating.
Above 4 steps are exactly the same as steps 21-24.
(35) In QA-1 floating window, dock QA-1 back to tabbed pane.
(36) In QA-2 floating window, dock QA-2 back to tabbed pane.
---> QA-1 and QA-2 are NOT restored side by side in tabbed pane, the result is exactly the same as Scenario 2.
Scenario 4 (Manual Restore):
(41) Open ADS without any tabs created.
(42) Create 2 Query Analyzer tabs: QA-1 and QA-2. QA-1 should be created before QA-2.
(43) Make QA-1 floating.
(44) Make QA-2 floating.
Above 4 steps are exactly the same as steps 21-24.
(45) In QA-2 floating window, dock QA-2 back to tabbed pane.
(46) In QA-1 floating window, dock QA-1 back to tabbed pane.
---> QA-1 and QA-2 are restored side by side in tabbed pane, the result is exactly the same as Scenario 1.
It seems that whether to restore floating tabs side by side or in different split panes has something to do with the order to make tabs floating as well as the order to make floating tabs docked; this is all jide implementation and I did not look into it in details.
As of now, I made changes in my local environment so that floating tabs can be restored back to tabbed pane upon ADS closing; however tabs might not be restored side by side as described above and shown in this screenshot. If this behavior is okay, I will check in my changes. If you want me look into jide code in details, I can do that as well but it likely will be very time consuming. Please let me know.