| Summary: | File extensions with uppercase characters cause a java.lang.IllegalStateException | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Harald M <harald.m> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | jan, sebastian.zarnekow |
| Version: | unspecified | Flags: | sebastian.zarnekow:
helios+
|
| Target Milestone: | SR1 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Harald M
I guess hat is not a plain Xtext problem: EMF chooses the implementation of the Resource interface that is capable of parsing/serializing the content of a file into an EMF object model by asking the Resource.Factory.Registry with a given URI. In case of workspace resource, this will be a "platform:/resource/..." URI. URIs were never and have never been case insensitve. What's happening in your case is that as the file extension does not match a default resource implementation is chosen that is incapable of parsing your language. Many file systems are case sensitive. Xtext registers its own Resource.Factory in the plugin.xml of the language project and in the StandaloneSetup of class of your language. A workaround would be to additionally register the same Resource.Factory for all upper/lower case combinations of the file extension. Alternatively, you could bind the factory to a content type instead of a file extension. See the eclipse documentation for more details on content types. We should improve the error message. Improved error message. If your extensions are short consider setting all case combinations as file extensions in the MWE2 workflow. This will be the easiest workaround. I've added another bug targeting further improvement https://bugs.eclipse.org/bugs/show_bug.cgi?id=323113 Closing bug which were set to RESOLVED before Eclipse Neon.0. |