| Index: dart/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/element/ElementImpl.java
|
| ===================================================================
|
| --- dart/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/element/ElementImpl.java (revision 29808)
|
| +++ dart/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/element/ElementImpl.java (working copy)
|
| @@ -16,11 +16,13 @@
|
| import com.google.dart.engine.ast.Identifier;
|
| import com.google.dart.engine.context.AnalysisContext;
|
| import com.google.dart.engine.context.AnalysisException;
|
| +import com.google.dart.engine.element.ConstructorElement;
|
| import com.google.dart.engine.element.Element;
|
| import com.google.dart.engine.element.ElementAnnotation;
|
| import com.google.dart.engine.element.ElementLocation;
|
| import com.google.dart.engine.element.ElementVisitor;
|
| import com.google.dart.engine.element.LibraryElement;
|
| +import com.google.dart.engine.element.PropertyAccessorElement;
|
| import com.google.dart.engine.source.Source;
|
| import com.google.dart.engine.utilities.collection.BooleanArray;
|
| import com.google.dart.engine.utilities.general.StringUtilities;
|
| @@ -197,6 +199,28 @@
|
| }
|
|
|
| @Override
|
| + public boolean isDeprecated() {
|
| + for (ElementAnnotation annotation : metadata) {
|
| + Element element = annotation.getElement();
|
| + if (element != null) {
|
| + LibraryElement lib = element.getLibrary();
|
| + if (lib != null && lib.isDartCore()) {
|
| + if (element instanceof ConstructorElement) {
|
| + ConstructorElement constructorElement = (ConstructorElement) element;
|
| + if (constructorElement.getEnclosingElement().getName().equals("Deprecated")) {
|
| + return true;
|
| + }
|
| + } else if (element instanceof PropertyAccessorElement
|
| + && element.getName().equals("deprecated")) {
|
| + return true;
|
| + }
|
| + }
|
| + }
|
| + }
|
| + return false;
|
| + }
|
| +
|
| + @Override
|
| public boolean isSynthetic() {
|
| return hasModifier(Modifier.SYNTHETIC);
|
| }
|
|
|