Skip to content

Commit

Permalink
Remove experimentalNewRefactors flag for client work
Browse files Browse the repository at this point in the history
Server still uses this flag, but we shouldn't need to gate this on it (otherwise we need to change the default for the flag in two places).
  • Loading branch information
DanTup committed Oct 10, 2022
1 parent fc80e23 commit ff0d1ab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
8 changes: 3 additions & 5 deletions src/extension/analysis/analyzer_lsp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,13 @@ export class LspAnalyzer extends Analyzer {
this.snippetTextEdits = new SnippetTextEditFeature(dartCapabilities);
this.client = createClient(this.logger, sdks, dartCapabilities, wsContext, this.buildMiddleware(), this.vmServicePort);
this.fileTracker = new LspFileTracker(logger, this.client, wsContext);
if (config.experimentalNewRefactors) {
this.refactors = new InteractiveRefactors(logger, dartCapabilities);
this.client.registerFeature(this.refactors.feature);
this.disposables.push(this.refactors);
}
this.refactors = new InteractiveRefactors(logger, dartCapabilities);
this.client.registerFeature(this.snippetTextEdits.feature);
this.client.registerFeature(this.refactors.feature);
this.disposables.push({ dispose: () => this.client.stop() });
this.disposables.push(this.fileTracker);
this.disposables.push(this.snippetTextEdits);
this.disposables.push(this.refactors);

// tslint:disable-next-line: no-floating-promises
this.client.start().then(() => {
Expand Down
1 change: 0 additions & 1 deletion src/extension/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ class Config {
get enableSnippets(): boolean { return this.getConfig<boolean>("enableSnippets", true); }
get env(): any { return this.getConfig<any>("env", {}); }
get evaluateToStringInDebugViews(): boolean { return this.getConfig<boolean>("evaluateToStringInDebugViews", true); }
get experimentalNewRefactors(): boolean { return this.getConfig<boolean>("experimentalNewRefactors", false); }
get extensionLogFile(): undefined | string { return createFolderForFile(resolvePaths(this.getConfig<null | string>("extensionLogFile", null))); }
get flutterAdbConnectOnChromeOs(): boolean { return this.getConfig<boolean>("flutterAdbConnectOnChromeOs", false); }
get flutterCreateAndroidLanguage(): "java" | "kotlin" { return this.getConfig<"java" | "kotlin">("flutterCreateAndroidLanguage", "kotlin"); }
Expand Down
2 changes: 1 addition & 1 deletion src/shared/capabilities/dart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class DartCapabilities {
get supportsDartDevTools() { return versionIsAtLeast(this.version, "2.15.0"); }
get supportsDartDevToolsPathUrls() { return versionIsAtLeast(this.version, "2.18.0-0"); }
get supportsDartRunTest() { return versionIsAtLeast(this.version, "2.12.0-0"); }
get supportsMoveTopLevelToFile() { return versionIsAtLeast(this.version, "2.19.0-0"); }
get supportsMoveTopLevelToFile() { return versionIsAtLeast(this.version, "2.19.0-283"); }
get supportsNonFileSchemeWorkspaces() { return versionIsAtLeast(this.version, "2.13.0-28"); }
get supportsCommandParameterSupportedKinds() { return versionIsAtLeast(this.version, "2.19.0-283"); }
get supportsServerSnippets() { return versionIsAtLeast(this.version, "2.17.0-258"); }
Expand Down

0 comments on commit ff0d1ab

Please sign in to comment.