Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » How to change the name of the CreateChildAction once created
How to change the name of the CreateChildAction once created [message #425474] Thu, 27 November 2008 05:27 Go to next message
Asha Ramegowda is currently offline Asha RamegowdaFriend
Messages: 77
Registered: July 2009
Member
Hi,

I have a requirement where I will be returning more than one different
instances of an element. I am able to do that by returning this multiple
instances as the child descriptors of the parent element. So, this away I
will be able to collect a set of actions for the same on the sub menu that
appears on the context menu, when the element is selected.
But, I am not aware how to change the name of the ChildCreateActions that
get collected as part of my ActionBarContributor's sub menu. I am not able
to see any thing like a setName on them.

I got to know about CommandActionDelegate, but not sure where to implement
it. I guess my CreateChildActions come already implementing that.

Can somebody tell me how to do this?

Thank you,

Asha R.
Re: How to change the name of the CreateChildAction once created [message #425476 is a reply to message #425474] Thu, 27 November 2008 06:07 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Asha,

The CreateChildCommand itself could be specialized to return something
different for getText.


Asha R wrote:
> Hi,
>
> I have a requirement where I will be returning more than one different
> instances of an element. I am able to do that by returning this
> multiple instances as the child descriptors of the parent element. So,
> this away I will be able to collect a set of actions for the same on
> the sub menu that appears on the context menu, when the element is
> selected.
> But, I am not aware how to change the name of the ChildCreateActions
> that get collected as part of my ActionBarContributor's sub menu. I am
> not able to see any thing like a setName on them.
>
> I got to know about CommandActionDelegate, but not sure where to
> implement it. I guess my CreateChildActions come already implementing
> that.
>
> Can somebody tell me how to do this?
>
> Thank you,
>
> Asha R.
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to change the name of the CreateChildAction once created [message #425478 is a reply to message #425476] Thu, 27 November 2008 07:50 Go to previous messageGo to next message
Asha Ramegowda is currently offline Asha RamegowdaFriend
Messages: 77
Registered: July 2009
Member
Hi Ed,

Thanks for the reply.
But, I wish I would not specialize the CreateChildCommand. Can I
specialize the CreateChildAction and do something?

Thank you,

Asha R.
Re: How to change the name of the CreateChildAction once created [message #425492 is a reply to message #425478] Thu, 27 November 2008 21:54 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Asha,

I suppose you could, yes. Specializing the command ensures that your
changes work in any editor that uses your object, but I suppose that
might not matter to you.


Asha R wrote:
> Hi Ed,
>
> Thanks for the reply.
> But, I wish I would not specialize the CreateChildCommand. Can I
> specialize the CreateChildAction and do something?
>
> Thank you,
>
> Asha R.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:CDO view does not start correct model editor
Next Topic:Some questions about EMF.genmodel properties
Goto Forum:
  


Current Time: Fri Apr 19 21:10:46 GMT 2024

Powered by FUDForum. Page generated in 0.02807 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top