Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » after configure command executed twice?
after configure command executed twice? [message #214609] Mon, 05 January 2009 23:23 Go to next message
Eclipse UserFriend
Originally posted by: jgreen.upb.de

Hi,
I have created a custom after configuration command and observe that it is called twice with the same request.
How can that be?

Thanks for helping.

Joel
Re: after configure command executed twice? [message #214618 is a reply to message #214609] Mon, 05 January 2009 23:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jgreen.upb.de

I might add that I have three element types for one class in the model, could there be something wrong with the advice
bindings? I have pasted my plugin.xml

<plugin>
<extension
point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
<metamodel
nsURI="http://de.upb.swt.qvt.tgg">
<adviceBinding
class=" de.upb.swt.qvt.tgg.diagram.modellingassist.newedge.EdgeEditH elperAdvice "
id=" de.upb.swt.qvt.tgg.diagram.modellingassist.newedge.EdgeEditH elperAdvice "
inheritance="all"
typeId="de.upb.swt.qvt.tgg.diagram.Edge_4001">
<eContainer></eContainer>
</adviceBinding>
<adviceBinding
class=" de.upb.swt.qvt.tgg.diagram.modellingassist.newedge.EdgeEditH elperAdvice "
id=" de.upb.swt.qvt.tgg.diagram.modellingassist.newedge.EdgeEditH elperAdvice "
inheritance="all"
typeId="de.upb.swt.qvt.tgg.diagram.Edge_4007">
<eContainer></eContainer>
</adviceBinding>
<adviceBinding
class=" de.upb.swt.qvt.tgg.diagram.modellingassist.newedge.EdgeEditH elperAdvice "
id=" de.upb.swt.qvt.tgg.diagram.modellingassist.newedge.EdgeEditH elperAdvice "
inheritance="all"
typeId="de.upb.swt.qvt.tgg.diagram.Edge_4008">
<eContainer></eContainer>
</adviceBinding>
</metamodel>
</extension>
<extension
point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings ">
<binding
context="de.upb.swt.qvt.tgg.diagram.TypeContext">
<advice
ref=" de.upb.swt.qvt.tgg.diagram.modellingassist.newedge.EdgeEditH elperAdvice ">
</advice>
</binding>
</extension>

</plugin>

Joel Greenyer wrote:
> Hi,
> I have created a custom after configuration command and observe that it
> is called twice with the same request.
> How can that be?
>
> Thanks for helping.
>
> Joel
Re: after configure command executed twice? [message #214664 is a reply to message #214618] Tue, 06 January 2009 20:36 Go to previous message
Linda Damus is currently offline Linda DamusFriend
Messages: 85
Registered: July 2009
Member
Joel,

My best guess is that this could happen if the EClasses represented by
Edge_4001, Edge_4007 and Edge_4008 are related.

You've used inheritance "all," which means your advice will be applied
to subtypes. For example, suppose Edge_4007 represents an EClass that
is a subtype of that represented by Edge_4001, when you create a new
Edge_4007 your EdgeEditHelperAdvice will be applied twice - once because
of the advice binding directly to Edge_4007, and once because of the
advice binding inherited from Edge_4001.

If this is your case, then you can just remove the advice binding for
Edge_4007 and inherit the behaviour from Edge_4001.

Hope that helps,
Linda


Joel Greenyer wrote:
> I might add that I have three element types for one class in the model,
> could there be something wrong with the advice bindings? I have pasted
> my plugin.xml
>
> <plugin>
> <extension
> point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
> <metamodel
> nsURI="http://de.upb.swt.qvt.tgg">
> <adviceBinding
>
> class=" de.upb.swt.qvt.tgg.diagram.modellingassist.newedge.EdgeEditH elperAdvice "
>
>
> id=" de.upb.swt.qvt.tgg.diagram.modellingassist.newedge.EdgeEditH elperAdvice "
>
> inheritance="all"
> typeId="de.upb.swt.qvt.tgg.diagram.Edge_4001">
> <eContainer></eContainer>
> </adviceBinding>
> <adviceBinding
>
> class=" de.upb.swt.qvt.tgg.diagram.modellingassist.newedge.EdgeEditH elperAdvice "
>
>
> id=" de.upb.swt.qvt.tgg.diagram.modellingassist.newedge.EdgeEditH elperAdvice "
>
> inheritance="all"
> typeId="de.upb.swt.qvt.tgg.diagram.Edge_4007">
> <eContainer></eContainer>
> </adviceBinding>
> <adviceBinding
>
> class=" de.upb.swt.qvt.tgg.diagram.modellingassist.newedge.EdgeEditH elperAdvice "
>
>
> id=" de.upb.swt.qvt.tgg.diagram.modellingassist.newedge.EdgeEditH elperAdvice "
>
> inheritance="all"
> typeId="de.upb.swt.qvt.tgg.diagram.Edge_4008">
> <eContainer></eContainer>
> </adviceBinding>
> </metamodel>
> </extension>
> <extension
> point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings ">
> <binding
> context="de.upb.swt.qvt.tgg.diagram.TypeContext">
> <advice
>
> ref=" de.upb.swt.qvt.tgg.diagram.modellingassist.newedge.EdgeEditH elperAdvice ">
>
> </advice>
> </binding>
> </extension>
>
> </plugin>
>
> Joel Greenyer wrote:
>> Hi,
>> I have created a custom after configuration command and observe that
>> it is called twice with the same request.
>> How can that be?
>>
>> Thanks for helping.
>>
>> Joel
Previous Topic:how to add inheritance to my own editpart in gmf model
Next Topic:Saving a Diagram as a GIF
Goto Forum:
  


Current Time: Thu Apr 25 23:55:33 GMT 2024

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

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

Back to the top