当前位置: 首页>>代码示例>>Java>>正文


Java RenameTypeArguments类代码示例

本文整理汇总了Java中org.eclipse.jdt.core.refactoring.RenameTypeArguments的典型用法代码示例。如果您正苦于以下问题:Java RenameTypeArguments类的具体用法?Java RenameTypeArguments怎么用?Java RenameTypeArguments使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


RenameTypeArguments类属于org.eclipse.jdt.core.refactoring包,在下文中一共展示了RenameTypeArguments类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initialize

import org.eclipse.jdt.core.refactoring.RenameTypeArguments; //导入依赖的package包/类
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;
}
 
开发者ID:eclipse,项目名称:che,代码行数:27,代码来源:TestRenameParticipantShared.java

示例2: computeRenameModifications

import org.eclipse.jdt.core.refactoring.RenameTypeArguments; //导入依赖的package包/类
@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;
}
 
开发者ID:eclipse,项目名称:che,代码行数:22,代码来源:RenameCompilationUnitProcessor.java

示例3: computeRenameModifications

import org.eclipse.jdt.core.refactoring.RenameTypeArguments; //导入依赖的package包/类
@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;
}
 
开发者ID:eclipse,项目名称:che,代码行数:19,代码来源:RenameTypeProcessor.java

示例4: createRenameArguments

import org.eclipse.jdt.core.refactoring.RenameTypeArguments; //导入依赖的package包/类
protected RenameArguments createRenameArguments() {
  return new RenameTypeArguments(
      getNewElementName(),
      getUpdateReferences(),
      getUpdateSimilarDeclarations(),
      getSimilarElements());
}
 
开发者ID:eclipse,项目名称:che,代码行数:8,代码来源:RenameTypeProcessor.java

示例5: computeRenameModifications

import org.eclipse.jdt.core.refactoring.RenameTypeArguments; //导入依赖的package包/类
@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;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:14,代码来源:RenameCompilationUnitProcessor.java

示例6: computeRenameModifications

import org.eclipse.jdt.core.refactoring.RenameTypeArguments; //导入依赖的package包/类
@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;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:13,代码来源:RenameTypeProcessor.java

示例7: rename

import org.eclipse.jdt.core.refactoring.RenameTypeArguments; //导入依赖的package包/类
public void rename(IType type, RenameTypeArguments args, IParticipantDescriptorFilter filter) {
  add(type, args, filter);
}
 
开发者ID:eclipse,项目名称:che,代码行数:4,代码来源:RenameModifications.java

示例8: rename

import org.eclipse.jdt.core.refactoring.RenameTypeArguments; //导入依赖的package包/类
public void rename(IType type, RenameTypeArguments args, IParticipantDescriptorFilter filter) {
	add(type, args, filter);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:4,代码来源:RenameModifications.java

示例9: createRenameArguments

import org.eclipse.jdt.core.refactoring.RenameTypeArguments; //导入依赖的package包/类
protected RenameArguments createRenameArguments() {
	return new RenameTypeArguments(getNewElementName(), getUpdateReferences(),
		getUpdateSimilarDeclarations(), getSimilarElements());
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:5,代码来源:RenameTypeProcessor.java


注:本文中的org.eclipse.jdt.core.refactoring.RenameTypeArguments类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。