We had a brief offline discussion about making our API ready to play well 
with Java 8 closures. It looks like the current draft state is that any 
API *interface* with a single abstract method ("SAM type") can be used 
with the closure syntax. For IContextFunction/ContextFunction I might have 
leaned towards an abstract class in the past because it would enable us to 
extend it in the future, but in this case I think closure compatibility is 
more valuable so I propose we just have IContextFunction. A function 
object is about the most perfect example of a type that should be able to 
use closure syntax. RunAndTrack would be another candidate to make into a 
SAM type although that change would be more disruptive. The method 
RunAndTrack#runExternalCode could be a static helper declared elsewhere. 
Without that RunAndTrack could actually just be replaced with 
IContextFunction.

John





From:   Eric Moffatt/Ottawa/IBM@IBMCA
To:     E4 Project developer mailing list <[email protected]>, 
Date:   03/04/2013 04:22 PM
Subject:        [e4-dev] E4 Formal API Part 1: Dependency Injection
Sent by:        [email protected]




It's amazing what a week's vacation will do...;-). 

I've updated the wiki at http://wiki.eclipse.org/Eclipse4/API/DI to 
contain the current set of API that we expect to formalize within the next 
couple of weeks. I encourage anybody who's interested to go there and 
check it out...especially for things that I may have missed...if it is 
*not* on that page then will won't be API (at least for Kepler). 

Comments welcome... 

I'll try to get something similar put together for the Mode tomorrow and 
then on to the various services... 
Eric 
_______________________________________________
e4-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/e4-dev

_______________________________________________
e4-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/e4-dev

Reply via email to