Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352352

Summary: XtextRunner overrides global registries
Product: [Modeling] TMF Reporter: Sebastian Benz <sebastian.benz>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow
Version: 2.0.1Flags: sebastian.zarnekow: indigo+
Target Milestone: SR1   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Fix and test case.
none
Updated bug fix & test
none
Accidentally uploaded the wrong version of the patch. sven.efftinge: iplog+

Description Sebastian Benz CLA 2011-07-18 11:07:05 EDT
Created attachment 199841 [details]
Fix and test case.

The XtextRunner creates the injector before saving the global registries. Unfortunately, the generated standalone injector providers also initialize the registries when creating the injector. This leads to the global registries being overridden before they are saved. I attached a patch with a fix and a test.
Comment 1 Sebastian Zarnekow CLA 2011-07-18 16:25:18 EDT
We should make sure that the InjectProvider actually implements the interface IRegistryConfigurator before we cast it, shouldn't we?
Comment 2 Sebastian Benz CLA 2011-07-19 03:25:22 EDT
Created attachment 199873 [details]
Updated bug fix & test
Comment 3 Sebastian Benz CLA 2011-07-19 03:26:04 EDT
Ouh. Of course we should. I updated the patch.

(In reply to comment #1)
> We should make sure that the InjectProvider actually implements the interface
> IRegistryConfigurator before we cast it, shouldn't we?
Comment 4 Sebastian Benz CLA 2011-07-19 03:31:55 EDT
Created attachment 199874 [details]
Accidentally uploaded the wrong version of the patch.
Comment 5 Sebastian Zarnekow CLA 2011-07-22 10:01:48 EDT
Thanks for the patch. 

I moved the XtextRunnerTest to a new plugin org.eclipse.xtext.junit4.tests
Comment 6 Karsten Thoms CLA 2017-09-19 16:58:01 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 7 Karsten Thoms CLA 2017-09-19 17:09:13 EDT
Closing all bugs that were set to RESOLVED before Neon.0