mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
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>
This commit is contained in:
parent
c3ddef90ae
commit
9e13f237de
2 changed files with 31 additions and 10 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 ---
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue