Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352352 - XtextRunner overrides global registries
Summary: XtextRunner overrides global registries
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: SR1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-18 11:07 EDT by Sebastian Benz CLA
Modified: 2017-09-19 17:09 EDT (History)
1 user (show)

See Also:
sebastian.zarnekow: indigo+


Attachments
Fix and test case. (11.87 KB, patch)
2011-07-18 11:07 EDT, Sebastian Benz CLA
no flags Details | Diff
Updated bug fix & test (11.87 KB, text/plain)
2011-07-19 03:25 EDT, Sebastian Benz CLA
no flags Details
Accidentally uploaded the wrong version of the patch. (11.94 KB, patch)
2011-07-19 03:31 EDT, Sebastian Benz CLA
sven.efftinge: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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