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

Unified Diff: pkg/analysis_server/lib/src/edit/edit_domain.dart

Issue 987663002: Fix for subscribing for notifications for files in packages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes for review comments. Created 5 years, 9 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
Index: pkg/analysis_server/lib/src/edit/edit_domain.dart
diff --git a/pkg/analysis_server/lib/src/edit/edit_domain.dart b/pkg/analysis_server/lib/src/edit/edit_domain.dart
index bc23ad598d6eda6ec287839267e528031b7baf20..edf92e739d3ffde4c502194dcacec4ffe3534476 100644
--- a/pkg/analysis_server/lib/src/edit/edit_domain.dart
+++ b/pkg/analysis_server/lib/src/edit/edit_domain.dart
@@ -58,12 +58,14 @@ class EditDomainHandler implements RequestHandler {
EditFormatParams params = new EditFormatParams.fromRequest(request);
String file = params.file;
- engine.AnalysisContext context = server.getAnalysisContext(file);
+ ContextSourcePair contextSource = server.getContextSourcePair(file);
+
+ engine.AnalysisContext context = contextSource.context;
if (context == null) {
return new Response.formatInvalidFile(request);
}
- Source source = server.getSource(file);
+ Source source = contextSource.source;
engine.TimestampedData<String> contents;
try {
contents = context.getContents(source);
@@ -485,8 +487,9 @@ class _RefactoringManager {
}
}
if (kind == RefactoringKind.MOVE_FILE) {
- engine.AnalysisContext context = server.getAnalysisContext(file);
- Source source = server.getSource(file);
+ ContextSourcePair contextSource = server.getContextSourcePair(file);
+ engine.AnalysisContext context = contextSource.context;
+ Source source = contextSource.source;
refactoring = new MoveFileRefactoring(
server.resourceProvider.pathContext, searchEngine, context, source);
}
« no previous file with comments | « pkg/analysis_server/lib/src/domain_execution.dart ('k') | pkg/analysis_server/test/analysis_server_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698