eclipse / Xpect

This repository has been rewritten to move to the Eclipse Foundation. Find the old history here: https://github.com/TypeFox/Xpect
http://www.xpect-tests.org/
Eclipse Public License 2.0
32 stars 28 forks source link

IllegalStateException when using XPECT in a PlugIn-Project #230

Open mmews-n4 opened 6 years ago

mmews-n4 commented 6 years ago

Reproduce

// XPECT warnings --> "The local variable v1 is never used"
let v1;

//// XPECT warnings --> "The local variable v2 is never used"
//let v2;

// IllegalStateException appears with any key input

Stacktrace

java.lang.IllegalStateException: No line with non-hidden tokens found after 
...et v1;\n\n//// >>>XPECT warnings --> "The local variable v2 is never used"<<<\n//let v2;\n\n
    at org.eclipse.xpect.xtext.lib.util.NextLine$NextLineProvider.findNextNonHiddenLeaf(NextLine.java:65)
    at org.eclipse.xpect.xtext.lib.util.NextLine$NextLineProvider.<init>(NextLine.java:47)
    at org.eclipse.xpect.xtext.lib.tests.ValidationTestModuleSetup$TestingResourceValidator.validateDelegateAndMapByOffset(ValidationTestModuleSetup.java:160)
    at org.eclipse.xpect.xtext.lib.tests.ValidationTestModuleSetup$TestingResourceValidator.validateDelegate(ValidationTestModuleSetup.java:144)
    at org.eclipse.xpect.ui.services.XtResourceValidator.validate(XtResourceValidator.java:55)
    at org.eclipse.xtext.ui.editor.validation.ValidationJob$1.exec(ValidationJob.java:91)
    at org.eclipse.xtext.ui.editor.validation.ValidationJob$1.exec(ValidationJob.java:1)
    at org.eclipse.xtext.util.concurrent.CancelableUnitOfWork.exec(CancelableUnitOfWork.java:26)
    at org.eclipse.xtext.resource.OutdatedStateManager.exec(OutdatedStateManager.java:91)
    at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.internalReadOnly(XtextDocument.java:520)
    at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.readOnly(XtextDocument.java:492)
    at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:133)
    at org.eclipse.xtext.ui.editor.validation.ValidationJob.createIssues(ValidationJob.java:86)
    at org.eclipse.xtext.ui.editor.validation.ValidationJob.run(ValidationJob.java:67)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)