| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * Tools for generating code in analyzer and analysis server. | 6 * Tools for generating code in analyzer and analysis server. |
| 7 */ | 7 */ |
| 8 library analyzer.src.codegen.tools; | 8 library analyzer.src.codegen.tools; |
| 9 | 9 |
| 10 import 'dart:io'; | 10 import 'dart:io'; |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 indentBy(codeGeneratorSettings.lineCommentLineLeader, () { | 152 indentBy(codeGeneratorSettings.lineCommentLineLeader, () { |
| 153 write(nodesToText(docs, width - _state.indent.length, false)); | 153 write(nodesToText(docs, width - _state.indent.length, false)); |
| 154 }); | 154 }); |
| 155 } | 155 } |
| 156 | 156 |
| 157 void outputHeader({bool javaStyle: false}) { | 157 void outputHeader({bool javaStyle: false}) { |
| 158 String header; | 158 String header; |
| 159 if (codeGeneratorSettings.languageName == 'java') { | 159 if (codeGeneratorSettings.languageName == 'java') { |
| 160 header = ''' | 160 header = ''' |
| 161 /* | 161 /* |
| 162 * Copyright (c) 2014, the Dart project authors. | 162 * Copyright (c) 2015, the Dart project authors. |
| 163 * | 163 * |
| 164 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except | 164 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except |
| 165 * in compliance with the License. You may obtain a copy of the License at | 165 * in compliance with the License. You may obtain a copy of the License at |
| 166 * | 166 * |
| 167 * http://www.eclipse.org/legal/epl-v10.html | 167 * http://www.eclipse.org/legal/epl-v10.html |
| 168 * | 168 * |
| 169 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License | 169 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License |
| 170 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express | 170 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express |
| 171 * or implied. See the License for the specific language governing permissions a
nd limitations under | 171 * or implied. See the License for the specific language governing permissions a
nd limitations under |
| 172 * the License. | 172 * the License. |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 if (lines.last.isEmpty) { | 598 if (lines.last.isEmpty) { |
| 599 lines.removeLast(); | 599 lines.removeLast(); |
| 600 buffer.add(new dom.Text(lines.join('\n$indent') + '\n')); | 600 buffer.add(new dom.Text(lines.join('\n$indent') + '\n')); |
| 601 indentNeeded = true; | 601 indentNeeded = true; |
| 602 } else { | 602 } else { |
| 603 buffer.add(new dom.Text(lines.join('\n$indent'))); | 603 buffer.add(new dom.Text(lines.join('\n$indent'))); |
| 604 indentNeeded = false; | 604 indentNeeded = false; |
| 605 } | 605 } |
| 606 } | 606 } |
| 607 } | 607 } |
| OLD | NEW |