/*
 * Created on Aug 10, 2003
 *
 * To change the template for this generated file go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
package APStudio.dnd;

import org.eclipse.gef.dnd.AbstractTransferDropTargetListener;
import org.eclipse.gef.EditPartViewer;
import org.eclipse.gef.Request;
import APStudio.editparts.NativeDropRequest;
import org.eclipse.swt.dnd.Transfer;
/**
 * @author rajags
 *
 * To change the template for this generated type comment go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
public class TextTransferDropTargetListener
	extends AbstractTransferDropTargetListener {

	public TextTransferDropTargetListener(EditPartViewer viewer, Transfer xfer) {
		super(viewer, xfer);
	}
	
	/* (non-Javadoc)
	 * @see org.eclipse.gef.dnd.AbstractTransferDropTargetListener#updateTargetRequest()
	 */
	protected void updateTargetRequest() {
		getNativeDropRequest().setData(getCurrentEvent().data);
	}

	protected Request createTargetRequest() {
		return new NativeDropRequest();
	}

	protected NativeDropRequest getNativeDropRequest() {
		return (NativeDropRequest)getTargetRequest();
	}
}
