2 * Copyright (C) 2009 The Android Open Source Project
4 * Licensed under the Eclipse Public License, Version 1.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.eclipse.org/org/documents/epl-v10.php
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package com.android.ide.eclipse.adt.internal.refactorings.extractstring;
19 import org.eclipse.ltk.core.refactoring.RefactoringContribution;
20 import org.eclipse.ltk.core.refactoring.RefactoringDescriptor;
25 * @see ExtractStringDescriptor
27 public class ExtractStringContribution extends RefactoringContribution {
30 * @see org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map, int)
32 @SuppressWarnings("unchecked")
34 public RefactoringDescriptor createDescriptor(
41 throws IllegalArgumentException {
42 return new ExtractStringDescriptor(project, description, comment, arguments);
45 @SuppressWarnings("unchecked")
47 public Map retrieveArgumentMap(RefactoringDescriptor descriptor) {
48 if (descriptor instanceof ExtractStringDescriptor) {
49 return ((ExtractStringDescriptor) descriptor).getArguments();
51 return super.retrieveArgumentMap(descriptor);