after configure command executed twice? [message #214609] |
Mon, 05 January 2009 23:23 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Linda Damus 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
|
|
|
Powered by
FUDForum. Page generated in 0.02678 seconds