| Summary: | Ecore Model Editor doesn't work with inferred JvmTypes | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Oliver L <oliver.libutzki> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | sebastian.zarnekow |
| Version: | 2.2.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Oliver L
You could bind an implementation of the JdtTypeProviderFactory that checks for Is AdapterFactoryEditingDomainResourceSet, takes it's first resource, checks for platform:/resource uri and determines the project from the first segment. My solution is to bind a IJavaProjectProvider which extends XtextResourceSetBasedProjectProvider and does exactly what you have described. I wonder, if this was a safe operation as my ResourceSet might contain resources located in several projects. I don't know how the AdapterFactoryEditingDomainResourceSet is initialized. Is the resource which is displayed in my editor tab always the first resource of the ResourceSet? (In reply to comment #2) > My solution is to bind a IJavaProjectProvider which extends > XtextResourceSetBasedProjectProvider and does exactly what you have described. > I wonder, if this was a safe operation as my ResourceSet might contain > resources located in several projects. Same problem for the IJavaProject that is associated with the XtextResourceSet. See bug 326581 > I don't know how the AdapterFactoryEditingDomainResourceSet is initialized. Is > the resource which is displayed in my editor tab always the first resource of > the ResourceSet? Don't know whether that would be mission critical anyway ... Feel free to debug the constructor invocation ;-) Ok, the code Ed Willink posted is exactly what I did, too ;-) Bug 326581 is classified as an enhancement, but I would call it "bug" as you lose the ability to view the inferred EMF model. Don't you think so? *** This bug has been marked as a duplicate of bug 326581 *** |