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

Unified Diff: pkg/analysis_server/lib/src/generated_protocol.dart

Issue 462403005: Move Location factories and RefactoringProblemSeverity.max into the generated classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rename to 'fromX'. Created 6 years, 4 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 | « no previous file | pkg/analysis_server/lib/src/protocol2.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/generated_protocol.dart
diff --git a/pkg/analysis_server/lib/src/generated_protocol.dart b/pkg/analysis_server/lib/src/generated_protocol.dart
index abf32c684e3bfbe0fcf8f5d16548eea8626d1627..affe9faf32ac7b85d1ae8faf136ae7d8ed8608f5 100644
--- a/pkg/analysis_server/lib/src/generated_protocol.dart
+++ b/pkg/analysis_server/lib/src/generated_protocol.dart
@@ -6622,16 +6622,28 @@ class Location implements HasToJson {
}
/**
- * Construct based on an element from the analyzer engine.
+ * Create a Location based on an [engine.Element].
*/
factory Location.fromElement(engine.Element element) =>
_locationFromElement(element);
/**
- * Create a Location based on an element and offset from the analyzer engine.
+ * Create a Location based on an [engine.SearchMatch].
+ */
+ factory Location.fromMatch(engine.SearchMatch match) =>
+ _locationFromMatch(match);
+
+ /**
+ * Create a Location based on an [engine.AstNode].
+ */
+ factory Location.fromNode(engine.AstNode node) =>
+ _locationFromNode(node);
+
+ /**
+ * Create a Location based on an [engine.CompilationUnit].
*/
- factory Location.fromOffset(engine.Element element, int offset, int length) =>
- _locationFromOffset(element, offset, length);
+ factory Location.fromUnit(engine.CompilationUnit unit, engine.SourceRange range) =>
+ _locationFromUnit(unit, range);
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
@@ -7583,6 +7595,12 @@ class RefactoringProblemSeverity {
throw jsonDecoder.mismatch(jsonPath, "RefactoringProblemSeverity");
}
+ /**
+ * Returns the [RefactoringProblemSeverity] with the maximal severity.
+ */
+ static RefactoringProblemSeverity max(RefactoringProblemSeverity a, RefactoringProblemSeverity b) =>
+ _maxRefactoringProblemSeverity(a, b);
+
@override
String toString() => "RefactoringProblemSeverity.$name";
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/protocol2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698