Examples of IDragAndDropService


Examples of org.eclipse.ui.dnd.IDragAndDropService

   */
  protected void uninstallTextDragAndDrop(ISourceViewer viewer) {
    if (viewer == null || !fIsTextDragAndDropInstalled)
      return;

    final IDragAndDropService dndService = (IDragAndDropService) getSite()
        .getService(IDragAndDropService.class);
    if (dndService == null)
      return;

    StyledText st = viewer.getTextWidget();
    dndService.removeMergedDropTarget(st);

    DragSource dragSource = (DragSource) st.getData(DND.DRAG_SOURCE_KEY);
    if (dragSource != null) {
      dragSource.dispose();
      st.setData(DND.DRAG_SOURCE_KEY, null);
View Full Code Here

Examples of org.eclipse.ui.dnd.IDragAndDropService

    int operations = DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_DEFAULT;
    Transfer[] transfers = new Transfer[] { LocalSelectionTransfer.getTransfer(),TextTransfer.getInstance(),ResourceTransfer.getInstance(),FileTransfer.getInstance() };
    //installTextDragAndDrop(getSourceViewer());
    CFEDragDropListener ddListener = new CFEDragDropListener(this,
        (ProjectionViewer) this.getSourceViewer(), SelectionCursorListener);
    IDragAndDropService dtSvc = (IDragAndDropService) getSite().getService(IDragAndDropService.class);
    dtSvc.addMergedDropTarget(tw, operations, transfers, ddListener);
    final DragSource source= new DragSource(tw, DND.DROP_COPY | DND.DROP_MOVE);
    source.setTransfer(new Transfer[] {TextTransfer.getInstance()});
    source.addDragListener(ddListener);     
  }
View Full Code Here

Examples of org.eclipse.ui.dnd.IDragAndDropService

    }
    CFMLPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(
        this);
    CFMLPlugin.getDefault().getLastActionManager().removeAction(this);
    //remove the dnd listener
    final IDragAndDropService dndService= (IDragAndDropService)getSite().getService(IDragAndDropService.class);
    if (dndService == null)
      return;

    StyledText st= getSourceViewer().getTextWidget();
    if(st != null) {     
      dndService.removeMergedDropTarget(st);
     
      DragSource dragSource= (DragSource)st.getData(DND.DRAG_SOURCE_KEY);
      if (dragSource != null) {
        dragSource.dispose();
        st.setData(DND.DRAG_SOURCE_KEY, null);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.