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

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


    List existingImport= null;
    if (restoreExistingImports) {
      existingImport= new ArrayList();
      IImportDeclaration[] imports= cu.getImports();
      for (int i= 0; i < imports.length; i++) {
        IImportDeclaration curr= imports[i];
        char prefix= Flags.isStatic(curr.getFlags()) ? STATIC_PREFIX : NORMAL_PREFIX;     
        existingImport.add(prefix + curr.getElementName());
      }
    }
    return new ImportRewrite(cu, null, existingImport);
  }
View Full Code Here


    IJavaElement dest = getDestinationParent(element);
    switch (element.getElementType()) {
      case IJavaElement.PACKAGE_DECLARATION :
        return new CreatePackageDeclarationOperation(element.getElementName(), (ICompilationUnit) dest);
      case IJavaElement.IMPORT_DECLARATION :
        IImportDeclaration importDeclaration = (IImportDeclaration) element;
        return new CreateImportOperation(element.getElementName(), (ICompilationUnit) dest, importDeclaration.getFlags());
      case IJavaElement.TYPE :
        if (isRenamingMainType(element, dest)) {
          IPath path = element.getPath();
          String extension = path.getFileExtension();
          return new RenameResourceElementsOperation(new IJavaElement[] {dest}, new IJavaElement[] {dest.getParent()}, new String[]{getNewNameFor(element) + '.' + extension}, this.force);
View Full Code Here

TOP

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

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.