Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Hide Compartment programatically
Hide Compartment programatically [message #483754] Wed, 02 September 2009 20:10 Go to next message
Artur Kronenberg is currently offline Artur KronenbergFriend
Messages: 159
Registered: August 2009
Senior Member
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 08:57 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
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 14:09 Go to previous message
Artur Kronenberg is currently offline Artur KronenbergFriend
Messages: 159
Registered: August 2009
Senior Member
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: Thu Apr 25 04:17:31 GMT 2024

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

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

Back to the top