Examples of addFatalError()


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

      computeMethodReturnValues();
      computePassByReferenceArguments();
      computeReplacements();
     
    } catch(RefactoringStatusException exception){
      status.addFatalError(exception.getStatusMessage());
    }
   
    if(fMustExplicitReturnParameters.size() > 1) {
      status.addFatalError(RefactoringMessages.ExtractMethodInputPage_errorMethodCannotReturnMultipleVariables);
    }
View Full Code Here

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

    } catch(RefactoringStatusException exception){
      status.addFatalError(exception.getStatusMessage());
    }
   
    if(fMustExplicitReturnParameters.size() > 1) {
      status.addFatalError(RefactoringMessages.ExtractMethodInputPage_errorMethodCannotReturnMultipleVariables);
    }

    return status;
  }
View Full Code Here

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

  public RefactoringStatus checkFinalConditions(IProgressMonitor pm)
      throws CoreException, OperationCanceledException {
    RefactoringStatus status = new RefactoringStatus();
   
    if(!Checks.checkMethodName(fMethodName).isOK()) {
      status.addFatalError(Messages.format(RefactoringMessages.ExtractMethodInputPage_errorNoValidMethodName, fMethodName));
    }
   
    for(ParameterInfo parameter : fExtractedMethodParameters)
    {
      if(!Checks.checkTypeName(parameter.getParameterName()).isOK() ) {
View Full Code Here

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

    }
   
    for(ParameterInfo parameter : fExtractedMethodParameters)
    {
      if(!Checks.checkTypeName(parameter.getParameterName()).isOK() ) {
        status.addFatalError(Messages.format(RefactoringMessages.ExtractMethodInputPage_errorNoValidParameterName, parameter.getParameterName()));
      }
    }
   
    if(fSelectedCodeContainsReturnStatement) {
      status.addFatalError(RefactoringMessages.ExtractMethodInputPage_errorContainsReturnStatement);
View Full Code Here

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

        status.addFatalError(Messages.format(RefactoringMessages.ExtractMethodInputPage_errorNoValidParameterName, parameter.getParameterName()));
      }
    }
   
    if(fSelectedCodeContainsReturnStatement) {
      status.addFatalError(RefactoringMessages.ExtractMethodInputPage_errorContainsReturnStatement);
    }
   
    if(fReturnMultipleVariables == false && fExtractedMethodReturnValues.size() > 1) {
      status.addFatalError(RefactoringMessages.ExtractMethodInputPage_errorMultipleReturnValuesNotAllowed);
    }
View Full Code Here

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

    if(fSelectedCodeContainsReturnStatement) {
      status.addFatalError(RefactoringMessages.ExtractMethodInputPage_errorContainsReturnStatement);
    }
   
    if(fReturnMultipleVariables == false && fExtractedMethodReturnValues.size() > 1) {
      status.addFatalError(RefactoringMessages.ExtractMethodInputPage_errorMultipleReturnValuesNotAllowed);
    }
   
    return status;
  }
View Full Code Here

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

        RefactoringStatus result = new RefactoringStatus();
        IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);

        URI location = file.getLocationURI();
        if (location == null) {
            result.addFatalError(String.format("The location for file %s is unknown", path));
            return result;
        }

        IFileInfo jFile = EFS.getStore(location).fetchInfo();
        if (jFile.exists()) {
View Full Code Here

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

            return result;
        }

        IFileInfo jFile = EFS.getStore(location).fetchInfo();
        if (jFile.exists()) {
            result.addFatalError(String.format("File %s already exists", path));
            return result;
        }
        return result;
    }
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
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.