Examples of IBeansConfig


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

  /**
   * Add resources that share a config set to the list.
   */
  private void propagateChangedResourceToConfigSets(Set<IResource> resources) {
    for (IResource resource : new HashSet<IResource>(resources)) {
      IBeansConfig beansConfig = BeansCorePlugin.getModel().getConfig((IFile) resource);
      for (IBeansConfigSet beansConfigSet : BeansModelUtils.getConfigSets(beansConfig)) {
        for (IBeansConfig bc : beansConfigSet.getConfigs()) {
          if (!resources.contains(bc.getElementResource())) {
            resources.add(bc.getElementResource());
            addBeans(bc);
View Full Code Here

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

  }

  private void createBeanGraphPage() {
    boolean gefEnabled = getPreferenceStore().getBoolean(SpringConfigPreferenceConstants.PREF_ENABLE_GEF_PAGES);
    if (gefEnabled) {
      IBeansConfig config = BeansCorePlugin.getModel().getConfig(getResourceFile());
      if (config != null) {
        addBeanGraphPage(config);
      }
      else {
        requiresDeferredBeanGraph = true;
View Full Code Here

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

    boolean gefEnabled = getPreferenceStore().getBoolean(SpringConfigPreferenceConstants.PREF_ENABLE_GEF_PAGES);
    if (!gefEnabled) {
      requiresDeferredBeanGraph = false;
    }
    if (requiresDeferredBeanGraph) {
      final IBeansConfig config = BeansCorePlugin.getModel().getConfig(getResourceFile());
      if (config != null) {
        Display.getDefault().asyncExec(new Runnable() {
          public void run() {
            addBeanGraphPage(config);
          }
View Full Code Here

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

  public IBeansConfig getConfig(IFile configFile, boolean includeImported) {
    if (configFile != null) {
      IBeansProject project = getProject(configFile.getProject());
      if (project != null) {
        IBeansConfig bc = project.getConfig(configFile, includeImported);
        if (bc != null) {
          return bc;
        }
      }

      for (IBeansProject p : getProjects()) {
        IBeansConfig bc = p.getConfig(configFile, includeImported);
        if (bc != null) {
          return bc;
        }
      }
    }
View Full Code Here

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

          }
          else {
            project.saveDescription();
          }
        }
        IBeansConfig config = project.getConfig(file);
        notifyListeners(config, Type.ADDED);
      }
    }
View Full Code Here

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

          return;
        }

        // Before removing the config from it's project keep a copy for
        // notifying the listeners
        IBeansConfig config = project.getConfig(file);
        if (project.removeConfig(file)) {
          project.saveDescription();
        }

        // Remove config from config sets where referenced as external
View Full Code Here

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

  public Object getPropertyValue(Object id) {
    if (P_ID_NAME.equals(id)) {
      return bean.getElementName();
    }
    if (P_ID_CONFIG.equals(id)) {
      IBeansConfig config = BeansModelUtils.getConfig(bean);
      IFile file = (IFile) BeansModelUtils.getConfig(bean)
          .getElementResource();
      if (file != null) {
        return new ConfigFilePropertySource(file);
      }
      return config.getElementName();
    }
    if (P_ID_CLASS.equals(id)) {
      IProject project = BeansModelUtils.getProject(bean).getProject();
      String className = bean.getClassName();
      IType type = JdtUtils.getJavaType(project, className);
View Full Code Here

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

   * specified bean.
   */
  protected void createBeansMap() {
    Set<IBean> list = new LinkedHashSet<IBean>();
    if (getElement(elementId) instanceof IBeansConfig) {
      IBeansConfig bc = (IBeansConfig) getElement(elementId);
      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
View Full Code Here

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

    project.delete(true, null);
  }

  @Test
  public void testCreateBeansConfig() throws Exception {
    IBeansConfig config = BeansConfigFactory.create(beansProject, "basic-bean-config.xml", IBeansConfig.Type.MANUAL);
    assertTrue(config instanceof BeansConfig);
    assertEquals("basic-bean-config.xml", config.getElementName());
  }
View Full Code Here

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

    assertEquals("basic-bean-config.xml", config.getElementName());
  }
 
  @Test
  public void testCreateBeansConfigFullyQualifiedPath() throws Exception {
    IBeansConfig config = BeansConfigFactory.create(beansProject, "/beans-config-tests/basic-bean-config.xml", IBeansConfig.Type.MANUAL);
    assertTrue(config instanceof BeansConfig);
    assertEquals("basic-bean-config.xml", config.getElementName());
  }
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.