/******************************************************************************* * Copyright (c) 2006, 2015 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.ui.viewmodel; import org.eclipse.core.runtime.Platform; /** * Implementation of basic view model context interface. *
The main purpose of the VMC wrapper is to re-direct adapter * queries. The redirecting of adapter queries follows this order: *
* Note: Deriving classes must override the Object.equals/hashCode methods.
* This is because the view model context objects are just wrappers that are
* created by the view model on demand, so the equals methods must use the
* object being wrapped to perform a meaningful comparison.
*
* @since 1.0
*/
abstract public class AbstractVMContext implements IVMContext {
protected final IVMNode fNode;
public AbstractVMContext(IVMNode node) {
fNode = node;
}
@Override
public IVMNode getVMNode() { return fNode; }
@SuppressWarnings("unchecked")
@Override
public