Package com.intellij.execution.filters

Examples of com.intellij.execution.filters.OpenFileHyperlinkInfo


      LocalFileSystem.getInstance().findFileByPath(myBaseDirPath + "/" + trimmedText.substring(0, fileRelPath.length()));
    if (file == null || file.isDirectory()) return null;

    return new Result(entireLength - trimmedText.length(),
                      entireLength - trimmedText.length() + fileRelPath.length(),
                      new OpenFileHyperlinkInfo(myProject, file, line, column));
  }
View Full Code Here


    }

    if (file != null && !file.isDirectory()) {
      final int highlightStartOffset = entireLength - line.length() + info.highlightingStartIndex;
      final int highlightEndOffset = entireLength - line.length() + info.highlightingEndIndex;
      return new Result(highlightStartOffset, highlightEndOffset, new OpenFileHyperlinkInfo(myProject, file, info.line, info.column));
    }

    return null;
  }
View Full Code Here

      File file = findFile(linkInfo.getPath());
      if (file != null) {
        VirtualFile virtualFile = VfsUtil.findFileByIoFile(file, false);
        if (virtualFile != null) {
          int lineNumber = Math.max(-1, linkInfo.getLineNumber() - 1);
          HyperlinkInfo link = new OpenFileHyperlinkInfo(myProject, virtualFile, lineNumber);
          return new Filter.Result(linkInfo.getHyperlinkStartInd(), linkInfo.getHyperlinkEndInd(), link);
        }
      }
    }
    return null;
View Full Code Here

    VirtualFile virtualFile = VfsUtil.findFileByIoFile(message.getFileWithError(), false);
    if (virtualFile == null || !virtualFile.isValid()) {
      return null;
    }
    int column = ObjectUtils.notNull(message.getColumnNumber(), 0);
    HyperlinkInfo hyperlinkInfo = new OpenFileHyperlinkInfo(myProject,
                                                            virtualFile,
                                                            message.getLineNumber() - 1,
                                                            column);
    return new Filter.Result(message.getHyperlinkStartInclusiveInd(), message.getHyperlinkEndExclusiveInd(), hyperlinkInfo);
  }
View Full Code Here

    }

    final int textStartOffset = entireLength - line.length();
    final int highlightStartOffset = textStartOffset + m.start(numberOfReferenceGroup);
    final int highlightEndOffset = textStartOffset + m.end(numberOfReferenceGroup);
    final OpenFileHyperlinkInfo info = new OpenFileHyperlinkInfo(myProject, vFile.get(), lineNumber);

    TextAttributes attributes = HYPERLINK_ATTRIBUTES.clone();
    if (!ProjectRootManager.getInstance(myProject).getFileIndex().isInContent(vFile.get())) {
      Color color = UIUtil.getInactiveTextColor();
      attributes.setForegroundColor(color);
View Full Code Here

        VirtualFile vf = project.getBaseDir().getFileSystem().findFileByPath(fileName);
        if (vf == null) {
            return null;
        }
        HyperlinkInfo hyperlinkInfo = new OpenFileHyperlinkInfo(project, vf, fileLine);
        int outputStart = entireLength - line.length();
        return new Result(outputStart + matcher.start(1), outputStart + matcher.end(2), hyperlinkInfo);
    }
View Full Code Here

        }
        if (vf == null) {
            return null;
        }

        HyperlinkInfo hyperlinkInfo = new OpenFileHyperlinkInfo(project, vf, fileLine);
        int outputStart = entireLength - line.length();
        return new Result(outputStart + matcher.start(1), outputStart + matcher.end(2), hyperlinkInfo);
    }
View Full Code Here

    int fileCol = matchGroupToNumber(matcher, myColumnMatchGroup);
    int highlightStartOffset = entireLength - line.length() + matcher.start(0);
    int highlightEndOffset = highlightStartOffset + matcher.end(0) - matcher.start(0);
    VirtualFile absolutePath = resolveAbsolutePath(filePath);
    HyperlinkInfo hyperLink = absolutePath != null
      ? new OpenFileHyperlinkInfo(myProject, absolutePath, fileLine, fileCol) : null;
    return new Result(highlightStartOffset, highlightEndOffset, hyperLink);
  }
View Full Code Here

        final PsiFile[] psiFiles = FilenameIndex.getFilesByName(myProject, fileName, GlobalSearchScope.allScope(myProject));
        if (psiFiles.length == 0) return null;


        final HyperlinkInfo info = psiFiles.length == 1 ?
            new OpenFileHyperlinkInfo(myProject, psiFiles[0].getVirtualFile(), lineNumber - 1, hasColumn ? Integer.parseInt(colGroup) - 1 : 0) :
            new MyHyperlinkInfo(psiFiles);

        return new Result(textStartOffset + matcher.start(1), textStartOffset + matcher.end(hasColumn ? 4 : 2), info);
      }
    }
View Full Code Here

    }
    if (vf == null) {
      return null;
    }

    HyperlinkInfo hyperlinkInfo = new OpenFileHyperlinkInfo(project, vf, fileLine);
    int outputStart = entireLength - line.length();

    return new Result(outputStart + matcher.start(1), outputStart + matcher.end(2), hyperlinkInfo);
  }
View Full Code Here

TOP

Related Classes of com.intellij.execution.filters.OpenFileHyperlinkInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.