Community
Participate
Working Groups
Assign custom colors to classes, static and instance method calls, then add the following methods: private static void m1() { for(String s : Arrays.asList("Hello", "world")) { System.out.println(s); } } private static void m2() { Arrays.asList("Hello", "world").forEach((String s) -> { System.out.println(s); }); } Method m2 only has syntax highlighting in Strings "Hello" and "world". Further code additions to method m2 also don't get highlighted, unlike within method m1.
Which build did you use? Note that our normal builds do not yet have any Java 8 related support and the UI work for Lambda is still in progress (see bug 405305).
Build is from source, following the instructions in Platform-releng/Platform Build and JDT Core/Java8 wiki articles. The build ID in installation details ended up as eclipse.buildId=4.3.0.I20130525-2218. I'll try to use the latest versions in source control until more official builds are available.
Created attachment 231539 [details] Screenshot
I am not able to reproduce the issue with latest code and JRE. Attached a screenshot for the same in comment #3. Please confirm with latest versions.
Created attachment 231565 [details] Workspace with test project
Created attachment 231566 [details] Screenshot showing missing syntax highlighting
Tested with JDK™ 8 Early Access Releases May 23, 2013 8 Build b91 and source code checked out after comment 4. The build process was: 1) update source code according to http://wiki.eclipse.org/Platform-releng/Platform_Build#cloning_platform_source_tree: git fetch origin git merge origin/master git pull --recurse-submodules git submodule update 2) copy updated repository (D:\z) to a new directory (D:\x) 3) using an Eclipse 4.2.2 instance, add new local repository (D:\x) and check-out BETA_JAVA8 branches for eclipse.jdt.core and eclipse.jdt.ui (Git Repository Exploring->Git Repositories->x->Submodules->eclipse.jdt.core or ui->Switch to->Other...->Remote Tracking->origin->BETA_JAVA8) 4) do mvn clean verify in D:\x 5) extract D:\x\eclipse.platform.releng.tychoeclipsebuilder\sdk\target\products\org.eclipse.sdk.ide-win32.win32.x86_64.zip to D:\build 6) copy jre folder from OpenJDK (C:\Program Files\Java\jdk1.8.0) to eclipse (D:\build\eclipse)
We're just not there yet, that's why we didn't produce any preview builds yet. This will be fixed as part of bug 403927. Currently, the BETA_JAVA8 branch doesn't use a JLS8 AST, since that's still work in progress. Noopur has probably enabled JLS8 in her workspace. *** This bug has been marked as a duplicate of bug 403927 ***
(In reply to comment #8) That is correct. I have enabled JLS8 locally in my workspace. Sorry, didn't mention it earlier.