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

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


  public Set<IBeansConfig> getConfigs(IFile file, boolean includeImported) {
    Set<IBeansConfig> beansConfigs = new LinkedHashSet<IBeansConfig>();

    if (file.getProject() != null && !this.project.equals(file.getProject())) {
      IBeansProject otherBeansProject = BeansCorePlugin.getModel().getProject(file.getProject());
      if (otherBeansProject != null) {
        Set<IBeansConfig> otherProjectConfigs = otherBeansProject.getConfigs(file, false);
        for (IBeansConfig otherProjectConfig : otherProjectConfigs) {
          beansConfigs.add(otherProjectConfig);
        }
      }
    }
View Full Code Here


public class AddToNewConfigSetAction extends AbstractHandler {

  private IBeansConfig config;
 
  public Object execute(ExecutionEvent event) throws ExecutionException {
    IBeansProject beansProject = BeansModelUtils.getProject(config);
    IProject project = beansProject.getProject();
    Map<String, Object> data = new HashMap<String, Object>();
    data.put(ProjectPropertyPage.SELECTED_RESOURCE, config);
    data.put(ProjectPropertyPage.BLOCK_ID, 1);
    BeansUIUtils.showProjectPropertyPage(project, data);
    return null;
View Full Code Here

      setImageDescriptor(ImageDescriptor.createFromImage(BeansModelImages.getImage(config)));
    }

    @Override
    public void run() {
      IBeansProject beansProject = BeansModelUtils.getProject(config);
      if (beansProject != null) {
        PropertiesProject modelProject = new PropertiesProject(new PropertiesModel(), beansProject);
        PropertiesConfigSet propSet = (PropertiesConfigSet) modelProject.getConfigSet(configSet.getElementName());
        propSet.removeConfig(config.getElementName());
        modelProject.saveDescription();
View Full Code Here

      if ("pom.xml".equals(element.getName())) {
        return false;
      }

      IBeansProject project = BeansCorePlugin.getModel().getProject(element.getProject());
      if (project != null) {
        IBeansConfig beansConfig = project.getConfig(element);
        return beansConfig == null;
      }
      return false;
    }
View Full Code Here

    }

    @Override
    public boolean select(Viewer viewer, Object parent, Object element) {
      if (element instanceof IType) {
        IBeansProject beansProj = BeansCorePlugin.getModel().getProject(project.getProject());
        if (beansProj != null) {
          IType type = (IType) element;
          IBeansConfig beansConfig = project.getConfig(BeansConfigFactory.JAVA_CONFIG_TYPE
              + type.getFullyQualifiedName());
          return beansConfig == null;
View Full Code Here

    addErrorOverlay(decoration, getSeverity(element));
  }

  protected void decorateFile(IFile file, IDecoration decoration) {
    IBeansModel model = BeansCorePlugin.getModel();
    IBeansProject project = model.getProject(file.getProject());
   
    if (project instanceof ILazyInitializedModelElement
        && !((ILazyInitializedModelElement) project).isInitialized()) {
      return;
    }
View Full Code Here

    }
  }

  protected void decorateFolder(IFolder folder, IDecoration decoration) {
    IBeansModel model = BeansCorePlugin.getModel();
    IBeansProject project = model.getProject(folder.getProject());
   
    if (project instanceof ILazyInitializedModelElement
        && !((ILazyInitializedModelElement) project).isInitialized()) {
      return;
    }
   
    if (project != null) {
      String path = folder.getProjectRelativePath().toString() + '/';
      for (IBeansConfig config : project.getConfigs()) {
        if (config.getElementName().startsWith(path)) {
          decoration.addOverlay(BeansUIImages.DESC_OVR_SPRING);
          break;
        }
      }
View Full Code Here

  protected void decorateJavaElement(IJavaElement element, IDecoration decoration) {
    int type = element.getElementType();
    if (type == IJavaElement.PACKAGE_FRAGMENT_ROOT || type == IJavaElement.CLASS_FILE
        || type == IJavaElement.COMPILATION_UNIT) {
      IBeansModel model = BeansCorePlugin.getModel();
      IBeansProject project = model.getProject(element.getJavaProject().getProject());
      if (project instanceof ILazyInitializedModelElement && ((ILazyInitializedModelElement) project).isInitialized()) {
        try {
          if (type == IJavaElement.PACKAGE_FRAGMENT_ROOT) {

            // Decorate JAR file
            IResource resource = ((IPackageFragmentRoot) element).getResource();
            if (resource instanceof IFile) {
              for (IBeansConfig config : project.getConfigs()) {
                if (config.getElementResource().equals(resource)) {
                  decoration.addOverlay(BeansUIImages.DESC_OVR_SPRING);
                  break;
                }
              }
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.