If the source code is not found using the path provided by the
source callsite the workspace will be searched using the file name
instead.
Change-Id: I033e7d87ef0918f796f9010d54f3d9f378856078
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/71735
Reviewed-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Reviewed-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
*/
IMarker marker = null;
final ArrayList<IFile> files = new ArrayList<>();
+ IPath p = new Path(trimmedPath);
ResourcesPlugin.getWorkspace().getRoot().accept(new IResourceVisitor() {
@Override
public boolean visit(IResource resource) throws CoreException {
- if (resource instanceof IFile && resource.getFullPath().toString().endsWith(trimmedPath)) {
+ if (resource instanceof IFile && resource.getFullPath().toString().endsWith(p.lastSegment())) {
files.add((IFile) resource);
}
return true;