Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjay2018-07-29 12:22:21 +0000
committerjay2018-07-30 09:23:05 +0000
commitc038db2ca25d496e8aae7de4cd959c51ab3c9149 (patch)
tree4c4a4ba82ea35845c7250f51b3f040b962a1aca4 /org.eclipse.jdt.core
parentf0d6c3e98ff6539a356e47a9b168d816f1f67b6a (diff)
downloadeclipse.jdt.core-c038db2ca25d496e8aae7de4cd959c51ab3c9149.tar.gz
eclipse.jdt.core-c038db2ca25d496e8aae7de4cd959c51ab3c9149.tar.xz
eclipse.jdt.core-c038db2ca25d496e8aae7de4cd959c51ab3c9149.zip
Bug 534501: Java annotation processor support is incompleteI20180730-0800
Change-Id: I061c806094fa71223fbc9f89f3e3c23707a8858d Signed-off-by: jay <jarthana@in.ibm.com>
Diffstat (limited to 'org.eclipse.jdt.core')
-rw-r--r--org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathMultiDirectory.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathMultiDirectory.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathMultiDirectory.java
index 42e06ad5e9..5de9cf4669 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathMultiDirectory.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathMultiDirectory.java
@@ -11,6 +11,7 @@
package org.eclipse.jdt.internal.core.builder;
import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.compiler.CharOperation;
import org.eclipse.jdt.internal.compiler.CompilationResult;
import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration;
@@ -67,6 +68,35 @@ protected boolean isExcluded(IResource resource) {
return Util.isExcluded(resource, this.inclusionPatterns, this.exclusionPatterns);
return false;
}
+@Override
+String[] directoryList(String qualifiedPackageName) {
+ String[] dirList = (String[]) this.directoryCache.get(qualifiedPackageName);
+ if (dirList != null) return dirList;
+
+ try {
+ IResource container = this.binaryFolder.findMember(qualifiedPackageName); // this is a case-sensitive check
+ if (container instanceof IContainer) {
+ IResource[] members = ((IContainer) container).members();
+ dirList = new String[members.length];
+ int index = 0;
+ for (int i = 0, l = members.length; i < l; i++) {
+ IResource m = members[i];
+ String name = m.getName();
+ if (m.getType() == IResource.FILE && org.eclipse.jdt.internal.compiler.util.Util.isClassFileName(name)) {
+ // add exclusion pattern check here if we want to hide .class files
+ dirList[index++] = name;
+ }
+ }
+ if (index < dirList.length)
+ System.arraycopy(dirList, 0, dirList = new String[index], 0, index);
+ this.directoryCache.put(qualifiedPackageName, dirList);
+ return dirList;
+ }
+ } catch(CoreException ignored) {
+ // ignore
+ }
+ return null;
+}
@Override
public String toString() {

Back to the top