Java 类org.eclipse.jdt.core.refactoring.RenameTypeArguments 实例源码

项目:che    文件:TestRenameParticipantShared.java   
public boolean initialize(Object element) {
  fgInstance = this;
  fElements.add(element);
  fArguments.add(getArguments());
  if (element instanceof IJavaElement)
    fHandles.add(((IJavaElement) element).getHandleIdentifier());
  else fHandles.add(((IResource) element).getFullPath().toString());

  IJavaElementMapper updating =
      (IJavaElementMapper) getProcessor().getAdapter(IJavaElementMapper.class);
  if ((updating != null) && getArguments() instanceof RenameTypeArguments) {
    RenameTypeArguments arguments = (RenameTypeArguments) getArguments();
    if (arguments.getUpdateSimilarDeclarations()) {
      IJavaElement[] elements = arguments.getSimilarDeclarations();
      for (int i = 0; i < elements.length; i++) {
        IJavaElement updated = updating.getRefactoredJavaElement(elements[i]);
        if (updated != null) {
          fSimilarToHandle.put(elements[i].getHandleIdentifier(), getKey(updated));
          fSimilarToNewName.put(elements[i].getHandleIdentifier(), updated.getElementName());
        }
      }
    }
  }

  return true;
}
项目:che    文件:RenameCompilationUnitProcessor.java   
@Override
protected RenameModifications computeRenameModifications() {
  RenameModifications result = new RenameModifications();
  result.rename(fCu, new RenameArguments(getNewElementName(), getUpdateReferences()));
  if (fRenameTypeProcessor != null) {
    String newTypeName = removeFileNameExtension(getNewElementName());
    RenameTypeArguments arguments =
        new RenameTypeArguments(
            newTypeName,
            getUpdateReferences(),
            getUpdateSimilarDeclarations(),
            getSimilarElements());
    result.rename(
        fRenameTypeProcessor.getType(),
        arguments,
        getUpdateSimilarDeclarations()
            ? new RenameTypeProcessor.ParticipantDescriptorFilter()
            : null);
  }
  return result;
}
项目:che    文件:RenameTypeProcessor.java   
@Override
protected RenameModifications computeRenameModifications() {
  RenameModifications result = new RenameModifications();
  result.rename(
      fType,
      new RenameTypeArguments(
          getNewElementName(),
          getUpdateReferences(),
          getUpdateSimilarDeclarations(),
          getSimilarElements()),
      createParticipantDescriptorFilter());
  if (isPrimaryType()) {
    ICompilationUnit cu = fType.getCompilationUnit();
    String newCUName = getNewCompilationUnit().getElementName();
    result.rename(cu, new RenameArguments(newCUName, getUpdateReferences()));
  }
  return result;
}
项目:che    文件:RenameTypeProcessor.java   
protected RenameArguments createRenameArguments() {
  return new RenameTypeArguments(
      getNewElementName(),
      getUpdateReferences(),
      getUpdateSimilarDeclarations(),
      getSimilarElements());
}
项目:Eclipse-Postfix-Code-Completion    文件:RenameCompilationUnitProcessor.java   
@Override
protected RenameModifications computeRenameModifications() {
    RenameModifications result= new RenameModifications();
    result.rename(fCu, new RenameArguments(getNewElementName(), getUpdateReferences()));
    if (fRenameTypeProcessor != null) {
        String newTypeName= removeFileNameExtension(getNewElementName());
        RenameTypeArguments arguments= new RenameTypeArguments(newTypeName, getUpdateReferences(), getUpdateSimilarDeclarations(), getSimilarElements());
        result.rename(fRenameTypeProcessor.getType(), arguments, getUpdateSimilarDeclarations()
            ? new RenameTypeProcessor.ParticipantDescriptorFilter()
            : null);
    }
    return result;
}
项目:Eclipse-Postfix-Code-Completion    文件:RenameTypeProcessor.java   
@Override
protected RenameModifications computeRenameModifications() {
    RenameModifications result= new RenameModifications();
    result.rename(fType, new RenameTypeArguments(getNewElementName(), getUpdateReferences(),
        getUpdateSimilarDeclarations(), getSimilarElements()), createParticipantDescriptorFilter());
    if (isPrimaryType()) {
        ICompilationUnit cu= fType.getCompilationUnit();
        String newCUName= getNewCompilationUnit().getElementName();
        result.rename(cu, new RenameArguments(newCUName, getUpdateReferences()));
    }
    return result;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:RenameCompilationUnitProcessor.java   
@Override
protected RenameModifications computeRenameModifications() {
    RenameModifications result= new RenameModifications();
    result.rename(fCu, new RenameArguments(getNewElementName(), getUpdateReferences()));
    if (fRenameTypeProcessor != null) {
        String newTypeName= removeFileNameExtension(getNewElementName());
        RenameTypeArguments arguments= new RenameTypeArguments(newTypeName, getUpdateReferences(), getUpdateSimilarDeclarations(), getSimilarElements());
        result.rename(fRenameTypeProcessor.getType(), arguments, getUpdateSimilarDeclarations()
            ? new RenameTypeProcessor.ParticipantDescriptorFilter()
            : null);
    }
    return result;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:RenameTypeProcessor.java   
@Override
protected RenameModifications computeRenameModifications() {
    RenameModifications result= new RenameModifications();
    result.rename(fType, new RenameTypeArguments(getNewElementName(), getUpdateReferences(),
        getUpdateSimilarDeclarations(), getSimilarElements()), createParticipantDescriptorFilter());
    if (isPrimaryType()) {
        ICompilationUnit cu= fType.getCompilationUnit();
        String newCUName= getNewCompilationUnit().getElementName();
        result.rename(cu, new RenameArguments(newCUName, getUpdateReferences()));
    }
    return result;
}
项目:che    文件:RenameModifications.java   
public void rename(IType type, RenameTypeArguments args, IParticipantDescriptorFilter filter) {
  add(type, args, filter);
}
项目:Eclipse-Postfix-Code-Completion    文件:RenameModifications.java   
public void rename(IType type, RenameTypeArguments args, IParticipantDescriptorFilter filter) {
    add(type, args, filter);
}
项目:Eclipse-Postfix-Code-Completion    文件:RenameTypeProcessor.java   
protected RenameArguments createRenameArguments() {
    return new RenameTypeArguments(getNewElementName(), getUpdateReferences(),
        getUpdateSimilarDeclarations(), getSimilarElements());
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:RenameModifications.java   
public void rename(IType type, RenameTypeArguments args, IParticipantDescriptorFilter filter) {
    add(type, args, filter);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:RenameTypeProcessor.java   
protected RenameArguments createRenameArguments() {
    return new RenameTypeArguments(getNewElementName(), getUpdateReferences(),
        getUpdateSimilarDeclarations(), getSimilarElements());
}