RFR: 8272234: Pass originating elements from Filer to JavaFileManager

Jan Lahoda jlahoda at openjdk.java.net
Tue Aug 10 20:54:45 UTC 2021


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.

-------------

Commit messages:
 - Improving testing
 - Updating @since
 - Merge branch 'master' into ap-keep-originating-elements
 - Another attempt to fix the test.
 - More attempts to fix the test.
 - Attempting to fix test.
 - Adding @since
 - Improving the patch and API.
 - Merge branch 'master' into ap-keep-originating-elements
 - Fixing the TestClientCodeWrapper.java test,
 - ... and 3 more: https://git.openjdk.java.net/jdk/compare/a86ac0d1...aa61e594

Changes: https://git.openjdk.java.net/jdk/pull/5076/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5076&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8272234
  Stats: 575 lines in 8 files changed: 564 ins; 1 del; 10 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5076.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5076/head:pull/5076

PR: https://git.openjdk.java.net/jdk/pull/5076


More information about the compiler-dev mailing list