Example usage for org.eclipse.jdt.internal.compiler.impl CompilerOptions versionFromJdkLevel

List of usage examples for org.eclipse.jdt.internal.compiler.impl CompilerOptions versionFromJdkLevel

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.impl CompilerOptions versionFromJdkLevel.

Prototype

public static String versionFromJdkLevel(long jdkLevel) 

Source Link

Usage

From source file:org.thiesen.ecj4ant.Options.java

License:Open Source License

public static Map<String, String> defaultOptions() {
    return new HashMap<String, String>() {
        private static final long serialVersionUID = 1L;

        {/*from   w ww  .  j a  v a2 s . co  m*/
            put(CompilerOptions.OPTION_Process_Annotations, CompilerOptions.ENABLED);
            put(CompilerOptions.OPTION_SuppressWarnings, CompilerOptions.ENABLED);
            put(CompilerOptions.OPTION_DocCommentSupport, CompilerOptions.ENABLED);

            // set the language level to jdk7 (the currently stable version)
            put(CompilerOptions.OPTION_Compliance,
                    CompilerOptions.versionFromJdkLevel(ClassFileConstants.JDK1_7));
            put(CompilerOptions.OPTION_Source, CompilerOptions.versionFromJdkLevel(ClassFileConstants.JDK1_7));
            put(CompilerOptions.OPTION_TargetPlatform,
                    CompilerOptions.versionFromJdkLevel(ClassFileConstants.JDK1_7));
        }

    };
}