aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWainer S. Moschetta2013-09-03 14:33:43 (EDT)
committerRodrigo Fraxino Araujo2013-09-04 09:39:45 (EDT)
commit09052a4cad1dea5da296453a5f348d30358c4e54 (patch)
treedcad24b11379aa87ff774e91bb359e0522cf58cf
parent601faa7745d3ab4a67542296a21da57c378a73b6 (diff)
downloadorg.eclipse.linuxtools-09052a4cad1dea5da296453a5f348d30358c4e54.zip
org.eclipse.linuxtools-09052a4cad1dea5da296453a5f348d30358c4e54.tar.gz
org.eclipse.linuxtools-09052a4cad1dea5da296453a5f348d30358c4e54.tar.bz2
massif: fix double-click action to open a source filerefs/changes/83/16083/3
The double-click action to open project's source file stopped work. This patch fix it by adding a handler for local vs remote projects. Change-Id: Ie62b4860fd39bb3a6b0f740a0e7de6fc60638971 Signed-off-by: Wainer S. Moschetta <wainersm@linux.vnet.ibm.com> Reviewed-on: https://git.eclipse.org/r/16083 Tested-by: Hudson CI Reviewed-by: Rodrigo Fraxino Araujo <rfaraujo@linux.vnet.ibm.com> IP-Clean: Rodrigo Fraxino Araujo <rfaraujo@linux.vnet.ibm.com> Tested-by: Rodrigo Fraxino Araujo <rfaraujo@linux.vnet.ibm.com>
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/MassifPlugin.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/MassifPlugin.java b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/MassifPlugin.java
index 63afdd2..763544a 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/MassifPlugin.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/MassifPlugin.java
@@ -81,14 +81,19 @@ public class MassifPlugin extends AbstractUIPlugin {
if (sourceLocator instanceof ISourceLookupDirector) {
Object obj = ((ISourceLookupDirector) sourceLocator).getSourceElement(element.getFilename());
if (obj != null && obj instanceof IStorage){
- if (obj instanceof IFile) {
- try {
+ try {
+ // Most likely a remote project
+ if (obj instanceof IFile) {
ProfileUIUtils.openEditorAndSelect(((IFile)obj), element.getLine());
- } catch (PartInitException e) {
- e.printStackTrace();
- } catch (BadLocationException e) {
- e.printStackTrace();
+ // Local projects
+ } else {
+ String fullFilePath = ((IStorage) obj).getFullPath().toOSString();
+ ProfileUIUtils.openEditorAndSelect(fullFilePath, element.getLine());
}
+ } catch (PartInitException e) {
+ e.printStackTrace();
+ } catch (BadLocationException e) {
+ e.printStackTrace();
}
}
}