diff options
author | Rodrigo Fraxino Araujo | 2014-06-18 17:43:45 +0000 |
---|---|---|
committer | Rodrigo Fraxino Araujo | 2014-06-20 17:32:27 +0000 |
commit | 5065d0888826959d10a358925c62b9234baf1d09 (patch) | |
tree | 56b6589db071eb0c7512c5d0a196fa1791494d1e /oprofile/org.eclipse.linuxtools.oprofile.ui/src/org | |
parent | 7c8c7f5e09fff1f7a1432f2bd3638e257b2b4e3b (diff) | |
download | org.eclipse.linuxtools-5065d0888826959d10a358925c62b9234baf1d09.tar.gz org.eclipse.linuxtools-5065d0888826959d10a358925c62b9234baf1d09.tar.xz org.eclipse.linuxtools-5065d0888826959d10a358925c62b9234baf1d09.zip |
oprofile: fix double click to source code in synchronized projects
Change-Id: Ib90dd72473ad389980719bdac14fb78911a8d6f5
Reviewed-on: https://git.eclipse.org/r/28699
Tested-by: Hudson CI
Reviewed-by: Rodrigo Fraxino Araujo <rfaraujo@linux.vnet.ibm.com>
Tested-by: Rodrigo Fraxino Araujo <rfaraujo@linux.vnet.ibm.com>
Diffstat (limited to 'oprofile/org.eclipse.linuxtools.oprofile.ui/src/org')
-rw-r--r-- | oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewDoubleClickListener.java | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewDoubleClickListener.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewDoubleClickListener.java index b8058239ee..146f0eeb83 100644 --- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewDoubleClickListener.java +++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewDoubleClickListener.java @@ -10,11 +10,14 @@ *******************************************************************************/ package org.eclipse.linuxtools.internal.oprofile.ui.view; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.viewers.DoubleClickEvent; import org.eclipse.jface.viewers.IDoubleClickListener; import org.eclipse.jface.viewers.TreeSelection; import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.linuxtools.internal.oprofile.core.Oprofile; import org.eclipse.linuxtools.oprofile.ui.model.IUiModelElement; import org.eclipse.linuxtools.oprofile.ui.model.UiModelEvent; import org.eclipse.linuxtools.oprofile.ui.model.UiModelImage; @@ -65,13 +68,23 @@ public class OprofileViewDoubleClickListener implements IDoubleClickListener { // get file name from the parent sample final String fileName = sample.getFile(); - ProfileUIUtils.openEditorAndSelect(fileName, line); + ProfileUIUtils.openEditorAndSelect(fileName, line, getProject()); } } catch (BadLocationException e1) { e1.printStackTrace(); } catch (PartInitException e2) { e2.printStackTrace(); - } + } catch (CoreException e) { + e.printStackTrace(); + } } + /** + * return the project + * @since 2.0 + */ + protected IProject getProject() { + return Oprofile.OprofileProject.getProject(); + } + } |