Examples of DecorationResult


Examples of org.eclipse.egit.ui.internal.decorators.DecorationResult

      return workbenchLabelProvider
          .getImage(((StagingFolderEntry) element).getContainer());
    }

    StagingEntry c = (StagingEntry) element;
    DecorationResult decoration = new DecorationResult();
    decorationHelper.decorate(decoration, c);
    return getDecoratedImage(getEditorImage(c), decoration.getOverlay());
  }
View Full Code Here

Examples of org.eclipse.egit.ui.internal.decorators.DecorationResult

      StagingFolderEntry stagingFolderEntry = (StagingFolderEntry) element;
      return stagingFolderEntry.getNodePath().toString();
    }

    StagingEntry stagingEntry = (StagingEntry) element;
    final DecorationResult decoration = new DecorationResult();
    decorationHelper.decorate(decoration, stagingEntry);
    final StyledString styled = new StyledString();
    final String prefix = decoration.getPrefix();
    final String suffix = decoration.getSuffix();
    if (prefix != null)
      styled.append(prefix, StyledString.DECORATIONS_STYLER);
    if (stagingView.getPresentation() == Presentation.LIST) {
      if (fileNameMode) {
        IPath parsed = Path.fromOSString(stagingEntry.getPath());
View Full Code Here

Examples of org.eclipse.egit.ui.internal.decorators.DecorationResult

      setColorsAndFonts(fViewer.getTree().getItems());
    }

    private void setColorsAndFonts(TreeItem[] items) {
      for (int i = 0; i < items.length; i++) {
        DecorationResult decoration = getDecoration(items[i].getData());
        items[i].setBackground(decoration.getBackgroundColor());
        items[i].setForeground(decoration.getForegroundColor());
        items[i].setFont(decoration.getFont());
        setColorsAndFonts(items[i].getItems());
      }
    }
View Full Code Here

Examples of org.eclipse.egit.ui.internal.decorators.DecorationResult

    public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
      // No-op
    }

    private DecorationResult getDecoration(Object element) {
      DecorationResult decoration = new DecorationResult();
      fHelper.decorate(decoration, (PreviewResource) element);
      return decoration;
    }
View Full Code Here

Examples of org.eclipse.egit.ui.internal.decorators.DecorationResult

    }

    private class ResLabelProvider extends LabelProvider {

      public String getText(Object element) {
        final DecorationResult decoration = getDecoration(element);
        final StringBuilder buffer = new StringBuilder();
        final String prefix = decoration.getPrefix();
        if (prefix != null)
          buffer.append(prefix);
        buffer.append(((PreviewResource) element).getName());
        final String suffix = decoration.getSuffix();
        if (suffix != null)
          buffer.append(suffix);
        return buffer.toString();
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.