aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Medeiros Teixeira2011-08-25 10:35:29 (EDT)
committerElliott Baron2011-08-30 18:46:27 (EDT)
commitb976523cbb21e6b64b4c3ab25dcc0d28b411741c (patch)
tree08a8252f5562ed3b650ca68604ab33bd71cf667f
parentcd019986ddf7104bfbc858c19e4e5daba34c0917 (diff)
downloadorg.eclipse.linuxtools-b976523cbb21e6b64b4c3ab25dcc0d28b411741c.zip
org.eclipse.linuxtools-b976523cbb21e6b64b4c3ab25dcc0d28b411741c.tar.gz
org.eclipse.linuxtools-b976523cbb21e6b64b4c3ab25dcc0d28b411741c.tar.bz2
Further fix for bug #333315. Since the last fix doesn't allow empty
messages array anymore (there's at least a ValgrindInfo message in it), verification for executions with no output must be different. Messages are also cleaned-up from console before starting a new execution; it might be confusing to have a "no output" message related to a previous execution written in the console while current profiling is running.
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/ValgrindViewPart.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/ValgrindViewPart.java b/valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/ValgrindViewPart.java
index 559d504..89189c9 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/ValgrindViewPart.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/ValgrindViewPart.java
@@ -16,6 +16,7 @@ import org.eclipse.jface.action.ActionContributionItem;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.linuxtools.internal.valgrind.core.ValgrindInfo;
import org.eclipse.linuxtools.valgrind.core.IValgrindMessage;
import org.eclipse.linuxtools.valgrind.ui.IValgrindToolView;
import org.eclipse.swt.SWT;
@@ -84,6 +85,13 @@ public class ValgrindViewPart extends ViewPart {
if (dynamicView != null) {
dynamicView.dispose();
}
+
+ // remove old messages
+ if (messages != null){
+ messagesViewer.getTreeViewer().setInput(null);
+ messages = null;
+ }
+
for (Control child : dynamicViewHolder.getChildren()) {
if (!child.isDisposed()) {
child.dispose();
@@ -145,7 +153,7 @@ public class ValgrindViewPart extends ViewPart {
messagesViewer.getTreeViewer().setInput(messages);
// decide which page to show
- if (hasDynamicContent && messages.length == 0) {
+ if (hasDynamicContent && messages[0] instanceof ValgrindInfo) {
// no valgrind messages to show
showCoreAction.setEnabled(false);
showToolPage();