| Index: pkg/analysis_server/lib/src/protocol.dart
|
| diff --git a/pkg/analysis_server/lib/src/protocol.dart b/pkg/analysis_server/lib/src/protocol.dart
|
| index 175c166394f9a976b449493265f61ba48c3eb333..0436d0af0fc37d909ecc993e44f9849575ee4c2c 100644
|
| --- a/pkg/analysis_server/lib/src/protocol.dart
|
| +++ b/pkg/analysis_server/lib/src/protocol.dart
|
| @@ -78,6 +78,22 @@ void _addEditToSourceChange(SourceChange change, String file, int fileStamp,
|
| fileEdit.add(edit);
|
| }
|
|
|
| +
|
| +void _addElementEditToSourceChange(SourceChange change, engine.Element element,
|
| + SourceEdit edit) {
|
| + engine.AnalysisContext context = element.context;
|
| + engine.Source source = element.source;
|
| + _addSourceEditToSourceChange(change, context, source, edit);
|
| +}
|
| +
|
| +
|
| +void _addSourceEditToSourceChange(SourceChange change,
|
| + engine.AnalysisContext context, engine.Source source, SourceEdit edit) {
|
| + String file = source.fullName;
|
| + int fileStamp = context.getModificationStamp(source);
|
| + change.addEdit(file, fileStamp, edit);
|
| +}
|
| +
|
| /**
|
| * Create an AnalysisError based on error information from the analyzer
|
| * engine. Access via AnalysisError.fromEngine().
|
|
|