Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to add a JvmFormalParameter with Java Ellipsis Type
How to add a JvmFormalParameter with Java Ellipsis Type [message #1827962] Wed, 27 May 2020 17:52 Go to next message
Thomas Kohler is currently offline Thomas KohlerFriend
Messages: 15
Registered: November 2016
Junior Member
Hello,

Is it possible to create a JvmFormalParameter with Java Ellipsis type in the Inferrer? The result should look like the following snippet:
public String text(Object... params)


Regards, Tom
Re: How to add a JvmFormalParameter with Java Ellipsis Type [message #1827963 is a reply to message #1827962] Wed, 27 May 2020 18:46 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
simply setting varArgs=true does not work?

members += entity.toMethod("dully", String.typeRef) [
parameters += entity.toParameter("demo", String.typeRef.addArrayTypeDimension)
varArgs=true


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How to add a JvmFormalParameter with Java Ellipsis Type [message #1828263 is a reply to message #1827963] Fri, 05 June 2020 08:02 Go to previous message
Thomas Kohler is currently offline Thomas KohlerFriend
Messages: 15
Registered: November 2016
Junior Member
Thank you! The varArgs was the key!
Previous Topic:star files and Decision can match input such as
Next Topic:[resolved] Debugging grammar issue not represented in ANTLR
Goto Forum:
  


Current Time: Thu Apr 25 12:48:27 GMT 2024

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

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

Back to the top