diff options
author | Marc Khouzam | 2012-01-27 16:40:14 +0000 |
---|---|---|
committer | Marc Khouzam | 2012-01-27 16:45:07 +0000 |
commit | 1928101334b17b7a97e4651d95dec114669cabec (patch) | |
tree | 6eb566a02c4f0c888904d09f793729da6a54e44f /cross/org.eclipse.cdt.launch.remote | |
parent | 55e8d9f684deae4dcc13a28b0513bac5db7f927a (diff) | |
download | org.eclipse.cdt-1928101334b17b7a97e4651d95dec114669cabec.tar.gz org.eclipse.cdt-1928101334b17b7a97e4651d95dec114669cabec.tar.xz org.eclipse.cdt-1928101334b17b7a97e4651d95dec114669cabec.zip |
Fix of indentation.
Diffstat (limited to 'cross/org.eclipse.cdt.launch.remote')
2 files changed, 137 insertions, 137 deletions
diff --git a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteGdbLaunchDelegate.java b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteGdbLaunchDelegate.java index 04f188d68f0..79b5907a4d3 100644 --- a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteGdbLaunchDelegate.java +++ b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteGdbLaunchDelegate.java @@ -131,44 +131,44 @@ public class RemoteGdbLaunchDelegate extends GdbLaunchDelegate { } }); - try { - remoteShellProcess = new HostShellProcessAdapter(remoteShell) { - - @Override - public synchronized void destroy() { - final DsfSession session = l.getSession(); - if (session != null) { - try { - session.getExecutor().execute(new DsfRunnable() { - public void run() { - DsfServicesTracker tracker = new DsfServicesTracker( - Activator.getBundleContext(), - session.getId()); - IGDBControl control = tracker - .getService(IGDBControl.class); - if (control != null) { - control.terminate(new ImmediateRequestMonitor()); + try { + remoteShellProcess = new HostShellProcessAdapter(remoteShell) { + + @Override + public synchronized void destroy() { + final DsfSession session = l.getSession(); + if (session != null) { + try { + session.getExecutor().execute(new DsfRunnable() { + public void run() { + DsfServicesTracker tracker = new DsfServicesTracker( + Activator.getBundleContext(), + session.getId()); + IGDBControl control = tracker + .getService(IGDBControl.class); + if (control != null) { + control.terminate(new ImmediateRequestMonitor()); + } + tracker.dispose(); } - tracker.dispose(); - } - }); - } catch (RejectedExecutionException e) { - // Session disposed. - } + }); + } catch (RejectedExecutionException e) { + // Session disposed. + } + } + super.destroy(); } - super.destroy(); + }; + } catch (Exception e) { + if (remoteShellProcess != null) { + remoteShellProcess.destroy(); } - }; - } catch (Exception e) { - if (remoteShellProcess != null) { - remoteShellProcess.destroy(); + RSEHelper.abort(Messages.RemoteRunLaunchDelegate_7, e, + ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR); } - RSEHelper.abort(Messages.RemoteRunLaunchDelegate_7, e, - ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR); - } - IProcess iProcess = DebugPlugin.newProcess(launch, remoteShellProcess, - Messages.RemoteRunLaunchDelegate_RemoteShell); + IProcess iProcess = DebugPlugin.newProcess(launch, remoteShellProcess, + Messages.RemoteRunLaunchDelegate_RemoteShell); // Now wait until gdbserver is up and running on the remote host synchronized (lock) { @@ -188,30 +188,30 @@ public class RemoteGdbLaunchDelegate extends GdbLaunchDelegate { } } - // 3. Let debugger know how gdbserver was started on the remote - ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy(); - wc.setAttribute(IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP, - true); - wc.setAttribute(IGDBLaunchConfigurationConstants.ATTR_HOST, - RSEHelper.getRemoteHostname(config)); - wc.setAttribute(IGDBLaunchConfigurationConstants.ATTR_PORT, - gdbserverPortNumber); - wc.doSave(); + // 3. Let debugger know how gdbserver was started on the remote + ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy(); + wc.setAttribute(IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP, + true); + wc.setAttribute(IGDBLaunchConfigurationConstants.ATTR_HOST, + RSEHelper.getRemoteHostname(config)); + wc.setAttribute(IGDBLaunchConfigurationConstants.ATTR_PORT, + gdbserverPortNumber); + wc.doSave(); - } - try{ - super.launch(config, mode, launch, monitor); - } catch(CoreException ex) { - //launch failed, need to kill gdbserver - if (remoteShellProcess != null) { - remoteShellProcess.destroy(); } - - //report failure further - throw ex; - } finally { - monitor.done(); - } + try{ + super.launch(config, mode, launch, monitor); + } catch(CoreException ex) { + //launch failed, need to kill gdbserver + if (remoteShellProcess != null) { + remoteShellProcess.destroy(); + } + + //report failure further + throw ex; + } finally { + monitor.done(); + } } } diff --git a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteRunLaunchDelegate.java b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteRunLaunchDelegate.java index cff7acee2a5..e0b26e7c923 100644 --- a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteRunLaunchDelegate.java +++ b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteRunLaunchDelegate.java @@ -156,46 +156,46 @@ public class RemoteRunLaunchDelegate extends AbstractCLaunchDelegate { final Object lock = new Object(); if (remoteShell != null) { remoteShell - .addOutputListener(new IHostShellOutputListener() { + .addOutputListener(new IHostShellOutputListener() { - public void shellOutputChanged( - IHostShellChangeEvent event) { - for (IHostOutput line : event - .getLines()) { - if (line.getString().contains( - "Listening on port")) { //$NON-NLS-1$ - synchronized (lock) { - gdbServerReady[0] = true; - lock.notifyAll(); - } - break; - } + public void shellOutputChanged( + IHostShellChangeEvent event) { + for (IHostOutput line : event + .getLines()) { + if (line.getString().contains( + "Listening on port")) { //$NON-NLS-1$ + synchronized (lock) { + gdbServerReady[0] = true; + lock.notifyAll(); } + break; } - }); + } + } + }); - try { - remoteShellProcess = new HostShellProcessAdapter(remoteShell) { + try { + remoteShellProcess = new HostShellProcessAdapter(remoteShell) { - @Override - public synchronized void destroy() { - ICDISession session = getSession(); - if (session != null) { - try { - session.terminate(); - } catch (CDIException e) { + @Override + public synchronized void destroy() { + ICDISession session = getSession(); + if (session != null) { + try { + session.terminate(); + } catch (CDIException e) { + } } + super.destroy(); } - super.destroy(); + }; + } catch (Exception e) { + if (remoteShellProcess != null) { + remoteShellProcess.destroy(); } - }; - } catch (Exception e) { - if (remoteShellProcess != null) { - remoteShellProcess.destroy(); + RSEHelper.abort(Messages.RemoteRunLaunchDelegate_7, e, + ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR); } - RSEHelper.abort(Messages.RemoteRunLaunchDelegate_7, e, - ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR); - } IProcess rsProcess = DebugPlugin .newProcess( launch, @@ -218,62 +218,62 @@ public class RemoteRunLaunchDelegate extends AbstractCLaunchDelegate { } } - // Pre-set configuration constants for the - // GDBSERVERCDIDebugger to indicate how the gdbserver - // was automatically started on the remote. - // GDBServerCDIDebugger uses these to figure out how - // to connect to the remote gdbserver. - ILaunchConfigurationWorkingCopy wc = config - .getWorkingCopy(); - wc - .setAttribute( - IGDBServerMILaunchConfigurationConstants.ATTR_REMOTE_TCP, - true); - wc - .setAttribute( - IGDBServerMILaunchConfigurationConstants.ATTR_HOST, - RSEHelper.getRemoteHostname(config)); - wc - .setAttribute( - IGDBServerMILaunchConfigurationConstants.ATTR_PORT, - gdbserver_port_number); - wc.doSave(); + // Pre-set configuration constants for the + // GDBSERVERCDIDebugger to indicate how the gdbserver + // was automatically started on the remote. + // GDBServerCDIDebugger uses these to figure out how + // to connect to the remote gdbserver. + ILaunchConfigurationWorkingCopy wc = config + .getWorkingCopy(); + wc + .setAttribute( + IGDBServerMILaunchConfigurationConstants.ATTR_REMOTE_TCP, + true); + wc + .setAttribute( + IGDBServerMILaunchConfigurationConstants.ATTR_HOST, + RSEHelper.getRemoteHostname(config)); + wc + .setAttribute( + IGDBServerMILaunchConfigurationConstants.ATTR_PORT, + gdbserver_port_number); + wc.doSave(); - // Default to using the GDBServerCDIDebugger. - GDBServerCDIDebugger2 debugger = new GDBServerCDIDebugger2(); - dsession = ((ICDIDebugger2) debugger).createSession( - launch, exePath.toFile(), - new SubProgressMonitor(monitor, 15)); + // Default to using the GDBServerCDIDebugger. + GDBServerCDIDebugger2 debugger = new GDBServerCDIDebugger2(); + dsession = ((ICDIDebugger2) debugger).createSession( + launch, exePath.toFile(), + new SubProgressMonitor(monitor, 15)); - boolean stopInMain = config - .getAttribute( - ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, - false); - String stopSymbol = null; - if (stopInMain) - stopSymbol = launch - .getLaunchConfiguration() + boolean stopInMain = config .getAttribute( - ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, - ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT); + ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, + false); + String stopSymbol = null; + if (stopInMain) + stopSymbol = launch + .getLaunchConfiguration() + .getAttribute( + ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, + ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT); - ICDITarget[] targets = dsession.getTargets(); - for (int i = 0; i < targets.length; i++) { - Process process = targets[i].getProcess(); - IProcess iprocess = null; - if (process != null) { - iprocess = DebugPlugin.newProcess(launch, - process, renderProcessLabel(exePath - .toOSString()), - getDefaultProcessMap()); + ICDITarget[] targets = dsession.getTargets(); + for (int i = 0; i < targets.length; i++) { + Process process = targets[i].getProcess(); + IProcess iprocess = null; + if (process != null) { + iprocess = DebugPlugin.newProcess(launch, + process, renderProcessLabel(exePath + .toOSString()), + getDefaultProcessMap()); + } + CDIDebugModel.newDebugTarget(launch, project + .getProject(), + targets[i], + renderProcessLabel("gdbserver debugger"), //$NON-NLS-1$ + iprocess, exeFile, true, false, stopSymbol, + true); } - CDIDebugModel.newDebugTarget(launch, project - .getProject(), - targets[i], - renderProcessLabel("gdbserver debugger"), //$NON-NLS-1$ - iprocess, exeFile, true, false, stopSymbol, - true); - } } } catch (CoreException e) { try { |