Difference between revisions of "JDT Core/Java7"
(→What to do to set up the IDE) |
|||
(16 intermediate revisions by 4 users not shown) | |||
Line 21: | Line 21: | ||
|- | |- | ||
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | Update Indexing | ! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | Update Indexing | ||
− | ! width="200" align="center" style="background: none repeat scroll 0% 0% rgb( | + | ! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | Update Code Formatter |
− | ! width="200" align="center" style="background: none repeat scroll 0% 0% rgb( | + | ! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | Update DOM/AST |
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | Update Search | ! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 242, 206);" | Update Search | ||
! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 206, 242);" | Update Error Recovery | ! width="200" align="center" style="background: none repeat scroll 0% 0% rgb(206, 206, 242);" | Update Error Recovery | ||
Line 35: | Line 35: | ||
|- | |- | ||
! style="background: none repeat scroll 0% 0% rgb(206, 206, 242);" | <br> | ! style="background: none repeat scroll 0% 0% rgb(206, 206, 242);" | <br> | ||
− | | | + | | Can be improved |
− | + | ||
− | + | ||
− | + | ||
|} | |} | ||
Line 57: | Line 54: | ||
<br> | <br> | ||
− | = Work complete | + | = Work complete = |
*Support for switch on strings | *Support for switch on strings | ||
*Support for binary literals and underscores in number literals | *Support for binary literals and underscores in number literals | ||
− | *Support for Unicode 6.0 in the scanner using tables like it was done for Unicode 5 | + | *Support for Unicode 6.0 in the scanner using tables like it was done for Unicode 5 |
*Support for SafeVarargs annotation | *Support for SafeVarargs annotation | ||
*Support for try with resources | *Support for try with resources | ||
Line 67: | Line 64: | ||
*Support for the improved type inference for generic instance creation (Diamond). | *Support for the improved type inference for generic instance creation (Diamond). | ||
− | + | If you find bugs in these areas, please report them against [https://bugs.eclipse.org/bugs/enter_bug.cgi?product=JDT JDT/Core] using the tags [1.7][compiler]. Thank you. | |
− | = | + | = What needs to be done: = |
− | *Add | + | *Add statement recovery for the new syntax<br> |
− | + | ||
− | + | = Current status = | |
− | + | *The code is no longer in the BETA state. Everything has been merged in HEAD stream (Juno) and in 3_7_maintenance stream (Indigo SR1) | |
+ | *JDT UI changes are tracked in [[JDT UI/Java7]] | ||
+ | *JDT Debug changes are tracked in [[Debug/Java7]] | ||
+ | *API Tools changes are tracked in [[PDE/API_Tools/Java7]] | ||
− | + | = What to do to set up the IDE = | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | Download [http://www.eclipse.org/downloads/packages/eclipse-classic-372/indigosr2 Eclipse 3.7SR2] for out of the box support. Or, follow the steps below to get the JDT source code in an earlier build and launch a runtime workbench which will contain Java 7 features.<br> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
*Import the following project sets using File > Import, and then Team > Team Project Set: | *Import the following project sets using File > Import, and then Team > Team Project Set: | ||
**[[Media:BETA_JAVA7.psf|BETA_JAVA7.psf]] the code bundles | **[[Media:BETA_JAVA7.psf|BETA_JAVA7.psf]] the code bundles | ||
**[[Media:BETA_JAVA7_JDT_UI_Tests.psf|BETA_JAVA7_JDT_UI_Tests.psf]] the UI tests | **[[Media:BETA_JAVA7_JDT_UI_Tests.psf|BETA_JAVA7_JDT_UI_Tests.psf]] the UI tests | ||
− | **[[Media:BETA_JAVA7_JDT_Core_Tests.psf|BETA_JAVA7_JDT_Core_Tests.psf]] the Core tests | + | **[[Media:BETA_JAVA7_JDT_Core_Tests.psf|BETA_JAVA7_JDT_Core_Tests.psf]] the Core tests |
**[[Media:BETA_JAVA7_API_Tools_Debug_Tests.psf|BETA_JAVA7_API_Tools_Debug_Tests.psf]] the API Tools and Debug tests | **[[Media:BETA_JAVA7_API_Tools_Debug_Tests.psf|BETA_JAVA7_API_Tools_Debug_Tests.psf]] the API Tools and Debug tests | ||
Line 102: | Line 91: | ||
*You need to install a JDK7 build as an installed JRE in order to run the tests using the JavaSE-1.7 Execution Environment. | *You need to install a JDK7 build as an installed JRE in order to run the tests using the JavaSE-1.7 Execution Environment. | ||
− | + | *For more information on how to configure Eclipse to update to the latest version of the Java 7 support see the [[JDT/Eclipse Java 7 Support (BETA)|Java 7 BETA support wiki page]]. | |
− | + | ||
− | + | ||
− | + | 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]. | |
− | + | [[Category:JDT]] |
Latest revision as of 22:46, 8 June 2012
This page will summarize all the work that is done to add Java(tm) 7 support (jsr334: project coin) into Eclipse. It might also be extended to other jsrs if needed. We still need to find out what changes are supposed to be done to support the jsr 292 in the compiler. This is not clear yet.
Contents
Current Status at the first glance
Switch on Strings | Binary Literals | Underscores in Literals | Multi-catch | More Precise Rethrow |
---|---|---|---|---|
Try-with-Resources | Simplified Varargs Method Invocation | Diamond | Polymorphic Methods | Unicode 6.0 |
Update Indexing | Update Code Formatter | Update DOM/AST | Update Search | Update Error Recovery |
Completely implemented | |
|
Can be improved |
What has been released so far:
- Add new nodes inside the compiler ast to cover:
- Multi catch formal parameter ("catch( Ex1 | Ex2 | Ex3 e) {...").
The new class is named: org.eclipse.jdt.internal.compiler.ast.UnionTypeReference
- The grammar has been updated to cover the new syntax for multi-catch, try-with-resources and diamond case.
- A new DOM/AST node have been added for the union type. The new class is: org.eclipse.jdt.core.dom.UnionType
- The class org.eclipse.jdt.core.dom.TryStatement has been updated to support the new Try-with-Resources statement.
- Two new constants have been added for the DOM nodes. There are the constants for the node type:
org.eclipse.jdt.core.dom.ASTNode#UNION_TYPE
- Experimental handling of java.dyn.MethodHandle.invokeExact(..)/invoke(..) (invokeGeneric(..) is now deprecated)
- A new constant has been added for the JLS (JLS4) level in the org.eclipse.jdt.core.dom.AST class.
This constant is needed for the new DOM/AST nodes to be created. - Content assist support for switch in strings, try with resources, multi-catch exceptions.
Work complete
- Support for switch on strings
- Support for binary literals and underscores in number literals
- Support for Unicode 6.0 in the scanner using tables like it was done for Unicode 5
- Support for SafeVarargs annotation
- Support for try with resources
- Support for the more precise rethrow analysis (this concerns only the handling of the throw statement)
- Support for the improved type inference for generic instance creation (Diamond).
If you find bugs in these areas, please report them against JDT/Core using the tags [1.7][compiler]. Thank you.
What needs to be done:
- Add statement recovery for the new syntax
Current status
- The code is no longer in the BETA state. Everything has been merged in HEAD stream (Juno) and in 3_7_maintenance stream (Indigo SR1)
- JDT UI changes are tracked in JDT UI/Java7
- JDT Debug changes are tracked in Debug/Java7
- API Tools changes are tracked in PDE/API_Tools/Java7
What to do to set up the IDE
Download Eclipse 3.7SR2 for out of the box support. Or, follow the steps below to get the JDT source code in an earlier build and launch a runtime workbench which will contain Java 7 features.
- Import the following project sets using File > Import, and then Team > Team Project Set:
- BETA_JAVA7.psf the code bundles
- BETA_JAVA7_JDT_UI_Tests.psf the UI tests
- BETA_JAVA7_JDT_Core_Tests.psf the Core tests
- BETA_JAVA7_API_Tools_Debug_Tests.psf the API Tools and Debug tests
The tests project sets contain bundles that have not been branched. Using the :pserver:anonymous
connection for those prevents you from accidentally committing something there.
- You need to install a JDK7 build as an installed JRE in order to run the tests using the JavaSE-1.7 Execution Environment.
- For more information on how to configure Eclipse to update to the latest version of the Java 7 support see the Java 7 BETA support wiki page.
If you need any help with this, please contact the JDT/Core team through either the forums or Bugzilla.