| 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 library services.correction.assist; | 5 library services.correction.assist; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/plugin/edit/assist/assist_core.dart'; | 9 import 'package:analysis_server/plugin/edit/assist/assist_core.dart'; |
| 10 import 'package:analysis_server/src/plugin/server_plugin.dart'; | 10 import 'package:analysis_server/src/plugin/server_plugin.dart'; |
| 11 import 'package:analyzer/exception/exception.dart'; |
| 11 import 'package:analyzer/src/generated/engine.dart'; | 12 import 'package:analyzer/src/generated/engine.dart'; |
| 12 import 'package:analyzer/src/generated/java_engine.dart'; | |
| 13 import 'package:analyzer/src/generated/source.dart'; | 13 import 'package:analyzer/src/generated/source.dart'; |
| 14 | 14 |
| 15 /** | 15 /** |
| 16 * Compute and return the assists available at the given selection (described by | 16 * Compute and return the assists available at the given selection (described by |
| 17 * the [offset] and [length]) in the given [source]. The source was analyzed in | 17 * the [offset] and [length]) in the given [source]. The source was analyzed in |
| 18 * the given [analysisContext]. The [plugin] is used to get the list of assist | 18 * the given [analysisContext]. The [plugin] is used to get the list of assist |
| 19 * contributors. | 19 * contributors. |
| 20 */ | 20 */ |
| 21 Future<List<Assist>> computeAssists( | 21 Future<List<Assist>> computeAssists( |
| 22 ServerPlugin plugin, | 22 ServerPlugin plugin, |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 const AssistKind('SURROUND_WITH_FOR_IN', 30, "Surround with 'for-in'"); | 143 const AssistKind('SURROUND_WITH_FOR_IN', 30, "Surround with 'for-in'"); |
| 144 static const SURROUND_WITH_IF = | 144 static const SURROUND_WITH_IF = |
| 145 const AssistKind('SURROUND_WITH_IF', 30, "Surround with 'if'"); | 145 const AssistKind('SURROUND_WITH_IF', 30, "Surround with 'if'"); |
| 146 static const SURROUND_WITH_TRY_CATCH = const AssistKind( | 146 static const SURROUND_WITH_TRY_CATCH = const AssistKind( |
| 147 'SURROUND_WITH_TRY_CATCH', 30, "Surround with 'try-catch'"); | 147 'SURROUND_WITH_TRY_CATCH', 30, "Surround with 'try-catch'"); |
| 148 static const SURROUND_WITH_TRY_FINALLY = const AssistKind( | 148 static const SURROUND_WITH_TRY_FINALLY = const AssistKind( |
| 149 'SURROUND_WITH_TRY_FINALLY', 30, "Surround with 'try-finally'"); | 149 'SURROUND_WITH_TRY_FINALLY', 30, "Surround with 'try-finally'"); |
| 150 static const SURROUND_WITH_WHILE = | 150 static const SURROUND_WITH_WHILE = |
| 151 const AssistKind('SURROUND_WITH_WHILE', 30, "Surround with 'while'"); | 151 const AssistKind('SURROUND_WITH_WHILE', 30, "Surround with 'while'"); |
| 152 } | 152 } |
| OLD | NEW |