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

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


    //The mapping file that we are in
    File mappingFile = new File(mappingIFile.getName());
    String mappingFileName = mappingFile.getName();
   
    //First get direct references
    IBeansProject beansProject = BeansCorePlugin.getModel().getProject(mappingIFile.getProject());
   
    if (beansProject == null)
      return null;
   
    Set<IBeansConfig> tempConfigs = beansProject.getConfigs();
   
    if (tempConfigs == null)
      return null;   
   
    //We need some File to later get allBeans from ConfigSets
View Full Code Here


   *
   * @param project
   * @return
   */
  public static Set<IBean> getRepositoryBeansFor(IProject project) {
    IBeansProject beansProject = BeansCorePlugin.getModel().getProject(project);

    if (beansProject == null) {
      return Collections.emptySet();
    }

View Full Code Here

    }
    return false;
  }
 
  private boolean hasAvailableConfigSet(IBeansConfig config) {
    IBeansProject project = BeansModelUtils.getProject(config);
    Set<IBeansConfigSet> configSets = project.getConfigSets();
    for (IBeansConfigSet configSet : configSets) {
      if (!configSet.hasConfig(config.getElementName())) {
        return true;
      }
    }
View Full Code Here

          delta.accept(visitor);
        }
      }
      else {
        // Reset all for full clean build
        IBeansProject beansProject = BeansCorePlugin.getModel().getProject(project);
        if (beansProject != null) {
          configs.addAll(beansProject.getConfigs());
        }
      }
    }
    catch (CoreException e) {
      BeansCorePlugin.log(e);
View Full Code Here

  @Override
  public void finish(int kind, IResourceDelta delta, List<ProjectBuilderDefinition> builderDefinitions,
      List<ValidatorDefinition> validatorDefinitions, IProjectContributorState state, IProject project) {
    // Send update event
    if (configs.size() > 0) {
      IBeansProject beansProject = BeansCorePlugin.getModel().getProject(project);
      if (beansProject != null) {
        ((BeansModel) BeansCorePlugin.getModel()).notifyListeners(beansProject, Type.CHANGED);
      }
    }
   
View Full Code Here

            project = (IProject) event.getResource();
          } else if (event.getSource() instanceof IProject) {
            project = (IProject) event.getSource();
          }
         
          IBeansProject beansProject = BeansModelUtils.getParentOfClass(element, IBeansProject.class);
          if (beansProject != null) {
            IProject elementProject = beansProject.getProject();
            if (project != null && elementProject != null && elementProject.equals(project)) {
              element = null;
              internalSetInput();
            }
          }
View Full Code Here

  public Change createChange(IProgressMonitor monitor) throws CoreException, OperationCanceledException {
    try {
      monitor.beginTask("Creating change...", 1);
      CompositeChange compositeChange = new CompositeChange("Renaming Spring Bean id");

      IBeansProject beanProject = BeansCorePlugin.getModel().getProject(method.getResource().getProject());
      Set<IBeansConfig> configs = beanProject.getConfigs();

      // TODO: make sure I should be including all config files
      for (IBeansConfig config : configs) {
        IResource resource = config.getElementResource();
        if (resource.isAccessible() && resource instanceof IFile) {
View Full Code Here

  /**
   * Propagates a change to a particular resource to its project so that all {@link IBeansConfig}s will get
   * revalidated.
   */
  private void propagateChangedResourceToProject(IResource resource, Set<IResource> resources) {
    IBeansProject beansProject = BeansCorePlugin.getModel().getProject(resource.getProject());
    if (beansProject != null) {
      for (IBeansConfig beansConfig : beansProject.getConfigs()) {
        resources.add(beansConfig.getElementResource());
        addBeans(beansConfig);
      }
    }
  }
View Full Code Here

            || checkForRefresh(changedResource, originalContextElement);
      }
      // changes occured in the project configuration; added config file
      // to project or beans config set
      else if (changedElement instanceof IBeansProject) {
        IBeansProject beansProject = (IBeansProject) changedElement;
        refresh = (BeansModelUtils.getChildForElement(beansProject, originalInputElement) != null || BeansModelUtils
            .getChildForElement(beansProject, originalContextElement) != null);
      }

      // most likely a close or remove of project or config
View Full Code Here

    return getConfig(configFile, true);
  }

  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;
        }
      }
View Full Code Here

TOP

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

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.