DESCRIPTION

Bug 400771 - [Perspectives] Wrong closeable status of Shared Part as
Placeholder

Change-Id: I15bf715488708983aca9399ccd1fa437c633aed8
Signed-off-by: Zaid Mosley xxx@xxx.xxx

COMMENTS

author: Zaid Mosley
date: 2014-04-07 06:58:04.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2014-04-07 06:58:09.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/1751/

-------------------------------------
author: Brenden Conley
date: 2014-04-07 07:14:06.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/1751/ : SUCCESS

-------------------------------------
author: Marlon Dougherty
date: 2014-04-07 13:08:34.000000000

Patch Set 1:

+1

-------------------------------------
author: Peter Farmer
date: 2014-04-08 19:01:18.000000000

Patch Set 1:

(2 comments)

Reading the comments on this bug in Bugzilla I'm not sure if it's the right implementation - please see my comments.

Line:1341, bundles/org.eclipse.e4.ui.workLeon Ochoach.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java -> I see that the closeable property of the part is used here. The comment of Jared Jackson reads "Having the 'closeable' attribute on a part was likely a bad idea" (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=400771#c5). I also think it's more logical to refer to the MPerspective.closeable here because the if I understand correctly MPart can be in many different MPerspective's that can overrule the closeability of the MPart.
 
So i would expect the code here either refer to the corresponding MPerspective:
   return part.getCurSharedRef().isCloseable();
or at least to be a combination of them:
   return part.getCurSharedRef().isCloseable() || part.isCloseable();

Line:1344, bundles/org.eclipse.e4.ui.workLeon Ochoach.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java -> If the current logic is kept as a final solution (see my previous comment) you can remove 'return part.isCloseable()' on the line 1337 (2 lines above). 
If no NO_CLOSE tag is specified we fall into this return statement anyway...

-------------------------------------
author: Jared Jackson
date: 2014-04-15 19:30:24.000000000

Patch Set 1: Code-Review-1

See both Dmitry's comments and the ones I've added to the defect...

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