Ejemplo n.º 1
0
  @Override
  protected void postprocess(PresentationData presentation) {
    if (hasProblemFileBeneath()) {
      presentation.setAttributesKey(CodeInsightColors.ERRORS_ATTRIBUTES);
    }

    Color fgColor = getFileStatus().getColor();

    if (valueIsCut()) {
      fgColor = CopyPasteManager.CUT_COLOR;
    }

    if (presentation.getForcedTextForeground() == null) {
      presentation.setForcedTextForeground(fgColor);
    }

    if (hasProblemFileBeneath()) {
      presentation.setAttributesKey(CodeInsightColors.ERRORS_ATTRIBUTES);
    }
  }
Ejemplo n.º 2
0
  @Override
  protected void updateImpl(PresentationData data) {
    PsiFile value = getValue();
    data.setPresentableText(value.getName());
    data.setIcon(value.getIcon(Iconable.ICON_FLAG_READ_STATUS));

    VirtualFile file = getVirtualFile();
    if (file != null && file.is(VFileProperty.SYMLINK)) {
      String target = file.getCanonicalPath();
      if (target == null) {
        data.setAttributesKey(CodeInsightColors.WRONG_REFERENCES_ATTRIBUTES);
        data.setTooltip(CommonBundle.message("vfs.broken.link"));
      } else {
        data.setTooltip(FileUtil.toSystemDependentName(target));
      }
    }
  }
 @Override
 protected void update(@NotNull PresentationData presentation) {
   presentation.setAttributesKey(myAttributes);
   presentation.setPresentableText(myName);
   presentation.setIcon(getIcon());
 }