aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Medeiros Teixeira2011-08-08 12:59:53 (EDT)
committerElliott Baron2011-08-24 15:14:01 (EDT)
commit9bc82fd9c00ca95a2f14f3fa78ac18b3e2921402 (patch)
treea14aaad147ead108252c0531f7a8ea259f62dbd7
parent6c30c7431cd87af7c31b89ad98f5eb2b11902234 (diff)
downloadorg.eclipse.linuxtools-9bc82fd9c00ca95a2f14f3fa78ac18b3e2921402.zip
org.eclipse.linuxtools-9bc82fd9c00ca95a2f14f3fa78ac18b3e2921402.tar.gz
org.eclipse.linuxtools-9bc82fd9c00ca95a2f14f3fa78ac18b3e2921402.tar.bz2
Fix for bug #333315 - Add text to Valgrind view when no errors were found.
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.core/src/org/eclipse/linuxtools/internal/valgrind/core/ValgrindInfo.java23
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindLaunchConfigurationDelegate.java6
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/messages.properties3
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/CoreMessagesViewer.java6
4 files changed, 36 insertions, 2 deletions
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.core/src/org/eclipse/linuxtools/internal/valgrind/core/ValgrindInfo.java b/valgrind/org.eclipse.linuxtools.valgrind.core/src/org/eclipse/linuxtools/internal/valgrind/core/ValgrindInfo.java
new file mode 100644
index 0000000..c0c1af8
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.core/src/org/eclipse/linuxtools/internal/valgrind/core/ValgrindInfo.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2011 IBM Corporation
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Rafael M Teixeira <rafaelmt@linux.vnet.ibm.com> - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.valgrind.core;
+
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.linuxtools.valgrind.core.IValgrindMessage;
+
+public class ValgrindInfo extends AbstractValgrindMessage {
+
+ public ValgrindInfo(IValgrindMessage parent, String text, ILaunch launch) {
+ super(parent, text, launch);
+ }
+
+}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindLaunchConfigurationDelegate.java b/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindLaunchConfigurationDelegate.java
index e053bad..6aecae8 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindLaunchConfigurationDelegate.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindLaunchConfigurationDelegate.java
@@ -48,6 +48,7 @@ import org.eclipse.linuxtools.internal.valgrind.core.LaunchConfigurationConstant
import org.eclipse.linuxtools.internal.valgrind.core.ValgrindCommand;
import org.eclipse.linuxtools.internal.valgrind.core.ValgrindCoreParser;
import org.eclipse.linuxtools.internal.valgrind.core.ValgrindError;
+import org.eclipse.linuxtools.internal.valgrind.core.ValgrindInfo;
import org.eclipse.linuxtools.internal.valgrind.core.ValgrindStackFrame;
import org.eclipse.linuxtools.internal.valgrind.ui.ValgrindUIPlugin;
import org.eclipse.linuxtools.internal.valgrind.ui.ValgrindViewPart;
@@ -201,6 +202,11 @@ public class ValgrindLaunchConfigurationDelegate extends AbstractCLaunchDelegate
for (File log : outputPath.toFile().listFiles(LOG_FILTER)) {
ValgrindCoreParser parser = new ValgrindCoreParser(log, launch);
IValgrindMessage[] results = parser.getMessages();
+
+ if (results.length == 0){
+ results = new IValgrindMessage[1];
+ results[0] = new ValgrindInfo(null, Messages.getString("ValgrindOutputView.No_output"), launch);
+ }
messages.addAll(Arrays.asList(results));
createMarkers(results);
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/messages.properties b/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/messages.properties
index aceee2f..2bed00a 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/messages.properties
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/messages.properties
@@ -54,4 +54,5 @@ ValgrindOptionsTab.trace_children=Trace children on exec
ValgrindOptionsTab.Valgrind_Options=Valgrind Options
ValgrindOptionsTab.Workspace=&Workspace...
ValgrindOutputDirectory.Couldnt_create=Couldn't create {0}
-ValgrindOutputDirectory.Couldnt_delete=Couldn't delete {0} \ No newline at end of file
+ValgrindOutputDirectory.Couldnt_delete=Couldn't delete {0}
+ValgrindOutputView.No_output=Profiler executed successfully, no issues found
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/CoreMessagesViewer.java b/valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/CoreMessagesViewer.java
index 5380586..3bb18ff 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/CoreMessagesViewer.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/CoreMessagesViewer.java
@@ -35,6 +35,7 @@ import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.TreeSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.linuxtools.internal.valgrind.core.ValgrindError;
import org.eclipse.linuxtools.internal.valgrind.core.ValgrindStackFrame;
import org.eclipse.linuxtools.profiling.ui.ProfileUIUtils;
import org.eclipse.linuxtools.valgrind.core.IValgrindMessage;
@@ -99,9 +100,12 @@ public class CoreMessagesViewer {
if (element instanceof ValgrindStackFrame) {
image = DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_STACKFRAME);
}
- else {
+ else if (element instanceof ValgrindError) {
image = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_ERROR_TSK);
}
+ else {
+ image = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_INFO_TSK);
+ }
return image;
}