Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Bind generated files to the class causing them to be generated #303

@pyricau

Description

@pyricau

In com.googlecode.androidannotations.generation.SourceCodewriter.openBinary(JPackage, String), we call javax.annotation.processing.Filer.createSourceFile(CharSequence, Element...) to generate the source files.

However, we do not give any second parameter, so the varargs is an empty array.

Here is what's said in the javadoc about this parameter :

originatingElements - type or package elements causally associated with the creation of this file, may be elided or null

I think we should actually give it a value. This would help the Eclipse compiler understand which elements are bound to which generated file. I need to check, but it may even remove the generated classes when you remove / rename a resource.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions