Bug 433465 - Wrong closable status for placeholder model elements in the Eclipse IDE
Summary: Wrong closable status for placeholder model elements in the Eclipse IDE
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.17 M1   Edit
Assignee: Christoph Laeubrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 400771
  Show dependency tree
 
Reported: 2014-04-24 16:08 EDT by Lars Vogel CLA
Modified: 2021-07-13 09:42 EDT (History)
8 users (show)

See Also:


Attachments
Screenshot (2.15 MB, image/bmp)
2014-04-24 16:10 EDT, Lars Vogel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2014-04-24 16:08:41 EDT
The closable status for placeholders in the application model is incorrect. See attached screenshot.

Eric any hints how I can fix that? I tried to set closable to true in ModeledPageLayout.createViewModel() does it did not make a difference. As our model should be the "basis of all truth", I think we should fix that.
Comment 1 Lars Vogel CLA 2014-04-24 16:10:17 EDT
Created attachment 242299 [details]
Screenshot
Comment 2 Dmitry Spiridenok CLA 2014-04-27 17:40:42 EDT
Is the closeable status incorrect for all placeholders or only some of them? How do we know which placeholders have the right status? Or should all of the be set to true (like everything is closeable by default)?
Comment 3 Lars Vogel CLA 2014-04-27 18:07:20 EDT
(In reply to Dmitry Spiridenok from comment #2)
> Is the closeable status incorrect for all placeholders or only some of them?
> How do we know which placeholders have the right status? Or should all of
> the be set to true (like everything is closeable by default)?

You can check with the live model editor. Very placeholders for a view which is closable should have the model property set.
Comment 4 Eric Moffatt CLA 2014-06-23 13:35:29 EDT
Lars, isn't there already a defect open for this ? In any case the 'NO_CLOSE' tag should be the winner in all cases; if it isn't being set using the ModeledPageLayout API then that's certainly a bug...
Comment 5 Luis Fernando Robledano-Esteban CLA 2015-01-14 11:20:01 EST
I have found the same problem for an application created by myself. No matter what the flag says, in the PlaceHolder or in the SharedElement, that the Part is closable.
Comment 6 Guido Schnepp CLA 2018-12-16 08:31:13 EST
Checked here with 4.7.3a. Workaround with tag on placeholder works for me, if you tag the placeholder with "NoClose". Closeable attribute is not working for placeholders, but tag does. (That tag don't work for native parts; you have to use Closeable attribute here.)

You need to tag with the constant's value not the name, for sure. I'm not the only one who misunderstood that at first, I think. ;-)

org.eclipse.e4.ui.workbench.IPresentationEngine.NO_CLOSE = "NoClose";
Comment 7 Christoph Laeubrich CLA 2020-05-26 07:23:44 EDT
Just wondering if there is any progress on this? I can confirm that setting the Tag works but setting the checkbox does not, so in general there seems to be a place where the tag is evaluated but the check is ignored.
Comment 8 Lars Vogel CLA 2020-05-26 07:28:46 EDT
(In reply to Christoph Laeubrich from comment #7)
> Just wondering if there is any progress on this? I can confirm that setting
> the Tag works but setting the checkbox does not, so in general there seems
> to be a place where the tag is evaluated but the check is ignored.

Help wanted :-)
Comment 9 Christoph Laeubrich CLA 2020-05-26 07:45:04 EDT
I'll try to take a look
Comment 10 Eclipse Genie CLA 2020-05-28 07:54:53 EDT
New Gerrit change created: https://git.eclipse.org/r/163756
Comment 11 Rolf Theunissen CLA 2020-06-19 02:56:01 EDT
In the Gerrit there is the question how the closable status should be inherited from the placeholder and part:

1. Check Placeholder only, i.e. check the attribute and the tags of the placeholder only

2a. Check Placeholder and Part, i.e., check attribute and tag of Placeholder, check attribute of Part
2b. Check Placeholder and Part, i.e., check attribute and tag of Placeholder and check attribute and tag of Part

3. Check placeholder and Part (extended), the placeholder would require a tri-state:
    closeable (override part flag)
    not closeable (override part flag)
    inherit (from Part)


Please provide input such that we can make progress on the Gerrit.
Comment 13 Andrey Loskutov CLA 2021-07-13 09:42:03 EDT
This fix caused regression, see bug 574819.