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

Side by Side Diff: pkg/analyzer/lib/src/task/incremental_element_builder.dart

Issue 2175093002: Fix incremental element builder for added enums. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | pkg/analyzer/test/src/context/context_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.src.task.incremental_element_builder; 5 library analyzer.src.task.incremental_element_builder;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/token.dart'; 10 import 'package:analyzer/dart/ast/token.dart';
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 * same order as in [newUnit]. Existing resolution is kept where possible. 126 * same order as in [newUnit]. Existing resolution is kept where possible.
127 * 127 *
128 * Updates [unitElement] by adding/removing elements as needed. 128 * Updates [unitElement] by adding/removing elements as needed.
129 * 129 *
130 * Fills [unitDelta] with added/remove elements. 130 * Fills [unitDelta] with added/remove elements.
131 */ 131 */
132 void build() { 132 void build() {
133 _materializeLazyElements(); 133 _materializeLazyElements();
134 new CompilationUnitBuilder() 134 new CompilationUnitBuilder()
135 .buildCompilationUnit(unitSource, newUnit, librarySource); 135 .buildCompilationUnit(unitSource, newUnit, librarySource);
136 newUnit.accept(new EnumMemberBuilder(unitElement.context.typeProvider));
136 _processDirectives(); 137 _processDirectives();
137 _processUnitMembers(); 138 _processUnitMembers();
138 _replaceUnitContents(oldUnit, newUnit); 139 _replaceUnitContents(oldUnit, newUnit);
139 _findConstants(); 140 _findConstants();
140 newUnit.element = unitElement; 141 newUnit.element = unitElement;
141 unitElement.setCodeRange(0, newUnit.endToken.end); 142 unitElement.setCodeRange(0, newUnit.endToken.end);
142 } 143 }
143 144
144 void _addElementToUnitHolder(Element element) { 145 void _addElementToUnitHolder(Element element) {
145 if (element is ClassElement) { 146 if (element is ClassElement) {
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 } else if (element is ParameterElementImpl) { 736 } else if (element is ParameterElementImpl) {
736 element.setVisibleRange(newOffset, newLength); 737 element.setVisibleRange(newOffset, newLength);
737 } 738 }
738 } 739 }
739 } 740 }
740 } 741 }
741 } 742 }
742 super.visitElement(element); 743 super.visitElement(element);
743 } 744 }
744 } 745 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/context/context_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698