Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Hide Compartment programatically
Hide Compartment programatically [message #483754] Wed, 02 September 2009 16:10 Go to next message
Eclipse UserFriend
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 #483823 is a reply to message #483754] Thu, 03 September 2009 04:57 Go to previous messageGo to next message
Eclipse UserFriend
Hello Artur,

See org.eclipse.gmf.runtime.diagram.ui.actions.internal.AllCompa rtmentsAction
implementation.

-----------------
Alex Shatalin
Re: Hide Compartment programatically [message #483893 is a reply to message #483823] Thu, 03 September 2009 10:09 Go to previous message
Eclipse UserFriend
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
Previous Topic:Create a circle and Square
Next Topic:Not that I title to put
Goto Forum:
  


Current Time: Sun Jul 06 06:29:43 EDT 2025

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

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

Back to the top