Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » handle editor crashes on opening
handle editor crashes on opening [message #902216] Thu, 16 August 2012 12:04 Go to next message
Bastian Barton is currently offline Bastian BartonFriend
Messages: 8
Registered: June 2012
Junior Member
Hi xTexters,

sometimes, if there are some really severe mistakes in the DSL code, the editor tends to crash on opening with a NullPointerException.

Is there a way to just stop parsing at that point but at least opening the editor?

Thanks a lot!
BB

Here's the error message:


java.lang.NullPointerException
	at org.eclipse.xtext.EcoreUtil2.getContainerOfType(EcoreUtil2.java:100)
	at org.eclipse.xtext.GrammarUtil.containingAssignment(GrammarUtil.java:95)
	at org.eclipse.xtext.resource.DefaultLocationInFileProvider.findNodeFor(DefaultLocationInFileProvider.java:321)
	at org.eclipse.xtext.resource.DefaultLocationInFileProvider.doGetTextRegion(DefaultLocationInFileProvider.java:77)
	at org.eclipse.xtext.resource.DefaultLocationInFileProvider.getTextRegion(DefaultLocationInFileProvider.java:56)
	at org.eclipse.xtext.resource.DefaultLocationInFileProvider.getFullTextRegion(DefaultLocationInFileProvider.java:52)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider.computeObjectFolding(DefaultFoldingRegionProvider.java:101)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider.computeObjectFolding(DefaultFoldingRegionProvider.java:86)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider.doGetFoldingRegions(DefaultFoldingRegionProvider.java:68)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider$1.exec(DefaultFoldingRegionProvider.java:60)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider$1.exec(DefaultFoldingRegionProvider.java:1)
	at org.eclipse.xtext.util.concurrent.AbstractReadWriteAcces.readOnly(AbstractReadWriteAcces.java:32)
	at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:78)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider.getFoldingRegions(DefaultFoldingRegionProvider.java:56)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingStructureProvider.calculateProjectionAnnotationModel(DefaultFoldingStructureProvider.java:114)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingStructureProvider.initialize(DefaultFoldingStructureProvider.java:58)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingStructureProvider.handleProjectionEnabled(DefaultFoldingStructureProvider.java:99)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingStructureProvider$ProjectionChangeListener.projectionEnabled(DefaultFoldingStructureProvider.java:186)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.fireProjectionEnabled(ProjectionViewer.java:487)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.enableProjection(ProjectionViewer.java:535)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1414)
	at org.eclipse.xtext.ui.editor.XtextEditor.installFoldingSupport(XtextEditor.java:476)
	at org.eclipse.xtext.ui.editor.XtextEditor.createPartControl(XtextEditor.java:457)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:129)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:95)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:300)
Re: handle editor crashes on opening [message #902610 is a reply to message #902216] Sat, 18 August 2012 22:33 Go to previous messageGo to next message
Sergio Otero is currently offline Sergio OteroFriend
Messages: 37
Registered: June 2012
Member
Hi

I asked about this problem in the forum and submitted a bug that has been solved for the next release (2.3.1).

I don't know if it's stable or it's included (i'm on vacation), but you can download the nightly here: http://www.eclipse.org/modeling/tmf/downloads/
Re: handle editor crashes on opening [message #902611 is a reply to message #902610] Sat, 18 August 2012 22:34 Go to previous messageGo to next message
Sergio Otero is currently offline Sergio OteroFriend
Messages: 37
Registered: June 2012
Member
https://bugs.eclipse.org/bugs/show_bug.cgi?id=385636
Re: handle editor crashes on opening [message #902669 is a reply to message #902611] Sun, 19 August 2012 12:43 Go to previous message
Bastian Barton is currently offline Bastian BartonFriend
Messages: 8
Registered: June 2012
Junior Member
Hi Sergio,

will try it asap. Thanks for your hint - enjoy your vacation!

Cheers BB
Previous Topic:How can I setup xtend-maven-plugin encode for Xtend2 generation?
Next Topic:Acceleo and Xtext
Goto Forum:
  


Current Time: Thu Jul 09 09:21:07 GMT 2020

Powered by FUDForum. Page generated in 0.01694 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top