[ATL] Set stereotype tagged value [message #85473] |
Tue, 01 July 2008 08:19 |
Eclipse User |
|
|
|
Originally posted by: amivi.fagbegnon.gmail.com
Hello,
I have problems to set tagged value of a stereotype. The stereotype is set
in a do action just before de setValue instruction like this:
do{
out.applyStereotype(ster);
out.setValue(ster,'tagged value name',p.name);
}
out is an property.
I do a test to know if the stereotype is applied by displaying stereotypes
applied with the method getAppliedSterotypes() and I get an empty
Sequence.
If anyone had the same problem and solved it, it will be kind to explain
me how to proceed.
Thanks
|
|
|
Re: [ATL] Set stereotype tagged value [message #85518 is a reply to message #85473] |
Tue, 01 July 2008 09:53 |
Eclipse User |
|
|
|
Originally posted by: Hugo.Bruneliere.univ-nantes.fr
Hi Amivi,
Amivi FAGBEGNON a écrit :
> Hello,
>
> I have problems to set tagged value of a stereotype. The stereotype is
> set in a do action just before de setValue instruction like this:
> do{
> out.applyStereotype(ster);
> out.setValue(ster,'tagged value name',p.name);
> }
> out is an property.
> I do a test to know if the stereotype is applied by displaying
> stereotypes applied with the method getAppliedSterotypes() and I get an
> empty Sequence.
>
> If anyone had the same problem and solved it, it will be kind to explain
> me how to proceed.
You can find from
http://www.eclipse.org/gmt/modisco/useCases/PerformanceAnnot atedUmlStateCharts/
a complete example on how to apply stereotypes on a UML model with ATL.
Look more particularly at the
"UMLStateChart2PerformanceAnnotatedUMLStateChart.atl" transformation.
Best regards,
Hugo
>
> Thanks
>
--
--------------------------------------------------------
Hugo Bruneliere - R&D Engineer
ATLAS Group (INRIA & LINA) - University of Nantes
2, rue de la Houssiniere
44322 Nantes Cedex 3 - France
office +33 2 51 12 58 10 /\ cell.+33 6 07 42 45 30
EMail: Hugo.Bruneliere@univ-nantes.fr
http://www.sciences.univ-nantes.fr/lina/atl/
--------------------------------------------------------
|
|
|
|
Re: [ATL] Set stereotype tagged value [message #85630 is a reply to message #85518] |
Wed, 02 July 2008 07:39 |
Eclipse User |
|
|
|
Originally posted by: amivi.fagbegnon.gmail.com
Hi,
Thanks for your help Hugo.
I have seen your example but this doesn't help me a lot. I proceed like in
UMLStateChart2PerformanceAnnotatedUMLStateChart.atl but I still have
errors.I don't understand why. I check the profile and the stereotype
extends Property and has the tagged value that I want to set...
You can find below the errors I get.
Best regards,
Amivi
Saving model CAmodelCouche
[am3.saveModel] GRAVE: ****** BEGIN Stack Trace
[am3.saveModel] GRAVE: message: ERROR: exception during invocation of
operation setValue on UML2!Property (java method: public void
org.eclipse.uml2.uml.internal.impl.ElementImpl.setValue(org. eclipse.uml2.uml.Stereotype,java.lang.String,java.lang.Objec t))
[am3.saveModel] GRAVE: exception:
[am3.saveModel] GRAVE: dateSuspension
[am3.saveModel] java.lang.IllegalArgumentException: dateSuspension
[am3.saveModel] at
org.eclipse.uml2.uml.internal.operations.ElementOperations.s etValue(ElementOperations.java:754)
[am3.saveModel] at
org.eclipse.uml2.uml.internal.impl.ElementImpl.setValue(Elem entImpl.java:306)
[am3.saveModel] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[am3.saveModel] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
[am3.saveModel] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
[am3.saveModel] at java.lang.reflect.Method.invoke(Method.java:585)
[am3.saveModel] at
org.eclipse.m2m.atl.drivers.uml24atl.ASMUMLModelElement.real Invoke(ASMUMLModelElement.java:630)
[am3.saveModel] at
org.eclipse.m2m.atl.drivers.uml24atl.ASMUMLModel.applyDelaye dInvocations(ASMUMLModel.java:568)
[am3.saveModel] at
org.eclipse.m2m.atl.drivers.uml24atl.AtlUML2ModelHandler.sav eModel(AtlUML2ModelHandler.java:61)
[am3.saveModel] at
org.eclipse.m2m.atl.drivers.uml24atl.AtlUML2ModelHandler.sav eModel(AtlUML2ModelHandler.java:49)
[am3.saveModel] at
org.eclipse.gmt.am3.tools.ant.tasks.SaveModelTask.execute(Sa veModelTask.java:47)
[am3.saveModel] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.j ava:288)
[am3.saveModel] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[am3.saveModel] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
[am3.saveModel] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
[am3.saveModel] at java.lang.reflect.Method.invoke(Method.java:585)
[am3.saveModel] at
org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:105)
[am3.saveModel] at org.apache.tools.ant.Task.perform(Task.java:348)
[am3.saveModel] at org.apache.tools.ant.Target.execute(Target.java:357)
[am3.saveModel] at
org.apache.tools.ant.Target.performTasks(Target.java:385)
[am3.saveModel] at
org.apache.tools.ant.Project.executeSortedTargets(Project.ja va:1329)
[am3.saveModel] at
org.apache.tools.ant.Project.executeTarget(Project.java:1298 )
[am3.saveModel] at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(D efaultExecutor.java:41)
[am3.saveModel] at
org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.exe cuteTargets(EclipseDefaultExecutor.java:32)
[am3.saveModel] at
org.apache.tools.ant.Project.executeTargets(Project.java:118 1)
[am3.saveModel] at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(Inte rnalAntRunner.java:623)
[am3.saveModel] at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(Inte rnalAntRunner.java:456)
[am3.saveModel] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[am3.saveModel] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
[am3.saveModel] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
[am3.saveModel] at java.lang.reflect.Method.invoke(Method.java:585)
[am3.saveModel] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:377)
[am3.saveModel] at
org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDe legate$1.run(AntLaunchDelegate.java:230)
[am3.saveModel] at java.lang.Thread.run(Thread.java:595)
[am3.saveModel] GRAVE: ****** END Stack Trace
[am3.saveModel] INFO: Execution terminated due to error (see launch
configuration to allow continuation after errors).
|
|
|
|
Re: [ATL] Set stereotype tagged value [message #85670 is a reply to message #85533] |
Wed, 02 July 2008 08:37 |
Eclipse User |
|
|
|
Originally posted by: Hugo.Bruneliere.univ-nantes.fr
Hi Max,
Max Bureck a écrit :
> There are many questions about
> * how to apply stereotypes and profiles
> * how to get to know if a certain stereotype is applied
> * how to access/set tagged values
> on this newsgroup. Maybe someone should write a tutorial on how to work
> with UML-profiles in ATL and put it in the wiki, or at least add a link
> to a page with an overview over the relevant API-functions.
>
You're right Max, this is really something that should be done.
This may be integrated within a future extended ATL user documentation
(through the Wiki for instance).
Best regards,
Hugo
> Greetings,
> Max
>
--
--------------------------------------------------------
Hugo Bruneliere - R&D Engineer
ATLAS Group (INRIA & LINA) - University of Nantes
2, rue de la Houssiniere
44322 Nantes Cedex 3 - France
office +33 2 51 12 58 10 /\ cell.+33 6 07 42 45 30
EMail: Hugo.Bruneliere@univ-nantes.fr
http://www.sciences.univ-nantes.fr/lina/atl/
--------------------------------------------------------
|
|
|
Re: [ATL] Set stereotype tagged value [message #85726 is a reply to message #85655] |
Wed, 02 July 2008 09:18 |
Eclipse User |
|
|
|
Originally posted by: amivi.fagbegnon.gmail.com
Yes I apply the profile to the model. I've already used the profile
somewhere else.
The application of the stereotype works it is the setValue the problem.
It's seems that I can't access the tagged value of the stereotype just
after its applying...
|
|
|
|
Re: [ATL] Set stereotype tagged value [message #85816 is a reply to message #85741] |
Thu, 03 July 2008 08:09 |
Eclipse User |
|
|
|
Originally posted by: amivi.fagbegnon.gmail.com
I resolve my problem...
It was'nt ATL the problem but TopCased my UML modeler. The synchronisation
of the UML model and the ecore generated don't work well.
I have changed manually the ecore and now it works!
Thanks for your help!
Best regards,
Amivi
|
|
|
Powered by
FUDForum. Page generated in 0.02451 seconds