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

Unified Diff: pkg/analysis_server/lib/src/services/index/index_contributor.dart

Issue 725143004: Format and sort analyzer and analysis_server packages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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: pkg/analysis_server/lib/src/services/index/index_contributor.dart
diff --git a/pkg/analysis_server/lib/src/services/index/index_contributor.dart b/pkg/analysis_server/lib/src/services/index/index_contributor.dart
index 5f39378ef95aaf9c245ef7cc53302910c2c939e3..e17a66f7fb36123320748bf520e283059b1afca7 100644
--- a/pkg/analysis_server/lib/src/services/index/index_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/index/index_contributor.dart
@@ -169,9 +169,8 @@ class _AngularHtmlIndexContributor extends _ExpressionVisitor {
* [store] - the [IndexStore] to record relations into.
*/
_AngularHtmlIndexContributor(this._store) {
- _indexContributor = new _AngularHtmlIndexContributor_forEmbeddedDart(
- _store,
- this);
+ _indexContributor =
+ new _AngularHtmlIndexContributor_forEmbeddedDart(_store, this);
}
@override
@@ -252,8 +251,8 @@ class _AngularHtmlIndexContributor_forEmbeddedDart extends _IndexContributor {
final _AngularHtmlIndexContributor angularContributor;
_AngularHtmlIndexContributor_forEmbeddedDart(IndexStore store,
- this.angularContributor) : super(
- store);
+ this.angularContributor)
+ : super(store);
@override
Element peekElement() => angularContributor._htmlUnitElement;
@@ -421,18 +420,6 @@ class _IndexContributor extends GeneralizingAstVisitor<Object> {
}
@override
- Object visitEnumDeclaration(EnumDeclaration node) {
- ClassElement element = node.element;
- enterScope(element);
- try {
- _recordElementDefinition(element);
- return super.visitEnumDeclaration(node);
- } finally {
- _exitScope();
- }
- }
-
- @override
Object visitClassTypeAlias(ClassTypeAlias node) {
ClassElement element = node.element;
enterScope(element);
@@ -540,6 +527,18 @@ class _IndexContributor extends GeneralizingAstVisitor<Object> {
}
@override
+ Object visitEnumDeclaration(EnumDeclaration node) {
+ ClassElement element = node.element;
+ enterScope(element);
+ try {
+ _recordElementDefinition(element);
+ return super.visitEnumDeclaration(node);
+ } finally {
+ _exitScope();
+ }
+ }
+
+ @override
Object visitExportDirective(ExportDirective node) {
ExportElement element = node.element;
if (element != null) {
@@ -915,23 +914,6 @@ class _IndexContributor extends GeneralizingAstVisitor<Object> {
}
/**
- * Records [ImportElement] that declares given prefix and imports library with element used
- * with given prefix node.
- */
- void _recordImportElementReferenceWithPrefix(SimpleIdentifier prefixNode) {
- ImportElementInfo info = internal_getImportElementInfo(prefixNode);
- if (info != null) {
- int offset = prefixNode.offset;
- int length = info.periodEnd - offset;
- Location location = _createLocationForOffset(offset, length);
- recordRelationship(
- info.element,
- IndexConstants.IS_REFERENCED_BY,
- location);
- }
- }
-
- /**
* Records [ImportElement] reference if given [SimpleIdentifier] references some
* top-level element and not qualified with import prefix.
*/
@@ -955,6 +937,23 @@ class _IndexContributor extends GeneralizingAstVisitor<Object> {
}
/**
+ * Records [ImportElement] that declares given prefix and imports library with element used
+ * with given prefix node.
+ */
+ void _recordImportElementReferenceWithPrefix(SimpleIdentifier prefixNode) {
+ ImportElementInfo info = internal_getImportElementInfo(prefixNode);
+ if (info != null) {
+ int offset = prefixNode.offset;
+ int length = info.periodEnd - offset;
+ Location location = _createLocationForOffset(offset, length);
+ recordRelationship(
+ info.element,
+ IndexConstants.IS_REFERENCED_BY,
+ location);
+ }
+ }
+
+ /**
* Records reference to defining [CompilationUnitElement] of the given
* [LibraryElement].
*/

Powered by Google App Engine
This is Rietveld 408576698