Package org.springframework.ide.eclipse.quickfix.proposals

Examples of org.springframework.ide.eclipse.quickfix.proposals.RenameToSimilarNameQuickFixProposal


          resource.accept(visitor);
        }
      }
      List<String> suggestedClassNames = visitor.getSuggestedClassNames();
      for (String suggestedClassName : suggestedClassNames) {
        proposals.add(new RenameToSimilarNameQuickFixProposal(suggestedClassName, offset, length,
            missingEndQuote));
      }

      proposals.add(new CreateNewClassQuickFixProposal(offset, length, text, missingEndQuote, javaProject,
          propertyNames, numConstructorArgs));
View Full Code Here


            buffer.append(" in ");

            JavaElementLabels.getMethodLabel(method, JavaElementLabels.M_PARAMETER_TYPES
                | JavaElementLabels.M_PARAMETER_NAMES, buffer);

            proposals.add(new RenameToSimilarNameQuickFixProposal(paramName, offset, length,
                missingEndQuote, buffer.toString()));
          }
        }
      }
      catch (JavaModelException e) {
View Full Code Here

  public ICompletionProposal[] computeQuickAssistProposals(IQuickAssistInvocationContext invocationContext) {
    List<ICompletionProposal> proposals = new ArrayList<ICompletionProposal>();

    List<String> similarProperties = getSimilarProperties();
    for (String similarProperty : similarProperties) {
      RenameToSimilarNameQuickFixProposal p = new RenameToSimilarNameQuickFixProposal(similarProperty, offset,
          length, missingEndQuote);
      proposals.add(p);
    }

    ICompletionProposal proposal = QuickfixUtils
View Full Code Here

    Set<ContentAssistProposalWrapper> matchedProposals = new QuickfixContentAssistConverter(parentNode,
        attributeName, file).getMethodProposals(text, false, calculator);
    for (ContentAssistProposalWrapper proposal : matchedProposals) {
      String methodName = proposal.getName();
      String description = proposal.getDisplayText();
      proposals.add(new RenameToSimilarNameQuickFixProposal(methodName, offset, length, missingEndQuote,
          description));
    }

    if (className != null) {
      ICompletionProposal proposal = QuickfixUtils.getNewMethodQuickFixProposal(text, "Object", new String[0],
View Full Code Here

    List<ICompletionProposal> proposals = new ArrayList<ICompletionProposal>();

    Set<ContentAssistProposalWrapper> possibleProposals = new QuickfixContentAssistConverter(node, attributeName,
        file).getReferenceableBeanDescriptions(text, false);
    for (ContentAssistProposalWrapper proposal : possibleProposals) {
      proposals.add(new RenameToSimilarNameQuickFixProposal(proposal.getName(), offset, length, missingEndQuote,
          proposal.getDisplayText()));
    }

    IDOMNode beanNode = QuickfixUtils.getEnclosingBeanNode(node);
    if (beanNode != null) {
View Full Code Here

    ITextRegion valueRegion = classAttr.getValueRegion();

    int offset = getOffset(valueRegion, beanNode);
    int length = getLength(valueRegion, isMissingEndQuote);

    RenameToSimilarNameQuickFixProposal proposal = new RenameToSimilarNameQuickFixProposal(newClassName, offset,
        length, isMissingEndQuote);
    proposal.apply(document);

    beanNode = QuickfixTestUtil.getNode(BeansSchemaConstants.ELEM_BEAN, beanName, beansNode.getChildNodes());
    classAttr = (AttrImpl) beanNode.getAttributes().getNamedItem(BeansSchemaConstants.ATTR_CLASS);
    return classAttr;
  }
View Full Code Here

    ITextRegion valueRegion = nameAttr.getValueRegion();

    int offset = getOffset(valueRegion, propertyNode);
    int length = getLength(valueRegion, isMissingEndQuote);

    RenameToSimilarNameQuickFixProposal proposal = new RenameToSimilarNameQuickFixProposal("account", offset,
        length, isMissingEndQuote);
    proposal.apply(document);

    beanNode = QuickfixTestUtil.getNode(BeansSchemaConstants.ELEM_BEAN, beanName, beansNode.getChildNodes());
    propertyNode = QuickfixTestUtil.getFirstNode(BeansSchemaConstants.ELEM_PROPERTY, beanNode.getChildNodes());
    nameAttr = (AttrImpl) propertyNode.getAttributes().getNamedItem(BeansSchemaConstants.ATTR_NAME);
    return nameAttr;
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.quickfix.proposals.RenameToSimilarNameQuickFixProposal

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.