Package org.springframework.ide.eclipse.beans.core.model

Examples of org.springframework.ide.eclipse.beans.core.model.IBean


        return 0;
      }

      IBeansConfig beansConfig = beansModel.getConfig((IFile) marker.getResource(), false);
      String beanName = beanElement.getAttribute("id");
      IBean bean = BeansModelUtils.getBean(beanName, beansConfig);
      if (bean != null && bean.getConstructorArguments() != null) {
        return bean.getConstructorArguments().size();
      }
      return 0;
    }
    finally {
      if (model != null) {
View Full Code Here


      }
    }
    if (hyperlink instanceof ExternalBeanHyperlink) {
      Iterator<IBean> beans = BeansEditorUtils.getBeansFromConfigSets(file).iterator();
      while (beans.hasNext()) {
        IBean modelBean = beans.next();
        if (modelBean.getElementName().equals(value)) {
          return new ExtendedExternalBeanHyperlink(modelBean, region);
        }
      }
    }
    return hyperlink;
View Full Code Here

    }
    else {
      // assume this is an external reference
      Iterator<?> beans = BeansEditorUtils.getBeansFromConfigSets(file).iterator();
      while (beans.hasNext()) {
        IBean modelBean = (IBean) beans.next();
        if (modelBean.getElementName().equals(target)) {
          return new ExtendedExternalBeanHyperlink(modelBean, hyperlinkRegion);
        }
      }
    }
    return null;
View Full Code Here

   
    Set<IBean> beans = BeansModelUtils.getBeansByContainingTypes(resource, typeEngine, null);
    assertEquals(2, beans.size());
   
    Iterator<IBean> iterator = beans.iterator();
    IBean bean1 = iterator.next();
    IBean bean2 = iterator.next();

    assertTrue("simpleBean1".equals(bean1.getElementName()) || "simpleBean1".equals(bean2.getElementName()));
    assertTrue("simpleBean2".equals(bean1.getElementName()) || "simpleBean2".equals(bean2.getElementName()));
  }
View Full Code Here

   
    Set<IBean> beans = BeansModelUtils.getBeansByContainingTypes(resource, typeEngine, null);
    assertEquals(1, beans.size());
   
    Iterator<IBean> iterator = beans.iterator();
    IBean bean = iterator.next();

    assertEquals("differentBean", bean.getElementName());
  }
View Full Code Here

   
    Set<IBean> beans = BeansModelUtils.getBeansByContainingTypes(resource, typeEngine, null);
    assertEquals(1, beans.size());
   
    Iterator<IBean> iterator = beans.iterator();
    IBean bean = iterator.next();
    assertEquals("supertypeChangedBean", bean.getElementName());
  }
View Full Code Here

   
    Set<IBean> beans = BeansModelUtils.getBeansByContainingTypes(resource, typeEngine, null);
    assertEquals(1, beans.size());
   
    Iterator<IBean> iterator = beans.iterator();
    IBean bean = iterator.next();
    assertEquals("supertypeChangedBean", bean.getElementName());
  }
View Full Code Here

    Set<IBean> beans = BeansModelUtils.getBeansByContainingTypes(resource, typeEngine, null);
    assertEquals(2, beans.size());
   
    Iterator<IBean> iterator = beans.iterator();
    IBean bean1 = iterator.next();
    IBean bean2 = iterator.next();

    assertTrue("factoryMethodCreatedBean".equals(bean1.getElementName()) || "factoryMethodCreatedBean".equals(bean2.getElementName()));
    assertTrue("factoryBeanCreatedBean".equals(bean1.getElementName()) || "factoryBeanCreatedBean".equals(bean2.getElementName()));
  }
View Full Code Here

    Set<IBean> beans = BeansModelUtils.getBeansByContainingTypes(resource, typeEngine, null);
    assertEquals(1, beans.size());
   
    Iterator<IBean> iterator = beans.iterator();
    IBean bean = iterator.next();
    assertEquals("supertypeFactoryMethodCreatedBean", bean.getElementName());
  }
View Full Code Here

    Set<IBean> beans = BeansModelUtils.getBeansByContainingTypes(resource, typeEngine, null);
    assertEquals(3, beans.size());
   
    Iterator<IBean> iterator = beans.iterator();
    IBean bean1 = iterator.next();
    IBean bean2 = iterator.next();
    IBean bean3 = iterator.next();

    assertTrue("chainedFactoryCreatedBean".equals(bean1.getElementName()) || "chainedFactoryCreatedBean".equals(bean2.getElementName()) || "chainedFactoryCreatedBean".equals(bean3.getElementName()));
    assertTrue("chainedFactoryBean1".equals(bean1.getElementName()) || "chainedFactoryBean1".equals(bean2.getElementName()) || "chainedFactoryBean1".equals(bean3.getElementName()));
    assertTrue("chainedFactoryBean2".equals(bean1.getElementName()) || "chainedFactoryBean2".equals(bean2.getElementName()) || "chainedFactoryBean2".equals(bean3.getElementName()));
  }
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.beans.core.model.IBean

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.