Hide Compartment programatically [message #483754] |
Wed, 02 September 2009 16:10  |
Eclipse User |
|
|
|
Hi,
is there a way to hide a compartment completely. Like the way the context
menu does it:
rightclick on node -> filters -> Hide/Show Compartment -> Compartment
only.?
I tried setting the notationView.setVisible() of the compartmenteditpart
to false but that didn't do the trick.
Best regards,
Artur
|
|
|
|
Re: Hide Compartment programatically [message #483893 is a reply to message #483823] |
Thu, 03 September 2009 10:09  |
Eclipse User |
|
|
|
Hello Alex,
thank you for your reply. Unfortunately when I call
AllCompartmentsAction.createHideAllCompartmentsAction() and run that
action, I don't get the result. Actually, nothing visual is happening at
all. Plus the method seems to be discuraged.
However, I debugged the notification in my compartment and found that one
feature is changed while hiding the compartment.
So, if I call
MyCompartment.setStructuralFeatureValue(NotationPackage.Lite rals.VIEW__VISIBLE,
false); on the editpart I want to hide the compartment, it gets hidden. If
I iterate over all my editparts I can hide all the compartments.
I don't know if that is the right approach. I'd rather use the action, but
somehow it doesn't work for me.
Alex Shatalin wrote:
> Hello Artur,
> See
org.eclipse.gmf.runtime.diagram.ui.actions.internal.AllCompa rtmentsAction
> implementation.
> -----------------
> Alex Shatalin
|
|
|
Powered by
FUDForum. Page generated in 0.04535 seconds