Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(386)

Unified Diff: editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/ParsedAnnotation.java

Issue 189433006: Support for DartBlockBody, DartExpressionBody, DartOmit in java2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes for review comments. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
+ }
}

Powered by Google App Engine
This is Rietveld 408576698