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

Examples of org.aspectj.org.eclipse.jdt.core.dom.SimpleName


      TypeDeclaration typeDeclaration = (TypeDeclaration) node;
      this.createdNode = (ASTNode) typeDeclaration.bodyDeclarations().iterator().next();
      createdNodeSource = this.source;
    }
    if (this.alteredName != null) {
      SimpleName newName = this.createdNode.getAST().newSimpleName(this.alteredName);
      SimpleName oldName = rename(this.createdNode, newName);
      int nameStart = oldName.getStartPosition();
      int nameEnd = nameStart + oldName.getLength();
      StringBuffer newSource = new StringBuffer();
      if (this.source.equals(createdNodeSource)) {
        newSource.append(createdNodeSource.substring(0, nameStart));
        newSource.append(this.alteredName);
        newSource.append(createdNodeSource.substring(nameEnd));
View Full Code Here


  if (this.alteredName != null) return this.alteredName;
  return getFragment(this.createdNode).getName().getIdentifier();
}
protected SimpleName rename(ASTNode node, SimpleName newName) {
  VariableDeclarationFragment fragment = getFragment(node);
  SimpleName oldName = fragment.getName();
  fragment.setName(newName);
  return oldName;
}
View Full Code Here

              while (bodyDeclarations.hasNext()) {
                Object bodyDeclaration = bodyDeclarations.next();
                if (bodyDeclaration instanceof MethodDeclaration) {
                  MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration;
                  if (methodDeclaration.isConstructor()) {
                    SimpleName methodName = methodDeclaration.getName();
                    if (methodName.getIdentifier().equals(oldTypeName)) {
                      rewriter.replace(methodName, ast.newSimpleName(newTypeName), null);
                    }
                  }
                }
              }
View Full Code Here

private String getASTNodeName() {
  return ((AbstractTypeDeclaration) this.createdNode).getName().getIdentifier();
}
protected SimpleName rename(ASTNode node, SimpleName newName) {
  AbstractTypeDeclaration type = (AbstractTypeDeclaration) node;
  SimpleName oldName = type.getName();
  type.setName(newName);
  return oldName;
}
View Full Code Here

public String getMainTaskName(){
  return Messages.operation_createMethodProgress;
}
protected SimpleName rename(ASTNode node, SimpleName newName) {
  MethodDeclaration method = (MethodDeclaration) node;
  SimpleName oldName = method.getName();
  method.setName(newName);
  return oldName;
}
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.core.dom.SimpleName

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.