Examples of IProfileAwareBeansComponent


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

   */
  private static void registerComponents(IBeansConfigSet configSet, Set<IBeansComponent> components,
      BeanDefinitionRegistry registry) {
    for (IBeansComponent component : components) {
      if (configSet != null && component instanceof IProfileAwareBeansComponent) {
        IProfileAwareBeansComponent profileAwareBeansComponent = (IProfileAwareBeansComponent) component;
        if (profileAwareBeansComponent.getProfiles().size() != 0
            && !CollectionUtils.containsAny(profileAwareBeansComponent.getProfiles(),
                configSet.getProfiles())) {
          continue;
        }
      }
      for (IBean bean : component.getBeans()) {
View Full Code Here

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

    }
    if (element instanceof IBean) {
      appendBeanLabel((IBean) element, buf);
    }
    else if (element instanceof IProfileAwareBeansComponent) {
      IProfileAwareBeansComponent component = (IProfileAwareBeansComponent) element;
      buf.append(element.getElementName());
      if (component.getProfiles() != null && component.getProfiles().size() > 0) {
        buf.append(" profiles=\"").append(StringUtils.collectionToDelimitedString(component.getProfiles(), ", ")).append("\"");
      }
    }
    else if (element instanceof ISourceModelElement) {
      BeansModelLabels.appendElementLabel(element, buf);
    }
View Full Code Here

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

public class NonMatchingProfilesFilter extends ViewerFilter {

  @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
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.