Examples of modifyModules()


Examples of org.eclipse.wst.server.core.IServerWorkingCopy.modifyModules()

          add = new IModule[] { modules[0] };
        }
        else {
          // Delete them first
          IServerWorkingCopy wc = server.createWorkingCopy();
          wc.modifyModules(null, modules, monitor);
          wc.save(true, null);
          cloudServer.getBehaviour().refreshModules(monitor);

          new WaitWithProgressJob(5, 1000) {
View Full Code Here

Examples of org.eclipse.wst.server.core.IServerWorkingCopy.modifyModules()

          if (status.getSeverity() != IStatus.ERROR) {
            CloudFoundryPlugin.getModuleCache().getData(wc.getOriginal())
                .tagForAutomaticRepublish(new RepublishModule(add[0], appModule.getDeploymentInfo()));

            // publish the module
            wc.modifyModules(add, null, monitor);
            wc.save(true, null);
            republished = true;
          }
          else {
            throw new CoreException(status);
View Full Code Here

Examples of org.eclipse.wst.server.core.IServerWorkingCopy.modifyModules()

  public IStatus doDeleteModules(final Collection<IModule> deletedModules) {
    IServerWorkingCopy wc = getServer().createWorkingCopy();
    try {
      deleteServicesOnModuleRemove.set(Boolean.FALSE);
      wc.modifyModules(null, deletedModules.toArray(new IModule[deletedModules.size()]), null);
      wc.save(true, null);
    }
    catch (CoreException e) {
      // log error to avoid pop-up dialog
      CloudFoundryPlugin
View Full Code Here

Examples of org.eclipse.wst.server.core.IServerWorkingCopy.modifyModules()

        throw new CoreException(
            CloudFoundryPlugin.getErrorStatus("Sample project does not contain web modules: " + project)); //$NON-NLS-1$
      }

      if (!Arrays.asList(wc.getModules()).contains(modules[0])) {
        wc.modifyModules(modules, new IModule[0], monitor);
        server = wc.save(true, monitor);
      }
      server.publish(IServer.PUBLISH_INCREMENTAL, monitor);

      restartServer(server, monitor);
View Full Code Here

Examples of org.eclipse.wst.server.core.IServerWorkingCopy.modifyModules()

    public void addModule(IProject project) throws CoreException {
      Assert.isNotNull(server, "Invoke createServer() first");

      IModule[] modules = ServerUtil.getModules(project);
      IServerWorkingCopy wc = server.createWorkingCopy();
      wc.modifyModules(modules, new IModule[0], null);
      wc.save(true, null);
    }

    public IProject createProject(String projectName) throws CoreException, IOException {
      return StsTestUtil.createPredefinedProject(projectName, CloudFoundryTestFixture.PLUGIN_ID);
View Full Code Here

Examples of org.eclipse.wst.server.core.IServerWorkingCopy.modifyModules()

                return ServerUtil.getModule(project);
            }
        }, notNullValue(IModule.class));

        IServerWorkingCopy serverWorkingCopy = server.createWorkingCopy();
        serverWorkingCopy.modifyModules(new IModule[] { bundleModule }, new IModule[0], new NullProgressMonitor());
        serverWorkingCopy.save(false, new NullProgressMonitor());

    }

    public void setAttribute(String name, boolean value) throws CoreException {
View Full Code Here

Examples of org.eclipse.wst.server.core.IServerWorkingCopy.modifyModules()

            IModule module = ServerUtil.getModule(project);
            if (module != null && shouldDeploy(module)) {
                modules.add(module);
            }
        }
        wc.modifyModules(modules.toArray(new IModule[modules.size()]), new IModule[0], monitor);
        wc.save(true, monitor);

        advance(monitor, 2);

        monitor.done();
View Full Code Here

Examples of org.eclipse.wst.server.core.internal.ServerWorkingCopy.modifyModules()

          add[i] = ServerUtil.getModule(ResourcesPlugin.getWorkspace().getRoot().getProject(strmodules[i]));
        }
      }

      System.out.println("Modules to assign to server: " + Arrays.asList(add));
      swc.modifyModules(add, new IModule[0], monitor);
      server = swc.save(true, monitor);

      System.out.println("Server instance created: " + server.getName());
    }
    else
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.