Examples of addFatalError()


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

      {
        pragmaIdentFound = true;
      }     
    }
    if (!pragmaIdentFound)
      result.addFatalError( CoreTexts.renamePragmaRefactor_noPragma );
   
    pm.done();
    return result;
  }
View Full Code Here

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

            status.addWarning(MessageFormat.format(message, new Object[] {field.getElementName()}));
            it.remove();
          }
        }
        if (this.fieldsToRefactor.isEmpty())
          status
              .addFatalError(Messages.ConvertConstantsToEnumRefactoring_PreconditionFailed);
      }

    } finally {
      monitor.done();
View Full Code Here

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

       * then only public and package default are allowed. 2. Else, if
       * enum is embedded in another type, then all visibilities are
       * allowed, but may need more checking here for private!.
       ******************************************************************/
      if (!(Flags.isPublic(flag) || Flags.isPackageDefault(flag)))
        status
            .addFatalError(Messages.ConvertConstantsToEnumRefactoring_EnumTypeMustHaveCorrectVisibility);

      EnumDeclaration newEnumDeclaration = null;
      // only add modifier if it is not package default.
      if (!Flags.isPackageDefault(flag)) {
View Full Code Here

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

       * in the text changes for rollback purposes, etc.
       ******************************************************************/
      try {
        page.createType(monitor);
      } catch (final InterruptedException E) {
        status.addFatalError(E.getMessage());
      }

      // Modify the newly created enum type.
      final IType newEnumType = page.getCreatedType();
      final CompilationUnit node = (CompilationUnit) Util.getASTNode(
View Full Code Here

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

   
    @Override
    public RefactoringStatus checkConditions(IProgressMonitor pm, CheckConditionsContext context) throws OperationCanceledException {
        RefactoringStatus status = new RefactoringStatus();
        if (file==null || file.isReadOnly())
            status.addFatalError("File don't exists or is read only");
        return status;
    }

    @Override
    public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException {
View Full Code Here

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

    @Override
    public RefactoringStatus checkConditions(IProgressMonitor pm, CheckConditionsContext context) throws OperationCanceledException {
        RefactoringStatus status = new RefactoringStatus();
        if (file==null || file.isReadOnly())
            status.addFatalError("File don't exists or is read only");
        return status;
    }

    @Override
    public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException {
View Full Code Here

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

   
    @Override
    public RefactoringStatus checkConditions(IProgressMonitor pm, CheckConditionsContext context) throws OperationCanceledException {
        RefactoringStatus status = new RefactoringStatus();
        if (file==null || file.isReadOnly())
            status.addFatalError("File don't exists or is read only");
        return status;
    }

    @Override
    public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException {
View Full Code Here

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

    @Override
    public RefactoringStatus checkConditions(IProgressMonitor pm, CheckConditionsContext context) throws OperationCanceledException {
        RefactoringStatus status = new RefactoringStatus();
        if (file==null || file.isReadOnly())
            status.addFatalError("File don't exists or is read only");
        return status;
    }

    @Override
    public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException {
View Full Code Here

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

        request.getMonitor().beginTask("Checking refactoring pre-conditions...", 100);

        RefactoringStatus status = new RefactoringStatus();
        try {
            if (!StringUtils.isWord(request.initialName)) {
                status.addFatalError("The initial name is not valid:" + request.initialName);
                return status;
            }

            if (WORDS_THAT_CANNOT_BE_RENAMED.contains(request.initialName)) {
                status.addFatalError("The token: " + request.initialName + " cannot be renamed.");
View Full Code Here

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

                status.addFatalError("The initial name is not valid:" + request.initialName);
                return status;
            }

            if (WORDS_THAT_CANNOT_BE_RENAMED.contains(request.initialName)) {
                status.addFatalError("The token: " + request.initialName + " cannot be renamed.");
                return status;
            }

            if (request.inputName != null && !StringUtils.isWord(request.inputName)) {
                status.addFatalError("The new name is not valid:" + request.inputName);
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.