Home » Modeling » GMF (Graphical Modeling Framework) » Runtime: how to prevent reconnecting connections?
| | |
Re: Runtime: how to prevent reconnecting connections? [message #66445 is a reply to message #66099] |
Fri, 20 October 2006 14:12 |
Eclipse User |
|
|
|
Originally posted by: vcciubot.uwaterloo.ca
It's a problem with the generated edit helpers. Make sure your version of
getReorientRelationshipCommand gets called. If not, see what the generated
base edit helper is doing.
Note: the edit helper commands are retrieved by your semantic policy.
On Fri, 20 Oct 2006 10:07:53 +0200, Henrik Rentz-Reichert wrote:
> Hi Cherie (the former Cherie Mahoney?),
>
> thanks for the reply.
>
> I tryed this
>
> protected ICommand
> getReorientRelationshipCommand(ReorientRelationshipRequest req) {
> return UnexecutableCommand.INSTANCE;
> }
>
> in my EditHelper of the connection.
> It didn't change the behavior.
>
> Then I went from my maintenance branch of the release product which is
> based on 1.0RC3 of GMF to the HEAD of my trunk which is based on GMF
> 1.0. There everything works as expected.
>
> Can you tell me which change in the Runtime between 1.0RC3 and 1.0 is
> responsible for the changed behavior?
>
> Thanks again,
> Henrik
>
> Cherie Revells wrote:
>> Henrik,
>>
>> Try returning an unexecutable command when reorient should not be
>> supported.
>>
>> Regards,
>> Cherie
>>
>> Henrik Rentz-Reichert wrote:
>>> Hi runtime team,
>>>
>>> I have overridden the
>>> getReorientRelationshipCommand(ReorientRelationshipRequest) method in
>>> the EditHelpers for my connections.
>>>
>>> The returned command is executable only for valid connections (I have
>>> several node types and two connection types).
>>>
>>> However, still it is possible to reconnect to an invalid node which
>>> makes my model inconsistent.
>>>
>>>
>>> When digging into it I found that
>>> getReconnectTargetCommand(ReconnectRequest) of the
>>> GraphicalNodeEditPolicy is responsible for that.
>>>
>>>
>>> How can I prevent a connection from being reconnected to an invalid (in
>>> the sense of my model) edit part? Do I have to subclass the
>>> GraphicalNodeEditPolicy and replace it by the subclass?
>>>
>>> Thanks,
>>> Henrik
>>>
>>> PS: I don't use any generated code.
|
|
|
Re: Runtime: how to prevent reconnecting connections? [message #68835 is a reply to message #66445] |
Wed, 25 October 2006 06:50 |
Henrik Rentz-Reichert Messages: 261 Registered: July 2009 |
Senior Member |
|
|
Hi Vlad,
I don't use generated code. My editor is built right upon the GMF
runtime. The getReorientRelationshipCommand() of my EditHelper is called
and canExecute() of the returned command is evaluated with result false.
But then the framework proceeds and comes up with an executable command...
Kind regards,
Henrik
Vlad Ciubotariu wrote:
> It's a problem with the generated edit helpers. Make sure your version of
> getReorientRelationshipCommand gets called. If not, see what the generated
> base edit helper is doing.
>
> Note: the edit helper commands are retrieved by your semantic policy.
>
>
> On Fri, 20 Oct 2006 10:07:53 +0200, Henrik Rentz-Reichert wrote:
>
>> Hi Cherie (the former Cherie Mahoney?),
>>
>> thanks for the reply.
>>
>> I tryed this
>>
>> protected ICommand
>> getReorientRelationshipCommand(ReorientRelationshipRequest req) {
>> return UnexecutableCommand.INSTANCE;
>> }
>>
>> in my EditHelper of the connection.
>> It didn't change the behavior.
>>
>> Then I went from my maintenance branch of the release product which is
>> based on 1.0RC3 of GMF to the HEAD of my trunk which is based on GMF
>> 1.0. There everything works as expected.
>>
>> Can you tell me which change in the Runtime between 1.0RC3 and 1.0 is
>> responsible for the changed behavior?
>>
>> Thanks again,
>> Henrik
>>
>> Cherie Revells wrote:
>>> Henrik,
>>>
>>> Try returning an unexecutable command when reorient should not be
>>> supported.
>>>
>>> Regards,
>>> Cherie
>>>
>>> Henrik Rentz-Reichert wrote:
>>>> Hi runtime team,
>>>>
>>>> I have overridden the
>>>> getReorientRelationshipCommand(ReorientRelationshipRequest) method in
>>>> the EditHelpers for my connections.
>>>>
>>>> The returned command is executable only for valid connections (I have
>>>> several node types and two connection types).
>>>>
>>>> However, still it is possible to reconnect to an invalid node which
>>>> makes my model inconsistent.
>>>>
>>>>
>>>> When digging into it I found that
>>>> getReconnectTargetCommand(ReconnectRequest) of the
>>>> GraphicalNodeEditPolicy is responsible for that.
>>>>
>>>>
>>>> How can I prevent a connection from being reconnected to an invalid (in
>>>> the sense of my model) edit part? Do I have to subclass the
>>>> GraphicalNodeEditPolicy and replace it by the subclass?
>>>>
>>>> Thanks,
>>>> Henrik
>>>>
>>>> PS: I don't use any generated code.
>
|
|
|
Re: Runtime: how to prevent reconnecting connections? [message #70292 is a reply to message #68835] |
Thu, 26 October 2006 15:12 |
Cherie Revells Messages: 299 Registered: July 2009 |
Senior Member |
|
|
Henrik,
Yes, this is the former Cherie Mahoney. I got married this summer. :-)
I will test this out with the latest code and get back to you.
- Cherie
Henrik Rentz-Reichert wrote:
> Hi Vlad,
>
> I don't use generated code. My editor is built right upon the GMF
> runtime. The getReorientRelationshipCommand() of my EditHelper is called
> and canExecute() of the returned command is evaluated with result false.
> But then the framework proceeds and comes up with an executable command...
>
> Kind regards,
> Henrik
>
> Vlad Ciubotariu wrote:
>> It's a problem with the generated edit helpers. Make sure your version of
>> getReorientRelationshipCommand gets called. If not, see what the generated
>> base edit helper is doing.
>>
>> Note: the edit helper commands are retrieved by your semantic policy.
>>
>>
>> On Fri, 20 Oct 2006 10:07:53 +0200, Henrik Rentz-Reichert wrote:
>>
>>> Hi Cherie (the former Cherie Mahoney?),
>>>
>>> thanks for the reply.
>>>
>>> I tryed this
>>>
>>> protected ICommand
>>> getReorientRelationshipCommand(ReorientRelationshipRequest req) {
>>> return UnexecutableCommand.INSTANCE;
>>> }
>>>
>>> in my EditHelper of the connection.
>>> It didn't change the behavior.
>>>
>>> Then I went from my maintenance branch of the release product which is
>>> based on 1.0RC3 of GMF to the HEAD of my trunk which is based on GMF
>>> 1.0. There everything works as expected.
>>>
>>> Can you tell me which change in the Runtime between 1.0RC3 and 1.0 is
>>> responsible for the changed behavior?
>>>
>>> Thanks again,
>>> Henrik
>>>
>>> Cherie Revells wrote:
>>>> Henrik,
>>>>
>>>> Try returning an unexecutable command when reorient should not be
>>>> supported.
>>>>
>>>> Regards,
>>>> Cherie
>>>>
>>>> Henrik Rentz-Reichert wrote:
>>>>> Hi runtime team,
>>>>>
>>>>> I have overridden the
>>>>> getReorientRelationshipCommand(ReorientRelationshipRequest) method in
>>>>> the EditHelpers for my connections.
>>>>>
>>>>> The returned command is executable only for valid connections (I have
>>>>> several node types and two connection types).
>>>>>
>>>>> However, still it is possible to reconnect to an invalid node which
>>>>> makes my model inconsistent.
>>>>>
>>>>>
>>>>> When digging into it I found that
>>>>> getReconnectTargetCommand(ReconnectRequest) of the
>>>>> GraphicalNodeEditPolicy is responsible for that.
>>>>>
>>>>>
>>>>> How can I prevent a connection from being reconnected to an invalid (in
>>>>> the sense of my model) edit part? Do I have to subclass the
>>>>> GraphicalNodeEditPolicy and replace it by the subclass?
>>>>>
>>>>> Thanks,
>>>>> Henrik
>>>>>
>>>>> PS: I don't use any generated code.
|
|
|
Re: Runtime: how to prevent reconnecting connections? [message #71024 is a reply to message #70292] |
Fri, 27 October 2006 16:37 |
Cherie Revells Messages: 299 Registered: July 2009 |
Senior Member |
|
|
Henrik,
I tried out the Logic Diagram Example using the code in GMF head. I do
not notice this problem when reorienting wires and note attachments.
Could you figure out what is returning the executable command?
- Cherie
Cherie Revells wrote:
> Henrik,
>
> Yes, this is the former Cherie Mahoney. I got married this summer. :-)
>
> I will test this out with the latest code and get back to you.
>
> - Cherie
>
> Henrik Rentz-Reichert wrote:
>> Hi Vlad,
>>
>> I don't use generated code. My editor is built right upon the GMF
>> runtime. The getReorientRelationshipCommand() of my EditHelper is called
>> and canExecute() of the returned command is evaluated with result false.
>> But then the framework proceeds and comes up with an executable
>> command...
>>
>> Kind regards,
>> Henrik
>>
>> Vlad Ciubotariu wrote:
>>> It's a problem with the generated edit helpers. Make sure your
>>> version of
>>> getReorientRelationshipCommand gets called. If not, see what the
>>> generated
>>> base edit helper is doing.
>>> Note: the edit helper commands are retrieved by your semantic policy.
>>>
>>>
>>> On Fri, 20 Oct 2006 10:07:53 +0200, Henrik Rentz-Reichert wrote:
>>>
>>>> Hi Cherie (the former Cherie Mahoney?),
>>>>
>>>> thanks for the reply.
>>>>
>>>> I tryed this
>>>>
>>>> protected ICommand
>>>> getReorientRelationshipCommand(ReorientRelationshipRequest req) {
>>>> return UnexecutableCommand.INSTANCE;
>>>> }
>>>>
>>>> in my EditHelper of the connection.
>>>> It didn't change the behavior.
>>>>
>>>> Then I went from my maintenance branch of the release product which is
>>>> based on 1.0RC3 of GMF to the HEAD of my trunk which is based on GMF
>>>> 1.0. There everything works as expected.
>>>>
>>>> Can you tell me which change in the Runtime between 1.0RC3 and 1.0 is
>>>> responsible for the changed behavior?
>>>>
>>>> Thanks again,
>>>> Henrik
>>>>
>>>> Cherie Revells wrote:
>>>>> Henrik,
>>>>>
>>>>> Try returning an unexecutable command when reorient should not be
>>>>> supported.
>>>>>
>>>>> Regards,
>>>>> Cherie
>>>>>
>>>>> Henrik Rentz-Reichert wrote:
>>>>>> Hi runtime team,
>>>>>>
>>>>>> I have overridden the
>>>>>> getReorientRelationshipCommand(ReorientRelationshipRequest) method in
>>>>>> the EditHelpers for my connections.
>>>>>>
>>>>>> The returned command is executable only for valid connections (I have
>>>>>> several node types and two connection types).
>>>>>>
>>>>>> However, still it is possible to reconnect to an invalid node which
>>>>>> makes my model inconsistent.
>>>>>>
>>>>>>
>>>>>> When digging into it I found that
>>>>>> getReconnectTargetCommand(ReconnectRequest) of the
>>>>>> GraphicalNodeEditPolicy is responsible for that.
>>>>>>
>>>>>>
>>>>>> How can I prevent a connection from being reconnected to an
>>>>>> invalid (in
>>>>>> the sense of my model) edit part? Do I have to subclass the
>>>>>> GraphicalNodeEditPolicy and replace it by the subclass?
>>>>>>
>>>>>> Thanks,
>>>>>> Henrik
>>>>>>
>>>>>> PS: I don't use any generated code.
|
|
|
Goto Forum:
Current Time: Fri Jan 03 03:25:31 GMT 2025
Powered by FUDForum. Page generated in 0.04383 seconds
|