/*******************************************************************************
* Copyright (c) 2014 Obeo.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
package org.eclipse.emf.compare.ide.ui.internal.structuremergeviewer;
import org.eclipse.compare.structuremergeviewer.ICompareInput;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.Notifier;
/**
* @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
*/
public class ForwardingCompareInputAdapter extends ForwardingCompareInput implements Adapter.Internal {
private Notifier target;
/**
* @param delegate
*/
ForwardingCompareInputAdapter(ICompareInput delegate) {
super(delegate);
}
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.common.notify.Adapter#notifyChanged(org.eclipse.emf.common.notify.Notification)
*/
public void notifyChanged(Notification notification) {
}
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.common.notify.Adapter#getTarget()
*/
public Notifier getTarget() {
return target;
}
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.common.notify.Adapter#setTarget(org.eclipse.emf.common.notify.Notifier)
*/
public void setTarget(Notifier newTarget) {
target = newTarget;
}
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.common.notify.Adapter#isAdapterForType(java.lang.Object)
*/
public boolean isAdapterForType(Object type) {
return type == ICompareInput.class;
}
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.common.notify.Adapter.Internal#unsetTarget(org.eclipse.emf.common.notify.Notifier)
*/
public void unsetTarget(Notifier oldTarget) {
if (target == oldTarget) {
setTarget(null);
}
}
}