Package org.eclipse.ltk.core.refactoring

Examples of org.eclipse.ltk.core.refactoring.RefactoringStatus.merge()


      throws CoreException, OperationCanceledException {
    final RefactoringStatus status = new RefactoringStatus();
    try {
      monitor.beginTask(Messages.ConvertConstantsToEnumRefactoring_CheckingPreconditions, 1);
      if (this.fieldsToRefactor.isEmpty())
        status
            .merge(RefactoringStatus
                .createFatalErrorStatus(Messages.ConvertConstantsToEnumRefactoring_FieldsHaveNotBeenSpecified));

      else {
        for (final Iterator it = this.fieldsToRefactor.listIterator(); it
View Full Code Here


  public RefactoringStatus checkInitialConditions(IProgressMonitor pm)
      throws CoreException {
    Assert.isNotNull(fDeleteQueries);// must be set before checking
    // activation
    RefactoringStatus result = new RefactoringStatus();
    result.merge(RefactoringStatus.create(Resources.checkInSync(ReorgUtils
        .getNotLinked(fResources))));
    IResource[] javaResources = ReorgUtils.getResources(fScriptElements);
    result.merge(RefactoringStatus.create(Resources.checkInSync(ReorgUtils
        .getNotLinked(javaResources))));
    for (int i = 0; i < fScriptElements.length; i++) {
View Full Code Here

    // activation
    RefactoringStatus result = new RefactoringStatus();
    result.merge(RefactoringStatus.create(Resources.checkInSync(ReorgUtils
        .getNotLinked(fResources))));
    IResource[] javaResources = ReorgUtils.getResources(fScriptElements);
    result.merge(RefactoringStatus.create(Resources.checkInSync(ReorgUtils
        .getNotLinked(javaResources))));
    for (int i = 0; i < fScriptElements.length; i++) {
      // IModelElement element= fScriptElements[i];
      // if (element instanceof IType && ((IType)element).isAnonymous()) {
      // // work around for bug
View Full Code Here

        confirmMovingReadOnly(reorgQueries);
        fChangeManager = createChangeManager(new SubProgressMonitor(pm,
            2), result);
        if (fUpdateQualifiedNames)
          computeQualifiedNameMatches(new SubProgressMonitor(pm, 4));
        result.merge(super.checkFinalConditions(new SubProgressMonitor(
            pm, 1), context, reorgQueries));
        return result;
      } catch (ModelException e) {
        throw e;
      } catch (CoreException e) {
View Full Code Here

      OperationCanceledException {
    RefactoringStatus status = new RefactoringStatus();
    try {
      monitor.beginTask("Checking preconditions...", 1);
      if (file == null) {
        status.merge(RefactoringStatus.createFatalErrorStatus("Config file not given"));
      }
      else if (!file.exists()) {
        status.merge(RefactoringStatus.createFatalErrorStatus(MessageFormat.format(
            "File ''{0}'' is not a " + "Spring IDE Beans Config.", new Object[] { file
                .getFullPath().toString() })));
View Full Code Here

      monitor.beginTask("Checking preconditions...", 1);
      if (file == null) {
        status.merge(RefactoringStatus.createFatalErrorStatus("Config file not given"));
      }
      else if (!file.exists()) {
        status.merge(RefactoringStatus.createFatalErrorStatus(MessageFormat.format(
            "File ''{0}'' is not a " + "Spring IDE Beans Config.", new Object[] { file
                .getFullPath().toString() })));
      }
      if (node == null) {
        status.merge(RefactoringStatus.createFatalErrorStatus("Selection not given"));
View Full Code Here

        status.merge(RefactoringStatus.createFatalErrorStatus(MessageFormat.format(
            "File ''{0}'' is not a " + "Spring IDE Beans Config.", new Object[] { file
                .getFullPath().toString() })));
      }
      if (node == null) {
        status.merge(RefactoringStatus.createFatalErrorStatus("Selection not given"));
      }
      else if (!BeansEditorUtils.hasAttribute(node, "id")) {
        status.merge(RefactoringStatus
            .createFatalErrorStatus("Selected XML element has no id"));
      }
View Full Code Here

      }
      if (node == null) {
        status.merge(RefactoringStatus.createFatalErrorStatus("Selection not given"));
      }
      else if (!BeansEditorUtils.hasAttribute(node, "id")) {
        status.merge(RefactoringStatus
            .createFatalErrorStatus("Selected XML element has no id"));
      }
    }
    finally {
      monitor.done();
View Full Code Here

  public RefactoringStatus setBeanId(String beanId) {
    this.beanId = beanId;
    RefactoringStatus status = new RefactoringStatus();
    if (!StringUtils.hasText(beanId)) {
      status.merge(RefactoringStatus.createFatalErrorStatus(getType().getType() + " id cannot be empty"));
    }
    else if (this.node != null && this.node.getOwnerDocument().getElementById(beanId) != null) {
      status
          .merge(RefactoringStatus
              .createInfoStatus(getType().getType() + " id already used in current file"));
View Full Code Here

    RefactoringStatus status = new RefactoringStatus();
    if (!StringUtils.hasText(beanId)) {
      status.merge(RefactoringStatus.createFatalErrorStatus(getType().getType() + " id cannot be empty"));
    }
    else if (this.node != null && this.node.getOwnerDocument().getElementById(beanId) != null) {
      status
          .merge(RefactoringStatus
              .createInfoStatus(getType().getType() + " id already used in current file"));
    }
    return status;
  }
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.