aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authorAlexander Kriegisch <Alexander@Kriegisch.name>2022-03-27 14:12:04 +0700
committerAlexander Kriegisch <Alexander@Kriegisch.name>2022-03-27 14:16:43 +0700
commit33bd2b4a2e30de544ec2bb8a90997e8b6595b13c (patch)
tree44aad3ad26aafc922bc373e2b418aa251d26605e /org.aspectj.ajdt.core
parent8a933427ec77859a40c5cd9c55226bbe6f9d736a (diff)
downloadaspectj-33bd2b4a2e30de544ec2bb8a90997e8b6595b13c.tar.gz
aspectj-33bd2b4a2e30de544ec2bb8a90997e8b6595b13c.zip
Use upstream method to generate '--add-reads', '--add-exports' info
and copy it into our FileSystem instance. In order to be able to access JDT Core's FileSystem.moduleUpdates field, we had to make it public there first. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
index c1bc570cc..75f8c36cd 100644
--- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
+++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
@@ -1044,9 +1044,14 @@ public class AjBuildManager implements IOutputClassFileNameProvider, IBinarySour
for (int i = 0; i < cps.size(); i++) {
classpaths[i] = cps.get(i);
}
- //FileSystem fileSystem = getLibraryAccess(classpaths, filenames);
- // TODO: This will probably fail other tests, it is just an experiment
- FileSystem fileSystem = buildConfig.getBuildArgParser().getLibraryAccess();
+ FileSystem fileSystem = getLibraryAccess(classpaths, filenames);
+
+ // Use upstream method to generate '--add-reads', '--add-exports' info and copy it into our FileSystem instance.
+ // See https://github.com/eclipse/org.aspectj/issues/145.
+ FileSystem fileSystemTemp = buildConfig.getBuildArgParser().getLibraryAccess();
+ fileSystem.moduleUpdates = fileSystemTemp.moduleUpdates;
+ fileSystemTemp.cleanup();
+
environment = new StatefulNameEnvironment(fileSystem, state.getClassNameToFileMap(), state);
state.setFileSystem(fileSystem);
state.setNameEnvironment(environment);