Commando and Action [message #48784] |
Wed, 11 December 2002 09:19 |
Eclipse User |
|
|
|
Originally posted by: volker.krebs.abas.de
Hello,
since GEF uses Commandos, I have a lot of Commandos which I would use
in my Context Menus. Also I have Actions which should be registered in
my CommandoStack. But I can't add Commandos to my menus and I can't
add Actions to my CommandoStack.
Am I'm missing something ? I'm not quite sure how the ActionRegistry
comes into play here.
What I want to do now, is something like a ExecuteCommandAction which
gets the Command and the CommandStack and just executes it. So I can
add the Commandos to the menu (via the ExecuteCommandAction) and they
are registered in the CommandStack.
Any comments will be welcome.
Volker
|
|
|
Re: Commando and Action [message #48874 is a reply to message #48784] |
Wed, 11 December 2002 14:40 |
Eclipse User |
|
|
|
Originally posted by: hudsonr.us.eye-bee-em.com
These two words have almost the same meaning in English, but are being used
in two distinct ways withing GEF/Eclipse. I think you have the intended
meanings reversed.
"Volker Krebs" <volker.krebs@abas.de> wrote in message
news:3DF7031D.20854FD3@abas.de...
> Hello,
>
> since GEF uses Commandos, I have a lot of Commandos which I would use
> in my Context Menus. Also I have Actions which should be registered in
> my CommandoStack. But I can't add Commandos to my menus and I can't
> add Actions to my CommandoStack.
>
> Am I'm missing something ? I'm not quite sure how the ActionRegistry
> comes into play here.
We are re-working the way actions are done. More will be posted on this
later.
> What I want to do now, is something like a ExecuteCommandAction which
> gets the Command and the CommandStack and just executes it. So I can
> add the Commandos to the menu (via the ExecuteCommandAction) and they
> are registered in the CommandStack.
>
> Any comments will be welcome.
>
> Volker
|
|
|
Re: Commando and Action [message #48904 is a reply to message #48874] |
Wed, 11 December 2002 15:36 |
Eclipse User |
|
|
|
Originally posted by: volker.krebs.abas.de
Randy Hudson wrote:
>
> These two words have almost the same meaning in English, but are being used
> in two distinct ways withing GEF/Eclipse. I think you have the intended
> meanings reversed.
>
Why ?
If I have a DeleteConnectionCommand for my ConnectionEditPolicy and
I want to add this functionality to the context menu of my Editor
I can't do this, because I can't add Commands to the MenuManager.
Instead of writing a DeleteConnectionAction with exactly the same
functionality I have written an ActionWrapper for Commands.
Volker
|
|
|
Re: Commando and Action [message #48992 is a reply to message #48904] |
Wed, 11 December 2002 23:52 |
Eclipse User |
|
|
|
Originally posted by: hudsonr.us.eye-bee-em.com
Commands contain specific instance data, like which object is being deleted.
You don't want to put a specific Command on the context menu. You want to
put an Action, which obtains a specific DeleteCommand based on what is
selected.
"Volker Krebs" <volker.krebs@abas.de> wrote in message
news:3DF75B8D.E31A88BB@abas.de...
> Randy Hudson wrote:
> >
> > These two words have almost the same meaning in English, but are being
used
> > in two distinct ways withing GEF/Eclipse. I think you have the intended
> > meanings reversed.
> >
> Why ?
> If I have a DeleteConnectionCommand for my ConnectionEditPolicy and
> I want to add this functionality to the context menu of my Editor
> I can't do this, because I can't add Commands to the MenuManager.
>
> Instead of writing a DeleteConnectionAction with exactly the same
> functionality I have written an ActionWrapper for Commands.
>
> Volker
|
|
|
Powered by
FUDForum. Page generated in 0.03331 seconds