Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] No common supertype error (No common supertype compiler error on generated Java Service wrappers)
[Acceleo] No common supertype error [message #540304] Tue, 15 June 2010 11:09 Go to previous message
Frank  is currently offline Frank
Messages: 3
Registered: April 2010
Junior Member
I've tried to create a Java Service Wrapper (using the wizard), but I'm receiving some compile errors.

My Java Service is called UMLServices.
Here's the method that is causing an issue:
public boolean isMarked(Element element, String mark)
{
for (Stereotype stereotype : element.getAppliedStereotypes())
{
if (mark.equalsIgnoreCase(stereotype.getName()))
{
return true;
}
}
for (String keyword : element.getKeywords())
{
if (keyword.equalsIgnoreCase(mark))
{
return true;
}
}

return false;
}

The generated Acceleo mtl file looks like this:

[module umlservices('http://www.eclipse.org/uml2/2.1.0/UML')/]

[query public isMarked(arg0 : Element, arg1 : String) : Boolean
= invoke('com.pwc.us.mda.services.UMLServices', 'isMarked(org.eclipse.uml2.uml.Element, java.lang.String)', Sequence{arg0, arg1}) /]


It seems fine, but the compiler is showing an error:
Type mismatch. No common supertype: (Element), (String)

I've done some debugging and it seems to happen when my service method takes more than one parameter that do not have a common superclass. Why? How can I change my service method or query to get this to work?

Thanks,

Frank
 
Read Message
Read Message
Read Message
Previous Topic:XtendParser
Next Topic:Accessing a set that's actually a sequence
Goto Forum:
  


Current Time: Wed May 22 12:32:02 EDT 2013

Powered by FUDForum. Page generated in 0.01760 seconds