| Index: pkg/analysis_server/lib/src/services/correction/sort_members.dart
|
| diff --git a/pkg/analysis_server/lib/src/services/correction/sort_members.dart b/pkg/analysis_server/lib/src/services/correction/sort_members.dart
|
| index 459236717d81475b026bbbbbb3d938fc80cd1b4a..7cf8aa51e10fb042f6a5adabcedea93f4b55e2d3 100644
|
| --- a/pkg/analysis_server/lib/src/services/correction/sort_members.dart
|
| +++ b/pkg/analysis_server/lib/src/services/correction/sort_members.dart
|
| @@ -197,11 +197,16 @@ class MemberSorter {
|
| directive.documentationComment.offset,
|
| directive.documentationComment.end);
|
| }
|
| + String annotationText;
|
| + if (directive.metadata.beginToken != null) {
|
| + annotationText = code.substring(directive.metadata.beginToken.offset,
|
| + directive.metadata.endToken.end);
|
| + }
|
| int offset = directive.firstTokenAfterCommentAndMetadata.offset;
|
| int length = directive.end - offset;
|
| String text = code.substring(offset, offset + length);
|
| - directives.add(new _DirectiveInfo(
|
| - directive, kind, uriContent, documentationText, text));
|
| + directives.add(new _DirectiveInfo(directive, kind, uriContent,
|
| + documentationText, annotationText, text));
|
| }
|
| }
|
| // nothing to do
|
| @@ -245,6 +250,10 @@ class MemberSorter {
|
| sb.write(endOfLine);
|
| }
|
| }
|
| + if (directive.annotationText != null) {
|
| + sb.write(directive.annotationText);
|
| + sb.write(endOfLine);
|
| + }
|
| sb.write(directive.text);
|
| sb.write(endOfLine);
|
| }
|
| @@ -369,10 +378,11 @@ class _DirectiveInfo implements Comparable<_DirectiveInfo> {
|
| final _DirectivePriority priority;
|
| final String uri;
|
| final String documentationText;
|
| + final String annotationText;
|
| final String text;
|
|
|
| _DirectiveInfo(this.directive, this.priority, this.uri,
|
| - this.documentationText, this.text);
|
| + this.documentationText, this.annotationText, this.text);
|
|
|
| @override
|
| int compareTo(_DirectiveInfo other) {
|
|
|