1 11 12 package org.eclipse.jdt.internal.debug.core.refactoring; 13 14 import org.eclipse.core.runtime.CoreException; 15 import org.eclipse.core.runtime.IProgressMonitor; 16 17 import org.eclipse.jdt.core.IPackageFragment; 18 19 import org.eclipse.ltk.core.refactoring.Change; 20 import org.eclipse.ltk.core.refactoring.RefactoringStatus; 21 import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext; 22 import org.eclipse.ltk.core.refactoring.participants.RenameParticipant; 23 24 public class LaunchConfigurationIPackageFragmentRenameParticipant extends RenameParticipant { 25 26 private IPackageFragment fPackageFragment; 27 28 31 protected boolean initialize(Object element) { 32 fPackageFragment= (IPackageFragment)element; 33 return true; 34 } 35 36 39 public String getName() { 40 return RefactoringMessages.LaunchConfigurationParticipant_0; 41 } 42 43 46 public RefactoringStatus checkConditions(IProgressMonitor pm, CheckConditionsContext context) { 47 return new RefactoringStatus(); 48 } 49 50 53 public Change createChange(IProgressMonitor pm) throws CoreException { 54 return JDTDebugRefactoringUtil.createChangesForPackageRename(fPackageFragment, getArguments().getNewName()); 55 } 56 } 57 | Popular Tags |