@@ -2,9 +2,6 @@ import CommandFactory from './command-factory';
2
2
import ContentProvider from './content-provider' ;
3
3
import { EXTENSION_NAMESPACE , EXTENSION_SCHEME } from './const' ;
4
4
import { ExecutionContextLike } from './types/vscode' ;
5
- import CommandWrapper from './command-wrapper' ;
6
- import { Logger } from './types/logger' ;
7
- import { Command } from './commands/command' ;
8
5
import WorkspaceAdaptor from './adaptors/workspace' ;
9
6
import CommandAdaptor , { CommandItem } from './adaptors/command' ;
10
7
@@ -13,18 +10,15 @@ export default class Bootstrapper {
13
10
private readonly contentProvider : ContentProvider ;
14
11
private readonly workspaceAdaptor : WorkspaceAdaptor ;
15
12
private readonly commandAdaptor : CommandAdaptor ;
16
- private readonly logger : Logger ;
17
13
18
14
constructor ( commandFactory : CommandFactory ,
19
15
contentProvider : ContentProvider ,
20
16
workspaceAdaptor : WorkspaceAdaptor ,
21
- commandAdaptor : CommandAdaptor ,
22
- logger : Logger ) {
17
+ commandAdaptor : CommandAdaptor ) {
23
18
this . commandFactory = commandFactory ;
24
19
this . contentProvider = contentProvider ;
25
20
this . workspaceAdaptor = workspaceAdaptor ;
26
21
this . commandAdaptor = commandAdaptor ;
27
- this . logger = logger ;
28
22
}
29
23
30
24
initiate ( context : ExecutionContextLike ) {
@@ -52,32 +46,28 @@ export default class Bootstrapper {
52
46
{
53
47
name : `${ EXTENSION_NAMESPACE } .diffVisibleEditors` ,
54
48
type : 'GENERAL' ,
55
- command : this . wrapCommand ( this . commandFactory . createCompareVisibleEditorsCommand ( ) )
49
+ command : this . commandFactory . createCompareVisibleEditorsCommand ( )
56
50
} ,
57
51
{
58
52
name : `${ EXTENSION_NAMESPACE } .markSection1` ,
59
53
type : 'TEXT_EDITOR' ,
60
- command : this . wrapCommand ( this . commandFactory . crateSaveText1Command ( ) )
54
+ command : this . commandFactory . crateSaveText1Command ( )
61
55
} ,
62
56
{
63
57
name : `${ EXTENSION_NAMESPACE } .markSection2AndTakeDiff` ,
64
58
type : 'TEXT_EDITOR' ,
65
- command : this . wrapCommand ( this . commandFactory . createCompareSelectionWithText1Command ( ) )
59
+ command : this . commandFactory . createCompareSelectionWithText1Command ( )
66
60
} ,
67
61
{
68
62
name : `${ EXTENSION_NAMESPACE } .diffSelectionWithClipboard` ,
69
63
type : 'TEXT_EDITOR' ,
70
- command : this . wrapCommand ( this . commandFactory . createCompareSelectionWithClipboardCommand ( ) )
64
+ command : this . commandFactory . createCompareSelectionWithClipboardCommand ( )
71
65
} ,
72
66
{
73
67
name : `${ EXTENSION_NAMESPACE } .togglePreComparisonTextNormalizationRules` ,
74
68
type : 'GENERAL' ,
75
- command : this . wrapCommand ( this . commandFactory . createToggleNormalisationRulesCommand ( ) )
69
+ command : this . commandFactory . createToggleNormalisationRulesCommand ( )
76
70
}
77
71
] ;
78
72
}
79
-
80
- private wrapCommand ( command : Command ) {
81
- return new CommandWrapper ( command , this . logger ) ;
82
- }
83
73
}
0 commit comments