Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » EcoreUtil2:getResource from a junit
EcoreUtil2:getResource from a junit [message #642781] Thu, 02 December 2010 16:14 Go to next message
drew frantz is currently offline drew frantzFriend
Messages: 340
Registered: July 2009
Senior Member
When my Scope provider calls
EcoreUtil2:getResource(ctx,"platform:/plugin/..../mydecl.foo "") from a junit
test the call always returns a null resource. (Works fine when I run it as
part of a plugin). The test extends AbstractXtextTests , is there something
more in the junit runtime settings I need. Any other hints would be great.
Re: EcoreUtil2:getResource from a junit [message #642827 is a reply to message #642781] Thu, 02 December 2010 20:15 Go to previous message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Drew,

make sure to register the resource factory for file extension "foo" in
your unit tests. This will be done by the plugin.xml an Equinox
environment. Btw: Did you try to run your unit tests as plugin tests in
headless mode?

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 02.12.10 17:14, schrieb drew:
> When my Scope provider calls
> EcoreUtil2:getResource(ctx,"platform:/plugin/..../mydecl.foo "") from a
> junit test the call always returns a null resource. (Works fine when I
> run it as part of a plugin). The test extends AbstractXtextTests , is
> there something more in the junit runtime settings I need. Any other
> hints would be great.
>
>
Previous Topic:how to eliminate duplicate checking
Next Topic:VerifyError when invoking content assist
Goto Forum:
  


Current Time: Fri Apr 19 05:50:19 GMT 2024

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

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

Back to the top