PT #163860252: Fix broken hover links for CF apps

This commit is contained in:
BoykoAlex
2019-02-14 18:56:48 -05:00
parent 935458a1ec
commit a0f3019590

View File

@@ -133,7 +133,9 @@ public interface SourceLinks {
IJavaProject project = projectFinder.find(new TextDocumentIdentifier(filePath.toUri().toString())).orElse(null);
if (project == null) {
try {
URL url = filePath.toUri().toURL();
// URL for CF resources looks like jar:file:/home/vcap/app/lib/gs-rest-service-complete.jar!/hello/MyService.class
// The above doesn't wotk with "filePath.toUri().toURL()"
URL url = new URL(path.substring(0, idx));
if (url.getProtocol().equals("jar")) {
URLConnection connection = url.openConnection();
if (connection instanceof JarURLConnection) {