Examples of ICompletionProposal


Examples of org.eclipse.jface.text.contentassist.ICompletionProposal

        } else {
          checkReplacementStart = false;
          completionStartPos = offset;
        }
 
        ICompletionProposal proposal = new CompletionProposal(replacement, completionStartPos, offset - completionStartPos, replacement.length());
       
        if (checkReplacementStart) {
          if (replacement.startsWith(alreadyTyped)) {
            proposals.add(proposal);
          }
View Full Code Here

Examples of org.eclipse.jface.text.contentassist.ICompletionProposal

            completionStartPos = offset - (alreadyTyped.length() - completionStartPos);
          }
        } else {
          completionStartPos = offset;
        }
        ICompletionProposal proposals[] = new ICompletionProposal[1];
        proposals[0] = new CompletionProposal(replacement, completionStartPos, offset - completionStartPos, replacement.length());
        return proposals;
      }
    } catch (BadLocationException e) {
      setErrorMessage(e.getMessage());
View Full Code Here

Examples of org.eclipse.jface.text.contentassist.ICompletionProposal

        List<ICompletionProposal> proposalList = new ArrayList<ICompletionProposal>();
        for ( String string : proposals )
        {
            if ( string.toUpperCase().startsWith( attribute.toUpperCase() ) )
            {
                ICompletionProposal proposal = new CompletionProposal( string + ", ", start, //$NON-NLS-1$
                    documentOffset - start, string.length() + 2, null, string, null, null );
                proposalList.add( proposal );
            }
        }
        return proposalList.toArray( new ICompletionProposal[proposalList.size()] );
View Full Code Here

Examples of org.eclipse.jface.text.contentassist.ICompletionProposal

      String _lineDelimiter = _textWidget.getLineDelimiter();
      String _plus = (proposalText + _lineDelimiter);
      StyledString _styledString = new StyledString(proposalText);
      StyledString _append = _styledString.append(" - create a new target platform", StyledString.QUALIFIER_STYLER);
      Image _image = this.getImage(TargetPlatformProposalProvider.TARGET_PLATFORM);
      final ICompletionProposal p = this.createCompletionProposal(_plus, _append, _image, context);
      if ((p instanceof ConfigurableCompletionProposal)) {
        int _replacementOffset = ((ConfigurableCompletionProposal)p).getReplacementOffset();
        int _length = proposalPrefix.length();
        int _plus_1 = (_replacementOffset + _length);
        ((ConfigurableCompletionProposal)p).setSelectionStart(_plus_1);
View Full Code Here

Examples of org.eclipse.jface.text.contentassist.ICompletionProposal

    _builder_2.append(TargetPlatformProposalProvider.TARGET_PLATFORM__NAME_PLACEHOLDER, "");
    _builder_2.append("\"");
    StyledString _styledString = new StyledString(_builder_2.toString());
    StyledString _append = _styledString.append(" - name of the target", StyledString.QUALIFIER_STYLER);
    Image _image = this.getImage(TargetPlatformProposalProvider.TARGET_PLATFORM);
    final ICompletionProposal p = this.createCompletionProposal(textProposal, _append, _image, context);
    if ((p instanceof ConfigurableCompletionProposal)) {
      int _replacementOffset = ((ConfigurableCompletionProposal)p).getReplacementOffset();
      int _plus = (_replacementOffset + offset);
      ((ConfigurableCompletionProposal)p).setSelectionStart(_plus);
      int _length = TargetPlatformProposalProvider.TARGET_PLATFORM__NAME_PLACEHOLDER.length();
View Full Code Here

Examples of org.eclipse.jface.text.contentassist.ICompletionProposal

    if (_or) {
      final TargetPlatform tp = ((TargetPlatform) model);
      EList<Option> _options = tp.getOptions();
      boolean _isEmpty = _options.isEmpty();
      if (_isEmpty) {
        ICompletionProposal _createCompletionProposal = this.createCompletionProposal("with", "describe how the set of elements to add to this target is determined", TargetPlatformProposalProvider.OPTIONS, 520, context);
        acceptor.accept(_createCompletionProposal);
      }
      Environment _environment = tp.getEnvironment();
      boolean _equals = Objects.equal(_environment, null);
      if (_equals) {
        ICompletionProposal _createCompletionProposal_1 = this.createCompletionProposal("environment", "describe the system that this target is built for", TargetPlatformProposalProvider.ENVIRONMENT, 510, context);
        acceptor.accept(_createCompletionProposal_1);
      }
      this.templateLocation(context, acceptor);
      this.templateIncludeDeclaration(context, acceptor);
    }
View Full Code Here

Examples of org.eclipse.jface.text.contentassist.ICompletionProposal

    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();
      int _plus_3 = (_defaultPriority + 540);
      ((ConfigurableCompletionProposal)p).setPriority(_plus_3);
View Full Code Here

Examples of org.eclipse.jface.text.contentassist.ICompletionProposal

    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();
      int _plus_1 = (_defaultPriority + 530);
      ((ConfigurableCompletionProposal)p).setPriority(_plus_1);
View Full Code Here

Examples of org.eclipse.jface.text.contentassist.ICompletionProposal

      EList<Option> _options = options.getOptions();
      boolean _contains_1 = _options.contains(Option.INCLUDE_REQUIRED);
      boolean _not_1 = (!_contains_1);
      if (_not_1) {
        String _literal = Option.INCLUDE_REQUIRED.getLiteral();
        ICompletionProposal _createCompletionProposal = this.createCompletionProposal(_literal, "all required software will be added to the target platform", options, 440, context);
        acceptor.accept(_createCompletionProposal);
      }
      EList<Option> _options_1 = options.getOptions();
      boolean _contains_2 = _options_1.contains(Option.INCLUDE_SOURCE);
      boolean _not_2 = (!_contains_2);
      if (_not_2) {
        String _literal_1 = Option.INCLUDE_SOURCE.getLiteral();
        ICompletionProposal _createCompletionProposal_1 = this.createCompletionProposal(_literal_1, "sources (if available) of the content will be added to the target platform", options, 430, context);
        acceptor.accept(_createCompletionProposal_1);
      }
      EList<Option> _options_2 = options.getOptions();
      boolean _contains_3 = _options_2.contains(Option.INCLUDE_ALL_ENVIRONMENTS);
      boolean _not_3 = (!_contains_3);
      if (_not_3) {
        String _literal_2 = Option.INCLUDE_ALL_ENVIRONMENTS.getLiteral();
        ICompletionProposal _createCompletionProposal_2 = this.createCompletionProposal(_literal_2, "all available environment specific plug-ins will be added to the target platform", options, 420, context);
        acceptor.accept(_createCompletionProposal_2);
      }
      EList<Option> _options_3 = options.getOptions();
      boolean _contains_4 = _options_3.contains(Option.INCLUDE_CONFIGURE_PHASE);
      boolean _not_4 = (!_contains_4);
      if (_not_4) {
        String _literal_3 = Option.INCLUDE_CONFIGURE_PHASE.getLiteral();
        ICompletionProposal _createCompletionProposal_3 = this.createCompletionProposal(_literal_3, "the configure phase will be run during the download operation of the target platform", options, 410, context);
        acceptor.accept(_createCompletionProposal_3);
      }
    }
  }
View Full Code Here

Examples of org.eclipse.jface.text.contentassist.ICompletionProposal

    _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();
      int _plus = (_defaultPriority + priority);
      ((ConfigurableCompletionProposal)p).setPriority(_plus);
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.