本文整理汇总了Java中org.eclipse.ltk.core.refactoring.participants.DeleteRefactoring类的典型用法代码示例。如果您正苦于以下问题:Java DeleteRefactoring类的具体用法?Java DeleteRefactoring怎么用?Java DeleteRefactoring使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DeleteRefactoring类属于org.eclipse.ltk.core.refactoring.participants包,在下文中一共展示了DeleteRefactoring类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createRefactoring
import org.eclipse.ltk.core.refactoring.participants.DeleteRefactoring; //导入依赖的package包/类
public Refactoring createRefactoring(RefactoringStatus status) throws CoreException {
IWorkspaceRoot wsRoot = ResourcesPlugin.getWorkspace().getRoot();
IResource[] resources = new IResource[fResourcePaths.length];
for (int i = 0; i < fResourcePaths.length; i++) {
IResource resource = wsRoot.findMember(fResourcePaths[i]);
if (resource == null || !resource.exists()) {
status.addFatalError(
Messages.format(
RefactoringCoreMessages.DeleteResourcesDescriptor_error_delete_not_exists,
BasicElementLabels.getPathLabel(fResourcePaths[i], false)));
return null;
}
resources[i] = resource;
}
DeleteResourcesProcessor processor = new DeleteResourcesProcessor(resources, fDeleteContents);
return new DeleteRefactoring(processor);
}
示例2: createRefactoring
import org.eclipse.ltk.core.refactoring.participants.DeleteRefactoring; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public final Refactoring createRefactoring(JavaRefactoringDescriptor descriptor, RefactoringStatus status) throws CoreException {
JavaRefactoringArguments arguments= new JavaRefactoringArguments(descriptor.getProject(), retrieveArgumentMap(descriptor));
JavaDeleteProcessor processor= new JavaDeleteProcessor(arguments, status);
return new DeleteRefactoring(processor);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:10,代码来源:DeleteRefactoringContribution.java
示例3: startCutRefactoring
import org.eclipse.ltk.core.refactoring.participants.DeleteRefactoring; //导入依赖的package包/类
public static void startCutRefactoring(final Object[] elements, final Shell shell) throws InterruptedException, InvocationTargetException {
JavaDeleteProcessor processor= new JavaDeleteProcessor(elements);
processor.setSuggestGetterSetterDeletion(false);
processor.setQueries(new ReorgQueries(shell));
Refactoring refactoring= new DeleteRefactoring(processor);
int stopSeverity= RefactoringCore.getConditionCheckingFailedSeverity();
new RefactoringExecutionHelper(refactoring, stopSeverity, RefactoringSaveHelper.SAVE_NOTHING, shell, new ProgressMonitorDialog(shell)).perform(false, false);
}
示例4: startDeleteRefactoring
import org.eclipse.ltk.core.refactoring.participants.DeleteRefactoring; //导入依赖的package包/类
public static void startDeleteRefactoring(final Object[] elements, final Shell shell) throws CoreException {
Refactoring refactoring= new DeleteRefactoring(new JavaDeleteProcessor(elements));
DeleteUserInterfaceManager.getDefault().getStarter(refactoring).activate(refactoring, shell, RefactoringSaveHelper.SAVE_NOTHING);
}