Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ private Types.Source convertDebuggerSourceToClient(Location location, IDebugAdap
} else {
// If the source lookup engine cannot find the source file, then lookup it in the source directories specified by user.
String absoluteSourcepath = AdapterUtils.sourceLookup(context.getSourcePaths(), relativeSourcePath);
return new Types.Source(sourceName, absoluteSourcepath, 0);
if (absoluteSourcepath != null) {
return new Types.Source(sourceName, absoluteSourcepath, 0);
} else {
return null;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,18 @@ public void acceptSearchMatch(SearchMatch match) {
Object element = match.getElement();
if (element instanceof IType) {
IType type = (IType) element;
uris.add(type.isBinary() ? getFileURI(type.getClassFile()) : getFileURI(type.getResource()));
if (type.isBinary()) {
try {
// let the search engine to ignore those class files without attached source.
if (type.getSource() != null) {
uris.add(getFileURI(type.getClassFile()));
}
} catch (JavaModelException e) {
// ignore
}
} else {
uris.add(getFileURI(type.getResource()));
}
}
}
};
Expand Down