ConnectionEditPolicy: REQ_SOURCE_DELETED [message #135545] |
Wed, 02 June 2004 07:44 |
Eclipse User |
|
|
|
Originally posted by: Alexander.Eiken.post.rwth-aachen.de
Hi,
the overview of the GEF API specification says that a
ConnectionEditPolicy can handle the request REQ_SOURCE_DELETED. The
request has the task to delete a connection from the model, if the
source node has been deleted. But in the current GEF reference I cannot
find the RequestConstant in the corresponding interface.
Doesn't these requests exist any more? Is there another way to delete
the connection to or from a node that has to be deleted?
Thanks, Alexander.
|
|
|
Re: ConnectionEditPolicy: REQ_SOURCE_DELETED [message #135634 is a reply to message #135545] |
Wed, 02 June 2004 14:21 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
The better way to do this is in the commnd which deletes the node itself.
That way you can delete the node in the outline view, or if the connections
are being filtered out of the diagram for some reason. It's more
straightforward too.
"Alexander Eiken" <Alexander.Eiken@post.rwth-aachen.de> wrote in message
news:c9k00s$1ik$1@eclipse.org...
> Hi,
>
> the overview of the GEF API specification says that a
> ConnectionEditPolicy can handle the request REQ_SOURCE_DELETED. The
> request has the task to delete a connection from the model, if the
> source node has been deleted. But in the current GEF reference I cannot
> find the RequestConstant in the corresponding interface.
>
> Doesn't these requests exist any more? Is there another way to delete
> the connection to or from a node that has to be deleted?
>
> Thanks, Alexander.
|
|
|
Re: ConnectionEditPolicy: REQ_SOURCE_DELETED [message #135712 is a reply to message #135634] |
Wed, 02 June 2004 15:43 |
Eclipse User |
|
|
|
Originally posted by: Alexander.Eiken.post.rwth-aachen.de
Right now I'm doing it in the commands. But I have following problem:
If a select several nodes and connections(which are connected to some of
the selected nodes) and delete them, I always get some errors. A command
to delete a conenction cannot be executed, because the conenction has
already been deleted before. This connection has been deleted as a part
of the command that has deleted the source or target node of the connection.
I think GEF executes a delete request for each of the selected nodes and
connections, even though a connection has been removed before.
How can I solve this problem? Any suggestions would be appreciated.
Randy Hudson wrote:
> The better way to do this is in the commnd which deletes the node itself.
> That way you can delete the node in the outline view, or if the connections
> are being filtered out of the diagram for some reason. It's more
> straightforward too.
>
> "Alexander Eiken" <Alexander.Eiken@post.rwth-aachen.de> wrote in message
> news:c9k00s$1ik$1@eclipse.org...
>
>>Hi,
>>
>>the overview of the GEF API specification says that a
>>ConnectionEditPolicy can handle the request REQ_SOURCE_DELETED. The
>>request has the task to delete a connection from the model, if the
>>source node has been deleted. But in the current GEF reference I cannot
>>find the RequestConstant in the corresponding interface.
>>
>>Doesn't these requests exist any more? Is there another way to delete
>>the connection to or from a node that has to be deleted?
>>
>>Thanks, Alexander.
>
>
>
|
|
|
Re: ConnectionEditPolicy: REQ_SOURCE_DELETED [message #135725 is a reply to message #135712] |
Wed, 02 June 2004 15:55 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Your commands need to be smarter. When execute is called, then they should
check which connections are still around. This problem occurs when you
delete both the source and target node of a single connection. Both nodes
think they should delete the connection too. The first one to execute
should do this, then the next one should no longer see the connection when
it goes to execute.
"Alexander Eiken" <Alexander.Eiken@post.rwth-aachen.de> wrote in message
news:c9ks6q$9lm$1@eclipse.org...
> Right now I'm doing it in the commands. But I have following problem:
>
> If a select several nodes and connections(which are connected to some of
> the selected nodes) and delete them, I always get some errors. A command
> to delete a conenction cannot be executed, because the conenction has
> already been deleted before. This connection has been deleted as a part
> of the command that has deleted the source or target node of the
connection.
>
> I think GEF executes a delete request for each of the selected nodes and
> connections, even though a connection has been removed before.
>
> How can I solve this problem? Any suggestions would be appreciated.
>
>
> Randy Hudson wrote:
> > The better way to do this is in the commnd which deletes the node
itself.
> > That way you can delete the node in the outline view, or if the
connections
> > are being filtered out of the diagram for some reason. It's more
> > straightforward too.
> >
> > "Alexander Eiken" <Alexander.Eiken@post.rwth-aachen.de> wrote in message
> > news:c9k00s$1ik$1@eclipse.org...
> >
> >>Hi,
> >>
> >>the overview of the GEF API specification says that a
> >>ConnectionEditPolicy can handle the request REQ_SOURCE_DELETED. The
> >>request has the task to delete a connection from the model, if the
> >>source node has been deleted. But in the current GEF reference I cannot
> >>find the RequestConstant in the corresponding interface.
> >>
> >>Doesn't these requests exist any more? Is there another way to delete
> >>the connection to or from a node that has to be deleted?
> >>
> >>Thanks, Alexander.
> >
> >
> >
|
|
|
Re: ConnectionEditPolicy: REQ_SOURCE_DELETED [message #135774 is a reply to message #135712] |
Wed, 02 June 2004 16:08 |
Eclipse User |
|
|
|
Originally posted by: rlemaigr.ulb.ac.be
In the future of my application, I will have the same problem as you...
Now I have two ideas for solving this problem but they are not very =
satisfying :
- add a "removed" flag to the model objects and setting it to true when =
it =
is removed, and checking it in the delete command,
- if the compound delete command is build in the run() method of the =
DeleteAction class provided by gef, disallow the deletion of multiple =
objects (or at least disallow it if the list of selected objects contain=
s =
dependent objects) by extending the DeleteAction class provided by gef a=
nd =
overriding the calculateEnabled method (it should return false if the li=
st =
of selected objects contains dependent objects).
If you find better solutions, please post them here, I'm interested too =
!
(but Randy will surely give us the good answer soon...)
r=E9gis
On Wed, 02 Jun 2004 17:43:09 +0200, Alexander Eiken =
<Alexander.Eiken@post.rwth-aachen.de> wrote:
> Right now I'm doing it in the commands. But I have following problem:
>
> If a select several nodes and connections(which are connected to some =
of =
> the selected nodes) and delete them, I always get some errors. A comma=
nd =
> to delete a conenction cannot be executed, because the conenction has =
=
> already been deleted before. This connection has been deleted as a par=
t =
> of the command that has deleted the source or target node of the =
> connection.
>
> I think GEF executes a delete request for each of the selected nodes a=
nd =
> connections, even though a connection has been removed before.
>
> How can I solve this problem? Any suggestions would be appreciated.
>
>
> Randy Hudson wrote:
>> The better way to do this is in the commnd which deletes the node =
>> itself.
>> That way you can delete the node in the outline view, or if the =
>> connections
>> are being filtered out of the diagram for some reason. It's more
>> straightforward too.
>> "Alexander Eiken" <Alexander.Eiken@post.rwth-aachen.de> wrote in =
>> message
>> news:c9k00s$1ik$1@eclipse.org...
>>
>>> Hi,
>>>
>>> the overview of the GEF API specification says that a
>>> ConnectionEditPolicy can handle the request REQ_SOURCE_DELETED. The
>>> request has the task to delete a connection from the model, if the
>>> source node has been deleted. But in the current GEF reference I can=
not
>>> find the RequestConstant in the corresponding interface.
>>>
>>> Doesn't these requests exist any more? Is there another way to delet=
e
>>> the connection to or from a node that has to be deleted?
>>>
>>> Thanks, Alexander.
>>
-- =
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03087 seconds