Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » default value for INT parameter(default value for INT parameter)
default value for INT parameter [message #1053162] Thu, 02 May 2013 18:59 Go to next message
Vincent De Bry is currently offline Vincent De BryFriend
Messages: 55
Registered: May 2013
Member
Hi,

Is it possible, in the grammar, to define a default value for an parameter ?

The thing is ok for ENUM as the first value is proposed.

But, basically with an integer parameter definition as the following:

Test:'Test' param=INT;

upon content assist, I would like to have a proposal with a given value (lets say 36 for example). Basically, the proposale is "param".

And what about ID default value, the same way ?

thanks.
Re: default value for INT parameter [message #1053177 is a reply to message #1053162] Thu, 02 May 2013 20:59 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
Hi,

simply customizing yourdslproposlprovider doesnt work?


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: default value for INT parameter [message #1053178 is a reply to message #1053177] Thu, 02 May 2013 21:24 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
class MyDslProposalProvider extends AbstractMyDslProposalProvider {

override completeTest_Param(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
acceptor.accept(createCompletionProposal("42", context));
}

}


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: default value for INT parameter [message #1053205 is a reply to message #1053178] Fri, 03 May 2013 06:32 Go to previous message
Vincent De Bry is currently offline Vincent De BryFriend
Messages: 55
Registered: May 2013
Member
Hi,

I thought there perhaps something could have been specified in the xtext file.
If not, ok, I will customize the proposal provider.

Thanks.
Previous Topic:Xtext with ATL
Next Topic:Refactoring breaks Scoping
Goto Forum:
  


Current Time: Fri Mar 29 15:09:02 GMT 2024

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

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

Back to the top