Package org.springframework.ide.eclipse.wizard.core

Examples of org.springframework.ide.eclipse.wizard.core.WizardContentAssistConverter


    }

    int index = 0;

    if (attributeValue != null) {
      WizardContentAssistConverter contentAssistConverter = new WizardContentAssistConverter(property, property
          .getAttributeNode(attributeName), wizard.getBeanFile(), wizard.getOriginalDocument());

      if (attributeName.equals(BeansSchemaConstants.ATTR_NAME)) {
        errorFound = contentAssistConverter.getPropertyProposals(attributeValue, true).isEmpty();
        if (errorFound) {
          item.setImage(index, images[index]);
        }
        else {
          item.setImage(index, BeansUIImages.getImage(BeansUIImages.IMG_OBJS_PROPERTY));
        }
      }
      else if (attributeName.equals(BeansSchemaConstants.ATTR_REF)) {
        if (kind == PROPERTY) {
          index = 1;
        }
        if (attributeValue.length() == 0) {
          item.setImage(index, null);
        }
        else {
          errorFound = contentAssistConverter.getReferenceableBeanDescriptions(attributeValue, true)
              .isEmpty();
          if (errorFound) {
            item.setImage(index, images[index]);
          }
          else {
View Full Code Here


    messageLabel.redraw();

  }

  protected void validateAttribute(String attributeName, String value) {
    WizardContentAssistConverter contentAssistConverter = new WizardContentAssistConverter(element, element
        .getAttributeNode(attributeName), wizard.getBeanFile(), wizard.getOriginalDocument());

    validateAttribute(attributeName, value, contentAssistConverter);
    updateButton();
  }
View Full Code Here

    getWizard().getContainer().updateButtons();
  }

  private void validateAttribute(String attributeName, String value) {
    IDOMElement newBean = wizard.getNewBean();
    WizardContentAssistConverter contentAssistConverter = new WizardContentAssistConverter(newBean,
        newBean.getAttributeNode(attributeName), wizard.getBeanFile(), wizard.getOriginalDocument());

    if (attributeName.equals(BeansSchemaConstants.ATTR_CLASS)) {
      if (value.length() > 0) {
        Set<ContentAssistProposalWrapper> classAttributeProposals = contentAssistConverter
            .getClassAttributeProposals(value, true);
        if (classAttributeProposals.isEmpty()) {
          classErrorMessage = Messages.getString("NewBeanWizardPage.UNKNOW_CLASS_MESSAGE"); //$NON-NLS-1$
        }
        else {
          classErrorMessage = null;
        }
      }
      else {
        classErrorMessage = null;
      }
    }
    else if (attributeName.equals(BeansSchemaConstants.ATTR_PARENT)) {
      if (value.length() > 0) {
        Set<ContentAssistProposalWrapper> referenceableBeanDescriptions = contentAssistConverter
            .getReferenceableBeanDescriptions(value, true);
        if (referenceableBeanDescriptions.isEmpty()) {
          parentErrorMessage = Messages.getString("NewBeanWizardPage.UNKNOWN_PARENT_MESSAGE"); //$NON-NLS-1$
        }
        else {
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.wizard.core.WizardContentAssistConverter

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.