Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Eclipse Platform
Release 3.5

Class ResourceDragAdapterAssistant

  extended by 

      extended by 

public class ResourceDragAdapterAssistant
extends CommonDragAdapterAssistant

Clients may reference this class in the dragAssistant element of a org.eclipse.ui.navigator.viewer extension point.

Clients may not extend or instantiate this class for any purpose other than INavigatorDnDService.bindDragAssistant(CommonDragAdapterAssistant). Clients may have no direct dependencies on the contract of this class.

This class is not intended to be subclassed by clients.

Constructor Summary
ResourceDragAdapterAssistant ()
Method Summary
  Transfer[] getSupportedTransferTypes ()
          Extra TransferTypes allow the Navigator to generate different kinds of payloads for DND clients.
 boolean setDragData ( DragSourceEvent anEvent, IStructuredSelection aSelection)
          Set the value of the field using the given selection.
Methods inherited from class org.eclipse.ui.navigator. CommonDragAdapterAssistant
dragFinished, dragStart, getContentService, getShell, setContentService
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ResourceDragAdapterAssistant()
Method Detail


Transfer[] getSupportedTransferTypes()
Description copied from class: CommonDragAdapterAssistant
Extra TransferTypes allow the Navigator to generate different kinds of payloads for DND clients. By default, the CommonDragAdapter supports LocalSelectionTransfer and PluginTransfer.

CommonDragAdapterAssistants can extend the available TransferTypes that a Common Navigator Viewer can generate. Clients should return the set of Transfer Types they support. When a drop event occurs, the available drag assistants will be searched for a enabled assistants for the DragSourceEvent. Only if the drop event occurs will CommonDragAdapterAssistant.setDragData(DragSourceEvent, IStructuredSelection) be called. If the drop event is cancelled, CommonDragAdapterAssistant.setDragData(DragSourceEvent, IStructuredSelection) will not be called.

Specified by:
getSupportedTransferTypes in class CommonDragAdapterAssistant
The added transfer types. (e.g. FileTransfer.getInstance()).


public boolean setDragData(
DragSourceEvent anEvent,
IStructuredSelection aSelection)
Description copied from class: CommonDragAdapterAssistant
Set the value of the field using the given selection. Clients will only have an opportunity to set the drag data if they have returned a matching Transfer Type from CommonDragAdapterAssistant.getSupportedTransferTypes() for the DragSourceEvent.dataType.

Clients will only have an opportunity to set the data when the drop event occurs. If the drop operation is cancelled, then this method will not be called.

Specified by:
setDragData in class CommonDragAdapterAssistant
anEvent - The event object should have its field set to a value that matches a supported TransferData type.
aSelection - The current selection from the viewer.
True if the data could be set; false otherwise.

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire