1 11 package org.eclipse.jdt.internal.corext.refactoring.changes; 12 13 import org.eclipse.core.runtime.IPath; 14 import org.eclipse.core.runtime.IProgressMonitor; 15 16 import org.eclipse.core.resources.IProject; 17 18 import org.eclipse.ltk.core.refactoring.Change; 19 20 import org.eclipse.jdt.core.IPackageFragmentRoot; 21 import org.eclipse.jdt.core.JavaModelException; 22 23 import org.eclipse.jdt.internal.corext.refactoring.RefactoringCoreMessages; 24 import org.eclipse.jdt.internal.corext.refactoring.reorg.IPackageFragmentRootManipulationQuery; 25 import org.eclipse.jdt.internal.corext.util.Messages; 26 27 public class MovePackageFragmentRootChange extends PackageFragmentRootReorgChange { 28 29 public MovePackageFragmentRootChange(IPackageFragmentRoot root, IProject destination, IPackageFragmentRootManipulationQuery updateClasspathQuery) { 30 super(root, destination, null, updateClasspathQuery); 31 } 32 33 protected Change doPerformReorg(IPath destinationPath, IProgressMonitor pm) throws JavaModelException { 34 getRoot().move(destinationPath, getResourceUpdateFlags(), getUpdateModelFlags(false), null, pm); 35 return null; 36 } 37 38 public String getName() { 39 String [] keys= {getRoot().getElementName(), getDestinationProject().getName()}; 40 return Messages.format(RefactoringCoreMessages.MovePackageFragmentRootChange_move, keys); 41 } 42 } 43 | Popular Tags |