Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How do I "overload" an already existing EditHelper?
How do I "overload" an already existing EditHelper? [message #114613] Tue, 27 March 2007 12:06 Go to next message
adotor is currently offline adotorFriend
Messages: 46
Registered: July 2009
Member
Hello,

I have a custom project for my generated GMF-editor. As my custom-plugin
expands functionality I want to add new commands that are retrieved by
the EditHelper.

How do I override the already generated EditHelper. I played around with
the type extension points, but did not recieve the desired result so
far. I've set a break point in my new EditHelper but it is not called.

Greetings,
Alexander
Re: How do I "overload" an already existing EditHelper? [message #114663 is a reply to message #114613] Tue, 27 March 2007 12:35 Go to previous messageGo to next message
Linda Damus is currently offline Linda DamusFriend
Messages: 85
Registered: July 2009
Member
Alexander,

You can augment the command returned by an EditHelper by binding an
IEditHelperAdvice to its element type using an adviceBinding element in
the elementTypes extension point. This will result in a composite
command that contains both the command from the EditHelper in your
generated editor plugin _and_ the command from your IEditHelperAdvice.

If you wish to completely _replace_ the command from the EditHelper, you
can set the REPLACE_DEFAULT_COMMAND parameter from your
IEditHelperAdvice, like this:

request.setParameter(IEditCommandRequest.REPLACE_DEFAULT_COM MAND,
Boolean.TRUE);

There is an example of this in the
HalfAdderAdvice#getBeforeConfigureCommand in the runtime logic example.
In this example the advice is contributed by a specializationType
element in the elementTypes extension point because the half adder is a
type in its own right, but the same idea applies when you're using the
adviceBinding element.

Hope that helps,
Linda



Alexander Dotor wrote:
> Hello,
>
> I have a custom project for my generated GMF-editor. As my custom-plugin
> expands functionality I want to add new commands that are retrieved by
> the EditHelper.
>
> How do I override the already generated EditHelper. I played around with
> the type extension points, but did not recieve the desired result so
> far. I've set a break point in my new EditHelper but it is not called.
>
> Greetings,
> Alexander
Re: How do I "overload" an already existing EditHelper? [message #114774 is a reply to message #114663] Tue, 27 March 2007 14:47 Go to previous message
adotor is currently offline adotorFriend
Messages: 46
Registered: July 2009
Member
Hi Linda,

yes, that was exactly what I was looking for.

Thank you very much,
Alexander
Previous Topic:gmf, using 2 xsd models
Next Topic:GMF 1.0.3 - Customizing doubt
Goto Forum:
  


Current Time: Fri Jul 05 04:24:20 GMT 2024

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

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

Back to the top