Menu

#162 Editor will not open files that are not in the workspace

open
edt-eclipse (7)
5
2012-08-08
2012-08-08
No

An attempt to open a .ech file via the "Open file..." menu item will fail with the following exception if the file is not in the Eclipse workspace:

java.lang.NullPointerException
at org.eclipse.xtext.ui.editor.folding.DefaultFoldingStructureProvider.handleProjectionEnabled(DefaultFoldingStructureProvider.java:100)
at org.eclipse.xtext.ui.editor.folding.DefaultFoldingStructureProvider$ProjectionChangeListener.projectionEnabled(DefaultFoldingStructureProvider.java:186)
at org.eclipse.jface.text.source.projection.ProjectionViewer.fireProjectionEnabled(ProjectionViewer.java:489)
at org.eclipse.jface.text.source.projection.ProjectionViewer.enableProjection(ProjectionViewer.java:537)
at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1442)
at org.eclipse.xtext.ui.editor.XtextEditor.installFoldingSupport(XtextEditor.java:471)
...

The file can be opened if it is copied or linked into the workspace (e.g., by dragging it into the Package Explorer pane).

This appears to be a known issue with Xtext 2.2.1. It may only be partially fixed in 2.3:

http://www.eclipse.org/forums/index.php/m/896428/

(This issue reported by Eric and Max.)

Discussion


Log in to post a comment.