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


Java Change.getName方法代码示例

本文整理汇总了Java中org.eclipse.ltk.core.refactoring.Change.getName方法的典型用法代码示例。如果您正苦于以下问题:Java Change.getName方法的具体用法?Java Change.getName怎么用?Java Change.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.ltk.core.refactoring.Change的用法示例。


在下文中一共展示了Change.getName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getAdditionalProposalInfo

import org.eclipse.ltk.core.refactoring.Change; //导入方法依赖的package包/类
public String getAdditionalProposalInfo(IProgressMonitor monitor) throws CoreException {
	StringBuffer buf= new StringBuffer();
	buf.append("<p>"); //$NON-NLS-1$
	try {
		Change change= getChange();
		if (change != null) {
			String name= change.getName();
			if (name.length() == 0) {
				return null;
			}
			buf.append(name);
		} else {
			return null;
		}
	} catch (CoreException e) {
		buf.append("Unexpected error when accessing this proposal:<p><pre>"); //$NON-NLS-1$
		buf.append(e.getLocalizedMessage());
		buf.append("</pre>"); //$NON-NLS-1$
	}
	buf.append("</p>"); //$NON-NLS-1$
	return buf.toString();
}
 
开发者ID:eclipse,项目名称:eclipse.jdt.ls,代码行数:23,代码来源:ChangeCorrectionProposal.java

示例2: getAdditionalProposalInfo

import org.eclipse.ltk.core.refactoring.Change; //导入方法依赖的package包/类
public Object getAdditionalProposalInfo(IProgressMonitor monitor) {
  StringBuffer buf = new StringBuffer();
  buf.append("<p>"); // $NON-NLS-1$
  try {
    Change change = getChange();
    if (change != null) {
      String name = change.getName();
      if (name.length() == 0) {
        return null;
      }
      buf.append(name);
    } else {
      return null;
    }
  } catch (CoreException e) {
    buf.append("Unexpected error when accessing this proposal:<p><pre>"); // $NON-NLS-1$
    buf.append(e.getLocalizedMessage());
    buf.append("</pre>"); // $NON-NLS-1$
  }
  buf.append("</p>"); // $NON-NLS-1$
  return buf.toString();
}
 
开发者ID:eclipse,项目名称:che,代码行数:23,代码来源:ChangeCorrectionProposal.java

示例3: prepareChangesInfo

import org.eclipse.ltk.core.refactoring.Change; //导入方法依赖的package包/类
/**
 * Prepare the information about changes which were applied.
 *
 * @param changes array of the applied changes
 * @param changesInfo prepared list of {@link ChangeInfo}
 */
public void prepareChangesInfo(Change[] changes, List<ChangeInfo> changesInfo) {
  for (Change ch : changes) {
    if (ch instanceof DynamicValidationStateChange) {
      prepareChangesInfo(((DynamicValidationStateChange) ch).getChildren(), changesInfo);
    } else {
      ChangeInfo changeInfo = DtoFactory.newDto(ChangeInfo.class);
      String refactoringName = ch.getName();
      if (ch instanceof UndoTextFileChange) {
        changeInfo.setName(ChangeInfo.ChangeName.UPDATE);
        changeInfo.setPath(((CompilationUnit) ch.getModifiedElement()).getPath().toString());
      }
      if (refactoringName.startsWith("Rename")) {
        if (ch instanceof RenameCompilationUnitChange) {
          prepareRenameCompilationUnitChange(changeInfo, ch);
        } else if (ch instanceof RenamePackageChange) {
          prepareRenamePackageChange(changesInfo, changeInfo, ch);
        }
      }
      if (refactoringName.startsWith("Move")) {
        prepareMoveChange(changeInfo, ch);
      }

      changesInfo.add(changeInfo);
    }
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:33,代码来源:RefactoringSession.java

示例4: DynamicValidationStateChange

import org.eclipse.ltk.core.refactoring.Change; //导入方法依赖的package包/类
public DynamicValidationStateChange(Change change) {
  super(change.getName());
  add(change);
  markAsSynthetic();
  fSchedulingRule = ResourcesPlugin.getWorkspace().getRoot();
}
 
开发者ID:eclipse,项目名称:che,代码行数:7,代码来源:DynamicValidationStateChange.java


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