package org.ntlab.pushPullRefactoring; import java.util.Map; import org.eclipse.core.runtime.CoreException; import org.eclipse.jdt.core.refactoring.descriptors.JavaRefactoringContribution; import org.eclipse.jdt.core.refactoring.descriptors.JavaRefactoringDescriptor; import org.eclipse.ltk.core.refactoring.Refactoring; import org.eclipse.ltk.core.refactoring.RefactoringDescriptor; import org.eclipse.ltk.core.refactoring.RefactoringStatus; public class PushPullRefactoringContribution extends JavaRefactoringContribution { @Override public RefactoringDescriptor createDescriptor(String id, String project, String description, String comment, Map<String, String> arguments, int flags) throws IllegalArgumentException { return new PushPullDescriptor(); } @Override public RefactoringDescriptor createDescriptor() throws IllegalArgumentException { return new PushPullDescriptor(); } @Override public Refactoring createRefactoring(JavaRefactoringDescriptor descriptor, RefactoringStatus status) throws CoreException { if (!(descriptor instanceof PushPullDescriptor)) { status.addFatalError("Unknown Descriptor"); return null; } return new PushPullRefactoring(new PushPullProcessor((PushPullDescriptor) descriptor)); } }