| Index: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/DartRefactoringArguments.java
|
| diff --git a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/DartRefactoringArguments.java b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/DartRefactoringArguments.java
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..49412143c90827a15f8fddecd0f7b6c1f9890d43
|
| --- /dev/null
|
| +++ b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/DartRefactoringArguments.java
|
| @@ -0,0 +1,53 @@
|
| +package com.google.dart.tools.internal.corext.refactoring;
|
| +
|
| +import com.google.dart.tools.core.refactoring.descriptors.DartRefactoringDescriptor;
|
| +
|
| +import java.util.Map;
|
| +
|
| +/**
|
| + * A wrapper around the Map received from {@link DartRefactoringDescriptor} to access and convert
|
| + * the options.
|
| + */
|
| +public final class DartRefactoringArguments {
|
| +
|
| + /** The attribute map (element type: <code><String, String></code>) */
|
| + private final Map<String, String> fAttributes;
|
| +
|
| + /** The name of the project, or <code>null</code> for the workspace */
|
| + private final String fProject;
|
| +
|
| + /**
|
| + * Creates a new refactoring arguments from arguments
|
| + *
|
| + * @param project the project, or <code>null</code> for the workspace
|
| + * @param arguments the arguments
|
| + */
|
| + public DartRefactoringArguments(String project, Map<String, String> arguments) {
|
| + fProject = project;
|
| + fAttributes = arguments;
|
| + }
|
| +
|
| + /**
|
| + * Returns the attribute with the specified name.
|
| + *
|
| + * @param name the name of the attribute
|
| + * @return the attribute value, or <code>null</code>
|
| + */
|
| + public String getAttribute(final String name) {
|
| + return fAttributes.get(name);
|
| + }
|
| +
|
| + /**
|
| + * Returns the name of the project.
|
| + *
|
| + * @return the name of the project, or <code>null</code> for the workspace
|
| + */
|
| + public String getProject() {
|
| + return fProject;
|
| + }
|
| +
|
| + @Override
|
| + public String toString() {
|
| + return getClass().getName() + fAttributes.toString();
|
| + }
|
| +}
|
|
|