Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370449 - Migrate to Xtext 2.3.0M6
Summary: Migrate to Xtext 2.3.0M6
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Xcore (show other bugs)
Version: 1.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Dennis Huebner CLA
QA Contact: Ed Merks CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-02 10:14 EST by Dennis Huebner CLA
Modified: 2012-03-31 14:24 EDT (History)
1 user (show)

See Also:
Ed.Merks: review+


Attachments
patch proposal (212.66 KB, patch)
2012-02-03 06:43 EST, Dennis Huebner CLA
dennis.huebner: review+
Details | Diff

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