[QVTo] Blackbox example - Cannot find imported compilation unit [message #658061] |
Sat, 05 March 2011 19:31 |
Kirsten M. Z. Messages: 132 Registered: July 2010 |
Senior Member |
|
|
Hello,
currently, I try to get the block-box library example working. Unfortunately, I always get the error:
Cannot find imported compilation unit 'm2m.qvt.oml.UtilitiesLibrary'.
Because of the poor documentation, I have no idea if it my mistake, or maybe a bug.
Steps to reproduce:
1. Download "eclipse-modeling-helios-SR2-incubation-win32" and run
2. Install QVTo via "Installing Modelling Components" and restart
3. Create "Black-box Library Definition" project via Example Wizard
4. "Run as" -> "Eclipse Application" to start new instance (thereby, I expect that extensions point is loaded and black box is registered correctly?)
5. For simplicity, I just create "SimpleUML to RDB Transformation Project" there.
6. Open "Simpleuml_To_Rdb.qvto" file and include the following line at the top:
import m2m.qvt.oml.UtilitiesLibrary;
Then I get the error
Cannot find imported compilation unit 'm2m.qvt.oml.UtilitiesLibrary'.
Of course, I also tried
import org.eclipse.m2m.qvt.oml.examples.blackbox.UtilitiesLibrary;
and others... but I think this is not how it is intended.
Cannot find imported compilation unit 'm2m.qvt.oml.UtilitiesLibrary'.
What's wrong?
I have the same problem using standalone transformations. However, I know the reason there (no extension point, so no registration, etc.):
http://www.eclipse.org/forums/index.php?t=msg&th=197633& amp;start=0&S=e85c964f9a12aa146d7eee0f5a2ff245
After looking into the sources, I have found stuff like BlackboxRegistry or UnitResolver. However, there is no possibility to bring my own registry (registry entry) or unit resolver into play.
Could anyone provide more information/documentation?
|
|
|
Re: [QVTo] Blackbox example - Cannot find imported compilation unit [message #658100 is a reply to message #658061] |
Sun, 06 March 2011 12:42 |
Kirsten M. Z. Messages: 132 Registered: July 2010 |
Senior Member |
|
|
Ok, I found the problem. In my opinion, the documentation is the real problem here. So for anybody who ends in this thread.
<extension point="org.eclipse.m2m.qvt.oml.javaBlackboxUnits">
<unit name="ExampleJavaLib" namespace="m2m.qvt.oml">
<library name="UtilLib" class="org.eclipse.m2m.qvt.oml.examples.blackbox.UtilitiesLibrary">
<metamodel nsURI="http://www.eclipse.org/emf/2002/Ecore"/>
</library>
</unit>
</extension>
For such an extension point the class org.eclipse.m2m.qvt.oml.examples.blackbox.UtilitiesLibrary must be accessed the following way (within the QVTo script):
import m2m.qvt.oml.ExampleJavaLib;
[Updated on: Sun, 06 March 2011 12:42] Report message to a moderator
|
|
|
|
Re: [QVTo] Blackbox example - Cannot find imported compilation unit [message #692799 is a reply to message #658407] |
Tue, 05 July 2011 09:11 |
Dominic S. Messages: 11 Registered: May 2011 |
Junior Member |
|
|
Hey!
I'm dealing with this problem, too. But unfortunately, I do not get it working the way you (@Kirsten) described. Can this possibly be a problem of the eclipse version? I'm using Helios. I tried to get the Papyrus java blackbox transformation working (no code written by my own, sometimes it must have worked) but I receive the same error.
Is there anything else I have to do to get this working?
Please, I will appreciate any helpful comment!
Best regards,
Dominic
/edit Oh, you're using Helios as well. This post is not as old as I thought Well, what else could cause that trouble? Maybe you could send me your source code for the working example? This would be *very* helpful, I suppose... I've got a deadline one week ahead, then I'll need my code working, so I'll be very grateful for sure
[Updated on: Tue, 05 July 2011 09:26] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04100 seconds