1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Bug 460737 - [visualizer] enable MV to know which (cloned) instance it

is

Change-Id: I586dedab6df808f9e68600fa55fa1169b44defaf
This commit is contained in:
Marc Dumais 2015-02-25 07:07:37 -05:00 committed by Gerrit Code Review @ Eclipse.org
parent 3642fbc5cd
commit 2ec6e11b2b

View file

@ -23,6 +23,7 @@
* Marc Dumais (Ericsson) - Bug 453206 * Marc Dumais (Ericsson) - Bug 453206
* Marc Dumais (Ericsson) - Bug 458076 * Marc Dumais (Ericsson) - Bug 458076
* Alvaro Sanchez-Leon (Ericsson) - Bug 459114 - override construction of the data model * Alvaro Sanchez-Leon (Ericsson) - Bug 459114 - override construction of the data model
* Marc Dumais (Ericsson) - Bug 460737
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.dsf.gdb.multicorevisualizer.internal.ui.view; package org.eclipse.cdt.dsf.gdb.multicorevisualizer.internal.ui.view;
@ -144,6 +145,10 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
/** Debug view selection changed listener, attached to Debug View. */ /** Debug view selection changed listener, attached to Debug View. */
protected ISelectionChangedListener m_debugViewSelectionChangedListener = null; protected ISelectionChangedListener m_debugViewSelectionChangedListener = null;
/** Unique id that differentiates the possible multiple instances of the MV.
* It's derived from the secondary view Part id of the view associated to the
* current instance of the MV. */
protected String m_visualizerInstanceId = null;
// This is used to cache the CPU and core // This is used to cache the CPU and core
// contexts, each time the model is recreated. This way // contexts, each time the model is recreated. This way
@ -261,6 +266,12 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
public void initializeVisualizer() { public void initializeVisualizer() {
fEventListener = new MulticoreVisualizerEventListener(this); fEventListener = new MulticoreVisualizerEventListener(this);
m_cpuCoreContextsCache = new ArrayList<IDMContext>(); m_cpuCoreContextsCache = new ArrayList<IDMContext>();
m_visualizerInstanceId = getViewer().getView().getViewSite().getSecondaryId();
// The first visualizer view will have a null secondary id - override that
if (m_visualizerInstanceId == null) {
m_visualizerInstanceId = "0"; //$NON-NLS-1$
}
} }
/** /**