Home » Archived » M2M (model-to-model transformation) » [QVTo] Import from plug-ins?
[QVTo] Import from plug-ins? [message #543672] |
Wed, 30 June 2010 08:35 |
Eclipse User |
|
|
|
Originally posted by: dhendriksREMOVE_THIS.tueREMOVE.THIS.nl
Hello,
Imports from other projects, or even better, from plug-ins, doesn't seem
to work in QVTo:
import
platform:/plugin/nl.tue.cif.v2x1x1.cifcopy.qvto/transforms/cifcopy.qvto;
import platform:/plugin/nl.tue.cif.v2x1x1.cifcopy.qvto/transforms/cifcopy;
import nl.tue.cif.v2x1x1.cifcopy.qvto.transforms.cifcopy;
import nl.tue.cif.v2x1x1.cifcopy.qvto.cifcopy;
import cifcopy;
None of this works, even though I have a
nl.tue.cif.v2x1x1.cifcopy.qvto_1.0.0.jar in the Eclipse 'plugins'
directory, and it contains a 'transforms' directory with a
'cifcopy.qvto' transformation.
Does anyone know whether it is possible to import from plug-ins?
Dennis
|
|
| |
Re: [QVTo] Import from plug-ins? [message #545026 is a reply to message #544894] |
Tue, 06 July 2010 12:52 |
Eclipse User |
|
|
|
Originally posted by: dhendriksREMOVE_THIS.tueREMOVE.THIS.nl
Hello Sergey,
thanks a lot for your reply. I tried adding the extension to the
plugin.xml, adding org.eclipse.m2m.qvt.oml.runtime as plugin to the
'required plug-ins' of the project, and I exported the project. I
restarted Eclipse. However, I still get an 'Cannot find imported
compilation unit 'transforms.cifcopy'' error.
Any idea what can be wrong?
Best,
Dennis
Sergey Boyko wrote:
> Hi Dennis ,
>
> In order to import QVTo script from plug-in you should declare script
> export in plugin.xml like follows:
>
> <extension
> point="org.eclipse.m2m.qvt.oml.runtime.qvtTransformation">
> <transformation
> file="transforms/cifcopy.qvto"
> id="transforms.cifcopy">
> </transformation>
> </extension>
>
> Then import statement in QVTo script should work:
> import transforms.cifcopy;
>
> Note that 'id' field should correspond to directory structure where
> script is placed.
>
> Regards,
> Sergey
>
> Dennis Hendriks wrote:
>> Hello,
>>
>> Imports from other projects, or even better, from plug-ins, doesn't
>> seem to work in QVTo:
>>
>>
>> import
>> platform:/plugin/nl.tue.cif.v2x1x1.cifcopy.qvto/transforms/cifcopy.qvto;
>>
>> import
>> platform:/plugin/nl.tue.cif.v2x1x1.cifcopy.qvto/transforms/cifcopy;
>>
>> import nl.tue.cif.v2x1x1.cifcopy.qvto.transforms.cifcopy;
>>
>> import nl.tue.cif.v2x1x1.cifcopy.qvto.cifcopy;
>>
>> import cifcopy;
>>
>>
>> None of this works, even though I have a
>> nl.tue.cif.v2x1x1.cifcopy.qvto_1.0.0.jar in the Eclipse 'plugins'
>> directory, and it contains a 'transforms' directory with a
>> 'cifcopy.qvto' transformation.
>>
>> Does anyone know whether it is possible to import from plug-ins?
>>
>> Dennis
|
|
|
Re: [QVTo] Import from plug-ins? [message #545099 is a reply to message #545026] |
Tue, 06 July 2010 15:33 |
Sergey Boyko Messages: 171 Registered: July 2009 |
Senior Member |
|
|
Hi Dennis ,
I have no idea what's wrong. In QVTo test suit we have distinct test
case for that.
Might it be that your plug-in was not accepted by platform after restart?
You can try to launch new Eclipse instance right from your working
instance (new Eclipse Application launch configuration). That is how is
just checked that the solution works.
Regards,
Sergey
Dennis Hendriks wrote:
> Hello Sergey,
>
> thanks a lot for your reply. I tried adding the extension to the
> plugin.xml, adding org.eclipse.m2m.qvt.oml.runtime as plugin to the
> 'required plug-ins' of the project, and I exported the project. I
> restarted Eclipse. However, I still get an 'Cannot find imported
> compilation unit 'transforms.cifcopy'' error.
>
> Any idea what can be wrong?
>
> Best,
> Dennis
>
>
> Sergey Boyko wrote:
>> Hi Dennis ,
>>
>> In order to import QVTo script from plug-in you should declare script
>> export in plugin.xml like follows:
>>
>> <extension
>> point="org.eclipse.m2m.qvt.oml.runtime.qvtTransformation">
>> <transformation
>> file="transforms/cifcopy.qvto"
>> id="transforms.cifcopy">
>> </transformation>
>> </extension>
>>
>> Then import statement in QVTo script should work:
>> import transforms.cifcopy;
>>
>> Note that 'id' field should correspond to directory structure where
>> script is placed.
>>
>> Regards,
>> Sergey
>>
>> Dennis Hendriks wrote:
>>> Hello,
>>>
>>> Imports from other projects, or even better, from plug-ins, doesn't
>>> seem to work in QVTo:
>>>
>>>
>>> import
>>> platform:/plugin/nl.tue.cif.v2x1x1.cifcopy.qvto/transforms/cifcopy.qvto;
>>>
>>> import
>>> platform:/plugin/nl.tue.cif.v2x1x1.cifcopy.qvto/transforms/cifcopy;
>>>
>>> import nl.tue.cif.v2x1x1.cifcopy.qvto.transforms.cifcopy;
>>>
>>> import nl.tue.cif.v2x1x1.cifcopy.qvto.cifcopy;
>>>
>>> import cifcopy;
>>>
>>>
>>> None of this works, even though I have a
>>> nl.tue.cif.v2x1x1.cifcopy.qvto_1.0.0.jar in the Eclipse 'plugins'
>>> directory, and it contains a 'transforms' directory with a
>>> 'cifcopy.qvto' transformation.
>>>
>>> Does anyone know whether it is possible to import from plug-ins?
>>>
>>> Dennis
|
|
|
Re: [QVTo] Import from plug-ins? [message #545198 is a reply to message #545099] |
Wed, 07 July 2010 06:41 |
Eclipse User |
|
|
|
Originally posted by: dhendriksREMOVE_THIS.tueREMOVE.THIS.nl
Hello Sergey,
I removed the plug-in, restarted Eclipse, then created a launch
configuration for a new Eclipse Application, and executed it. In this
Eclipse, it worked. I closed it, re-exported the plug-in in the 'normal'
Eclipse, and restarted Eclipse. It still did not work here. However,
when I closed the project containing the imported transformation,
suddenly it did work. Opening the project in the workspace after that
didn't matter, it still worked.
Is it a known problem that imports from exported QVTo transformations
don't work if the source project of the exported plug-in is in the
workspace?
---
Another issue: In the one QVTo project I have a transforms directory
with cifcopy.qvto, and cifwalk.qvto. I exported them like this:
<extension
point="org.eclipse.m2m.qvt.oml.runtime.qvtTransformation">
<transformation
file="transforms/cifcopy.qvto"
id="transforms.cifcopy">
</transformation>
</extension>
<extension
point="org.eclipse.m2m.qvt.oml.runtime.qvtTransformation">
<transformation
file="transforms/cifwalk.qvto"
id="nl.tue.cif.v2x1x1.cifcopy.qvto">
</transformation>
</extension>
The second one (cifwalk) is illegal, from what you stated before (as the
file and id don't match). I could import transforms.cifcopy, but not
nl.tue.cif.v2x1x1.cifcopy.qvto, which supports your claim. However, I
could also import transforms.cifwalk! This seemed very weird to me, as I
never exported it using that name. Any clue what is happening here?
Best,
Dennis
Sergey Boyko wrote:
> Hi Dennis ,
>
> I have no idea what's wrong. In QVTo test suit we have distinct test
> case for that.
>
> Might it be that your plug-in was not accepted by platform after restart?
> You can try to launch new Eclipse instance right from your working
> instance (new Eclipse Application launch configuration). That is how is
> just checked that the solution works.
>
> Regards,
> Sergey
>
> Dennis Hendriks wrote:
>> Hello Sergey,
>>
>> thanks a lot for your reply. I tried adding the extension to the
>> plugin.xml, adding org.eclipse.m2m.qvt.oml.runtime as plugin to the
>> 'required plug-ins' of the project, and I exported the project. I
>> restarted Eclipse. However, I still get an 'Cannot find imported
>> compilation unit 'transforms.cifcopy'' error.
>>
>> Any idea what can be wrong?
>>
>> Best,
>> Dennis
>>
>>
>> Sergey Boyko wrote:
>>> Hi Dennis ,
>>>
>>> In order to import QVTo script from plug-in you should declare script
>>> export in plugin.xml like follows:
>>>
>>> <extension
>>> point="org.eclipse.m2m.qvt.oml.runtime.qvtTransformation">
>>> <transformation
>>> file="transforms/cifcopy.qvto"
>>> id="transforms.cifcopy">
>>> </transformation>
>>> </extension>
>>>
>>> Then import statement in QVTo script should work:
>>> import transforms.cifcopy;
>>>
>>> Note that 'id' field should correspond to directory structure where
>>> script is placed.
>>>
>>> Regards,
>>> Sergey
>>>
>>> Dennis Hendriks wrote:
>>>> Hello,
>>>>
>>>> Imports from other projects, or even better, from plug-ins, doesn't
>>>> seem to work in QVTo:
>>>>
>>>>
>>>> import
>>>> platform:/plugin/nl.tue.cif.v2x1x1.cifcopy.qvto/transforms/cifcopy.qvto;
>>>>
>>>>
>>>> import
>>>> platform:/plugin/nl.tue.cif.v2x1x1.cifcopy.qvto/transforms/cifcopy;
>>>>
>>>> import nl.tue.cif.v2x1x1.cifcopy.qvto.transforms.cifcopy;
>>>>
>>>> import nl.tue.cif.v2x1x1.cifcopy.qvto.cifcopy;
>>>>
>>>> import cifcopy;
>>>>
>>>>
>>>> None of this works, even though I have a
>>>> nl.tue.cif.v2x1x1.cifcopy.qvto_1.0.0.jar in the Eclipse 'plugins'
>>>> directory, and it contains a 'transforms' directory with a
>>>> 'cifcopy.qvto' transformation.
>>>>
>>>> Does anyone know whether it is possible to import from plug-ins?
>>>>
>>>> Dennis
|
|
|
Goto Forum:
Current Time: Mon Nov 04 20:53:44 GMT 2024
Powered by FUDForum. Page generated in 0.04106 seconds
|