Package org.eclipse.jdt.internal.compiler.problem

Examples of org.eclipse.jdt.internal.compiler.problem.AbortCompilationUnit


    case AbortType :
      throw new AbortType(this.compilationResult, problem);
    case AbortMethod :
      throw new AbortMethod(this.compilationResult, problem);
    default :
      throw new AbortCompilationUnit(this.compilationResult, problem);
  }
}
View Full Code Here


  // otherwise retrieve it
  try {
    return Util.getFileCharContent(new File(new String(this.fileName)), this.encoding);
  } catch (IOException e) {
    this.contents = CharOperation.NO_CHAR; // assume no source if asked again
    throw new AbortCompilationUnit(null, e, this.encoding);
  }
}
View Full Code Here

      if (JavaModelManager.getJavaModelManager().abortOnMissingSource.get() == Boolean.TRUE) {
        IOException ioException =
          e.getJavaModelStatus().getCode() == IJavaModelStatusConstants.IO_EXCEPTION ?
            (IOException)e.getException() :
            new IOException(e.getMessage());
        throw new AbortCompilationUnit(null, ioException, encoding);
      } else {
        Util.log(e, Messages.bind(Messages.file_notFound, file.getFullPath().toString()));
      }
      return CharOperation.NO_CHAR;
    }
  }
  char[] contents = buffer.getCharacters();
  if (contents == null) { // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=129814
    if (JavaModelManager.getJavaModelManager().abortOnMissingSource.get() == Boolean.TRUE) {
      IOException ioException = new IOException(Messages.buffer_closed);
      IFile file = (IFile) getResource();
      // Get encoding from file
      String encoding;
      try {
        encoding = file.getCharset();
      } catch(CoreException ce) {
        // do not use any encoding
        encoding = null;
      }
      throw new AbortCompilationUnit(null, ioException, encoding);
    }
    return CharOperation.NO_CHAR;
  }
  return contents;
}
View Full Code Here

      if (JavaModelManager.getJavaModelManager().abortOnMissingSource.get() == Boolean.TRUE) {
        IOException ioException =
          e.getJavaModelStatus().getCode() == IJavaModelStatusConstants.IO_EXCEPTION ?
            (IOException)e.getException() :
            new IOException(e.getMessage());
        throw new AbortCompilationUnit(null, ioException, encoding);
      } else {
        Util.log(e, Messages.bind(Messages.file_notFound, file.getFullPath().toString()));
      }
      return CharOperation.NO_CHAR;
    }
  }
  char[] contents = buffer.getCharacters();
  if (contents == null) { // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=129814
    if (JavaModelManager.getJavaModelManager().abortOnMissingSource.get() == Boolean.TRUE) {
      IOException ioException = new IOException(Messages.buffer_closed);
      IFile file = (IFile) getResource();
      // Get encoding from file
      String encoding;
      try {
        encoding = file.getCharset();
      } catch(CoreException ce) {
        // do not use any encoding
        encoding = null;
      }
      throw new AbortCompilationUnit(null, ioException, encoding);
    }
    return CharOperation.NO_CHAR;
  }
  return contents;
}
View Full Code Here

  // otherwise retrieve it
  try {
    return Util.getFileCharContent(new File(new String(this.fileName)), this.encoding);
  } catch (IOException e) {
    this.contents = CharOperation.NO_CHAR; // assume no source if asked again
    throw new AbortCompilationUnit(null, e, this.encoding);
  }
}
View Full Code Here

    case AbortType :
      throw new AbortType(this.compilationResult, problem);
    case AbortMethod :
      throw new AbortMethod(this.compilationResult, problem);
    default :
      throw new AbortCompilationUnit(this.compilationResult, problem);
  }
}
View Full Code Here

        public char[] getContents() {
          try {
            return javaFileObject.getCharContent(true).toString().toCharArray();
          } catch(IOException e) {
            e.printStackTrace();
            throw new AbortCompilationUnit(null, e, null);
          }
        }
      };
      units.add(compilationUnit);
      this.javaFileObjectMap.put(compilationUnit, javaFileObject);
View Full Code Here

      if (JavaModelManager.getJavaModelManager().abortOnMissingSource.get() == Boolean.TRUE) {
        IOException ioException =
          e.getJavaModelStatus().getCode() == IJavaModelStatusConstants.IO_EXCEPTION ?
            (IOException)e.getException() :
            new IOException(e.getMessage());
        throw new AbortCompilationUnit(null, ioException, encoding);
      } else {
        Util.log(e, Messages.bind(Messages.file_notFound, file.getFullPath().toString()));
      }
      return CharOperation.NO_CHAR;
    }
  }
  char[] contents = buffer.getCharacters();
  if (contents == null) { // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=129814
    if (JavaModelManager.getJavaModelManager().abortOnMissingSource.get() == Boolean.TRUE) {
      IOException ioException = new IOException(Messages.buffer_closed);
      IFile file = (IFile) getResource();
      // Get encoding from file
      String encoding;
      try {
        encoding = file.getCharset();
      } catch(CoreException ce) {
        // do not use any encoding
        encoding = null;
      }
      throw new AbortCompilationUnit(null, ioException, encoding);
    }
    return CharOperation.NO_CHAR;
  }
  return contents;
}
View Full Code Here

        public char[] getContents() {
          try {
            return javaFileObject.getCharContent(true).toString().toCharArray();
          } catch(IOException e) {
            e.printStackTrace();
            throw new AbortCompilationUnit(null, e, null);
          }
        }
      };
      units.add(compilationUnit);
      this.javaFileObjectMap.put(compilationUnit, javaFileObject);
View Full Code Here

    case AbortType :
      throw new AbortType(this.compilationResult, problem);
    case AbortMethod :
      throw new AbortMethod(this.compilationResult, problem);
    default :
      throw new AbortCompilationUnit(this.compilationResult, problem);
  }
}
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.compiler.problem.AbortCompilationUnit

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.