Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » disable implicit return in Xbase
disable implicit return in Xbase [message #1712428] Sat, 24 October 2015 10:03 Go to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1813
Registered: July 2009
Location: Firenze, Italy
Senior Member
Hi

in my DSL using Xbase I'd like to disable implicit returns completely,
so that the user must use 'return' explicitly.

In previous versions I seem to recall that there was something (in the
validator) to disable implicit return, but I can't find that anymore.

Is there a direct way to disable implicit return?

thanks in advance
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book


Re: disable implicit return in Xbase [message #1712596 is a reply to message #1712428] Mon, 26 October 2015 16:59 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
On 24.10.15 12:03, Lorenzo Bettini wrote:
> Hi
>
> in my DSL using Xbase I'd like to disable implicit returns completely,
> so that the user must use 'return' explicitly.
>
> In previous versions I seem to recall that there was something (in the
> validator) to disable implicit return, but I can't find that anymore.
>
> Is there a direct way to disable implicit return?
>
> thanks in advance
> Lorenzo
>

Hi Lorenzo,

this may serve as a source of inspiration:
org.eclipse.xtend.core.validation.XtendValidator.checkImplicitReturn(XtendFunction)

Best,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Find help at http://xtext.itemis.com or xtext(@)itemis.com
Blog: zarnekow.blogspot.com
Twitter: @szarnekow
Google+: https://www.google.com/+SebastianZarnekow
Re: disable implicit return in Xbase [message #1712714 is a reply to message #1712596] Tue, 27 October 2015 15:26 Go to previous message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1813
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 26/10/2015 17:59, Sebastian Zarnekow wrote:
> On 24.10.15 12:03, Lorenzo Bettini wrote:
>> Hi
>>
>> in my DSL using Xbase I'd like to disable implicit returns completely,
>> so that the user must use 'return' explicitly.
>>
>> In previous versions I seem to recall that there was something (in the
>> validator) to disable implicit return, but I can't find that anymore.
>>
>> Is there a direct way to disable implicit return?
>>
>> thanks in advance
>> Lorenzo
>>
>
> Hi Lorenzo,
>
> this may serve as a source of inspiration:
> org.eclipse.xtend.core.validation.XtendValidator.checkImplicitReturn(XtendFunction)

Thank you Sebastian!
That's what I needed :)

cheers
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book


Previous Topic:Accessing attributes in different resources
Next Topic:How to get name from unlinked EOBject
Goto Forum:
  


Current Time: Wed Sep 25 07:27:53 GMT 2024

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

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

Back to the top