[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.m2m] [ATL][UML] set stereotyped tagged value

Hi all,
I have a strange problem while developing an ATL transformation using UML2.

This is a simplified version of a rule:

rule port_SAport2  {
  from
    s_9 : saveccm!Port
  to
    t_15 : UML2!Port (
      name <- s_9.name,
    )
    t_16 : UML2!Component()
  do {
   t_15.applyStereotype(thisModule.SAportStereotype);
   t_16.applyStereotype(thisModule.SAtypeStereotype);
   t_15.setValue(thisModule.SAportStereotype, 'type', t_16);
  }
}

So, my rule produces a stereotyped UML Port  and I want to set
the value of the 'type' tagged value with t_16.

I tested the helpers and they work, the problem is that if I declare
the type of the 'SAPort' tagged value as a uml:Component everything works,
but if I declare it as a SAtype (that is another stereotype) I get an
exception (listed at the end of this message).

It seems as it does recognize only standard UML elements, and not the
Stereotypes...

I am sure that someone manages to set tagged values with stereotypes,
I hope you will help me!

Ivano

this is the Exception:

GRAVE: ****** BEGIN Stack Trace
GRAVE: 	message: ERROR: exception during invocation of operation
applyStereotype on UML2!Component (java method: public
org.eclipse.emf.ecore.EObject
org.eclipse.uml2.uml.internal.impl.ElementImpl.applyStereotype(org.eclipse.uml2.uml.Stereotype))
GRAVE: 	exception:
GRAVE: org.eclipse.uml2.uml.internal.impl.StereotypeImpl@f701e2 (name:
SAtype, visibility: <unset>) (isLeaf: false, visibility: public,
isAbstract: false) (isActive: false, isAbstract: false)
java.lang.IllegalArgumentException:
org.eclipse.uml2.uml.internal.impl.StereotypeImpl@f701e2 (name: SAtype,
visibility: <unset>) (isLeaf: false, visibility: public, isAbstract:
false) (isActive: false, isAbstract: false)
	at
org.eclipse.uml2.uml.internal.operations.ElementOperations.applyStereotype(ElementOperations.java:1410)
	at
org.eclipse.uml2.uml.internal.impl.ElementImpl.applyStereotype(ElementImpl.java:501)
	at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at
org.eclipse.m2m.atl.drivers.uml24atl.ASMUMLModelElement.realInvoke(ASMUMLModelElement.java:614)
	at
org.eclipse.m2m.atl.drivers.uml24atl.ASMUMLModel.applyDelayedInvocations(ASMUMLModel.java:552)
	at
org.eclipse.m2m.atl.drivers.uml24atl.AtlUML2ModelHandler.saveModel(AtlUML2ModelHandler.java:49)
	at
org.eclipse.m2m.atl.drivers.uml24atl.AtlUML2ModelHandler.saveModel(AtlUML2ModelHandler.java:37)
	at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLauncher(AtlRegularVM.java:362)
	at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLauncher(AtlRegularVM.java:453)
	at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlRegularVM.java:425)
	at
org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDelegate.launch(AtlLaunchConfigurationDelegate.java:35)
	at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:766)
	at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:608)
	at
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:899)
	at
org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlugin.java:1102)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
GRAVE: ****** END Stack Trace
INFO: Execution terminated due to error (see launch configuration to
allow continuation after errors).