Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Grunberg2012-03-05 12:45:52 -0500
committerRoland Grunberg2012-03-05 12:45:52 -0500
commitc2b571a18d9afa0dd3870e3e87a93017dc321328 (patch)
tree171a71437a223ead5063dd5bc68f7fbd06a1f804 /valgrind
parente0b87be3d929f84ddf78ea776f6663e9b49bbedf (diff)
downloadorg.eclipse.linuxtools-c2b571a18d9afa0dd3870e3e87a93017dc321328.tar.gz
org.eclipse.linuxtools-c2b571a18d9afa0dd3870e3e87a93017dc321328.tar.xz
org.eclipse.linuxtools-c2b571a18d9afa0dd3870e3e87a93017dc321328.zip
Fix failing Massif Test, and minor change to Massif double-click logic.
Diffstat (limited to 'valgrind')
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/MassifPlugin.java10
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/birt/ChartPNG.java2
2 files changed, 9 insertions, 3 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 c82dc7f665..11ae3a6e15 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
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.linuxtools.internal.valgrind.massif;
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IStorage;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.debug.core.ILaunchConfiguration;
@@ -79,9 +80,14 @@ public class MassifPlugin extends AbstractUIPlugin {
ISourceLocator sourceLocator = MassifPlugin.getDefault().getSourceLocator();
if (sourceLocator instanceof ISourceLookupDirector) {
Object obj = ((ISourceLookupDirector) sourceLocator).getSourceElement(element.getFilename());
- if (obj != null && obj instanceof IStorage) {
+ String fullFilePath;
+ if (obj != null && obj instanceof IStorage){
+ if (obj instanceof IFile) {
+ fullFilePath = ((IFile) obj).getLocation().toOSString();
+ } else {
+ fullFilePath = workspaceLocation + ((IStorage) obj).getFullPath().toOSString();
+ }
try {
- String fullFilePath = workspaceLocation + ((IStorage) obj).getFullPath().toOSString();
ProfileUIUtils.openEditorAndSelect(fullFilePath, element.getLine());
} catch (PartInitException e) {
e.printStackTrace();
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/birt/ChartPNG.java b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/birt/ChartPNG.java
index 4c83e9b3ce..d3163618e1 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/birt/ChartPNG.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/birt/ChartPNG.java
@@ -36,7 +36,7 @@ public class ChartPNG {
Composite comp = cm.getChartControl();
Display dsp = Display.getCurrent();
GC gc = new GC(comp);
- Image img = new Image(dsp, comp.getSize().x, comp.getSize().y);
+ Image img = new Image(dsp, comp.getSize().x + 1, comp.getSize().y + 1);
gc.copyArea(img, 0, 0);
gc.dispose();
ImageLoader imageLoader = new ImageLoader();

Back to the top