Bug 103865 - [MPE] MultiPageEditorPart does not support CLOSE style
Summary: [MPE] MultiPageEditorPart does not support CLOSE style
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
: 270340 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-07-14 13:35 EDT by Ed Willink CLA
Modified: 2019-09-06 16:06 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2005-07-14 13:35:01 EDT
It is necessary to use the deprecated CTabFolderListener via a strongly
discouraged cast to enable Close on tabs in a MultiPageEditorPart.

These problems could be avoided if the MultiPageEditorPart createContainer
method at least had a call-back for additional style bits.

This and many other problems could be avoided if MultiPageEditorPart implemented
IMultiPageEditorPart.
Comment 1 Nick Edgar CLA 2005-07-18 14:19:53 EDT
Not a regression: MultiPageEditorPart never supported CLOSE style.
Also, I don't see how defining an IMultiPageEditorPart interface would help here.


 
Comment 2 Nick Edgar CLA 2005-07-18 14:23:07 EDT
Note to self: Ed needs to use CTabFolderListener instead of CTabFolderListener2
because addCTabFolderListener sets the showClose flag.  There's no way currently
for a subclass of MultiPageEditorPart to set the style bits of either the folder
or its items.

The problem is that the applicable style bits are a function of which control is
used, which we're trying to hide here. 
Comment 3 Ed Willink CLA 2005-07-18 14:44:25 EDT
An IMultiPageEditorPart interface would certainly help, becuase there is always
the option of a total copy and re-edit.

MultiPageEditorPart isn't so massive that it can't be re-implemented.

In particular, it would be nice to mix-in IMultiPageEditorPart to a generic
edit part that could be used either single page or multi-page. At present
the compulsary inheritance from MultiPageEditorPart to exploit the special
instanceof tests makes such sharing very hard.

[Of course once the probably only two methods added by IMultiPageEditorPart
are exposed, they could be put directly into IEditorPart.] 
Comment 4 Nick Edgar CLA 2005-07-18 14:58:59 EDT
Which instanceof checks are you referring to?
Other than the one discussed in bug 103379, the workbench proper should not be
doing any special cases for MultiPageEditorPart.

You should already be able to copy/modify it (and MultiPageEditorSite and
MultiPageEditorActionBarContributor) for your purposes.
Comment 5 Ed Willink CLA 2005-07-18 15:15:50 EDT
MultiPageEditorActionBarContributor line 47

and so also

FormEditor line 599
MultiPageEditorPart line 509
Comment 6 Nick Edgar CLA 2005-07-19 12:33:32 EDT
So ref 1 and 3 are within the MultiPageEditorPart implementation.  If you copied
and modified it to use different controls or styles, you would copy/modify those
other types too.

For ref 2, FormEditor is a subclass of MultiPageEditorPart so it is strongly
coupled.  If your editor was a form editor, you could not get a different
control or style without copying FormEditor too (yuck).  But having an interface
wouldn't help here either.

Comment 7 Paul Webster CLA 2006-09-28 11:01:10 EDT
There are currently no plans to work on this feature.

PW
Comment 8 Denis Roy CLA 2007-06-22 09:33:02 EDT
Changes requested on bug 193523
Comment 9 Paul Webster CLA 2009-03-30 14:03:12 EDT
*** Bug 270340 has been marked as a duplicate of this bug. ***
Comment 10 Eclipse Webmaster CLA 2019-09-06 16:06:38 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.