DevBoost / EMFText

EMFText is an Eclipse plug-in that allows you to define text syntax for languages described by an Ecore metamodel. EMFText enables developers to define textual Domain Specific Languages quickly and without the need to learn new technologies and concepts.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XYZResource.getErrors() throws ArrayIndexOutOfBoundsException

marcusmunzert opened this issue · comments

When I edit my textual model and the model is incorrect, sometimes an error dialog pops up that indicates that an ArrayIndexOutOfBoundsException has occurred. The following related stack trace I have found in my .log File in the Eclipse workspace:

'''
java.lang.ArrayIndexOutOfBoundsException
at org.eclipse.emf.common.util.BasicEList.toArray(BasicEList.java:255)
at com.gs.gapp.language.gapp.resource.gapp.util.GappCopiedEList.(GappCopiedEList.java:19)
at com.gs.gapp.language.gapp.resource.gapp.mopp.GappResource.getErrors(GappResource.java:765)
at com.gs.gapp.language.gapp.resource.gapp.ui.GappCodeFoldingManager.calculatePositions(GappCodeFoldingManager.java:352)
at com.gs.gapp.language.gapp.resource.gapp.ui.GappCodeFoldingManager$FoldingUpdateListener.parsingCompleted(GappCodeFoldingManager.java:19)
at com.gs.gapp.language.gapp.resource.gapp.ui.GappEditor.notifyBackgroundParsingFinished(GappEditor.java:389)
at com.gs.gapp.language.gapp.resource.gapp.ui.GappBackgroundParsingStrategy$ParsingJob.run(GappBackgroundParsingStrategy.java:107)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
'''

All this occurs inside code that got generated by the EMFText SDK. The SDK version that was used for the generation of the editor- and parser-code is 1.4.2.v201307191141. I use the editor and parser inside Kepler.

Cheers,
Marcus

Hi Marcus,

I've experienced the same behaviour occassionally while using editors for other languages. There is a race condition caused by the background parsing. I cannot resolve the problem as a whole right now, but I've committed a fix that should at least fix the problem when the CodeFoldingManager is involved.

Please update from the trunk update site once the next build is finished and let me know whether the problem persists. Until then I'll close the issue. Feel free to reopen it if required.

Cheers,

Mirko