|
Re: Disable some commands from Xbase library [message #1423543 is a reply to message #1422800] |
Sun, 14 September 2014 16:26 |
Sebastian Zarnekow Messages: 3118 Registered: July 2009 |
Senior Member |
|
|
Hi Daniele,
please find the answers inline.
Regards,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 13.09.14 13:47, schrieb Daniele P.:
> Hi,
>
> I would like to know if is there the possibility to exclude some
> inherited command from xbase? For example i would like to gain the
> possibility to user to use only System.out.println instead of println
> (from InputOutput library). Or for example to avoid use of var and val.
> I'm thinking to write some validation rule for displaying an alert. I
> don't like this way because with the Eclipse's autocompletion i have
> always this possibility. Others ways?
Override ImplicitlyImportedFeatures and return only a subset from
getStaticImportClasses.
>
> Moreover, when i translate my method main (from my grammar) into the
> java main with "inferr", i have this output:
>
>
> public static void main(final String... args) {
> }
>
>
> I would like some like this:
>
>
> public static void main(String[] args) {
> }
>
>
> Is it possible? I'm using this code:
> members += elem.toMethod(elem.name, elem.type ?: inferredType) [
> parameters += elem.toParameter("args",
> model.newTypeRef(typeof(String)).addArrayTypeDimension())
> static = true
> varArgs = true
> body = elem.body
> ]
you can use varArgs = false instead of true and it'll yield a method
without vararg support.
> Thanks in advance
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04513 seconds