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

Bug 370449

Summary: Migrate to Xtext 2.3.0M6
Product: [Modeling] EMF Reporter: Dennis Huebner <dennis.huebner>
Component: XcoreAssignee: Dennis Huebner <dennis.huebner>
Status: CLOSED FIXED QA Contact: Ed Merks <Ed.Merks>
Severity: normal    
Priority: P3 CC: Ed.Merks
Version: 1.0Flags: Ed.Merks: review+
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
patch proposal dennis.huebner: review+

Description Dennis Huebner CLA 2012-02-02 10:14:47 EST
Xtend was moved to a separate project tools.xtend.
We have to fix xcore dependencies to e.g. xtend2.lib
Comment 1 Dennis Huebner CLA 2012-02-03 06:43:29 EST
Created attachment 210505 [details]
patch proposal

Please review this patch. It fixes the build and some compile/xtend errors.
Comment 2 Ed Merks CLA 2012-02-04 04:42:52 EST
I'm curious why the explicit null pointer guards like this?  It's not possible for eAllContents to be null so just letting a normal null pointer happen seems fine.

if(eObject == null) {	
  throw new NullPointerException("eObject")
}
return eObject.eAllContents.toIterable

Otherwise it looks fine.  As soon as you commit this, I'll need to set up my installation to use the next xtend packaging.  Is that installable from somewhere already?  I don't want to be stuck in a state where I can't work.
Comment 3 Dennis Huebner CLA 2012-02-04 15:58:19 EST
(In reply to comment #2)
> I'm curious why the explicit null pointer guards like this?  It's not possible
> for eAllContents to be null so just letting a normal null pointer happen seems
> fine.
> 
> if(eObject == null) {    
>   throw new NullPointerException("eObject")
> }
> return eObject.eAllContents.toIterable

It's for more readable exception message, if you have an NPE in Line: xyz which then looks like this:
return eObject.eAllContents.toIterable 
You can't see where it's exactly comes from eObject or eAllContents. But maybe you are right, the most people knows that eAllContents is nonnull. I will change it as you suggested.

> 
> Otherwise it looks fine.  As soon as you commit this, I'll need to set up my
> installation to use the next xtend packaging.  Is that installable from
> somewhere already?  I don't want to be stuck in a state where I can't work.

The best way to install new stuff is to uninstall Xtext/Xtend first. Then install Xtext SDK and Xtend SDK  (not Xtend2 SDK) from  http://download.eclipse.org/modeling/tmf/xtext/updates/composite/nightly/
Comment 4 Dennis Huebner CLA 2012-02-04 16:31:48 EST
Pushed to master.

Build: successful
Tests: passed.
Comment 5 Ed Merks CLA 2012-03-31 14:24:08 EDT
The changes are available in the M6 build.