Examples of IRuntime


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

      m.put("key", "generic_server_instance_properties");
      m.putAll(runtimeProperties);
      rwc.setAttribute("generic_server_instance_properties", m);
      rwc.setAttribute("runtime-type-id", runtimeType.getId());
      rwc.setAttribute("server_definition_id", serverRuntime.getId());
      final IRuntime runtime = rwc.save(true, monitor);

      System.out.println("Server runtime created: " + runtime.getName());

      System.out.println("Creating server instance...");

      final ServerWorkingCopy swc = (ServerWorkingCopy) serverType.createServer(null, null, runtime, monitor);
      swc.setName(serverName + " GENERATED");
View Full Code Here

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

        if (plan != null) {
        IProject project = plan.getProject();
        try {
          IFacetedProject fp = ProjectFacetsManager.create(project);
          if (fp == null) return null;
          IRuntime runtime = FacetUtil.getRuntime(fp.getPrimaryRuntime());
          if (runtime == null) return null;
          String version = runtime.getRuntimeType().getVersion();
          provider = (IJAXBUtilsProvider) providers.get(version);
        } catch (CoreException e) {
                    Trace.tracePoint("CoreException", "JAXBUtils.getProvider");
          e.printStackTrace();
        } catch (IllegalArgumentException ie) {
View Full Code Here

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

        addDownloadServerSection(composite);
    }

    protected void addDownloadServerSection(final Composite composite) {
    FormText downloadServerText = new FormText(composite, SWT.WRAP);
    IRuntime runtime = getRuntimeDelegate().getRuntime();
    String runtimeName = runtime.getRuntimeType().getName();
    String text = "<form>"
        + Messages.bind(Messages.DownloadServerText,
            Messages.DownloadServerURL, runtimeName) + "</form>";
    downloadServerText.setText(text, true, true);
    GridData data = new GridData();
View Full Code Here

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

        return status == null || status.getSeverity() != IStatus.ERROR;
    }

    protected void validate() {

        IRuntime runtime = getRuntimeDelegate().getRuntime();

        String runtimeName = runtime.getRuntimeType().getName();

        IWizardHandle wizard = getWizard();

        if (runtime == null) {
            wizard.setMessage("", IMessageProvider.ERROR);
View Full Code Here

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

      if (input instanceof IFileEditorInput) {
        IProject project = ((IFileEditorInput) input).getFile().getProject();
        try {
          IFacetedProject fp = ProjectFacetsManager.create(project);
          if (fp == null) return null;
          IRuntime runtime = FacetUtil.getRuntime(fp.getPrimaryRuntime());
          if (runtime == null) return null;
          String version = runtime.getRuntimeType().getVersion();
          currentLoader = (IGeronimoFormContentLoader) loaders.get(version);
        } catch (CoreException e) {
                    Trace.tracePoint("CoreException", "SharedDeploymentPlanEditor.getLoader");
          e.printStackTrace();
        } catch (IllegalArgumentException ie) {
View Full Code Here

Examples of org.jacoco.core.runtime.IRuntime

    source = Source.getSourceFor(target);
  }

  private ExecutionDataStore execute(final ClassReader reader)
      throws Exception {
    IRuntime runtime = new SystemPropertiesRuntime();
    runtime.startup();
    final byte[] bytes = new Instrumenter(runtime).instrument(reader);
    final TargetLoader loader = new TargetLoader(target, bytes);
    run(loader.getTargetClass());
    final ExecutionDataStore store = new ExecutionDataStore();
    runtime.collect(store, false);
    runtime.shutdown();
    return store;
  }
View Full Code Here

Examples of org.jacoco.core.runtime.IRuntime

  private void runTutorial() throws Exception {
    final String targetName = TestTarget.class.getName();

    // For instrumentation and runtime we need a IRuntime instance
    // to collect execution data:
    final IRuntime runtime = new LoggerRuntime();

    // The Instrumenter creates a modified version of our test target class
    // that contains additional probes for execution data recording:
    final Instrumenter instr = new Instrumenter(runtime);
    final byte[] instrumented = instr
        .instrument(getTargetClass(targetName));

    // Now we're ready to run our instrumented class and need to startup the
    // runtime first:
    runtime.startup();

    // In this tutorial we use a special class loader to directly load the
    // instrumented class definition from a byte[] instances.
    final MemoryClassLoader memoryClassLoader = new MemoryClassLoader();
    memoryClassLoader.addDefinition(targetName, instrumented);
    final Class<?> targetClass = memoryClassLoader.loadClass(targetName);

    // Here we execute our test target class through its Runnable interface:
    final Runnable targetInstance = (Runnable) targetClass.newInstance();
    targetInstance.run();

    // At the end of test execution we collect execution data and shutdown
    // the runtime:
    final ExecutionDataStore executionData = new ExecutionDataStore();
    runtime.collect(executionData, null, false);
    runtime.shutdown();

    // Together with the original class definition we can calculate coverage
    // information:
    final CoverageBuilder coverageBuilder = new CoverageBuilder();
    final Analyzer analyzer = new Analyzer(executionData, coverageBuilder);
View Full Code Here

Examples of org.jacoco.core.runtime.IRuntime

  }

  @Override
  protected Runnable getInstrumentedRunnable() throws Exception {
    ClassReader reader = new ClassReader(TargetLoader.getClassData(target));
    IRuntime runtime = new LoggerRuntime();
    runtime.startup();
    final Instrumenter instr = new Instrumenter(runtime);
    final byte[] instrumentedBuffer = instr.instrument(reader);
    final TargetLoader loader = new TargetLoader(target, instrumentedBuffer);

    return (Runnable) loader.newTargetInstance();
View Full Code Here

Examples of org.jacoco.core.runtime.IRuntime

    final String targetName = TestTarget.class.getName();

    // For instrumentation and runtime we need a IRuntime instance
    // to collect execution data:
    final IRuntime runtime = new LoggerRuntime();

    // The Instrumenter creates a modified version of our test target class
    // that contains additional probes for execution data recording:
    final Instrumenter instr = new Instrumenter(runtime);
    final byte[] instrumented = instr
        .instrument(getTargetClass(targetName));

    // Now we're ready to run our instrumented class and need to startup the
    // runtime first:
    runtime.startup();

    // In this tutorial we use a special class loader to directly load the
    // instrumented class definition from a byte[] instances.
    final MemoryClassLoader memoryClassLoader = new MemoryClassLoader();
    memoryClassLoader.addDefinition(targetName, instrumented);
    final Class<?> targetClass = memoryClassLoader.loadClass(targetName);

    // Here we execute our test target class through its Runnable interface:
    final Runnable targetInstance = (Runnable) targetClass.newInstance();
    targetInstance.run();

    // At the end of test execution we collect execution data and shutdown
    // the runtime:
    final ExecutionDataStore executionData = new ExecutionDataStore();
    runtime.collect(executionData, null, false);
    runtime.shutdown();

    // Together with the original class definition we can calculate coverage
    // information:
    final CoverageBuilder coverageBuilder = new CoverageBuilder();
    final Analyzer analyzer = new Analyzer(executionData, coverageBuilder);
View Full Code Here

Examples of org.jacoco.core.runtime.IRuntime

  @Test
  public void testWriteData() throws Exception {
    AgentOptions options = new AgentOptions();
    options.setDestfile(coverageFile.getAbsolutePath());

    IRuntime runtime = new StubRuntime();

    LocalController controller = new LocalController();
    controller.startup(options, runtime);
    controller.writeExecutionData();
    controller.shutdown();
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.