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

Bug 352241

Summary: [GenModelHelper] Bogus warning about an already registered GenModel
Product: [Modeling] TMF Reporter: Moritz Eysholdt <moritz.eysholdt>
Component: Xtext BacklogAssignee: Project Inbox <tmf.xtext-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: arcnorj, christian.dietrich.opensource, mail, sebastian.zarnekow
Version: 2.0.0   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Moritz Eysholdt CLA 2011-07-15 13:54:08 EDT
When registering a genmodel:

---
bean = StandaloneSetup {
  platformUri = "${runtimeProject}/.."
  registerGenModelFile = "platform:/resource/foo/bar.genmodel"
}
---

An then using the EcoreGeneratorFragment, there are cases were an invalid waring is raised about replacing a registered GenModel with another GenModel. 

Usually, GenModels are not replaced when it is tried to register the same GenModel again.

In this case, however, the GenModel is registered with a platform:/resource/-URI and the second time the same GenModel is registered via file:/-URI.

The GenModelHelper should recognize that the GenModels are identical and not replace the already registered one.

A workaround for this case is not needed since both GenModels are the same.
Comment 1 Sebastian Zarnekow CLA 2011-11-09 14:48:14 EST
Not 2.1