Bug 74811 - [MPE] ability to hide tab when only one tab
Summary: [MPE] ability to hide tab when only one tab
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P5 enhancement with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2004-09-23 12:31 EDT by Sebastian Davids CLA
Modified: 2019-09-06 16:12 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Davids CLA 2004-09-23 12:31:29 EDT
Why is this useful?

Consider you want to write an editor. Right now you need to only show one page.
But you anticipate that in version 2 of your application the editor might/would
need two or more pages.

So instead of making your Editor a subclass of EditorPart you'll use
MultiPageEditorPart to be able to add pages in the future.

Now you have a MPE with one page showing one tab. In this case the tab is not
only visually not pleasing but also wastes precious screen estate.

I'd appreciate API or a constructor flag enabling the "do not show tabs if only
one page" behavior".

see bug 74726 for CTabFolder support

@@@@

A workaround like does not work:

protected void createPages() {
   //add page here
   Composite container = getContainer();
   if (container instanceof CTabFolder) {
       CTabFolder folder = (CTabFolder) container;
       folder.setTabHeight(0);
       folder.redraw();
   }
}

This also violates the warning in getContainer: "Warning: Clients should not
assume that the container is any particular subclass of Composite."
Comment 1 Paul Webster CLA 2006-09-28 11:00:31 EDT
There are currently no plans to work on this feature.

PW
Comment 2 Denis Roy CLA 2007-06-22 09:32:42 EDT
Changes requested on bug 193523
Comment 4 Paul Webster CLA 2008-01-10 07:49:16 EST
One of the enhancements that was planned for 3.4 (but dropped due to time constraints) was making MPEP just a "manager" and making all of the pages 1st class editors ... that would certainly break this hack.

PW
Comment 5 Remy Suen CLA 2008-07-17 21:13:44 EDT
(In reply to comment #4)
> One of the enhancements that was planned for 3.4 (but dropped due to time
> constraints) was making MPEP just a "manager" and making all of the pages 1st
> class editors ... that would certainly break this hack.

Paul, when you say "break", did you mean it won't work or it won't be necessary?
Comment 6 Paul Webster CLA 2008-07-21 09:23:02 EDT
(In reply to comment #5)
> Paul, when you say "break", did you mean it won't work 

Yes, it won't work and would probably throw some exceptions as well.

PW
Comment 7 Henno Vermeulen CLA 2010-05-06 09:50:19 EDT
This feature is also useful for us because we have an abstract base class that extends FormEditor and contains some common code for multiple concrete forms. Some of these need multiple tabs and some of these only need one.
Comment 8 Eclipse Webmaster CLA 2019-09-06 16:12:03 EDT
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.

If you have further information on the current state of the bug, please add it. 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.