move ts error filter to new API
authorSergey Simonchik <sergey.simonchik@jetbrains.com>
Thu, 22 Sep 2016 21:39:02 +0000 (00:39 +0300)
committerSergey Simonchik <sergey.simonchik@jetbrains.com>
Thu, 22 Sep 2016 21:39:02 +0000 (00:39 +0300)
platform/lang-impl/src/com/intellij/execution/filters/AbstractFileHyperlinkFilter.java

index 428e61646f6cdacd2f2657f3d3c04d9cb3d097a7..c9259860584c42a82f23bf62d31eda548a50ef87 100644 (file)
@@ -20,6 +20,7 @@ import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.roots.ProjectFileIndex;
 import com.intellij.openapi.util.io.FileUtil;
+import com.intellij.openapi.util.text.StringUtil;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.util.containers.ContainerUtil;
 import org.jetbrains.annotations.NotNull;
@@ -66,7 +67,8 @@ public abstract class AbstractFileHyperlinkFilter implements Filter {
     }
     List<Filter.ResultItem> items = ContainerUtil.newArrayList();
     for (FileHyperlinkRawData link : links) {
-      VirtualFile file = findFile(FileUtil.toSystemIndependentName(link.getFilePath()));
+      String filePath = FileUtil.toSystemIndependentName(link.getFilePath());
+      VirtualFile file = StringUtil.isEmptyOrSpaces(filePath) ? null : findFile(filePath);
       if (file != null) {
         OpenFileHyperlinkInfo info = new OpenFileHyperlinkInfo(myProject,
                                                                file,