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 16 import org.eclipse.jdt.core.IMethod; 17 import org.eclipse.jdt.core.JavaModelException; 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 JavaMethodBreakpointIMethodRenameParticipant extends RenameParticipant { 28 29 private IMethod fMethod; 30 31 public boolean initialize(Object element) { 32 fMethod= (IMethod) element; 33 try { 34 return !fMethod.getDeclaringType().isLocal(); 35 } catch (JavaModelException e) { 36 return false; 37 } 38 } 39 40 public String getName() { 41 return RefactoringMessages.JavaMethodBreakpointIMethodRenameParticipant_0; } 43 44 47 public Change createChange(IProgressMonitor pm) throws CoreException { 48 return JavaMethodBreakpointMethodNameChange.createChange(fMethod, getArguments().getNewName()); 49 } 50 51 54 public RefactoringStatus checkConditions(IProgressMonitor pm, CheckConditionsContext context) { 55 return new RefactoringStatus(); 56 } 57 } 58 | Popular Tags |