Examples of ReorgMoveAction


Examples of org.eclipse.php.internal.ui.actions.ReorgMoveAction

  private void handleDropMove(final Object target) throws ModelException,
      InvocationTargetException, InterruptedException {
    List<?> elements = ((IStructuredSelection) getSelection()).toList();
    IResource[] resources = getResources(elements);

    ReorgMoveAction action = new ReorgMoveAction();
    action.init(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
    StructuredSelection selection = new StructuredSelection(resources);
    action.selectionChanged(null, selection);
    Object targetContainer = target;
    if (targetContainer instanceof IModelElement) {
      targetContainer = getResource((IModelElement) target);
    }

    if (targetContainer instanceof IContainer) {
      action.setTarget((IContainer) targetContainer);
    } else if (targetContainer instanceof IResource) {
      action.setTarget(((IResource) targetContainer).getParent());
    }
    action.run((Action) 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.