fosclipse-ui

Artifact [cfcfca3267]
Login

Artifact [cfcfca3267]

Artifact cfcfca3267a2c483a24cf766517a9662db4a9ba2:


/*******************************************************************************
 * Copyright (c) 2006 Fosclipse project and others.
 * 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:
 *     Fosclipse project committers - initial API and implementation
 ******************************************************************************/
package org.fossil_scm.fosclipse.ui.history;

import org.eclipse.team.ui.history.IHistoryView;
import org.eclipse.ui.part.IDropActionDelegate;
import org.fossil_scm.fosclipse.ui.actions.RemoteResourceTransfer;

public class RemoteResourceDropAdapter implements IDropActionDelegate {

	public boolean run(Object source, Object target) {
		if (source != null && target instanceof IHistoryView) {
			RemoteResourceTransfer transfer = RemoteResourceTransfer.getInstance();
			Object file = transfer.fromByteArray((byte[]) source);
			((IHistoryView) target).showHistoryFor(file);

		}
		return false;
	}

}