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

Bug 327468

Summary: Open resources without IFile in text editor (View files from remote history fails)
Product: [Modeling] TMF Reporter: Benjamin Schwertfeger <benjamin.schwertfeger>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: sebastian.zarnekow
Version: 1.0.0Flags: sebastian.zarnekow: indigo+
Target Milestone: M7   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Benjamin Schwertfeger CLA 2010-10-11 12:10:05 EDT
A generated editor for Xtext grammars reacts on IEditorStorageInputs which are RemoteFileEditorInputs or FileRevisionEditorInput. This leads to a "java.lang.IllegalArgumentException: Couldn't create EMF Resource for input org.eclipse.egit.ui.internal.FileRevisionEditorInput".

Those editor inputs are from the history view with subclipse, subversive or git. The corresponding storage is only readable and has nur URI.

The expected result would be the generated editor, which is perhaps not possible without an local file. The second way would be a plain text editor if the Xtexteditor is not possible.

Steps to reconstruct:
1) Open a model file for your own Xtext-Editor.
2) Share the file inside a svn-Repository.
3) Change the file locally.
4) Check-in again
5) Go to Svn-History of the file and open the version from 2.

After Step 5 the Editor showing the Error is visible.
Comment 1 Benjamin Schwertfeger CLA 2011-04-26 14:05:57 EDT
Seems like it's working in Xtext2. Can someone confirm opening files direct from Repository looks as nice as java files do in this case?
Comment 2 Sebastian Zarnekow CLA 2011-05-17 16:57:13 EDT
Michael implemented the integration with the eclipse compare framework.
Comment 3 Karsten Thoms CLA 2017-09-19 17:01:35 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 4 Karsten Thoms CLA 2017-09-19 17:12:58 EDT
Closing all bugs that were set to RESOLVED before Neon.0