Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forums[ATL] Standalone ATL execution with UML
https://www.eclipse.org/forums/index.php/mv/msg/13935/44112/#msg_44112
Originally posted by: paul.gribben.gmail.com
Hi,
I wasn't sure whether to post this to the UML or ATL group, so I picked
the latter. I've been trying to put together a java launcher for ATL
transformations that use eclipse UML2 model files. I am currently getting
a problem when the transform attempts to resolve the 'hasStereotype'
operation:
message: ERROR: could not find operation hasStereotype on Void having
supertypes: [OclAny]
I'm guessing that I need to register some extension or plugin element in
the standalone environment context, but can't figure out what to do. So
far I've registered the UML2 package doing this:
Perhaps someone's already written a java launcher that I can use. Anyway
any help would be greatly appreciated.
Thanks
Paul]]>2007-06-04T13:21:19-00:00Re: [ATL] Standalone ATL execution with UML
https://www.eclipse.org/forums/index.php/mv/msg/13935/44305/#msg_44305
Originally posted by: freddy.allilaire.univ-nantes.fr
Hi Paul,
This seems more ATL related.
(Maybe a silly question) Do you have a helper called hasStereotype in
your ATL transformation?
Regards,
Freddy.
Paul Gribben a écrit :
> Hi,
>
> I wasn't sure whether to post this to the UML or ATL group, so I picked
> the latter. I've been trying to put together a java launcher for ATL
> transformations that use eclipse UML2 model files. I am currently
> getting a problem when the transform attempts to resolve the
> 'hasStereotype' operation:
>
> message: ERROR: could not find operation hasStereotype on Void having
> supertypes: [OclAny]
>
> I'm guessing that I need to register some extension or plugin element in
> the standalone environment context, but can't figure out what to do. So
> far I've registered the UML2 package doing this:
>
> org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getEFactoryInstanc e();
>
> I also did the following (but am unsure if I needed to):
>
> Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "uml",
> factory);
>
> Perhaps someone's already written a java launcher that I can use. Anyway
> any help would be greatly appreciated.
>
> Thanks
> Paul
>
--
Freddy Allilaire - ATLAS Group (INRIA & LINA) http://www.sciences.univ-nantes.fr/lina/atl/contrib/allilair e]]>2007-06-05T08:00:01-00:00Re: [ATL] Standalone ATL execution with UML
https://www.eclipse.org/forums/index.php/mv/msg/13935/44393/#msg_44393
Originally posted by: paul.gribben.gmail.com
Hi Freddy,
Not a silly question as it turns out. Yes - this is the problem. My ATL
transform combines AMW with UML, and the getInstanceById() method is
resolving a uml element incorrectly it seems, so the return type is not a
uml element type, and this is the cause of the problem. I need to dig
further to see why this works in eclipse but not standalone.
Thanks for replying.
Paul]]>2007-06-05T08:45:10-00:00Re: [ATL] Standalone ATL execution with UML
https://www.eclipse.org/forums/index.php/mv/msg/13935/44454/#msg_44454
> Hi,
>
> I wasn't sure whether to post this to the UML or ATL group, so I picked
> the latter. I've been trying to put together a java launcher for ATL
> transformations that use eclipse UML2 model files. I am currently
> getting a problem when the transform attempts to resolve the
> 'hasStereotype' operation:
>
> message: ERROR: could not find operation hasStereotype on Void having
> supertypes: [OclAny]
>
> I'm guessing that I need to register some extension or plugin element in
> the standalone environment context, but can't figure out what to do. So
> far I've registered the UML2 package doing this:
>
> org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getEFactoryInstanc e();
>
> I also did the following (but am unsure if I needed to):
>
> Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "uml",
> factory);
>
> Perhaps someone's already written a java launcher that I can use. Anyway
> any help would be greatly appreciated.
>
> Thanks
> Paul
>
It uses a slightly different variant of the UML2 init code you've used.
Since you cannot access the ATL's resourceSet variable directly, you may
try to do the init on the global package registry and
extension-to-factory-map:
when the ecore system attempts to parse one of the input UML models. This
is a reference to the profile used by the model. The profile references in
the model file seem to be correct.
The transform works fine when I run it in eclipse.
Any ideas?
Cheers
Paul]]>2007-06-05T13:03:54-00:00Re: [ATL] Standalone ATL execution with UML
https://www.eclipse.org/forums/index.php/mv/msg/13935/44606/#msg_44606
> Thanks for that Dennis.
>
> The problem has now changed. I am now getting the message:
> Package with uri 'http:///schemas/MYSCHEMA/_W1muUN0UEdutEfdnsVqhQA/53'
> not found.
>
> when the ecore system attempts to parse one of the input UML models.
> This is a reference to the profile used by the model. The profile
> references in the model file seem to be correct.
>
> The transform works fine when I run it in eclipse.
> Any ideas?
>
> Cheers
> Paul
>
>
The first XML element in your UML model should contain an
xsi:schemaLocation attribute that points to the location of your
profile. Can you check if that location is still valid outside Eclipse?
Dennis]]>Dennis Wagelaar2007-06-05T17:17:16-00:00Re: [ATL] Standalone ATL execution with UML
https://www.eclipse.org/forums/index.php/mv/msg/13935/44670/#msg_44670
Originally posted by: paul.gribben.gmail.com
Dennis,
You pointed me in the right direction. The schemaLocation is defined using
a pathmap reference. I had to delve into the ATL source code but
eventually discovered how to set the pathmaps in the ATL ResourceSet. The
trick was getting hold of ATL's ResourceSet as follows:
ASMEMFModel.getResourceSet()
And then setting my pathmaps using that.
Thanks
Paul]]>2007-06-06T07:43:08-00:00Re: [ATL] Standalone ATL execution with UML
https://www.eclipse.org/forums/index.php/mv/msg/13935/44852/#msg_44852
> Dennis,
>
> You pointed me in the right direction. The schemaLocation is defined
> using a pathmap reference. I had to delve into the ATL source code but
> eventually discovered how to set the pathmaps in the ATL ResourceSet.
> The trick was getting hold of ATL's ResourceSet as follows:
>
> ASMEMFModel.getResourceSet()
>
> And then setting my pathmaps using that.
>
> Thanks
> Paul
>
Then you managed to get ATL transformations on UML2 models - including
profiles - to work outside Eclipse. That's great news! I think you're
the first to manage that ;-).
Dennis]]>Dennis Wagelaar2007-06-06T14:13:16-00:00Re: [ATL] Standalone ATL execution with UML
https://www.eclipse.org/forums/index.php/mv/msg/13935/44883/#msg_44883
>> You pointed me in the right direction. The schemaLocation is defined
>> using a pathmap reference. I had to delve into the ATL source code but
>> eventually discovered how to set the pathmaps in the ATL ResourceSet.
>> The trick was getting hold of ATL's ResourceSet as follows:
>>
>> ASMEMFModel.getResourceSet()
>>
>> And then setting my pathmaps using that.
>>
>> Thanks
>> Paul
>>
>
> Then you managed to get ATL transformations on UML2 models - including
> profiles - to work outside Eclipse. That's great news!
Thanks to you both for sorting this problem out ;-).
> I think you're
> the first to manage that ;-).
Well, I suppose it is mostly because Paul is the first to actually try ;-).