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 10:59  |
Eclipse User |
|
|
|
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 07:54   |
Eclipse User |
|
|
|
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 10:26   |
Eclipse User |
|
|
|
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 07:36  |
Eclipse User |
|
|
|
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/
|
|
|
Goto Forum:
Current Time: Wed May 07 14:03:22 EDT 2025
Powered by FUDForum. Page generated in 0.08031 seconds
|