Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 369678

Summary: CTabFolders appear to prioritize tab visibility even when MRU is off
Product: [Eclipse Project] Platform Reporter: Remy Suen <remy.suen>
Component: SWTAssignee: Bogdan Gheorghe <gheorghe>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: carolynmacleod4, emoffatt, pwebster
Version: 4.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Remy Suen CLA 2012-01-25 10:35:53 EST
When I run this code and make the shell smaller horizontally, it starts going (1, 2, 3, 5) -> (1, 2, 5) -> (1, 5). Why doesn't it show me (2, 3, 4, 5) -> (3, 4, 5) -> (4, 5)?

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

Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new FillLayout());

final CTabFolder folder = new CTabFolder(shell, SWT.TOP);
// turn off MRU behaviour
folder.setMRUVisible(false);
final CTabItem tab1 = new CTabItem(folder, SWT.NONE);
tab1.setText("Tab 1"); //$NON-NLS-1$
CTabItem tab2 = new CTabItem(folder, SWT.NONE);
tab2.setText("Tab 2"); //$NON-NLS-1$
CTabItem tab3 = new CTabItem(folder, SWT.NONE);
tab3.setText("Tab 3"); //$NON-NLS-1$
CTabItem tab4 = new CTabItem(folder, SWT.NONE);
tab4.setText("Tab 4"); //$NON-NLS-1$
CTabItem tab5 = new CTabItem(folder, SWT.NONE);
tab5.setText("Tab 5"); //$NON-NLS-1$

folder.setSelection(tab5);

shell.pack();
shell.open();
while (!shell.isDisposed()) {
  if (!display.readAndDispatch())
    display.sleep();
}
display.dispose();
Comment 1 Carolyn MacLeod CLA 2012-02-13 14:54:47 EST
There's something funky about MRU behavior in 4.2. I sometimes get editor tabs disappearing even though the StyledText is still visible. Perhaps this snippet might shed some light on the strange behavior.
Comment 2 Eclipse Genie CLA 2020-01-18 16:44:28 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.