Examples of RefactoringStatus


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

        }
      },
      new SubProgressMonitor(pm, 1000)
    );

    return new RefactoringStatus();
  }
View Full Code Here

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

    if ("".equals(name)) { //$NON-NLS-1$
      return RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.Checks_Choose_name);
    }

    if (status.isOK()) {
      return new RefactoringStatus();
    } else {
      switch (status.getSeverity()){
      case IStatus.ERROR:
        return RefactoringStatus.createFatalErrorStatus(status.getMessage());
      case IStatus.WARNING:
        return RefactoringStatus.createWarningStatus(status.getMessage());
      case IStatus.INFO:
        return RefactoringStatus.createInfoStatus(status.getMessage());
      default:
        return new RefactoringStatus();
      }
    }
  }
View Full Code Here

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

    return IPHPRefactorings.RENAME_METHOD;
  }

  @Override
  protected RefactoringStatus renameDeclaration(IProgressMonitor pm) throws CoreException {
    RefactoringStatus result = super.renameDeclaration(pm);
    if (result.hasFatalError()) return result;

    for (IMethod overridingMethods: getOverridingMethods(pm)) {
      result = renameDeclaration(pm, overridingMethods, overridingMethods.getSourceModule());
      if (result.hasFatalError()) return result;
    }

    return result;
  }
View Full Code Here

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

    return result;
  }

  @Override
  protected RefactoringStatus updateReferences(IProgressMonitor pm) throws CoreException {
    RefactoringStatus result = updateReferences(pm, (IMethod) modelElement);
    if (result.hasFatalError()) return result;

    for (IMethod overridingMethods: getOverridingMethods(pm)) {
      result = updateReferences(pm, overridingMethods);
      if (result.hasFatalError()) return result;
    }

    return result;
  }
View Full Code Here

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

          }
      },
      new SubProgressMonitor(pm, 1000)
    );

    return new RefactoringStatus();
  }
View Full Code Here

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

        }
      },
      new SubProgressMonitor(pm, 1000)
    );

    return new RefactoringStatus();
  }
View Full Code Here

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

  }

  private void ensureChecked() throws CoreException {
    if (preCheckStatus == null) {
      if (refactoring.isApplicable()) {
        preCheckStatus = new RefactoringStatus();
      } else {
        preCheckStatus = RefactoringStatus.createFatalErrorStatus(DLTKUIMessages.RenameSupport_not_available);
      }
    }
  }
View Full Code Here

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

    final String references= extended.getAttribute(ScriptRefactoringDescriptor.ATTRIBUTE_REFERENCES);
    if (references != null) {
      updateReferences= Boolean.valueOf(references).booleanValue();
    } else
      return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, ScriptRefactoringDescriptor.ATTRIBUTE_REFERENCES));
    return new RefactoringStatus();
  }
View Full Code Here

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

  @Override
  protected RefactoringStatus doCheckFinalConditions(IProgressMonitor pm, CheckConditionsContext context) throws CoreException, OperationCanceledException {
    pm.beginTask("", 1); //$NON-NLS-1$

    try {
      RefactoringStatus result;

      result = checkNewElementName(getNewElementName());
      if (result.hasFatalError()) return result;

      result = renameDeclaration(pm);
      if (result.hasFatalError()) return result;

      if (updateReferences) {
        result = updateReferences(pm);
        if (result.hasFatalError()) return result;
      }

      return result;
    } finally {
      pm.done();
View Full Code Here

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

    }
    if (sourceRange != null) {
      addTextEdit(changeManager.get(sourceModule), getProcessorName(), new ReplaceEdit(sourceRange.getOffset(), modelElement.getElementName().length(), getNewElementName()));
    }

    return new RefactoringStatus();
  }
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.