Difference between revisions of "JDT Core/Java8"

From Eclipsepedia

Jump to: navigation, search
(Configure a project to use Java 8 features)
(25 intermediate revisions by 9 users not shown)
Line 1: Line 1:
This page summarizes the work that is being done to add Java(tm) 8 support into Eclipse. As of now JSR 335 (Lambda expressions) and JSR 308 (Type annotations) are being planned  
+
This page summarizes the work that is being done to add Java™ 8 support into Eclipse. As of now JSR 335 (Lambda expressions) and JSR 308 (Type annotations) are being planned  
  
 
= Java 8 features that are being worked on =
 
= Java 8 features that are being worked on =
* JSR 335 (Lambda expressions)
+
* JSR 335 [[https://bugs.eclipse.org/bugs/show_bug.cgi?id=380188 Lambda expressions]] + [[https://bugs.eclipse.org/bugs/show_bug.cgi?id=380501 Default Methods]]
* JSR 308 (Type annotations)
+
* JSR 308 [[https://bugs.eclipse.org/bugs/show_bug.cgi?id=380501 Type annotations]]
 +
* Meta data enhancement specification [[https://bugs.eclipse.org/bugs/show_bug.cgi?id=406966 JEP118: Runtime access to parameter names]] + [[https://bugs.eclipse.org/bugs/show_bug.cgi?id=407864 JEP120: Repeating annotations]]
  
= What need to be done =
+
<br>
* TO BE FILLED
+
  
 +
= What needs to be done =
 +
* TO BE FILLED
  
 +
<br>
 
= Current status<br>  =
 
= Current status<br>  =
* TO BE FILLED
+
 
 +
Updates are filed in the top level bug [[https://bugs.eclipse.org/bugs/show_bug.cgi?id=380190 380190 - Add support for Java SE 8]]
 +
 
 +
JDT UI changes are tracked in [[JDT UI/Java8]]
 +
 
 +
<br>
 +
 
 +
{| cellspacing="0" cellpadding="5" border="1" align="center"
 +
|+ '''Java 8 features'''
 +
|-
 +
! width="200" align="center" style="background: none repeat scroll 0% 0%" |
 +
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Lambda Expressions
 +
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Method references
 +
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Default Methods
 +
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Type Annotations / Receiver parameter
 +
|-
 +
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Grammar / Parser
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
 +
|-
 +
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Compiler
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
 +
|-
 +
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Reconciler
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
 +
|-
 +
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Error recovery
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" |
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" |
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" |
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" |
 +
|-
 +
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Java Model (Jay)
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | under investigation
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | under investigation
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | under investigation
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | no changes needed atm
 +
|-
 +
! width="200" align="center" style="background: none repeat scroll 0% 0%" | DOM / AST
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
 +
|-
 +
! width="200" align="center" style="background: none repeat scroll 0% 0%" | AST Rewrite
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
 +
|-
 +
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Class file generation
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | April (Srikanth)
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | April (Srikanth)
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress (Markus)
 +
|-
 +
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Formatter
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | (1)
 +
|-
 +
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Indexer (Manoj)
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | April-May
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | April-May
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | April-May
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | April-May
 +
|-
 +
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Search (manoj)
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | April-May
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | April-May
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | April-May
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | April-May
 +
|-
 +
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Code select (Anirban)
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
 +
|-
 +
! width="200" align="center" style="background: none repeat scroll 0% 0%" | Code completion (Anirban)
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
 +
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | in progress
 +
|}
 +
<br>
 +
 
 +
{| cellspacing="0" cellpadding="5" border="1" style="width: 300px; height: 25px;"
 +
|-
 +
! style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | &nbsp;&nbsp;
 +
| Done
 +
|-
 +
! style="background: none repeat scroll 0% 0% rgb(242, 206, 206);" | <br>
 +
| Not done yet
 +
|}
 +
(1) more work needed if spec changes
  
 
= IMPORTANT NOTE =
 
= IMPORTANT NOTE =
*The following lines should be added in all headers of modified files for Java(tm) 7 implementation:<code>
+
*The following lines must be added in all headers of modified files for Java&trade; 8 implementation:<code>
 
  &nbsp;* This is an implementation of an early-draft specification developed under the Java
 
  &nbsp;* This is an implementation of an early-draft specification developed under the Java
 
  &nbsp;* Community Process (JCP) and is made available for testing and evaluation purposes
 
  &nbsp;* Community Process (JCP) and is made available for testing and evaluation purposes
 
  &nbsp;* only. The code is not compatible with any specification of the JCP.
 
  &nbsp;* only. The code is not compatible with any specification of the JCP.
  &nbsp;*</code>
+
  &nbsp;*
 +
</code>
  
 +
*Use the following @since tag on all newly added members: "3.9 BETA_JAVA8"
 
<br>
 
<br>
  
 
= What to do to set up the IDE  =
 
= What to do to set up the IDE  =
  
*Checkout the BETA_JAVA8 branch of the following git repositories
+
*Checkout the BETA_JAVA8 branch of the following git repositories:
**git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git the JDT/Core repository
+
**JDT Core repository - git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git
 +
**JDT UI repository - git://git.eclipse.org/gitroot/jdt/eclipse.jdt.ui.git
  
*You need to install a JDK8 build as an installed JRE in order to run the tests using the JavaSE-1.8 Execution Environment.
+
*You need to install a JDK 8 build as an installed JRE in order to run the tests using the JavaSE-1.8 Execution Environment.
  
*For more information on how to work with git repositories, look at http://wiki.eclipse.org/Platform-releng/Git_Workflows
+
*For more information on how to work with git repositories, look at http://wiki.eclipse.org/Platform-releng/Git_Workflows .
  
= Disclaimer<br>  =
+
*As [[Version_Numbering#API_Baseline_in_API_Tools|API Baseline]], use 3.8 (or [http://download.eclipse.org/eclipse/downloads/drops/S-3.8RC4-201206081200/ 3.8 RC4] until 3.8 is released).
 +
 
 +
<br>
 +
 
 +
= Configure a project to use Java 8 features =
 +
 
 +
If you have JDT UI from the BETA_JAVA8 branch, you can simply set the compliance to 1.8. Otherwise you have to manually set the following properties in <code><project>/.settings/org.eclipse.jdt.core.prefs</code>:
 +
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
 +
org.eclipse.jdt.core.compiler.compliance=1.8
 +
org.eclipse.jdt.core.compiler.source=1.8
 +
 
 +
= Disclaimer =
  
 
This is a work in progress. The contents of the BETA_JAVA8 branch will be updated as the changes are made to the JSR Specification.  
 
This is a work in progress. The contents of the BETA_JAVA8 branch will be updated as the changes are made to the JSR Specification.  
  
If you need any help with this, please contact the JDT/Core team through either the [[www.eclipse.org/forums/index.php|forums]] or [https://bugs.eclipse.org/bugs/enter_bug.cgi?product=JDT Bugzilla].
+
If you need any help with this, please contact the JDT/Core team through either the [http://www.eclipse.org/forums/index.php/f/13/ forum] or [https://bugs.eclipse.org/bugs/enter_bug.cgi?product=JDT Bugzilla].
 +
 
 +
[[Category:JDT]]

Revision as of 07:45, 15 May 2013

This page summarizes the work that is being done to add Java™ 8 support into Eclipse. As of now JSR 335 (Lambda expressions) and JSR 308 (Type annotations) are being planned

Contents

Java 8 features that are being worked on


What needs to be done

  • TO BE FILLED


Current status

Updates are filed in the top level bug [380190 - Add support for Java SE 8]

JDT UI changes are tracked in JDT UI/Java8


Java 8 features
Lambda Expressions Method references Default Methods Type Annotations / Receiver parameter
Grammar / Parser (1) (1) (1) (1)
Compiler in progress in progress (1) (1)
Reconciler (1) (1) (1) (1)
Error recovery
Java Model (Jay) under investigation under investigation under investigation no changes needed atm
DOM / AST (1) in progress in progress (1)
AST Rewrite in progress in progress in progress (1)
Class file generation April (Srikanth) April (Srikanth) (1) in progress (Markus)
Formatter (1) (1) (1) (1)
Indexer (Manoj) April-May April-May April-May April-May
Search (manoj) April-May April-May April-May April-May
Code select (Anirban) in progress in progress in progress in progress
Code completion (Anirban) in progress in progress in progress in progress


   Done

Not done yet

(1) more work needed if spec changes

IMPORTANT NOTE

  • The following lines must be added in all headers of modified files for Java™ 8 implementation:
 * This is an implementation of an early-draft specification developed under the Java
 * Community Process (JCP) and is made available for testing and evaluation purposes
 * only. The code is not compatible with any specification of the JCP.
 *

  • Use the following @since tag on all newly added members: "3.9 BETA_JAVA8"


What to do to set up the IDE

  • You need to install a JDK 8 build as an installed JRE in order to run the tests using the JavaSE-1.8 Execution Environment.


Configure a project to use Java 8 features

If you have JDT UI from the BETA_JAVA8 branch, you can simply set the compliance to 1.8. Otherwise you have to manually set the following properties in <project>/.settings/org.eclipse.jdt.core.prefs:

org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.source=1.8

Disclaimer

This is a work in progress. The contents of the BETA_JAVA8 branch will be updated as the changes are made to the JSR Specification.

If you need any help with this, please contact the JDT/Core team through either the forum or Bugzilla.