Search in sources :

Example 1 with MoveResourceChange

use of org.eclipse.ltk.core.refactoring.resource.MoveResourceChange in project che by eclipse.

the class MoveResourcesProcessor method createChange.

/* (non-Javadoc)
	 * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#createChange(org.eclipse.core.runtime.IProgressMonitor)
	 */
public Change createChange(IProgressMonitor pm) throws CoreException {
    //$NON-NLS-1$
    pm.beginTask("", fResourcesToMove.length);
    try {
        CompositeChange compositeChange = new CompositeChange(getMoveDescription());
        compositeChange.markAsSynthetic();
        RefactoringChangeDescriptor descriptor = new RefactoringChangeDescriptor(createDescriptor());
        for (int i = 0; i < fResourcesToMove.length; i++) {
            MoveResourceChange moveChange = new MoveResourceChange(fResourcesToMove[i], fDestination);
            moveChange.setDescriptor(descriptor);
            compositeChange.add(moveChange);
        }
        return compositeChange;
    } finally {
        pm.done();
    }
}
Also used : MoveResourceChange(org.eclipse.ltk.core.refactoring.resource.MoveResourceChange) CompositeChange(org.eclipse.ltk.core.refactoring.CompositeChange) RefactoringChangeDescriptor(org.eclipse.ltk.core.refactoring.RefactoringChangeDescriptor)

Aggregations

CompositeChange (org.eclipse.ltk.core.refactoring.CompositeChange)1 RefactoringChangeDescriptor (org.eclipse.ltk.core.refactoring.RefactoringChangeDescriptor)1 MoveResourceChange (org.eclipse.ltk.core.refactoring.resource.MoveResourceChange)1