Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349144 - [EditorMgmt] [UI] Editor Stack selection needs refinement
Summary: [EditorMgmt] [UI] Editor Stack selection needs refinement
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-12 09:40 EDT by Eric Moffatt CLA
Modified: 2020-02-18 04:54 EST (History)
2 users (show)

See Also:


Attachments
Patch that tries to keep editors away from views (2.01 KB, patch)
2011-06-12 09:46 EDT, Eric Moffatt CLA
no flags Details | Diff
New patch with same refinements as in comment 1 (1.77 KB, patch)
2011-08-11 15:04 EDT, Eric Moffatt CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Moffatt CLA 2011-06-12 09:40:39 EDT
While running the scenario for bug 349118:

1. Split the shared area vertically into two stacks with the 'Outline' view
with the 'Outline' view on the top. You will now have the stack on top and an
empty stack on the bottom.
2. Open an editor, it will appear in the same stack as the 'Outline' view (the
top stack).

Clearly this is undesirable behavior since we now obscure the Outline view with the editor. It would be better if the empty stack were used, we need to do something deeper than just chosing the first visible stack as we now do.
Comment 1 Eric Moffatt CLA 2011-06-12 09:46:44 EDT
Created attachment 197854 [details]
Patch that tries to keep editors away from views


This patch uses a 3 stage approach to choosing a stack for an editor.

1) a visible empty stack (as in the scenario)
2) a stack that doesn't contain any Views (MPlaceholders)
3) any visible stack (current behavior)

Note that further refinements are possible such as trying not to put two instances of the same editor into the same stack...perhaps even to the extent of creating a new stack if necessary in the New Editor handling (a request from the e4 BOF at eclipsecon).
Comment 2 Eric Moffatt CLA 2011-08-11 15:04:24 EDT
Created attachment 201341 [details]
New patch with same refinements as in comment 1
Comment 3 Eric Moffatt CLA 2011-08-11 15:06:37 EDT
Remy, could you review this one as well ?
Comment 4 Remy Suen CLA 2011-08-12 08:17:02 EDT
There is a discrepancy in the end result of the two set of steps below.

1. Open a file.
2. Drag a view into the shared area and split it.
3. Close the editor.
4. Close the view.
5. Open a file.
6. Reopen the closed view from step 4.
7. The view is stacked with the editor from step 5.

3. Close the view.
4. Close the editor.
5. Open a file.
6. Reopen the closed view from step 3.
7. The view is opened in its own stack instead of being in the editor's stack.
Comment 5 Eric Moffatt CLA 2011-08-18 16:07:04 EDT
Hmm, the difference is ultimately determined by the TBR state of the stack containing the view:

When you close the editor first its stack goes away, leaving only the stack with the view placeholder in it. Closing the view sets the PH TBR to false but leaves the stack TBR true since it's the only one.

In the second scenario we close the view first it sets *both* the TBR for the view and the TBR for the stack to false. Then closing the editor leaves that stack's TBR true since it's the last visible stack (so in this case the EA still has an MPSC with two stacks, one TBR true one false).

After a talk with Remy it appears that there are two competing scenarios involving views in the Shared area:

1) Just need more space. This is like moving the Console view into the shared area just to give it the most room to show its info. Here is doesn't really matter whether an editor shares its stack.

2) Want the view to be visible even when the shared area is maximized. This is like dragging the Outline view into the shared area and you specifically do not want editors to go into the same stack.
Comment 6 Paul Webster CLA 2011-11-01 12:14:51 EDT
Eric, should this still be considered for 4.1.2?

PW
Comment 7 Eclipse Genie CLA 2020-02-18 04:54:19 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.