| Summary: | Provide tag which prohibits a PartStack to collapse when empty | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Thomas Schindl <tom.schindl> | ||||||
| Component: | UI | Assignee: | Thomas Schindl <tom.schindl> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | Eric Moffatt <emoffatt> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | emoffatt, grillo321, Laura.vigna, m.stier, remy.suen, spam | ||||||
| Version: | 4.1 | ||||||||
| Target Milestone: | 4.2 M7 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 355750 | ||||||||
| Attachments: |
|
||||||||
|
Description
Thomas Schindl
Thanks Tom, We currently have a few of these constants defined in IPresentationEngine (NO_TITLE, NO_MOVE & NO_CLOSE). This seems to be a good place for this type of tag as well since, while they are API, they're in a low-level spot so are unlikely to confuse folks just writing e4 apps (this API is for folks doing renderers...). How about: NO_AUTO_COLLAPSE - Don't remove the element from the display even if it has no displayable children (i.e. ViewStacks will still collapse even if they have non-open views unless this is set). NO_AUTO_REMOVE - Don't remove the element from the model even if it has no children. The actual implementation is straightforward, it's just a tweak to test the tag in the appropriate parts of the CleanupAddon. *** Bug 360173 has been marked as a duplicate of this bug. *** I think I'll re-use the existing NO_CLOSE tag rather than introducing NO_AUTO_COLLAPSE. I'll update its jdoc to something like: Usage: Applying this tag to a container will ensure that the container remains visible in the UI even if it has no visible content. Applying the tag to a UI 'leaf' element (MPart / MPlaceholder) will cause the renderer to not provide a 'close' affordance. While I'm in there I'll also change the jdocs of the other tags as well to match this type of 'usage' info... Dear Sirs I see no target milestone for this, but we are building an enterprise application where this bug is giving us troubles. We used a workaround in M4 (added a "fake" invisible part in the stack, so that it won't be deleted) but unfortunately it doesn't work in M6 anymore. Tom, how do you advise us to proceed? Thanks a lot in advance Laura Dear e4 friends We struggled now quite a bit with this "bug" but finaly we understood that the feature is ok like it is. If you don't want, that the PartStack gets closed or "cleaned up" then just use an "Area" and put your Partstack inside it. The it has the features as the Editor Area has in the IDE. And keeps the space open even if it is empty. But there is still a bug with the area - that keeps us back: bug 376045 I don't think this is the correct solution - Eric can we take a look at this one? Just ping me Created attachment 213980 [details]
Can it be so easy?
Oh well is it possible that this is the only thing needed? How long did we fight the never ending durable battel in 3.x, 1,2,3 weeks? Fixed in less than 5 minutes amazing!
Can we consider this for M7 - i think this a save change with a very low risk of breaking something. @Laura V, Tom K: If this patch doesn't make it into the build you can simple clone the CleanUpAddon, apply the patch there and point the e4xmi to it instead of the one from the default addons - like many things in e4 you don't need to wait for upstream because this cleanup stuff is not hardwired into the workbench. Created attachment 213981 [details]
do not overload NO_CLOSE
after having discussed this with Eric on IRC we came to the conclusion that overloading NO_CLOSE is a bad idea.
Pushed to master as http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=e6b7de262207f204d76bf5650a6ff531c5381da2 Thanks Dude ! Verified (visually) in I20120503-1800. |