eclipse-qvto / org.eclipse.qvto

Eclipse Public License 2.0
0 stars 0 forks source link

Import Works in 3.4 but not in 3.6 #966

Open eclipse-qvt-oml-bot opened 1 day ago

eclipse-qvt-oml-bot commented 1 day ago

| --- | --- | | Bugzilla Link | 494274 | | Status | UNCONFIRMED | | Importance | P3 normal | | Reported | May 23, 2016 05:36 EDT | | Modified | May 23, 2016 07:38 EDT | | Reporter | Simon Eismann |

Description

Created attachment 261936\ MWE

in my eclipse plugin project the line

import transforms.Helper;

fails when using version 3.6, but works fine on 3.4. It breaks with the msg:

Cannot find imported compilation unit 'transforms.Helper'

The file is located in a different Project which defines the following extension points in the plugin.xml:

\ \ \ \ \ \ \ \ \ \ \

I have attatched a MWE that showcases the problem. If you use the luna.target running the Main.java as a Junit Plugin Test works just fine, but using the neon.target it fails. \ This is the first bug i report, please let me know if i messed up anything

:compression: mwe.zip

eclipse-qvt-oml-bot commented 1 day ago

By Sergey Boyko on May 23, 2016 07:14

Hi Simon,

Your question has been answered in QVTO group https://www.eclipse.org/forums/index.php?t=msg&th=1077646&goto=1732895&#msg_1732895

Below are some notes about the case you've provided.

About "org.eclipse.m2m.qvt.oml.runtime.qvtTransformationContainer" extension point. \ It comes in play only for imports inside the deployed plug-in.

Using MWE attachment this means:

Suppose you placed another library 'Helper2.qvto' in 'library/transforms' folder. And then imports this new library from Helper.qvto with the statement:\ import Helper2;

So to correctly locate source for 'Helper2' import QVTO engine will use "org.eclipse.m2m.qvt.oml.runtime.qvtTransformationContainer" extension point from the 'library' plug-in.\ Actually it fully repeats the setting "QVT source container" of workspace QVTo plug-ins.

eclipse-qvt-oml-bot commented 1 day ago

By Sergey Boyko on May 23, 2016 07:38

About "org.eclipse.m2m.qvt.oml.runtime.qvtTransformation" extension point.

Declaration you've used

\ \ \

is only semi-correct even for Luna target platform. \ In case one will try to browse for transformation module (from "Operational QVT Interpreter" launch configuration) it will obtain the error "Cannot find import module 'platfrom:/plugin/Helper'".

The fully correct declaration for Luna target is:

\ \ \

And this declaration is also working for Mars and Neon targets.

As Christopher has described in the news group for Mars release we fixed ambiguities in the interpretation of "org.eclipse.m2m.qvt.oml.runtime.qvtTransformation" extension point.

Now the 'id' field of the extension point is interpreted exactly as the ID of deployed library/transformation.

So both cases \ a) id="transforms.Helper" with accompanied 'import transforms.Helper;'\ b) id="Helper" with accompanied 'import Helper;'

are correctly handled in Mars/Neon releases.