Examples of IProcess


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

                boolean _equals = (_kind == DebugEvent.TERMINATE);
                _and = _equals;
              }
              if (_and) {
                Object _source_1 = event.getSource();
                final IProcess process = ((IProcess) _source_1);
                ILaunch _launch = process.getLaunch();
                ILaunchConfiguration _launchConfiguration = _launch.getLaunchConfiguration();
                boolean _equals_1 = Objects.equal(configuration, _launchConfiguration);
                if (_equals_1) {
                  DebugPlugin _default = DebugPlugin.getDefault();
                  _default.removeDebugEventListener(this);
View Full Code Here

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

            disposeThreadHandler();
            VirtualMachine vm = getVM();
            if ( vm != null ) {
                vm.exit( 1 );
            }
            IProcess process = getProcess();
            if ( process != null ) {
                process.terminate();
            }
        } catch ( VMDisconnectedException e ) {
            // if the VM disconnects while exiting, perform
            // normal termination processing
            terminated();
        } catch ( TimeoutException exception ) {
            // if there is a timeout see if the associated process is terminated
            IProcess process = getProcess();
            if ( process != null && process.isTerminated() ) {
                terminated();
            } else {
                // All we can do is disconnect
                disconnected();
            }
View Full Code Here

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

                    p.destroy();
                    return;
                }
                java.util.Date date= new java.util.Date();
                Timestamp ts = new Timestamp(date.getTime());
                IProcess process= newProcess(launch, p, renderProcessLabel(cmdLine), getDefaultProcessMap());
                process.setAttribute(IProcess.ATTR_CMDLINE, renderCommandLineInternal(cmdLine));
                subMonitor.worked(1);
                subMonitor.subTask(LaunchingMessages.StandardVMDebugger_Establishing_debug_connection____5);
                boolean retry= false;
                do  {
                    try {
View Full Code Here

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

     *
     * @return a name for this console
     */
    protected String computeName() {
        String label = null;
        final IProcess process = getProcess();
        final ILaunchConfiguration config = process.getLaunch().getLaunchConfiguration();

        label = process.getAttribute(IProcess.ATTR_PROCESS_LABEL);
        if (label == null) {
            if (config == null) {
                label = process.getLabel();
            } else {
                // check if PRIVATE config
                if (DebugUITools.isPrivate(config)) {
                    label = process.getLabel();
                } else {
                    String type = null;
                    try {
                        type = config.getType().getName();
                    } catch (final CoreException e) {
                    }
                    final StringBuffer buffer = new StringBuffer();
                    buffer.append("Remote shell connection to: ");
                    buffer.append(config.getName());
                    if (type != null) {
                        buffer.append(" ["); //$NON-NLS-1$
                        buffer.append(type);
                        buffer.append("] "); //$NON-NLS-1$
                    }
                    buffer.append(process.getLabel());
                    label = buffer.toString();
                }
            }
        }

        if (process.isTerminated()) {
            return MessageFormat.format("<disconnected> {0}", (Object[]) new String[] { label });
        }
        return label;
    }
View Full Code Here

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

     *
     * @param launch
     *            the launch process
     */
    private IDebugEventSetListener getDebugEventListener(final ILaunch launch) throws CoreException {
        final IProcess process = launch.getProcesses()[0];

        final String memento =
            launch.getLaunchConfiguration().getMemento();

        return new IDebugEventSetListener() {
            @Override
            public void handleDebugEvents(final DebugEvent[] events) {
                if (events == null) {
                    return;
                }

                for (final DebugEvent event : events) {
                    if (   process != null
                        && process.equals(event.getSource())
                        && event.getKind() == DebugEvent.TERMINATE)
                    {
                        final JMXServiceDescriptor descriptor = mbeanProviderDataMap.get(memento).getJmxServiceDescriptor();
                        jmxServiceManager.remove(descriptor);

View Full Code Here

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

      // grab the JMX information
      String jmxUrl = configuration.getAttribute(ICamelDebugConstants.ATTR_JMX_URI_ID, ICamelDebugConstants.DEFAULT_JMX_URI);
      String jmxUser = configuration.getAttribute(ICamelDebugConstants.ATTR_JMX_USER_ID, "");
      String jmxPass = getPassword(configuration);
         
      IProcess p = launch.getProcesses()[0];
      IDebugTarget target = new CamelDebugTarget(launch, p, jmxUrl, jmxUser, jmxPass);
      launch.addDebugTarget(target);
    }
  }
View Full Code Here

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

    if( beh != null && server.getServerState() == IServer.STATE_STARTED ) {
      // Find the IProcess
      try {
        Object o = beh.getSharedData(AbstractStartJavaServerLaunchDelegate.PROCESS);
        if( o instanceof IProcess ) {
          IProcess proc = (IProcess)o;
          ILaunch launch = proc.getLaunch();
          ILaunchConfiguration lc = launch.getLaunchConfiguration();
          progArgs = lc.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, (String)null);
          main = lc.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, (String)null);
        }
      } catch( CoreException ce) {
View Full Code Here

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

    ((ControllableServerBehavior)getControllableBehavior()).setServerStopped();
  }
 
 
  protected IProcess getProcess() {
    IProcess existing = (IProcess)getControllableBehavior().getSharedData(AbstractStartJavaServerLaunchDelegate.PROCESS);
    return existing;
  }
View Full Code Here

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

    if( beh != null && server.getServerState() == IServer.STATE_STARTED ) {
      // Find the IProcess
      try {
        Object o = beh.getSharedData(AbstractStartJavaServerLaunchDelegate.PROCESS);
        if( o instanceof IProcess ) {
          IProcess proc = (IProcess)o;
          ILaunch launch = proc.getLaunch();
          ILaunchConfiguration lc = launch.getLaunchConfiguration();
          progArgs = lc.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, (String)null);
          main = lc.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, (String)null);
        }
      } catch( CoreException ce) {
View Full Code Here

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

    public void init(IPageBookViewPage page, final IConsole console) {
        if (!(console instanceof ProcessConsole)) {
            return;
        }
        ProcessConsole processConsole = (ProcessConsole) console;
        IProcess process = processConsole.getProcess();
        if (process == null) {
            return;
        }
        if (!PyCodeCompletionPreferencesPage.useCodeCompletion()
                || !PyCodeCompletionPreferencesPage.useCodeCompletionOnDebug()) {
            return;
        }
        String attribute = process.getAttribute(Constants.PYDEV_DEBUG_IPROCESS_ATTR);
        if (!Constants.PYDEV_DEBUG_IPROCESS_ATTR_TRUE.equals(attribute)) {
            //Only provide code-completion for pydev debug processes.
            return;
        }
        Control control = page.getControl();
        if (page instanceof IOConsolePage) {

            //Note that completions on "all letters and '_'" are already activated just by installing
            //the content assist, but the completions on the default keybinding is not, so, we have to
            //call it ourselves here.
            control.addKeyListener(new KeyListener() {
                public void keyPressed(KeyEvent e) {

                    if (KeyBindingHelper.matchesContentAssistKeybinding(e)) {
                        contentAssist.showPossibleCompletions();
                    }
                }

                public void keyReleased(KeyEvent e) {
                }
            });

            IOConsolePage consolePage = (IOConsolePage) page;
            TextConsoleViewer viewer = consolePage.getViewer();

            contentAssist = new PyContentAssistant() {
                public String showPossibleCompletions() {
                    //Only show completions if we're in a suspended console.
                    if (getCurrentSuspendedPyStackFrame(console) == null) {
                        return null;
                    }
                    return super.showPossibleCompletions();
                };
            };
            contentAssist.setInformationControlCreator(PyContentAssistant.createInformationControlCreator(viewer));
            ILaunch launch = process.getLaunch();
            IDebugTarget debugTarget = launch.getDebugTarget();
            IInterpreterInfo projectInterpreter = null;
            if (debugTarget instanceof PyDebugTarget) {
                PyDebugTarget pyDebugTarget = (PyDebugTarget) debugTarget;
                PythonNature nature = PythonNature.getPythonNature(pyDebugTarget.project);
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.