1
/*******************************************************************************
2
* Copyright (c) 2008, 2011 Wind River Systems and others.
3
* All rights reserved. This program and the accompanying materials
4
* are made available under the terms of the Eclipse Public License v1.0
5
* which accompanies this distribution, and is available at
6
* http://www.eclipse.org/legal/epl-v10.html
9
* Wind River Systems - initial API and implementation
10
* Wind River Systems - flexible hierarchy Signals view (bug 338908)
11
*******************************************************************************/
12
package org.eclipse.cdt.debug.internal.ui.elements.adapters;
14
import org.eclipse.cdt.debug.internal.ui.views.modules.ModuleContentProvider;
15
import org.eclipse.cdt.debug.internal.ui.views.signals.SignalsContentProvider;
16
import org.eclipse.cdt.debug.ui.ICDebugUIConstants;
17
import org.eclipse.debug.internal.ui.model.elements.DebugTargetContentProvider;
18
import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate;
19
import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
20
import org.eclipse.debug.internal.ui.viewers.model.provisional.IHasChildrenUpdate;
21
import org.eclipse.debug.ui.IDebugUIConstants;
24
* Delegating provider implementation. If the memento request is for the
25
* modules view, the provider impelementation delegates the request to the
26
* modules view-specific provider. Otherwise, it calls the default superclass
29
public class CDebugTargetContentProvider extends DebugTargetContentProvider {
30
private final ModuleContentProvider fModuleContentProvider = new ModuleContentProvider();
31
private final SignalsContentProvider fSignalsContentProvider = new SignalsContentProvider();
34
public void update(IChildrenCountUpdate[] updates) {
35
String id = updates[0].getPresentationContext().getId();
36
if (IDebugUIConstants.ID_MODULE_VIEW.equals(id)) {
37
fModuleContentProvider.update(updates);
38
} else if (ICDebugUIConstants.ID_SIGNALS_VIEW.equals(id)) {
39
fSignalsContentProvider.update(updates);
41
super.update(updates);
46
public void update(IHasChildrenUpdate[] updates) {
47
String id = updates[0].getPresentationContext().getId();
48
if (IDebugUIConstants.ID_MODULE_VIEW.equals(id)) {
49
fModuleContentProvider.update(updates);
50
} else if (ICDebugUIConstants.ID_SIGNALS_VIEW.equals(id)) {
51
fSignalsContentProvider.update(updates);
53
super.update(updates);
58
public void update(IChildrenUpdate[] updates) {
59
String id = updates[0].getPresentationContext().getId();
60
if (IDebugUIConstants.ID_MODULE_VIEW.equals(id)) {
61
fModuleContentProvider.update(updates);
62
} else if (ICDebugUIConstants.ID_SIGNALS_VIEW.equals(id)) {
63
fSignalsContentProvider.update(updates);
65
super.update(updates);