Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Xpand] Query regarding Extension (.ext) file
[Xpand] Query regarding Extension (.ext) file [message #686557] Wed, 22 June 2011 13:46 Go to next message
Sundeep Ramesh is currently offline Sundeep RameshFriend
Messages: 8
Registered: May 2011
Location: Bangalore, India
Junior Member
Hi All, I am a newbie to Xpand. I have created an Extension file

Extensions.ext

List[String] getOutClasses(List[test::Attribute]) :
    JAVA com.test.Utils.getOutClasses(List[test::Attribute]);


and a java class Utils.java with the static method

public static List<String> getOutClasses(List<Attribute> attributes) {
...
}


but the problem is in the extension file I am not sure how to specify the argument in the Extension file for the java call.
JAVA com.test.Utils.getOutClasses(List[test::Attribute]);

if i do this i get an error "mismatched input 'List' expecting ')'".


Any help here is appreciated. Thanking you in advance.
Re: [Xpand] Query regarding Extension (.ext) file [message #686577 is a reply to message #686557] Wed, 22 June 2011 14:12 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

have a look at the doc for JAVA Extensions. Thy syntax is:
JAVA com.test.Utils.getOutClasses(java.util.List);


~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: [Xpand] Query regarding Extension (.ext) file [message #687737 is a reply to message #686577] Thu, 23 June 2011 05:47 Go to previous message
Sundeep Ramesh is currently offline Sundeep RameshFriend
Messages: 8
Registered: May 2011
Location: Bangalore, India
Junior Member
Hi Christian,
I read the documentation but I thought that I need to specify the List along with the specific type, that is where I made my error. Thanks for your help.

~Sundeep
Previous Topic:Text Production Rules
Next Topic:[Acceleo] - Problem with types invoking Java Wrappers
Goto Forum:
  


Current Time: Thu Apr 18 12:57:22 GMT 2024

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

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

Back to the top