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.IJavaProject; 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 27 public class LaunchConfigurationIJavaProjectRenameParticipant extends RenameParticipant { 28 29 32 private IJavaProject fJavaProject; 33 34 37 protected boolean initialize(Object element) { 38 fJavaProject = (IJavaProject) element; 39 return true; 40 } 41 42 45 public String getName() { 46 return RefactoringMessages.LaunchConfigurationParticipant_0; 47 } 48 49 52 public RefactoringStatus checkConditions(IProgressMonitor pm, CheckConditionsContext context) { 53 return new RefactoringStatus(); 54 } 55 56 59 public Change createChange(IProgressMonitor pm) throws CoreException { 60 return JDTDebugRefactoringUtil.createChangesForProjectRename(fJavaProject, getArguments().getNewName()); 61 } 62 } 63 | Popular Tags |