Examples of IRuntime


Examples of org.adoptopenjdk.jitwatch.sandbox.runtime.IRuntime

    return compiler;
  }

  private IRuntime getRuntime(String language, ISandboxLogListener logger)
  {
    IRuntime runtime = null;

    String runtimePath = logParser.getConfig().getVMLanguageRuntimePath(language);

    if (runtimePath != null && !S_EMPTY.equals(runtimePath))
    {
View Full Code Here

Examples of org.eclipse.wst.common.project.facet.core.runtime.IRuntime

    }
    return false;
  }

  public org.eclipse.wst.server.core.IRuntime getRuntime() {
    IRuntime runtime = (IRuntime) model.getProperty(IFacetProjectCreationDataModelProperties.FACET_RUNTIME);
    if (runtime != null) {
      return FacetUtil.getRuntime(runtime);
    }
    return null;
  }
View Full Code Here

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

      setImageDescriptor(banner);
    }
    this.cloudServer = cloudServer;

    // Is there an icon provide for the service, if so, use it
    IRuntime runtime = cloudServer.getServer().getRuntime();
    String runtimeTypeId = runtime.getRuntimeType().getId();

    ICloudFoundryServiceWizardIconProvider provider = CloudFoundryServiceWizardIconProviderRegistry.getInstance()
        .getIconProvider(runtimeTypeId);
    if (provider != null) {
      loader = new CFServiceWizardDynamicIconLoader(provider, this.cloudServer);
View Full Code Here

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

  public static ServerDescriptor getServerDescriptor(CloudFoundryServer server, String serverName) {
    ServerDescriptor descriptor = new ServerDescriptor("space server"); //$NON-NLS-1$
    // Loads the CF Server Runtime Adapter
    CloudFoundryServerRuntime cfServerRuntime = server.getRuntime();
    if (cfServerRuntime != null) {
      IRuntime runtime = cfServerRuntime.getRuntime();
      descriptor.setRuntimeTypeId(runtime.getRuntimeType().getId())// eg. "org.cloudfoundry.appcloudserver.runtime.10"
      descriptor.setRuntimeName(runtime.getName())// eg. "Cloud Foundry (Runtime) v1.0"
    }
    IServer iServer = server.getServer();
    if (iServer != null) {
      descriptor.setServerTypeId(iServer.getServerType().getId())// eg. "org.cloudfoundry.appcloudserver.10"
    }
View Full Code Here

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

        if (serverConfiguration != null) {
          serverConfiguration.delete(true, true, monitor);
        }
      }

      IRuntime runtime = ServerCore.findRuntime(runtimeName);
      if (runtime != null) {
        runtime.delete();
      }
    }
    finally {
      monitor.done();
    }
View Full Code Here

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

    return serverPath;
  }

  protected IRuntime createRuntime(IServerType st, IPath path, IProgressMonitor monitor, IOverwriteQuery query)
      throws CoreException {
    IRuntime runtime = ServerCore.findRuntime(runtimeName);
    if (runtime != null) {
      if (!query(query, NLS.bind(Messages.ServerHandler_QUERY_RUNTIME_EXISTS,
          runtimeName))) {
        monitor.worked(1);
        return runtime;
      }
      else {
        runtime.delete();
      }
    }
    IRuntimeWorkingCopy wc = st.getRuntimeType().createRuntime(runtimeName, new SubProgressMonitor(monitor, 1));
    wc.setName(runtimeName);
View Full Code Here

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

    try {
      IServerType st = ServerCore.findServerType(serverType);
      if (st == null) {
        return null;
      }
      IRuntime runtime;
      if (serverPath != null || forceCreateRuntime) {
        runtime = ServerCore.findRuntime(runtimeName);
        if (runtime == null) {
          return null;
        }
View Full Code Here

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

      IServerType st = ServerCore.findServerType(serverType);
      if (st == null) {
        throw new CoreException(CloudFoundryPlugin.getErrorStatus("Could not find server type \"" + serverType //$NON-NLS-1$
            + "\"")); //$NON-NLS-1$
      }
      IRuntime runtime;
      if (serverPath != null) {
        runtime = createRuntime(st, new Path(serverPath), monitor, query);
      }
      else if (forceCreateRuntime) {
        runtime = createRuntime(st, null, monitor, query);
View Full Code Here

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

    if (useExistingServer.getSelection()) {
            return existingServerCombo.getServer();
    } else {
      IServerType serverType = ServerCore.findServerType("org.apache.sling.ide.launchpadServer");
      @SuppressWarnings("unused")
      IRuntime existingRuntime = null;//ServerCore.findRuntime("org.apache.sling.ide.launchpadRuntimeType");
      IRuntime[] existingRuntimes = ServerCore.getRuntimes();
      for (int i = 0; i < existingRuntimes.length; i++) {
        IRuntime aRuntime = existingRuntimes[i];
        if (aRuntime.getRuntimeType().getId().equals("org.apache.sling.ide.launchpadRuntimeType")) {
          existingRuntime = aRuntime;
        }
      }
     
            Version finalVersion = null;
     
      if (installToolingSupportBundle.getSelection()) {
                Version installedVersion;
                try {
                    installedVersion = getToolingSupportBundleVersion();
                } catch (OsgiClientException e) {
                    throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID,
                            "Failed reading the tooling support bundle version", e));
                }
                finalVersion = installedVersion;
                EmbeddedArtifactLocator artifactsLocator = Activator.getDefault().getArtifactLocator();
                EmbeddedArtifact toolingSupportBundle = artifactsLocator.loadToolingSupportBundle();
                Version ourVersion = new Version(toolingSupportBundle.getVersion());

                if (installedVersion == null || ourVersion.compareTo(installedVersion) > 0) {
          // then auto-install it if possible
          try {

                        InputStream contents = null;
                        try {
                            contents = toolingSupportBundle.openInputStream();
                            newOsgiClient().installBundle(contents, toolingSupportBundle.getName());
                        } finally {
                            IOUtils.closeQuietly(contents);
                        }
                        finalVersion = ourVersion;
          } catch (IOException e) {
                        throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID,
                                "Failed installing the tooling support bundle version", e));
                    } catch (OsgiClientException e) {
                        throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID,
                                "Failed installing the tooling support bundle version", e));
                    }
        }
      }
     
      IRuntimeType serverRuntime = ServerCore.findRuntimeType("org.apache.sling.ide.launchpadRuntimeType");
      try {
                // TODO there should be a nicer API for creating this, and also a central place for defaults
                // TODO - we should not be creating runtimes, but maybe matching against existing ones
                IRuntime runtime = serverRuntime.createRuntime(null, monitor);
                runtime = runtime.createWorkingCopy().save(true, monitor);
                IServerWorkingCopy wc = serverType.createServer(null, null, runtime, monitor);
        wc.setHost(getHostname());
                wc.setName(newServerName.getText());
        wc.setAttribute(ISlingLaunchpadServer.PROP_PORT, getPort());
        wc.setAttribute(ISlingLaunchpadServer.PROP_DEBUG_PORT, Integer.parseInt(newServerDebugPort.getText()));
View Full Code Here

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

        .findRuntimeType("org.eclipse.wst.server.preview.runtime"); //$NON-NLS-1$

    IRuntimeWorkingCopy runtimeCopy = runtimeType.createRuntime(
        "HTTP Preview", mon); //$NON-NLS-1$

    IRuntime runtime = runtimeCopy.save(true, mon);

    IServerType serverType = ServerCore
        .findServerType("org.eclipse.wst.server.preview.server"); //$NON-NLS-1$

    IServerWorkingCopy workingCopy = serverType.createServer(
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.