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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011, the Dart project authors. 2 * Copyright (c) 2014, the Dart project authors.
3 * 3 *
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u se this file except 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u se this file except
5 * in compliance with the License. You may obtain a copy of the License at 5 * in compliance with the License. You may obtain a copy of the License at
6 * 6 *
7 * http://www.eclipse.org/legal/epl-v10.html 7 * http://www.eclipse.org/legal/epl-v10.html
8 * 8 *
9 * Unless required by applicable law or agreed to in writing, software distribut ed under the License 9 * Unless required by applicable law or agreed to in writing, software distribut ed under the License
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K IND, either express 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K IND, either express
11 * or implied. See the License for the specific language governing permissions a nd limitations under 11 * or implied. See the License for the specific language governing permissions a nd limitations under
12 * the License. 12 * the License.
13 */ 13 */
14 package com.google.dart.indexer.workspace.index;
15 14
16 public abstract class QueueState { 15 package com.google.dart.java2dart;
17 16
18 public static final QueueState NORMAL = new QueueState("NORMAL") { 17 import com.google.common.collect.Maps;
19 18
20 @Override 19 import java.util.Map;
21 public boolean isAbnormal() {
22 return false;
23 }
24 20
25 }; 21 /**
22 * Value object for an annotation.
23 */
24 public class ParsedAnnotation {
25 private final String name;
26 private final Map<String, Object> values = Maps.newHashMap();
26 27
27 public static final QueueState NEEDS_RESYNC = new QueueState("NEEDS_RESYNC") { 28 public ParsedAnnotation(String name) {
28
29 };
30
31 public static final QueueState NEEDS_REBUILD = new QueueState("NEEDS_REBUILD") {
32
33 };
34
35 private final String name;
36
37 private QueueState(String name) {
38 this.name = name; 29 this.name = name;
39 } 30 }
40 31
41 public boolean isAbnormal() { 32 public Object get(String key) {
42 return true; 33 return values.get(key);
34 }
35
36 public String getName() {
37 return name;
38 }
39
40 public void put(String key, Object value) {
41 values.put(key, value);
43 } 42 }
44 43
45 @Override 44 @Override
46 public String toString() { 45 public String toString() {
47 return name; 46 return name + values;
48 } 47 }
49
50 } 48 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698