Examples of IProcess


Examples of org.eclipse.debug.core.model.IProcess

    public void handleDebugEvents(DebugEvent[] events) {
        if (!reachable) return;
        for (int i = 0; i < events.length; i++) {
            Object source = events[i].getSource();
            if (source instanceof IProcess) {
                IProcess process = (IProcess) source;
                if (process.getLaunch() == launch) setUnreachable();
            }
        }
    }
View Full Code Here

Examples of org.eclipse.debug.core.model.IProcess

        try
        {           
            CGIProxy cgiProxy = new CGIProxy(launch, "CGI Process");
            int brazilPort = RemotePort.findFreePort();

            IProcess process = startBrazil(
                launch, cgiProxy, brazilPort, debugPort);
           
            cgiProxy.waitForConnect();
            if (!cgiProxy.isConnected())
            {
View Full Code Here

Examples of org.eclipse.debug.core.model.IProcess

  public void stop(boolean force) {
    IProcess[] processes = launch.getProcesses();
    if (processes!=null) {
      for (int i = 0; i < processes.length; i++) {
        IProcess iProcess = processes[i];
        try {
          iProcess.terminate();
        } catch (DebugException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
      }
View Full Code Here

Examples of org.eclipse.debug.core.model.IProcess

        return null;
    }

    @Override
    public ShowInContext getShowInContext() {
        final IProcess process = getProcess();
        if (process == null) {
            return null;
        }
        final IDebugTarget target = (IDebugTarget) process.getAdapter(IDebugTarget.class);
        ISelection selection = null;
        if (target == null) {
            selection = new TreeSelection(new TreePath(new Object[] {
                    DebugPlugin.getDefault().getLaunchManager(), process.getLaunch(),
                    process }));
        } else {
            selection = new TreeSelection(new TreePath(new Object[] {
                    DebugPlugin.getDefault().getLaunchManager(), target.getLaunch(),
                    target }));
View Full Code Here

Examples of org.eclipse.debug.core.model.IProcess

    }

    @Override
    public void debugContextChanged(final DebugContextEvent event) {
        if ((event.getFlags() & DebugContextEvent.ACTIVATED) > 0) {
            final IProcess process = getProcess();
            if (fView != null && process != null
                    && process.equals(DebugUITools.getCurrentProcess())) {
                fView.display(fConsole);
            }
        }

    }
View Full Code Here

Examples of org.eclipse.debug.core.model.IProcess

            final ToolResults result = new ToolResults();
            if (myLaunch.getProcesses().length == 0) {
                ErlLogger.error("Tool process was not created?!");
                return null;
            }
            final IProcess process = myLaunch.getProcesses()[0];
            process.getStreamsProxy().getOutputStreamMonitor()
                    .addListener(new IStreamListener() {

                        @Override
                        public void streamAppended(final String text,
                                final IStreamMonitor mon) {
                            anyOutput = true;
                            notifyOutput(progressCallback, text);
                        }

                    });
            process.getStreamsProxy().getErrorStreamMonitor()
                    .addListener(new IStreamListener() {

                        @Override
                        public void streamAppended(final String text,
                                final IStreamMonitor mon) {
                            anyError = true;
                            notifyError(progressCallback, text);
                        }
                    });
            boolean done = false;
            final boolean canceled = notifier != null && notifier.isCanceled();
            while (!done && !canceled) {
                try {
                    result.exit = process.getExitValue();
                    done = true;
                } catch (final Exception e) {
                    try {
                        Thread.sleep(60);
                    } catch (final InterruptedException e1) {
                    }
                }
            }

            if (!anyOutput) {
                final String text = process.getStreamsProxy().getOutputStreamMonitor()
                        .getContents();
                notifyOutput(progressCallback, text);
            }
            if (!anyError) {
                final String text = process.getStreamsProxy().getErrorStreamMonitor()
                        .getContents();
                notifyError(progressCallback, text);
            }

            if (canceled) {
                process.terminate();
            }
            return result;
        } catch (final CoreException e) {
            ErlLogger.error(e);
            return null;
View Full Code Here

Examples of org.eclipse.debug.core.model.IProcess

        super.dispose();
    }

    @Override
    protected IStreamsProxy getStreamsProxy() {
        final IProcess p = getIProcess();
        if (p == null) {
            return null;
        }
        return p.getStreamsProxy();
    }
View Full Code Here

Examples of org.eclipse.debug.core.model.IProcess

            erts = new ErtsProcess(data);
            erts.startUp();

            if (data.getLaunch() != null) {
                final Map<String, String> map = Maps.newHashMap();
                final IProcess proc = DebugPlugin.newProcess(data.getLaunch(),
                        erts.getProcess(), data.getNodeName(), map);

                ErlLogger.debug("@@@ Started erts: %s >> %s", proc.getLabel(),
                        data.getNodeName());
            }
        } else {
            erts = null;
        }
View Full Code Here

Examples of org.eclipse.debug.core.model.IProcess

                    final ErlangDebugElement d = (ErlangDebugElement) o;
                    fLaunch = d.getLaunch();
                } else if (o instanceof ILaunch) {
                    fLaunch = (ILaunch) o;
                } else if (o instanceof IProcess) {
                    final IProcess p = (IProcess) o;
                    fLaunch = p.getLaunch();
                }
            }
        }
    }
View Full Code Here

Examples of org.eclipse.debug.core.model.IProcess

    @Override
    public void handleDebugEvents(DebugEvent[] events) {
      for (DebugEvent e : events) {
        if (e.getSource() instanceof IProcess) {
          IProcess process = (IProcess) e.getSource();
          ILaunch launch = process.getLaunch();
          String configName = launch.getLaunchConfiguration().getName();
          launches.put(configName, launch);

          if (e.getKind() == DebugEvent.CREATE) {
            creationTimes.put(configName, System.currentTimeMillis());
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.