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

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

Issue 1534043002: Cache element docs (and add to completions) (#23694). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: tweaks Created 5 years 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/analyzer/lib/dart/element/element.dart
diff --git a/pkg/analyzer/lib/dart/element/element.dart b/pkg/analyzer/lib/dart/element/element.dart
index 7d74842687f108e57f674b96781e9d951811b1b5..e0efffcbe6098d9a7005e6189da8b9e12e26d37e 100644
--- a/pkg/analyzer/lib/dart/element/element.dart
+++ b/pkg/analyzer/lib/dart/element/element.dart
@@ -538,9 +538,9 @@ abstract class Element implements AnalysisTarget {
* Elements with a smaller offset will be sorted to be before elements with a
* larger name offset.
*/
- static final Comparator<Element> SORT_BY_OFFSET = (Element firstElement,
- Element secondElement) =>
- firstElement.nameOffset - secondElement.nameOffset;
+ static final Comparator<Element> SORT_BY_OFFSET =
+ (Element firstElement, Element secondElement) =>
+ firstElement.nameOffset - secondElement.nameOffset;
/**
* Return the analysis context in which this element is defined.
@@ -558,9 +558,19 @@ abstract class Element implements AnalysisTarget {
String get displayName;
/**
+ * Return the content of the documentation comment (including delimiters) for
+ * this element, or `null` if this element does not or cannot have
+ * documentation.
+ */
+ String get documentationComment;
+
+ /**
* Return the source range of the documentation comment for this element,
* or `null` if this element does not or cannot have a documentation.
+ *
+ * Deprecated. Use [documentationComment] instead.
*/
+ @deprecated
SourceRange get docRange;
/**
@@ -677,7 +687,10 @@ abstract class Element implements AnalysisTarget {
*
* Throws [AnalysisException] if the documentation comment could not be
* determined because the analysis could not be performed
+ *
+ * Deprecated. Use [documentationComment] instead.
*/
+ @deprecated
String computeDocumentationComment();
/**

Powered by Google App Engine
This is Rietveld 408576698