public static CompilerEnvirons ideEnvirons() {
        CompilerEnvirons env = new CompilerEnvirons();
        env.setRecoverFromErrors(true);
        env.setRecordingComments(true);
        env.setStrictMode(true);
        env.setWarnTrailingComma(true);
        env.setLanguageVersion(170);
        env.setReservedKeywordAsIdentifier(true);
        env.setIdeMode(true);
        env.setErrorReporter(new ErrorCollector());
        return env;
    }
public static CompilerEnvirons ideEnvirons ( ) { CompilerEnvirons env = new CompilerEnvirons ( ) ; env . setRecoverFromErrors ( true ) ; env . setRecordingComments ( true ) ; env . setStrictMode ( true ) ; env . setWarnTrailingComma ( true ) ; env . setLanguageVersion ( 170 ) ; env . setReservedKeywordAsIdentifier ( true ) ; env . setIdeMode ( true ) ; env . setErrorReporter ( new ErrorCollector ( ) ) ; return env ; }
Returns a {@code CompilerEnvirons} suitable for using Rhino
in an IDE environment.  Most features are enabled by default.
The {@link ErrorReporter} is set to an {@link ErrorCollector}.