@@ -141,6 +141,11 @@ ${value}
141141 label : nls . localize ( 'arduino/editor/decreaseIndent' , 'Decrease Indent' ) ,
142142 order : '2' ,
143143 } ) ;
144+ registry . registerMenuAction ( ArduinoMenus . EDIT__CODE_CONTROL_GROUP , {
145+ commandId : EditContributions . Commands . AUTO_FORMAT . id ,
146+ label : nls . localize ( 'arduino/editor/autoFormat' , 'Auto Format' ) , // XXX: The Java IDE uses `Use Selection For Find`.
147+ order : '3' ,
148+ } ) ;
144149
145150 registry . registerMenuAction ( ArduinoMenus . EDIT__FONT_CONTROL_GROUP , {
146151 commandId : EditContributions . Commands . INCREASE_FONT_SIZE . id ,
@@ -188,13 +193,6 @@ ${value}
188193 ) , // XXX: The Java IDE uses `Use Selection For Find`.
189194 order : '3' ,
190195 } ) ;
191-
192- // `Tools`
193- registry . registerMenuAction ( ArduinoMenus . TOOLS__MAIN_GROUP , {
194- commandId : EditContributions . Commands . AUTO_FORMAT . id ,
195- label : nls . localize ( 'arduino/editor/autoFormat' , 'Auto Format' ) , // XXX: The Java IDE uses `Use Selection For Find`.
196- order : '0' ,
197- } ) ;
198196 }
199197
200198 override registerKeybindings ( registry : KeybindingRegistry ) : void {
@@ -248,10 +246,13 @@ ${value}
248246 } ) ;
249247 }
250248
251- protected async current ( ) : Promise < ICodeEditor | StandaloneCodeEditor | undefined > {
249+ protected async current ( ) : Promise <
250+ ICodeEditor | StandaloneCodeEditor | undefined
251+ > {
252252 return (
253253 this . codeEditorService . getFocusedCodeEditor ( ) ||
254- this . codeEditorService . getActiveCodeEditor ( ) || undefined
254+ this . codeEditorService . getActiveCodeEditor ( ) ||
255+ undefined
255256 ) ;
256257 }
257258
0 commit comments