Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Dumais2014-08-22 17:34:20 +0000
committerMarc Dumais2014-08-26 17:39:25 +0000
commit9e13f237de4b6c1796b08d67ebf011dd36cdb344 (patch)
tree11a47d23c380e1b6c1948f246af6776883739308 /dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui
parentc3ddef90ae00d80e5e455ab708b89c08dbd7f4e5 (diff)
downloadorg.eclipse.cdt-9e13f237de4b6c1796b08d67ebf011dd36cdb344.tar.gz
org.eclipse.cdt-9e13f237de4b6c1796b08d67ebf011dd36cdb344.tar.xz
org.eclipse.cdt-9e13f237de4b6c1796b08d67ebf011dd36cdb344.zip
bug 442312 - [visualizer] disable or remove the debug buttons from MV
toolbar, when pinned? Change-Id: Ibde098fddcb6ba95322d6313edd0152d34932f93 Reviewed-on: https://git.eclipse.org/r/32177 Tested-by: Hudson CI Reviewed-by: William Swanson <WilliamRSwanson@gmail.com> Reviewed-by: Marc Dumais <marc.dumais@ericsson.com> Tested-by: Marc Dumais <marc.dumais@ericsson.com>
Diffstat (limited to 'dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui')
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/PinToDebugSessionAction.java3
-rwxr-xr-xdsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizer.java38
2 files changed, 31 insertions, 10 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/PinToDebugSessionAction.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/PinToDebugSessionAction.java
index e1a01e2b2d8..2b96e991992 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/PinToDebugSessionAction.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/actions/PinToDebugSessionAction.java
@@ -7,6 +7,7 @@
*
* Contributors:
* Marc Dumais (Ericsson) - Initial API and implementation (Bug 441713)
+ * Marc Dumais (Ericsson) - Bug 442312
*******************************************************************************/
package org.eclipse.cdt.dsf.gdb.multicorevisualizer.internal.ui.actions;
@@ -72,5 +73,7 @@ public class PinToDebugSessionAction extends VisualizerAction {
else {
m_visualizer.unpin();
}
+ // update the toolbar
+ m_visualizer.raiseVisualizerChangedEvent();
}
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizer.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizer.java
index f4509f2de14..6ebfcda6c6d 100755
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizer.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizer.java
@@ -18,6 +18,7 @@
* Marc Dumais (Ericsson) - Bug 409965
* Xavier Raynaud (kalray) - Bug 431935
* Marc Dumais (Ericsson) - Bug 441713
+ * Marc Dumais (Ericsson) - Bug 442312
*******************************************************************************/
package org.eclipse.cdt.dsf.gdb.multicorevisualizer.internal.ui.view;
@@ -606,16 +607,21 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer
// initialize menu/toolbar actions, if needed
createActions();
- toolBarManager.add(m_resumeAction);
- toolBarManager.add(m_suspendAction);
- toolBarManager.add(m_terminateAction);
-
- toolBarManager.add(m_separatorAction);
-
- toolBarManager.add(m_stepReturnAction);
- toolBarManager.add(m_stepOverAction);
- toolBarManager.add(m_stepIntoAction);
- toolBarManager.add(m_dropToFrameAction);
+ // display debug buttons only if MV is not pinned
+ // note: if in the future we want to display the debug buttons even
+ // when pinned, all that needs to be done it to remove this check.
+ if (!m_pinToDbgSessionAction.isChecked()) {
+ toolBarManager.add(m_resumeAction);
+ toolBarManager.add(m_suspendAction);
+ toolBarManager.add(m_terminateAction);
+
+ toolBarManager.add(m_separatorAction);
+
+ toolBarManager.add(m_stepReturnAction);
+ toolBarManager.add(m_stepOverAction);
+ toolBarManager.add(m_stepIntoAction);
+ toolBarManager.add(m_dropToFrameAction);
+ }
toolBarManager.add(m_pinToDbgSessionAction);
updateActions();
@@ -809,6 +815,18 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer
m_canvas.requestUpdate();
}
+
+ /** Updates the UI elements such as the toolbar and context menu */
+ public void raiseVisualizerChangedEvent() {
+ // FIXME: replace hack below by raising a new VisualizerChanged
+ // event, listened-to by VisualizerViewer, that causes it to raise
+ // its own VISUALIZER_CHANGED event. See bug 442584 for details
+
+ // for now do a non-change to the selection to trigger a call to
+ // VisualizerView#updateUI()
+ setSelection(getSelection());
+ }
+
// --- ISelectionChangedListener implementation ---

Back to the top