Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » [E4AP] Hiding Ui Elements
[E4AP] Hiding Ui Elements [message #915604] Mon, 17 September 2012 12:10 Go to next message
Eclipse UserFriend
Hello

From reading Bug 372211 I understand, that the attribute toBeRendered should be used to hide UIElements. I played with this and found out that setting toBeRendered = false has different results for different parts of the model:

a) Used on a Part, PartStack, PartSash it will destroy the element and remove it from the model
b) Used on a HandledMenuItem or HandledToolItem it will hide the element but leave it in the model

This inconsistency makes it difficult to work with persisted models. What is the desired behaviour?

I wanted to hide ui elements without removing them from the model, so I can show/remove elements based on user settings and/or security credentials. Of course this implies, that I would also like to be able to reactivate an element. Is using toBeRendered the best practise in this case?

Thanks
Christoph

[Updated on: Mon, 17 September 2012 12:10] by Moderator

Re: [E4Ap] Hiding Ui Elements [message #915630 is a reply to message #915604] Mon, 17 September 2012 12:59 Go to previous messageGo to next message
Eclipse UserFriend
[Sorry thunderbird since the last update has a direct reply resending to
newsgroup]

Am 17.09.12 18:10, schrieb Christoph Keimel:
> Hello
>
> From reading https://bugs.eclipse.org/bugs/show_bug.cgi?id=372211 I
> understand, that the attribute toBeRendered should be used to hide
> UIElements. I played with this and found out that setting toBeRendered =
> false has different results for different parts of the model:
>
> a) Used on a Part, PartStack, PartSash it will destroy the element and
> remove it from the model
> b) Used on a HandledMenuItem or HandledToolItem it will hide the element
> but leave it in the model

Are you sure about that? IIRC e.g. parts are only removed from the model
in case they are marked to do so (through EPartService#REMOVE_ON_HIDE_TAG).

Having worked on the JavaFx renderers I know for sure that at least
there toBeRendered does not result in removal from the model but only
from the UI, so I'd be suprised if this is different with the SWT ones.

Tom
Re: [E4Ap] Hiding Ui Elements [message #915902 is a reply to message #915630] Tue, 18 September 2012 03:26 Go to previous message
Eclipse UserFriend
Hi Tom

thanks for the quick reply. You are right ... as a test case revealed. We had a bug in our code causing the problem. Good to know we are on the right track.

Greetings
Christoph
Previous Topic:Wizard "Eclipse 4 Application Project" misses to add "org.w3c.dom.events" plugin
Next Topic:Multiple E4 Applications in one product?
Goto Forum:
  


Current Time: Sun Jul 13 07:43:11 EDT 2025

Powered by FUDForum. Page generated in 0.03227 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top