Examples of IRuntimeWorkingCopy


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

      }
    });
  }
 
  private GeronimoRuntimeDelegate getRuntimeDelegate() {
    IRuntimeWorkingCopy wc = (IRuntimeWorkingCopy) getTaskModel().getObject(TaskModel.TASK_RUNTIME);
    if (wc == null)
      return null;
    return (GeronimoRuntimeDelegate) wc.loadAdapter(GeronimoRuntimeDelegate.class, new NullProgressMonitor());
  }
View Full Code Here

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

     * (non-Javadoc)
     *
     * @see org.eclipse.wst.server.ui.wizard.WizardFragment#isComplete()
     */
    public boolean isComplete() {
        IRuntimeWorkingCopy runtimeWC = getRuntimeDelegate().getRuntimeWorkingCopy();
        IStatus status = runtimeWC.validate(null);
        return status == null || status.getSeverity() != IStatus.ERROR;
    }
View Full Code Here

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

        if (runtime == null) {
            wizard.setMessage("", IMessageProvider.ERROR);
            return;
        }

        IRuntimeWorkingCopy runtimeWC = getRuntimeDelegate().getRuntimeWorkingCopy();
        getRuntimeDelegate().setInstanceProperty("serverRootDirectory", installDir.getText());

        if (installDir.getText() == null || installDir.getText().length() == 0) {
            // installDir field has not been entered
            wizard.setMessage(Messages.bind(Messages.installDirInfo, runtimeName), IMessageProvider.NONE);
        } else {
            IStatus status = runtimeWC.validate(null);
            if (status == null || status.isOK()) {
                // a valid install found
                wizard.setMessage(Messages.bind(Messages.serverDetected, runtimeName), IMessageProvider.NONE);
            } else if (status.getCode() == GeronimoRuntimeDelegate.INCORRECT_VERSION) {
                if (status.getSeverity() == IStatus.ERROR) {
View Full Code Here

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

    public void exit() {
        validate();
    }

    private GeronimoRuntimeDelegate getRuntimeDelegate() {
        IRuntimeWorkingCopy wc = (IRuntimeWorkingCopy) getTaskModel().getObject(TaskModel.TASK_RUNTIME);
        if (wc == null)
            return null;
        return (GeronimoRuntimeDelegate) wc.loadAdapter(GeronimoRuntimeDelegate.class, new NullProgressMonitor());
    }
View Full Code Here

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

     *            the progress monitor
     */
    private void searchDirectory(final File directory, final int depth,
            final IRuntimeSearchListener listener, final IProgressMonitor monitor) {

        final IRuntimeWorkingCopy runtime = resolveDirectoryToRuntime(directory, monitor);

        if (runtime != null) {
            listener.runtimeFound(runtime);
        }

View Full Code Here

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

                final IRuntimeType runtimeType = ServerCore.findRuntimeType(runtimeId);

                final String absolutePath = directory.getAbsolutePath();
                final String id = absolutePath.replace(File.separatorChar, '_').replace(':', '-');

                final IRuntimeWorkingCopy runtime = runtimeType.createRuntime(id, monitor);
                runtime.setName(directory.getName());
                runtime.setLocation(new Path(absolutePath));

                final IStatus status = runtime.validate(monitor);
                if (status == null || status.getSeverity() != IStatus.ERROR) {
                    return runtime;
                }

                // TODO: Log something?
View Full Code Here

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

    public void enter() {
        if (karafComposite == null) {
            return;
        }

        final IRuntimeWorkingCopy runtime = (IRuntimeWorkingCopy) getTaskModel().getObject(
                        TaskModel.TASK_RUNTIME);

        karafComposite.setKarafRuntimeWC(runtime);

    }
View Full Code Here

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

    }

    @Override
    public void exit() {
        final IRuntimeWorkingCopy runtime = (IRuntimeWorkingCopy) getTaskModel().getObject(
                        TaskModel.TASK_RUNTIME);

        if (runtime.validate(null).getSeverity() != IStatus.ERROR) {
            final IPath path = runtime.getLocation();

            // Save the runtime's location in the preferences area for this
            // plugin for easy retrieval
            KarafUIPluginActivator.getDefault().getPluginPreferences().setValue(
                            "location" + runtime.getRuntimeType().getId(), path.toString()); // $NON-NLS-1$
            KarafUIPluginActivator.getDefault().savePluginPreferences();
        }

    }
View Full Code Here

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

     * other names and the installation directory points to a valid Karaf
     * installation as determined by the {@code runtimeType} extension.
     */
    @Override
    public boolean isComplete() {
        final IRuntimeWorkingCopy runtime = (IRuntimeWorkingCopy) getTaskModel().getObject(
                        TaskModel.TASK_RUNTIME);

        if (runtime == null) {
            return false;
        }

        final IStatus status = runtime.validate(null);
        return (status == null || status.getSeverity() != IStatus.ERROR);
    }
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
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.