| [Acceleo] No common supertype error [message #540304] |
Tue, 15 June 2010 11:09  |
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
|
|
|