File tree Expand file tree Collapse file tree
plugin/src/main/java/io/snyk/eclipse/plugin/views/snyktoolview/handlers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,16 +24,19 @@ public class BaseHandler extends AbstractHandler implements IElementUpdater {
2424 public Object execute (ExecutionEvent event ) throws ExecutionException {
2525 String commandId = event .getCommand ().getId ();
2626
27- ICommandService commandService = PlatformUI .getWorkbench ().getService (ICommandService .class );
28- if (commandService != null ) {
29- commandService .refreshElements (commandId , null );
30- }
31-
27+ // Update the application state for the preference.
3228 Preferences .getInstance ().store (preferenceKey ,
3329 Boolean .valueOf (!Preferences .getInstance ().getBooleanPref (preferenceKey )).toString ());
3430
31+ // Update the Snyk Language Server configuration.
3532 new LsConfigurationUpdater ().configurationChanged ();
3633
34+ // Lastly update the UI.
35+ ICommandService commandService = PlatformUI .getWorkbench ().getService (ICommandService .class );
36+ if (commandService != null ) {
37+ commandService .refreshElements (commandId , null );
38+ }
39+
3740 return null ;
3841 }
3942
You can’t perform that action at this time.
0 commit comments