Examples of IBeansProject


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

    return null;
  }

  public boolean isConfig(IFile configFile, boolean includeImported) {
    if (configFile != null) {
      IBeansProject project = getProject(configFile.getProject());
     
      // check the project of the file itself first
      String configName = null;
      if (project != null) {
        if (!(configFile instanceof ExternalFile)) {
          configName = configFile.getProjectRelativePath().toString();
        }
        else {
          configName = configFile.getFullPath().toString();
        }

        if (project.hasConfig(configFile, configName, includeImported)) {
          return true;
        }
      }
     
      // then check all the other projects
View Full Code Here

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

    // External config files (with a leading '/') are handled too
    int configNamePos = configName.indexOf('/', (configName.charAt(0) == '/' ? 1 : 0));
    if (configNamePos > 0) {
      String projectName = configName.substring(1, configNamePos);
      configName = configName.substring(configNamePos + 1);
      IBeansProject project = BeansCorePlugin.getModel().getProject(projectName);
      if (project != null) {
        return project.getConfig(configName);
      }
    }
    return null;
  }
View Full Code Here

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

    }
  }

  private ProjectClasspathUriResolver getProjectResolver(final IFile file, final IProject project) {
    // no project resolver if not a spring project
    IBeansProject beansProject = BeansCorePlugin.getModel().getProject(project);
    if (beansProject == null) {
      return null;
    }

    if (!NamespaceUtils.useNamespacesFromClasspath(project)) {
View Full Code Here

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

    public void springNatureRemoved(IProject project, int eventType) {
      if (eventType == IResourceChangeEvent.POST_BUILD) {
        if (DEBUG) {
          System.out.println("Spring beans nature removed from project '" + project.getName() + "'");
        }
        IBeansProject proj = null;
        try {
          w.lock();
          proj = projects.remove(project);
        }
        finally {
View Full Code Here

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

    public void projectClosed(IProject project, int eventType) {
      if (DEBUG) {
        System.out.println("Project '" + project.getName() + "' closed");
      }
      IBeansProject proj = null;
      try {
        w.lock();
        proj = projects.remove(project);
      }
      finally {
View Full Code Here

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

    public void projectDeleted(IProject project, int eventType) {
      if (DEBUG) {
        System.out.println("Project '" + project.getName() + "' deleted");
      }
      IBeansProject proj = null;
      try {
        w.lock();
        proj = projects.remove(project);
      }
      finally {
View Full Code Here

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

  }

  public static IBean getBeanWithConfigSets(String name, IBeansConfig config) {
    IBean bean = getBean(name, config);
    if (bean == null) {
      IBeansProject project = (IBeansProject) config.getElementParent();
      for (IBeansConfigSet configSet : project.getConfigSets()) {
        if (configSet.hasConfig(config.getElementName())) {
          bean = getBean(name, configSet);
          if (bean != null) {
            break;
          }
View Full Code Here

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

    if (configName.charAt(0) == IBeansConfigSet.EXTERNAL_CONFIG_NAME_PREFIX) {
      // Extract project and config name from full qualified config name
      int pos = configName.indexOf('/', 1);
      String projectName = configName.substring(1, pos);
      configName = configName.substring(pos + 1);
      IBeansProject project = BeansCorePlugin.getModel().getProject(projectName);
      if (project != null) {
        return project.getConfig(configName);
      }
    }
    else if (context instanceof IBeansProject) {
      return ((IBeansProject) context).getConfig(configName);
    }
View Full Code Here

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

    IResourceModelElement parent = (IResourceModelElement) storage.getAdapter(IResourceModelElement.class);
    if (parent instanceof IBeansConfig) {
      return (IBeansConfig) parent;
    }

    IBeansProject project = BeansCorePlugin.getModel().getProject(storage.getFile().getProject());
    if (project != null) {
      return project.getConfig(storage.getFullName());
    }
    return null;
  }
View Full Code Here

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

  }

  private void addHyperlinksHelper(final String typeName, final IProject project,
      final List<IHyperlink> hyperlinksCollector) {
    IBeansModel model = BeansCorePlugin.getModel();
    IBeansProject springProject = model.getProject(project);

    if (springProject == null) {
      return;
    }

    Set<IBeansConfig> configs = springProject.getConfigs();
    Set<AutowireBeanHyperlink> hyperlinks = new HashSet<AutowireBeanHyperlink>();
    for (IBeansConfig config : configs) {
      addHyperlinksHelper(config, typeName, project, hyperlinks);
    }
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.