Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » QVT-OML » Referencing XSD Components from Java Blackbox(Can't resolve XSD Component interface as OCL type in java method)
Referencing XSD Components from Java Blackbox [message #1018517] Thu, 14 March 2013 01:24 Go to next message
Tim Myer is currently offline Tim MyerFriend
Messages: 81
Registered: July 2009
Member
I currently have a QVTO file and a Java blackbox unit (registered with extension point org.eclipse.m2m.qvt.oml.javaBlackboxUnits). The blackbox unit has been working. So has the QVTO file.

I have added a new method to the Java blackbox unit with this method signature:

@Operation(contextual = true, kind = Operation.Kind.HELPER)
public static void setSchemaForSchema(final XSDSchema self, final String prefix, final String namespace) { .... }

I added the following line to my QVTO file:

modeltype XSD uses 'http://www.eclipse.org/xsd/2002/XSD';

Now the blackbox fails to load and I get the following error in my error log:

Can't resolve 'interface org.eclipse.xsd.XSDSchema' as OCL type in java method 'public static void my.Blackbox.setSchemaForSchema(org.eclipse.xsd.XSDSchema,java.lang.String,java.lang.String)'

Am I using the wrong modeltype declaration? I can't seem to find another that would make sense.

Thanks in advance for the help,
---Tim---
Re: Referencing XSD Components from Java Blackbox [message #1018524 is a reply to message #1018517] Thu, 14 March 2013 01:40 Go to previous messageGo to next message
Tim Myer is currently offline Tim MyerFriend
Messages: 81
Registered: July 2009
Member
Never mind. I figured out what was missing. I need to declare the metamodel nsURI as http://www.eclipse.org/xsd/2002/XSD in the org.eclipse.m2m.qvt.oml.javaBlackboxUnits.
---Tim---
Re: Referencing XSD Components from Java Blackbox [message #1018647 is a reply to message #1018524] Thu, 14 March 2013 08:54 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4188
Registered: July 2009
Senior Member
Hi

Thanks for letting us know. Maybe someone will find your solution
helpful too.

Regards

Ed Willink


On 14/03/2013 01:40, Tim Myer wrote:
> Never mind. I figured out what was missing. I need to declare the
> metamodel nsURI as http://www.eclipse.org/xsd/2002/XSD in the
> org.eclipse.m2m.qvt.oml.javaBlackboxUnits.
> ---Tim---
Previous Topic:QVT multifile structure
Next Topic:Using blackbox in a qvt transformation called by java
Goto Forum:
  


Current Time: Sun Dec 21 19:36:29 GMT 2014

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

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