wmyywm / eclipse-code-formatter-intellij-plugin

Automatically exported from code.google.com/p/eclipse-code-formatter-intellij-plugin
0 stars 0 forks source link

java 7 syntax #48

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We have recently migrated to Java 7, and now the eclipse formatter won't format 
code with java 7 syntax for example

private SimpleCache<PriceAndDiscount> articlePriceCache = new 
SimpleCache<PriceAndDiscount>();

works fine but

private SimpleCache<PriceAndDiscount> articlePriceCache = new SimpleCache<>();

gives an error.

Original issue reported on code.google.com by chris.bo...@gmail.com on 23 May 2013 at 6:29

GoogleCodeExporter commented 9 years ago
you need this in the config file:
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.source=1.7

Original comment by vojta.kr...@gmail.com on 23 May 2013 at 7:09

GoogleCodeExporter commented 9 years ago
thanks, this solves the problem

keep up the good work

Original comment by chris.bo...@gmail.com on 24 May 2013 at 8:12

GoogleCodeExporter commented 9 years ago
Thanks.

Original comment by vojta.kr...@gmail.com on 24 May 2013 at 8:13