Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTo] Blackbox example - Cannot find imported compilation unit
[QVTo] Blackbox example - Cannot find imported compilation unit [message #658061] Sat, 05 March 2011 19:31 Go to next message
Kirsten M. Z. is currently offline Kirsten M. Z.Friend
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 Go to previous messageGo to next message
Kirsten M. Z. is currently offline Kirsten M. Z.Friend
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 #658407 is a reply to message #658100] Tue, 08 March 2011 11:58 Go to previous messageGo to next message
Haffi is currently offline HaffiFriend
Messages: 39
Registered: November 2010
Member
Thank you for putting this here, I'm dealing exactly with this problem. Do the transformations and the library have to be within the same project/plugin?
Re: [QVTo] Blackbox example - Cannot find imported compilation unit [message #692799 is a reply to message #658407] Tue, 05 July 2011 09:11 Go to previous messageGo to next message
Dominic S. is currently offline Dominic S.Friend
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 Wink 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

Re: [QVTo] Blackbox example - Cannot find imported compilation unit [message #692812 is a reply to message #692799] Tue, 05 July 2011 09:35 Go to previous message
Dominic S. is currently offline Dominic S.Friend
Messages: 11
Registered: May 2011
Junior Member
Hmm... I indeed did not start a new instance of eclipse and created the second example project here, but I tried to get it working in one eclipse instance and thought that would do the job. Isn't this possible? So I could simultanously develop the blackbox classes and the QVTo scripts (these are supposed to be shipped in one plugin). Did you get such stuff working?

Best regards,
Dominic
Previous Topic:problem with XML!Text
Next Topic:[ATL] Launch atl transformations programmatically
Goto Forum:
  


Current Time: Fri Mar 29 02:05:12 GMT 2024

Powered by FUDForum. Page generated in 0.01886 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top