Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 608336cbf0870734462aa284ac43102c6988c068 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*******************************************************************************
 *  Copyright (c) 2006, 2009 IBM Corporation and others.
 *
 *  This program and the accompanying materials
 *  are made available under the terms of the Eclipse Public License 2.0
 *  which accompanies this distribution, and is available at
 *  https://www.eclipse.org/legal/epl-2.0/
 *
 *  SPDX-License-Identifier: EPL-2.0
 *
 *  Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

package org.eclipse.debug.internal.ui.views.memory;

import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProvider;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
import org.eclipse.swt.widgets.Composite;

/**
 * Customized tree viewer for the Memory View This Tree Viewer has a specialized
 * update policy for the memory view. When the model fires a ADDED delta, the
 * update policy handles the event as follows: If the ADDED delta is accompanied
 * by SELECT, and the added element is an memory blok, then the udpate policy
 * asks the Memory View if the it is currently pinned to a memory block. If the
 * view is currently pinned, then the SELECT delta is ignored.
 *
 * If the ADDED delta and SELECT delta are recieved in separate nodes, then the
 * delta will be handled as-is and would not take the pinning state of the
 * memory view into account.
 *
 */
public class MemoryViewTreeViewer extends TreeModelViewer {

	public MemoryViewTreeViewer(Composite parent, int style, IPresentationContext context) {
		super(parent, style, context);
	}

	/*
	 * Need to have a customized content provider to define a special update
	 * policy for the Memory View (non-Javadoc)
	 * @see org.eclipse.debug.internal.ui.viewers.model.InternalTreeModelViewer#
	 * createContentProvider()
	 */
	@Override
	protected ITreeModelContentProvider createContentProvider() {
		return new MemoryViewTreeModelContentProvider();
	}

}

Back to the top