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