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.IPackageFragment; 16 import org.eclipse.jdt.core.IType; 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.MoveParticipant; 21 22 23 26 public class JavaBreakpointITypeMoveParticipant extends MoveParticipant { 27 28 private IType fType; 29 private Object fDestination; 30 31 34 protected boolean initialize(Object element) { 35 fType= (IType) element; 36 fDestination= getArguments().getDestination(); 37 if (fDestination instanceof IPackageFragment || fDestination instanceof IType) { 38 return true; 39 } 40 return false; 41 } 42 43 46 public String getName() { 47 return RefactoringMessages.JavaBreakpointITypeMoveParticipant_0; } 49 50 53 public RefactoringStatus checkConditions(IProgressMonitor pm, CheckConditionsContext context) { 54 return new RefactoringStatus(); 55 } 56 57 60 public Change createChange(IProgressMonitor pm) throws CoreException { 61 return JavaBreakpointTypeChange.createChangesForTypeMove(fType, fDestination); 62 } 63 64 } 65 | Popular Tags |