Chromium Code Reviews| Index: pkg/analysis_server/lib/src/provisional/edit/utilities/change_builder_core.dart |
| diff --git a/pkg/analysis_server/lib/src/provisional/edit/utilities/change_builder_core.dart b/pkg/analysis_server/lib/src/provisional/edit/utilities/change_builder_core.dart |
| index 8c357433bbe276abfcfbf2365ce05ff20dc521da..8fbcbdf48989e1921b96f3ba6565d65c06e69e68 100644 |
| --- a/pkg/analysis_server/lib/src/provisional/edit/utilities/change_builder_core.dart |
| +++ b/pkg/analysis_server/lib/src/provisional/edit/utilities/change_builder_core.dart |
| @@ -2,11 +2,10 @@ |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| -library analysis_server.plugin.edit.utilities.change_builder_core; |
| +import 'dart:async'; |
| import 'package:analysis_server/plugin/protocol/protocol.dart'; |
| import 'package:analysis_server/src/utilities/change_builder_core.dart'; |
| -import 'package:analyzer/src/generated/source.dart'; |
| /** |
| * A builder used to build a [SourceChange]. |
| @@ -20,18 +19,20 @@ abstract class ChangeBuilder { |
| factory ChangeBuilder() = ChangeBuilderImpl; |
| /** |
| - * Return the source change that was built. |
| + * Return the source change that was built. The source change will not be |
| + * complete until all of the futures returned by [addFileEdit] have completed. |
|
scheglov
2017/02/08 21:09:10
Maybe this getter should return a Future that comp
Brian Wilkerson
2017/02/09 03:22:42
I considered that, and I'm still not completely co
|
| */ |
| SourceChange get sourceChange; |
| /** |
| * Use the [buildFileEdit] function to create a collection of edits to the |
| - * given [source]. The edits will be added to the source change that is being |
| - * built. The [timeStamp] is the time at which the [source] was last modified |
| - * and is used by clients to ensure that it is safe to apply the edits. |
| + * file with the given [path]. The edits will be added to the source change |
| + * that is being built. The [timeStamp] is the time at which the file was last |
| + * modified and is used by clients to ensure that it is safe to apply the |
| + * edits. |
| */ |
| - void addFileEdit(Source source, int timeStamp, |
| - void buildFileEdit(FileEditBuilder builder)); |
| + Future<Null> addFileEdit( |
| + String path, int timeStamp, void buildFileEdit(FileEditBuilder builder)); |
|
scheglov
2017/02/08 21:09:10
BTW, I think that ideally we should migrate from t
Brian Wilkerson
2017/02/09 03:22:42
I'm not sure we want to require clients to compute
|
| } |
| /** |