Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Implicit static extensions(like all the [...]Extensions classes in org.eclipse.xtext.xbase.lib)
Implicit static extensions [message #1749410] Tue, 06 December 2016 12:00 Go to next message
Thomas Kohler is currently offline Thomas KohlerFriend
Messages: 7
Registered: November 2016
Junior Member
Hello,

I'm looking for the correct way to implicit import several classes as static extensions to my xbase based DSL.

For example classes like "org.eclipse.xtext.xbase.lib.ListExtensions" from the "org.eclipse.xtext.xbase.lib.jar" are implicit imported, but own classes have to be imported using an import statement like "import static extension my.libraries.LibXyz.*" to be visible in xbase Expressions.

I want to determine the possible static extension classes out of the package hirachy and a special mark on entities/classes which provide implicit static extensions.

Thank you,
Tom
Re: Implicit static extensions [message #1749411 is a reply to message #1749410] Tue, 06 December 2016 12:24 Go to previous message
Christian Dietrich is currently online Christian DietrichFriend
Messages: 10900
Registered: July 2009
Senior Member
hi,

can you elaborate the package structure thing

simply subclass and bind ImplicitlyImportedFeatures could work.
alternatively you might dig into FeatureScopes class


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Previous Topic:Warnings when compiling xtext with Maven
Next Topic:Problems with code generation
Goto Forum:
  


Current Time: Mon Jul 24 19:00:52 GMT 2017

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

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