Package org.springframework.ide.eclipse.webflow.core.internal.model

Examples of org.springframework.ide.eclipse.webflow.core.internal.model.WebflowConfig


    this.project = project;
    this.configs = new ArrayList<IWebflowConfig>();
  }

  public IWebflowConfig addConfig(IFile file) {
    IWebflowConfig config = new WebflowConfig(project);
    config.setResource(file);
    configs.add(config);
    return config;
  }
View Full Code Here


        WebflowProject webflowProject = (WebflowProject) parent;
        // check if target project is actually the parent of resource
        IProject project = getProject(parent);
        if (resource.getProject().equals(project) && webflowProject.getConfig(file) == null) {
          List<IWebflowConfig> configs = webflowProject.getConfigs();
          WebflowConfig config = new WebflowConfig(webflowProject);
          config.setResource(file);
          configs.add(config);
          webflowProject.setConfigs(configs);
          return Status.OK_STATUS;
        }
      }
      // handle BeansConfig or BeansConfigSet drop to WebflowConfig
      else if (parent instanceof WebflowConfig) {
        WebflowConfig webflowConfig = (WebflowConfig) parent;
        IProject project = getProject(parent);
        WebflowProject webflowProject = (WebflowProject) Activator.getModel().getProject(project);
        if (!webflowProject.isUpdatable()) {
          return Status.CANCEL_STATUS;
        }
        IBeansModelElement beansElement = BeansCorePlugin.getModel().getConfig(file);

        if (beansElement != null && resource.getProject().equals(project)
            && !webflowConfig.getBeansConfigs().contains(beansElement)) {
          Set<IModelElement> beanElements = webflowConfig.getBeansConfigs();
          beanElements.add(beansElement);
          webflowConfig.setBeansConfigs(beanElements);
          webflowProject.saveDescription();
          return Status.OK_STATUS;
        }
      }
    }
View Full Code Here

    if (dialog.open() == ElementTreeSelectionDialog.OK) {
      Object[] selection = dialog.getResult();
      if (selection != null && selection.length > 0) {
        for (int i = 0; i < selection.length; i++) {
          IFile file = (IFile) selection[i];
          IWebflowConfig config = new WebflowConfig(project);
          config.setResource(file);
          int j = file.getName().lastIndexOf('.');
          if (j > 0) {
            config.setName(file.getName().substring(0, j));
          } else {
            config.setName(file.getName());
          }
          configFiles.add(config);
        }
        hasUserMadeChanges = true;
        configsViewer.refresh();
View Full Code Here

    if (dialog.open() == ElementTreeSelectionDialog.OK) {
      Object[] selection = dialog.getResult();
      if (selection != null && selection.length > 0) {
        for (int i = 0; i < selection.length; i++) {
          IFile file = (IFile) selection[i];
          IWebflowConfig config = new WebflowConfig(project);
          config.setResource(file);
          int j = file.getName().lastIndexOf('.');
          if (j > 0) {
            config.setName(file.getName().substring(0, j));
          } else {
            config.setName(file.getName());
          }
          configFiles.add(config);
        }
        hasUserMadeChanges = true;
        configsViewer.refresh();
View Full Code Here

        .getConfig();
    IWebflowConfig newConfig = org.springframework.ide.eclipse.webflow.core.Activator
        .getModel().getProject(file.getProject()).getConfig(file);

    if (newConfig == null) {
      newConfig = new WebflowConfig(config.getProject());
      newConfig.setBeansConfigs(config.getBeansConfigs());
      newConfig.setResource(file);
      List<IWebflowConfig> configs = config.getProject().getConfigs();
      configs.add(newConfig);
      config.getProject().setConfigs(configs);
View Full Code Here

      Set<IWebflowConfig> files = configFilesBlock.getConfigFiles();
      Map<IWebflowConfig, Set<IModelElement>> filesToConfig = configFilesBlock.getConfigFilesToBeansConfigs();
      Map<IWebflowConfig, String> names = configFilesBlock.getConfigFilesToNames();
      List<IWebflowConfig> webflowConfigs = new ArrayList<IWebflowConfig>();
      for (IWebflowConfig file : files) {
        WebflowConfig webflowConfig = new WebflowConfig(project);
        webflowConfig.setBeansConfigs(filesToConfig.get(file));
        webflowConfig.setResource(file.getResource());
        if (names.get(file) != null) {
          webflowConfig.setName(names.get(file));
        }
        webflowConfigs.add(webflowConfig);
      }

      // At first delete all problem markers from the removed config files
View Full Code Here

      mainPage.setFileExtension("xml");
    }
   
    // create the new Spring project operation
    final IFile file = mainPage.createNewFile();
    newConfig = new WebflowConfig(getProject(file));
    newConfig.setResource(file);
    String name = linkPage.getName();
    if (name != null && !"".equals(name)) {
      newConfig.setName(name);
    }
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.webflow.core.internal.model.WebflowConfig

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.