Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTO] Calling transformation programmatically
[QVTO] Calling transformation programmatically [message #101663] Thu, 12 March 2009 11:53 Go to next message
Patrick Konemann is currently offline Patrick Konemann
Messages: 116
Registered: July 2009
Senior Member
Hi all,

I encountered a strange bug, I think. My setting:

I created an Eclipse plugin providing a qvto file and containing an action which starts a transformation:

public void run() {
URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID + "/qvto/transformation.qvto", true);
QvtoTransformationHelper helper = new QvtoTransformationHelper(transformationSpecification);
TransfExecutionResult result = transformationHelper.executeTransformation(getInModels(), Collections.<String, Object> emptyMap(), null);
saveOutModels(result);
}

The strange thing is that it totally works if I start a runtime workbench and perform the action _for the first time_. The out models are saved as expected.
But if I perform the action again, it does not work any more! The following exception raises. If I restart the runtime workbench, however, it works again for one time!

org.eclipse.core.runtime.CoreException: Failed to parse transformation 'deployed://myplugin/qvto/transformation.qvto', 1 error(s) found.
at org.eclipse.m2m.qvt.oml.runtime.util.QvtoTransformationHelpe r.executeTransformation(QvtoTransformationHelper.java:192)
at myplugin.util.TransformationLauncher.transform(Transformatio nLauncher.java:64)

Any ideas??


By the way, the validator below does not work at all and claims that the resource does not exist, because it only checks the workspace for the given uri.
QvtoTransformationValidator.validateQvtoScript(uri, null, null)


Cheers
Patrick
Re: [QVTO] Calling transformation programmatically [message #101676 is a reply to message #101663] Thu, 12 March 2009 11:57 Go to previous messageGo to next message
Patrick Konemann is currently offline Patrick Konemann
Messages: 116
Registered: July 2009
Senior Member
Oups, variables were named wrong:

public void run() {
URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID + "/qvto/transformation.qvto", true);
QvtoTransformationHelper helper = new QvtoTransformationHelper(uri);
TransfExecutionResult result = helper.executeTransformation(getInModels(), Collections.<String, Object> emptyMap(), null);
saveOutModels(result);
}

