Examples of IRuntimeWorkingCopy


Examples of org.eclipse.wst.server.core.IRuntimeWorkingCopy

    if( rtType == null )
      return;
   
    try {
      IPath locPath = new Path(loc.getAbsolutePath());
      IRuntimeWorkingCopy rt = rtType.createRuntime(runtimeName, new NullProgressMonitor());
      rt.setLocation(locPath);
      rt.setName(runtimeName);
      // We don't need to set a vm, it can use default
      rt.save(true, new NullProgressMonitor());
      // TODO create the server also
    } catch(CoreException ce) {
      Activator.getLogger().error(ce);
    }
  }
View Full Code Here

Examples of org.eclipse.wst.server.core.IRuntimeWorkingCopy

  /**
   * updates the model from runtime.
   */
  protected void populateModel() {
    IRuntimeWorkingCopy workingCopy = getRuntimeWorkingCopy();
    if (workingCopy != null) {
      // workCopy will be instance of ServerDelegate classs.
      // We need to get the params, so IFuseESBRuntime will be enough.
      IKarafRuntime karafRuntime = (IKarafRuntime) workingCopy
          .loadAdapter(IKarafRuntime.class, new NullProgressMonitor());
      if (karafRuntime != null) {
        IPath loc = karafRuntime.getLocation();
        model.setKarafInstallDir(loc == null ? null : loc.toOSString());
      }
View Full Code Here

Examples of org.eclipse.wst.server.core.IRuntimeWorkingCopy

  /**
   * This updates the runtime.
   */
  private void updateRuntime() {
    IRuntimeWorkingCopy workingCopy = getRuntimeWorkingCopy();
    if (workingCopy != null) {
      // workCopy will be instance of ServerDelegate classs.
      // We need to get the params, so IKarafRuntime will be enough.
      IKarafRuntimeWorkingCopy karafRuntimeWorkingCopy = (IKarafRuntimeWorkingCopy) workingCopy
          .loadAdapter(IKarafRuntimeWorkingCopy.class,
              new NullProgressMonitor());
      if (karafRuntimeWorkingCopy != null) {
        String installDir = model.getKarafInstallDir();
        IPath path = new Path(installDir);
        workingCopy.setLocation(path);
      }
    }
    try {
      workingCopy.save(true, new NullProgressMonitor());
    } catch (CoreException e) {
      Activator.getLogger().error(e);
    }
  }
View Full Code Here

Examples of org.eclipse.wst.server.core.IRuntimeWorkingCopy

    return composite != null ? composite.isValid() : true;
  }

  public void enter() {
    if (composite != null && composite.isDisposed() == false) {
      IRuntimeWorkingCopy runtime = (IRuntimeWorkingCopy) getTaskModel()
          .getObject(TaskModel.TASK_RUNTIME);
      composite.setRuntime(runtime);
    }
  }
View Full Code Here

Examples of org.eclipse.wst.server.core.IRuntimeWorkingCopy

    if( rtType == null )
      return;
   
    try {
      IPath locPath = new Path(loc.getAbsolutePath());
      IRuntimeWorkingCopy rt = rtType.createRuntime(runtimeName, new NullProgressMonitor());
      rt.setLocation(locPath);
      rt.setName(runtimeName);
      // We don't need to set a vm, it can use default
      rt.save(true, new NullProgressMonitor());
      // TODO create the server also
    } catch(CoreException ce) {
      Activator.getLogger().error(ce);
    }
  }
View Full Code Here

Examples of org.eclipse.wst.server.core.IRuntimeWorkingCopy

    if( rtType == null )
      return;
   
    try {
      IPath locPath = new Path(loc.getAbsolutePath());
      IRuntimeWorkingCopy rt = rtType.createRuntime(runtimeName, new NullProgressMonitor());
      rt.setLocation(locPath);
      rt.setName(runtimeName);
      // We don't need to set a vm, it can use default
      rt.save(true, new NullProgressMonitor());
     
     
      // TODO create the server also
    } catch(CoreException ce) {
      Activator.getLogger().error(ce);
View Full Code Here

Examples of org.eclipse.wst.server.core.IRuntimeWorkingCopy

   * @return
   */
  private boolean checkRuntime(File karafHome, IRuntimeSearchListener listener,
      IProgressMonitor monitor) {
    monitor.beginTask("Examine possible Apache Karaf installation at " + karafHome.getPath() + "...", IProgressMonitor.UNKNOWN);
    IRuntimeWorkingCopy runtime = getRuntimeFromDir(karafHome, monitor);
    monitor.worked(1);
    if (runtime != null) {
      listener.runtimeFound(runtime);
      return true;
    }
View Full Code Here

Examples of org.eclipse.wst.server.core.IRuntimeWorkingCopy

          if( serverType != null ) {
            IServerType t = ServerCore.findServerType(serverType);
            if( t != null ) {
              IRuntimeType rtt = t.getRuntimeType();
              try {
                IRuntimeWorkingCopy runtime = rtt.createRuntime(rtt.getId(), monitor);
                // commented out the naming of the runtime as it seems to break server to runtime links
                runtime.setName(dir.getName());
                runtime.setLocation(new Path(absolutePath));
                IStatus status = runtime.validate(monitor);
                if (status == null || status.getSeverity() != IStatus.ERROR) {
                  return runtime;
                }
              } catch (Exception e) {
                Activator.getLogger().error(e);
View Full Code Here

Examples of org.eclipse.wst.server.core.IRuntimeWorkingCopy

          if( serverType != null ) {
            IServerType t = ServerCore.findServerType(serverType);
            if( t != null ) {
              IRuntimeType rtt = t.getRuntimeType();
              try {
                IRuntimeWorkingCopy runtime = rtt.createRuntime(rtt.getId(), monitor);
                // commented out the naming of the runtime as it seems to break server to runtime links
                runtime.setName(dir.getName());
                runtime.setLocation(new Path(absolutePath));
                IStatus status = runtime.validate(monitor);
                if (status == null || status.getSeverity() != IStatus.ERROR) {
                  return runtime;
                }
              } catch (Exception e) {
                Activator.getLogger().error(e);
View Full Code Here

Examples of org.eclipse.wst.server.core.IRuntimeWorkingCopy

    if( rtType == null )
      return;
   
    try {
      IPath locPath = new Path(loc.getAbsolutePath());
      IRuntimeWorkingCopy rt = rtType.createRuntime(runtimeName, new NullProgressMonitor());
      rt.setLocation(locPath);
      rt.setName(runtimeName);
      // We don't need to set a vm, it can use default
      rt.save(true, new NullProgressMonitor());
      // TODO create the server also
    } catch(CoreException ce) {
      Activator.getLogger().error(ce);
    }
  }
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.