1 11 package org.eclipse.ltk.core.refactoring; 12 13 import java.util.Collections ; 14 import java.util.Map ; 15 16 import org.eclipse.ltk.internal.core.refactoring.history.DefaultRefactoringDescriptor; 17 import org.eclipse.ltk.internal.core.refactoring.history.RefactoringContributionManager; 18 19 73 public abstract class RefactoringContribution { 74 75 103 public RefactoringDescriptor createDescriptor() { 104 return null; 105 } 106 107 143 public abstract RefactoringDescriptor createDescriptor(String id, String project, String description, String comment, Map arguments, int flags); 144 145 160 public String getId() { 161 return RefactoringContributionManager.getInstance().getRefactoringId(this); 162 } 163 164 200 public Map retrieveArgumentMap(final RefactoringDescriptor descriptor) { 201 if (descriptor instanceof DefaultRefactoringDescriptor) { 202 final DefaultRefactoringDescriptor extended= (DefaultRefactoringDescriptor) descriptor; 203 return extended.getArguments(); 204 } 205 return Collections.EMPTY_MAP; 206 } 207 } 208 | Popular Tags |