Package com._1c.g5.v8.dt.refactoring.ui
Class RefactoringUIHelper
- java.lang.Object
-
- com._1c.g5.v8.dt.refactoring.ui.RefactoringUIHelper
-
public final class RefactoringUIHelper extends Object
The utility class for refactoring operations.
-
-
Constructor Summary
Constructors Constructor Description RefactoringUIHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
askForResourceSaving(Collection<? extends org.eclipse.emf.ecore.EObject> objects)
Asks the user for resource saving.static Collection<IRefactoring>
initiateRefactoringsWithProgress(Supplier<Collection<IRefactoring>> refactoringSupplier)
Performs refactoring initiating with progress displaying.static IRefactoring
initiateRefactoringWithProgress(Supplier<IRefactoring> refactoringSupplier)
Performs refactoring initiating with progress displaying.static void
openDeleteWizardFor(IRefactoring refactoring, Collection<? extends org.eclipse.emf.ecore.EObject> objects)
Opens the delete refactoring wizard for the specifiedrefactoring
instance.static void
openRenameWizardFor(IRefactoring refactoring)
Opens the rename refactoring wizard for the specifiedrefactoring
instance.static void
openRenameWizardFor(Collection<IRefactoring> refactorings)
Opens the rename refactoring wizard for the specifiedrefactoring
instances.static <T extends org.eclipse.emf.ecore.EObject>
voidperformExclusiveOperation(String operationName, Collection<T> objects, Runnable operation)
Performs the exclusive refactoringoperation
.
-
-
-
Method Detail
-
performExclusiveOperation
public static <T extends org.eclipse.emf.ecore.EObject> void performExclusiveOperation(String operationName, Collection<T> objects, Runnable operation)
Performs the exclusive refactoringoperation
.- Parameters:
operationName
- the oepration name, cannot benull
.objects
- the objects is affected by the operation, cannot benull
or empty.operation
- the refactoring operation, cannot benull
.
-
initiateRefactoringWithProgress
public static IRefactoring initiateRefactoringWithProgress(Supplier<IRefactoring> refactoringSupplier)
Performs refactoring initiating with progress displaying.- Parameters:
refactoringSupplier
- the refactoring supplier, cannot benull
.- Returns:
IRefactoring
instance produced by given refactoring supplier.
-
initiateRefactoringsWithProgress
public static Collection<IRefactoring> initiateRefactoringsWithProgress(Supplier<Collection<IRefactoring>> refactoringSupplier)
Performs refactoring initiating with progress displaying.- Parameters:
refactoringSupplier
- the refactoring supplier, cannot benull
.- Returns:
IRefactoring
instance produced by given refactoring supplier.
-
openRenameWizardFor
public static void openRenameWizardFor(IRefactoring refactoring)
Opens the rename refactoring wizard for the specifiedrefactoring
instance.- Parameters:
refactoring
- the refactoring, cannot benull
.
-
openRenameWizardFor
public static void openRenameWizardFor(Collection<IRefactoring> refactorings)
Opens the rename refactoring wizard for the specifiedrefactoring
instances.- Parameters:
refactorings
- the refactorings, cannot benull
.
-
openDeleteWizardFor
public static void openDeleteWizardFor(IRefactoring refactoring, Collection<? extends org.eclipse.emf.ecore.EObject> objects)
Opens the delete refactoring wizard for the specifiedrefactoring
instance.- Parameters:
refactoring
- the refactoring, cannot benull
.objects
- the objects being deleted, cannot benull
.
-
askForResourceSaving
public static boolean askForResourceSaving(Collection<? extends org.eclipse.emf.ecore.EObject> objects)
Asks the user for resource saving.- Parameters:
objects
- the objects being refactored, cannot benull
.
-
-