Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE / error upon each edit of a domain-model file (without the .xt extension) #153

Closed
lukeu opened this issue Oct 6, 2014 · 7 comments
Closed

Comments

@lukeu
Copy link

lukeu commented Oct 6, 2014

Say I have a file MyFile.dmodel open in Eclipse development environment, and this dev environment is not aware of the .dmodel file association (only my runtime environment should know about that).

Every time I type in this file's editor, I get an error "An internal error occurred during: "XtextReconcilerJob"." and a NPE stacktrace. Once I rename the file to MyFile.dmodel.xt (to embed XPECT annotations) the crashes go away.

    at org.eclipse.xtext.ui.editor.DirtyStateEditorSupport.getResourceDescriptionManager(DirtyStateEditorSupport.java:496)
    at org.eclipse.xtext.ui.editor.DirtyStateEditorSupport.announceDirtyState(DirtyStateEditorSupport.java:466)
    at org.eclipse.xtext.ui.editor.reconciler.XtextDocumentReconcileStrategy.postParse(XtextDocumentReconcileStrategy.java:160)
    at org.eclipse.xtext.ui.editor.reconciler.XtextDocumentReconcileStrategy.doReconcile(XtextDocumentReconcileStrategy.java:146)
    at org.eclipse.xtext.ui.editor.reconciler.XtextDocumentReconcileStrategy.reconcile(XtextDocumentReconcileStrategy.java:65)
    at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.doRun(XtextReconciler.java:401)
    at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.access$3(XtextReconciler.java:386)
    at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler$1.process(XtextReconciler.java:327)
    at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler$1.process(XtextReconciler.java:1)
    at org.eclipse.xtext.util.concurrent.IUnitOfWork$Void.exec(IUnitOfWork.java:36)
    at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.modify(XtextDocument.java:418)
    at org.eclipse.xtext.ui.editor.model.XtextDocument.internalModify(XtextDocument.java:131)
    at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.run(XtextReconciler.java:324)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

I think this crash only started appearing after installing Xpect (although I cannot say this with certainty).

@meysholdt
Copy link
Contributor

This is: https://bugs.eclipse.org/bugs/show_bug.cgi?id=446319

I'm not sure yet if I want or should spend much effort in Xpect to support XPECT-statements in files that don't have the .xt file extension. The problem with these files is that Xpect can't guarantee that Xtext uses the right Guice Injector for them.

@meysholdt
Copy link
Contributor

Anyway, thank you for reporting this.

@lukeu
Copy link
Author

lukeu commented Oct 8, 2014

I'm not sure yet if I want or should spend much effort in Xpect to support XPECT-statements in files that don't have the .xt file extension.

I would have thought the opposite was desired, that Xpect would not do any processing unless the file has an .xt extension (??)

@meysholdt
Copy link
Contributor

I think we mean the same thing...
file.foo.tx // Xpect syntax support
file.foo // no Xpect syntax support

@meysholdt
Copy link
Contributor

fixed in Xtext. The fix will go into Xtext 2.8.0, so the problem remains with Xtext 2.7.x.

@meysholdt
Copy link
Contributor

hi Luke, hi @iloveeclipse,

we're preparing an Xtext maintenance release (v2.7.3) that will include the relevant fix:
http://git.eclipse.org/c/tmf/org.eclipse.xtext.git/commit/?h=v2.7_Maintenance&id=4726bb2f2909eaecc39b7900e07a9220b2c67bdb

@meysholdt
Copy link
Contributor

Xtext 2.7.3 is now available:
https://www.eclipse.org/Xtext/news.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants