After rebuilding my language, the file test.jav (open in an editor) is scheduled for parsing/analysis, but failed with the following 2 errors:

Error running parser for language Java and input test.jav:
java.lang.IllegalStateException: Must be called from UI thread
at org.strategoxt.imp.runtime.EditorState.getActiveEditor(EditorState.java:52)
at org.strategoxt.imp.runtime.EditorState.getEditorFor(EditorState.java:82)
at org.strategoxt.imp.runtime.services.views.outline.OutlineService.getOutline(OutlineService.java:43)
at org.strategoxt.imp.runtime.services.views.outline.SpoofaxOutlinePage.update(SpoofaxOutlinePage.java:94)
at org.strategoxt.imp.runtime.services.views.outline.SpoofaxOutlinePage.update(SpoofaxOutlinePage.java:73)
at org.eclipse.imp.editor.ParserScheduler.notifyModelListeners(ParserScheduler.java:136)
at org.eclipse.imp.editor.ParserScheduler.run(ParserScheduler.java:88)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

An internal error occurred during: "Java ParserScheduler for test.jav".
java.lang.IllegalStateException: Must be called from UI thread
at org.strategoxt.imp.runtime.EditorState.getActiveEditor(EditorState.java:52)
at org.strategoxt.imp.runtime.EditorState.getEditorFor(EditorState.java:82)
at org.strategoxt.imp.runtime.services.views.outline.OutlineService.getOutline(OutlineService.java:43)
at org.strategoxt.imp.runtime.services.views.outline.SpoofaxOutlinePage.update(SpoofaxOutlinePage.java:94)
at org.strategoxt.imp.runtime.services.views.outline.SpoofaxOutlinePage.update(SpoofaxOutlinePage.java:73)
at org.eclipse.imp.editor.ParserScheduler.notifyModelListeners(ParserScheduler.java:136)
at org.eclipse.imp.editor.ParserScheduler.run(ParserScheduler.java:95)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Submitted by Gabriël Konat on 17 February 2014 at 16:07

On 17 February 2014 at 16:09 Gabriël Konat commented:

Any subsequent edits to the file also triggered these errors. Closing and opening the file fixed it.

Log in to post comments