1 11 12 package org.eclipse.ant.internal.ui.refactoring; 13 14 import org.eclipse.core.resources.IProject; 15 import org.eclipse.core.runtime.CoreException; 16 import org.eclipse.core.runtime.IProgressMonitor; 17 import org.eclipse.ltk.core.refactoring.Change; 18 import org.eclipse.ltk.core.refactoring.RefactoringStatus; 19 import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext; 20 import org.eclipse.ltk.core.refactoring.participants.RenameParticipant; 21 22 public class LaunchConfigurationIProjectRenameParticipant extends RenameParticipant { 23 24 private IProject fProject; 25 26 29 protected boolean initialize(Object element) { 30 fProject= (IProject) element; 31 return true; 32 } 33 34 37 public String getName() { 38 return RefactoringMessages.LaunchConfigurationParticipant_0; 39 } 40 41 44 public RefactoringStatus checkConditions(IProgressMonitor pm, CheckConditionsContext context) { 45 return new RefactoringStatus(); 46 } 47 48 51 public Change createChange(IProgressMonitor pm) throws CoreException { 52 return LaunchConfigurationBuildfileChange.createChangesForProjectRename(fProject, getArguments().getNewName()); 53 } 54 } | Popular Tags |