Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 5f25bb2022dd57c2832aec7aea04761846e32cca (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
53
54
55
56
57
58
59
/*******************************************************************************
 * Copyright (c) 2008, 2012 Wind River Systems 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:
 *     Wind River Systems - initial API and implementation
 *******************************************************************************/
package org.eclipse.cdt.dsf.debug.ui.viewmodel.register;

import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMProvider;
import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.RootDMVMNode;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementCompareRequest;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoRequest;

/*
 * We are extending the ROOT VM node for the register view so we can
 * provide Memento providers for the root node. In the Register VM
 * Provider we are returning a pseudo VMContext selection when the
 * original input is a child of an execution context we return a selection
 * which represents an Execution Context instead.  This ensures that the
 * Register View does not collapse and redraw when going from frame to frame
 * when stepping or just when selecting within the view.
 */
public class RegisterRootDMVMNode extends RootDMVMNode implements IElementMementoProvider {

	public RegisterRootDMVMNode(AbstractVMProvider provider) {
		super(provider);
	}

	/*
	 * (non-Javadoc)
	 * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider#compareElements(org.eclipse.debug.internal.ui.viewers.model.provisional.IElementCompareRequest[])
	 */
	@Override
	public void compareElements(IElementCompareRequest[] requests) {
		for (IElementMementoRequest request : requests) {
			request.done();
		}
	}

	/*
	 * (non-Javadoc)
	 * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider#encodeElements(org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoRequest[])
	 */
	@Override
	public void encodeElements(IElementMementoRequest[] requests) {

		for (IElementMementoRequest request : requests) {
			request.done();
		}
	}
}

Back to the top