| Index: editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/ParsedAnnotation.java
|
| diff --git a/editor/attic/plugins/com.google.dart.indexer/src/com/google/dart/indexer/workspace/index/QueueState.java b/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/ParsedAnnotation.java
|
| similarity index 55%
|
| copy from editor/attic/plugins/com.google.dart.indexer/src/com/google/dart/indexer/workspace/index/QueueState.java
|
| copy to editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/ParsedAnnotation.java
|
| index 6bd1bc16711e2d4e34a34e1200f6c3ebfc7ef1b2..d3538160b64325f22b9f5ff53385d9789bc8b24b 100644
|
| --- a/editor/attic/plugins/com.google.dart.indexer/src/com/google/dart/indexer/workspace/index/QueueState.java
|
| +++ b/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/ParsedAnnotation.java
|
| @@ -1,5 +1,5 @@
|
| /*
|
| - * Copyright (c) 2011, the Dart project authors.
|
| + * Copyright (c) 2014, the Dart project authors.
|
| *
|
| * Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except
|
| * in compliance with the License. You may obtain a copy of the License at
|
| @@ -11,40 +11,38 @@
|
| * or implied. See the License for the specific language governing permissions and limitations under
|
| * the License.
|
| */
|
| -package com.google.dart.indexer.workspace.index;
|
|
|
| -public abstract class QueueState {
|
| +package com.google.dart.java2dart;
|
|
|
| - public static final QueueState NORMAL = new QueueState("NORMAL") {
|
| +import com.google.common.collect.Maps;
|
|
|
| - @Override
|
| - public boolean isAbnormal() {
|
| - return false;
|
| - }
|
| -
|
| - };
|
| -
|
| - public static final QueueState NEEDS_RESYNC = new QueueState("NEEDS_RESYNC") {
|
| -
|
| - };
|
| -
|
| - public static final QueueState NEEDS_REBUILD = new QueueState("NEEDS_REBUILD") {
|
| -
|
| - };
|
| +import java.util.Map;
|
|
|
| +/**
|
| + * Value object for an annotation.
|
| + */
|
| +public class ParsedAnnotation {
|
| private final String name;
|
| + private final Map<String, Object> values = Maps.newHashMap();
|
|
|
| - private QueueState(String name) {
|
| + public ParsedAnnotation(String name) {
|
| this.name = name;
|
| }
|
|
|
| - public boolean isAbnormal() {
|
| - return true;
|
| + public Object get(String key) {
|
| + return values.get(key);
|
| }
|
|
|
| - @Override
|
| - public String toString() {
|
| + public String getName() {
|
| return name;
|
| }
|
|
|
| + public void put(String key, Object value) {
|
| + values.put(key, value);
|
| + }
|
| +
|
| + @Override
|
| + public String toString() {
|
| + return name + values;
|
| + }
|
| }
|
|
|