aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWainer S. Moschetta2012-08-01 17:50:42 (EDT)
committerOtavio Pontes2012-08-02 15:44:40 (EDT)
commitf2fd09b7a58433e8bf8b50a8e8e5ee9d7134075b (patch)
tree176f583d82658e44a50f645486e0885a000e1095
parent3627d231c8ee4606c1dc1726b82797513b71edfc (diff)
downloadorg.eclipse.linuxtools-f2fd09b7a58433e8bf8b50a8e8e5ee9d7134075b.zip
org.eclipse.linuxtools-f2fd09b7a58433e8bf8b50a8e8e5ee9d7134075b.tar.gz
org.eclipse.linuxtools-f2fd09b7a58433e8bf8b50a8e8e5ee9d7134075b.tar.bz2
Massif: remote used to not work due error to genrate heap chart title
Massif remote (launch) does not display heap chart due error to parse chart name (an exception weren't catch). This patch fix it by change string format used to generate the chart title. Also added an exception handler to avoid regression in case someone mistakenly change same string Change-Id: I77c38e20638c83c0ffb181355911936b650bd101 Signed-off-by: Wainer S. Moschetta <wainersm@linux.vnet.ibm.com> Reviewed-on: https://git.eclipse.org/r/7040 Reviewed-by: Rafael Medeiros Teixeira <rafaelmt@linux.vnet.ibm.com> IP-Clean: Rafael Medeiros Teixeira <rafaelmt@linux.vnet.ibm.com> Tested-by: Rafael Medeiros Teixeira <rafaelmt@linux.vnet.ibm.com> IP-Clean: Otavio Pontes <obusatto@linux.vnet.ibm.com> Reviewed-by: Otavio Pontes <obusatto@linux.vnet.ibm.com> Tested-by: Otavio Pontes <obusatto@linux.vnet.ibm.com>
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindRemoteProxyLaunchDelegate.java2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/MassifViewPart.java10
2 files changed, 9 insertions, 3 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 eaa4a0b..116b978 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
@@ -323,7 +323,7 @@ public class ValgrindRemoteProxyLaunchDelegate extends ValgrindLaunchConfigurati
}
return config.getName()
- + " [" + valgrindPath.toString() + " " + getPlugin().getToolName(toolID) + " on " + location + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ + " [" + getPlugin().getToolName(toolID) + "]" + " " + valgrindPath.toString() + " on " + location; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
}
@Override
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/MassifViewPart.java b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/MassifViewPart.java
index f7ad50a..4155f93 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/MassifViewPart.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/MassifViewPart.java
@@ -321,8 +321,14 @@ public class MassifViewPart extends ViewPart implements IValgrindToolView {
}
protected String getInputName(String description) {
- String launchName = description.substring(0, description
- .indexOf("[massif")); //$NON-NLS-1$
+ String launchName;
+ try {
+ launchName = description.substring(0, description
+ .indexOf("[massif")); //$NON-NLS-1$
+ }
+ catch(IndexOutOfBoundsException e) {
+ launchName = "(No chart title)";
+ }
return launchName.trim();
}