Skip to content

Commit acf8bdb

Browse files
authored
Merge pull request #7531 from dotnet/dev/jorobich/move-shared-code
2 parents 26bea21 + 648c50f commit acf8bdb

File tree

78 files changed

+389
-339
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+389
-339
lines changed

l10n/bundle.l10n.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@
66
"Cannot create .NET debug configurations. The server is still initializing or has exited unexpectedly.": "Cannot create .NET debug configurations. The server is still initializing or has exited unexpectedly.",
77
"Cannot create .NET debug configurations. The active C# project is not within folder '{0}'.": "Cannot create .NET debug configurations. The active C# project is not within folder '{0}'.",
88
"Does not contain .NET Core projects.": "Does not contain .NET Core projects.",
9+
"pipeArgs must be a string or a string array type": "pipeArgs must be a string or a string array type",
10+
"Name not defined in current configuration.": "Name not defined in current configuration.",
11+
"Configuration \"{0}\" in launch.json does not have a {1} argument with {2} for remote process listing.": "Configuration \"{0}\" in launch.json does not have a {1} argument with {2} for remote process listing.",
12+
"Select the process to attach to": "Select the process to attach to",
13+
"Pipe transport failed to get OS and processes.": "Pipe transport failed to get OS and processes.",
14+
"Operating system \"{0}\" not supported.": "Operating system \"{0}\" not supported.",
15+
"Transport attach could not obtain processes list.": "Transport attach could not obtain processes list.",
16+
"Error Message: ": "Error Message: ",
17+
"See {0} output": "See {0} output",
918
"'{0}' was not set in the debug configuration.": "'{0}' was not set in the debug configuration.",
1019
"'{0}' request is not supported for the '{1}' configuration.": "'{0}' request is not supported for the '{1}' configuration.",
1120
"'{0}' was not provided in the debug configuration.": "'{0}' was not provided in the debug configuration.",
@@ -143,15 +152,6 @@
143152
"Package {0} download from {1} failed integrity check. Some features may not work as expected. Please restart Visual Studio Code to retrigger the download": "Package {0} download from {1} failed integrity check. Some features may not work as expected. Please restart Visual Studio Code to retrigger the download",
144153
"Failed to run test: {0}": "Failed to run test: {0}",
145154
"Failed to start debugger: {0}": "Failed to start debugger: {0}",
146-
"pipeArgs must be a string or a string array type": "pipeArgs must be a string or a string array type",
147-
"Name not defined in current configuration.": "Name not defined in current configuration.",
148-
"Configuration \"{0}\" in launch.json does not have a {1} argument with {2} for remote process listing.": "Configuration \"{0}\" in launch.json does not have a {1} argument with {2} for remote process listing.",
149-
"Select the process to attach to": "Select the process to attach to",
150-
"Pipe transport failed to get OS and processes.": "Pipe transport failed to get OS and processes.",
151-
"Operating system \"{0}\" not supported.": "Operating system \"{0}\" not supported.",
152-
"Transport attach could not obtain processes list.": "Transport attach could not obtain processes list.",
153-
"Error Message: ": "Error Message: ",
154-
"See {0} output": "See {0} output",
155155
"Text editor must be focused to fix all issues": "Text editor must be focused to fix all issues",
156156
"Fix all issues": "Fix all issues",
157157
"Select fix all action": "Select fix all action",

src/coreclrDebug/activate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ import {
1212
DebuggerPrerequisiteWarning,
1313
DebuggerPrerequisiteFailure,
1414
DebuggerNotInstalledFailure,
15-
} from '../omnisharp/loggingEvents';
15+
} from '../shared/loggingEvents';
1616
import { EventStream } from '../eventStream';
1717
import { getRuntimeDependencyPackageWithId } from '../tools/runtimeDependencyPackageUtils';
1818
import { getDotnetInfo } from '../shared/utils/getDotnetInfo';
19-
import { RemoteAttachPicker } from '../omnisharp/features/processPicker';
19+
import { RemoteAttachPicker } from '../shared/processPicker';
2020
import CompositeDisposable from '../compositeDisposable';
2121
import { BaseVsDbgConfigurationProvider } from '../shared/configurationProvider';
2222
import { omnisharpOptions } from '../shared/options';

