Skip to main content
summaryrefslogtreecommitdiffstats
path: root/remote
diff options
context:
space:
mode:
authorJonah Graham2018-11-20 11:20:42 -0500
committerJonah Graham2018-11-22 16:47:02 -0500
commit170e654b4796bad1453ae85a427b97317d67a69a (patch)
tree6ca9b8a8fedd5fd25f97eb79c408312e256ff981 /remote
parent35996a5c5ca5c254959ba48241eaada6dbf8628d (diff)
downloadorg.eclipse.cdt-170e654b4796bad1453ae85a427b97317d67a69a.tar.gz
org.eclipse.cdt-170e654b4796bad1453ae85a427b97317d67a69a.tar.xz
org.eclipse.cdt-170e654b4796bad1453ae85a427b97317d67a69a.zip
Bug 540373: Cleanup: Format & Remove trailing whitespace
This was done by selecting all projects in Eclipse then Source -> Clean Up... -> choosing: - Format source code - Remove trailing white spaces on all lines and completing the wizard Change-Id: I63685372c6bcc67719bcf145123bcb72e5b00394
Diffstat (limited to 'remote')
-rw-r--r--remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/core/RemoteCommandLauncher.java40
-rw-r--r--remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/core/RemoteProcessClosure.java2
-rw-r--r--remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/internal/core/Activator.java6
3 files changed, 24 insertions, 24 deletions
diff --git a/remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/core/RemoteCommandLauncher.java b/remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/core/RemoteCommandLauncher.java
index cc47065b41..97c2ec2eac 100644
--- a/remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/core/RemoteCommandLauncher.java
+++ b/remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/core/RemoteCommandLauncher.java
@@ -42,19 +42,19 @@ import org.eclipse.remote.core.IRemoteServicesManager;
import org.eclipse.remote.core.RemoteProcessAdapter;
public class RemoteCommandLauncher implements ICommandLauncher {
-
+
private static final String CYGWIN_PREFIX = "cygdrive"; //$NON-NLS-1$
-
+
private boolean usingLocalLauncher = false;
/**
* Convert a local (workspace) path into the remote equivalent. If the local path is not
* absolute, then do nothing.
- *
+ *
* e.g. Suppose the local path is /u/local_user/workspace/local_project/subdir1/subdir2
* Suppose the remote project location is /home/remote_user/remote_project
* Then the resulting path will be /home/remote_user/remote_project/subdir1/subdir2
- *
+ *
* @param localPath absolute local path in the workspace
* @param remote remote project
* @return remote path that is the equivalent of the local path
@@ -62,15 +62,15 @@ public class RemoteCommandLauncher implements ICommandLauncher {
public static String makeRemote(String local, IRemoteResource remote) {
return makeRemote(new Path(local), remote).toString();
}
-
+
/**
* Convert a local (workspace) path into the remote equivalent. If the local path is not
* absolute, then do nothing.
- *
+ *
* e.g. Suppose the local path is /u/local_user/workspace/local_project/subdir1/subdir2
* Suppose the remote project location is /home/remote_user/remote_project
* Then the resulting path will be /home/remote_user/remote_project/subdir1/subdir2
- *
+ *
* @param localPath absolute local path in the workspace
* @param remote remote project
* @return remote path that is the equivalent of the local path
@@ -79,10 +79,10 @@ public class RemoteCommandLauncher implements ICommandLauncher {
if (!localPath.isAbsolute()) {
return localPath;
}
-
+
IPath remoteLocation = remote.getResource().getLocation();
IPath remotePath = new Path(remote.getActiveLocationURI().getPath());
-
+
// Device mismatch, we might be in the presence of Cygwin or MinGW
if (remoteLocation.getDevice() != null && localPath.getDevice() == null) {
boolean isCygwin = localPath.segment(0).equals(CYGWIN_PREFIX);
@@ -96,29 +96,29 @@ public class RemoteCommandLauncher implements ICommandLauncher {
}
return remotePath;
}
-
+
private static String getPathString(IPath path, boolean isCygwin) {
String s = path.toString();
if (isCygwin) {
- s = s.replaceAll("^([a-zA-Z]):", "/" + CYGWIN_PREFIX + "/$1"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+ s = s.replaceAll("^([a-zA-Z]):", "/" + CYGWIN_PREFIX + "/$1"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
} else {
s = s.replaceAll("^([a-zA-Z]):", "/$1"); //$NON-NLS-1$ //$NON-NLS-2$
}
return s;
}
-
+
private ICommandLauncher fLocalLauncher;
private boolean fShowCommand;
private String[] fCommandArgs;
private IRemoteConnection fConnection;
private IRemoteProcess fRemoteProcess;
private final Properties fEnvironment = new Properties();
-
+
public RemoteCommandLauncher() {
this.fLocalLauncher = new CommandLauncher();
}
-
+
public RemoteCommandLauncher(ICommandLauncher localLauncher) {
this.fLocalLauncher = localLauncher;
}
@@ -141,8 +141,8 @@ public class RemoteCommandLauncher implements ICommandLauncher {
}
@Override
- public Process execute(IPath commandPath, String[] args, String[] env, IPath workingDirectory, IProgressMonitor monitor)
- throws CoreException {
+ public Process execute(IPath commandPath, String[] args, String[] env, IPath workingDirectory,
+ IProgressMonitor monitor) throws CoreException {
ICommandLauncher localLauncher = CommandLauncherManager.getInstance().getCommandLauncher(getProject());
localLauncher.setProject(getProject());
localLauncher.setErrorMessage(getErrorMessage());
@@ -166,7 +166,7 @@ public class RemoteCommandLauncher implements ICommandLauncher {
if (workingDirectory != null) {
String remoteWorkingPath = makeRemote(workingDirectory.toString(), remRes);
IRemoteFileService fileManager = fConnection.getService(IRemoteFileService.class);
- IFileStore wd = fileManager.getResource(remoteWorkingPath);
+ IFileStore wd = fileManager.getResource(remoteWorkingPath);
processBuilder.directory(wd);
}
Map<String, String> processEnv = processBuilder.environment();
@@ -295,11 +295,11 @@ public class RemoteCommandLauncher implements ICommandLauncher {
@SuppressWarnings("deprecation")
@Override
public int waitAndRead(OutputStream out, OutputStream err) {
-
+
if (usingLocalLauncher) {
return fLocalLauncher.waitAndRead(out, err);
}
-
+
// otherwise remote process
if (fShowCommand) {
printCommandLine(out);
@@ -319,7 +319,7 @@ public class RemoteCommandLauncher implements ICommandLauncher {
if (usingLocalLauncher) {
return fLocalLauncher.waitAndRead(out, err, monitor);
}
-
+
// otherwise remote process
if (fShowCommand) {
printCommandLine(out);
diff --git a/remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/core/RemoteProcessClosure.java b/remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/core/RemoteProcessClosure.java
index fc35dc117f..81526436de 100644
--- a/remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/core/RemoteProcessClosure.java
+++ b/remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/core/RemoteProcessClosure.java
@@ -119,7 +119,7 @@ public class RemoteProcessClosure {
/**
* Creates a process closure and connects the launched process with output and error streams.
- *
+ *
* @param outputStream
* process output is written to this stream. Can be <code>null</code>, if not interested in reading the output
* @param errorStream
diff --git a/remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/internal/core/Activator.java b/remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/internal/core/Activator.java
index c8c78164b6..6168b18e80 100644
--- a/remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/internal/core/Activator.java
+++ b/remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/internal/core/Activator.java
@@ -27,7 +27,7 @@ public class Activator implements BundleActivator {
/*
* (non-Javadoc)
- *
+ *
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
*/
@Override
@@ -37,7 +37,7 @@ public class Activator implements BundleActivator {
/*
* (non-Javadoc)
- *
+ *
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
@Override
@@ -47,7 +47,7 @@ public class Activator implements BundleActivator {
/**
* Return the OSGi service with the given service interface.
- *
+ *
* @param service service interface
* @return the specified service or null if it's not registered
*/

Back to the top