Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Hide elements via setVisible doesn't work correctly
Hide elements via setVisible doesn't work correctly [message #90510] Mon, 08 January 2007 15:59 Go to next message
Eclipse UserFriend
Originally posted by: daniel-p.gmx.de

Hey there,

I have following problem, but I don't know if it is my fault or maybe a =
=

bug on gmf side.
I have a diagram, which is closed. Now I search for certain nodes and =

edges in this diagram and hide them via:

....
TransactionalEditingDomain te =3D =

TransactionalEditingDomain.Registry.INSTANCE.getEditingDomai n( "xxx");
te.getCommandStack().execute(SetCommand.create(te, view, =

NotationPackage.eINSTANCE.getView_Visible() , new Boolean(b)));
....

When I now open the diagram, everything worked fine. But when I do the =

same with a diagram, which is already open and then hide some elements, =
=

not all edges are invisible, some still remain. Now after closing and =

reopening the diagram everything looks fine again.

Cheers,

Dan
Re: Hide elements via setVisible doesn't work correctly [message #90877 is a reply to message #90510] Tue, 09 January 2007 12:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel-p.gmx.de

Ok, I found out a little bit more. When the diagram is opened and I set =
=

connections to invisible and reset them to visible, they are drawen from=
=

the upper left corner of the diagram in the right down direction. After =
=

closing and reopening the diagram everything is ok. Does anybody know a =
=

workaround for this problem?

Dan

On Mon, 08 Jan 2007 16:59:44 +0100, Daniel Pech <daniel-p@gmx.de> wrote:=


> Hey there,
>
> I have following problem, but I don't know if it is my fault or maybe =
a =

> bug on gmf side.
> I have a diagram, which is closed. Now I search for certain nodes and =
=

> edges in this diagram and hide them via:
>
> ...
> TransactionalEditingDomain te =3D =

> TransactionalEditingDomain.Registry.INSTANCE.getEditingDomai n( "xxx");
> te.getCommandStack().execute(SetCommand.create(te, view, =

> NotationPackage.eINSTANCE.getView_Visible() , new Boolean(b)));
> ...
>
> When I now open the diagram, everything worked fine. But when I do the=
=

> same with a diagram, which is already open and then hide some elements=
, =

> not all edges are invisible, some still remain. Now after closing and =
=

> reopening the diagram everything looks fine again.
>
> Cheers,
>
> Dan



-- =

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Re: Hide elements via setVisible doesn't work correctly [message #119219 is a reply to message #90877] Fri, 13 April 2007 14:26 Go to previous messageGo to next message
Andreas Schuster is currently offline Andreas SchusterFriend
Messages: 27
Registered: July 2009
Junior Member
hi,
i'm dealing with this problem at the moment.
it seams that changing the visibility of semantic elements (e.g.
ShapeNodeEditPart) doesn't affect the
CannonicalEditPolicy/CanonicalConnectionEditPolicy which are responsible
for refreshing the connection edit parts.
i've read some other threads, but they are all about removing semantic
elements from diagram.

here is my scenario:
1. making elements invisible
node A is linked with node B via connection a->b.
hidding node A or B doesn't remove the connection a->b.
hidding noda A and B does remove the connection too.

2. making elements visible
make node A and B visible, also makes the connection visible. but like
daniel said, the connection is drawn from upper left corner to right
down direction. hide and show node A a second time (only node A!), or
reopening the diagram, resets the connection to the right location again.

any ideas?

andy

Daniel Pech schrieb:
> Ok, I found out a little bit more. When the diagram is opened and I set
> connections to invisible and reset them to visible, they are drawen from
> the upper left corner of the diagram in the right down direction. After
> closing and reopening the diagram everything is ok. Does anybody know a
> workaround for this problem?
>
> Dan
>
> On Mon, 08 Jan 2007 16:59:44 +0100, Daniel Pech <daniel-p@gmx.de> wrote:
>
>> Hey there,
>>
>> I have following problem, but I don't know if it is my fault or maybe
>> a bug on gmf side.
>> I have a diagram, which is closed. Now I search for certain nodes and
>> edges in this diagram and hide them via:
>>
>> ...
>> TransactionalEditingDomain te =
>> TransactionalEditingDomain.Registry.INSTANCE.getEditingDomai n( "xxx");
>> te.getCommandStack().execute(SetCommand.create(te, view,
>> NotationPackage.eINSTANCE.getView_Visible() , new Boolean(b)));
>> ...
>>
>> When I now open the diagram, everything worked fine. But when I do the
>> same with a diagram, which is already open and then hide some
>> elements, not all edges are invisible, some still remain. Now after
>> closing and reopening the diagram everything looks fine again.
>>
>> Cheers,
>>
>> Dan
>
>
>
> --Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Re: Hide elements via setVisible doesn't work correctly [message #162299 is a reply to message #119219] Fri, 23 November 2007 12:36 Go to previous message
Eclipse UserFriend
Originally posted by: daniel-p.gmx.de

Hey,

is it still relevant to you? I detected the causing problem. The order
of setting the elements is important. First you have to set the nodes
visbile, then the edges. And when you're hiding the nodes and edges you
have to do it the other way aroung.

Cheers,
Dan

Andreas Schuster schrieb:
> hi,
> i'm dealing with this problem at the moment.
> it seams that changing the visibility of semantic elements (e.g.
> ShapeNodeEditPart) doesn't affect the
> CannonicalEditPolicy/CanonicalConnectionEditPolicy which are responsible
> for refreshing the connection edit parts.
> i've read some other threads, but they are all about removing semantic
> elements from diagram.
>
> here is my scenario:
> 1. making elements invisible
> node A is linked with node B via connection a->b.
> hidding node A or B doesn't remove the connection a->b.
> hidding noda A and B does remove the connection too.
>
> 2. making elements visible
> make node A and B visible, also makes the connection visible. but like
> daniel said, the connection is drawn from upper left corner to right
> down direction. hide and show node A a second time (only node A!), or
> reopening the diagram, resets the connection to the right location again.
>
> any ideas?
>
> andy
>
> Daniel Pech schrieb:
>> Ok, I found out a little bit more. When the diagram is opened and I
>> set connections to invisible and reset them to visible, they are
>> drawen from the upper left corner of the diagram in the right down
>> direction. After closing and reopening the diagram everything is ok.
>> Does anybody know a workaround for this problem?
>>
>> Dan
>>
>> On Mon, 08 Jan 2007 16:59:44 +0100, Daniel Pech <daniel-p@gmx.de> wrote:
>>
>>> Hey there,
>>>
>>> I have following problem, but I don't know if it is my fault or maybe
>>> a bug on gmf side.
>>> I have a diagram, which is closed. Now I search for certain nodes and
>>> edges in this diagram and hide them via:
>>>
>>> ...
>>> TransactionalEditingDomain te =
>>> TransactionalEditingDomain.Registry.INSTANCE.getEditingDomai n( "xxx");
>>> te.getCommandStack().execute(SetCommand.create(te, view,
>>> NotationPackage.eINSTANCE.getView_Visible() , new Boolean(b)));
>>> ...
>>>
>>> When I now open the diagram, everything worked fine. But when I do
>>> the same with a diagram, which is already open and then hide some
>>> elements, not all edges are invisible, some still remain. Now after
>>> closing and reopening the diagram everything looks fine again.
>>>
>>> Cheers,
>>>
>>> Dan
>>
>>
>>
>> --Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Previous Topic:Super newbie question
Next Topic:GMF and XML
Goto Forum:
  


Current Time: Thu Apr 18 16:35:40 GMT 2024

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

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

Back to the top