RFR: 8272234: Pass originating elements from Filer to JavaFileManager [v5]
Joe Darcy
darcy at openjdk.java.net
Tue Nov 23 05:37:13 UTC 2021
On Mon, 22 Nov 2021 10:13:23 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
>> This is a first prototype of a patch that propagates originating elements from `Filer` (`createSourceFile`/`createClassFile`/`createResource`) to the corresponding methods in `JavaFileManager`. As file managers generally don't know about `Element`s, the `Element`s are first converted to their corresponding `FileObject`s (if any). As the currently existing methods only take one `FileObject` as a sibling of the newly created file, a new set of methods is proposed that take multiple originating files.
>>
>> Any feedback on this prototype would be welcome.
>
> Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 25 commits:
>
> - Test cleanup.
> - Merge branch 'ap-keep-originating-elements' into ap-keep-originating-elements-forwarding-tweak
> - Cleanup
> - Merge branch 'master' into ap-keep-originating-elements
> - Fixing test (need to exclude a private method from the test).
> - Fixing typo, as per review comments.
> - Fixing javadoc.
> - Cleanup.
> - Attempting to improve compatibility with existing subclasses of ForwardingJavaFileManager
> - Javadoc improvements.
> - ... and 15 more: https://git.openjdk.java.net/jdk/compare/ca31ed53...da4781a9
src/java.compiler/share/classes/javax/tools/JavaFileManager.java line 381:
> 379: String className,
> 380: Kind kind,
> 381: FileObject... originatingFiles)
Perhaps explicitly state that null originatingFile or empty originatingFiles are no-ops.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5076
More information about the compiler-dev
mailing list