Example usage for org.eclipse.jdt.internal.compiler.classfmt ClassFileConstants ATTR_LINES

List of usage examples for org.eclipse.jdt.internal.compiler.classfmt ClassFileConstants ATTR_LINES

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.classfmt ClassFileConstants ATTR_LINES.

Prototype

int ATTR_LINES

To view the source code for org.eclipse.jdt.internal.compiler.classfmt ClassFileConstants ATTR_LINES.

Click Source Link

Usage

From source file:com.google.gwt.dev.javac.JdtCompiler.java

License:Open Source License

public static CompilerOptions getCompilerOptions() {
    CompilerOptions options = new CompilerOptions();
    options.complianceLevel = options.sourceLevel = options.targetJDK = ClassFileConstants.JDK1_6;

    // Generate debug info for debugging the output.
    options.produceDebugAttributes = ClassFileConstants.ATTR_VARS | ClassFileConstants.ATTR_LINES
            | ClassFileConstants.ATTR_SOURCE;
    // Tricks like "boolean stopHere = true;" depend on this setting.
    options.preserveAllLocalVariables = true;

    // Turn off all warnings, saves some memory / speed.
    options.reportUnusedDeclaredThrownExceptionIncludeDocCommentReference = false;
    options.reportUnusedDeclaredThrownExceptionExemptExceptionAndThrowable = false;
    // Instantiations    options.warningThreshold = 0;
    options.inlineJsrBytecode = true;//from  www. j a  v  a  2s  . c  o m
    return options;
}

From source file:fr.inria.astor.core.manipulation.compiler.bytecode.JDTByteCodeCompiler.java

License:Open Source License

public CompilerOptions getCompilerOption() {
    if (compilerOption == null) {
        compilerOption = new CompilerOptions();
        compilerOption.sourceLevel = ClassFileConstants.JDK1_6;//ClassFileConstants.JDK1_5;
        compilerOption.suppressWarnings = true;

        ////w w w .j  ava  2s .  co m

        compilerOption.targetJDK = ClassFileConstants.JDK1_6; //was 6

        compilerOption.produceDebugAttributes = ClassFileConstants.ATTR_SOURCE | ClassFileConstants.ATTR_LINES
                | ClassFileConstants.ATTR_VARS;
        compilerOption.preserveAllLocalVariables = true;
        compilerOption.inlineJsrBytecode = true;

        //MM
        compilerOption.tolerateIllegalAmbiguousVarargsInvocation = true;
    }
    return compilerOption;
}