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

Unified Diff: pkg/analysis_server/tool/spec/codegen_tools.dart

Issue 1310263003: Reformat code to minimize churn (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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/analysis_server/tool/spec/codegen_matchers.dart ('k') | pkg/analysis_server/tool/spec/from_html.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/tool/spec/codegen_tools.dart
diff --git a/pkg/analysis_server/tool/spec/codegen_tools.dart b/pkg/analysis_server/tool/spec/codegen_tools.dart
index 45dd4be26dffcada1ed00d4cfd4f7b2f2e00703e..f3fcb5d2524403e1c191a8151225cd04bad40d34 100644
--- a/pkg/analysis_server/tool/spec/codegen_tools.dart
+++ b/pkg/analysis_server/tool/spec/codegen_tools.dart
@@ -77,7 +77,8 @@ class CodeGenerator {
try {
_state = new _CodeGeneratorState();
callback();
- var text = _state.buffer.toString().replaceAll(trailingSpacesInLineRegExp, '');
+ var text =
+ _state.buffer.toString().replaceAll(trailingSpacesInLineRegExp, '');
if (!removeTrailingNewLine) {
return text;
} else {
@@ -101,7 +102,7 @@ class CodeGenerator {
bool javadocStyle = codeGeneratorSettings.languageName == 'java';
indentBy(codeGeneratorSettings.docCommentLineLeader, () {
write(nodesToText(docs, width - _state.indent.length, javadocStyle,
- removeTrailingNewLine: removeTrailingNewLine));
+ removeTrailingNewLine: removeTrailingNewLine));
});
writeln(codeGeneratorSettings.docCommentEndMarker);
}
@@ -110,8 +111,8 @@ class CodeGenerator {
* Execute [callback], indenting any code it outputs.
*/
void indent(void callback()) {
- indentSpecial(codeGeneratorSettings.indent, codeGeneratorSettings.indent,
- callback);
+ indentSpecial(
+ codeGeneratorSettings.indent, codeGeneratorSettings.indent, callback);
}
/**
@@ -250,10 +251,14 @@ class CodeGeneratorSettings {
*/
String indent;
- CodeGeneratorSettings({this.languageName: 'java',
- this.lineCommentLineLeader: '// ', this.docCommentStartMarker: '/**',
- this.docCommentLineLeader: ' * ', this.docCommentEndMarker: ' */',
- this.commentLineLength: 99, this.indent: ' '});
+ CodeGeneratorSettings(
+ {this.languageName: 'java',
+ this.lineCommentLineLeader: '// ',
+ this.docCommentStartMarker: '/**',
+ this.docCommentLineLeader: ' * ',
+ this.docCommentEndMarker: ' */',
+ this.commentLineLength: 99,
+ this.indent: ' '});
}
abstract class GeneratedContent {
@@ -267,7 +272,6 @@ abstract class GeneratedContent {
* generated HTML). No other content should exist in the directory.
*/
class GeneratedDirectory extends GeneratedContent {
-
/**
* The path to the directory that will have the generated content.
*/
@@ -308,8 +312,9 @@ class GeneratedDirectory extends GeneratedContent {
}
}
int nonHiddenFileCount = 0;
- outputFile.listSync(recursive: false, followLinks: false).forEach(
- (FileSystemEntity fileSystemEntity) {
+ outputFile
+ .listSync(recursive: false, followLinks: false)
+ .forEach((FileSystemEntity fileSystemEntity) {
if (fileSystemEntity is File &&
!basename(fileSystemEntity.path).startsWith('.')) {
nonHiddenFileCount++;
« no previous file with comments | « pkg/analysis_server/tool/spec/codegen_matchers.dart ('k') | pkg/analysis_server/tool/spec/from_html.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698