| /** |
| * Copyright (c) 2018 CEA. |
| * 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: |
| * CEA - initial API and implementation and/or initial documentation |
| */ |
| package org.eclipse.sensinact.studio.navigator.device; |
| |
| import org.eclipse.core.runtime.IStatus; |
| import org.eclipse.core.runtime.Status; |
| import org.eclipse.sensinact.studio.view.outdoor.OutdoorDeploymentView; |
| import org.eclipse.swt.dnd.DropTargetEvent; |
| import org.eclipse.swt.dnd.TransferData; |
| import org.eclipse.ui.navigator.CommonDropAdapter; |
| import org.eclipse.ui.navigator.CommonDropAdapterAssistant; |
| |
| /** |
| * @author Nicolas Hili |
| * @since Nov 13, 2014 |
| * |
| */ |
| public class SensinactDropAdapterAssistant extends CommonDropAdapterAssistant { |
| |
| /* |
| * (non-Javadoc) |
| * |
| * @see |
| * org.eclipse.ui.navigator.CommonDropAdapterAssistant#validateDrop(java |
| * .lang.Object, int, org.eclipse.swt.dnd.TransferData) |
| */ |
| @Override |
| public IStatus validateDrop(Object target, int operation, TransferData transferType) { |
| return Status.OK_STATUS; |
| } |
| |
| /* |
| * (non-Javadoc) |
| * |
| * @see |
| * org.eclipse.ui.navigator.CommonDropAdapterAssistant#handleDrop(org.eclipse |
| * .ui.navigator.CommonDropAdapter, org.eclipse.swt.dnd.DropTargetEvent, |
| * java.lang.Object) |
| */ |
| @Override |
| public IStatus handleDrop(CommonDropAdapter aDropAdapter, DropTargetEvent aDropTargetEvent, Object aTarget) { |
| OutdoorDeploymentView.endDrag(); |
| return null; |
| } |
| } |