Examples of IBeansConfigSet


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

      list.addAll(bc.getBeans());
      // add component registered beans
      addBeansFromComponents(list, bc.getComponents());
    }
    else if (getElement(elementId) instanceof IBeansConfigSet) {
      IBeansConfigSet bcs = (IBeansConfigSet) getElement(elementId);
      list.addAll(bcs.getBeans());
      // add component registered beans
      addBeansFromComponents(list, bcs.getComponents());
    }
    else if (getElement(elementId) instanceof IBean) {
      list.add((IBean) getElement(elementId));
      for (BeansConnection beanRef : BeansModelUtils.getBeanReferences(getElement(elementId),
          getElement(contextId), true)) {
View Full Code Here

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

        }
      }
      return bean;
    }
    else if (context instanceof IBeansConfigSet) {
      IBeansConfigSet configSet = (IBeansConfigSet) context;
      IBean bean = configSet.getBean(name);
      if (bean == null) {
        IBeanAlias alias = configSet.getAlias(name);
        if (alias != null) {
          bean = configSet.getBean(alias.getBeanName());
        }
      }
      if (bean == null) {
        for (IBeansComponent component : configSet.getComponents()) {
          bean = getBean(name, component);
          if (bean != null) {
            return bean;
          }
        }
View Full Code Here

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

    if (element instanceof IBeansConfig) {
      appendBeansConfigLabel((IBeansConfig) element, flags, buf);
    }
    else if (element instanceof IBeansConfigSet) {
      buf.append(element.getElementName());
      IBeansConfigSet configSet = (IBeansConfigSet) element;
      if (configSet.getProfiles() != null && configSet.getProfiles().size() > 0) {
        buf.append(" profiles=\"").append(StringUtils.collectionToDelimitedString(configSet.getProfiles(), ", ")).append("\"");
      }
    }
    else if (element instanceof ISourceModelElement) {
      appendElementLabel((ISourceModelElement) element, buf);
    }
View Full Code Here

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

  @Override
  public boolean select(Viewer viewer, Object parentElement, Object element) {
    if (element instanceof IProfileAwareBeansComponent) {
      IProfileAwareBeansComponent profileAwareBeansComponent = (IProfileAwareBeansComponent) element;
      IBeansConfigSet configSet = extractBeansConfigs((TreePath) parentElement);
     
      // Not part of a config set
      if (configSet == null) {
        return true;
      }
     
      // No profiles defined
      if (!profileAwareBeansComponent.hasProfiles()) {
        return true;
      }
      // Profiles defined
      if (CollectionUtils.containsAny(profileAwareBeansComponent.getProfiles(), configSet.getProfiles())) {
        return true;
      }
     
      return false;
    }
View Full Code Here

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

   
    BeansConfigSet configSet = new BeansConfigSet(beansProject, "test-set", IBeansConfigSet.Type.MANUAL);
    configSet.addConfig("basic-bean-config.xml");
    beansProject.addConfigSet(configSet);
   
    IBeansConfigSet set = beansProject.getConfigSet("test-set");
    Set<IBeansConfig> configs = set.getConfigs();
    assertEquals(1, configs.size());
    IBeansConfig config = configs.iterator().next();
    assertEquals("basic-bean-config.xml", config.getElementName());
    assertTrue(config instanceof BeansConfig);
  }
View Full Code Here

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

    BeansConfigSet configSet = new BeansConfigSet(beansProject, "test-set", IBeansConfigSet.Type.MANUAL);
    configSet.addConfig("basic-bean-config.xml");
    configSet.addConfig("/beans-config-tests-2/second-bean-config.xml");
    beansProject.addConfigSet(configSet);
   
    IBeansConfigSet set = beansProject.getConfigSet("test-set");
    Set<IBeansConfig> configs = set.getConfigs();
    assertEquals(2, configs.size());
   
    secondProject.delete(true, null);
  }
View Full Code Here

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

    BeansConfigSet configSet = new BeansConfigSet(beansProject, "test-set", IBeansConfigSet.Type.MANUAL);
    configSet.addConfig("basic-bean-config.xml");
    configSet.addConfig("/beans-config-tests-2/java:org.test.spring.ExternalConfigurationClass");
    beansProject.addConfigSet(configSet);
   
    IBeansConfigSet set = beansProject.getConfigSet("test-set");
    Set<IBeansConfig> configs = set.getConfigs();
    assertEquals(2, configs.size());
   
    secondProject.delete(true, null);
  }
View Full Code Here

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

    beansProject.addConfigSet(configSet);
   
    IFile configFile = (IFile) project.findMember("basic-bean-config.xml");
    beansProject.removeConfig(configFile);
   
    IBeansConfigSet set = beansProject.getConfigSet("test-set");
    Set<IBeansConfig> configs = set.getConfigs();
    assertEquals(0, configs.size());
  }
View Full Code Here

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

    beansProject.addConfigSet(configSet);
   
    IFile configFile = (IFile) secondProject.findMember("second-bean-config.xml");
    beansProject.removeConfig(configFile);
   
    IBeansConfigSet set = beansProject.getConfigSet("test-set");
    Set<IBeansConfig> configs = set.getConfigs();
    assertEquals(1, configs.size());
    IBeansConfig config = configs.iterator().next();
    assertEquals("basic-bean-config.xml", config.getElementName());
    assertTrue(config instanceof BeansConfig);
   
View Full Code Here

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

    beansProject.addConfigSet(configSet);
   
    IType type = javaProject.findType("org.test.spring.SimpleConfigurationClass");
    beansProject.removeConfig((IFile) type.getResource());
   
    IBeansConfigSet set = beansProject.getConfigSet("test-set");
    Set<IBeansConfig> configs = set.getConfigs();
    assertEquals(0, configs.size());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.