Skip to content

Create a ECJ version of BlazeJavaCompilerPlugin #5

Open
@guw

Description

@guw
Contributor

The Bazel javac compiler supports plugins via BlazeJavaCompilePlugin. We need to create a version of this, which allows integration with ECJ.

Specifically the following two methods are offered by BlazeJavaCompilePlugin:

/**
 * Performs analysis actions after the attribute phase of the javac compiler. The attribute phase
 * performs symbol resolution on the parse tree.
 *
 * @param env The attributed parse tree (after symbol resolution)
 */
public void postAttribute(Env<AttrContext> env) {}

/**
 * Performs analysis actions after the flow phase of the javac compiler. The flow phase performs
 * dataflow checks, such as finding unreachable statements.
 *
 * @param env The attributed parse tree (after symbol resolution)
 */
public void postFlow(Env<AttrContext> env) {}

This work also includes patching ECJ to allow contributing such plug-ins programmatically.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @guw

        Issue actions

          Create a ECJ version of BlazeJavaCompilerPlugin · Issue #5 · salesforce/bazel-jdt-java-toolchain