On 12-03-2009 16:53, Patrick Könemann wrote:
> Hi all,
>
> I encountered a strange bug, I think. My setting:
>
> I created an Eclipse plugin providing a qvto file and containing an
> action which starts a transformation:
>
> public void run() {
> URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID +
> "/qvto/transformation.qvto", true);
> QvtoTransformationHelper helper = new
> QvtoTransformationHelper(transformationSpecification);
> TransfExecutionResult result =
> transformationHelper.executeTransformation(getInModels(),
> Collections.<String, Object> emptyMap(), null);
> saveOutModels(result);
> }
>
> The strange thing is that it totally works if I start a runtime
> workbench and perform the action _for the first time_. The out models
> are saved as expected.
> But if I perform the action again, it does not work any more! The
> following exception raises. If I restart the runtime workbench, however,
> it works again for one time!
>
> org.eclipse.core.runtime.CoreException: Failed to parse transformation
> 'deployed://myplugin/qvto/transformation.qvto', 1 error(s) found.
> at
> org.eclipse.m2m.qvt.oml.runtime.util.QvtoTransformationHelpe r.executeTransformation(QvtoTransformationHelper.java:192)
>
> at
> myplugin.util.TransformationLauncher.transform(Transformatio nLauncher.java:64)
>
>
> Any ideas??
>
>
> By the way, the validator below does not work at all and claims that the
> resource does not exist, because it only checks the workspace for the
> given uri.
> QvtoTransformationValidator.validateQvtoScript(uri, null, null)
>
>
> Cheers
> Patrick
Re: [QVTO] Calling transformation programmatically [message #101713 is a reply to message #101676] Thu, 12 March 2009 17:40 Go to previous messageGo to next message
Sergey Boyko is currently offline Sergey Boyko
Messages: 162
Registered: July 2009
Senior Member
Hi Patrick,

I can't reproduce problem you mentioned. Could you please attach script
by which the bug is reproduced.

As for deployed modules validation with QvtoTransformationValidator -
it's definitely a bug. I've filed it as
https://bugs.eclipse.org/bugs/show_bug.cgi?id=268441.

Regards,
Sergey

Patrick Könemann wrote:
> Oups, variables were named wrong:
>
> public void run() {
> URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID +
> "/qvto/transformation.qvto", true);
> QvtoTransformationHelper helper = new QvtoTransformationHelper(uri);
> TransfExecutionResult result =
> helper.executeTransformation(getInModels(), Collections.<String, Object>
> emptyMap(), null);
> saveOutModels(result);
> }
>
> On 12-03-2009 16:53, Patrick Könemann wrote:
>> Hi all,
>>
>> I encountered a strange bug, I think. My setting:
>>
>> I created an Eclipse plugin providing a qvto file and containing an
>> action which starts a transformation:
>>
>> public void run() {
>> URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID +
>> "/qvto/transformation.qvto", true);
>> QvtoTransformationHelper helper = new
>> QvtoTransformationHelper(transformationSpecification);
>> TransfExecutionResult result =
>> transformationHelper.executeTransformation(getInModels(),
>> Collections.<String, Object> emptyMap(), null);
>> saveOutModels(result);
>> }
>>
>> The strange thing is that it totally works if I start a runtime
>> workbench and perform the action _for the first time_. The out models
>> are saved as expected.
>> But if I perform the action again, it does not work any more! The
>> following exception raises. If I restart the runtime workbench, however,
>> it works again for one time!
>>
>> org.eclipse.core.runtime.CoreException: Failed to parse transformation
>> 'deployed://myplugin/qvto/transformation.qvto', 1 error(s) found.
>> at
>> org.eclipse.m2m.qvt.oml.runtime.util.QvtoTransformationHelpe r.executeTransformation(QvtoTransformationHelper.java:192)
>>
>>
>> at
>> myplugin.util.TransformationLauncher.transform(Transformatio nLauncher.java:64)
>>
>>
>>
>> Any ideas??
>>
>>
>> By the way, the validator below does not work at all and claims that the
>> resource does not exist, because it only checks the workspace for the
>> given uri.
>> QvtoTransformationValidator.validateQvtoScript(uri, null, null)
>>
>>
>> Cheers
>> Patrick
>
Re: [QVTO] Calling transformation programmatically [message #101760 is a reply to message #101713] Fri, 13 March 2009 05:29 Go to previous messageGo to next message
Patrick Konemann is currently offline Patrick Konemann
Messages: 116
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------070504010606000306060201
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Sergey,

thanks for the reply.
What I did not mention before: I use a blackbox library for some more complex operations, which seems to be the cause of the exception. After the first (successful) transformation, it contains compilation errors?!?
Thus I can perform the transformation exactly once.

Example project attached (running on Eclipse 3.5M5):
- import existing projects into workspace -> select TransformationOnce.zip
- launch runtime workbench
- select in the menu bar: Transformation Menu -> Start transformation
- check the console output in the main workbench (successful transformation)
- Start the transformation again
- check the console output again: CoreException

Any help appreciated.

Cheers
Patrick


On 12-03-2009 22:40, Sergey Boyko wrote:
> Hi Patrick,
>
> I can't reproduce problem you mentioned. Could you please attach script
> by which the bug is reproduced.
>
> As for deployed modules validation with QvtoTransformationValidator -
> it's definitely a bug. I've filed it as
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=268441.
>
> Regards,
> Sergey
>
> Patrick K
Re: [QVTO] Calling transformation programmatically [message #101796 is a reply to message #101760] Fri, 13 March 2009 15:37 Go to previous messageGo to next message
Sergey Boyko is currently offline Sergey Boyko
Messages: 162
Registered: July 2009
Senior Member
Hi Patrick,

Thank you very much for the example project! For me it reproduces bug
even for the first launch.
The problem is that deployed module cannot resolve black-box imports. So
another bug has been submitted
https://bugs.eclipse.org/bugs/show_bug.cgi?id=268596

Both mentioned bugs will be fixed shortly and be available in the next
I-build.

Regards,
Sergey

Patrick Könemann wrote:
> Hi Sergey,
>
> thanks for the reply.
> What I did not mention before: I use a blackbox library for some more
> complex operations, which seems to be the cause of the exception. After
> the first (successful) transformation, it contains compilation errors?!?
> Thus I can perform the transformation exactly once.
>
> Example project attached (running on Eclipse 3.5M5):
> - import existing projects into workspace -> select TransformationOnce.zip
> - launch runtime workbench
> - select in the menu bar: Transformation Menu -> Start transformation
> - check the console output in the main workbench (successful
> transformation)
> - Start the transformation again
> - check the console output again: CoreException
>
> Any help appreciated.
>
> Cheers
> Patrick
>
>
> On 12-03-2009 22:40, Sergey Boyko wrote:
>> Hi Patrick,
>>
>> I can't reproduce problem you mentioned. Could you please attach script
>> by which the bug is reproduced.
>>
>> As for deployed modules validation with QvtoTransformationValidator -
>> it's definitely a bug. I've filed it as
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=268441.
>>
>> Regards,
>> Sergey
>>
>> Patrick Könemann wrote:
>>> Oups, variables were named wrong:
>>>
>>> public void run() {
>>> URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID +
>>> "/qvto/transformation.qvto", true);
>>> QvtoTransformationHelper helper = new QvtoTransformationHelper(uri);
>>> TransfExecutionResult result =
>>> helper.executeTransformation(getInModels(), Collections.<String,
>>> Object> emptyMap(), null);
>>> saveOutModels(result);
>>> }
>>>
>>> On 12-03-2009 16:53, Patrick Könemann wrote:
>>>> Hi all,
>>>>
>>>> I encountered a strange bug, I think. My setting:
>>>>
>>>> I created an Eclipse plugin providing a qvto file and containing an
>>>> action which starts a transformation:
>>>>
>>>> public void run() {
>>>> URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID +
>>>> "/qvto/transformation.qvto", true);
>>>> QvtoTransformationHelper helper = new
>>>> QvtoTransformationHelper(transformationSpecification);
>>>> TransfExecutionResult result =
>>>> transformationHelper.executeTransformation(getInModels(),
>>>> Collections.<String, Object> emptyMap(), null);
>>>> saveOutModels(result);
>>>> }
>>>>
>>>> The strange thing is that it totally works if I start a runtime
>>>> workbench and perform the action _for the first time_. The out models
>>>> are saved as expected.
>>>> But if I perform the action again, it does not work any more! The
>>>> following exception raises. If I restart the runtime workbench,
>>>> however,
>>>> it works again for one time!
>>>>
>>>> org.eclipse.core.runtime.CoreException: Failed to parse transformation
>>>> 'deployed://myplugin/qvto/transformation.qvto', 1 error(s) found.
>>>> at
>>>> org.eclipse.m2m.qvt.oml.runtime.util.QvtoTransformationHelpe r.executeTransformation(QvtoTransformationHelper.java:192)
>>>>
>>>>
>>>>
>>>> at
>>>> myplugin.util.TransformationLauncher.transform(Transformatio nLauncher.java:64)
>>>>
>>>>
>>>>
>>>>
>>>> Any ideas??
>>>>
>>>>
>>>> By the way, the validator below does not work at all and claims that
>>>> the
>>>> resource does not exist, because it only checks the workspace for the
>>>> given uri.
>>>> QvtoTransformationValidator.validateQvtoScript(uri, null, null)
>>>>
>>>>
>>>> Cheers
>>>> Patrick
>>>
>
Re: [QVTO] Calling transformation programmatically [message #101808 is a reply to message #101796] Fri, 13 March 2009 17:37 Go to previous messageGo to next message
Sergey Boyko is currently offline Sergey Boyko
Messages: 162
Registered: July 2009
Senior Member
Hi Patric,

Some minor addition :) In the script I found the following

