Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [xtext] problems with stdlib::io extension
[xtext] problems with stdlib::io extension [message #47423] Wed, 03 June 2009 06:12 Go to next message
Knut Wannheden is currently offline Knut WannhedenFriend
Messages: 298
Registered: July 2009
Senior Member
Hi,

I stumbled upon a problem using the org::eclipse::xtend::util::stdlib::io
extension from a chk file. At runtime (i.e. in the editor) the extension
couldn't be found.

The check is part of the runtime plug-in which depends on the
org.eclipse.xtext.xtend plug-in which in turn reexports the
org.eclipse.xtend.util.stdlib plug-in. So far so good. The problem is that
the InjectableResourceManager gets the ClassLoader injected from the UI
plug-in which by default doesn't directly depend on the stdlib plug-in nor
on a plug-in which reexports it.

A simple solution is of course to either add a dependency in the UI
plug-in or have the runtime plug-in reexport the org.eclipse.xtext.xtend
plug-in. I have a feeling other users could also be confronted with
problems caused by this asymmetry. Not only when using the stdlib
extensions.

Regards,

--knut
Re: [xtext] problems with stdlib::io extension [message #47483 is a reply to message #47423] Wed, 03 June 2009 09:47 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
Yes, that's not nice. Do you have an idea how to solve this?
Maybe it is sufficient to document that?

Sven

Knut Wannheden schrieb:
> Hi,
>
> I stumbled upon a problem using the
> org::eclipse::xtend::util::stdlib::io extension from a chk file. At
> runtime (i.e. in the editor) the extension couldn't be found.
>
> The check is part of the runtime plug-in which depends on the
> org.eclipse.xtext.xtend plug-in which in turn reexports the
> org.eclipse.xtend.util.stdlib plug-in. So far so good. The problem is
> that the InjectableResourceManager gets the ClassLoader injected from
> the UI plug-in which by default doesn't directly depend on the stdlib
> plug-in nor on a plug-in which reexports it.
>
> A simple solution is of course to either add a dependency in the UI
> plug-in or have the runtime plug-in reexport the org.eclipse.xtext.xtend
> plug-in. I have a feeling other users could also be confronted with
> problems caused by this asymmetry. Not only when using the stdlib
> extensions.
>
> Regards,
>
> --knut
>
Re: [xtext] problems with stdlib::io extension [message #47575 is a reply to message #47483] Wed, 03 June 2009 17:34 Go to previous messageGo to next message
Knut Wannheden is currently offline Knut WannhedenFriend
Messages: 298
Registered: July 2009
Senior Member
Hi Sven,

Sven Efftinge wrote:
> Yes, that's not nice. Do you have an idea how to solve this?
> Maybe it is sufficient to document that?

Maybe a possibility would be to define an additional class loader binding
in the runtime plug-in. Either of these would have to be a named binding.
The InjectableResourceManager could have both injected and the UI class
loader could be optional. The resource manager could then first attempt
loading a resource using the runtime class loader and then using the UI
class loader.

A future solution will possibly be Guice 2.0 based and there a possibility
would be to have hierarchical resource managers.

Cheers

--knut
Re: [xtext] problems with stdlib::io extension [message #51852 is a reply to message #47575] Tue, 16 June 2009 13:21 Go to previous message
Knut Wannheden is currently offline Knut WannhedenFriend
Messages: 298
Registered: July 2009
Senior Member
Hi again,

Another simple solution would be to redefine the ClassLoader binding so
that it corresponds to the runtime project's ClassLoader instead of that
of the UI project. That is also how it was before the modules were
"merged".

Any other ideas?

Regards,

--knut
Previous Topic:[Xtext] import scoping
Next Topic:[Announce] TMF XTEXT 0.7.0RC5 is available
Goto Forum:
  


Current Time: Sat Jul 27 13:26:25 GMT 2024

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

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

Back to the top