[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.m2m] Re: [ATL] How to define the xsi:schemaLocation with the transformation rules?
|
Hi Urs,
First, I made the modifications in the ModelRule.
Second, before the matched rules I added the called rule "copyStereoType"
as you suggested.
After that, I modified the copy class rule to call the "copyStereotype"
rule.
rule Class {
from s : UML2!"uml::Class" (
if thisModule.inElements->includes(s) then
s.oclIsTypeOf(UML2!"uml::Class")
else false endif)
to t : UML2!"uml::Class" mapsTo s (
name <- s.name,
visibility <- s.visibility,
...
ownedOperation <- s.ownedOperation,
ownedReception <- s.ownedReception)
do
{
thisModule.copyStereoType(s,t);
}
}
Last, I removed the ProfileApplication rule as you mentioned to avoid
doubling profile applications.
When I execute the transformations an error occurs:
SEVERE: ****** BEGIN Stack Trace
SEVERE: message: ERROR: exception during invocation of operation
applyStereotype on UML2!Class (java method: public
org.eclipse.emf.ecore.EObject
org.eclipse.uml2.uml.internal.impl.ElementImpl.applyStereotype(org.eclipse.uml2.uml.Stereotype))
SEVERE: exception:
SEVERE: org.eclipse.uml2.uml.internal.impl.StereotypeImpl@13afcfb (name:
TestStereotype, visibility: <unset>) (isLeaf: false, visibility: public,
isAbstract: false) (isActive: false, isAbstract: false)
java.lang.IllegalArgumentException:
org.eclipse.uml2.uml.internal.impl.StereotypeImpl@13afcfb (name:
TestStereotype, 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.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.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)
SEVERE: ****** END Stack Trace
INFO: Execution terminated due to error (see launch configuration to allow
continuation after errors).
Am I missing something?
Cheers,
Bruno.