1 11 package org.eclipse.jdt.internal.corext.refactoring; 12 13 import java.util.Map ; 14 15 import org.eclipse.core.runtime.Assert; 16 import org.eclipse.core.runtime.CoreException; 17 18 import org.eclipse.ltk.core.refactoring.Refactoring; 19 import org.eclipse.ltk.core.refactoring.RefactoringContribution; 20 import org.eclipse.ltk.core.refactoring.RefactoringDescriptor; 21 22 27 public abstract class JavaRefactoringContribution extends RefactoringContribution { 28 29 32 public final RefactoringDescriptor createDescriptor(final String id, final String project, final String description, final String comment, final Map arguments, final int flags) { 33 return new JavaRefactoringDescriptor(this, id, project, description, comment, arguments, flags); 34 } 35 36 45 public abstract Refactoring createRefactoring(RefactoringDescriptor descriptor) throws CoreException; 46 47 50 public final Map retrieveArgumentMap(final RefactoringDescriptor descriptor) { 51 Assert.isNotNull(descriptor); 52 if (descriptor instanceof JavaRefactoringDescriptor) 53 return ((JavaRefactoringDescriptor) descriptor).getArguments(); 54 return super.retrieveArgumentMap(descriptor); 55 } 56 } 57 | Popular Tags |