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.core.runtime.OperationCanceledException; 16 import org.eclipse.jdt.core.IPackageFragment; 17 import org.eclipse.jdt.core.IPackageFragmentRoot; 18 import org.eclipse.ltk.core.refactoring.Change; 19 import org.eclipse.ltk.core.refactoring.RefactoringStatus; 20 import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext; 21 import org.eclipse.ltk.core.refactoring.participants.MoveParticipant; 22 23 24 27 public class JavaBreakpointIPackageFragmentMoveParticipant extends MoveParticipant { 28 29 private IPackageFragment fPackage; 30 31 private IPackageFragmentRoot fDestination; 32 33 36 protected boolean initialize(Object element) { 37 fPackage= (IPackageFragment) element; 38 Object destination= getArguments().getDestination(); 39 if (destination instanceof IPackageFragmentRoot) { 40 fDestination= (IPackageFragmentRoot) destination; 41 return true; 42 } 43 return false; 44 } 45 46 49 public String getName() { 50 return RefactoringMessages.JavaBreakpointIPackageFragmentMoveParticipant_0; } 52 53 56 public RefactoringStatus checkConditions(IProgressMonitor pm, CheckConditionsContext context) throws OperationCanceledException { 57 return new RefactoringStatus(); 58 } 59 60 63 public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException { 64 return JavaBreakpointTypeChange.createChangesForPackageMove(fPackage, fDestination); 65 } 66 67 } 68 | Popular Tags |