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

Unified Diff: pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart

Issue 2967683002: Clean up some code in plugins (Closed)
Patch Set: Created 3 years, 6 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 | « pkg/analyzer_plugin/lib/src/protocol/protocol_internal.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart
diff --git a/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart b/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart
index 16bd03415f9d90c83f811dde80d802cd9a5f1900..b98fe4ab26cbae7a90fa74a206ae7ae9c7017a71 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart
@@ -357,7 +357,6 @@ class DartEditBuilderImpl extends EditBuilderImpl implements DartEditBuilder {
// TO-DO
write(prefix2);
writeln('// TODO: implement ${member.displayName}');
- // REVIEW: Added return statement.
if (shouldReturn) {
write(prefix2);
writeln('return null;');
@@ -978,11 +977,6 @@ class DartFileEditBuilderImpl extends FileEditBuilderImpl
*/
Set<Source> librariesToImport = new Set<Source>();
-// /**
-// * The content of the file being edited.
-// */
-// String _content;
-
/**
* Initialize a newly created builder to build a source file edit within the
* change being built by the given [changeBuilder]. The file being edited has
@@ -1273,21 +1267,6 @@ class DartFileEditBuilderImpl extends FileEditBuilderImpl
offset, insertEmptyLineBefore, insertEmptyLineAfter);
}
-// /**
-// * Return the content of the file being edited.
-// */
-// String getContent() {
-// if (_content == null) {
-// CompilationUnitElement unitElement = unit.element;
-// AnalysisContext context = unitElement.context;
-// if (context == null) {
-// throw new CancelCorrectionException();
-// }
-// _content = context.getContents(unitElement.source).data;
-// }
-// return _content;
-// }
-
/**
* Computes the best URI to import [what] into [from].
*/
@@ -1312,20 +1291,6 @@ class DartFileEditBuilderImpl extends FileEditBuilderImpl
return content.substring(offset, offset + length);
}
-// /**
-// * Returns the text of the given [AstNode] in the unit.
-// */
-// String _getNodeText(AstNode node) {
-// return _getText(node.offset, node.length);
-// }
-//
-// /**
-// * Returns the text of the given range in the unit.
-// */
-// String _getText(int offset, int length) {
-// return getContent().substring(offset, offset + length);
-// }
-
/**
* Create an edit to replace the return type of the innermost function
* containing the given [node] with the type `Future`. The [typeProvider] is
« no previous file with comments | « pkg/analyzer_plugin/lib/src/protocol/protocol_internal.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698