src/eventStream.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55
import { Subject, Subscription } from 'rxjs';
6-
import { BaseEvent } from './omnisharp/loggingEvents';
6+
import { BaseEvent } from './shared/loggingEvents';
77

88
export class EventStream {
99
private sink: Subject<BaseEvent>;

src/installRuntimeDependencies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import { PlatformInformation } from './shared/platform';
7-
import { PackageInstallation, LogPlatformInfo, InstallationSuccess } from './omnisharp/loggingEvents';
7+
import { PackageInstallation, LogPlatformInfo, InstallationSuccess } from './shared/loggingEvents';
88
import { EventStream } from './eventStream';
99
import { getRuntimeDependenciesPackages } from './tools/runtimeDependencyPackageUtils';
1010
import { getAbsolutePathPackagesToInstall } from './packageManager/getAbsolutePathPackagesToInstall';

src/main.ts

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ import * as coreclrdebug from './coreclrDebug/activate';
77
import * as util from './common';
88
import * as vscode from 'vscode';
99

10-
import { ActivationFailure, ActiveTextEditorChanged } from './omnisharp/loggingEvents';
10+
import { ActivationFailure } from './shared/loggingEvents';
1111
import { CsharpChannelObserver } from './shared/observers/csharpChannelObserver';
1212
import { CsharpLoggerObserver } from './shared/observers/csharpLoggerObserver';
1313
import { EventStream } from './eventStream';
1414
import { PlatformInformation } from './shared/platform';
15-
import { TelemetryObserver } from './omnisharp/observers/telemetryObserver';
1615
import TelemetryReporter from '@vscode/extension-telemetry';
1716
import { vscodeNetworkSettingsProvider } from './networkSettings';
1817
import createOptionStream from './shared/observables/createOptionStream';
@@ -33,7 +32,6 @@ import { CSharpExtensionExports, OmnisharpExtensionExports } from './csharpExten
3332
import { csharpDevkitExtensionId, getCSharpDevKit } from './utils/getCSharpDevKit';
3433
import { BlazorDebugConfigurationProvider } from './razor/src/blazorDebug/blazorDebugConfigurationProvider';
3534
import { RoslynLanguageServerExport } from './lsptoolshost/roslynLanguageServerExportChannel';
36-
import { registerOmnisharpOptionChanges } from './omnisharp/omnisharpOptionChanges';
3735
import { RoslynLanguageServerEvents } from './lsptoolshost/languageServerEvents';
3836
import { ServerState } from './lsptoolshost/serverStateChange';
3937
import { SolutionSnapshotProvider } from './lsptoolshost/services/solutionSnapshotProvider';
@@ -87,12 +85,8 @@ export async function activate(
8785
// If the dotnet bundle is installed, this will ensure the dotnet CLI is on the path.
8886
await initializeDotnetPath();
8987

90-
const useModernNetOption = omnisharpOptions.useModernNet;
91-
const telemetryObserver = new TelemetryObserver(platformInfo, () => reporter, useModernNetOption);
92-
eventStream.subscribe(telemetryObserver.post);
93-
9488
const networkSettingsProvider = vscodeNetworkSettingsProvider(vscode);
95-
const useFramework = useOmnisharpServer && useModernNetOption !== true;
89+
const useFramework = useOmnisharpServer && omnisharpOptions.useModernNet !== true;
9690
const installDependencies: IInstallDependencies = async (dependencies: AbsolutePathPackage[]) =>
9791
downloadAndInstallPackages(dependencies, networkSettingsProvider, eventStream, isValidDownload);
9892
const runtimeDependenciesExist = await ensureRuntimeDependencies(
@@ -156,19 +150,13 @@ export async function activate(
156150
omnisharpLangServicePromise = activateOmniSharpLanguageServer(
157151
context,
158152
platformInfo,
153+
optionStream,
159154
networkSettingsProvider,
160155
eventStream,
161156
csharpChannel,
162157
dotnetTestChannel,
163-
dotnetChannel
164-
);
165-
166-
context.subscriptions.push(registerOmnisharpOptionChanges(optionStream));
167-
168-
context.subscriptions.push(
169-
vscode.window.onDidChangeActiveTextEditor(() => {
170-
eventStream.post(new ActiveTextEditorChanged());
171-
})
158+
dotnetChannel,
159+
reporter
172160
);
173161

174162
if (!razorOptions.razorDevMode) {
@@ -198,7 +186,7 @@ export async function activate(
198186
await vscode.window.showErrorMessage(errorMessage, setupButton).then((selectedItem) => {
199187
if (selectedItem === setupButton) {
200188
const remoteDebugInfoURL =
201-
'https://github.com/OmniSharp/omnisharp-vscode/wiki/Remote-Debugging-On-Linux-Arm';
189+
'https://github.com/dotnet/vscode-csharp/wiki/Remote-Debugging-On-Linux-Arm';
202190
vscode.env.openExternal(vscode.Uri.parse(remoteDebugInfoURL));
203191
}
204192
});

src/omnisharp/engines/lspEngine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { configure } from '../launcher';
99
import { LaunchTarget } from '../../shared/launchTarget';
1010
import { EventEmitter } from 'events';
1111
import { setTimeout } from 'timers';
12-
import * as ObservableEvents from '../loggingEvents';
12+
import * as ObservableEvents from '../omnisharpLoggingEvents';
1313
import { EventStream } from '../../eventStream';
1414
import CompositeDisposable from '../../compositeDisposable';
1515
import Disposable from '../../disposable';

src/omnisharp/engines/stdioEngine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { omnisharpOptions } from '../../shared/options';
1515
import { PlatformInformation } from '../../shared/platform';
1616
import { launchOmniSharp } from '../launcher';
1717
import { setTimeout } from 'timers';
18-
import * as ObservableEvents from '../loggingEvents';
18+
import * as ObservableEvents from '../omnisharpLoggingEvents';
1919
import { EventStream } from '../../eventStream';
2020
import CompositeDisposable from '../../compositeDisposable';
2121
import Disposable from '../../disposable';

src/omnisharp/features/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {
1919
CommandDotNetRestoreProgress,
2020
CommandDotNetRestoreSucceeded,
2121
CommandDotNetRestoreFailed,
22-
} from '../loggingEvents';
22+
} from '../omnisharpLoggingEvents';
2323
import { EventStream } from '../../eventStream';
2424
import { PlatformInformation } from '../../shared/platform';
2525
import CompositeDisposable from '../../compositeDisposable';

src/omnisharp/features/dotnetTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import {
2828
DotNetTestDebugStartFailure,
2929
DotNetTestRunInContextStart,
3030
DotNetTestDebugInContextStart,
31-
} from '../loggingEvents';
31+
} from '../omnisharpLoggingEvents';
3232
import { EventStream } from '../../eventStream';
3333
import LaunchConfiguration from './launchConfiguration';
3434
import Disposable from '../../disposable';

src/omnisharp/features/virtualDocumentTracker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { FileChangeType } from '../protocol';
1010
import { IDisposable } from '../../disposable';
1111
import CompositeDisposable from '../../compositeDisposable';
1212
import { EventStream } from '../../eventStream';
13-
import { DocumentSynchronizationFailure } from '../loggingEvents';
13+
import { DocumentSynchronizationFailure } from '../omnisharpLoggingEvents';
1414

1515
async function trackCurrentVirtualDocuments(server: OmniSharpServer, eventStream: EventStream) {
1616
for (let i = 0; i < workspace.textDocuments.length; i++) {

0 commit comments

Comments
 (0)