mapping MyElement::toSomething() : MyElement {
name = self.name;
result.toBlackboxed()
}

Expression 'name = self.name;' is not an assignment that's in fact
conditional expression resulted in boolean value. Assignment is realized
with ":=" lexeme.

Regards,
Sergey.


Sergey Boyko wrote:
> Hi Patrick,
>
> Thank you very much for the example project! For me it reproduces bug
> even for the first launch.
> The problem is that deployed module cannot resolve black-box imports. So
> another bug has been submitted
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=268596
>
> Both mentioned bugs will be fixed shortly and be available in the next
> I-build.
>
> Regards,
> Sergey
>
> Patrick Könemann wrote:
>> Hi Sergey,
>>
>> thanks for the reply.
>> What I did not mention before: I use a blackbox library for some more
>> complex operations, which seems to be the cause of the exception.
>> After the first (successful) transformation, it contains compilation
>> errors?!?
>> Thus I can perform the transformation exactly once.
>>
>> Example project attached (running on Eclipse 3.5M5):
>> - import existing projects into workspace -> select
>> TransformationOnce.zip
>> - launch runtime workbench
>> - select in the menu bar: Transformation Menu -> Start transformation
>> - check the console output in the main workbench (successful
>> transformation)
>> - Start the transformation again
>> - check the console output again: CoreException
>>
>> Any help appreciated.
>>
>> Cheers
>> Patrick
>>
>>
>> On 12-03-2009 22:40, Sergey Boyko wrote:
>>> Hi Patrick,
>>>
>>> I can't reproduce problem you mentioned. Could you please attach script
>>> by which the bug is reproduced.
>>>
>>> As for deployed modules validation with QvtoTransformationValidator -
>>> it's definitely a bug. I've filed it as
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=268441.
>>>
>>> Regards,
>>> Sergey
>>>
>>> Patrick Könemann wrote:
>>>> Oups, variables were named wrong:
>>>>
>>>> public void run() {
>>>> URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID +
>>>> "/qvto/transformation.qvto", true);
>>>> QvtoTransformationHelper helper = new QvtoTransformationHelper(uri);
>>>> TransfExecutionResult result =
>>>> helper.executeTransformation(getInModels(), Collections.<String,
>>>> Object> emptyMap(), null);
>>>> saveOutModels(result);
>>>> }
>>>>
>>>> On 12-03-2009 16:53, Patrick Könemann wrote:
>>>>> Hi all,
>>>>>
>>>>> I encountered a strange bug, I think. My setting:
>>>>>
>>>>> I created an Eclipse plugin providing a qvto file and containing an
>>>>> action which starts a transformation:
>>>>>
>>>>> public void run() {
>>>>> URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID +
>>>>> "/qvto/transformation.qvto", true);
>>>>> QvtoTransformationHelper helper = new
>>>>> QvtoTransformationHelper(transformationSpecification);
>>>>> TransfExecutionResult result =
>>>>> transformationHelper.executeTransformation(getInModels(),
>>>>> Collections.<String, Object> emptyMap(), null);
>>>>> saveOutModels(result);
>>>>> }
>>>>>
>>>>> The strange thing is that it totally works if I start a runtime
>>>>> workbench and perform the action _for the first time_. The out models
>>>>> are saved as expected.
>>>>> But if I perform the action again, it does not work any more! The
>>>>> following exception raises. If I restart the runtime workbench,
>>>>> however,
>>>>> it works again for one time!
>>>>>
>>>>> org.eclipse.core.runtime.CoreException: Failed to parse transformation
>>>>> 'deployed://myplugin/qvto/transformation.qvto', 1 error(s) found.
>>>>> at
>>>>> org.eclipse.m2m.qvt.oml.runtime.util.QvtoTransformationHelpe r.executeTransformation(QvtoTransformationHelper.java:192)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> myplugin.util.TransformationLauncher.transform(Transformatio nLauncher.java:64)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Any ideas??
>>>>>
>>>>>
>>>>> By the way, the validator below does not work at all and claims
>>>>> that the
>>>>> resource does not exist, because it only checks the workspace for the
>>>>> given uri.
>>>>> QvtoTransformationValidator.validateQvtoScript(uri, null, null)
>>>>>
>>>>>
>>>>> Cheers
>>>>> Patrick
>>>>
>>
Re: [QVTO] Calling transformation programmatically [message #101879 is a reply to message #101808] Mon, 16 March 2009 06:44 Go to previous messageGo to next message
Patrick Konemann is currently offline Patrick Konemann
Messages: 116
Registered: July 2009
Senior Member
Hi Sergey,

you're right ;-)
in fact, I didn't even recognize this typo since I created the project just for you (and the newsgroup of course).

thanks for taking care of the bug
Patrick


On 13-03-2009 22:37, Sergey Boyko wrote:
> Hi Patric,
>
> Some minor addition :) In the script I found the following
>
> mapping MyElement::toSomething() : MyElement {
> name = self.name;
> result.toBlackboxed()
> }
>
> Expression 'name = self.name;' is not an assignment that's in fact
> conditional expression resulted in boolean value. Assignment is realized
> with ":=" lexeme.
>
> Regards,
> Sergey.
>
>
> Sergey Boyko wrote:
>> Hi Patrick,
>>
>> Thank you very much for the example project! For me it reproduces bug
>> even for the first launch.
>> The problem is that deployed module cannot resolve black-box imports.
>> So another bug has been submitted
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=268596
>>
>> Both mentioned bugs will be fixed shortly and be available in the next
>> I-build.
>>
>> Regards,
>> Sergey
>>
>> Patrick Könemann wrote:
>>> Hi Sergey,
>>>
>>> thanks for the reply.
>>> What I did not mention before: I use a blackbox library for some more
>>> complex operations, which seems to be the cause of the exception.
>>> After the first (successful) transformation, it contains compilation
>>> errors?!?
>>> Thus I can perform the transformation exactly once.
>>>
>>> Example project attached (running on Eclipse 3.5M5):
>>> - import existing projects into workspace -> select
>>> TransformationOnce.zip
>>> - launch runtime workbench
>>> - select in the menu bar: Transformation Menu -> Start transformation
>>> - check the console output in the main workbench (successful
>>> transformation)
>>> - Start the transformation again
>>> - check the console output again: CoreException
>>>
>>> Any help appreciated.
>>>
>>> Cheers
>>> Patrick
>>>
>>>
>>> On 12-03-2009 22:40, Sergey Boyko wrote:
>>>> Hi Patrick,
>>>>
>>>> I can't reproduce problem you mentioned. Could you please attach script
>>>> by which the bug is reproduced.
>>>>
>>>> As for deployed modules validation with QvtoTransformationValidator -
>>>> it's definitely a bug. I've filed it as
>>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=268441.
>>>>
>>>> Regards,
>>>> Sergey
>>>>
>>>> Patrick Könemann wrote:
>>>>> Oups, variables were named wrong:
>>>>>
>>>>> public void run() {
>>>>> URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID +
>>>>> "/qvto/transformation.qvto", true);
>>>>> QvtoTransformationHelper helper = new QvtoTransformationHelper(uri);
>>>>> TransfExecutionResult result =
>>>>> helper.executeTransformation(getInModels(), Collections.<String,
>>>>> Object> emptyMap(), null);
>>>>> saveOutModels(result);
>>>>> }
>>>>>
>>>>> On 12-03-2009 16:53, Patrick Könemann wrote:
>>>>>> Hi all,
>>>>>>
>>>>>> I encountered a strange bug, I think. My setting:
>>>>>>
>>>>>> I created an Eclipse plugin providing a qvto file and containing an
>>>>>> action which starts a transformation:
>>>>>>
>>>>>> public void run() {
>>>>>> URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID +
>>>>>> "/qvto/transformation.qvto", true);
>>>>>> QvtoTransformationHelper helper = new
>>>>>> QvtoTransformationHelper(transformationSpecification);
>>>>>> TransfExecutionResult result =
>>>>>> transformationHelper.executeTransformation(getInModels(),
>>>>>> Collections.<String, Object> emptyMap(), null);
>>>>>> saveOutModels(result);
>>>>>> }
>>>>>>
>>>>>> The strange thing is that it totally works if I start a runtime
>>>>>> workbench and perform the action _for the first time_. The out models
>>>>>> are saved as expected.
>>>>>> But if I perform the action again, it does not work any more! The
>>>>>> following exception raises. If I restart the runtime workbench,
>>>>>> however,
>>>>>> it works again for one time!
>>>>>>
>>>>>> org.eclipse.core.runtime.CoreException: Failed to parse
>>>>>> transformation
>>>>>> 'deployed://myplugin/qvto/transformation.qvto', 1 error(s) found.
>>>>>> at
>>>>>> org.eclipse.m2m.qvt.oml.runtime.util.QvtoTransformationHelpe r.executeTransformation(QvtoTransformationHelper.java:192)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> myplugin.util.TransformationLauncher.transform(Transformatio nLauncher.java:64)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Any ideas??
>>>>>>
>>>>>>
>>>>>> By the way, the validator below does not work at all and claims
>>>>>> that the
>>>>>> resource does not exist, because it only checks the workspace for the
>>>>>> given uri.
>>>>>> QvtoTransformationValidator.validateQvtoScript(uri, null, null)
>>>>>>
>>>>>>
>>>>>> Cheers
>>>>>> Patrick
>>>>>
>>>
Re: [QVTO] Calling transformation programmatically [message #101947 is a reply to message #101676] Mon, 16 March 2009 10:01 Go to previous messageGo to next message
Patrick Konemann is currently offline Patrick Konemann
Messages: 116
Registered: July 2009
Senior Member
Dear developers,

this is not a bug, rather about a minor API change.
In order to start the transformation, the input must be of type List<EObject>:

public TransfExecutionResult executeTransformation(final List<EObject> inObjects, final Map<String, Object> inConfigProperties, ResourceSet metamodelResourceSet) throws CoreException {

So I explicitely need to convert my input from EList<MyElement> to List<EObject>, e.g. in getInModels() in the example below.
This cast would not be required if the type of the input parameter above is changed to: List<? extends EObject>
What do you think?

Best regards
Patrick


On 12-03-2009 16:57, Patrick Könemann wrote:
> Oups, variables were named wrong:
>
> public void run() {
> URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID +
> "/qvto/transformation.qvto", true);
> QvtoTransformationHelper helper = new QvtoTransformationHelper(uri);
> TransfExecutionResult result =
> helper.executeTransformation(getInModels(), Collections.<String, Object>
> emptyMap(), null);
> saveOutModels(result);
> }
>
Re: [QVTO] Calling transformation programmatically [message #102257 is a reply to message #101947] Mon, 23 March 2009 19:44 Go to previous messageGo to next message
Sergey Boyko is currently offline Sergey Boyko
Messages: 162
Registered: July 2009
Senior Member
Hi Patrick,

Excuse me for the late answering. I missed the message in thread.

You're right, executeTransformation(..) declaration will be changed like
that. It's even not an API breaking change ;)
I'll apply changes soon.

Regards,
Sergey


Patrick Könemann wrote:
> Dear developers,
>
> this is not a bug, rather about a minor API change.
> In order to start the transformation, the input must be of type
> List<EObject>:
>
> public TransfExecutionResult executeTransformation(final
> List<EObject> inObjects, final Map<String, Object> inConfigProperties,
> ResourceSet metamodelResourceSet) throws CoreException {
>
> So I explicitely need to convert my input from EList<MyElement> to
> List<EObject>, e.g. in getInModels() in the example below.
> This cast would not be required if the type of the input parameter above
> is changed to: List<? extends EObject>
> What do you think?
>
> Best regards
> Patrick
>
>
> On 12-03-2009 16:57, Patrick Könemann wrote:
>> Oups, variables were named wrong:
>>
>> public void run() {
>> URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID +
>> "/qvto/transformation.qvto", true);
>> QvtoTransformationHelper helper = new QvtoTransformationHelper(uri);
>> TransfExecutionResult result =
>> helper.executeTransformation(getInModels(), Collections.<String, Object>
>> emptyMap(), null);
>> saveOutModels(result);
>> }
>>
>
Re: [QVTO] Calling transformation programmatically [message #108674 is a reply to message #102257] Sat, 25 July 2009 07:31 Go to previous messageGo to next message
Eclipse User
Originally posted by: liaoqiancheng.cjitec.com

Sergey Boyko 写道:
> Hi Patrick,
>
> Excuse me for the late answering. I missed the message in thread.
>
> You're right, executeTransformation(..) declaration will be changed like
> that. It's even not an API breaking change ;)
> I'll apply changes soon.
>
> Regards,
> Sergey
>
>
> Patrick Könemann wrote:
>> Dear developers,
>>
>> this is not a bug, rather about a minor API change.
>> In order to start the transformation, the input must be of type
>> List<EObject>:
>>
>> public TransfExecutionResult executeTransformation(final
>> List<EObject> inObjects, final Map<String, Object> inConfigProperties,
>> ResourceSet metamodelResourceSet) throws CoreException {
>>
>> So I explicitely need to convert my input from EList<MyElement> to
>> List<EObject>, e.g. in getInModels() in the example below.
>> This cast would not be required if the type of the input parameter
>> above is changed to: List<? extends EObject>
>> What do you think?
>>
>> Best regards
>> Patrick
>>
>>
>> On 12-03-2009 16:57, Patrick Könemann wrote:
>>> Oups, variables were named wrong:
>>>
>>> public void run() {
>>> URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID +
>>> "/qvto/transformation.qvto", true);
>>> QvtoTransformationHelper helper = new QvtoTransformationHelper(uri);
>>> TransfExecutionResult result =
>>> helper.executeTransformation(getInModels(), Collections.<String, Object>
>>> emptyMap(), null);
>>> saveOutModels(result);
>>> }
>>>
>>
Hi guys,
Thank you very much;-)

Especially for the example project!
Re: [QVTO] Calling transformation programmatically [message #725702 is a reply to message #108674] Thu, 15 September 2011 10:45 Go to previous messageGo to next message
Cindy  is currently offline Cindy
Messages: 59
Registered: May 2011
Member
hey where could i get the example project? i get "Failed to parse transformation "error and dont know how to solve this~~
Re: [QVTO] Calling transformation programmatically [message #725792 is a reply to message #725702] Thu, 15 September 2011 15:09 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4003
Registered: July 2009
Senior Member
On 15/09/2011 15:45, Cindy wrote:
> hey where could i get the example project? i get "Failed to parse
> transformation "error and dont know how to solve this~~
Try New->Example...
Re: [QVTO] Calling transformation programmatically [message #726047 is a reply to message #725792] Fri, 16 September 2011 09:20 Go to previous message
Cindy  is currently offline Cindy
Messages: 59
Registered: May 2011
Member
Hey thank you for this~~ i wonder is there any example of calling qvt in java??
Previous Topic:ATL Development Tools
Next Topic:ATL launch error
Goto Forum:
  


Current Time: Fri Jul 25 14:28:26 EDT 2014

Powered by FUDForum. Page generated in 0.02494 seconds