architecture struggle with actions vs commands [message #104184] |
Sat, 08 November 2003 09:06  |
Eclipse User |
|
|
|
Originally posted by: Lamont_Gilbert.Rigidsoftware.com
I have been trying to keep my actions working on editparts and my commands
working on modles, but its getting difficult.
The two commands I added are causing my problems. Group and Paste. Both
of them create new models. I always think to break it down into multiple
commands, but it never works. this is because one command requires the
output of another, and commands dont chain that way. So I though group
was a orphan + create + add sequence. but the result of the create command
can not be seen by the last add, so I had to scrap it and have my own
group command. But it would be nice if all adds passed eventually through
the same command. I just cant make that happen. Same with paste. its
create + add sequence. but result from create cant be seen in add.
so what I end up with is big commands that are a form of fancy create
command. so I have several commands that create and add but from all
different places.
It does not seem very smooth or architecturily sound. anyone doing
anything different they care to share? or have any ideas or
recommendations? Just does not seem that commands are very stackable.
CL
|
|
|
|
Re: architecture struggle with actions vs commands [message #104306 is a reply to message #104215] |
Sun, 09 November 2003 16:25  |
Eclipse User |
|
|
|
Originally posted by: Lamont_Gilbert.Rigidsoftware.com
On Sat, 08 Nov 2003 20:47:21 -0500, Randy Hudson wrote:
> "CL [dnoyeB] Gilbert" <Lamont_Gilbert@Rigidsoftware.com> wrote in
> message news:pan.2003.11.08.14.06.22.680542@Rigidsoftware.com...
>> I have been trying to keep my actions working on editparts and my
>> commands working on modles, but its getting difficult.
>>
>> The two commands I added are causing my problems. Group and Paste.
>> Both of them create new models. I always think to break it down into
>> multiple commands, but it never works. this is because one command
>> requires the output of another, and commands dont chain that way. So I
>> though group
>
> This is the same problem EMF created. Don't try to use a Command to be
> a factory. Just create a factory, and pass it into the paste commend.
>
>
I solved the problem with my Group action by passing it a factory. but I
was not sure how well this would work for paste. Ill look into it.
CL
|
|
|
Powered by
FUDForum. Page generated in 0.03315 seconds