Package org.springframework.ide.eclipse.beans.ui.editor.contentassist

Examples of org.springframework.ide.eclipse.beans.ui.editor.contentassist.BeansJavaCompletionProposal


    //is because of spring never uses TEXT_NODE's for class-declarations but only attributes, which needs "
    //Thus, we must use our own Proposal class. SpringIDE's BeansJavaCompletionUtils is very inflexible
    //here and cannot be subclassed. So we must replace every Proposal.   
    List<ICompletionProposal> newList = new ArrayList<ICompletionProposal>();
    for (Object object : proposals) {
      BeansJavaCompletionProposal bjcp = (BeansJavaCompletionProposal)object;
      DozerJavaCompletionProposal djcp =
        new DozerJavaCompletionProposal(bjcp.getReplacementString(),
                        bjcp.getReplacementOffset(),
                        bjcp.getReplacementLength(),
                        bjcp.getCursorPosition(),
                        bjcp.getImage(),
                        bjcp.getDisplayString(),
                        bjcp.getContextInformation(),
                        bjcp.getRelevance(),
                        true,
                        bjcp.getProposedObject());
      newList.add(djcp);
    }
    proposals.clear();
    proposals.addAll(newList);
  }
View Full Code Here


      buf.append(')');
      String displayText = buf.toString();

      Image image = BeansUIImages.getImage(BeansUIImages.IMG_OBJS_PROPERTY);

      BeansJavaCompletionProposal proposal = new BeansJavaCompletionProposal(
          replaceText, request.getReplacementBeginPosition(), request
              .getReplacementLength(), replaceText.length(),
              image, displayText, null, 0, method);
      request.addProposal(proposal);
    }
View Full Code Here

  private IContentProposal makeContentProposal(final ICompletionProposal proposal) {
    return new XmlBackedContentProposal() {

      public String getContent() {
        if (proposal instanceof BeansJavaCompletionProposal) {
          BeansJavaCompletionProposal beanProp = (BeansJavaCompletionProposal) proposal;
          String str = beanProp.getReplacementString();
          if (str.startsWith("\"")) { //$NON-NLS-1$
            str = str.substring(1);
          }
          if (str.endsWith("\"")) { //$NON-NLS-1$
            str = str.substring(0, str.length() - 1);
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.beans.ui.editor.contentassist.BeansJavaCompletionProposal

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.