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

Unified Diff: pkg/analysis_server/lib/src/server/driver.dart

Issue 3003233002: flag to limit file and package URI completion suggestions (Closed)
Patch Set: Created 3 years, 4 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/dart/uri_contributor.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/server/driver.dart
diff --git a/pkg/analysis_server/lib/src/server/driver.dart b/pkg/analysis_server/lib/src/server/driver.dart
index 8691f9b0ac11938bf29c255bc41560116445f740..d0c8380e78d017400f50e31614a673b184fc6ae1 100644
--- a/pkg/analysis_server/lib/src/server/driver.dart
+++ b/pkg/analysis_server/lib/src/server/driver.dart
@@ -12,6 +12,8 @@ import 'package:analysis_server/src/provisional/completion/dart/completion_plugi
import 'package:analysis_server/src/server/diagnostic_server.dart';
import 'package:analysis_server/src/server/http_server.dart';
import 'package:analysis_server/src/server/stdio_server.dart';
+import 'package:analysis_server/src/services/completion/dart/uri_contributor.dart'
+ show UriContributor;
import 'package:analysis_server/src/socket_server.dart';
import 'package:analysis_server/starter.dart';
import 'package:analyzer/file_system/physical_file_system.dart';
@@ -186,6 +188,11 @@ class Driver implements ServerStarter {
*/
static const String CLIENT_VERSION = "client-version";
+ /**
+ * The name of the option used to enable DartPad specific functionality.
+ */
+ static const String DARTPAD_OPTION = "dartpad";
+
/**
* The name of the option used to enable instrumentation.
*/
@@ -334,6 +341,10 @@ class Driver implements ServerStarter {
return null;
}
+ if (results[DARTPAD_OPTION]) {
+ UriContributor.suggestFilePaths = false;
+ }
+
if (results[HELP_OPTION]) {
_printUsage(parser.parser, analytics, fromHelp: true);
return null;
@@ -482,6 +493,10 @@ class Driver implements ServerStarter {
parser.addOption(CLIENT_ID,
help: "an identifier used to identify the client");
parser.addOption(CLIENT_VERSION, help: "the version of the client");
+ parser.addFlag(DARTPAD_OPTION,
+ help: 'enable DartPad specific functionality',
+ defaultsTo: false,
+ hide: true);
parser.addFlag(ENABLE_INSTRUMENTATION_OPTION,
help: "enable sending instrumentation information to a server",
defaultsTo: false,
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/dart/uri_contributor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698