Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Medeiros Teixeira2012-06-28 13:26:23 -0400
committerDaniel Henrique Barboza2012-06-28 15:39:38 -0400
commit2d0c56f56e038377e694988140a2c4cca556d35f (patch)
treeaf79034049e6b1a5d7892772d264fadefea93ade /valgrind
parentc709409447ecbd2104f4db9ba79338d1fe3e9cd2 (diff)
downloadorg.eclipse.linuxtools-2d0c56f56e038377e694988140a2c4cca556d35f.tar.gz
org.eclipse.linuxtools-2d0c56f56e038377e694988140a2c4cca556d35f.tar.xz
org.eclipse.linuxtools-2d0c56f56e038377e694988140a2c4cca556d35f.zip
Fixing bug with remote profiling when remote tools' connection name has whitespace characters
Diffstat (limited to 'valgrind')
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindRemoteProxyLaunchDelegate.java19
1 files changed, 17 insertions, 2 deletions
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindRemoteProxyLaunchDelegate.java b/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindRemoteProxyLaunchDelegate.java
index a2fbd22223..eaa4a0b856 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindRemoteProxyLaunchDelegate.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindRemoteProxyLaunchDelegate.java
@@ -305,10 +305,25 @@ public class ValgrindRemoteProxyLaunchDelegate extends ValgrindLaunchConfigurati
String projectName = configUtils.getProjectName();
IProject project = ConfigUtils.getProject(projectName);
URI projectURI = project.getLocationURI();
- String Location = projectURI.getScheme() + "://" + projectURI.getHost();
+
+ String host = projectURI.getHost();
+
+ // Host might be null since it's not needed for a well-formed URI. Try authority instead
+ if(host == null){
+ host = projectURI.getAuthority();
+ }
+
+ // If authority is also null, use a generic name
+ String location;
+
+ if(host == null){
+ location = "remote host";
+ } else {
+ location = projectURI.getScheme() + "://" + host;
+ }
return config.getName()
- + " [" + valgrindPath.toString() + " " + getPlugin().getToolName(toolID) + " on " + Location + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ + " [" + valgrindPath.toString() + " " + getPlugin().getToolName(toolID) + " on " + location + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
}
@Override

Back to the top