Package org.eclipse.jface.fieldassist

Examples of org.eclipse.jface.fieldassist.ContentProposal


     * @param proposal the string to be inserted
     * @param displayString the proposal's label
     * @param additionalInfo the additional information
     */
    private void addProposal(String proposal, String displayString, String additionalInfo) {
      fProposals.add(new ContentProposal(proposal, displayString, additionalInfo));
    }
View Full Code Here


     *     relative to the start of the proposal
     * @param displayString the proposal's label
     * @param additionalInfo the additional information
     */
    private void addProposal(String proposal, int cursorPosition, String displayString, String additionalInfo) {
      fProposals.add(new ContentProposal(proposal, displayString, additionalInfo, cursorPosition));
    }
View Full Code Here

     * @param proposal the string to be inserted
     * @param displayString the proposal's label
     * @param additionalInfo the additional information
     */
    private void addPriorityProposal(String proposal, String displayString, String additionalInfo) {
      fPriorityProposals.add(new ContentProposal(proposal, displayString, additionalInfo));
    }
View Full Code Here

     * @param additionalInfo the additional information
     */
    private void addBracketProposal(String proposal, int cursorPosition, String displayString, String additionalInfo) {
      String prolog= fExpression.substring(0, fDocumentOffset);
      if (! fIsEscape && prolog.endsWith("\\") && proposal.startsWith("\\")) { //$NON-NLS-1$//$NON-NLS-2$
        fProposals.add(new ContentProposal(proposal, displayString, additionalInfo, cursorPosition));
        return;
      }
      for (int i= 1; i <= cursorPosition; i++) {
        String prefix= proposal.substring(0, i);
        if (prolog.endsWith(prefix)) {
          String postfix= proposal.substring(cursorPosition);
          String epilog= fExpression.substring(fDocumentOffset);
          if (epilog.startsWith(postfix)) {
            fPriorityProposals.add(new ContentProposal(proposal.substring(i, cursorPosition), displayString, additionalInfo, cursorPosition-i));
          } else {
            fPriorityProposals.add(new ContentProposal(proposal.substring(i), displayString, additionalInfo, cursorPosition-i));
          }
          return;
        }
      }
      fProposals.add(new ContentProposal(proposal, displayString, additionalInfo, cursorPosition));
    }
View Full Code Here

        position--;
        proposal= proposal.substring(1);
      }

      if (fIsEscape) {
        fPriorityProposals.add(new ContentProposal(proposal, displayString, additionalInfo, position));
      } else {
        addProposal(proposal, position, displayString, additionalInfo);
      }
    }
View Full Code Here

    int i = 0;
    for (ICompletionProposal completionProposal : proposals) {
      String description = "";
      String label = completionProposal.getDisplayString();
      String content = prefixMatcher.apply(contents, position, label);
      result[i] = new ContentProposal(content, label, description);
      i++;
    }
    return result;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.fieldassist.ContentProposal

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.