@@ -73,18 +73,18 @@ export class FileStructure implements QuickOpenModel, CommandContribution, Keybi
73
73
id : 'java.command.file.structure' ,
74
74
label : 'Java: Navigate File Structure'
75
75
} ;
76
-
76
+
77
77
constructor (
78
78
@inject ( CommandRegistry ) protected readonly commands : CommandRegistry ,
79
79
@inject ( KeybindingRegistry ) protected readonly keybindingRegistry : KeybindingRegistry ,
80
80
@inject ( KeybindingRegistry ) protected readonly keybindings : KeybindingRegistry ,
81
81
@inject ( QuickOpenService ) protected readonly quickOpenService : QuickOpenService ,
82
82
@inject ( LanguageClientProvider ) protected readonly languageClientProvider : LanguageClientProvider ,
83
83
@inject ( EditorManager ) protected readonly editorManager : EditorManager
84
- ) {
84
+ ) {
85
85
}
86
86
87
- async open ( ) {
87
+ async open ( ) {
88
88
// Triggering the keyboard shortcut while the dialog is open toggles
89
89
// showing the inherited members.
90
90
if ( this . isOpen ) {
@@ -124,21 +124,21 @@ export class FileStructure implements QuickOpenModel, CommandContribution, Keybi
124
124
private combineItems ( members : Members [ ] ) {
125
125
for ( const symbolInformation of members ) {
126
126
const info = symbolInformation . info as MemberItem ;
127
- if ( ! info ) {
127
+ if ( ! info ) {
128
128
continue ;
129
129
}
130
130
this . items . push ( new MemberQuickOpenItem ( info . name , info . kind , info . location , this . editorManager ) ) ;
131
131
132
- if ( symbolInformation . children . length !== 0 ) {
132
+ if ( symbolInformation . children . length !== 0 ) {
133
133
this . combineItems ( symbolInformation . children ) ;
134
134
}
135
135
}
136
136
}
137
137
138
- /**
139
- * Get a string (suitable to show to the user) representing the keyboard
140
- * shortcut used to open the quick file open menu.
141
- */
138
+ /**
139
+ * Get a string (suitable to show to the user) representing the keyboard
140
+ * shortcut used to open the quick file open menu.
141
+ */
142
142
private getKeyCommand ( ) : string | undefined {
143
143
const keyCommand = this . keybindingRegistry . getKeybindingsForCommand ( this . command . id ) ;
144
144
if ( keyCommand ) {
@@ -149,13 +149,13 @@ export class FileStructure implements QuickOpenModel, CommandContribution, Keybi
149
149
150
150
return undefined ;
151
151
}
152
-
152
+
153
153
isEnabled ( ) : boolean {
154
154
return ! ! this . editorManager . currentEditor ;
155
155
}
156
156
157
157
isVisible ( ) : boolean {
158
- return ! ! this . editorManager . currentEditor ;
158
+ return this . isEnabled ( ) ;
159
159
}
160
160
161
161
registerKeybindings ( keybindings : KeybindingRegistry ) : void {
@@ -181,7 +181,7 @@ export class FileStructure implements QuickOpenModel, CommandContribution, Keybi
181
181
182
182
public onType ( lookFor : string , acceptor : ( items : QuickOpenItem [ ] ) => void ) : void {
183
183
this . currentLookFor = lookFor ;
184
- acceptor ( this . items . filter ( ( item ) => item . getLabel ( ) ! . toLocaleLowerCase ( ) . indexOf ( lookFor . toLocaleLowerCase ( ) ) !== - 1 ) ) ;
184
+ acceptor ( this . items . filter ( ( item ) => item . getLabel ( ) ! . toLocaleLowerCase ( ) . indexOf ( lookFor . toLocaleLowerCase ( ) ) !== - 1 ) ) ;
185
185
}
186
186
187
187
private async doRequestToStructure ( javaClient : ILanguageClient ) : Promise < Members [ ] > {
0 commit comments