]> git.uio.no Git - ifi-stolz-refaktor.git/blob - case-study/jdt-after/core refactoring/org/eclipse/jdt/internal/corext/refactoring/scripting/RenameMethodRefactoringContribution.java
Some talks, mostly identical.
[ifi-stolz-refaktor.git] / case-study / jdt-after / core refactoring / org / eclipse / jdt / internal / corext / refactoring / scripting / RenameMethodRefactoringContribution.java
1 /*******************************************************************************
2  * Copyright (c) 2005, 2011 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package org.eclipse.jdt.internal.corext.refactoring.scripting;
12
13 import java.util.Map;
14
15 import org.eclipse.ltk.core.refactoring.Refactoring;
16 import org.eclipse.ltk.core.refactoring.RefactoringDescriptor;
17 import org.eclipse.ltk.core.refactoring.RefactoringStatus;
18
19 import org.eclipse.jdt.core.JavaModelException;
20 import org.eclipse.jdt.core.refactoring.IJavaRefactorings;
21 import org.eclipse.jdt.core.refactoring.descriptors.JavaRefactoringDescriptor;
22
23 import org.eclipse.jdt.internal.core.refactoring.descriptors.RefactoringSignatureDescriptorFactory;
24 import org.eclipse.jdt.internal.corext.refactoring.JavaRefactoringArguments;
25
26 /**
27  * Refactoring contribution for the rename method refactoring.
28  *
29  * @since 3.2
30  */
31 public final class RenameMethodRefactoringContribution extends JavaUIRefactoringContribution {
32
33         /**
34          * {@inheritDoc}
35          */
36         @Override
37         public Refactoring createRefactoring(JavaRefactoringDescriptor descriptor, RefactoringStatus status) throws JavaModelException {
38                 JavaRefactoringArguments arguments= new JavaRefactoringArguments(descriptor.getProject(), retrieveArgumentMap(descriptor));
39
40                 return arguments.generated_7431076020901813863(status);
41         }
42
43         @Override
44         public RefactoringDescriptor createDescriptor() {
45                 return RefactoringSignatureDescriptorFactory.createRenameJavaElementDescriptor(IJavaRefactorings.RENAME_METHOD);
46         }
47
48         @Override
49         public RefactoringDescriptor createDescriptor(String id, String project, String description, String comment, Map arguments, int flags) {
50                 return RefactoringSignatureDescriptorFactory.createRenameJavaElementDescriptor(id, project, description, comment, arguments, flags);
51         }
52 }