Search in sources :

Example 1 with RenamePackageChange

use of org.eclipse.jdt.ls.core.internal.corext.refactoring.changes.RenamePackageChange in project eclipse.jdt.ls by eclipse.

the class RenamePackageProcessor method createChange.

@Override
public Change createChange(IProgressMonitor monitor) throws CoreException {
    try {
        monitor.beginTask(RefactoringCoreMessages.RenamePackageRefactoring_creating_change, 1);
        final RenameJavaElementDescriptor descriptor = createRefactoringDescriptor();
        final DynamicValidationRefactoringChange result = new DynamicValidationRefactoringChange(descriptor, RefactoringCoreMessages.RenamePackageRefactoring_change_name);
        result.addAll(fChangeManager.getAllChanges());
        fRenamePackageChange = new RenamePackageChange(fPackage, getNewElementName(), fRenameSubpackages);
        result.add(fRenamePackageChange);
        monitor.worked(1);
        return result;
    } finally {
        fChangeManager = null;
        fImportsManager = null;
        monitor.done();
    }
}
Also used : DynamicValidationRefactoringChange(org.eclipse.jdt.internal.corext.refactoring.changes.DynamicValidationRefactoringChange) RenamePackageChange(org.eclipse.jdt.ls.core.internal.corext.refactoring.changes.RenamePackageChange) RenameJavaElementDescriptor(org.eclipse.jdt.core.refactoring.descriptors.RenameJavaElementDescriptor)

Aggregations

RenameJavaElementDescriptor (org.eclipse.jdt.core.refactoring.descriptors.RenameJavaElementDescriptor)1 DynamicValidationRefactoringChange (org.eclipse.jdt.internal.corext.refactoring.changes.DynamicValidationRefactoringChange)1 RenamePackageChange (org.eclipse.jdt.ls.core.internal.corext.refactoring.changes.RenamePackageChange)1