本文整理汇总了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;
}
示例2: checkInitialConditions
import org.eclipse.ltk.core.refactoring.RefactoringStatus; //导入方法依赖的package包/类
public RefactoringStatus checkInitialConditions(IProgressMonitor pm) throws CoreException {
return RefactoringStatus.create(Resources.checkInSync(fResource));
}
示例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);
}
示例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);
}
示例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);
}