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

Unified Diff: pkg/analyzer/lib/src/generated/element.dart

Issue 147903005: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/ast.dart ('k') | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/element.dart
diff --git a/pkg/analyzer/lib/src/generated/element.dart b/pkg/analyzer/lib/src/generated/element.dart
index 3dc64a0d70413aa6ee2381538b55e367be3b687b..4ecc9458db8a1aeed4d723b925350105bb575545 100644
--- a/pkg/analyzer/lib/src/generated/element.dart
+++ b/pkg/analyzer/lib/src/generated/element.dart
@@ -1870,6 +1870,11 @@ abstract class AngularDirectiveElement implements AngularHasSelectorElement {
* Return an array containing all of the properties declared by this directive.
*/
List<AngularPropertyElement> get properties;
+
+ /**
+ * Checks if this directive is implemented by the class with given name.
+ */
+ bool isClass(String name);
}
/**
@@ -6354,6 +6359,11 @@ class AngularDirectiveElementImpl extends AngularHasSelectorElementImpl implemen
List<AngularPropertyElement> get properties => _properties;
+ bool isClass(String name) {
+ Element enclosing = enclosingElement;
+ return enclosing is ClassElement && enclosing.name == name;
+ }
+
/**
* Set an array containing all of the properties declared by this directive.
*
@@ -6515,6 +6525,19 @@ class HasAttributeSelectorElementImpl extends AngularSelectorElementImpl {
}
/**
+ * Combination of [IsTagSelectorElementImpl] and [HasAttributeSelectorElementImpl].
+ */
+class IsTagHasAttributeSelectorElementImpl extends AngularSelectorElementImpl {
+ final String tagName;
+
+ final String attributeName;
+
+ IsTagHasAttributeSelectorElementImpl(this.tagName, this.attributeName) : super(null, -1);
+
+ bool apply(XmlTagNode node) => node.tag == tagName && node.getAttribute(attributeName) != null;
+}
+
+/**
* Implementation of [AngularSelectorElement] based on tag name.
*/
class IsTagSelectorElementImpl extends AngularSelectorElementImpl {
« no previous file with comments | « pkg/analyzer/lib/src/generated/ast.dart ('k') | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698