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 09:46 Go to next message
Sundeep Ramesh is currently offline Sundeep Ramesh
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 10:12 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6126
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
Re: [Xpand] Query regarding Extension (.ext) file [message #687737 is a reply to message #686577] Thu, 23 June 2011 01:47 Go to previous message
Sundeep Ramesh is currently offline Sundeep Ramesh
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 Jul 24 04:39:01 EDT 2014

Powered by FUDForum. Page generated in 0.02570 seconds