Package org.aspectj.org.eclipse.jdt.core

Examples of org.aspectj.org.eclipse.jdt.core.ITypeRoot


   */
  public static ImportRewrite create(CompilationUnit astRoot, boolean restoreExistingImports) {
    if (astRoot == null) {
      throw new IllegalArgumentException("AST must not be null"); //$NON-NLS-1$
    }
    ITypeRoot typeRoot = astRoot.getTypeRoot();
    if (!(typeRoot instanceof ICompilationUnit)) {
      throw new IllegalArgumentException("AST must have been constructed from a Java element"); //$NON-NLS-1$
    }
    List existingImport= null;
    if (restoreExistingImports) {
View Full Code Here


    ASTNode root= rootNode.getRoot();
    if (!(root instanceof CompilationUnit)) {
      throw new IllegalArgumentException("This API can only be used if the AST is created from a compilation unit or class file"); //$NON-NLS-1$
    }
    CompilationUnit astRoot= (CompilationUnit) root;
    ITypeRoot typeRoot = astRoot.getTypeRoot();
    if (typeRoot == null || typeRoot.getBuffer() == null) {
      throw new IllegalArgumentException("This API can only be used if the AST is created from a compilation unit or class file"); //$NON-NLS-1$
    }
   
    char[] content= typeRoot.getBuffer().getCharacters();
    LineInformation lineInfo= LineInformation.create(astRoot);
    String lineDelim= typeRoot.findRecommendedLineSeparator();
    Map options= typeRoot.getJavaProject().getOptions(true);
   
    return internalRewriteAST(content, lineInfo, lineDelim, astRoot.getCommentList(), options, rootNode);
  }
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.core.ITypeRoot

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.