Package org.eclipse.ltk.core.refactoring

Examples of org.eclipse.ltk.core.refactoring.CheckConditionsOperation


    MoveResourcesProcessor processor = new MoveResourcesProcessor(resources);
    processor.setDestination(target);

    ProcessorBasedRefactoring refactoring = new ProcessorBasedRefactoring(
        processor);
    CheckConditionsOperation checkOp = new CheckConditionsOperation(
        refactoring, CheckConditionsOperation.ALL_CONDITIONS);
    CreateChangeOperation operation = new CreateChangeOperation(checkOp,
        RefactoringStatus.WARNING);
    PerformChangeOperation perform = new PerformChangeOperation(operation);

    try {
      ResourcesPlugin.getWorkspace().run(perform,
          new NullProgressMonitor());
    } catch (CoreException e) {
      PHPCorePlugin.log(e.getStatus());
      return false;
    }

    RefactoringStatus status = perform.getValidationStatus();

    if (status == null) {
      RefactoringStatus refactoringStatus = checkOp.getStatus();

      if (refactoringStatus != null && !refactoringStatus.isOK()) {
        MessageDialog
            .openError(fShell, Messages.ReorgMoveAction_0,
                Messages.ReorgMoveAction_1);
View Full Code Here

TOP

Related Classes of org.eclipse.ltk.core.refactoring.CheckConditionsOperation

Copyright © 2018 www.massapicom. 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.