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

Bug 323113

Summary: [editor] Editor should open even if file URI doesn't match
Product: [Modeling] TMF Reporter: Jan Koehnlein <jan>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: sebastian.zarnekow
Version: 1.0.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Jan Koehnlein CLA 2010-08-19 05:19:21 EDT
It'd be nice if the Xtext editor would open even though the file's URI does not match the resource factory registration. A typical example is if the user enters a file name whose extension has worng case, e.g. Model.mYdSL instead of Model.mydsl: While the Eclipse's editor registry can detect the editor, EMF's resource factory can't. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=322434

We should use an injected IResourceFactory to create the XtextResource in ResourceForIEditorInputFactory. As we are using EMF's default resource factory registry lookup in many other places, e.g. the builder, we'd also need some user feedback if the resource factory registered for a file's URI is the correct one for the file's content.
Comment 1 Sebastian Zarnekow CLA 2010-08-25 14:09:05 EDT

*** This bug has been marked as a duplicate of bug 299242 ***