1 11 package org.eclipse.jdt.internal.debug.core.refactoring; 12 13 import org.eclipse.core.runtime.CoreException; 14 import org.eclipse.core.runtime.IProgressMonitor; 15 import org.eclipse.jdt.core.IType; 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 22 24 public class LaunchConfigurationITypeRenameParticipant extends RenameParticipant { 25 26 private IType fType; 27 28 31 protected boolean initialize(Object element) { 32 fType= (IType) 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.createChangesForTypeRename(fType, getArguments().getNewName()); 55 } 56 } 57 | Popular Tags |