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

Unified Diff: pkg/analysis_server/lib/src/domain_completion.dart

Issue 969113002: Reformat (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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/lib/src/domain_analysis.dart ('k') | pkg/analysis_server/lib/src/domain_execution.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/domain_completion.dart
diff --git a/pkg/analysis_server/lib/src/domain_completion.dart b/pkg/analysis_server/lib/src/domain_completion.dart
index a69dbb14a5705f7521fa8bd6b41baf7bbf301183..e6bb3282603aa42b065c3da5178505f88b2e28fc 100644
--- a/pkg/analysis_server/lib/src/domain_completion.dart
+++ b/pkg/analysis_server/lib/src/domain_completion.dart
@@ -89,8 +89,8 @@ class CompletionDomainHandler implements RequestHandler {
* Return the [CompletionManager] for the given [context] and [source],
* creating a new manager or returning an existing manager as necessary.
*/
- CompletionManager completionManagerFor(AnalysisContext context,
- Source source) {
+ CompletionManager completionManagerFor(
+ AnalysisContext context, Source source) {
if (_manager != null) {
if (_manager.context == context && _manager.source == source) {
return _manager;
@@ -118,8 +118,8 @@ class CompletionDomainHandler implements RequestHandler {
}
}
- CompletionManager createCompletionManager(AnalysisContext context,
- Source source, SearchEngine searchEngine) {
+ CompletionManager createCompletionManager(
+ AnalysisContext context, Source source, SearchEngine searchEngine) {
return new CompletionManager.create(context, source, searchEngine);
}
@@ -186,12 +186,8 @@ class CompletionDomainHandler implements RequestHandler {
manager.results(completionRequest).listen((CompletionResult result) {
++notificationCount;
performance.logElapseTime("notification $notificationCount send", () {
- sendCompletionNotification(
- completionId,
- result.replacementOffset,
- result.replacementLength,
- result.suggestions,
- result.last);
+ sendCompletionNotification(completionId, result.replacementOffset,
+ result.replacementLength, result.suggestions, result.last);
});
if (notificationCount == 1) {
performance.logFirstNotificationComplete('notification 1 complete');
@@ -204,8 +200,8 @@ class CompletionDomainHandler implements RequestHandler {
}
});
// initial response without results
- return new CompletionGetSuggestionsResult(
- completionId).toResponse(request.id);
+ return new CompletionGetSuggestionsResult(completionId)
+ .toResponse(request.id);
}
/**
@@ -233,14 +229,11 @@ class CompletionDomainHandler implements RequestHandler {
* Send completion notification results.
*/
void sendCompletionNotification(String completionId, int replacementOffset,
- int replacementLength, Iterable<CompletionSuggestion> results, bool isLast) {
- server.sendNotification(
- new CompletionResultsParams(
- completionId,
- replacementOffset,
- replacementLength,
- results,
- isLast).toNotification());
+ int replacementLength, Iterable<CompletionSuggestion> results,
+ bool isLast) {
+ server.sendNotification(new CompletionResultsParams(
+ completionId, replacementOffset, replacementLength, results, isLast)
+ .toNotification());
}
/**
@@ -248,7 +241,6 @@ class CompletionDomainHandler implements RequestHandler {
* the cache changes or if any source is added, removed, or deleted.
*/
void sourcesChanged(SourcesChangedEvent event) {
-
bool shouldDiscardManager(SourcesChangedEvent event) {
if (_manager == null) {
return false;
@@ -258,7 +250,8 @@ class CompletionDomainHandler implements RequestHandler {
}
var changedSources = event.changedSources;
return changedSources.length > 2 ||
- (changedSources.length == 1 && !changedSources.contains(_manager.source));
+ (changedSources.length == 1 &&
+ !changedSources.contains(_manager.source));
}
if (shouldDiscardManager(event)) {
« no previous file with comments | « pkg/analysis_server/lib/src/domain_analysis.dart ('k') | pkg/analysis_server/lib/src/domain_execution.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698