Home » Modeling » TMF (Xtext) » creating an Extension Library (documentation?)
creating an Extension Library (documentation?) [message #761501] |
Tue, 06 December 2011 14:54 |
|
Hi
in the documentation, when speaking of Xbase extension methods, we read
"Used in combination with the implicit parameter name in closures you
can write extension libraries to create ..."
but the link about extension libraries, does not bring anywhere... so,
how can we create an extension library? I mean, if I have a Java class,
that I'd like to be visible in my DSL Xbase expressions as extension
methods, what should I do? Is it documented somewhere?
thanks in advance
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
| |
Re: creating an Extension Library (documentation?) [message #761923 is a reply to message #761615] |
Wed, 07 December 2011 09:43 |
|
On 12/06/2011 07:47 PM, Max wrote:
> Hey,
> I already had a similiar problem. You may want to register a custom
> ExtensionClassNameProvider.
> See this solution here:
> http://www.eclipse.org/forums/index.php/mv/msg/262355/758328/#msg_758328
> - yes, you have to add all operators on your own.
>
> regards,
> Max
thanks Max for the link!
Actually I don't need new operators, but only some extension methods
that should be available in the DSL
cheers
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
|
Goto Forum:
Current Time: Fri Sep 20 22:11:31 GMT 2024
Powered by FUDForum. Page generated in 0.03129 seconds
|