Examples of CopyFilesAndFoldersOperation


Examples of org.eclipse.ui.actions.CopyFilesAndFoldersOperation

        ResourceNavigatorMessages.DropAdapter_problemsMoving, null);
    mergeStatus(problems,
        validateTarget(getCurrentTarget(), getCurrentTransfer()));

    IContainer target = getActualTarget((IResource) getCurrentTarget());
    CopyFilesAndFoldersOperation operation = new CopyFilesAndFoldersOperation(
        shell);
    operation.copyResources(sources, target);

    return problems;
  }
View Full Code Here

Examples of org.eclipse.ui.actions.CopyFilesAndFoldersOperation

      IResource[] selectedResources = getSelectedResources();

      if (selectedResources.length == 0) {
        message = ResourceNavigatorMessages.DropAdapter_dropOperationErrorOther;
      } else {
        CopyFilesAndFoldersOperation operation;
        if (lastValidOperation == DND.DROP_COPY) {
          operation = new CopyFilesAndFoldersOperation(getShell());
        } else {
          operation = new MoveFilesAndFoldersOperation(getShell());
        }
        message = operation.validateDestination(destination,
            selectedResources);
      }
    } // file import?
    else if (FileTransfer.getInstance().isSupportedType(transferType)) {
      String[] sourceNames = (String[]) FileTransfer.getInstance()
          .nativeToJava(transferType);
      if (sourceNames == null) {
        // source names will be null on Linux. Use empty names to do
        // destination validation.
        // Fixes bug 29778
        sourceNames = new String[0];
      }
      CopyFilesAndFoldersOperation copyOperation = new CopyFilesAndFoldersOperation(
          getShell());
      message = copyOperation.validateImportDestination(destination,
          sourceNames);
    }
    if (message != null) {
      return error(message);
    }
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.