diff options
author | Stephan Herrmann | 2018-03-03 15:56:56 +0000 |
---|---|---|
committer | Stephan Herrmann | 2018-03-04 19:35:36 +0000 |
commit | 08ac36bbd3370ac9bf18ce2112885c9242e61c72 (patch) | |
tree | 471d561c65ae236600c08a31026a4dddec6b4374 /org.eclipse.jdt.core/search | |
parent | d62536b0c7908e0c1efcaeb58f2290acd5151db1 (diff) | |
download | eclipse.jdt.core-08ac36bbd3370ac9bf18ce2112885c9242e61c72.tar.gz eclipse.jdt.core-08ac36bbd3370ac9bf18ce2112885c9242e61c72.tar.xz eclipse.jdt.core-08ac36bbd3370ac9bf18ce2112885c9242e61c72.zip |
Change-Id: I6f786ae858f2fe436249a03ae1c8c3941aecb303
Diffstat (limited to 'org.eclipse.jdt.core/search')
3 files changed, 16 insertions, 7 deletions
diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/ClasspathSourceDirectory.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/ClasspathSourceDirectory.java index f6a19810f5..dd4b7295c1 100644 --- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/ClasspathSourceDirectory.java +++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/ClasspathSourceDirectory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2017 IBM Corporation and others. + * Copyright (c) 2000, 2018 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,6 +12,7 @@ package org.eclipse.jdt.internal.core.search.matching; import java.util.Iterator; import java.util.Map; +import java.util.function.Predicate; import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IFile; @@ -110,7 +111,7 @@ public boolean equals(Object o) { } @Override -public NameEnvironmentAnswer findClass(String typeName, String qualifiedPackageName, String moduleName, String qualifiedBinaryFileName, boolean asBinaryOnly) { +public NameEnvironmentAnswer findClass(String typeName, String qualifiedPackageName, String moduleName, String qualifiedBinaryFileName, boolean asBinaryOnly, Predicate<String> moduleNameFilter) { return findClass(typeName, qualifiedPackageName, moduleName, qualifiedBinaryFileName); } @Override diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/IndexBasedJavaSearchEnvironment.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/IndexBasedJavaSearchEnvironment.java index 7f9b1d15bd..f0cb2a57d7 100644 --- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/IndexBasedJavaSearchEnvironment.java +++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/IndexBasedJavaSearchEnvironment.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015, 2017 Google, Inc and others. + * Copyright (c) 2015, 2018 Google, Inc and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -196,7 +196,9 @@ public class IndexBasedJavaSearchEnvironment implements INameEnvironment, Suffix sourceFileName, // doesn't include the file extension qPackageName, null, // TODO(SHMOD): don't have a module name, but while looking in unindexed classpath locations, this is probably OK - qSourceFileName); // doesn't include the file extension + qSourceFileName, // doesn't include the file extension + false, + null /*no module filtering on source dir*/); } } else { if (binaryFileName == null) { @@ -214,7 +216,9 @@ public class IndexBasedJavaSearchEnvironment implements INameEnvironment, Suffix binaryFileName, qPackageName, null, // TODO(SHMOD): don't have a module name, but while looking in unindexed classpath locations, this is probably OK - qBinaryFileName); + qBinaryFileName, + false, + null /*no module filtering, this env is not module aware*/); } if (answer != null) { if (!answer.ignoreIfBetter()) { diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/JavaSearchNameEnvironment.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/JavaSearchNameEnvironment.java index 05f5ebf852..480bb6e640 100644 --- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/JavaSearchNameEnvironment.java +++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/JavaSearchNameEnvironment.java @@ -250,7 +250,9 @@ private NameEnvironmentAnswer findClass(String qualifiedTypeName, char[] typeNam sourceFileName, // doesn't include the file extension qPackageName, moduleName, - qSourceFileName); // doesn't include the file extension + qSourceFileName, // doesn't include the file extension + false, + null /*no module filtering on source dir*/); } } else { if (binaryFileName == null) { @@ -268,7 +270,9 @@ private NameEnvironmentAnswer findClass(String qualifiedTypeName, char[] typeNam binaryFileName, qPackageName, moduleName, - qBinaryFileName); + qBinaryFileName, + false, + this.moduleLocations != null ? this.moduleLocations::containsKey : null); } if (answer != null) { if (!answer.ignoreIfBetter()) { |