Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 320507

Summary: [Xtend] should show error when forgetting a semicolon in .ext file
Product: [Modeling] M2T Reporter: Dietmar Stoll <btickets>
Component: XpandAssignee: Karsten Thoms <karsten.thoms>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Holger.Schill, sebastian.zarnekow, sven.efftinge
Version: 1.0.0Flags: karsten.thoms: kepler+
Target Milestone: M4   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 312571    
Bug Blocks:    
Attachments:
Description Flags
mylyn/context/zip
none
patch for this bug karsten.thoms: iplog+

Description Dietmar Stoll CLA 2010-07-21 09:45:10 EDT
Build Identifier: Build id: I20100608-0911

Xtend should show an error when the developer forgets a semicolon.

Reproducible: Always

Steps to Reproduce:
1. Create new Xtext project.
2. In the generator project, in the Extensions.ext file, kill the last semicolon.
3. Save the file. No error is shown, only running the generator workflow results in an error message like
org.eclipse.xpand2.Generator  - mismatched input '<EOF>' expecting ';' on line 0
org.eclipse.internal.xtend.xtend.parser.ParseException: mismatched input '<EOF>' expecting ';' on line 0
Comment 1 Holger Schill CLA 2010-07-21 09:49:59 EDT
I think this is a problem of Xtend. So you should post this bug in the component Xpand next time as Xtend is a part of it. Sebastian will change the component for this bug.
Comment 2 Karsten Thoms CLA 2011-01-06 09:51:48 EST
The missing semicolon issue is also discussed in bug#312571
Comment 3 Karsten Thoms CLA 2011-01-06 10:12:37 EST
ResourceContributorBase#getErrorHandler():
start position of the error is 0 when a semicolon is missing at the end of the file. This caused that no error marker was produced. In this special case the file length must be determined to get the right position for the marker.
Comment 4 Karsten Thoms CLA 2011-01-06 10:12:39 EST
Created attachment 186171 [details]
mylyn/context/zip
Comment 5 Benedikt Niehues CLA 2011-01-10 05:17:39 EST
Created attachment 186369 [details]
patch for this bug

this patch fixes this bug, but the patch for 312571 is needed to be applied before!
Comment 6 Karsten Thoms CLA 2012-10-31 07:51:40 EDT
Patch looks fine. Thanks for it!
Comment 7 Karsten Thoms CLA 2013-02-07 06:17:24 EST
Part of Kepler M4 (Version 1.3.0)
Comment 8 Eclipse Webmaster CLA 2017-10-31 11:30:57 EDT
Requested via bug 522520.

-M.