Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjay2018-06-26 10:36:52 +0000
committerJayaprakash Arthanareeswaran2018-06-28 17:44:45 +0000
commitf668bca61ebe161adbab98cbb94df79497197a1b (patch)
tree4ef9e0ebb0cbf242500e55f93a0bb9bfa63819c8 /org.eclipse.jdt.compiler.tool
parented78da37f7c90478f2f099f0d039c9462797f2af (diff)
downloadeclipse.jdt.core-f668bca61ebe161adbab98cbb94df79497197a1b.tar.gz
eclipse.jdt.core-f668bca61ebe161adbab98cbb94df79497197a1b.tar.xz
eclipse.jdt.core-f668bca61ebe161adbab98cbb94df79497197a1b.zip
Bug 534979 - [11] Add warning in annotation processing on redefiningY20180705-0105
symbols Change-Id: I3054799f2c9f185a5e84b6ae53b7197568a1cf27 Signed-off-by: jay <jarthana@in.ibm.com>
Diffstat (limited to 'org.eclipse.jdt.compiler.tool')
-rw-r--r--org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseFileManager.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseFileManager.java b/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseFileManager.java
index 62472dafaa..a5c8c2d8aa 100644
--- a/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseFileManager.java
+++ b/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseFileManager.java
@@ -1421,6 +1421,10 @@ public class EclipseFileManager implements StandardJavaFileManager {
LocationWrapper wrapper = this.locationHandler.getLocation(StandardLocation.MODULE_SOURCE_PATH, moduleName);
deriveOutputLocationForModules(moduleName, wrapper.paths);
result = getLocationForModule(location, moduleName);
+ } else if (result == null && location == StandardLocation.SOURCE_OUTPUT) {
+ LocationWrapper wrapper = this.locationHandler.getLocation(StandardLocation.MODULE_SOURCE_PATH, moduleName);
+ deriveSourceOutputLocationForModules(moduleName, wrapper.paths);
+ result = getLocationForModule(location, moduleName);
}
return result;
}
@@ -1502,6 +1506,28 @@ public class EclipseFileManager implements StandardJavaFileManager {
}
}
}
+ private void deriveSourceOutputLocationForModules(String moduleName, Collection<? extends Path> paths) {
+ LocationWrapper wrapper = this.locationHandler.getLocation(StandardLocation.SOURCE_OUTPUT, moduleName);
+ if (wrapper == null) {
+ // First get from our internally known location for legacy/unnamed location
+ wrapper = this.locationHandler.getLocation(StandardLocation.SOURCE_OUTPUT, ""); //$NON-NLS-1$
+ if (wrapper == null) {
+ wrapper = this.locationHandler.getLocation(StandardLocation.SOURCE_OUTPUT);
+ }
+ if (wrapper != null) {
+ Iterator<? extends Path> iterator = wrapper.paths.iterator();
+ if (iterator.hasNext()) {
+ try {
+ // Per module output location is always a singleton list
+ Path path = iterator.next().resolve(moduleName);
+ this.locationHandler.setLocation(StandardLocation.SOURCE_OUTPUT, moduleName, Collections.singletonList(path));
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+ }
@Override
public void setLocationForModule(Location location, String moduleName, Collection<? extends Path> paths) throws IOException {
validateModuleLocation(location, moduleName);

Back to the top