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

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/dart/DartServerProposal.java

Issue 1113063005: improve import suggestion (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 5 years, 8 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 | « no previous file | pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/dart/DartServerProposal.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/dart/DartServerProposal.java b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/dart/DartServerProposal.java
index c05976d9a84d4dff5ef4f85711bc1cb32362c16b..381df8b4b424613e4e2ce95268a4c98d469232d0 100644
--- a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/dart/DartServerProposal.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/dart/DartServerProposal.java
@@ -320,7 +320,7 @@ public class DartServerProposal implements ICompletionProposal, ICompletionPropo
// If Enter or '(' (when blind typing), then use linked mode.
} else {
// Insert the trigger and stop completion.
- selectionOffset = completion.length();
+ selectionOffset = suggestion.getSelectionOffset();
selectionLength = 0;
if (!isTriggerEnter) {
doc.replace(
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698