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


Java RefactoringStatus.create方法代码示例

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


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

示例1: validateNewElementName

import org.eclipse.ltk.core.refactoring.RefactoringStatus; //导入方法依赖的package包/类
/**
 * Validates if the a name is valid. This method does not change the name settings on the
 * refactoring. It is intended to be used in a wizard to validate user input.
 *
 * @param newName the name to validate
 * @return returns the resulting status of the validation
 */
public RefactoringStatus validateNewElementName(String newName) {
  Assert.isNotNull(newName, "new name"); // $NON-NLS-1$
  IContainer c = fResource.getParent();
  if (c == null)
    return RefactoringStatus.createFatalErrorStatus(
        RefactoringCoreMessages.RenameResourceProcessor_error_no_parent);

  if (!c.getFullPath().isValidSegment(newName))
    return RefactoringStatus.createFatalErrorStatus(
        RefactoringCoreMessages.RenameResourceProcessor_error_invalid_name);

  if (c.findMember(newName) != null)
    return RefactoringStatus.createFatalErrorStatus(
        RefactoringCoreMessages.RenameResourceProcessor_error_resource_already_exists);

  RefactoringStatus result =
      RefactoringStatus.create(c.getWorkspace().validateName(newName, fResource.getType()));
  if (!result.hasFatalError())
    result.merge(
        RefactoringStatus.create(
            c.getWorkspace().validatePath(createNewPath(newName), fResource.getType())));
  return result;
}
 
开发者ID:eclipse,项目名称:che,代码行数:31,代码来源:RenameResourceProcessor.java

示例2: checkInitialConditions

import org.eclipse.ltk.core.refactoring.RefactoringStatus; //导入方法依赖的package包/类
public RefactoringStatus checkInitialConditions(IProgressMonitor pm) throws CoreException {
  return RefactoringStatus.create(Resources.checkInSync(fResource));
}
 
开发者ID:eclipse,项目名称:che,代码行数:4,代码来源:RenameResourceProcessor.java

示例3: checkInitialConditions

import org.eclipse.ltk.core.refactoring.RefactoringStatus; //导入方法依赖的package包/类
@Override
public RefactoringStatus checkInitialConditions(IProgressMonitor pm) throws CoreException,
		OperationCanceledException {
	return RefactoringStatus.create(Status.OK_STATUS);
}
 
开发者ID:secondfiddle,项目名称:pep-tools,代码行数:6,代码来源:EmptyRefactoring.java

示例4: checkFinalConditions

import org.eclipse.ltk.core.refactoring.RefactoringStatus; //导入方法依赖的package包/类
@Override
public RefactoringStatus checkFinalConditions(IProgressMonitor pm) throws CoreException, OperationCanceledException {
	return RefactoringStatus.create(Status.OK_STATUS);
}
 
开发者ID:secondfiddle,项目名称:pep-tools,代码行数:5,代码来源:EmptyRefactoring.java

示例5: checkConditions

import org.eclipse.ltk.core.refactoring.RefactoringStatus; //导入方法依赖的package包/类
@Override
public RefactoringStatus checkConditions(IProgressMonitor pm, CheckConditionsContext context) throws OperationCanceledException {
	return RefactoringStatus.create(Status.OK_STATUS);
}
 
开发者ID:umlet,项目名称:umlet,代码行数:5,代码来源:MoveClassParticipant.java


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