File tree Expand file tree Collapse file tree 4 files changed +1
-91
lines changed Expand file tree Collapse file tree 4 files changed +1
-91
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ import CompositeDisposable from '../compositeDisposable';
2626import reportIssue from '../shared/reportIssue' ;
2727import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver' ;
2828import { getDotnetInfo } from '../shared/utils/getDotnetInfo' ;
29- import { getDecompilationAuthorization , resetDecompilationAuthorization } from '../omnisharp/decompilationPrompt' ;
3029import { IWorkspaceDebugInformationProvider } from '../shared/IWorkspaceDebugInformationProvider' ;
3130
3231export default function registerCommands (
@@ -78,26 +77,10 @@ export default function registerCommands(
7877 )
7978 ) ;
8079
81- disposable . add (
82- vscode . commands . registerCommand ( 'csharp.showDecompilationTerms' , async ( ) =>
83- showDecompilationTerms ( context , server )
84- )
85- ) ;
86-
8780 return new CompositeDisposable ( disposable ) ;
8881}
8982
90- async function showDecompilationTerms ( context : vscode . ExtensionContext , server : OmniSharpServer ) {
91- // Reset the decompilation authorization so the user will be prompted on restart.
92- resetDecompilationAuthorization ( context ) ;
93-
94- await restartOmniSharp ( context , server ) ;
95- }
96-
9783async function restartOmniSharp ( context : vscode . ExtensionContext , server : OmniSharpServer ) {
98- // Update decompilation authorization.
99- server . decompilationAuthorized = await getDecompilationAuthorization ( context ) ;
100-
10184 if ( server . isRunning ( ) ) {
10285 server . restart ( ) ;
10386 } else {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ import Disposable from '../disposable';
2020import { OmniSharpMonoResolver } from './omniSharpMonoResolver' ;
2121import { getMonoVersion } from '../utils/getMonoVersion' ;
2222import { LanguageMiddlewareFeature } from './languageMiddlewareFeature' ;
23- import { getDecompilationAuthorization } from './decompilationPrompt' ;
2423import { DotnetResolver } from './dotnetResolver' ;
2524import { Advisor } from '../features/diagnosticsProvider' ;
2625import { OmnisharpWorkspaceDebugInformationProvider } from '../omnisharpWorkspaceDebugInformationProvider' ;
@@ -50,8 +49,6 @@ export async function activate(
5049 languageMiddlewareFeature . register ( ) ;
5150 disposables . add ( languageMiddlewareFeature ) ;
5251
53- const decompilationAuthorized = await getDecompilationAuthorization ( context ) ;
54-
5552 const server = new OmniSharpServer (
5653 vscode ,
5754 provider ,
@@ -61,7 +58,6 @@ export async function activate(
6158 extensionPath ,
6259 omnisharpMonoResolver ,
6360 omnisharpDotnetResolver ,
64- decompilationAuthorized ,
6561 context ,
6662 outputChannel ,
6763 languageMiddlewareFeature
Original file line number Diff line number Diff line change @@ -115,7 +115,6 @@ export class OmniSharpServer {
115115 private extensionPath : string ,
116116 private monoResolver : IHostExecutableResolver ,
117117 private dotnetResolver : IHostExecutableResolver ,
118- public decompilationAuthorized : boolean ,
119118 private context : ExtensionContext ,
120119 private outputChannel : OutputChannel ,
121120 private languageMiddlewareFeature : LanguageMiddlewareFeature
@@ -463,7 +462,7 @@ export class OmniSharpServer {
463462 args . push ( 'FormattingOptions:OrganizeImports=true' ) ;
464463 }
465464
466- if ( this . decompilationAuthorized && omnisharpOptions . enableDecompilationSupport === true ) {
465+ if ( omnisharpOptions . enableDecompilationSupport === true ) {
467466 args . push ( 'RoslynExtensionsOptions:EnableDecompilationSupport=true' ) ;
468467 }
469468
You can’t perform that action at this time.
0 commit comments