Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329608 - Setting View closeable=false doesn't work on M3
Summary: Setting View closeable=false doesn't work on M3
Status: CLOSED WORKSFORME
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Eric Moffatt CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-06 06:37 EDT by Thomas Kratz CLA
Modified: 2013-06-06 11:37 EDT (History)
1 user (show)

See Also:


Attachments
Implement IViewLayout and update the StackRenderer to honor teh values (7.07 KB, patch)
2010-11-12 15:11 EST, 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 Thomas Kratz CLA 2010-11-06 06:37:50 EDT
Running my 3.6 based app still has some confusions. Woth your fixes from yesterday I get the views shown, but they are not shown correctly.

I contribute the views to my perspective the following way:

<perspectiveExtension
            targetID="de.eiswind.mango.client.search.ui.SearchPerspective">
         <view
               closeable="false"
               id="de.eiswind.mango.client.search.ui.Search"
               minimized="false"
               moveable="false"
               ratio="1.0"
               relationship="stack"
               relative="de.eiswind.mango.folder.left"
               showTitle="true"
               standalone="false"
               visible="true">
         </view>
      </perspectiveExtension>

But I can close them in the running workbench.
Comment 1 Remy Suen CLA 2010-11-06 15:15:33 EDT
Currently, the part itself describes whether it can be closed or not. Perhaps this model is not actually correct and this behaviour should actually be controlled by tags so that the presentation can modify this?
Comment 2 Thomas Kratz CLA 2010-11-12 11:36:39 EST
Is there a workaround for this ? This is currently a blocker :(
Comment 3 Remy Suen CLA 2010-11-12 11:42:07 EST
(In reply to comment #2)
> Is there a workaround for this ? This is currently a blocker :(

Not at the moment. You'd need to call 4.x APIs to change this (and it wouldn't be straightforward. If you made the view a standalone view then it shouldn't show the tabs (and then effectively not closeable). However, then it becomes a part's that not in a part stack which is a pretty big deal.
Comment 4 Thomas Kratz CLA 2010-11-12 11:46:21 EST
so I hope for that you'll get this right soon .. i need the stack
Comment 5 Eric Moffatt CLA 2010-11-12 15:11:35 EST
Created attachment 183037 [details]
Implement IViewLayout and update the StackRenderer to honor teh values


This also changes the 'tab' menu so that you don't get a 'Close' item for non-closable parts and "Close All/Others" will no longer close non-closable parts.

Note that this implementation allows parts to be closable in one perspective but not in a different one. For now opening a view that has not been added through the perspective or perspectiveExtension EPs will result in a closable part...We should likely provide a mechanism to transfer the Descriptor's values for this over to the shared part and have it act as a default for all generated placeholders.
Comment 6 Eric Moffatt CLA 2010-11-12 15:24:09 EST
Committed in >20101112. Applied the patch.

We should still see if we can create both a 'shared part' and a PartDescriptor whose 'isClosable' and 'isMovable' states are inherited in the presentation (i.e. so that opening the part always results in a non-closable part regardless of the perspective...).

I'll leave this open for now to track this.
Comment 7 Paul Webster CLA 2010-12-08 09:06:59 EST
Please mark the bug as fixed or move it to M5.

PW
Comment 8 Dani Megert CLA 2013-06-05 10:57:36 EDT
Removing outdated target milestone.
Comment 9 Eric Moffatt CLA 2013-06-06 11:37:46 EDT
The current support for non-closable views has been in place for some time. Of another issue shows up then a new defect should be opened...
'