Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.StyledString


    ITextViewer _viewer_1 = context.getViewer();
    StyledText _textWidget_1 = _viewer_1.getTextWidget();
    String _lineDelimiter_1 = _textWidget_1.getLineDelimiter();
    String _plus_1 = ((proposalText + middleText) + _lineDelimiter_1);
    String _plus_2 = (_plus_1 + "}");
    StyledString _styledString = new StyledString(proposalText);
    StyledString _append = _styledString.append(" - add a new location to this target platform", StyledString.QUALIFIER_STYLER);
    Image _image = this.getImage(TargetPlatformProposalProvider.LOCATION);
    final ICompletionProposal p = this.createCompletionProposal(_plus_2, _append, _image, context);
    if ((p instanceof ConfigurableCompletionProposal)) {
      IContentProposalPriorities _priorityHelper = this.getPriorityHelper();
      int _defaultPriority = _priorityHelper.getDefaultPriority();
View Full Code Here


    final String proposalText = ((proposalPrefix + TargetPlatformProposalProvider.INCLUDE_DECLARATION__URI_PLACEHOLDER) + "\"");
    ITextViewer _viewer = context.getViewer();
    StyledText _textWidget = _viewer.getTextWidget();
    String _lineDelimiter = _textWidget.getLineDelimiter();
    String _plus = (proposalText + _lineDelimiter);
    StyledString _styledString = new StyledString(proposalText);
    StyledString _append = _styledString.append(" - include another target platform to this file", StyledString.QUALIFIER_STYLER);
    Image _image = this.getImage(TargetPlatformProposalProvider.INCLUDE_DECLARATION);
    final ICompletionProposal p = this.createCompletionProposal(_plus, _append, _image, context);
    if ((p instanceof ConfigurableCompletionProposal)) {
      IContentProposalPriorities _priorityHelper = this.getPriorityHelper();
      int _defaultPriority = _priorityHelper.getDefaultPriority();
View Full Code Here

      }
    }
  }
 
  private ICompletionProposal createCompletionProposal(final String proposal, final String desc, final EObject imageFor, final int priority, final ContentAssistContext context) {
    StyledString _styledString = new StyledString(proposal);
    StringConcatenation _builder = new StringConcatenation();
    _builder.append(" ");
    _builder.append("- ");
    _builder.append(desc, " ");
    StyledString _append = _styledString.append(_builder.toString(), StyledString.QUALIFIER_STYLER);
    Image _image = this.getImage(imageFor);
    final ICompletionProposal p = this.createCompletionProposal(proposal, _append, _image, context);
    if ((p instanceof ConfigurableCompletionProposal)) {
      IContentProposalPriorities _priorityHelper = this.getPriorityHelper();
      int _defaultPriority = _priorityHelper.getDefaultPriority();
View Full Code Here

    } else {
      _xifexpression_3 = "";
    }
    final String suffix = _xifexpression_3;
    final String proposal = ((prefix + TargetPlatformProposalProvider.LOCATION__ID_PLACEHOLDER) + suffix);
    StyledString _styledString = new StyledString(TargetPlatformProposalProvider.LOCATION__ID_PLACEHOLDER);
    StyledString _append = _styledString.append(" - ID of this location ", StyledString.QUALIFIER_STYLER);
    Image _image = this.getImage(TargetPlatformProposalProvider.LOCATION);
    final ICompletionProposal p = this.createCompletionProposal(proposal, _append, _image, context);
    if ((p instanceof ConfigurableCompletionProposal)) {
      int _replacementOffset = ((ConfigurableCompletionProposal)p).getReplacementOffset();
      int _length_2 = prefix.length();
View Full Code Here

    } else {
      _xifexpression_3 = "\"";
    }
    final String suffix = _xifexpression_3;
    final String proposal = ((prefix + TargetPlatformProposalProvider.LOCATION__URI_PLACEHOLDER) + suffix);
    StyledString _styledString = new StyledString(TargetPlatformProposalProvider.LOCATION__URI_PLACEHOLDER);
    StyledString _append = _styledString.append(" - URI of the location", StyledString.QUALIFIER_STYLER);
    Image _image = this.getImage(TargetPlatformProposalProvider.LOCATION);
    final ICompletionProposal p = this.createCompletionProposal(proposal, _append, _image, context);
    if ((p instanceof ConfigurableCompletionProposal)) {
      int _replacementOffset = ((ConfigurableCompletionProposal)p).getReplacementOffset();
      int _length_2 = prefix.length();
View Full Code Here

  public TargetPlatformLabelProvider(final AdapterFactoryLabelProvider delegate) {
    super(delegate);
  }
 
  public StyledString text(final Location object) {
    StyledString _xblockexpression = null;
    {
      final StyledString ss = new StyledString();
      String _uri = object.getUri();
      ss.append(_uri);
      String _iD = object.getID();
      boolean _notEquals = (!Objects.equal(_iD, null));
      if (_notEquals) {
        String _iD_1 = object.getID();
        String _plus = (" " + _iD_1);
        ss.append(_plus, StyledString.DECORATIONS_STYLER);
      }
      _xblockexpression = ss;
    }
    return _xblockexpression;
  }
View Full Code Here

  public String image(final Location object) {
    return "obj16/location_obj.gif";
  }
 
  public StyledString text(final IU object) {
    StyledString _xblockexpression = null;
    {
      final StyledString ss = new StyledString();
      String _iD = object.getID();
      ss.append(_iD);
      String _version = object.getVersion();
      boolean _notEquals = (!Objects.equal(_version, null));
      if (_notEquals) {
        String _version_1 = object.getVersion();
        String _plus = (" " + _version_1);
        ss.append(_plus, StyledString.COUNTER_STYLER);
      }
      _xblockexpression = ss;
    }
    return _xblockexpression;
  }
View Full Code Here

        if (file != null) {
            s = file.getFullPath().toPortableString();
        } else {
            s = location;
        }
        return new StyledString(s, StyledString.QUALIFIER_STYLER);
    }
View Full Code Here

            matchCount = fPage.getDisplayedMatchCount(element);
        }
        if (matchCount > 1) {
            final String countInfo = MessageFormat.format("({0} matches)",
                    Integer.valueOf(matchCount));
            return new StyledString(countInfo, StyledString.COUNTER_STYLER);
        }
        return new StyledString();
    }
View Full Code Here

        // fLabelProvider.addListener(listener);
    }

    @Override
    public StyledString getStyledText(final Object element) {
        final StyledString result = new StyledString();
        if (fOrder == SHOW_LABEL_PATH || element instanceof String && isInTree()) {
            result.append(getElementText(element));
            result.append(' ');
            result.append(getMatchCountText(element));
            result.append(" - ", StyledString.QUALIFIER_STYLER);
            result.append(getPathText(element));
        } else if (fOrder == SHOW_LABEL) {
            result.append(getElementText(element));
            result.append(' ');
            result.append(getMatchCountText(element));
        } else { // SHOW_PATH_LABEL
            result.append(getElementText(element));
            result.append(' ');
            result.append(getMatchCountText(element));
            result.append(" - ", StyledString.QUALIFIER_STYLER);
            result.append(getPathText(element));
        }
        return result;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.viewers.StyledString

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.