Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320507 - [Xtend] should show error when forgetting a semicolon in .ext file
Summary: [Xtend] should show error when forgetting a semicolon in .ext file
Status: CLOSED FIXED
Alias: None
Product: M2T
Classification: Modeling
Component: Xpand (show other bugs)
Version: 1.0.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: M4   Edit
Assignee: Karsten Thoms CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 312571
Blocks:
  Show dependency tree
 
Reported: 2010-07-21 09:45 EDT by Dietmar Stoll CLA
Modified: 2017-10-31 11:30 EDT (History)
3 users (show)

See Also:
karsten.thoms: kepler+


Attachments
mylyn/context/zip (6.97 KB, application/octet-stream)
2011-01-06 10:12 EST, Karsten Thoms CLA
no flags Details
patch for this bug (1.93 KB, patch)
2011-01-10 05:17 EST, Benedikt Niehues CLA
karsten.thoms: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.